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
e99f1b2b67fef42603168579f735318a3b82cfcf
SQL
prashik-r/Student-Feedback-System
/sql/sqlFiles/tables/feedback.sql
UTF-8
356
2.890625
3
[]
no_license
CREATE TABLE feedback( feedback_id int NOT NULL, rating_A int, rating_B int,rating_C int, comment_A varchar(100), comment_B varchar(100), check(rating_A>=0 AND rating_A<=5), check(rating_B>=0 AND rating_B<=5), check(rating_C>=0 AND rating_C<=5), primary key(feedback_id) ); CREATE SEQUENCE feedback_i...
true
2b0d6f9286d1ddeac52bf2b8b417907edc4a6578
SQL
msoehnchen/DSV_Inventory_SQL
/INV_PicksXerox_detail.sql
UTF-8
1,690
3.3125
3
[]
no_license
select to_number(substr(it.DSTAMP - to_timestamp('01/01/1900','DD/MM/YYYY'),6,5)+2) DATEVALUE, it.FROM_LOC_ID, substr(it.from_loc_id,1,4) LOCATION_AISLE, substr(it.from_loc_id,8,LENGTH(it.from_loc_id)-7) LOCATION_LEVEL, it.TO_LOC_ID, it.SKU_ID, it.TAG_ID, -- it.CONTAINER_ID, -- it.REF...
true
9178881332194cd59b037c63aa496d2871dc6116
SQL
WagnerBragaBispo/SQL_Oracle
/RetidoDigitalMCRbySAS.sql
UTF-8
13,430
3.546875
4
[]
no_license
/*--====================================================================================================================================== ETAPA 1 - SQL --======================================================================================================================================*/ --ETAPA 1A DROP TAB...
true
fd7e81b426edc96790c98109ff917ce85308c017
SQL
radtek/abs3
/sql/mmfo/bars/Table/ins_deal_attrs.sql
WINDOWS-1251
4,416
3.328125
3
[]
no_license
PROMPT ===================================================================================== PROMPT *** Run *** ========== Scripts /Sql/BARS/Table/INS_DEAL_ATTRS.sql =========*** Run ** PROMPT ===================================================================================== PROMPT *** ALTER_POLICY_INFO...
true
aec8a46084df34d97f9fea6a11754c28f2745eee
SQL
MagnanimousMillet/MagnanimousMonkeys77
/schema.sql
UTF-8
1,899
3.5625
4
[]
no_license
DROP DATABASE IF EXISTS thumbscheck; CREATE DATABASE IF NOT EXISTS thumbscheck; USE thumbscheck; DROP TABLE IF EXISTS users; DROP TABLE IF EXISTS thumbs; DROP TABLE IF EXISTS questions; DROP TABLE IF EXISTS lectures; CREATE TABLE users ( id INT NOT NULL AUTO_INCREMENT, first_name VARCHAR(30) NOT NULL, last_n...
true
a39bc8dad23c1b009ce97be26f04d29b2c552de3
SQL
naishihchen/CIT490Project
/library/soapangels.sql
UTF-8
5,081
3.359375
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.9.0.1 -- https://www.phpmyadmin.net/ -- -- Host: localhost -- Server version: 10.3.16-MariaDB -- PHP Version: 7.3.7 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARA...
true
7ebec7d7825e3a00303adbbc7e3d4603d9f26544
SQL
SkeniaYa/lectures
/P1W3D2/queries.sql
UTF-8
337
2.984375
3
[]
no_license
CREATE DATABASE people OWNER bob CREATE TABLE voodoopeople ( id serial primary key, name varchar(20), age integer ); INSERT INTO voodoopeople (name, age) VALUES ('Lzheoleg', 113); CREATE TABLE pets ( id serial primary key, name varchar(20), owner integer references voodoopeople(id) ON ...
true
3fafe74b7da30af7340b1917f419c45639f42138
SQL
nadirsaghar/nbia
/docs/deployment/db_deployment_request/db_scripts/rider_neuro_mri_visible.sql
UTF-8
669
3.234375
3
[]
no_license
create table patient_temp as select p.patient_pk_id from study s, patient p where s.patient_pk_id = p.patient_pk_id and p.trial_dp_pk_id = 1333952515; update patient set visibility = '1' where trial_dp_pk_id = 1333952515; update study set visibility = '1' where patient_pk_id in ( select p...
true
f9f1f703b85f77ebae64bebdb7bccce85bb9a62a
SQL
aneeshkb7/introduction
/ex1.cql
UTF-8
1,677
3.078125
3
[]
no_license
create(Manu:Employee{Emp_ID:1,name:"Manu",age:"21",dept_id:20}), (Vimal:Employee{Emp_ID:2,name:"Vimal",age:"21",dept_id:21}), (Anoop:Employee{Emp_ID:3,name:"Anoop",age:"23",dept_id:20}), (Gokul:Employee{Emp_ID:4,name:"Gokul",age:"21",dept_id:20}), (Ganesh:Employee{Emp_ID:5,name:"Ganesh",age:"21",dept_id:21}), (Vijay:Em...
true
108c567156f98c4f2637f33ec7335da395118aeb
SQL
Lukas-Krickl/SETA-Application
/Implementierung/Database/szenarien/2_1_MC.sql
UTF-8
2,737
2.921875
3
[]
no_license
USE seta; INSERT Szenario (kapitelnummer, themanummer) VALUES (2, 1); INSERT MC_Frage (szenarioID, frage) VALUES ( LAST_INSERT_ID(), 'Welche der folgenden Aussagen sind korrekt?' ); INSERT MC_Antwort (szenarioID, text, korrekt) VALUES ( LAST_INSERT_ID(), 'Ein Passwort ohne Sonderzeichen ist immer schlec...
true
df5a18eb050f77b8999b178735f8d7547b65fd79
SQL
iancaoo/databaseproject2
/MYSQL/deletecourses.sql
UTF-8
764
3.453125
3
[]
no_license
CREATE DEFINER=`root`@`localhost` PROCEDURE `deletecourses`(IN username int(11), IN dropnum char(20), IN dropyear int, IN dropquarter char(20), out err char(20)) BEGIN declare t_error int default 0; declare continue handler for sqlexception set t_error=1; START transaction; DELETE FROM transcript WHERE transcript.S...
true
e3953be0ed8040fb70b0fd504ad11032492e5df3
SQL
Artik292/Money
/money.sql
UTF-8
2,878
3.375
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.6.5.2 -- https://www.phpmyadmin.net/ -- -- Хост: 127.0.0.1 -- Время создания: Май 04 2017 г., 15:01 -- Версия сервера: 10.1.21-MariaDB -- Версия PHP: 5.6.30 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLI...
true
23fd5f7b28b753cf2b83d9eeb9ffe14d5016ba31
SQL
dzhemriza/table-importer
/table-importer/test/sql/1.sql
UTF-8
1,595
2.84375
3
[]
no_license
-- SQL Script for MySQL CREATE TABLE IF NOT EXISTS `test`.`persons` ( `persons_id` INT NOT NULL AUTO_INCREMENT , `persons_name` VARCHAR(255) NULL , `persons_age` INT NULL , `persons_address` VARCHAR(255) NULL , PRIMARY KEY (`persons_id`) ); CREATE TABLE IF NOT EXISTS `test`.`persons2` ( `pers...
true
8156c5751dda14e17c02e9c3ff742a1cd856bd47
SQL
f-sanges/mastering-kafka-streams-and-ksqldb
/chapter-12/ksqldb/sql/queries.sql
UTF-8
236
3.203125
3
[]
no_license
CREATE STREAM users ( ROWKEY INT KEY, USERNAME VARCHAR ) WITH ( KAFKA_TOPIC='users', VALUE_FORMAT='JSON' ); CREATE STREAM greetings AS SELECT ROWKEY, 'Hello, ' + USERNAME AS "greeting" FROM users EMIT CHANGES;
true
48360ec5bc1c96a188f8b44a9d782c0ad157d94b
SQL
silence-do-good/stress-test-Postgres-and-MySQL
/dump/high/day15/select0315.sql
UTF-8
177
2.59375
3
[]
no_license
SELECT timeStamp, temperature FROM ThermometerOBSERVATION o WHERE timestamp>'2017-11-14T03:15:00Z' AND timestamp<'2017-11-15T03:15:00Z' AND temperature>=0 AND temperature<=31
true
2e7a1f0332bb9e5a9f2ec8bf9ec90a9db52b759c
SQL
awerc/shopping-list
/backend/server/shopping_list.sql
UTF-8
1,253
3.59375
4
[]
no_license
DROP DATABASE IF EXISTS shopping_list; CREATE DATABASE shopping_list ENCODING 'UTF-8'; \c shopping_list; CREATE TABLE catalogs ( ID SERIAL PRIMARY KEY, name VARCHAR ); CREATE TABLE purchases ( ID SERIAL PRIMARY KEY, catalogId INTEGER REFERENCES catalogs(ID) on delete cascade, name VARCHAR, quantity VARCH...
true
82bd49e35e3bbc3f70540780f2729386e9ff5488
SQL
tetondan/highScoreBackEnd
/schema.sql
UTF-8
1,012
3.375
3
[]
no_license
/*creating a database and schema*/ CREATE DATABASE usersandscores; USE usersandscores; CREATE TABLE users ( id int NOT NULL AUTO_INCREMENT, username TEXT, email TEXT, PRIMARY KEY (id) ); CREATE TABLE scores ( id int NOT NULL AUTO_INCREMENT, score int NOT NULL, user_id int, FOREIGN KEY (user_id) REFE...
true
4fb4d4fd6eda4586ee6943f01a9890a10cc8f3dc
SQL
RomanHi/FixServletHomeProject
/1.ServletsExample/src/main/resources/dumpUsersDb.sql
UTF-8
2,823
2.8125
3
[]
no_license
-- -- PostgreSQL database dump -- -- Dumped from database version 10.1 -- Dumped by pg_dump version 10.1 SET statement_timeout = 0; SET lock_timeout = 0; SET idle_in_transaction_session_timeout = 0; SET client_encoding = 'UTF8'; SET standard_conforming_strings = on; SET check_function_bodies = false; SET client_min_m...
true
19a899f4c6f9ac975b225ce661ec5ed122b46fde
SQL
semitki/kmlparser
/Queries.sql
UTF-8
1,505
3.5625
4
[ "BSD-3-Clause" ]
permissive
-- Extract only coordinates from the string select replace( replace( replace(geojson->'geometry'->>'coordinates','"',''), '[',''), ']','') from manzanas_geojson where id = 884; -- Get a Block PostGIS Polygon select ST_GEOMFROMTEXT( 'POLYGON(('||replace(replace(r...
true
a8d12d9cfa4f5e7c2b87a300f0c6af2a4733fa35
SQL
dgeti-cetis108/A2017-M2S2PR-3AVPR
/datos/usuarios.sql
UTF-8
473
3.015625
3
[]
no_license
USE biblioteca_cetis108; LOAD DATA LOCAL INFILE '/Users/bidkar/Documents/CETis108/2017-1 (AGO17-ENE18)/M2S2_3AV-PR/Segundo Parcial/SQL-Queries/datos/usuarios.csv' INTO TABLE usuarios COLUMNS TERMINATED BY ',' LINES TERMINATED BY '\n' IGNORE 1 LINES (nombre,apellidos,username,password); -- DML para borrar todos los re...
true
9811eb937d7f926d64541e4c7359b3a5248a343e
SQL
lsst/qserv
/itest_src/datasets/case02/queries/3014_joinObjectSourceTimeInterval_withUSING.sql
UTF-8
415
3.203125
3
[]
no_license
-- Join Object and Source on a given object and for a given time interval -- https://dev.lsstcorp.org/trac/wiki/db/Qserv/IN2P3/BenchmarkMarch2013 -- Based on https://dev.lsstcorp.org/trac/wiki/db/queries/006 -- pragma sortresult SELECT s.ra, s.decl FROM Object o JOIN Source s USING (objectId) WHERE o.objectId...
true
c6eb2932052f539de873c67647ac0376a07cf9ab
SQL
giovanni-cerqueira/Bloco-II-Generation
/MySQL/Lista de Exercícios 02/EX04/Select.sql
UTF-8
1,611
3.796875
4
[]
no_license
select * from tb_produtos; select * from tb_produtos order by nome; select * from tb_produtos order by nome DESC; select * from tb_produtos where preco > 20.00 and categoria_id = 1; select * from tb_produtos where preco > 20.00 or categoria_id = 1; select * from tb_produtos where NOT categoria_id = 1; ...
true
4b2c2dca06ef89a786424f6a05cf32c9c685324a
SQL
codingconcepts/oates
/_examples/cassandra/create.sql
UTF-8
494
3.625
4
[ "MIT" ]
permissive
-- Use this script to create the database that will be used in this example. CREATE KEYSPACE IF NOT EXISTS my_keyspace WITH REPLICATION = { 'class' : 'SimpleStrategy', 'replication_factor' : 1 }; CREATE TABLE IF NOT EXISTS my_keyspace.table_one ( "id" uuid, "first_name" text, "last_name" tex...
true
0df62ff8b2a8a5f467b8c228e4ce9335fee0fdfb
SQL
XqTang-call/mall
/document/src/mall.sql
UTF-8
25,400
2.9375
3
[]
no_license
-- ---------------------------- -- Table structure for ums_admin -- ---------------------------- DROP TABLE IF EXISTS `ums_admin`; CREATE TABLE `ums_admin` ( `id` bigint(20) NOT NULL AUTO_INCREMENT, `username` varchar(64) DEFAULT NULL, `password` varchar(64) DEFAULT NULL, `icon` varchar(500) DEFAULT NULL COMMEN...
true
b753ad222931b77fb2c60854a4742c22c5753c6e
SQL
CBIIT/cananolab
/software/cananolab-webapp/db-scripts/2.2/caNanoLab22.sql
UTF-8
5,481
3.734375
4
[ "BSD-3-Clause", "LicenseRef-scancode-unknown-license-reference" ]
permissive
CREATE TABLE `users` ( `username` varchar(100) NOT NULL, `password` varchar(100) NOT NULL, `first_name` varchar(100) NOT NULL, `last_name` varchar(100) NOT NULL, `organization` varchar(500) DEFAULT NULL, `department` varchar(100) DEFAULT NULL, `title` varchar(100) DEFAULT NULL, `phone_number` varchar(10...
true
eeb04586ac967ef58443a9ddb8d5541e863fdc78
SQL
BeingDpace/Cloud-Computing
/Assignment-2/data.sql
UTF-8
3,913
3.09375
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 5.1.0 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Apr 10, 2021 at 04:54 AM -- Server version: 10.4.18-MariaDB -- PHP Version: 8.0.3 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIEN...
true
63253ca637f582649a83a47eb65505f9fffcd93d
SQL
IvayloNikolov36/T-SQL
/School/School/10.StudentsToGo.sql
UTF-8
175
3.890625
4
[ "MIT" ]
permissive
SELECT CONCAT(s.FirstName, ' ', s.LastName) as FullName FROM Students AS s LEFT JOIN StudentsExams AS se ON s.Id = SE.StudentId WHERE se.ExamId IS NULL ORDER BY FullName ASC
true
6b702b420612647a5dd7663ab2c99342a38bbbdc
SQL
slander36/MobileParkinsonsPrediction
/AggPerHour.sql
UTF-8
7,074
4.3125
4
[]
no_license
/* Data Aggregation By Date and Hour */ USE parkinsons; # Create Group By Unique Date and Hour View/Table CREATE OR REPLACE VIEW agg_per_hour_view ( record_day, record_hour, name, age, parkinsons, lat_var, long_var, gps_traveled, gps_range ) AS SELECT DATE(G.time), HOUR(G.time), S.name, S.age, S.parkins...
true
ace83dd4aba5a703db67cfc780a7498425f355db
SQL
jeremiasfleitas/SistemaUNE
/db/une3.sql
UTF-8
15,774
3.09375
3
[]
no_license
-- -- PostgreSQL database dump -- -- Dumped from database version 13.2 -- Dumped by pg_dump version 13.2 SET statement_timeout = 0; SET lock_timeout = 0; SET idle_in_transaction_session_timeout = 0; SET client_encoding = 'UTF8'; SET standard_conforming_strings = on; SELECT pg_catalog.set_config('search_path', '', fal...
true
a0511260777ff72dcb28d84fb0f7b58009420fb2
SQL
kevinron013/SpringBootAprumed
/docs/dataExport (2)/aprumeddb_usuario0.sql
UTF-8
3,008
3.140625
3
[]
no_license
-- MySQL dump 10.13 Distrib 8.0.17, for Win64 (x86_64) -- -- Host: localhost Database: aprumeddb -- ------------------------------------------------------ -- Server version 8.0.17 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /...
true
c3674ef8a96a25634d478dad85b9774910438b03
SQL
laurapfister/CorvallisReuseApp
/repairItems.sql
UTF-8
447
2.5625
3
[]
no_license
CREATE TABLE IF NOT EXISTS repair_items ( itemId INT NOT NULL AUTO_INCREMENT PRIMARY KEY, itemName VARCHAR(128) NOT NULL UNIQUE ) ENGINE = innodb; INSERT INTO repair_items (itemName) VALUES ("Cell Phones"), ("Small Appliances"), ("Books"), ("Clothes"), ("Computers"), ("Furniture"), ("Lamps"), ("Lawn po...
true
69c4ab2abfdc4a9c0a887984d8306a12c9cb05dc
SQL
HB4daemmon/custom
/api/util/sql/update-20150722.sql
UTF-8
324
2.8125
3
[]
no_license
--create errorcode table CREATE TABLE IF NOT EXISTS `custom_errorcode` ( `errorcode_id` int(10) NOT NULL AUTO_INCREMENT, `errorcode_number` int(10) NOT NULL, `code` varchar(20) NOT NULL, `description` varchar(200), PRIMARY KEY(`errorcode_id`), UNIQUE KEY (`errorcode_number`) )ENGINE=InnoDB DEFAULT CHARSET=u...
true
56b88827b34b78ca847aa2dce57d61f139190b55
SQL
penkocode/JAVA-DB-BASICS
/Data Definition and Data Types - Exercise/12. Movies Database.sql
UTF-8
1,209
3.3125
3
[]
no_license
CREATE TABLE directors( id INT PRIMARY KEY AUTO_INCREMENT, director_name VARCHAR(20) NOT NULL, notes TEXT ); CREATE TABLE genres( id INT PRIMARY KEY AUTO_INCREMENT, genre_name VARCHAR(50) NOT NULL, notes TEXT ); CREATE TABLE categories( id INT PRIMARY KEY AUTO_INCREMENT, category_name VARCHAR(50) NOT NULL, ...
true
aea2d2097b9c43f827f3e8045af9a4014f9c41fe
SQL
ChrisStubbs/well
/src/3. Database/Well/Post-Deployement/Populate-AccountType.sql
UTF-8
856
3.3125
3
[]
no_license
SET IDENTITY_INSERT [AccountType] ON MERGE INTO [AccountType] AS Target USING (VALUES (1,'CUST','Customer','deployment',GETDATE(),'deployment',GETDATE()), (2,'OTHER','Other','deployment',GETDATE(),'deployment',GETDATE()), (3,'OUT','Outbase','deployment',GETDATE(),'deployment',GETDATE()), (4,'STORE',...
true
f4bc25856666f9a976c59600a50ec37a61581e7e
SQL
daltonjw/Bamazon
/schema.sql
UTF-8
811
3.671875
4
[]
no_license
-- Creates the "animals_db" database -- CREATE DATABASE IF NOT EXISTS bamazon; -- Makes it so all of the following code will affect Bamazon -- USE bamazon; -- Creates the table "products" within Bamazon -- CREATE TABLE products( -- Makes an integer column called "item_id" which cannot contain null and will be used ...
true
336b808f1eca48ea01889711786bf998e9f2e8a6
SQL
deerme/clases
/Data Engineering/Transactional SQL Exercises.sql
ISO-8859-1
3,598
4.5
4
[]
no_license
use AlmacenDB /* Obtener todos los almacenes */ select * from ALMACENES /* Obtener todas las cajas cuyo contenido tenga un valor superior a 150 */ select * from CAJAS where valor > 150 /* Obtener los tipos de contenidos de las cajas */ select Contenido from CAJAS /* Obtener el valor medio de todas las cajas */ sele...
true
54f002f29b1a7fc87ce02e1bd21cfc3cd709bee0
SQL
SQLauto/PyroSQL
/_SCRIPTS/REFERENTIAL WITH COLUMNS.sql
UTF-8
1,068
4.28125
4
[]
no_license
select tab.schema_id , sch.name , tab.object_id , tab.name as fk_par , col.column_id , col.name as column_name , case when fk.object_id is not null then '>-' else null end as rel , schema_name(pk_tab.schema_id) + '.' + pk_tab.name as primary_table , pk_col.name as pk_column_name , fk.name as fk_cons...
true
d6c1e8514407113f8f3f04ea70f602ef12ee9d9e
SQL
Keepen/DataBase
/实验2——单表查询.sql
GB18030
3,710
4.65625
5
[]
no_license
use Study --1.ѯѧĻϢ select * from Student --2.ѯѧѧ,ʾѧš select s_no,s_name from Student --3.ѯͬѧʾѧţ select s_no,s_name,s_birthday from Student where s_sex='' --4.ѯгڡ1980-01-01ǰŮͬѧѧšԱ𡢳 select s_no,s_name,s_sex,s_birthday from Student where (s_sex='Ů') and (s_birthday < '1980-01-01') --5.ѯͬѧѧšԱ𡢳 select s_no,s_name,s_se...
true
322d540949e7495a1f0cb8fb9a3c3e73f2c63e35
SQL
mlidbom/SqServerlScripts
/_OLD/ProductionHistoryCorruption/DetectCorruptedEvents.sql
UTF-8
650
3.703125
4
[]
no_license
select InsertedVersion, AggregateId, InsertedVersion, ExpectedVersion, AfterNewSchemaVersionIncrement from ( select *, (select min(InsertedVersion) from Event e2 where e2.AggregateId = temp.AggregateId and LegacySqlTimeStamp is null) -1 + AfterNewSchemaVersionIncrement as ExpectedVersion from ( select *...
true
eaf9668f44c4c35df1929428d94d8832d5d3d191
SQL
Klowar/datalab
/flyway/admin/sql/V3.15__Create_foreign_extension&server.sql
UTF-8
418
2.953125
3
[]
no_license
CREATE EXTENSION IF NOT EXISTS postgres_fdw; CREATE SERVER foreign_server FOREIGN DATA WRAPPER postgres_fdw OPTIONS ( host 'ec2-35-175-225-239.compute-1.amazonaws.com', port '5432', dbname 'foreigndb' ); CREATE USER MAPPING FOR benchmark SERVER foreign_server OPTIONS ( USER 'foreignuser', PASSWORD...
true
7aee3da6ecaafba506eb0f377e4579ead0bea36f
SQL
egordoga/booking
/src/main/resources/schema.sql
UTF-8
1,232
3.921875
4
[]
no_license
drop table booking if exists; drop table category if exists; drop table option if exists; drop table room if exists; drop table room_option if exists; drop table user if exists; create table category ( id bigint not null, name varchar(255) not null, primary key (id)); create table option ( id bigint not null,...
true
2d33824fcb3fab9e23c7712ae424b3934b965e2e
SQL
shanelledeveaux/personalproject
/db/get_person.sql
UTF-8
144
2.890625
3
[]
no_license
select * from memberinfo where familyid = $1; -- SELECT * FROM memberinfo m -- JOIN family f ON m.familyid = f.familyid -- WHERE casemgr = $1
true
7e1113c93c9fe31db8ad56c286ae826742789371
SQL
VLSantos2/BarPI3
/mavenproject1/src/main/resources/scriptBanco.sql
UTF-8
9,976
2.8125
3
[]
no_license
create database bar; use bar; CREATE TABLE enderecos ( id int not null auto_increment, rua varchar(150) not null, numero int not null, complemento varchar(100), cidade varchar(100) not null, estado varchar(2) not null, cep int not null, regiao varchar(12) not null, PRIMA...
true
0b0c87562e1ae90ebb25702c4859c02a252227db
SQL
algorenator/OLIVER
/Tables/BENEFITS_VOLUME_BASED_310717.sql
UTF-8
1,008
2.609375
3
[]
no_license
-- -- BENEFITS_VOLUME_BASED_310717 (Table) -- CREATE TABLE OLIVER.BENEFITS_VOLUME_BASED_310717 ( BVB_BENEFIT VARCHAR2(20 BYTE) NOT NULL, BVB_VOLUME NUMBER, BVB_NEM NUMBER, BVB_MAX NUMBER, BVB_RATE NUMBER(12,6), BVB_AGENT VARCH...
true
0c26f56f0e17947bc711909ece01c4677e3b956a
SQL
hzy9981/poc-play-rest-backend
/conf/evolutions/default/1.sql
UTF-8
757
2.890625
3
[ "WTFPL" ]
permissive
# --- !Ups CREATE TABLE `User` ( `id` bigint(20) NOT NULL AUTO_INCREMENT, `email` varchar(255) DEFAULT NULL, `hashedPwd` tinyblob, `login` varchar(255) DEFAULT NULL, `iterations` int(11) NOT NULL, `pwdDerivatedKeyBitLength` int(11) NOT NULL, `pwdPBKDF2algo` varchar(255) DEFAULT NULL, `salt...
true
1bd6775a32cebcff3d0be0bebedf57464f00611d
SQL
yusuphanafi/aplikasi-penjualan-motor
/latihandb.sql
UTF-8
1,725
2.984375
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.8.5 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Waktu pembuatan: 07 Jan 2020 pada 13.19 -- Versi server: 10.1.38-MariaDB -- Versi PHP: 7.3.3 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARA...
true
8efe85752f6681fbb702b7a23c3e79d1dd110d76
SQL
eprikazc/wazimap-za
/sql/census/genderunder18_2016.sql
UTF-8
20,217
2.921875
3
[ "MIT" ]
permissive
-- -- PostgreSQL database dump -- -- Dumped from database version 9.4.15 -- Dumped by pg_dump version 10.1 SET statement_timeout = 0; SET lock_timeout = 0; SET idle_in_transaction_session_timeout = 0; SET client_encoding = 'UTF8'; SET standard_conforming_strings = on; SET check_function_bodies = false; SET client_min...
true
76d5ef113fd0e49474f8c30e4707e6c3af67236e
SQL
jhgranola/PetNest
/PetNestDataBase(INITIAL).sql
UTF-8
2,225
3.4375
3
[]
no_license
CREATE DATABASE PetNest; USE PetNest DROP TABLE IF EXISTS UserProfile CREATE TABLE UserProfile( UserId INT NOT NULL, firstName VARCHAR(30) NOT NULL, lastName VARCHAR(30) NOT NULL, UserAge INT, UserGender char(20), AboutMe VARCHAR(200), PictureURL VARCHAR(50), MaxDistance INTEGER, LocationID VARCHA...
true
b0f7b29d4b20ed3c6eed2df2a03984ebdfd7d67e
SQL
Kefikhalil/holbertonschool-higher_level_programming
/0x0E-SQL_more_queries/13-count_shows_by_genre.sql
UTF-8
330
3.875
4
[]
no_license
-- Number of shows by genre -- script that lists all genres from hbtn_0d_tvshows and displays the number of shows linked to each SELECT tv_genres.name AS genre, COUNT(*) AS number_of_shows FROM tv_show_genres INNER JOIN tv_genres ON tv_show_genres.genre_id = tv_genres.id GROUP BY tv_genres.name ORDER BY number_of_s...
true
ee2b26fa5089a7b50db86ab8817d97484bcef860
SQL
odinsride/monpl
/test/test_monpl.sql
UTF-8
2,726
2.953125
3
[]
no_license
CREATE OR REPLACE PACKAGE test_monpl AS PROCEDURE build_main; PROCEDURE subroutine_1; PROCEDURE subroutine_2; END test_monpl; CREATE OR REPLACE PACKAGE BODY test_monpl AS gv_program monpl_status.program%TYPE := 'TEST_MONPL'; gn_build_id monpl_status.build_id%TYPE; gn_build_d...
true
83a295a1075ce933bdcb32be7aff802e1a3038e9
SQL
andrew-goff/Web_3
/__eBook_Item_TABLE__.sql
UTF-8
1,407
2.859375
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 3.3.10.4 -- http://www.phpmyadmin.net -- -- Host: mysql.ccacolchester.com -- Generation Time: Dec 02, 2015 at 06:56 AM -- Server version: 5.6.25 -- PHP Version: 5.5.26 SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SE...
true
3e15f749aff6cd45ef6db98553ed3ffb22fd62ca
SQL
nicho90/Smart-Trash-Bins
/sql/queries.sql
UTF-8
2,402
3.828125
4
[ "MIT" ]
permissive
DROP TABLE measurements CASCADE; DROP TABLE trashbin CASCADE; CREATE TABLE trashbin( id SERIAL PRIMARY KEY, latitude DECIMAL, longitude DECIMAl, wastetype TEXT, size INT, trashcan TEXT, owner TEXT, comment TEXT, hight INT, sensor_height INT, measuring_height INT, green D...
true
3a980455484b8ea818929b7bfd308f6969dcd6ad
SQL
ponsea/nb-dev-training-sql
/theme-c/68.sql
UTF-8
718
3.796875
4
[]
no_license
SELECT E.イベント番号, E.イベント名称, E.前提イベント番号, E2.イベント名称 AS 前提イベント名称 FROM イベント E INNER JOIN イベント E2 ON E.前提イベント番号 = E2.イベント番号 ; # 回答例ではWHEREで前提イベント番号 IS NOT NULLを指定しているが、 # INNER JOINの時点で省かれるので必要ないはず。 # 回答例 # SELECT E1.イベント番号, E1.イベント名称, # E1.前提イベント番号, E2.イベント名称 AS 前提イベント名称 # FROM イベント E1 # JOIN イベ...
true
6c9a455597fc8b0e47fb2d62d889dd159614c956
SQL
mixerp4/frapid
/src/Frapid.Web/Areas/Frapid.WebsiteBuilder/db/1.x/1.0/src/05.views/website.published_content_view.sql
UTF-8
702
3.359375
3
[ "MIT" ]
permissive
DROP VIEW IF EXISTS website.published_content_view; CREATE VIEW website.published_content_view AS SELECT website.contents.content_id, website.contents.category_id, website.categories.category_name, website.categories.alias AS category_alias, website.contents.title, website.contents.alias, w...
true
a045855623379f55dc86af43def7cb3a48ae76af
SQL
A2JTK16/Database
/Database Design/MySQL Query/tabel view.sql
UTF-8
845
3.78125
4
[]
no_license
Create or replace view view_event as SELECT DISTINCT Tl.traveller_username AS Username, Tl.traveller_fullname AS Fullname, Tl.traveller_address AS Home_Address, E.event_name AS Event_Name, E.start_event AS Start_Event, E.end_event AS End_Event, E.note AS Event_Note, L1.location_name AS Start_Loc...
true
50a449367f683666bfb35e80e2a66d95fc35bd1b
SQL
apache/madlib
/doc/example/madlib_pagerank_example.sql
UTF-8
6,981
3.578125
4
[ "Apache-2.0", "LicenseRef-scancode-generic-cla", "LicenseRef-scancode-warranty-disclaimer", "MPL-2.0", "mif-exception", "LGPL-2.0-or-later", "BSD-3-Clause", "GPL-2.0-only", "LicenseRef-scancode-free-unknown", "BSL-1.0", "MIT", "GPL-2.0-or-later", "Python-2.0", "BSD-2-Clause" ]
permissive
/* ----------------------------------------------------------------------- *//** * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses t...
true
28d44a130ec8097d29488b13dfffc75ea52d78b4
SQL
TRex22/DBFProject
/Queries/Question_29/Qustion29.sql
UTF-8
176
3.140625
3
[ "MIT", "WTFPL" ]
permissive
#with this query the earliest Sal_From date is automatically selected. SELECT Emp_Num, Sal_Amount FROM LGSALARY_HISTORY GROUP BY Emp_Num HAVING MIN(Sal_From) ORDER BY Emp_Num;
true
b3253d9c063019dc82b280f66bc54f9209068263
SQL
RandikaJeewantha/Library_Management_System
/Database/library.sql
UTF-8
6,430
3.109375
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.2.11 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: Aug 26, 2019 at 07:43 AM -- Server version: 5.6.21 -- PHP Version: 5.6.3 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; ...
true
de75ecb1690164779edddcdcd69d0af1c9799254
SQL
FelipeDasr/Python
/banco_de_dados/CONSULTAR_COM_JOINS.sql
UTF-8
193
2.671875
3
[]
no_license
SELECT * FROM prefeitos; SELECT * FROM cidades; SELECT * FROM cidades c INNER JOIN prefeitos p ON c.id = p.cidade_id; SELECT * FROM cidades c LEFT JOIN prefeitos p ON c.id = p.cidade_id;
true
87c932782f212739c3eadaf75ce877e86a02302f
SQL
TrinityChristiana/chinook-trinityterry
/queries/finished/top_media_type.sql
UTF-8
552
4.03125
4
[]
no_license
-- Provide a query that shows the most purchased Media Type. SELECT mt.Name, COUNT(mt.MediaTypeId) TimesCount FROM InvoiceLine il JOIN Track t ON t.TrackId == il.TrackId JOIN MediaType mt ON mt.MediaTypeId == t.MediaTypeId GROUP BY mt.MediaTypeId HAVING TimesCount IN ( SELECT COUNT(mt.MediaTypeId) ...
true
83ec00ecf661e7069a8270bcaa73945d3cc2070d
SQL
Karol-Szalwinski/Twitter
/Twitter.sql
UTF-8
3,475
3.46875
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.0.10deb1 -- http://www.phpmyadmin.net -- -- Host: localhost -- Czas wygenerowania: 28 Paź 2016, 20:21 -- Wersja serwera: 5.5.50-0ubuntu0.14.04.1 -- Wersja PHP: 5.5.9-1ubuntu4.19 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIEN...
true
f4783939f620327b26346066ea7704470dc30c15
SQL
sercancan/PHPCRMProjesi
/restoran_asim.sql
UTF-8
24,385
2.953125
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.1.12 -- http://www.phpmyadmin.net -- -- Anamakine: localhost -- Üretim Zamanı: 03 Ara 2017, 12:00:13 -- Sunucu sürümü: 5.7.17-log -- PHP Sürümü: 5.5.11 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT *...
true
57fd65f0450817fdf07cbcb9d45fee873a6c32c8
SQL
UCLALibrary/sql-scripts
/Voyager/Cataloging/Bib 035 with OCoLC bibid VBT-1778.sql
UTF-8
1,058
3.5625
4
[]
no_license
/* Bib records where 035 $a (OCoLC) BIBID got created by WCM Mono update process. VBT-1778 */ with d as ( select bi.* , (select begin_pub_date from bib_text where bib_id = bi.bib_id) as bdate from bib_index bi where index_code = '035A' and display_heading like '(OCoLC)%' and to_char(bib_id) = regexp_replace(no...
true
f631b3e47fc340fd5b69c4cb1a73a97548d8c30c
SQL
lamtov/lamtv10_ops
/AUTOMATION/SourceCode/lamtv10_trainnigsql.sql
UTF-8
3,307
3.828125
4
[]
no_license
SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0; SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0; SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='TRADITIONAL,ALLOW_INVALID_DATES'; CREATE SCHEMA IF NOT EXISTS `lamtv10` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci ; USE `lamtv10` ; -...
true
a9f62686293b7c74e1d938d12e756f63fd79b6e8
SQL
georgetown-cset/private_investment_in_ai
/sql/cb_ma.sql
UTF-8
4,417
3.484375
3
[]
no_license
/* This querry collects MA transaction from Crunchbase */ /* get the parent ifnroamtion of the target */ /* Save the results of the querry to create CB_MA_All.csv */ SELECT distinct * except(Crunchbase_ID_target, cb_url, uuid, parent_uuid, par_uuid1, ipo_org_uuid, went_public_on), COALESCE(parent_uuid, par_...
true
28af786fcbd50e820f2b3e17970e6c7c9fd49c84
SQL
uchiyamakoki/itcast_OA
/itcast_oa.sql
UTF-8
15,987
3.234375
3
[]
no_license
/* Navicat MySQL Data Transfer Source Server : itcastoa Source Server Version : 50614 Source Host : localhost:3306 Source Database : itcast_oa Target Server Type : MYSQL Target Server Version : 50614 File Encoding : 65001 Date: 2018-02-12 23:48:06 */ SET FOREIGN_KEY...
true
b2749f5f63f10da984d9ec8a9faa8844ac6f01c0
SQL
jamesxuhaozhe/LeetCode-Java-Kotlin
/Java-Kotlin/resource/511.sql
UTF-8
88
2.59375
3
[ "MIT" ]
permissive
SELECT player_id, min( event_date ) AS first_login FROM Activity GROUP BY player_id;
true
2bf71f4006cf740bce9eb6d612f7e57280625d6b
SQL
gcaglion/AAA
/AlgoDB/HistoryData/BW_and_Deltas.sql
UTF-8
283
3.015625
3
[]
no_license
select count(newdatetime), avg(high-low)*10000 bw, avg(abs(dh))*10000, avg(abs(dl))*10000 from( select newdatetime, high, high-lag(high) over (order by newdatetime) dh, low, low-lag(low) over (order by newdatetime) dl from eurusd_h1 where to_char(newdatetime,'YYYYMM')='201807' );
true
d3983eaf31619062da4ed90763fe8acf4c3a3fe7
SQL
Vern-gu/python-full-stack-notes
/04-MySQL/06-mysql高级.sql
UTF-8
7,870
4.0625
4
[]
no_license
-- 系统变量:所有用户(客户端)都有效 -- 查看所有系统变量:show variables [like'pattern']; -- 查询变量数据值:select @@变量名; -- 局部修改系统变量:set 变量名 = 新值; -- 全局修改系统变量:set global 变量名 = 值; 或者 set @@global.变量名 = 值; -- 全局修改只针对新客户端生效,已连接的客户端无效 -- 会话变量:即用户变量,只对当前用户使用的客户端生效 -- 定义用户变量:set @变量名 = 值; -- mysql中专有的赋值符号为 ':=' ;比较仍用 '=' -- 将数据赋予变量:select @变量1:=字段1,@变量2...
true
d5ebdbae7803df78f56d1dcdf4dae4de8b056f25
SQL
lbstore/MIF_Informatics_Semester4
/SQL/Tasks/Part2/DatabaseManagement/target/classes/SQLfiles/tableAtaskaita.sql
UTF-8
237
2.578125
3
[]
no_license
CREATE TABLE labe2219.ATASKAITA ( DarbID VARCHAR(8) not NULL, Data DATE not NULL, Laikas TIME not NULL, Aprasas VARCHAR(200), PRIMARY KEY (DarbID, Data), FOREIGN KEY (DarbID) References labe2219.Darbuotojas (DarbID) ON DELETE RESTRICT )
true
bf80931d33762c3ec009356b3493b0c15cf2c15c
SQL
Camavilca/plantaPhp
/sql.sql
UTF-8
3,016
3.28125
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 3.5.1 -- http://www.phpmyadmin.net -- -- Servidor: localhost -- Tiempo de generación: 10-12-2019 a las 05:33:16 -- Versión del servidor: 5.5.24-log -- Versión de PHP: 5.4.3 SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARA...
true
51a923218c0bf4fa52197e6f554732aa1ca1809d
SQL
joco1026/mysql_test
/answer_to_award_question.sql
UTF-8
321
4
4
[]
no_license
select concat(first_name, ' ', last_name), name, award_date from employee e join award a on e.id = a.employee_id join ( select employee_id, max(award_date) as maxdate from award group by employee_id) most_recent ON a.employee_id = most_recent.employee_id AND a.award_date = most_recent.maxdate order by last_name asc;...
true
44344d77730dbe6f53020e15e0b44f13d3eed7b0
SQL
Hackathon-Sopra-Steria/API-Teams
/src/main/resources/data.sql
UTF-8
2,271
3.125
3
[]
no_license
DROP TABLE ROLES if exists; create table ROLES ( id int not null constraint ROLES_pk primary key, role varchar(100) not null ); INSERT INTO roles (id,role) VALUES (1,'ADMIN'); INSERT INTO roles (id,role) VALUES (2,'USER'); INSERT INTO roles (id,role) VALUES (3,'OBERSEVER'); DROP TABLE work...
true
9f1c6ccc21d3ddc9de0740b35fc2516726fcc4bf
SQL
ivyxjc/pubg-system
/pubg-common/src/main/resources/sql/CREATE_TABLE_PUBG_PLAYER.sql
UTF-8
1,341
3.265625
3
[]
no_license
CREATE TABLE `PUBG`.`PUBG_PLAYER` ( `PLAYER_ID` VARCHAR(100) NOT NULL, `NAME` VARCHAR(100) NOT NULL, `CREATED_AT` TIMESTAMP NULL, `UPDATED_AT` TIMESTAMP NULL, `SHARD_ID` CHAR(10) NOT NULL, `DB_CREATED_AT` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTA...
true
c424c978f386f5e09daf33b127200509247d9390
SQL
yuzhakova/BootcampX
/4_queries/12_teachers_assisted.sql
UTF-8
698
4.15625
4
[]
no_license
/* Name of Teachers That Assisted We need to know which teachers actually assisted students during any cohort Get the name of all teachers that performed an assistance request during a cohort Select the instructor's name and the cohort's name Don't repeat the instructor's name in the results list Order by the instructo...
true
f0d0adcc40c4b356c27ad4819c6b7a5d1499bb8d
SQL
jay19991/Library-Management-System
/NestedQueries.sql
UTF-8
3,796
3.90625
4
[]
no_license
/*Queries for 'Single-row Subqueries' using two-tables*/ SELECT LNAME,FNAME,DEPTID,BIRTHDATE,emailid,regi_date FROM L_STUDENT WHERE DEPTID = (SELECT DEPTID FROM L_DEPARTMENT WHERE UPPER(DEPTNAME) = 'COMPUTER SCIENCE' ); SELECT LNAME,FNAME,DEPTID,...
true
55076e78954a178359d0ec4aa4ea0eac81e95936
SQL
google1986/alibaba-microservice-demo
/db/database01_sql.sql
UTF-8
599
2.703125
3
[]
no_license
DROP DATABASE IF EXISTS cloudDB01; CREATE DATABASE cloudDB01 CHARACTER SET UTF8; USE cloudDB01; CREATE TABLE dept ( deptno BIGINT NOT NULL PRIMARY KEY AUTO_INCREMENT, dname VARCHAR(60), db_source VARCHAR(60) ); INSERT INTO dept(dname,db_source) VALUES('综合管理部',DATABASE()); INSERT INTO dept(dname,db_source) VAL...
true
15ebd00434620feeb79fea7fe991a8c185afdef5
SQL
hsinyushu/Irishsu.github.io
/Untitled.sql
UTF-8
6,874
2.875
3
[]
no_license
-- MySQL dump 10.13 Distrib 8.0.20, for macos10.15 (x86_64) -- -- Host: localhost Database: FactorySystem -- ------------------------------------------------------ -- Server version 8.0.20 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESU...
true
604d3cffd244c85f8826d4fbd8a303d1dab37444
SQL
milabknowin/Thinkful
/Exploratory_Data_Analysis/Bikeshare/Drill3_Incorrect_3rainydays.sql
UTF-8
205
3.546875
4
[]
no_license
select trips.trip_id, weather.date, trips.start_date, trips.duration from trips join weather on trips.zip_code = weather.ZIP where Events like 'rain' group by trip_id order by duration desc limit 3
true
05d3df71a8d2eae66e2b23804e1d1aa80090ff4e
SQL
qudanTeam/qudan
/ms_qudan/src/main/resources/sql/product.sql
UTF-8
3,843
2.78125
3
[]
no_license
CREATE TABLE `product` ( `id` int(10) NOT NULL AUTO_INCREMENT, `product_name` varchar(100) DEFAULT NULL COMMENT ''推广商品名称'', `logo` varchar(1000) DEFAULT NULL COMMENT ''商品logo'', `product_type` int(10) DEFAULT NULL COMMENT ''1-信用卡,2贷款'', `is_hot` int(2) DEFAULT ''0'' COMMENT ''0-非热门,1-热们'', `is_show` int(2) ...
true
b2f38d9d21ee27f42f15c8d6624771cc49efee24
SQL
loveingenioustech/data
/oracle/index/customer_ind.sql
UTF-8
177
2.5625
3
[]
no_license
CREATE UNIQUE INDEX CUSTOMER_I1 ON CUSTOMER ( C_W_ID, C_D_ID, C_ID) PCTFREE 10; CREATE UNIQUE INDEX CUSTOMER_I2 ON CUSTOMER ( C_LAST, C_W_ID, C_D_ID, C_FIRST, C_ID) PCTFREE 10;
true
16c55e9981eaf3caab870b6395b2ff07d215f2fa
SQL
essence-community/core-backend
/dbms/t_query/MTClassAttrPlacementList.sql
UTF-8
1,148
2.890625
3
[ "MIT" ]
permissive
--liquibase formatted sql --changeset artemov_i:MTClassAttrPlacementList.sql dbms:postgresql runOnChange:true splitStatements:false stripComments:false INSERT INTO s_mt.t_query (ck_id, cc_query, ck_provider, ck_user, ct_change, cr_type, cr_access, cn_action, cv_description) VALUES ('MTClassAttrPlacementList', '/*MTClas...
true
b7432091ce49f7776408ebdbb65e645cdcc57a96
SQL
jonarce/db-scripts
/queries/Hotels with RegionName or ParentRegionName.sql
UTF-8
603
3.390625
3
[]
no_license
## this query will show the hotel RegionName and ParentRegionName ## so you could solve the stateProvince SELECT activepropertylist.EANHotelID,Name,StateProvince,City,Country, parentregionlist.RegionNameLong,parentregionlist.ParentRegionNameLong, citycoordinateslist.RegionName FROM activepropertylist,regioneanhotelid...
true
9d93391660bb3e375252f6a92492cc71b26693ac
SQL
yantasheiko/andersenCiCd
/src/main/db/users.sql
UTF-8
438
2.796875
3
[]
no_license
DROP SCHEMA `andersenHibernate`; CREATE SCHEMA `andersenHibernate` DEFAULT CHARACTER SET utf8; USE `andersenHibernate`; CREATE TABLE IF NOT EXISTS `andersenHibernate`.`User` ( `userId` INT NOT NULL AUTO_INCREMENT , `email` VARCHAR(45) NULL , `name` VARCHAR(45) NULL , `surname` VARCHAR(45) NULL, PRIMARY KEY (`u...
true
4c13f00cb4e5cf0f3f8ddc92998f5a8ff683d73e
SQL
Amirrezat1379/twitter
/3/getMessage.sql
UTF-8
1,067
3.859375
4
[]
no_license
USE dbproject; DELIMITER $$ DROP PROCEDURE getMessage; CREATE PROCEDURE getMessage(senderID varchar(20))`scope`: BEGIN DECLARE setCurrentUser varchar(20); SET setCurrentUser = getCurrentUser(); IF setCurrentUser IS NULL THEN SELECT 'There is no user logined!' AS `status`; LEAVE scope; ...
true
6d36f39d4aee528acc6062819b4ce07cb8f96a74
SQL
thiagohora/vote-no-filme
/Desafio1BlueSoft/build/classes/br/com/desafiojava/sqldados/insert.sql
UTF-8
793
3.421875
3
[]
no_license
////////////// hsqldb Create table Movie( id identity primary key, name varchar(50), points int ); ///////////////////// ///////////////////mysql Create table Movie( id int(9) auto_increment, name varchar(50), points int(9) ); /////////////////////// create table VoteUser( chaveuser varchar(50), movieid i...
true
b8c33cba12da78043ec1d39a71c7c75e924658d8
SQL
LTSgithub/exporter
/repositories/sql/user.sql
UTF-8
332
2.515625
3
[]
no_license
-- name: GetUserById :one select * from user where id = ?; -- name: GetUserByName :one select * from user where username = ?; -- name: CreateUser :exec insert into user (username,password,description,create_time) values(?,?,?,?) ; -- name: UpdateUser :exec update user set username = ? and password = ? and descriptio...
true
6f39c2bf9e955fbe07410e1827300358eae45125
SQL
alkaid/olympic-live-system
/olympic/olympic-client/res/raw/olympic.sql
UTF-8
4,545
2.921875
3
[]
no_license
DROP TABLE IF EXISTS "lo_medal" ; CREATE TABLE lo_medal ( _id int(10) NOT NULL PRIMARY KEY , _ranking int(10) NOT NULL , _picture varchar(255) , _simpleName varchar(255) NOT NULL , _gold int(10) NOT NULL , _silver int(10) NOT NULL , _copper int(10) NOT NULL , _total int(10) NOT NULL ...
true
3c664e994f1d1e5a9234943ffb8f3781fc39c9f8
SQL
danielalmeida3756/Pap-Tecninfor
/Base de dados.sql
UTF-8
5,162
3.3125
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.7.4 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1:3306 -- Generation Time: 30-Jan-2018 às 15:43 -- Versão do servidor: 5.7.19 -- PHP Version: 5.6.31 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CH...
true
1debcd620fc98c702aaa785a0822b77d2c06ecba
SQL
doctorinsulin/foodNudge
/schema.sql
UTF-8
1,477
2.890625
3
[]
no_license
drop table if exists food_items; create table food_items ( id integer primary key autoincrement, title VARCHAR(255) not null, calories INT(11) not null ); INSERT INTO `food_items` VALUES ('1', 'Bacon and egg McMuffin', '345'), ('2', 'Banana milk shake (small)', '205'), ('3', 'BigMac', '490'), ('4', 'Cheeseb...
true
114c8a4fb97277c2d48d4ef81d4c916bb03e7fbb
SQL
manGoweb/GeolocationPackage
/migrations/struct/2013-08-09-1-geocoding_cache.sql
UTF-8
1,497
3.875
4
[ "BSD-3-Clause" ]
permissive
CREATE TABLE `geocoding_results` ( `id` int(1) unsigned NOT NULL AUTO_INCREMENT, `latitude` float NOT NULL COMMENT 'zeměpisná šířka', `longitude` float NOT NULL COMMENT 'zeměpisná délka', `address_hash` char(32) CHARACTER SET ascii COLLATE ascii_bin NOT NULL COMMENT 'hash adresy', `address` text NOT NULL COMMENT ...
true
dba39353d7326bd7398e31515c1fead1761c440d
SQL
dfraser74/cuntoir
/fin.sql
UTF-8
4,362
2.765625
3
[ "MIT" ]
permissive
-- MySQL dump 10.13 Distrib 5.7.19, for Linux (x86_64) -- -- Host: localhost Database: fin -- ------------------------------------------------------ -- Server version 5.7.19-0ubuntu0.16.04.1 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RE...
true
070287af58eef48338dbc8efa0118118dc84444c
SQL
podwesley/esr
/src/main/resources/import.sql
UTF-8
1,138
2.859375
3
[]
no_license
INSERT INTO COZINHA (id, nome) VALUES (1 ,'Tailandesa'); INSERT INTO COZINHA (id, nome) VALUES (2 ,'Indiana'); INSERT INTO RESTAURANTE (id, nome, taxa_frete , cozinha_id) VALUES (1 ,'Comida Brasileira' , 2.40 , 1); INSERT INTO RESTAURANTE (id, nome, taxa_frete, cozinha_id) VALUES (2 , 'Comida Americana' , 10.00 , 2); ...
true
137d6a1c71e99cb45a03c0e053fadccb47c6dccc
SQL
BhushanPatil38/HackerRank-Latest-SQL-Solutions
/SQL/Aggregation/Weather_Observation-20.sql
UTF-8
127
3.4375
3
[]
no_license
SELECT ROUND(x.LAT_N,4) from STATION x, STATION y GROUP BY x.LAT_N HAVING SUM(SIGN(1-SIGN(y.LAT_N-x.LAT_N))) = (COUNT(*)+1)/2
true
6ede3642b4e54e996eb2e622099aa7d211693d8a
SQL
tanZiWen/wxserver
/activity.sql
UTF-8
1,934
3.765625
4
[]
no_license
CREATE TABLE if not EXISTS p_activity ( id BIGINT PRIMARY KEY, longitude double precision, latitude double precision, address varchar(100), activityname varchar(200), brief varchar(1000), startdate TIMESTAMP, enddate TIMESTAMP, agentid SMALLINT, tag...
true
c2a031e21c215e93dcd42b0e1a7d11d2530fcb4e
SQL
MukheshRavi/Employee-Payroll-Service
/Employee Payroll Service/UC12_Checking_New_Table_Structure.sql
UTF-8
1,131
3.484375
3
[]
no_license
--UC12 Checking New Table Structure use payroll_service; --UC4 View PayrollDetails table select payrollId,BasePay,Deductions,IncomeTax,TaxablePay,(BasePay-Deductions-TaxablePay)as NetPay from PayrollDetails; --UC5 Retrieve Salary for a Particular employee select e.EmpName ,p.BasePay,p.Deductions,p.IncomeTax,p.TaxableP...
true
7b0bd4557b24743ce68d9ba925ecdc1cda65757c
SQL
MikeRider27/TiendaRepuestos
/bd/PROC/P_Anular_ComprobanteVenta.sql
UTF-8
576
2.796875
3
[]
no_license
DELIMITER $$ CREATE PROCEDURE P_Anular_ComprobanteVenta ( IN _idComprobanteVenta int, OUT flag_exitoso int ) BEGIN DECLARE _estado int; START TRANSACTION; select estado into _estado from ComprobanteVenta where idComprobanteVenta = _idComprobanteVenta; IF (_estado = true) THEN UPDATE ComprobanteVenta set...
true
bbb3eec89d4e173571639289133c515929bbbfcc
SQL
SP12893678/listeningtrain_platform
/sql/listeningtrain_platform2.sql
UTF-8
43,336
2.90625
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.8.5 -- https://www.phpmyadmin.net/ -- -- 主機: 127.0.0.1 -- 產生時間: -- 伺服器版本: 10.1.38-MariaDB -- PHP 版本: 7.3.2 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*...
true
f750bde82b300c269458a3c5c2cd09b88fa03121
SQL
huascarmm/voluntarios
/src/sql/users.sql
UTF-8
1,445
2.859375
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.5.5.1 -- http://www.phpmyadmin.net -- -- Servidor: 127.0.0.1 -- Tiempo de generación: 09-05-2019 a las 19:10:44 -- Versión del servidor: 5.7.11 -- Versión de PHP: 7.0.4 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHAR...
true
8eb4b93ea491b4d1bd13794833b07ab48bc5e500
SQL
pvpetkova/FMI-Spring-Project-Card-Management
/db_changes.sql
UTF-8
3,158
3.484375
3
[]
no_license
alter table cms.key change column kry_name key_name varchar(32); alter table cms.`key` change column key_value key_value varchar(48); alter table cms.`key` add column bin_id integer; alter table cms.`key` add foreign key (bin_id) references bin(id); insert into bin_range(id, starting_bin,...
true