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
2380125a253ba84f0192674eb313247e22134b5b
SQL
Lucyferius/nix-4
/unit_13_jpa_hibernate/university-data-access/src/main/resources/import.sql
UTF-8
2,986
2.71875
3
[]
no_license
insert into public.courses (course_name) values ('java'); insert into public.courses (course_name) values ('python'); insert into public.courses (course_name) values ('js'); insert into public.groups (group_name, course_id) values ('nix-4', '1'); insert into public.groups (group_name, course_id) values ('python-alevel-...
true
808fe26eed5e3471e71ccbdc202b3c57c62dec8f
SQL
ghde/AppFront
/backend/domain/src/main/resources/ch/p3n/apps/appfront/domain/schema/schema_mysql.sql
UTF-8
2,825
3.859375
4
[]
no_license
-- -- CREATE TABLES if not yet existing. -- CREATE TABLE IF NOT EXISTS af_activity ( id INT(11) NOT NULL AUTO_INCREMENT, name VARCHAR(50) COLLATE utf8_unicode_ci NOT NULL, PRIMARY KEY (id), UNIQUE KEY name_idx (name) ) ENGINE = InnoDB DEFAULT CHARSET = utf8 COLLATE = utf8_unicode...
true
b29ca7f49146da29a7985fb149e90673b799f1fe
SQL
danielmartincraig/physics
/public/db/sampledata.sql
UTF-8
678
2.65625
3
[]
no_license
INSERT INTO quotes ( quote_text , quote_author ) VALUES ( 'I was born not knowing and have had only a little time to change that here and there.' , 'Richard P. Feynman' ); INSERT INTO quotes ( quote_text , quote_author ) VALUES ( 'All of physics is either impossible or trivial. It is impossible until you understand it...
true
549f86a8416bfbb0de9f6a11e7c97aaa5117c600
SQL
frankleypatricio/conteudo_estudos
/Cursos/SQL/Aula18 - Como usar a cláusula WHERE.sql
UTF-8
223
3.125
3
[]
no_license
/* Usando a cláusula where ***************************/ select * from cliente where id_tipo_cliente in(1,2) and /* in() - Entre 2 e 3 */ (month(data_nasc) >= 4 and month(data_nasc) <= 9) /* Mês de nasc. maior que 5 */ ;
true
659162064e07d163c3895feb35ad9faa8b83f51f
SQL
NKoundinya/DumpBackup
/filemanagement_documents.sql
WINDOWS-1252
2,813
2.609375
3
[]
no_license
CREATE DATABASE IF NOT EXISTS `filemanagement` /*!40100 DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci */ /*!80016 DEFAULT ENCRYPTION='N' */; USE `filemanagement`; -- MySQL dump 10.13 Distrib 8.0.18, for Win64 (x86_64) -- -- Host: localhost Database: filemanagement -- -------------------------------...
true
7ad5f71680cd7daff2c9e20ac9e530fce0133db1
SQL
kylemichaelsullivan/codefights-mysql
/Databases/04 GROUP Dishes BY Type/21-travelDiary.mysql
UTF-8
252
2.765625
3
[ "MIT" ]
permissive
/* https://codefights.com/arcade/db/group-dishes-by-type/p7k9JJ5fqyD6DdFZJ */ CREATE PROCEDURE travelDiary() BEGIN SELECT GROUP_CONCAT( DISTINCT country ORDER BY country SEPARATOR ";" ) AS countries FROM diary; END
true
33c5ec2e38c652bc5b6c4f5e694f9e1ebdb8c92e
SQL
prsolans/ffai-v3
/create_the_tables.sql
UTF-8
6,635
3.34375
3
[]
no_license
-- -- PostgreSQL database dump -- -- Dumped from database version 11.3 -- Dumped by pg_dump version 11.3 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
f41eab96ef7c7c4393dee63add93ae1f5214fa39
SQL
ArctosDB/DDL
/migration/6.0.6_morectlog.sql
UTF-8
4,053
3.0625
3
[]
no_license
<!----------------------- CFML to build code to build tables and triggers. run, copy into file, exec. <cfquery name="d" datasource="uam_god"> select * from user_tab_cols where table_name like 'CT%' </cfquery> <cfquery name="tabl" dbtype="query"> select table_name from d group by table_name </cfquery> <cfo...
true
df1035acc95d31e93f554e02ec4afd010d99d31b
SQL
Goldshajan/wsers2Gol
/createPersons.sql
UTF-8
723
3.46875
3
[]
no_license
CREATE DATABASE gold; USE gold; CREATE TABLE COUNTRIES(COUNTRY_ID INT NOT NULL AUTO_INCREMENT, COUNTRY_NAME VARCHAR(25) NOT NULL, PRIMARY KEY(COUNTRY_ID)); INSERT INTO countries (COUNTRY_NAME) VALUES ('Romania'); INSERT INTO countries (COUNTRY_NAME) VALUES ('USA'); INSERT INTO countries (COUNTRY_NAME) VALUES ('Luxemb...
true
964cb6b72fefcf96771fd1657a3d0dc2c492d776
SQL
ElliotChen/daoDemo
/src/test/sql/h2/test.sql
UTF-8
1,452
2.9375
3
[]
no_license
DELETE FROM PUBLIC.T_USER_ROLE_MAPPING; DELETE FROM PUBLIC.T_ROLE; DELETE FROM PUBLIC.T_USER; DELETE FROM PUBLIC.T_PROFILE; INSERT INTO PUBLIC.T_ROLE(OID, CREATE_ACCOUNT, CREATE_DATE, UPDATE_ACCOUNT, UPDATE_DATE, VERSION, NAME) VALUES ('role2', 'system', TIMESTAMP '2011-01-11 00:00:00.0', 'system', TIMESTAMP '2011-...
true
e193daeea593fbd646cef54ee6b862e4295d3354
SQL
ststechid/sample-dbscript
/src/incremental/001_introduction/001_create_tenant.sql
UTF-8
913
3.3125
3
[]
no_license
CREATE SEQUENCE tenant_seq INCREMENT 1 MINVALUE 10 MAXVALUE 9223372036854775807 START 10 CACHE 1; CREATE TABLE t_tenant ( tenant_id bigint NOT NULL DEFAULT nextval('tenant_seq'), tenant_code character varying(50), description character varying(1024), tenant_key character varying(32), tenant_name ch...
true
aa27139f4e79fc22811d4b6302677be0948aabbd
SQL
zacharyhu/personal_work_scripts
/ngx_lua/山东BOSS/gp_sd_user_info.sql
UTF-8
1,876
3.15625
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 3.5.2.2 -- http://www.phpmyadmin.net -- -- 主机: 192.168.26.10:3306 -- 生成日期: 2013 年 08 月 01 日 09:44 -- 服务器版本: 5.5.28-log -- PHP 版本: 5.4.7 SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD...
true
333a9d5d2189314e6b44b267bfe0436171f1aa1e
SQL
maric993/Zooloski-vrt
/skripte/create.sql
UTF-8
7,540
3.453125
3
[]
no_license
-- MySQL Workbench Forward Engineering 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='ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTI...
true
a40157020740d3458eb94f847eca7b2163f7dc6d
SQL
tup1tsa-poe/server
/src/database/queries/migrations/create-item-item-properties-table_1570629504917.sql
UTF-8
238
3.125
3
[]
no_license
create table item_item_properties ( id int unsigned not null auto_increment, item_id binary(32) not null, item_property_id int unsigned not null, primary key (id), foreign key (item_property_id) references item_properties(id) );
true
261f87f35f6ae672deba7a4293827756eac4509c
SQL
Tangmore/node_test_server
/lemon.sql
UTF-8
3,199
3.5625
4
[ "MIT" ]
permissive
-- phpMyAdmin SQL Dump -- version 4.8.4 -- https://www.phpmyadmin.net/ -- -- 主机: 127.0.0.1 -- 生成日期: 2019-06-13 10:58:46 -- 服务器版本: 10.1.37-MariaDB -- 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_CHARACTER_SET_CLIENT=@@CHARACTE...
true
1c11169907cf1094da4aa357964ffcaa6cc4b2c9
SQL
ngLuis/easylife__API
/db/insertData.sql
UTF-8
11,315
3.5
4
[]
no_license
/* //NOTE para el siguiente sprint, considerar reorganizar los scripts (para optimizar el cargado de datos): 1) Script de CREATE DATABASE y CREATE TABLES (pero sin relaciones) 2) Script de cargar datos (éste) 3) Script de creación de CONSTRAINTS/FOREIGN KEYS entre tablas */ USE dbeasylife; /* ------------...
true
7b79775c0474b5f98d69a00e22fded722521e5c2
SQL
sumaiya69/B
/procedure1.sql
UTF-8
584
3.046875
3
[]
no_license
set serveroutput on create or replace procedure findProducer ( X in PRODUCER_INFO.NAME%type,Z out number) is producerID PRODUCER_INFO.producer_id%type; begin SELECT producer_id into producerID from producer_info where name = X; SELECT count (*) into Z from movie_info where producer_id = producerID; ...
true
5bedfa36d1ccb133a329554cf3aad0ced3319746
SQL
dmitryjum/codewars
/sql/grocery_store_support_local_products/solution.sql
UTF-8
222
3.40625
3
[]
no_license
select distinct(products.country) as country, count(products.name) as products from products where country in ('Canada', 'United States of America') group by products.country, products.country order by products desc;
true
6dd63cf995b7509ef27d69a5e3cf12d5c6a1f603
SQL
andrewmgh/studybettertogether
/sbt.sql
UTF-8
50,990
2.875
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.0.4.1 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: May 15, 2014 at 10:26 PM -- Server version: 5.6.11 -- PHP Version: 5.5.3 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;...
true
35bcf1f33d7b10d7b19850b5f4e1cfd3bd652394
SQL
radtek/CoinsWallet
/src/TimemicroCore.CoinsWallet.SQL/mysql/v.full/Tables/LTC_TRANSACTIONS.sql
UTF-8
444
3.15625
3
[]
no_license
DROP TABLE IF EXISTS LTC_TRANSACTIONS; CREATE TABLE LTC_TRANSACTIONS ( TXID NVARCHAR(64) PRIMARY KEY NOT NULL, BLOCKHASH NVARCHAR(64) NOT NULL, CONFIRMATIONS INT DEFAULT 0, STATE INT DEFAULT 0, CREATETIME DATETIME DEFAULT CURRENT_TIMESTAMP() )ENGINE=InnoDB DEFAULT CHARSET=utf8; ALTER TABLE LTC_TRANSACTIONS ...
true
2fef740ec411c16ee58eb036c9a434d87cb1f69a
SQL
vpez/db-examples
/queries/nested-customer-queries.sql
UTF-8
1,481
4.78125
5
[]
no_license
USE Practice; -- Query 1 -- Show information about customers who have items in the 'In Process' status, -- sorted by the number of such items. SELECT customers.city, customers.phone, customers.customerName, A.c FROM customers NATURAL JOIN ( SELECT count(*) AS c, customerNumber, status FROM orders WHERE status = 'In ...
true
709f2705e2567c4682b6daf3dace944c8e0ea37c
SQL
paperto8/SpringBoot-Oposiciones
/src/test/resources/scripts/create/tipos_preguntas.sql
UTF-8
336
2.859375
3
[]
no_license
CREATE TABLE IF NOT EXISTS "TIPOS_PREGUNTAS" ( "TIPO_PREGUNTA_ID" NUMBER PRIMARY KEY, "TITULO" varchar(255) DEFAULT NULL ); DELETE FROM "TIPOS_PREGUNTAS"; INSERT INTO "TIPOS_PREGUNTAS" (TIPO_PREGUNTA_ID, TITULO) VALUES (1,'Titulo1'); COMMIT; INSERT INTO "TIPOS_PREGUNTAS" (TIPO_PREGUNTA_ID, TITULO) VALUES (2,'Ti...
true
b87b717a84f49f0f8f3cfae622d091b2f73e1aa8
SQL
halimabzn/INF1006-202-18A-02
/5.CIF/300105468/restafrique.sql
UTF-8
5,456
3.265625
3
[]
no_license
-- MySQL Workbench Forward Engineering 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='ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SU...
true
3258efa95bace666fac2b8288a4f5866b64de0b6
SQL
tireland1985/CSY2038-Databases2
/alter_77.sql
UTF-8
1,947
3.34375
3
[]
no_license
/* AlterCourse */ --CSY2038_77@STUDENT/19437590 -- Tim Ireland, CSY2038 Databases 2 -- 29/09/2020 --@e:\db2-files\AlterCourse_77.sql --PKs ALTER TABLE subject_areas ADD CONSTRAINT pk_subject_areas PRIMARY KEY (subject_id); ALTER TABLE courses ADD CONSTRAINT pk_courses PRIMARY KEY (course_id); ALTER TABLE instructor...
true
7894c8bffa8d7ea178df67f95724c92220ef5c23
SQL
ord-nas/gif-gan
/data_collection/mturk/2017_03_19_whitelist_rnn/analyze_results.sql
UTF-8
2,462
3.453125
3
[]
no_license
drop table if exists mturk cascade; create table mturk ( HITId varchar, HITTypeId varchar, Title varchar, Description varchar, Keywords varchar, Reward varchar, CreationTime varchar, MaxAssignments integer, RequesterAnnotation varchar, AssignmentDurationInSeconds integer, Aut...
true
efaf6e5363268aa5688e39000062efa91dc97e13
SQL
Y-Doge/sql50
/src/question19to45/q29_answer.sql
UTF-8
754
3.390625
3
[ "Apache-2.0" ]
permissive
# Q29 # 查询任何一门课程成绩在70分以上的姓名,课程名称和分数 # 小心优化https://zhuanlan.zhihu.com/p/72223558 Q29 select s.Sname, c.Cname, sc.score from Student as s inner join SC as sc on s.SId = sc.SId and sc.score > 70 inner join Course as c on sc.CId = c.CId; # +-----+-----+-----+ # |Sname|Cname|score|...
true
b67a80b4cb6032ca4f4360226ce2e19d2b20c764
SQL
dr-matt-smith/hdip_web3_test_2017_SOLUTION
/db/hdip_test.sql
UTF-8
1,109
3.09375
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.4.10 -- http://www.phpmyadmin.net -- -- Host: localhost:8889 -- Generation Time: Feb 17, 2017 at 05:00 PM -- Server version: 5.5.42 -- PHP Version: 7.0.0 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; -- -- Database: `hdip_test` -- -- ---------------------------...
true
c0fc8fc9cb600e07f8b3eb956e7ec079fb41810c
SQL
wdncfmap/ads
/REP.SP_PSYIELD_DEFECT_CAUSE_SPC_TBL_BATCH.sql
UTF-8
4,863
3.53125
4
[]
no_license
CREATE OR REPLACE PROCEDURE REP.SP_PSYIELD_DEFECT_CAUSE_SPC_TBL_BATCH() RETURNS INTEGER LANGUAGE NZPLSQL AS BEGIN_PROC DECLARE pExistFlag boolean; pTableName varchar; pTableSchema varchar; pBatchDefectSpcView varchar; BEGIN BEGIN AUTOCOMMIT ON pTableName := 'PSYIELD_DEFECT_CAUSE_SPC_DENORM_TMP'; pTabl...
true
3603da7f91a244a400a26fcee9bd7b0f0794c34f
SQL
troy0606/baking
/baking_shop.sql
UTF-8
9,985
3.40625
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.9.2 -- https://www.phpmyadmin.net/ -- -- 主機: 127.0.0.1 -- 產生時間: -- 伺服器版本: 10.4.10-MariaDB -- PHP 版本: 7.3.12 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
e44b9342e1a8d5fcca87fcaa038933c52ddbee73
SQL
1180300801/CA
/CA/certificate.sql
UTF-8
1,238
2.78125
3
[]
no_license
DROP TABLE IF EXISTS `certificate`; CREATE TABLE `certificate` ( `Id` int(11) NOT NULL AUTO_INCREMENT, `username` varchar(255) DEFAULT NULL, `version` varchar(255) DEFAULT 'CTF_1.0', `issuer` varchar(255) DEFAULT 'CA of CTF'...
true
649800c1a572a790aebe1697ffe00ed5ad7d897f
SQL
Ignaciosc/FSWD
/ignacio-santacruz/SQL/clase-2/dump2.sql
UTF-8
2,589
3.375
3
[]
no_license
-- Esto es un comentario -- Primero tratamos de borrar la base, en caso de que exista DROP DATABASE IF EXISTS peliculas_clase_2; CREATE DATABASE peliculas_clase_2; /* Esto es otro comentario pero este es multi linea */ USE peliculas_clase_2; CREATE TABLE peliculas ( id INT UNSIGNED PRIMARY KEY AUTO_I...
true
2259bbe432b82ff99deda59bb3ea84ca480c9f14
SQL
rayryeng/Udacity_SQL_Nanodegree
/project2-udiddit/good_db.sql
UTF-8
9,878
4.65625
5
[ "MIT" ]
permissive
-- Part II -- Drop any of the new tables we propose if they exist DROP TABLE IF EXISTS "users", "topics", "posts", "comments", "votes"; -- a. Allow new users to register: /* Design Guidelines: - The ID should autoincrement and should be unique upon insertion - The username should be at most 25 characters...
true
3f032f5f8920779a8c6dea1593b3e6666509c599
SQL
yeqown/shorturl
/sh/create_table.sql
UTF-8
261
3.296875
3
[]
no_license
use shorten_url; create table shorted_url ( id int auto_increment primary key, source varchar(512) not null, hash int not null, shorted varchar(128) null, constraint shorted_url_hash_uindex unique (hash) );
true
4961a599bc68d9aaedfbfe3cb7b1077c103d68c0
SQL
yangyangzuo/java-study
/ebook/src/book/download/table.sql
UTF-8
1,925
3.75
4
[]
no_license
drop database books; create database books; use books; -- 图书分类 create table category( id int not null primary key auto_increment, -- 字符分类标识,中图法分类序号标示,例如:A,A1,A2 stringCategoryId varchar(100) not null, -- 分类等级 categoryLevel int, -- 数字分类标识,这个标示,主要时和读秀中的fenleiID做对应,例如:fenleiID=010804 numberCategoryI...
true
5addb340fdea688f598e1c950d8403e93b666f01
SQL
geosconsulting/sql_bonanza
/generazione_chiavi_primarie_su_piu_tabelle.sql
UTF-8
915
3.265625
3
[]
no_license
--ALTER TABLE nasa_modis_ba.final_ba ADD PRIMARY KEY (id); --DROP INDEX nasa_modis_ba.idx_nasa_modis_final_ba_initialdate; CREATE INDEX idx_nasa_modis_final_ba_initialdate ON nasa_modis_ba.final_ba USING btree (initialdate); --CREATE INDEX idx_nasa_modis_final_ba_initialdate --ON nasa_modis_ba.final_ba_2000 --USING...
true
a1beb38b2b363cbc2625ef2720ce28978e1eb1ff
SQL
Semih21/mijninzett
/target/classes/mysqlscripts/ApplicationTaskTable_CREATE_INSERT.sql
UTF-8
1,190
2.5625
3
[]
no_license
CREATE TABLE `mijn_inzet`.`taskapplication` ( `taskId` INT NOT NULL, `userId` INT NOT NULL, `applicationDate` DATE NOT NULL, `unsubscribeDate` DATE NULL, `availableHours` INT NOT NULL, `roleName` VARCHAR(45) NOT NULL, PRIMARY KEY (`taskId`, `userId`, `applicationDate`)); VARCHAR(45) NOT NULL, PRIMARY KE...
true
86e739a4c709a26950397a09e74547b731fc9558
SQL
topjohnwu/Web-Programming-Project
/hw11/script.sql
UTF-8
1,109
3.828125
4
[]
no_license
CREATE DATABASE testDB; USE testDB; CREATE TABLE user ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, email VARCHAR(255) NOT NULL UNIQUE, name VARCHAR(255) NOT NULL, created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP ); CREATE TABLE post ( id ...
true
188d57593da1df382f451d5759b525b841de094f
SQL
sobolev-ax/mysql_examples
/07 alter table.sql
UTF-8
575
3.796875
4
[]
no_license
use usersdb; # alter table users # add Address varchar(50) null; # alter table users # drop column Address; CREATE TABLE Customers ( Id INT PRIMARY KEY AUTO_INCREMENT, Age INT, FirstName VARCHAR(20) NOT NULL, LastName VARCHAR(20) NOT NULL ); CREATE TABLE Orders ( Id INT PRIMARY KEY AUTO_INCREMEN...
true
340ec371207665834857560fe081ce5c1f41ef92
SQL
JHanek3/HackerRank
/sql/employee_salaries.sql
UTF-8
315
3.5
4
[]
no_license
-- Task -- Write a query that prints a list of employee names for employees in the employee table having a salary greater than 2000$ per month -- who have been employess for less than 10 months -- sort by ascending employee_id SELECT name from employee WHERE salary > 2000 AND months < 10 ORDER BY employee_id ASC;
true
2ab2d30e59f128502d5d1482eb4c86558fc2a375
SQL
grofandriska/Hogwarts
/src/main/resources/db/migration/V1__CreateSchema.sql
UTF-8
3,550
3.640625
4
[]
no_license
DROP TABLE IF EXISTS building CASCADE; CREATE TABLE IF NOT EXISTS building ( id long identity PRIMARY KEY, name VARCHAR(255) NOT NULL, number_of_rooms INT NOT NULL ); DROP TABLE IF EXISTS picture CASCADE; CREATE TABLE IF NOT EXISTS picture ( id long identity PRIMARY KEY, name VARCHAR(255) NOT NULL...
true
82d531d944dc6a652cf33c68ed98274ca0c1d564
SQL
kolinlocke/WebApplication_Exam
/Layer03_Database/Schema Objects/Schemas/dbo/Views/uvw_RecruitmentTestUser.view.sql
UTF-8
235
2.765625
3
[]
no_license
CREATE VIEW dbo.uvw_RecruitmentTestUser AS Select [Tb].* , [LkpUT].[Desc] As [UserType_Desc] From RecruitmentTestUser As [Tb] Left Join LookupUserType As [LkpUT] On [LkpUT].LookupUserTypeID = [Tb].LookupUserTypeID
true
5104680a6d827af448539e11a4c5ab5e065d7017
SQL
QGEP/datamodel
/swmm_views/04_vw_swmm_conduits.sql
UTF-8
7,503
3.078125
3
[]
no_license
-------- -- View for the swmm module class conduits -------- CREATE OR REPLACE VIEW qgep_swmm.vw_conduits AS SELECT re.obj_id as Name, coalesce(from_wn.obj_id, concat('from_node@',re.obj_id)) as FromNode, coalesce(to_wn.obj_id, concat('to_node@',re.obj_id)) as ToNode, CASE WHEN re.length_effective <= 0.01 AND st...
true
b1c689be5db14c627ee92b1e1dab586e0b779dba
SQL
FernandoMauricio/divus
/docs/projeto-v1-mysql.sql
WINDOWS-1250
4,286
3.4375
3
[]
no_license
CREATE TABLE situacao ( situ_codigo INT AUTO_INCREMENT NOT NULL, situ_nome VARCHAR(60) NOT NULL, PRIMARY KEY (situ_codigo) ); ALTER TABLE situacao COMMENT '1 - Aberto 2 - Separao 3 - Disponivel para entrega 4 - Enviado para o cliente 5 - Entregue 6 - Fechado 7 - Cancela...
true
2e42629415767e327effc3ca99f3811de5953e2f
SQL
MoochiPark/TIL
/database/sql/emp_role.sql
UHC
286
2.5625
3
[]
no_license
CREATE TABLE EMP_ROLE ( EMP_RCODE VARCHAR(20) PRIMARY KEY, EMP_RNAME VARCHAR(20) NOT NULL ); INSERT INTO EMP_ROLE VALUES ('R001', '̳'), ('R002', ''), ('R003', ''), ('R004', '븮'), ('R005', ''), ('R006', '̻'), ('R007', '');
true
a7e44ae2232afde41350bd1cb1519fd3bd4bcf51
SQL
cghnassia/BD50_TourDeFrance
/Conception/Import/Dump/UI_AFF_SELECT_PARTICIPANTS.sql
UTF-8
3,507
3.3125
3
[]
no_license
-------------------------------------------------------- -- DDL for Procedure UI_AFF_SELECT_PARTICIPANTS -------------------------------------------------------- set define off; CREATE OR REPLACE PROCEDURE "G11_FLIGHT"."UI_AFF_SELECT_PARTICIPANTS" ( v_etape_num etape.etape_num%TYPE default 0, v_pt_pass_num po...
true
43b51d5a7500bca73d9d8659c0f73ec73371bee5
SQL
uzeltinger/binnakle
/administrator/components/com_compras/sql/install.sql
UTF-8
6,115
2.890625
3
[]
no_license
CREATE TABLE IF NOT EXISTS `#__compras_compra` ( `id` int(2) NOT NULL auto_increment, `paypal_orderID` varchar(255) DEFAULT NULL, `paypal_payerID` varchar(255) NOT NULL, `paypal_details` text, `comprador` text NOT NULL, `published` tinyint(1) NOT NULL, `ordering` int(1) NOT NULL, `checked_out` tinyint(1...
true
98c273f9b102496e5f5a188034d0bfc77738c2ca
SQL
saadismail/disrupt_solutions
/database_setup.sql
UTF-8
1,662
3.609375
4
[]
no_license
DROP TABLE IF EXISTS `question_tag`; DROP TABLE IF EXISTS `vote`; DROP TABLE IF EXISTS `answer`; DROP TABLE IF EXISTS `question`; DROP TABLE IF EXISTS `tag`; DROP TABLE IF EXISTS `user`; CREATE TABLE `user` ( `id` int NOT NULL AUTO_INCREMENT, `name` varchar(30), `email` varchar(255), `password` varchar(60), ...
true
8adf28247cb22c41b8efa4cc4314ece0163b7a6d
SQL
fernando13/Base-de-Datos-2
/repaso/ej1a_mysql.sql
UTF-8
3,916
4.15625
4
[]
no_license
/* Cliente (nro_cliente, apellido, nombre, dirección, teléfono) Producto (cod_producto, descripción, precio, stock_minimo, stock_maximo, cantidad) ItemFactura (cod_producto, nro_factura, cantidad, precio) Factura (nro_factura, nro_cliente, fecha, monto) Considerar el precio no puede ser 0 ni negativo; el Stock mínimo ...
true
4e8e8266fc21dfb03641b3db48854e743098e0bf
SQL
piotrgajow/shortcuts-web
/backend/grails-app/migrations/changes/routeFromTo.sql
UTF-8
296
3.1875
3
[]
no_license
-- liquibase formatted sql -- changeset piotrgajow:routeFromTo ALTER TABLE route ADD COLUMN location_from VARCHAR(255) NOT NULL AFTER route_id, ADD COLUMN location_to VARCHAR(255) NOT NULL AFTER location_from, ADD UNIQUE KEY U_location_from_location_to (location_from, location_to);
true
4eb5756c7bdc73a8332eb1985abc5d752ffe21aa
SQL
sengeiou/learn_java
/divideStudent/src/main/resources/db/migrate/V1.0__create_table_and_init_data.sql
UTF-8
6,291
2.796875
3
[]
no_license
# noinspection SqlNoDataSourceInspectionForFile /* Navicat MySQL Data Transfer Source Server : 127.0.0.1 Source Server Version : 50713 Source Host : 127.0.0.1:3306 Source Database : gk_platform Target Server Type : MYSQL Target Server Version : 50713 File Encoding : 65001...
true
d53da96942ee5eefc73c9ed44a454dd447224543
SQL
adammckenzie89/SQL_Afternoon_1
/afternoon-2.sql
UTF-8
3,457
3.96875
4
[]
no_license
SELECT * FROM invoice i JOIN invoice_line il ON il.invoice_id = i.invoice_id WHERE il.unit_price > 0.99; SELECT i.invoice_date, c.first_name, c.last_name, i.total FROM invoice i JOIN customer c ON i.customer_id = c.customer_id; SELECT c.first_name, c.last_name, e.first_name, e.last_name FROM customer c JO...
true
f99fd2a93a2244f0667fdcf646ec3b709a1428ae
SQL
Welmann29/Taller_Intermedias
/BD/Consultas.sql
UTF-8
1,694
3.96875
4
[]
no_license
--- Mostrar el nombre de las mascotas con su raza, tipo y dueño SELECT c.nombres as Dueño, m.nombre as Mascota, ta.nombre as Tipo, r.nombre as Raza FROM cliente as c INNER JOIN mascota as m ON m.id_cliente = c.id_cliente INNER JOIN raza as r ON m.id_raza = r.id_raza INNER JOIN tipo_animal as ta ON...
true
5f10ceec98f80f966ad2947349e9f2e539022b92
SQL
mindovermiles262/SQLZoo
/09_self_JOIN.sql
UTF-8
4,508
4.34375
4
[]
no_license
-- 1. How many stops are in the database. SELECT COUNT(id) FROM stops -- 2. Find the id value for the stop 'Craiglockhart' SELECT id FROM stops WHERE name = 'Craiglockhart' -- 3. Give the id and the name for the stops on the '4' 'LRT' service. SELECT id, name FROM stops JOIN route ON (stops.id = route.stop) ...
true
4b4d904fbfef5239fb58cb7dac16e9a8f424871a
SQL
PlumeAlerts/StreamAnnotations-Backend
/migrations/1_initialize_schema.up.sql
UTF-8
629
3.390625
3
[]
no_license
CREATE TABLE users ( id VARCHAR(255), last_triggered TIMESTAMP, annotation_interval INT DEFAULT 15, last_annotation_id INT, PRIMARY KEY (id) ); CREATE TABLE annotations ( id SERIAL, text VARCHAR(255) NOT NULL, text_size INT NOT NULL, u...
true
26d0fb5a35f55de5dd2e1c5d40dca99d21433eff
SQL
Raymondma-public/Rayment-backend
/RaymentBackend/src/main/resources/db/migration/V2__create_supported_curr.sql
UTF-8
307
3.046875
3
[]
no_license
USE `payment` ; CREATE TABLE IF NOT EXISTS `payment`.`supported_curr` ( `id` INT NOT NULL AUTO_INCREMENT, `curr_code` VARCHAR(3) NOT NULL, `curr_name` VARCHAR(255) NULL, `country` VARCHAR(255) NULL, PRIMARY KEY (`id`), UNIQUE INDEX `curr_code_UNIQUE` (`curr_code` ASC) VISIBLE) ENGINE = InnoDB;
true
47568fe093b2cd7a198428eb8d0960282c8c4365
SQL
SuiteLHY/lemon
/src/main/resources/dbmigrate/hsql/bpm/V0_9_0_8__bpm_conf_notice.sql
UTF-8
841
3.828125
4
[ "Apache-2.0" ]
permissive
CREATE TABLE BPM_CONF_NOTICE( ID BIGINT NOT NULL, TYPE INT, RECEIVER VARCHAR(200), DUE_DATE VARCHAR(50), NODE_ID BIGINT, TEMPLATE_ID BIGINT, CONSTRAINT PK_BPM_CONF_NOTICE PRIMARY KEY(ID), CONSTRAINT FK_BPM_CONF_NOTICE_NODE FOREIGN KEY(NODE_ID) REFERENCES BPM_CONF_NODE(ID), CONST...
true
6a415644269b375e40d8b094f22aaa6923bbebac
SQL
feisishui/oracle-spatial-workshop
/Workshop_Files/labs/16-3D-support/01-solids/list_compound_systems_geodetic.sql
UTF-8
440
2.953125
3
[]
no_license
col srid for 99999 col name for a45 col hsrid for 99999 col gsrid for 99999 col vsrid for 99999 col hkind for a12 select c.srid, c.coord_ref_sys_name name, c.cmpd_horiz_srid hsrid, c.cmpd_vert_srid vsrid from sdo_coord_ref_system c, sdo_coord_ref_system hc where c.coord_ref_sys_...
true
2ce5c51eade78e4682bb41cc8eec86242c73abea
SQL
mimcomp/caseke
/dbs/old/db9.sql
UTF-8
20,106
3.125
3
[ "MIT" ]
permissive
CREATE TABLE "casecategory" ( "id" SERIAL PRIMARY KEY ); CREATE TABLE "casestatus" ( "id" SERIAL PRIMARY KEY ); CREATE TABLE "contact" ( "id" SERIAL PRIMARY KEY ); CREATE TABLE "courtlevel" ( "id" SERIAL PRIMARY KEY ); CREATE TABLE "document" ( "id" SERIAL PRIMARY KEY, "document" BYTEA, "doc_content" ...
true
8cdec874e92988026b398bbde1bbfc3825028a32
SQL
ppedvAG/2020_03_02_SQL_Abfragesprache
/2020_03_02_SQL_Abfragesprache/SQL_Abfragesprache/SQL_Abfragesprache/007_Joins.sql
ISO-8859-1
5,021
4.25
4
[]
no_license
-- INNER JOIN SELECT * FROM Orders INNER JOIN Customers ON Orders.CustomerID = Customers.CustomerID -- wenn der Name eindeutig ist (wenn wir wissen, aus welcher Tabelle er kommt), dann KNNEN wir den Tabellennamen davorschreiben, mssen aber nicht -- wenn (wie bei der CustomerID) der Name in mehreren Tabell...
true
a19fd49c58a17e9f7b8ff40a378da729de6145ba
SQL
Mohamadkabalan/touristtube
/patches/018_create_moscow_hotel_223724_360_divisions.sql
WINDOWS-1258
14,199
2.609375
3
[]
no_license
#ASSIGN DIVISIONS TO HOTEL MOSCOW 223724 # INSERT INTO `hotel_to_hotel_divisions` (`id`,`name`,`hotel_id`,`hotel_division_id`,`sort_order`) VALUES (477,'Lobby',223724,1,2); INSERT INTO `hotel_to_hotel_divisions` (`id`,`name`,`hotel_id`,`hotel_division_id`,`sort_order`) VALUES (508,'RoofTop Pool',223724,2,9); INSERT INT...
true
48502f98a39703516d68d30dc2eb26cdd636b136
SQL
lujifa0311/Learning
/learnling/总结.sql
UTF-8
2,848
3.765625
4
[]
no_license
修改表中数据注意 select mt.mf, mt.mdate, c.customer_id from (select case when mt.if_only_fror_buyer=1 then 1 else 2 end mf, date_format(to_utc_timestamp(mt.matf_comms_date,'Asia/Shanghai'),"yyyy-MM-dd'T'HH:mm:ss'Z'") mdate, mt.member_id md from ods_matf_communication_tag_monthly ...
true
00a2538925cdbfd9a97946ba27e53e35c5ce1f72
SQL
vkulsha/expl
/sql/objectlink_groupconcat_ik.sql
WINDOWS-1251
2,521
3.875
4
[]
no_license
select o0.id id0, o0.n n0 ,group_concat(distinct o1.n) n1, group_concat(distinct o1.id) id1, count(distinct o1.id) c1 ,group_concat(distinct o2.n) n2, group_concat(distinct o2.id) id2, count(distinct o2.id) c2 ,group_concat(distinct o3.n) n3, group_concat(distinct o3.id) id3, count(distinct o3.id) c3 ,group_c...
true
3e9a9feeb231f4a82112094c5ef8804b28e9befa
SQL
radtek/Scripts
/act2.sql
UTF-8
877
3.234375
3
[]
no_license
col MACHINE for a30 col OSUSER for a20 col PROGRAM for a50 col USERNAME for a20 col STATUS for a10 col sid format 999999999 col event for a40 col sql_id for a14 justify right col prev_sql_id for a14 justify right col plan_hash_value for 9999999999999 justify right col sql_hash_value for 9999999999999 justify right...
true
beb89534d473ea3aa3834166eda770e9cb03eaf8
SQL
catsAND/quiz_task
/server/sql/structure.sql
UTF-8
12,436
3.859375
4
[ "Unlicense" ]
permissive
DROP TABLE IF EXISTS `quiz_list`; CREATE TABLE IF NOT EXISTS `quiz_list` ( `id` char(16) NOT NULL COMMENT 'id', `description` text NOT NULL COMMENT 'description', `active` enum('0','1') NOT NULL DEFAULT '1' COMMENT 'status; 0 - not active, 1 - active', PRIMARY KEY (`id`), KEY `idx1` (`active`) ) ENGINE=InnoDB...
true
df3269ac69cb8851f81bcf16b154f71874061220
SQL
ilkrbk/finance-app
/console.sql
UTF-8
3,072
3.984375
4
[]
no_license
CREATE TABLE Category ( CategoryID serial PRIMARY KEY, Name varchar(20), Description varchar(100), PictureUrl varchar(100) ); CREATE TABLE Account ( AccountID serial PRIMARY KEY, Name varchar(20), Description varchar(100), MoneyAmount numeric ); CREATE TABLE Income ( IncomeID seria...
true
4be8e4cdd867f162ceace7cf94c9e57c5edb1264
SQL
laihanen/Ohjelmistoprojekti-1
/database/create_table_mysql.sql
UTF-8
1,213
3.515625
4
[]
no_license
CREATE TABLE luoja ( id INT NOT NULL AUTO_INCREMENT, nimi VARCHAR(30) NOT NULL, sposti VARCHAR(100) NOT NULL, salasana VARCHAR(20) NOT NULL, PRIMARY KEY (id) ) ENGINE=InnoDB; CREATE TABLE kysely ( id INT NOT NULL AUTO_INCREMENT, nimi VARCHAR(100) NOT NULL, luojanimi VARCHAR(30), luoja_id INT, PRIMA...
true
37c12974bb739d417d62475d9ba367e3b94df50f
SQL
nvanhai/tct2013
/Source/NTKCC3.2.0/TaxProjectServer/Scripts/QLT/rcv_map_tkhai.sql
UTF-8
441
2.671875
3
[]
no_license
CREATE TABLE rcv_map_tkhai (ma_tkhai VARCHAR2(2) NOT NULL, ma_tkhai_qlt VARCHAR2(2) NOT NULL, ghi_chu VARCHAR2(100), loai VARCHAR2(2) NOT NULL, nhom_hso VARCHAR2(2)) / -- Constraints...
true
f7499041d43f6926935c210b08b274ca96f1614c
SQL
fstanchese/corporativo
/corporativo/sql/Parcel/Parcel_qRelacionamentosCount.sql
UTF-8
3,681
3.09375
3
[]
no_license
select count(id) as qtde from ( ( select Id as ID, '-' as RELACIONAMENTO, nome as NOME, codigo as RA, replace(to_char(wpessoa.cpf/100,'000G000G000D00'),',','-') as CPFFORMATADO from WPessoa where Id = nvl( p_WPessoa_Id ,0) ) union ( select WPessoa_Id as ID, 'Foi confessor de' as RE...
true
aa853c96e239f347b08b218e42e802b38ebcc7d6
SQL
2dukes/PROJ_BDAD_1920
/Entrega 3/queries/int5.sql
UTF-8
674
4.3125
4
[]
no_license
-- menor intervalo de tempo (em dias) entre dois jogos da mesma equipa .mode columns .headers on .nullvalue NULL DROP VIEW IF EXISTS jogos_equipas; CREATE VIEW jogos_equipas AS SELECT Jogo.idClubeCasa AS 'idClube', Jogo.idJogo, Jogo.data_e_hora FROM Jogo UNION SELECT Jogo.idClubeFora AS 'idClube', Jogo.id...
true
93516a995728302a716510128cbfd6db6cfb889a
SQL
neilssibug/TI_MSOptimizer
/MSOpt scripts/SQL/report_sumplan_v4_20151118_test1.sql
UTF-8
2,096
3.09375
3
[]
no_license
SELECT sol.machine_instance, pkg.pkgtype, sol.Machine_Family_Name as tester_req, sol.Tooling_Family_Name as EDGE_LB ,pkg.pkg_size , pkg.Pin, pkg.Pin as package , sum(sol.Quantity) as expected_output_2_days , sum(sol.Quantity)/2 as expected_avg_output_per_day , round(avg(cap.capacity),2) as cap_per_day , CO...
true
ba6281e48207ec93efa0491e6ee936c94689b305
SQL
wayneV7/SQL
/Temporal Tables.sql
UTF-8
4,339
4.25
4
[]
no_license
--CREATING TEMPORAL TABLES /*A system-versioned temporal table is a type of user table designed to keep a full history of data changes and allow easy point in time analysis. Every temporal table has two explicitly defined columns, each with a datetime2 data type. These columns are referred to as period columns...
true
a52e51e10b17a5da1dfb8e88bdb534a7b1fe1f6a
SQL
kondasg/training-solutions
/src/main/resources/db/migration/V1__pizza.sql
UTF-8
518
2.9375
3
[]
no_license
DROP TABLE IF EXISTS `pizza`; CREATE TABLE `pizza` ( `pizza_id` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT, `pizza_name` VARCHAR(100) NOT NULL, `pizza_price` FLOAT NOT NULL, PRIMARY KEY (`pizza_id`) ); INSERT INTO `pizza` (`pizza_name`, `pizza_price`) VALUES ("Egyes", 600.0), ("Kettes", 850.0), ("Hármas", 910.0), ("...
true
7a0e2831a26ba1a401b3d9ad1e6bf5f01a840cf7
SQL
LGOLIK/fantasy-dash
/db/queries.sql
UTF-8
666
3.890625
4
[]
no_license
-- Query to see the draft results, including the round, team name, and position being picked SELECT d.*, p.player_name, p.position, t.team_name, t.manager FROM draft_results AS d INNER JOIN nfl_players AS p ON p.nfl_player_id = d.player_id INNER JOIN fan_teams AS t ON t.fan_team_id = d.fan_team_id ORDER BY d.pi...
true
f4843854bb13be64198b5fbe80fec5121e0d483a
SQL
alexbartley/SOCO-Test
/104909/CONTENT_REPO/Triggers/INS_JURIS_GEO_AREAS_NKIDS.sql
UTF-8
387
2.875
3
[]
no_license
CREATE OR REPLACE TRIGGER content_repo."INS_JURIS_GEO_AREAS_NKIDS" BEFORE INSERT ON content_repo.JURIS_GEO_AREAS REFERENCING OLD AS OLD NEW AS NEW FOR EACH ROW DECLARE l_nkid number; BEGIN select nkid into :new.GEO_POLYGON_NKID from geo_polygons where id = :new.GEO_POLYGON_ID; select nkid into :new.JURISDICTI...
true
79860b8d8f1485ea7ab8d382e783bdd0e92fba04
SQL
JacobTheLiar/sda-oracle-sql
/zadania 2-1.sql
WINDOWS-1250
3,843
4.15625
4
[]
no_license
-- Zadanie 2-1 -- 1. Dla kadego pracownika wygeneruj kod skadajcy si z dwch pierwszych -- liter jego etatu i jego numeru identyfikacyjnego. select p.nazwisko, p.id_prac, p.etat, SUBSTR(p.etat,1,2) || p.id_prac as "code" from system.pracownicy p ; -- 2. Wydaj wojn ...
true
102e85c2658d3083e97df44efa8a41324f8b70f2
SQL
waliullahcoder/ipinfo-view
/DB/ipinfoview.sql
UTF-8
5,731
3.234375
3
[ "MIT" ]
permissive
-- phpMyAdmin SQL Dump -- version 5.1.0 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Jun 29, 2021 at 08:25 AM -- Server version: 10.4.19-MariaDB -- PHP Version: 7.4.19 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIE...
true
f49025550475f8cb2329c0d4e7f4c2f600a4082c
SQL
jzjosuerivera71/codewars-solutions
/sql/8kyu/easy-sql-rounding-decimals/easy-sql-rounding-decimals.sql
UTF-8
200
2.890625
3
[ "MIT" ]
permissive
-- Solution to CodeWars kata: Easy SQL: Rounding Decimals -- https://www.codewars.com/kata/easy-sql-rounding-decimals/ SELECT floor(number1) AS number1, ceil(number2) AS number2 FROM decimals
true
68851de1e57bc8d3c3973c1ea853d0f3a38d9119
SQL
WookiePL/hdmi-zasadniczy
/query-quality/src/pl/polsl/hdised/files/query.sql
UTF-8
129
2.53125
3
[]
no_license
SELECT * FROM temperatura, pielegniarka, pacjent WHERE temperatura.id_piel = pielegniarka.id AND pacjent.id_temp = temperatura.id
true
32583a62decc073a0672f9b1b006d51ac89ebfbd
SQL
DanielMachado65/NerdWeb
/CRUD BackEnd/banco.sql
UTF-8
1,562
2.828125
3
[]
no_license
create database crudnerdweb; use crudnerdweb; drop table usuario; create table usuario( idusuario int primary key auto_increment, nome varchar(30), email varchar(30) unique, index (email) ); insert into usuario(nome, email) values ("teste", "teste1@gmail.com"); insert into usuario(nome, email) values ("teste"...
true
35e99d67ed60336c8240b2b8a467822d76de1bd2
SQL
bayapucg/online-ias
/assets/db.sql
UTF-8
16,668
3.171875
3
[]
no_license
/* SQLyog Community v11.52 (64 bit) MySQL - 10.1.32-MariaDB : Database - ias ********************************************************************* */ /*!40101 SET NAMES utf8 */; /*!40101 SET SQL_MODE=''*/; /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; /*!40014 SET @OLD_FOREIGN_KEY_...
true
d5b5999552f1bab1e998b94fd048d3288bf5db6f
SQL
jrichard68/Coding_Dojo_Work
/python_stack/flask_MySQL/countries.sql
UTF-8
1,907
4.375
4
[]
no_license
# 1- countries and percentage that speak Slovene SELECT countries.name, languages.language, languages.percentage FROM world.countries JOIN languages on world.countries.id = languages.country_id WHERE LANGUAGE ='Slovene' ORDER BY languages.percentage DESC; # 2- total number of cities for each country SELECT countrie...
true
fad0c7f89e383705af048aa10f76e48847de06be
SQL
hxmn/WIM
/PPDM/IHS PPDM US Data/DIR SRVY/View WELL_DIR_SRVY_STATION.sql
UTF-8
5,878
2.90625
3
[]
no_license
DROP VIEW PPDM.WELL_DIR_SRVY_STATION; /* Formatted on 11/7/2012 11:29:47 AM (QP5 v5.185.11230.41888) */ CREATE OR REPLACE FORCE VIEW PPDM.WELL_DIR_SRVY_STATION ( UWI, SURVEY_ID, SOURCE, DEPTH_OBS_NO, ACTIVE_IND, AZIMUTH, AZIMUTH_OUOM, DOG_LEG_SEVERITY, EFFECTIVE_DATE, EW_DIR...
true
4ed5922a81bdf446a28c4eda259c9329b6179e97
SQL
hebun/fazlastoks
/fazlastoklar.sql
UTF-8
18,321
3.171875
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.0.10deb1 -- http://www.phpmyadmin.net -- -- Host: localhost -- Generation Time: May 22, 2014 at 06:51 PM -- Server version: 5.5.37-0ubuntu0.14.04.1 -- PHP Version: 5.5.9-1ubuntu4 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIE...
true
27ecb766c32aff9f34e8cec644adde06b8e2e7c3
SQL
morten-egan/ninja
/plsql/ninja_compile.spec.sql
UTF-8
1,372
2.609375
3
[ "MIT" ]
permissive
create or replace package ninja_compile as /** Compilation of individual npg files and compilation of a package * @author Morten Egan * @version 0.0.1 * @project NINJA */ p_version varchar2(50) := '0.0.1'; /** Function to compile/run an npg source file by ID * @author Morten Egan * @param npg The ninja pac...
true
40571cf67d0ce2853ddf3e6032ec4d18527feea3
SQL
bellmit/flexdb
/2.HOST/1.View/vw_strade_subaccount_se.sql
UTF-8
3,688
3.21875
3
[]
no_license
CREATE OR REPLACE FORCE VIEW VW_STRADE_SUBACCOUNT_SE AS SELECT "ACCTNO","CUSTID","CUSTODYCD","SYMBOL","TRADE_QTTY","DEALFINANCING_QTTY","BLOCKED","SECURITIES_RECEIVING_T0","SECURITIES_RECEIVING_T1","SECURITIES_RECEIVING_T2","SECURITIES_RECEIVING_T3","SECURITIES_RECEIVING_TN","SECURITIES_SENDING_T0","SECURITIES_SENDING_...
true
31fdca19feb2e813a0c95a13efee82e7862bc5e8
SQL
jrcaspi/GREdatabase
/Create Reports.sql
UTF-8
2,237
3.90625
4
[]
no_license
--Report 1 select Sc.School_ID, Sc.School_Name, round(avg(Re.total_score)) as "Average Total Score", median(Re.total_score) as "Median Total Score" from jLJ16002.SAT_Results Re join jLJ16002.Student St on Re.Collegeboard_ID = St.Collegeboard_ID right outer join jLJ16002.School Sc on Sc.School_ID = St.sch...
true
b9ae9359ec2ae67ee0d9aa051540a2fea2efb11b
SQL
fleetmack/regis
/MSCD 650 - PLSQL Programming - Daniel Martin (A)/BookFiles/Chapter.07/budget07.sql
UTF-8
931
3.484375
3
[]
no_license
CREATE OR REPLACE PACKAGE budget_pkg IS CURSOR pcur_sales IS SELECT p.idProduct, p.price, p.type, SUM(bi.quantity) qty FROM bb_product p, bb_basketitem bi, bb_basket b WHERE p.idProduct = bi.idProduct AND b.idBasket = bi.idBasket AND b.orderplaced = 1 GROUP BY p.idProduct, p.price, p.type; P...
true
4a74e8e5db5d1469975a14e266da64fbeaa5c69c
SQL
kannans89/SwabhavTechlabs-Training
/sql/getDate.sql
UTF-8
495
3.09375
3
[]
no_license
delimiter // DROP FUNCTION IF EXISTS getFormattedDate; create function getFormattedDate() RETURNS varchar(25) BEGIN DECLARE dayOfMonth INT; DECLARE monthOfYear INT; DECLARE year INT; DECLARE date1 varchar(20); DECLARE todayDate DATE; SELECT CURDATE() INTO todayDate; select day(todayDate) into dayOfMonth; selec...
true
038b219185aae3344552973090de00c9fc29705a
SQL
rho621/sql_challenge_hw
/sql_challenge_HW/employees.sql
UTF-8
2,496
4.34375
4
[]
no_license
CREATE TABLE employees ( emp_no INT NOT NULL, birth_date DATE NOT NULL, first_name VARCHAR NOT NULL, last_name VARCHAR NOT NULL, gender VARCHAR NOT NULL, hire_date DATE NOT NULL, CONSTRAINT pk_employees PRIMARY KEY ( emp_no ) ); CREATE TABLE departments ( dept_n...
true
6e0eb4521d6d064afaf4f54b65baa65b56f46010
SQL
duarteicaros/Revisao_MySQL
/Atividade 6 - Curso Online.sql
UTF-8
2,677
3.9375
4
[]
no_license
create database db_cursoDaMinhaVida; use db_cursoDaMinhaVida; create table tb_categoria( id bigint auto_increment, cargaHoraria int (3), unidade varchar(1), professor varchar (255), primary key (id)); create table tb_produto( id bigint auto_increment, curso varchar(255) not null, valor floa...
true
3e0bce171b753c895c11d3db9e81866176081a59
SQL
TammyRae/SQL-Example
/CUFOR144.sql
UTF-8
30,741
2.75
3
[]
no_license
/* CUFOR144:Commercial Water Field Activities Completed Report Title: Completed Commercial Water FA's */ /* PragmaCad6.5 Upgrade T.Whitehead 04/2016 As part of the Upgrade, all reports were converted f...
true
fc45036f1ce225283f60ec66c1f5dc1ece37d875
SQL
dskopylov/courses
/app/courses/db/coursesdev.sql
UTF-8
8,192
3.1875
3
[]
no_license
-- Скрипт сгенерирован Devart dbForge Studio for MySQL, Версия 4.50.315.1 -- Дата: 26.05.2013 18:57:44 -- Версия сервера: 5.5.30-1.1 -- Версия клиента: 4.1 -- -- Отключение внешних ключей -- /*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; -- -- Установка кодировки, с...
true
23a46ae2a388676701528dac7201d1a171a1ef55
SQL
wangjue2020/SQL
/DDL.sql
UTF-8
2,899
4.46875
4
[ "Apache-2.0" ]
permissive
#DDL /* 数据定义语言 库和表的管理 一、库的管理 创建、修改、删除 二、表的管理 创建、修改、删除 创建:CREATE 修改:ALTER 删除:DROP */ #一、库的管理 #1、库的创建 /* 语法: create database 【 if not exists 】库名; */ create database if not exists books; #2、库的修改 #更改库的字符集 ALTER database books character set utf8; #3、库的删除 drop database if exists books; #二、表的管理 #1、表的创建 /* 语法: cre...
true
0c73a6980566ce16607da8492c8f139f8d5b9fda
SQL
x2p/x2p_api
/api/resources/sql/get_ora_info.sql
UTF-8
502
2.78125
3
[]
no_license
-- SQL script to get general information about oracle database connect / as sysdba set pagesize 1000 set linesize 100 set feedback off select * from v$instance; select * from v$version; select * from v$sga; select * from v$controlfile; select substr(d.name,1,60) "Datafile", NVL(d.status,'UNKNOWN') "Status", d.enabled...
true
cf3b5708328c396e53e715c655b212049f065056
SQL
kudjieRaymond/sql-project
/2-SELECT-from-world.sql
UTF-8
2,382
4.5
4
[]
no_license
/* SELECT from WORLD */ /* 1 Observe the result of running this SQL command to show the name, continent and population of all countries. */ SELECT name, continent, population FROM world /* 2 Show the name for the countries that have a population of at least 200 million. 200 million is 200000000, there are eight zeros...
true
741c6be9e45c62f19e66f495811790b0848be7c6
SQL
tiltshiftnl/bewerkdemarkten-api
/migrations/2020-12-29-211004_create_markets/up.sql
UTF-8
260
2.59375
3
[]
no_license
-- Your SQL goes here CREATE TABLE markets ( "id" SERIAL PRIMARY KEY, "name" VARCHAR NOT NULL, "abbreviation" VARCHAR NOT NULL, "createdAt" timestamp with time zone NOT NULL DEFAULT NOW(), "updatedAt" timestamp with time zone NOT NULL DEFAULT NOW() )
true
20602a6c0c3921f0494e6c2631ede8f19937afb6
SQL
shenicharan/Exact-Exact_assignment
/Final_query.sql
UTF-8
1,039
2.953125
3
[]
no_license
--Create statement for the table to load the data CREATE TABLE "YELLOW_TAXI_DATA" ( "VendorID" INTEGER, "tpep_pickup_datetime" datetime, "tpep_dropoff_datetime" datetime, "passenger_count" INTEGER, "trip_distance" REAL, "RatecodeID" INTEGER, "store_and_fwd_flag" TEXT, "PULocationID" INTEGER, "...
true
74ea17a7f79c1bbca305e37bef6c9418ea50e172
SQL
supportficct/INF312
/Projects de Josue/ejercicio 7.sql
UTF-8
1,069
3.8125
4
[]
no_license
( select codC ,nombre,categoria from conductores where categoria>15) --- decripcionm de los proyectpos 15 al 30 de septiembre 20 select proyectos.codP,[maquinas ].codM,conductores.nombre from [maquinas ],pro...
true
e9098bfa9ef04987838fc4c661a8eb367e7022ff
SQL
vsolv/BigFin
/Bigflow/DB/ATMA_SP/sp_Atma_Approval_To_Draft_PR_Contractor_Set.sql
UTF-8
4,064
3.15625
3
[]
no_license
CREATE DEFINER=`developer`@`%` PROCEDURE `sp_Atma_Approval_To_Draft_PR_Contractor_Set`(in lj_filter json, in Partner_Gid int,in lj_classification json,out Message varchar(1000)) sp_Atma_Approval_To_Draft_PR_Contractor_Set:BEGIN declare Query_Insert varchar(10000); Declare countRow varchar(6000); declare Query_Update v...
true
a4e1db526f42b6bedc6b5f5404efeb0a4ecc4e11
SQL
allwaysoft/fun
/Clients/MBTA/SQL/package_scripts/CC_DBK_DC.sql
UTF-8
63,962
3.375
3
[]
no_license
CREATE OR REPLACE PACKAGE CC_DBK_DC AS PROCEDURE Verify (p_table_name IN VARCHAR2); PROCEDURE Error ( p_table_name in VARCHAR2, p_dc_rownum in NUMBER, p_column_name in VARCHAR2, p_error_type in VARCHAR2, p_error_text...
true