blob_id
stringlengths
40
40
language
stringclasses
1 value
repo_name
stringlengths
5
133
path
stringlengths
3
276
src_encoding
stringclasses
33 values
length_bytes
int64
23
9.61M
score
float64
2.52
5.28
int_score
int64
3
5
detected_licenses
listlengths
0
44
license_type
stringclasses
2 values
text
stringlengths
23
9.43M
download_success
bool
1 class
6b901ddf9e51c86aae58c2cf202355704a543e85
SQL
Charly2/reporte
/base.sql
UTF-8
19,057
3.0625
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.7.4 -- https://www.phpmyadmin.net/ -- -- Servidor: 127.0.0.1 -- Tiempo de generación: 23-05-2018 a las 06:33:03 -- Versión del servidor: 10.1.30-MariaDB -- Versión de PHP: 7.2.1 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; ...
true
f042f6a6cae70fdfa5ab570e8b648478a99c9017
SQL
hugo098/Curso-SQL-Basico
/funcionesFecha.sql
UTF-8
2,054
4.03125
4
[]
no_license
--=============================================================-- SELECT sysdate FROM dual; --=============================================================-- SELECT sysdate + 7 FROM dual; --=============================================================-- SELECT sysdate - 5 FROM dual; --===============...
true
224d437ffebbc6e5a28b4aa06dcd28bfdb3f0c62
SQL
pareshmeb/paresh-TC
/cc/postgres/docker-entrypoint-initdb.d/init.sql
UTF-8
8,154
3.34375
3
[]
no_license
CREATE TABLE "position" ( position_id SERIAL PRIMARY KEY, position_name text NOT NULL ); CREATE TABLE "employee" ( employee_id SERIAL PRIMARY KEY, employee_name text NOT NULL, position_id INTEGER NOT NULL REFERENCES position(position_id) ON DELETE RESTRICT ); CREATE TABLE "measurement_type" ( ...
true
aa9a0b45522de149adc764cbe3f87e2d205b6997
SQL
Iamduynguyen/DuyShop_java6
/Web-Product-Spring-master/sql/019-customer_return.sql
UTF-8
565
2.890625
3
[]
no_license
create table customer_return ( id varchar(64) not null primary key, created timestamp default current_timestamp() not null, description varchar(255) null, status bit default b'1' not null, id_order_id varchar(64) null, id_staff_id varchar(64) null, id_visit_id varchar(64) null, constraint FKaigbe57n8bsrrcmt11...
true
464170b5f3e145c53150dc6e0fca9984885649b8
SQL
all-of-us/raw-data-repository
/rdr_service/tools/grant_permissions.sql
UTF-8
422
2.78125
3
[ "BSD-3-Clause" ]
permissive
GRANT SELECT ON ${db_name}.* TO '${READONLY_DB_USER}'@'%'; GRANT SELECT, INSERT, UPDATE, DELETE, CREATE TEMPORARY TABLES, EXECUTE ON ${db_name}.* TO '${RDR_DB_USER}'@'%'; GRANT SELECT, INSERT, UPDATE, DELETE, DROP, ALTER, CREATE, INDEX, REFERENCES, CREATE TEMPORARY TABLES, CREATE VIEW, CREATE ROUTINE, ALTER ROUTINE, ...
true
4a201fb2c3da24c6ace52928f2f2181dd5434f5a
SQL
liuluojie/spring-monkey
/sql/spring-monkey.sql
UTF-8
9,453
3.09375
3
[]
no_license
/* Navicat MySQL Data Transfer Source Server : yun_sql Source Server Version : 50725 Source Host : tmlh.xyz:3306 Source Database : tmlh-forum Target Server Type : MYSQL Target Server Version : 50725 File Encoding : 65001 Date: 2019-05-16 16:28:03 */ SET FOREIGN_KEY_CHECKS=0; -- ...
true
e8dfb7c5246afc3da5d2dce1ffa3f5712b05d3ea
SQL
CHAOS-Community/CHAOS.Portal.MCM
/sql/1.baseline/tables/1.Destination.sql
UTF-8
259
2.828125
3
[]
no_license
CREATE TABLE Destination ( ID int(10) unsigned NOT NULL AUTO_INCREMENT, SubscriptionGUID binary(16) NOT NULL, Name varchar(255) NOT NULL, DateCreated datetime NOT NULL, PRIMARY KEY (ID), UNIQUE KEY ID_UNIQUE (ID) ) ENGINE=InnoDB
true
303520db3422a1e3bbdfa38adc0f3347c92c9555
SQL
ccernam/indra_tdp_luna
/ML_10_ACTUALIZANDO_INDICADOR_EXCLUSION_INSERT.sql
UTF-8
2,336
3.1875
3
[]
no_license
use cobra --03-MARZO-2020 3 min /****************************************************************************************************************************************/ PRINT '/********** INICIO DE SCRIPT 10_ACTUALIZANDO_INDICADOR_EXCLUSION_INSERT **********\' PRINT 'HORA INICIO: ' + cast(cast(getdate() as ...
true
56d6360c39499fc962b65f81728eebcf9f9e05a7
SQL
Azure4Arjun/dba-scripts-1
/tempdb-get-file-size-and-space-used.sql
UTF-8
540
3.359375
3
[]
no_license
USE tempdb; --------- Show current size of TempDB files ----------- SELECT name ,CONVERT(BIGINT,size*8.0/1024) 'Current Size in MB' ,CONVERT(BIGINT,FILEPROPERTY(name,'SpaceUsed')*8.0/1024) 'Used Size in MB' FROM sys.database_files; --------- Show Iniial size of TempDB files ----------- SELECT name ...
true
e6fcd8a4bb921e450db5d022b623a17a20252929
SQL
bellmit/SVNrepo
/DBScripts/GoldenSourceMasterScript/2_Pricing/2_sp_alter_rbsa_end_of_price_process.sql
UTF-8
4,258
3.4375
3
[]
no_license
drop procedure if exists rbsa.end_of_price_process; delimiter $$ CREATE PROCEDURE rbsa.end_of_price_process(in p_process varchar(20),in p_businessdate varchar(20) ) BEGIN DECLARE d_count INTEGER; declare m_count integer ; declare md_count integer; declare v_prev_date varchar(10) DEFAULT ""; decla...
true
d6c8a664d7beb5ebf8a31e1aa1aae34651a62583
SQL
Truongnx58/SONAT-Test
/build/user.sql
UTF-8
1,551
3.125
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.6.4 -- https://www.phpmyadmin.net/ -- -- Máy chủ: 127.0.0.1 -- Thời gian đã tạo: Th2 28, 2017 lúc 03:09 CH -- Phiên bản máy phục vụ: 5.7.14 -- Phiên bản PHP: 5.6.25 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER...
true
9654fff3625f43562c44009a033dbd956bb78bf0
SQL
ligerbots/website_2016
/attendance-backend/api/sql/listEvents.sql
UTF-8
391
3.984375
4
[]
no_license
SELECT -- Event information calendar.id, calendar.user, calendar.start, calendar.end, calendar.meta, -- Checks if the event is open IF(calendar.end = 0, 1, 0) AS 'isopen', -- Gets the name of the user ( SELECT CONCAT(users.fname, " ", users.lname) FROM users WHERE users.id = calendar.user ) AS 'name...
true
cd6597f86cc8fc443a04a367563bf396f182d5f7
SQL
Yans88/dev_figi
/admin/schedule_task.sql
UTF-8
353
2.78125
3
[]
no_license
create table schedule_task( id_task int not null auto_increment primary key, task_name varchar(32) not null, task_path varchar(64) not null, task_status enum('disable','enable') not null, task_period enum('monthly', 'weekly', 'daily') not null, task_time time not null default '00:00:00', ...
true
0352148c4602da9ea71e9112532348ff0cfbe674
SQL
yiminyangguang520/Java-Learning
/spring/spring-security/spring-boot-spring-security-user-role-restful-sample/src/main/resources/cache.sql
UTF-8
4,646
3.3125
3
[]
no_license
/* Navicat MySQL Data Transfer Source Server : localhost - mysql Source Server Version : 50721 Source Host : localhost:3306 Source Database : cache Target Server Type : MYSQL Target Server Version : 50721 File Encoding : 65001 Date: 2018-08-24 12:11:42 */ SET FOREIGN_KEY_CHECKS=0;...
true
518d286c9b76f35bcff2ed47434be384779948dd
SQL
zanzydnd/DBGROUP-11.905
/practice/grades-Kozlov.sql
UTF-8
1,082
3.71875
4
[]
no_license
-- 1 SELECT CONCAT(s.name , ' ', s.surname, ' ', s.lastname) as nsl, `group`.name as group_name , `group`.year as year FROM student as s left join `group` ON `group`.id = s.group_id; -- 2 SELECT CONCAT(s.name , ' ', s.surname, ' ', s.lastname) as nsl, `group`.name as group_name FROM student as s LEFT JOIN `group` ...
true
aa5be7f8560ff42a0e95ae9dbaab6e1ee2358645
SQL
sokolenkomikhail/homeworks_mysql
/lesson_06/exercise_02.sql
UTF-8
2,803
4.375
4
[]
no_license
-- Пусть задан некоторый пользователь. -- Из всех друзей этого пользователя найдите человека, который больше всех общался с нашим пользователем. -- Думаю, что этот запрос можно улучшить. -- Малоюзабелен из-за того, что нужно подставлять id во многие места. SELECT (IF(from_user_id = 73, to_user_id, from_user_id)) AS f...
true
b3235c7ccf02a1b8fbe9723573cbd91b5e4d399a
SQL
theresa-christina/SQL.GiveMeTheGoods
/answers/exercise4.sql
UTF-8
58
2.78125
3
[]
no_license
SELECT * FROM Students WHERE City REGEXP '^[^acf]';
true
f435781e546239536b1e5def1a529f91a91d8dcb
SQL
sogis/gretljobs
/ada_archaeologie_pub/to_pub_db/flaeche.sql
UTF-8
531
2.5625
3
[ "MIT" ]
permissive
SELECT f.fundstellen_nummer, f.x_koordinate, f.y_koordinate, fundst_adresse_flurname, fundstellen_art, geschuetzt, geschuetzt::varchar as geschuetzt_txt, qualitaet_lokalisierung, qualitaet_lokalisierung as qualitaet_lokalisierung_txt, kurzbeschreibung, gemeindename_abla...
true
579fc07a495f792f86a843e7ecd8f06ab276c2d3
SQL
1Landlord/bookphpmysql.loc
/book_php_mysql.sql
UTF-8
18,736
3.046875
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.7.3 -- https://www.phpmyadmin.net/ -- -- Хост: localhost:8889 -- Время создания: Янв 28 2018 г., 03:15 -- Версия сервера: 5.6.35 -- Версия PHP: 7.1.8 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;...
true
748ca11d215f5c91f0534b59eae521a9c7182b0e
SQL
LabKey/wnprc-modules
/WNPRC_Purchasing/resources/queries/ehr_purchasing/purchasingRequestsOverview.sql
UTF-8
441
3.515625
4
[ "Apache-2.0" ]
permissive
-- this is the query that displays on the requesters page SELECT pr.rowId, pr.vendorId AS vendor, pr.account, pr.otherAcctAndInves, pr.qcState AS requestStatus, pr.created AS requestDate, pr.orderDate, pr.createdBy AS requester, pr.totalCost FROM ehr_pu...
true
5cd63c849842b4a601d0f65f3c44d74a3f22b60f
SQL
brentfraser/GpsTracker
/servers/php/postgresql/gpstracker-09-14-14.sql
UTF-8
5,954
2.8125
3
[ "MIT" ]
permissive
-------------------------------------------------------------- -- SQL for creating GpsTracker object in a PostgreSQL database -------------------------------------------------------------- -- CREATE USER gpstracker_user WITH PASSWORD 'gpstracker'; DROP VIEW IF EXISTS v_GetAllRoutesForMap; DROP VIEW IF EXISTS v_GetRo...
true
37b3dbf48c9e4e492b4e58e77af809892e762785
SQL
Rthompson2548/assignment-creating-relations-other-joins
/src/get-all-artists-and-songs.sql
UTF-8
322
3.703125
4
[]
no_license
-- Write a join query to return a list of ALL artists -- and their songs. Include the artist name, -- song title, and album name columns only -- in your result. SELECT a.artist_name, s.song_name, s.album_name FROM artists a LEFT JOIN songs s ON a.artist_id = s.artist ...
true
e197bfb44af4e7b8be98a955c23358b52af759f2
SQL
TruongPhuong1107/WEBSACH-1921COMP1303
/doan/websach.sql
UTF-8
12,978
3.0625
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 5.0.2 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Jul 25, 2020 at 04:11 AM -- Server version: 10.4.11-MariaDB -- PHP Version: 7.4.6 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIEN...
true
2cb6d25ba9bb769e6ae896f88aecd3ae4cc8ed26
SQL
lezagat/info-service
/db_yerin/restaurant_schema.sql
UTF-8
929
3.609375
4
[]
no_license
DROP DATABASE IF EXISTS restaurantinfo; CREATE DATABASE restaurantinfo; \c restaurantinfo; CREATE TABLE restaurants ( id serial primary key unique, name varchar(100) NOT NULL, address varchar(100) NOT NULL, coord varchar(100) NOT NULL, phone varchar(40) NOT NULL, website varchar(40) NOT NULL ); CREATE T...
true
dee4c74b6d27c20250ec8cf951caa82d45bb94cf
SQL
dangvandat15021997/HelloWorld
/DB system concepts/Part 1/Chap 4/4.14 - 4.26.sql
UTF-8
569
4.28125
4
[]
no_license
select * from student left outer join takes using(ID) where course_id is null; select * from student left outer join advisor on (student.ID = advisor.s_ID and i_id is not null) where i_ID is null; select * from employee left outer join manages on (employee.ID = manages.ID and manager_id is not null) where manages.ID...
true
28213bfe253c74f4c2967c3585741b74a525885d
SQL
cshah1/milan
/MilanRegistration/src/scripts/Update.sql
UTF-8
842
3.21875
3
[]
no_license
ALTER TABLE `milan`.`registration` ADD COLUMN `registrationdatetime` DATETIME NULL DEFAULT NULL AFTER `departuretime`, ADD COLUMN `bhaktichakracollected` BIT NULL DEFAULT 0 AFTER `registrationdatetime`, ADD COLUMN `accomodationType` VARCHAR(10) NULL DEFAULT 'None' AFTER `bhaktichakracollected`; UPDATE milan.registra...
true
ce38e08569e200ac984c57256d5765cad958da91
SQL
roverkim/Project2
/config/schema.sql
UTF-8
1,843
3.5
4
[]
no_license
DROP DATABASE IF EXISTS `sequelize_library`; CREATE DATABASE `sequelize_library`; CREATE TABLE user_external_login ( id int NOT NULL AUTO_INCREMENT, user_account_id int NOT NULL, external_authentication_provider_id int NOT NULL, external_user_id varchar(255) NOT NULL, name varchar(30) NOT NULL, first_name ...
true
c66ea7c47a43180140e1938511f378378449720b
SQL
JKubicaLedzion/invoice-project
/src/main/resources/tabels.sql
UTF-8
1,077
3.765625
4
[]
no_license
CREATE TABLE "Company" ( name VARCHAR(255) NOT NULL UNIQUE, street VARCHAR(255) NOT NULL, postal_code VARCHAR(255) NOT NULL, city VARCHAR(255) NOT NULL, country VARCHAR(255) NOT NULL, phone_number INT, vat_no VARCHAR(255) NOT NULL UNIQUE, bank_account VARCHAR(255) NOT NULL, PRIMARY KEY (vat_no) ); C...
true
027d570d18672fedf779e84be1ad9c18f80a35f2
SQL
RicordL/python_practice
/netease_music_comments_spider-master/netease_music_comments_spider-master/scrapy.sql
UTF-8
1,694
3.421875
3
[]
no_license
/* Navicat MySQL Data Transfer Source Server : localhost Source Server Version : 50640 Source Host : localhost:3306 Source Database : scrapy Target Server Type : MYSQL Target Server Version : 50640 File Encoding : 65001 Date: 2018-05-28 22:46:42 */ SET FOREIGN_KEY_CHECKS=0; -- --...
true
1259200cd7f188c1c4879fc962f22f6cff58b634
SQL
fabuzaid21/nprr
/query/rectangle.sql
UTF-8
134
2.6875
3
[]
no_license
select count(*) from graph as A, graph as B, graph as C, graph as D where A.v1 = B.v2 and B.v1 = D.v2 and D.v1 = C.v2 and C.v1 = A.v2;
true
40aad9586045c7580f6d13fbaf18665c007c71be
SQL
GitMullins/Northwind
/AllQ&A.sql
UTF-8
2,077
4.65625
5
[]
no_license
--1. What is the undiscounted subtotal for each Order (identified by OrderID). select OrderID, sum(UnitPrice * Quantity) as subtotal from [Order Details] od group by OrderId --2. What products are currently for sale (not discontinued)? select ProductID,ProductName,Discontinued from Products where Discontinued = 0 ...
true
0f6493489c03b079dd6382dd8490c123c69da650
SQL
CodeupClassroom/quincy_mysql
/join_exercise.sql
UTF-8
2,208
4.5625
5
[]
no_license
-- write a query that shows each department along with the name of the current manager for that department. select departments.dept_name, concat(employees.first_name, " ", employees.last_name) as "current manager" from employees join dept_manager on dept_manager.emp_no = employees.emp_no join departments on departmen...
true
60344974ae7c00f6e9cea96a86214ec23639143b
SQL
Syed-Umair/tech-interview-handbook
/apps/portal/prisma/migrations/20221008165306_update_vote_enum/migration.sql
UTF-8
1,373
2.859375
3
[ "MIT", "LicenseRef-scancode-free-unknown" ]
permissive
/* Warnings: - Changed the type of `vote` on the `QuestionsAnswerCommentVote` table. No cast exists, the column would be dropped and recreated, which cannot be done if there is data, since the column is required. - Changed the type of `vote` on the `QuestionsAnswerVote` table. No cast exists, the column would be...
true
d014b98bffa2a4a80c19d134259b13cd855c0b13
SQL
Jelwin13afc/information_security_course_project
/bankis_bank_rbac/SQL/db_transactions.sql
UTF-8
3,403
3.015625
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 5.0.2 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Jun 10, 2020 at 02:57 AM -- Server version: 10.4.11-MariaDB -- PHP Version: 7.4.6 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIEN...
true
3f3ca1013aa79aa075b79a00a90e588025891cc7
SQL
theyoshi1986/ecom-db-dwh-ddl
/bi_orderrsp_position_trans.sql
UTF-8
582
3.03125
3
[]
no_license
create table bi_orderrsp_position_trans as select op.*, g.intaccountid from dwh.bi_orderrsp_position op inner join dwh.stg_gln g on g.vargln=op.ordrsp_supplier_gln or g.vargln=op.ordrsp_byer_gln; --select * from bi_orderrsp_position_trans; --drop index bi_orderrsp_position_trans_idx1; create index bi_order...
true
f5069f86f65c66b6a882939b5eb0dbf1d88d9b89
SQL
mfauzanp/webocil.github.io
/phpperpus.sql
UTF-8
5,238
2.734375
3
[ "MIT", "LicenseRef-scancode-unknown-license-reference" ]
permissive
-- phpMyAdmin SQL Dump -- version 4.8.3 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Feb 27, 2020 at 05:58 AM -- Server version: 10.1.36-MariaDB -- PHP Version: 7.2.10 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OL...
true
4e92b197345ebfb8d92ce4982157a881b3a5a872
SQL
cjheath/activefacts-examples
/cql/SeparateSubtype.cql
UTF-8
908
3.28125
3
[ "MIT" ]
permissive
vocabulary SeparateSubtype; /* * Value Types */ Claim ID is written as Auto Counter; Date Time is written as Date Time; Person Name is written as String; /* * Entity Types */ Claim is identified by its ID; Incident is identified by Claim where Claim concerns at most one Incident, Incident resulted in one Claim...
true
d05fbc734732d7ece50b4531445d7f2fffa7233d
SQL
SylviaChin/jason-sms
/src/main/resources/META-INF/sql/sms.sql
UTF-8
4,425
3.25
3
[]
no_license
/* SQLyog 企业版 - MySQL GUI v8.14 MySQL - 5.5.19 : Database - sms ********************************************************************* */ /*!40101 SET NAMES utf8 */; /*!40101 SET SQL_MODE=''*/; /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; /*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOR...
true
4051aa89d9925fc6917dc5ce769e17b81acf8736
SQL
sansbacon/sql_examples
/extra_misc.draft.draft_summary.sql
UTF-8
459
3.5625
4
[ "MIT" ]
permissive
-- extra_misc.draft.draft_summary WITH t AS ( select source_team_code, draft_year, draft_round, count(source_team_code) as num_picks from extra_misc.draft group by source_team_code, draft_year, draft_round ) SELECT t.*, SUM(num_picks) over (PARTITION BY source_team_code, draft_year ORDER BY draft_round ...
true
05ac4b965376da74cd26023dc273cfbe88538223
SQL
iOllio-Nguyen/QuanLyQuanNet
/Tables.sql
UTF-8
3,575
3.796875
4
[]
no_license
create database project3; use project3; CREATE TABLE Customer ( username varchar(50) not null, password varchar(255) not null, currentState bit default 0, currentMoney float not null default 5000, fullName varchar(50) null, phone varchar(11) null, createdAt timestamp not null default now(), Primary...
true
56e2973d9161e42c1310bad8e98bd2e500e9f820
SQL
kadraman/buildmeister
/db/deltas/6-create-articles.sql
UTF-8
482
3.046875
3
[ "Apache-2.0" ]
permissive
CREATE TABLE articles ( id mediumint(9) NOT NULL auto_increment, cat_id tinyint(4) NOT NULL, date_posted datetime NOT NULL, posted_by mediumint(11) NOT NULL, title varchar(100) NOT NULL, summary tinytext NOT NULL, content tinytext NOT NULL, views mediumint(9) NOT NULL, active tinyint(1) NOT N...
true
4f6913b1d715d5265a63cc833271924348a6c098
SQL
donthomaspj/react-project2
/skill4life.sql
UTF-8
4,482
3.921875
4
[]
no_license
-- DROP IF EXISTS DATABASE Skill4Life; CREATE DATABASE Skill4Life CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; use Skill4Life; create user 'skill4life'@'localhost' identified by '!Lamp12!'; grant all on Skill4Life.* to 'skill4life'@'localhost'; -- DROP TABLE IF EXISTS `User`; CREATE TABLE User ( `userId` INT A...
true
cebd7011a4d222144171951868608ca0861cc728
SQL
codeFarmerLT/ssm
/src/main/sql/schema.sql
UTF-8
517
3.546875
4
[]
no_license
-- 数据库脚本初始化 -- 创建数据库 CREATE DATABASE db_test; -- 使用数据库 USE db_test; -- 创建用户表 CREATE TABLE t_user( user_id INT NOT NULL AUTO_INCREMENT COMMENT '用户ID', user_name VARCHAR(20) NOT NULL COMMENT '用户名', sex CHAR(2) COMMENT '性别', create_time TIMESTAMP DEFAULT current_timestamp COMMENT '创建时间', PRIMARY KE...
true
f6db0389801898930b31701a134ada44fcb6387a
SQL
BAndreyG/FSBe
/src/main/resources/data.sql
UTF-8
7,657
3.15625
3
[]
no_license
DELETE FROM user_roles; DELETE FROM users; DELETE FROM news; ALTER SEQUENCE global_seq RESTART WITH 100000; INSERT INTO users (surname, name, patronymic, gender, password) VALUES ('Васёв', 'user', 'Васильевич', 'м', '$2a$10$HhWIdKerHw97lQDJkDgbDeXVpWJ2n8b3mUgrh8X5NPWhdLvYoeQJu'), ('Петров', 'admin', 'Петрович',...
true
5b2a4e3d38e0036bae3daa993ddcb2051c9a7bfe
SQL
ChutimaNurak/A
/sql/path.sql
UTF-8
7,736
3.5
4
[ "MIT" ]
permissive
-- phpMyAdmin SQL Dump -- version 4.8.0.1 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Jan 08, 2019 at 05:01 AM -- Server version: 10.1.32-MariaDB -- PHP Version: 7.2.5 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @O...
true
7b8faf4cfbd6078724b2b457496a8f3ca5c2ba5f
SQL
ItaloFalzoni/tcc-puc-minas-sigo
/sigo-identity-microservice/bin/src/main/resources/db/migration/V01__criar_e_registrar_usuarios_e_permissoes.sql
UTF-8
1,597
3.703125
4
[]
no_license
CREATE TABLE usuario( codigo BIGINT(20) PRIMARY KEY, nome VARCHAR(50) NOT NULL, email VARCHAR(50) NOT NULL, senha VARCHAR(150) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8; CREATE TABLE permissao( codigo BIGINT(20) PRIMARY KEY, descricao VARCHAR(50) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8; ...
true
875ecb73cd482c1eed4659df53104daa30deafab
SQL
hecticus/newsapps
/FutbolBrasil/db/alters/20150312_inaki_push_languages.sql
UTF-8
358
3.1875
3
[]
no_license
ALTER TABLE `football_brazil`.`actions` ADD COLUMN `id_language` INT NULL AFTER `ext_id`, ADD INDEX `fk_language_action_idx` (`id_language` ASC); ALTER TABLE `football_brazil`.`actions` ADD CONSTRAINT `fk_language_action` FOREIGN KEY (`id_language`) REFERENCES `football_brazil`.`languages` (`id_language`) ON DE...
true
b0bbc55a374240ea3cb12a8a05d08515345e6c9a
SQL
shanks-devil/hbase-example
/src/test/resources/tables/article.sql
UTF-8
167
2.53125
3
[]
no_license
CREATE TABLE IF NOT EXISTS "ARTICLE" ( articleId VARCHAR(16) not null, "INFO".owner VARCHAR(32), "INFO".vote VARCHAR(16) CONSTRAINT pk PRIMARY KEY (articleId) );
true
63606b32552f65fcb9e915b768845c3ce559b9d9
SQL
logomount/udiddit
/udiddit_old_schema.sql
UTF-8
644
3.140625
3
[]
no_license
/** Old schema. Udiddit, a social news aggregation, web content rating, and discussion website, is currently using a risky and unreliable Postgres database schema to store the forum posts, discussions, and votes made by their users about different topics.**/ CREATE TABLE bad_posts ( id SERIAL PRIMARY KEY, ...
true
45c11419b90da39e7d4eb4cdffef75bf6a077604
SQL
SuperMap/GAF
/gaf-cloud/gaf-commons/gaf-common-base-data/src/main/resources/com/supermap/gaf/base/data/ddl/webgis_button.sql
UTF-8
1,467
3.359375
3
[ "Apache-2.0" ]
permissive
-- liquibase formatted sql logicalFilePath:ddl/webgis_button -- changeset SYS:20210406-0 CREATE TABLE "webgis_button" ("button_id" VARCHAR(36) NOT NULL, "name" VARCHAR(255) NOT NULL, "type" VARCHAR(3), "method" VARCHAR(255) NOT NULL, "icon" VARCHAR(255), "description" VARCHAR(500), "status" BOOLEAN, "created_time" TIM...
true
2cbfd9eb399187595701c4524590620917d79535
SQL
DimsonK/2020-11-otus-spring-konovalov
/spring-12/src/main/resources/schema.sql
UTF-8
1,363
3.921875
4
[]
no_license
CREATE SEQUENCE AUTHOR_SEQUENCE START WITH 10; CREATE SEQUENCE BOOK_SEQUENCE START WITH 10; CREATE SEQUENCE GENRE_SEQUENCE START WITH 10; CREATE SEQUENCE COMMENT_SEQUENCE START WITH 20; CREATE SEQUENCE USER_SEQUENCE START WITH 10; DROP TABLE IF EXISTS GENRES; CREATE TABLE GENRES ( ID BIGINT, GENRE_NAME...
true
a6f5dc72bde95debd3b1507f8237134a2700675f
SQL
MrPIvanov/SoftUni
/11-Database Basics – MS SQL/20-EXAM/EXAM/07_FlightProfits.sql
UTF-8
151
3.21875
3
[ "MIT" ]
permissive
--USE Airport --GO SELECT f.Id, SUM(t.Price) AS Price FROM Flights AS f JOIN Tickets AS t ON t.FlightId = f.Id GROUP BY f.id ORDER BY Price DESC, f.Id
true
6a96ceefc383c30687ee24e018b20c8f8ce6fbed
SQL
wigm4n/MSA
/data/setup.sql
UTF-8
119,539
3.546875
4
[]
no_license
drop table users cascade ; drop table tasks cascade ; drop table messages cascade ; drop table sessions cascade ; drop table groups cascade ; drop table norm cascade ; drop table student cascade ; drop table fisher cascade ; create table users ( id serial not null primary key, email varc...
true
64ea54df51fcf39216e46265ceaa11935245f4d7
SQL
joshelser/phoenix-performance
/ddl/SecondaryCustomer.sql
UTF-8
93
2.765625
3
[]
no_license
CREATE INDEX customer_index ON store_sales (ss_customer_sk) include (ss_sold_date_sk);
true
c72d9843244ad0948832d00fbeeb554b049d7f96
SQL
alvinoalvin/LHL_LighthouseBnB
/seeds/01_seeds.sql
UTF-8
1,768
2.65625
3
[]
no_license
DELETE FROM users; DELETE FROM properties; DELETE FROM reservations; DELETE FROM property_reviews; INSERT INTO users VALUES(1,'name1','email1@gmail.com','$2a$10$FB/BOAVhpuLvpOREQVmvmezD4ED/.JBIDRh70tGevYzYzQgFId2u.'); INSERT INTO users VALUES(2,'name2','email2@gmail.com','$2a$10$FB/BOAVhpuLvpOREQVmvmezD4ED/.JBIDRh70tG...
true
2a1dad572367d433912b2a2c39fce2aad8fe02d0
SQL
bhargavaganti/backup_biz_data
/business_data/biz_data_product_event/src/nagraj_rdc_visitor_aggregate.sql
UTF-8
14,465
3.15625
3
[]
no_license
SELECT cast (concat(year,'-', month,'-', day) as date) as date_mst ,a.post_visid_high || '-' || a.post_visid_low AS visitor_id ,a.post_visid_high || '-' || a.post_visid_low||'-'||a.visit_num as visit_id ,lower(trim(a.post_evar17 )) brand_experience , (case when lower(trim(post_evar17))='rdc-responsive' Then 'RDC & Mo...
true
dbb3e07d0d78f38bec50219d1b5c8f195f3ae911
SQL
sinheeseung/Data_base
/TP_3.sql
UTF-8
2,126
4.21875
4
[]
no_license
CREATE TABLE Customer ( cno NUMBER(3) NOT NULL, name VARCHAR2(20), passwd VARCHAR2(20), email VARCHAR2(30), CONSTRAINT Customer_PK PRIMARY KEY (cno), CONSTRAINT Customer_UQ UNIQUE (email), CONSTRAINT CHK_cno CHECK (cno>=0) ); describe Customer; CREATE TABLE Ebook ( isbn NUMBER(5) NOT NULL, ti...
true
019c6a438e050a189715732a0ed55d03d75d09dc
SQL
lilyren8/Leetcode
/0512. Game Play Analysis II.sql
UTF-8
195
3.15625
3
[]
no_license
SELECT player_id, device_id FROM Activity WHERE (player_id, event_date) IN( SELECT player_id, MIN(event_date) FROM Activity GROUP BY player_id ); -- need to put brackets around vars in WHERE
true
e692f2924516dd17258394af329a550d9f0b9b8c
SQL
biprajeet/internshala-assignment
/Readme/user.sql
UTF-8
1,382
2.796875
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.5.1 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: May 13, 2016 at 09:42 AM -- Server version: 10.1.10-MariaDB -- PHP Version: 7.0.2 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLI...
true
103ec46a4aa04df1f40f2faf895f31665e01a7df
SQL
ipasa/neticketing
/nticketing_project.sql
UTF-8
18,947
2.53125
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 3.5.1 -- http://www.phpmyadmin.net -- -- Host: localhost -- Generation Time: May 28, 2013 at 06:04 PM -- Server version: 5.5.24-log -- PHP Version: 5.4.3 SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;...
true
f3cc16cb629e8af21b220c540fe70c41a4793559
SQL
mpicillo91/Final-Project
/finaldbbackup.sql
UTF-8
5,838
2.984375
3
[]
no_license
-- MySQL dump 10.13 Distrib 5.5.47, for debian-linux-gnu (x86_64) -- -- Host: localhost Database: storeinventoryfinal1 -- ------------------------------------------------------ -- Server version 5.5.47-0ubuntu0.14.04.1 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SE...
true
9edb4157f321d69291c6a89be8ff928951db11f4
SQL
dscheinah/pwsafe
/sql/001-categories.sql
UTF-8
569
3.59375
4
[]
no_license
CREATE TABLE `categories` ( `id` INT UNSIGNED AUTO_INCREMENT PRIMARY KEY, `user_id` INT UNSIGNED NOT NULL, `name` VARCHAR(255), FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE ) ENGINE = INNODB; ALTER TABLE `passwords` ADD `category_id` INT UNSIGNED, ADD FOREIGN KEY (`category_i...
true
26d6a31e396a88beb59aaf44ae1dfe5de46a1d3d
SQL
conorgilmer/radiolog
/sql/db.sql
UTF-8
1,512
3.0625
3
[]
no_license
CREATE TABLE IF NOT EXISTS `radiolog` ( `id` int(11) NOT NULL AUTO_INCREMENT, `date` DATE NOT NULL, `frequency` VARCHAR(10) NOT NULL, `name` VARCHAR(30) NOT NULL, `band` CHAR(5) NOT NULL, `type` CHAR(5) NOT NULL, `transmitter` VARCHAR(10), `country` VAR...
true
9878828b2d941fda0a39b3d7237fc23424521bca
SQL
fengdanbailu/leetcode
/database/0601_Human_Traffic_of_Stadium.sql
UTF-8
1,666
3.921875
4
[]
no_license
Drop table if exists `stadium`; CREATE TABLE `stadium` ( `id`INT (11) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT 'id主键', `visit_date` DATE NOT NULL COMMENT '访问日期', `people` INT (11) UNSIGNED NOT NULL COMMENT '人数', `create_time` DATETIME DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', `modify_time` DATETIME DEFAULT NULL COMMEN...
true
fb7828f6ccca7c3719b385aaf9815a22237b8f52
SQL
tom-fitz/chinook
/top_agent.sql
UTF-8
326
3.6875
4
[]
no_license
select max(Sales.Totals) as TotalSales, Sales.Employee from (select sum(i.Total) as Totals, e.FirstName || e.LastName as Employee from Invoice i, Employee e, Customer c where i.CustomerId = c.CustomerId and c.SupportRepId = e.EmployeeId and e.Title = 'Sales Support Agent' group by 'Sales Representative' ) as ...
true
bc06bc23f6563bb4c020b24bb2e2b6672ec471a5
SQL
moriaatzur1999/my_brix_test
/Schema cat.sql
UTF-8
190
2.96875
3
[]
no_license
CREATE TABLE "products" (catID integer , Name varchar(20) PRIMARY KEY, price integer, FOREIGN KEY(catID) REFERENCES cat(ID)); CREATE TABLE "cat" (ID integer PRIMARY KEY, Name varchar(20));
true
36d77b83e1ccae4273aeb58003c6e5c04718d661
SQL
reportportal/migrations
/migrations/5_test_case_id_type.up.sql
UTF-8
400
2.96875
3
[ "Apache-2.0" ]
permissive
ALTER TABLE test_item ADD COLUMN test_case_hash INTEGER; UPDATE test_item SET test_case_hash=test_case_id; ALTER TABLE test_item ALTER COLUMN test_case_hash SET NOT NULL; ALTER TABLE test_item ALTER COLUMN test_case_id TYPE VARCHAR(512); CREATE INDEX test_case_hash_idx ON test_item (test_case_hash); CRE...
true
fd16868fefa20ed53c029b788b71743633734df8
SQL
Jyf010205/FaceChina1.0
/facechina.sql
UTF-8
8,265
3.5
4
[]
no_license
/* Navicat Premium Data Transfer Source Server : FaceChina Source Server Type : MySQL Source Server Version : 50553 Source Host : localhost:3306 Source Schema : facechina Target Server Type : MySQL Target Server Version : 50553 File Encoding : 65001 Date: 28/02/2019 ...
true
9c4f4404a29c81febcd779104493f48ccfeff60f
SQL
leeloveit/helloworld
/hellocassandra/src/main/resources/schema.sql
UTF-8
289
3.1875
3
[ "Apache-2.0" ]
permissive
CREATE TABLE inventory ( user_id uuid, inventory_id uuid, inventory_name text, name text, tags text, create_time timestamp, last_modified_time timestamp, PRIMARY KEY(user_id,inventory_id)); create index on inventory(name); CREATE TABLE person ( id text PRIMARY KEY, name text, age int);
true
85e12c80a6af901dae899978ba9e27425cc81045
SQL
jeremy-farnault/FitBook
/fitbook/src/main/resources/sql/muscle_group_create.sql
UTF-8
382
2.984375
3
[]
no_license
DROP TABLE public.muscle_group; CREATE TABLE public.muscle_group ( id integer NOT NULL DEFAULT nextval('muscle_group_id_seq'::regclass), name character varying(30) COLLATE pg_catalog."default" NOT NULL, CONSTRAINT muscle_group_pkey PRIMARY KEY (id) ) WITH ( OIDS = FALSE ) TABLESPACE pg_defau...
true
d3ce98efef99902de02c2952624da89dc76a8bf6
SQL
popping/steplix-project
/mysql/02-initial_data.sql
UTF-8
720
3.234375
3
[]
no_license
USE steplix; DELETE FROM rates; DELETE FROM currencies; INSERT INTO currencies(description, symbol) VALUES ('bitcoin', 'BTC'); INSERT INTO currencies(description, symbol) VALUES ('etherum', 'ETH'); INSERT INTO currencies(description, symbol) VALUES ('cardano', 'ADA'); INSERT INTO rates(id_currency, value, created_at...
true
83ffc0e9adead397f5c31a2682665eb8c5790673
SQL
dbristow31/steam_games
/steam_games_queries.sql
UTF-8
15,932
4.25
4
[]
no_license
/* The purpose of this project is to display trends in video gaming by analyzing the evolution of games on Steam. Steam is a video game digital distribution service that was launched in 2003. The queries that follow focus on four aspects of video gaming on Steam: 1. The increasing number of games released each ...
true
55a8a4de94eeae87599bdfdd2488b7eef3da4669
SQL
pauljstuart/Scripts
/db_logs_not_received.sql
UTF-8
309
2.8125
3
[]
no_license
set serveroutput on exec dbms_output.put_line('Run this on the Primary'); SELECT LOCAL.THREAD#, LOCAL.SEQUENCE# FROM (SELECT THREAD#, SEQUENCE# FROM V$ARCHIVED_LOG WHERE DEST_ID=1) LOCAL WHERE LOCAL.SEQUENCE# NOT IN (SELECT SEQUENCE# FROM V$ARCHIVED_LOG WHERE DEST_ID=2 AND THREAD# = LOCAL.THREAD#);
true
c0c4c335c125b6df6db609c4e0d10f2ab53063aa
SQL
Praful-Mali/codeigniter
/practical.sql
UTF-8
2,310
3.03125
3
[]
no_license
-- -------------------------------------------------------- -- Host: 127.0.0.1 -- Server version: 10.1.21-MariaDB - mariadb.org binary distribution -- Server OS: Win32 -- HeidiSQL Version: 9.3.0.4984 -- ------------------------------------------------...
true
090aad249852d0e8f761b06452cbcc444ac1ea65
SQL
rkammer/production-sql
/views/season_get_list.sql
UTF-8
5,858
3.28125
3
[]
no_license
CREATE OR REPLACE VIEW season_get_list( season_id, season_title, season_season_number, season_media_company_id, season_media_company_name, season_business_group_id, season_business_group_name, season_network_id, season_network_name, season_production_id, season_production_tit...
true
a91470958aa7592664265c0a635714ea80c52bc7
SQL
Infixo/Civ6-Mods
/RFE/RFE_Data.sql
UTF-8
3,138
3.578125
4
[]
no_license
-- =========================================================================== -- Real Fixes: Elizabeth -- Author: Infixo -- 2023-03-31: Created -- =========================================================================== DELETE FROM TraitModifiers WHERE TraitType = 'TRAIT_LEADER_ELIZABETH' AND ModifierId = 'ELIZABE...
true
f137f0b2d0874564d8eb8597005fcb1d708160c4
SQL
hongzhangzhao/yui
/sourceCode/精通hibernate源码/chapter14/14.3/schema/sampledb.sql
UTF-8
1,534
3.78125
4
[]
no_license
drop database if exists SAMPLEDB; create database SAMPLEDB; use SAMPLEDB; create table COMPANIES ( ID bigint not null, NAME varchar(15), primary key (ID) ); create table EMPLOYEES ( ID bigint not null, NAME varchar(15), COMPANY_ID bigint, primary key (ID) ); create table HOURLY_EMPLOYEES ( EMP...
true
4d7822b477e9d320598f60c4100c7cfc37c33fd0
SQL
primandikakiki/uts
/uts.sql
UTF-8
3,599
2.78125
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.8.4 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Waktu pembuatan: 27 Mar 2020 pada 11.41 -- Versi server: 10.1.37-MariaDB -- Versi PHP: 7.3.1 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARA...
true
1d77e06af3f9ae4d083f34ea381e10e0adfb5fc8
SQL
radtek/ICS5200
/src/sql/Runtime/TPC-DS/tpcds100/Query/query_98.sql
UTF-8
831
3.84375
4
[]
no_license
select i_item_id ,i_item_desc ,i_category ,i_class ,i_current_price ,sum(ss_ext_sales_price) as itemrevenue ,sum(ss_ext_sales_price)*100/sum(sum(ss_ext_sales_price)) over (partition by i_class) as revenueratio from store_sales ,item ,date_dim where ss_item_sk = ...
true
1aff7e967af6916cbaea160bf0cd722eab30ca2b
SQL
guangping/open
/open/mp/src/main/resources/scripts/main.sql
UTF-8
1,771
3.25
3
[]
no_license
CREATE TABLE sys_user ( id bigint(20) NOT NULL AUTO_INCREMENT, user_name varchar(20) DEFAULT NULL COMMENT '用户名', email varchar(30) DEFAULT NULL COMMENT '邮箱', phone varchar(11) DEFAULT NULL COMMENT '手机号码', create_time datetime NOT NULL DEFAULT CURRENT_TIMESTAMP, modify_time datetime NOT NULL DEFAULT CURRENT_...
true
fd8271a09fb87fa25771d170eae8ee3301711948
SQL
Mike-T-Anderson/ConfigMgrCleanup
/SQL Queries/Application deployments with 0 deployment results or targeted at 0 resources.sql
UTF-8
370
3.046875
3
[]
no_license
-- Application deployments with 0 deployment results or targeted at 0 resources Select SoftwareName,CollectionName,AssignmentID from fn_DeploymentSummary(1033) Where FeatureType = 1 And ((NumberSuccess = 0 and NumberInProgress = 0 and NumberUnknown = 0 and NumberErrors = 0 and NumberOther = 0) Or NumberTarge...
true
65680c6d45f3c543bf395c8b2a6508e7de77f184
SQL
ekryp/Promethean
/SQL queries/get_top_locations.sql
UTF-8
320
3.875
4
[]
no_license
SELECT site.site_name, sum(daily_count.critical_count) as total_critical FROM daily_incidents1 AS daily_count INNER JOIN end_customer_devices AS assets ON assets.id=daily_count.device_id INNER JOIN end_customer_sites AS site ON site.id=assets.site_id GROUP BY daily_count.serial_number ORDER BY total_critical desc;
true
f30f22d1770ff3d0a8820e856c1f1524a6bf2aec
SQL
fgouget/wine-tools
/lxr/templates/initdb/initdb-o-template.sql
UTF-8
10,398
3.5625
4
[]
no_license
/*- -*- tab-width: 4 -*- -*/ /*- * SQL template for creating Oracle tables * (C) 2012-2013 A. Littoz * $Id: initdb-o-template.sql,v 1.4 2013/11/17 11:12:07 ajlittoz Exp $ * * This template is intended to be customised by Perl script * initdb-config.pl which creates a ready to use shell script * to initialise the...
true
4227466c752d91af3b6e7a4f408f292c77d87d08
SQL
Julen-Pinar/PracticaSW
/trash/usuario.sql
UTF-8
1,795
2.921875
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.4.14 -- http://www.phpmyadmin.net -- -- Servidor: localhost -- Tiempo de generación: 07-10-2015 a las 09:26:29 -- Versión del servidor: 5.6.26 -- Versión de PHP: 5.6.12 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARA...
true
5d1b632437fdf6e6feb0b1a15916907d1a614646
SQL
amitmals/Employee-Database-A-Mystery-in-Two-Parts
/SQL-Amit Malik-06222019-Queries.sql
UTF-8
4,918
4.125
4
[]
no_license
-------------------------------------------------------------------------------------------------------------------------------------------- --Data Analysis 1: List the following details of each employee: employee number, last name, first name, gender, and salary. SELECT e.emp_no as "Employee Number", e.last_name as ...
true
5efc9671aa0255235f65593cae4d82d729281be7
SQL
exasol/exa-toolbox
/sqlserver_compatibility/patindex.sql
UTF-8
3,508
3.46875
3
[ "MIT" ]
permissive
/* This function is a partial compatibility implementation of MS SQL Server's PATINDEX function. It returns the startposition of the first occurence of a given pattern in a VARCHAR */ create schema if not exists EXA_toolbox; --/ create or replace FUNCTION EXA_toolbox.PATINDEX(p_pattern IN VARCHAR2(4000), p_...
true
efe75aabfa9c0c975a989c62cfd1bf8f1d829f0d
SQL
Elemento24/MySQL-Bootcamp
/Legacy (June_2021)/(12) One_To_Many/CODE.sql
UTF-8
2,127
4.28125
4
[]
no_license
-- SELECT * FROM orders; -- SELECT * FROM customers WHERE last_name = 'George'; -- SELECT * FROM orders WHERE customer_id = 1; -- SELECT * FROM orders -- WHERE customer_id = ( -- SELECT id FROM customers -- WHERE last_name = 'George' -- ) -- Also known as IMPLICIT JOIN or CROSS JOIN -- SELECT * FROM customers, o...
true
01319e30a3ec70e3c71a9d7e7d5bbb4e6021bdef
SQL
MasseyStudyGoup/Car_repair_system
/initialised data.sql
UTF-8
15,304
2.609375
3
[]
no_license
 CREATE TABLE Outlets ( otID INTEGER PRIMARY KEY NOT NULL, otAddress TEXT NOT NULL, otName TEXT NOT NULL ); CREATE TABLE user ( userId INTEGER PRIMARY KEY NOT NULL, user_name TEXT DEFAULT '', carNo TEXT DEFAULT '', user_password TEXT NOT NULL, identity TEXT DEFAULT '', Outlet INTEGER, FOR...
true
981a4ea6fa118911730adb0cb7be4f378b5886a6
SQL
wonkgo1/restaurants_web_templates
/sql/ddl/ddl_acct.sql
UTF-8
254
2.671875
3
[]
no_license
DROP TABLE IF EXISTS acct; CREATE TABLE acct ( acct_id VARCHAR(36) NOT NULL DEFAULT (uuid()), creat_ts DATETIME DEFAULT NOW(), mod_ts DATETIME DEFAULT NOW(), CONSTRAINT pk__acct PRIMARY KEY(acct_id) );
true
7caf2f0f05d3a3fd4e3d8713d87ddb37ab97e82f
SQL
tannguyenviet/A0920I1-NguyenVietTan
/module_3/SQL_Query/Bai5/view_BT.sql
UTF-8
1,936
3.4375
3
[]
no_license
select* from customers; -- buoc 1,2 create table product_2( id int primary key auto_increment, productCode int not null, productName nvarchar(50) not null, productPrice int not null, productAmount int not null, productDescription text, productStatus nvarchar(15) ); insert into product_2(prod...
true
2f93a920a74b1c3ffd5f4a3c3f9f052d08d6bdde
SQL
Sigma-2021/sigma-crypto_assistant
/reset_database.sql
UTF-8
279,133
3.1875
3
[ "MIT" ]
permissive
-- Made by Facundo Diaz, Tadeo Grach and Tomas de Castro for Holberton School 2021 DROP DATABASE IF EXISTS sigma; CREATE DATABASE sigma; USE sigma; -- history table CREATE TABLE history_coin ( id int NOT NULL AUTO_INCREMENT, name varchar(4), price varchar(15), PRIMARY KEY (id) ); -- tende...
true
b52dbdd37a0f1facdf8d02aebe55ecca2511b29f
SQL
zhuxinan/hello-world
/project/project.sql
UTF-8
50,819
3.203125
3
[]
no_license
/* SQLITE Backup Source Server Version: 3.8.8 Source Database: main Date: 2019/4/25 17:49:07 */ -- ---------------------------- -- Table structure for "blogcategory" -- ---------------------------- DROP TABLE IF EXISTS "blogcategory"; CREATE TABLE "blogcategory" ("id" integer NOT NULL PRIMARY KEY AUTOINCREMENT, "nam...
true
5f2f47508c7abafc2f8fe1456feb000563628752
SQL
ppedvAG/SQL-Server-Freshup-VC-Aug-2021
/SQL FReshup/SQL FReshup/02_Setup.sql
ISO-8859-1
1,442
2.671875
3
[]
no_license
--Filetable --evtl besseres Konzept fr DAteien im SQL Server per Fieltable --integraler BEstandteil einer DB \\Server\INSTANZ\DB\Tab\Datei = C:\.....\Datei ? Select * from filetable --Jeglicher lokale ZUgriff geschieht ber das NT Service Konto, --auch wenn andereres KOnto fr Dienst angegeben wurde NT Service\SQL...
true
f8b214330879149dba7233056566dc208d3b5fec
SQL
JilmarManga/Delilah-Resto_REST-API
/src/database/delilahResto.sql
UTF-8
5,606
3.109375
3
[]
no_license
-- -- Database: `Delilah_Resto_API` -- -- CREATE DATABASE Delilah_Resto_API; -- USE Delilah_Resto_API; -- -------------------------users------------------------------------------------ -- -- Table structure for the `users` -- CREATE TABLE users( id INT NOT NULL AUTO_INCREMENT, username VARCHAR(50) NOT NULL UNIQUE,...
true
6af2bffd86e3d3510e71d0008b8d9d96ca2d2cb1
SQL
bigmisspanda/bigdata-poc
/hive_optimization/hive/year_sale_with_auto_convert_map_join.sql
UTF-8
317
2.78125
3
[]
no_license
set hive.auto.convert.join=true; set hive.auto.convert.join.noconditionaltask = true; set hive.auto.convert.join.noconditionaltask.size = 10000000; select year(a.purchase_date),a.brand,sum(a.item_purchased*b.price) from salePartition a join product b on a.product_id = b.id group by year(a.purchase_date),a.brand;
true
ca8710355c005b2625be84e1ca52f131ab2c9dd1
SQL
Lokesh1089/MySQL
/transactions.sql
UTF-8
1,457
3.9375
4
[]
no_license
-- TRANSACTIONAL LANGUAGE -- ROLL BACK -- COMMIT -- START TRANSACTION CREATE TABLE test( num INT, name VARCHAR(15) ); SELECT * FROM test ; INSERT INTO test VALUES(1, 'mohan'); START TRANSACTION; INSERT INTO test VALUES(2, 'manoj'); COMMIT; ROLLBACK; USE ME ; CREATE TABLE t1 ( num INT ); INSERT INTO t1 VALUES (...
true
23eeaf5cfb4d2e9c13a8d7d134856aebcdbe78f7
SQL
actofgod/chat-test
/resources/database/schema.sql
UTF-8
3,394
4.1875
4
[]
no_license
-- Последовательность для установки айди пользователей CREATE SEQUENCE "users_ids" INCREMENT 1 MAXVALUE 2147483647 CACHE 1; COMMENT ON SEQUENCE "users_ids" IS 'Последовательность для установки айди пользователей'; -- Таблица пользователей CREATE TABLE "users" ( -- columns "id" INTEGER ...
true
49bffb7d624f8b9a0bb1e9374d8bef71f8036b04
SQL
Kladderadatasch/ASDBM
/SQL/Spatial_queries.sql
UTF-8
153
2.953125
3
[]
no_license
SELECT C.PATH_ID, SDO_GEOM.SDO_LENGTH(C.GEOM, M.DIMINFO) FROM PATHS C, USER_SDO_GEOM_METADATA M WHERE M.TABLE_NAME = 'PATHS' AND M.COLUMN_NAME = 'GEOM';
true
4c9649f08b404229db9266977cbba701d2d337c6
SQL
sogumontar/Projec_PKM
/homestay1.sql
UTF-8
10,176
3.40625
3
[ "MIT" ]
permissive
/* SQLyog Community v12.5.1 (64 bit) MySQL - 10.1.30-MariaDB : Database - homestay ********************************************************************* */ /*!40101 SET NAMES utf8 */; /*!40101 SET SQL_MODE=''*/; /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; /*!40014 SET @OLD_FOREIGN_KEY_CHECKS...
true
d57ded6d339f62c9174d108cca759cc76922405e
SQL
FinsiEnnes/TFG
/create/beforeMod/createProcedures.sql
UTF-8
42,793
3.984375
4
[]
no_license
-- ---------------------------------------------------------------------------------- -- -------------------------------- checkBools -------------------------------------- -- ---------------------------------------------------------------------------------- -- Throws a exception if both bools are false. -- ------------...
true