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
fa9ecb19c59c9c7e92adbe6f1e6275e03c7a260b
SQL
YBYuan007/BootcampX
/2_queries_joins/students_assign_duration.sql
UTF-8
190
3.453125
3
[]
no_license
SELECT sum(assignment_submissions.duration) as total_duration FROM students INNER JOIN assignment_submissions ON students.id = assignment_submissions.student_id WHERE name = 'Ibrahim Schimmel';
true
8e77eb0e17fc0d62e4158b337c5bb73aaf49a7ca
SQL
cvdat2097/gcd-messenger-server
/database/gcd-messenger-db-schema-final.sql
UTF-8
3,149
2.9375
3
[]
no_license
-- MySQL dump 10.13 Distrib 5.7.25, for Linux (x86_64) -- -- Host: localhost Database: GCD_MESSENGER_DB -- ------------------------------------------------------ -- Server version 5.7.25-0ubuntu0.16.04.2 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHA...
true
374a5049871782e37f650a105d2a493b3acc8340
SQL
dwatson78/database
/updatescripts/from_380alpha/api/views/itemsite.sql
UTF-8
10,560
3.609375
4
[]
no_license
-- Item Site SELECT dropIfExists('VIEW', 'itemsite', 'api'); CREATE VIEW api.itemsite AS SELECT item_number::varchar AS item_number, warehous_code::varchar AS site, itemsite_active AS active, itemsite_wosupply AS wo_supplied_at_site, itemsite_createwo AS create_wos, itemsite_posupply ...
true
57c78226cd5c16e8f62c509d1df4c686375fd510
SQL
vvanherk/query_requests
/potato_operations_midterm_region.sql
UTF-8
3,538
3.65625
4
[]
no_license
alter session set current_schema=pcuser; select pp.policynumber, pp.producercodeofrecordid, pdc.code, pdc.description, pdc.branchid, pg.regnname, j.jobnumber, pp.editeffectivedate from pc_policyperiod pp inner join pc_job j on j.id = pp.jobid inner join pc_producercode pdc on pdc.id = pp.producercodeofrecordid in...
true
4cbc9a643d0b987ea3a33ab88eebdad551378fb8
SQL
asciiu/appa
/migrations/20200524131602_add_trades.sql
UTF-8
390
3.0625
3
[]
no_license
-- +goose Up CREATE TABLE trades( id UUID PRIMARY KEY, taker_order_id UUID REFERENCES orders (id) ON DELETE CASCADE, maker_order_id UUID REFERENCES orders (id) ON DELETE CASCADE, amount BIGINT NOT NULL, price BIGINT NOT NULL, side VARCHAR(4) NOT NULL, created_on TIMESTAMP DEFAULT now(), updated_on TIME...
true
dae035792e6f5a428c4477aa96ddcc6aa725762d
SQL
peicc1617/templates
/src/main/resources/innovation_templates.sql
UTF-8
6,248
3.421875
3
[]
no_license
/* Navicat MySQL Data Transfer Source Server : 58.206.100.146 Source Server Version : 50721 Source Host : 58.206.100.146:3306 Source Database : innovation_templates Target Server Type : MYSQL Target Server Version : 50721 File Encoding : 65001 Date: 2019-01-27 11:40:46 */ SET FORE...
true
90091db04da017182d6e2f14e682d0c8a109e752
SQL
Gaet69/projetWeb
/triggers.sql
UTF-8
527
3.796875
4
[]
no_license
CREATE TRIGGER trigger_noteGlobale AFTER INSERT ON notation FOR EACH ROW UPDATE recette SET noteGlobale = (SELECT AVG(noteDonnee) FROM notation WHERE notation.idRecette = recette.idRecette) WHERE recette.idRecette = NEW.idRecette DELIMITER // CREATE TRIGGER trigger_verifTempsRecette BEFORE INSERT ON recette FOR EACH...
true
3caa962a96aa362e98820911162f4fcbac7eec4d
SQL
vijaydairyf/TimelyFish
/SolomonApp/dbo/Views/dbo.cfv_XP602ChargeDetail.sql
UTF-8
998
3.109375
3
[]
no_license
 /****** Object: View dbo.cfv_XP602ChargeDetail Script Date: 5/18/2005 3:40:58 PM ******/ /******************************************************* Project Charge Transaction Details Used in XP602 Report ********************************************************/ CREATE View cfv_XP602ChargeDetail AS select pjs...
true
d61a74a58f1344e50c6a1bff781177db40415212
SQL
XsjBear/Boke
/boke.sql
UTF-8
5,824
3.34375
3
[]
no_license
/* Navicat MySQL Data Transfer Source Server : Xiong Source Server Version : 50560 Source Host : localhost:3306 Source Database : boke Target Server Type : MYSQL Target Server Version : 50560 File Encoding : 65001 Date: 2019-09-01 12:19:40 */ SET FOREIGN_KEY_CHECKS=0; -- --------...
true
1723cb7a29d41f9f57d97097464326ffb18a313f
SQL
fafaovo/python_Advanced
/7.mysql数据库/198.limit限制记录.sql
UTF-8
506
3.453125
3
[]
no_license
--limit限制记录 limit一定要写在sql语句的最后面 --limit 起始位置,记录数 --从起始位置开始取记录数跳 --底数从0开始 select * from students limit 0,3; select * from students limit 3; --分页查询 --每页显示两条,显示第一页 select * from students limit 0,2; select * from students limit 2,2; select * from students limit 4,2; select * from students limit 6,2; select * from studen...
true
0b171399cb3d87af26b2a95f9ba3885620f681b1
SQL
ripples3/index-coop-analytics
/treasury/lp-analysis-dash/MVI-stakers-distribution-behavior.sql
UTF-8
9,004
4.09375
4
[ "MIT" ]
permissive
/* Jack's query: https://duneanalytics.com/queries/87944 don's query: https://duneanalytics.com/queries/92066 Wallet / Address '\x5bc4249641b4bf4e37ef513f3fa5c63ecab34881' - MVI|ETH LP Staking Contract '\x4d3c5db2c68f6859e0cd05d080979f597dd64bff' - MVI|ETH LP Token '\x0954906da0Bf32d5479e25f46056d22f08464cab' - INDEX ...
true
be4729377128dc5a71f452672897759008d390d5
SQL
chandy20/obrasSociales
/baseDatos/obrasSociales.sql
UTF-8
40,585
3.171875
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.7.4 -- https://www.phpmyadmin.net/ -- -- Servidor: 127.0.0.1 -- Tiempo de generación: 21-02-2018 a las 20:56:15 -- Versión del servidor: 10.1.28-MariaDB -- Versión de PHP: 7.1.10 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00";...
true
8a48a70055936cc08ea76654bd4b70e8e0925dde
SQL
Yenni-Suresh/Feedback
/Feedback.sql
UTF-8
16,413
3.015625
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 3.3.9 -- http://www.phpmyadmin.net -- -- Host: localhost -- Generation Time: Jan 28, 2016 at 06:37 AM -- Server version: 5.5.8 -- PHP Version: 5.3.5 SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_S...
true
194db9cf989efb7b2048c10e57331c55d586c24f
SQL
albajiligadingp/rubicamp
/Challenge 14/ch14.sql
UTF-8
3,795
3.6875
4
[]
no_license
-- create database sqlite3 university.db -- create and insert into table admin CREATE TABLE admin ( username VARCHAR(255) NOT NULL, password CHAR(9) NOT NULL ); INSERT INTO admin ( username, password ) VALUES ( "gading", "gading313" ); -- create and insert into table mahasiswa CREATE TABLE mahasiswa ( ...
true
3cacbcfb1ae286efbb635f823d0f61c962d5e036
SQL
danny6547/VPD5
/ISO 19030/createGlobalConstants.sql
UTF-8
441
2.625
3
[]
no_license
/* Create table for global constants */ DROP PROCEDURE IF EXISTS createglobalConstants; delimiter // CREATE PROCEDURE createglobalConstants() BEGIN DROP TABLE IF EXISTS `static`.globalConstants; CREATE TABLE `static`.globalConstants (id INT PRIMARY KEY AUTO_INCREMENT, Specific_Gas_Constant_Air DOUBLE(6, 3),...
true
443aaf13782c50e9f5e82a95b6dd7e9a4bf1eed1
SQL
accidentlywoo/sql
/oracle/PLFUNCTION.sql
UHC
1,465
3.6875
4
[]
no_license
-- Լ /* CREATE OR REPLACE FUNCTION Լ̸(Ű1, Ű2,...) RETURN Ÿ; IS[AS] , BEGIN RETURN ȯ; [EXCAPTION ó] END [Լ ̸]; CREATE OR REPLACE FUNCTION my_mod(num1 NUMBER, num2 NUMBER) RETURN NUMBER -- ȯ Ÿ NUMBER IS vn_remainder NUMBER := 0; -- ȯ vn_quotient NUMBER ...
true
24f7ea086e615edaf40160c310c8fdac707cc25d
SQL
samvidmistry/Localized-Information-Broadcasting
/localized_information_broadcasting.sql
UTF-8
1,621
2.984375
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.8.3 -- https://www.phpmyadmin.net/ -- -- Host: localhost -- Generation Time: Dec 28, 2018 at 10:42 AM -- Server version: 10.1.37-MariaDB -- PHP Version: 7.2.12 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OL...
true
e5117aa8cbe206e55ce2a9637ba5d7c4ebe4e940
SQL
fsalad/ITCS-3160-ProjectRepo
/SQLDump/YumNowDump.sql
UTF-8
16,022
3.390625
3
[]
no_license
CREATE DATABASE IF NOT EXISTS `mydb` /*!40100 DEFAULT CHARACTER SET utf8 */ /*!80016 DEFAULT ENCRYPTION='N' */; USE `mydb`; -- MySQL dump 10.13 Distrib 8.0.19, for Win64 (x86_64) -- -- Host: localhost Database: mydb -- ------------------------------------------------------ -- Server version 8.0.19 /*!40101 SET @O...
true
6c6743cf40957effb8e7a1ad8f1bb2728fbcba50
SQL
SANDAG/sandag_urbansim
/etl/sql/zoning.sql
UTF-8
12,331
3.578125
4
[]
no_license
DROP TABLE IF EXISTS urbansim.parcel_zoning_schedule; DROP TABLE IF EXISTS urbansim.zoning_allowed_use; DROP TABLE IF EXISTS urbansim.zoning; DROP TABLE IF EXISTS urbansim.zoning_schedule; DROP TABLE IF EXISTS staging.sr13_capacity; CREATE TABLE urbansim.zoning_schedule ( zoning_schedule_id integer PRIMARY KEY ...
true
59341fb1cd8a34f18c12e847fcd41f9a8910626a
SQL
ericvini/project-mysql-one-for-all-trybe
/desafio10.sql
UTF-8
272
3.28125
3
[]
no_license
DELIMITER $$ CREATE FUNCTION quantidade_musicas_no_historico(id int) RETURNS INT READS SQL DATA BEGIN DECLARE qtd_songs INT; SELECT COUNT(*) FROM SpotifyClone.histsongs WHERE histsongs.UserID = id INTO qtd_songs; RETURN qtd_songs; END $$ DELIMITER ;
true
58cca750061571f500432221a95bb8cb072bf0a5
SQL
prateek-karanpuria/krish-training
/ref/m2-ee-to-ce-SQLs/search/catalogsearch_fulltext_scope1.sql
UTF-8
1,075
2.984375
3
[]
no_license
SET GLOBAL FOREIGN_KEY_CHECKS=0; -- TRUNCATE TABLE catalogsearch_fulltext_scope1; INSERT INTO m231_studentkare.catalogsearch_fulltext_scope1 ( m231_studentkare.catalogsearch_fulltext_scope1.entity_id, m231_studentkare.catalogsearch_fulltext_scope1.attribute_id, m231_studentkare.catalogsearch_fulltext_scope1.data_inde...
true
263e57d4bc4d4a3b10f1340be7f800754c95aad0
SQL
kleingeist1/firewall-orchestrator
/roles/database/files/upgrade/5.1.06.sql
UTF-8
358
3.296875
3
[ "Apache-2.0" ]
permissive
ALTER TABLE "report_schedule_format" DROP CONSTRAINT IF EXISTS report_schedule_format_report_schedule_id_fkey; Alter table if exists "report_schedule_format" add constraint report_schedule_format_report_schedule_id_fkey foreign key ("report_schedule_id") references "report_schedule" ("report_schedule_id") ...
true
1a6f23097c00dd75ebb37d5120eb833c18931acb
SQL
Dimbreath/UmaMusuData
/ja-JP/chara_category_motion.sql
UTF-8
2,473
2.609375
3
[]
no_license
BEGIN TRANSACTION; CREATE TABLE 'chara_category_motion' ('chara_id' INTEGER NOT NULL, 'standby_motion_1' INTEGER NOT NULL, 'standby_motion_2' INTEGER NOT NULL, 'standby_motion_3' INTEGER NOT NULL, 'standby_motion_4' INTEGER NOT NULL, 'standby_motion_5' INTEGER NOT NULL, 'standby_motion_6' INTEGER NOT NULL, PRIMARY KEY...
true
a722dd4678e4f417cbdcaa4faf374399908a1f91
SQL
ianprogrammer/sagas-pattern
/choreography/svc_user/migration/20200406010818_tb_roles.up.sql
UTF-8
348
3.28125
3
[ "MIT" ]
permissive
CREATE TABLE tb_roles ( id_roles INT8 NOT NULL DEFAULT unique_rowid(), nm_roles VARCHAR(50) NULL, acl STRING NOT NULL, created_at DATE NULL DEFAULT now():::DATE, update_at DATE NOT NULL, deleted_at DATE NULL, CONSTRAINT tb_roles_pk PRIMARY KEY (id_roles ASC), FAMILY "primary" (id_roles, nm_roles, acl, created_a...
true
50d76c131d3c65bbc860f1edb1371eca36f7bfa2
SQL
biaba/banking
/banking/sql_scripts/basic_db.sql
UTF-8
1,039
4.46875
4
[]
no_license
-- -- Table structure for table 'transaction' -- CREATE TABLE transaction ( id int(11) NOT NULL, credit_account_id int(11) NOT NULL, debit_account_id int(11) NOT NULL, amount int(11) NOT NULL, date date NOT NULL, status varchar(43) NOT NULL, PRIMARY KEY (id), CONSTRAINT FOREIGN KEY (credit_account_id)...
true
5fd02b1c0072d54d0af17497c3a9eb3057f64092
SQL
brandin-julien/HAMSTERHUB
/video.sql
UTF-8
2,940
2.78125
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.1.14 -- http://www.phpmyadmin.net -- -- Client : 127.0.0.1 -- Généré le : Lun 09 Mai 2016 à 14:44 -- Version du serveur : 5.6.17 -- Version de PHP : 5.5.12 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_...
true
750630f3ce3899d04e74f9e77e225fac8934f585
SQL
cantei/aroundtheworld
/01_born_dead.sql
UTF-8
4,255
3.6875
4
[]
no_license
SET @birth_start_d := '20170101'; SET @birth_end_d := '20171231'; SET @death_start_d := '20170101'; SET @death_end_d := '20171231'; SET @pop_day := '20170701'; SELECT /*village.villno AS 'หมู่ที่', village.villname AS 'ชื่อหมู่บ้าน',*/ person.pcucodeperson,chospital.hosname, COUNT( case when TIMESTAMPDIFF(year,birth,n...
true
0fb7f74c123a097af1ad7ae62634daa6c20d65c7
SQL
efilin/job4j
/chapter_012/db/scripts/update_001.sql
UTF-8
700
2.90625
3
[ "Apache-2.0" ]
permissive
CREATE TABLE IF NOT EXISTS seller ( id serial PRIMARY KEY, name VARCHAR(2000), username VARCHAR(2000), password VARCHAR(2000), role VARCHAR(2000), phone BIGINT, active BOOLEAN ); CREATE TABLE IF NOT EXISTS s_car ( id serial PRIMARY KEY, manufacturer VARCHAR(100), ...
true
fbff63ea32f8da22735e59e4c209c5ebddb5e82c
SQL
kms1837/capstone_4
/schema/final_score.sql
UTF-8
382
2.59375
3
[]
no_license
create table final_score( id int not null auto_increment, studentID varchar(30) not null, coding double not null, teample double not null, spec double not null, grade double not null, math double not null, final_grade varchar(20) not null, professor varchar(255) null, check_date varchar(...
true
8490ac51094cdb83cac0a1d0e2dc80e3900b9ffb
SQL
jerome13250/RanToolBox_SQL
/SWAP_NOKIA_L2100_10MHz_03_CorrectionRemotefddcellALU.sql
UTF-8
1,323
3.125
3
[]
no_license
--Correction du numero rncid et rac à 2 sur les remotefddcell des rnc voisins de celui du swap DROP TABLE IF EXISTS t_remotefddcell_generic_corrections; CREATE TABLE t_remotefddcell_generic_corrections AS SELECT snap3g_remotefddcell.remotefddcell, snap3g_rnc.rnc, snap3g_rnc.clusterid, snap3g_rnc.provisione...
true
0755ffacdefacdf2f90cc876c873a28cf444f37d
SQL
google-code/andy-dreamer
/CrazyCatcherManager/Document/Table/sys_user.sql
UTF-8
1,027
2.890625
3
[]
no_license
/* Navicat MySQL Data Transfer Source Server : mysql Source Server Version : 50518 Source Host : 192.168.2.170:3306 Source Database : crazycatcher Target Server Type : MYSQL Target Server Version : 50518 File Encoding : 65001 Date: 2012-08-15 18:08:07 */ SET FOREIGN...
true
05ac6b2ff652fefc1bcb8a978406b051887c052a
SQL
matiktli/boonapp_BEDS
/src/main/resources/db/migration/V1_2__NEEDY_TABLE.sql
UTF-8
352
3.09375
3
[]
no_license
create table `needy` ( needy_id int primary key AUTO_INCREMENT NOT NULL, name varchar(255) not null, type varchar(255) not null, location_id int not null, description varchar(500) null, notes varchar(999) null, constraint fk_needy_locationid foreign key (location_id) references location(location_id) ) ENG...
true
a9425865c69c1ede1783ceb70f0989d5fac052a4
SQL
LoPan455/prime-solo-sql
/demo.sql
UTF-8
1,148
4.40625
4
[]
no_license
/* Use * for wildcard SELECT all columns */ SELECT * FROM "songs"; /*Limit number of rows*/ SELECT * FROM "songs" LIMIT 10; /* SELECT matching on certain criteria with WHERE */ SELECT * FROM "songs" WHERE "id" = 100; SELECT * from "songs" WHERE "track" LIKE '%er'; SELECT COUNT(*) FROM "songs" WHERE "track" ILIK...
true
a225edfb7a69e83765c853f706112e8cc61eb0f3
SQL
steve7642/democracy_counts
/DBcreate/generic_list.sql
UTF-8
2,296
2.96875
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.7.7 -- https://www.phpmyadmin.net/ -- -- Host: localhost:3306 -- Generation Time: Oct 20, 2018 at 05:10 PM -- Server version: 5.6.41-84.1 -- PHP Version: 5.6.30 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; -- -- Database: `steve_520coa` -- -- -----------------...
true
5c1b201b950f6dca23fa7b314dabe782c6a71896
SQL
radtek/Telecommunication
/GSM/DataBase/PROCEDURES/P_TELETIE_PAY_SMS.sql
WINDOWS-1251
2,098
3.59375
4
[]
no_license
create or replace procedure P_TELETIE_PAY_SMS is sms varchar2(1000); begin update TELETIE_PAY_LOG pl set pl.sms_send=0 -- , - where pl.ssign is null -- or pl.http_answer!='200 Ok' -- or pl.res is not null -- ...
true
b3159fd341ac34c05629b59c718af13b822ca3be
SQL
Pepperoner/PersonalProjectManagementTool
/PPMToolFullStack/src/main/resources/schema/init_db.sql
UTF-8
3,603
3.375
3
[]
no_license
-- MySQL Script generated by MySQL Workbench -- Sun Jan 27 14:23:50 2019 -- Model: New Model Version: 1.0 -- 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='TR...
true
e3a44e58543f3b6e84765dee5d05541032485e7a
SQL
silence-do-good/stress-test-Postgres-and-MySQL
/dump/high/day22/select2304.sql
UTF-8
266
3.109375
3
[]
no_license
SELECT sen.name FROM SENSOR sen, SENSOR_TYPE st, COVERAGE_INFRASTRUCTURE ci WHERE sen.SENSOR_TYPE_ID=st.id AND st.name='WeMo' AND sen.id=ci.SENSOR_ID AND ci.INFRASTRUCTURE_ID=ANY(array['5100_5','5061','4042','5216','3100_3','3100_4','3224','4081','3052','6056'])
true
43d8ccc2e49527225222fbecc3d664e2ace6d52e
SQL
sumitraojha/SocietyMaintenance
/society.sql
UTF-8
1,375
3.203125
3
[]
no_license
show databases; create database Society; use Society; create table mastertable ( flatno varchar(20) primary key, ownername varchar(50) not null, totalsqft varchar(10) not null, maintenancePerSqft varchar(20) not null, carparkingCharge varchar(20) not null, waterCharge varchar(20) not null, storeRoom varchar(20), totalM...
true
f8387073f82b58d1e60c00da85a9848f0de7168c
SQL
tausvels/BootcampX
/1_queries/get_student_names_single_cohort.sql
UTF-8
67
2.75
3
[]
no_license
SELECT id, name FROM students WHERE cohort_id IN (1) ORDER BY name;
true
b4a843e4e51953898f72579e170fe192e60f4cb6
SQL
Nigel33/LS_180_sinatra_todos_PostgreSQL
/schema.sql
UTF-8
207
3.046875
3
[]
no_license
CREATE TABLE list ( id serial PRIMARY KEY, name text UNIQUE NOT NULL ); CREATE TABLE todo ( id serial PRIMARY KEY, status boolean NOT NULL DEFAULT false, list_id integer NOT NULL REFERENCES list(id) );
true
4967d9ba59137bed2f48c93a70080e93349b4b27
SQL
fcamblor/crowd-store
/crowd-store-aggregator/crowd-store-web/src/main/sql/scripts/12_addingUniqueConstraints.sql
UTF-8
176
2.75
3
[]
no_license
ALTER TABLE `product_category` ADD UNIQUE ( `name` ); ALTER TABLE `product` ADD UNIQUE ( `name` ); ALTER TABLE `selling_product` ADD UNIQUE ( `product_id` , `store_id` );
true
44a8f208abe978f0d19fe4ceb8118709a3474574
SQL
csjfnc/myinterview-DigiAge
/Query SQL.sql
ISO-8859-2
811
4.125
4
[]
no_license
1: Query que retorna a quantidade de funcionrios separados por sexo. select gender as sexo, count(gender) as quantidade from employees group by gender 2: Query que retorna a quantidade de funcionrios distintos por sexo, ano e ano de nascimento. select employees.gender as sexo, min(salary) as salario_minimo, avg...
true
51a09cea44e37d3a8705e54e4e4b8ea952083d37
SQL
raspgot/Blog
/blog.sql
UTF-8
2,968
4.03125
4
[]
no_license
-- -- Structure de la table `category` -- CREATE TABLE `category` ( `id` int(10) UNSIGNED NOT NULL, `name` varchar(255) NOT NULL, `slug` varchar(255) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- -- Déchargement des données de la table `category` -- INSERT INTO `category` (`id`, `name`, `slug`) VALUES (1, ...
true
dc418df350fffe831d8ca751a4533772956e74b1
SQL
SalehIbra/jurisdiction-services
/src/main/resources/db/migration/V1.1__CreateNolimitTestSchema.sql
UTF-8
459
3.265625
3
[]
no_license
CREATE TABLE jurisdiction ( jurisdiction_id int AUTO_INCREMENT PRIMARY KEY, jurisdiction_code VARCHAR(100) NOT NULL, jurisdiction_name VARCHAR(100) NOT NULL ); ALTER TABLE jurisdiction ADD UNIQUE UC_JURISDICTION_CODE (jurisdiction_code); CREATE TABLE configuration ( configuration_id int AUTO_INCREMENT PRIMAR...
true
6b7c4fe50733ec5a9b23e7848e1cc3eadb3475b1
SQL
gdeus/UTFPRAppCobranca
/banco_cobranca.sql
UTF-8
3,198
2.9375
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.8.5 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: 25-Jun-2019 às 06:04 -- Versão do servidor: 10.1.38-MariaDB -- versão do PHP: 7.3.4 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @O...
true
d304252f8a28acba34e545504cbcb7495c2dd2d5
SQL
nrf17/CS336_Databases
/HW2/p2/p2.sql
UTF-8
494
2.6875
3
[]
no_license
#2) Bars which serve no beer(s) which Joe likes (you can use one of the outer joins if you want) select distinct b.bar from sells b where not exists (select * from sells s, likes l where s.bar=b.bar and s.beer=l.beer and l.drinker='Joe'); #results: Britannia Arms #Cabana #Caravan #Club 175 #Coconut Wil...
true
f4b58488b67b4f070146ba78d1e31d0ea4f2710b
SQL
franciscosens/entra21-2019-matutino-banco-dados
/Exemplo01/03 - Select.sql
UTF-8
2,004
4.3125
4
[]
no_license
-- Obtém a quantidade de caracteres de cada registro SELECT LEN(nome) FROM produtos; -- Obtém os dias dos produtos SELECT DAY(data_vencimento) FROM produtos; -- Obtém os meses dos produtos SELECT MONTH(data_vencimento) FROM produtos; -- Obtém os anos dos produtos SELECT YEAR(data_vencimento) FROM pro...
true
441df168c7ef2f5b1d17a157750d2c29a1266efe
SQL
ClickHouse/ClickHouse
/tests/queries/0_stateless/02147_order_by_optimizations.sql
UTF-8
839
3.390625
3
[ "Apache-2.0", "BSL-1.0" ]
permissive
DROP TABLE IF EXISTS t_02147; DROP TABLE IF EXISTS t_02147_dist; DROP TABLE IF EXISTS t_02147_merge; CREATE TABLE t_02147 (date DateTime, v UInt32) ENGINE = MergeTree ORDER BY toStartOfHour(date); CREATE TABLE t_02147_dist AS t_02147 ENGINE = Distributed(test_shard_localhost, currentDatabase(), t_02147); CREATE TABLE...
true
24822df63a36bbb7257a1038f6a731c82d59b9ef
SQL
shashankkb/EmployeeApp
/testdb.sql
UTF-8
3,657
3.375
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 5.0.2 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1:3306 -- Generation Time: Oct 30, 2020 at 02:23 PM -- Server version: 5.7.31 -- PHP Version: 7.3.21 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@...
true
71d433a7e9bb8bc519c8bcc53b482bf8e38f65bc
SQL
rokas2255/Uzduotis
/comments.sql
UTF-8
1,986
3.171875
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.9.0.1 -- https://www.phpmyadmin.net/ -- -- Host: sql208.epizy.com -- Generation Time: Sep 15, 2021 at 01:20 PM -- Server version: 5.6.48-88.0 -- PHP Version: 7.2.22 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SE...
true
1f5e0743924f00c6cc927d172d20bd9548e5fdb8
SQL
nicatmammadzada/muhassssssssss
/public/ttttttttttttttttttttttttttttttttt.sql
UTF-8
14,741
2.890625
3
[ "MIT" ]
permissive
/* Navicat Premium Data Transfer Source Server : MySql Source Server Type : MySQL Source Server Version : 100411 Source Host : localhost:3306 Source Schema : muhasib Target Server Type : MySQL Target Server Version : 100411 File Encoding : 65001 Date: 31/10/2020 11:3...
true
d18c41c7abfa5976ef8533e03225505c870a4052
SQL
jasonadkison/cabbage
/database/src/main/resources/db/migration/V7__secure_flyway_schema_table.sql
UTF-8
363
2.578125
3
[ "MIT" ]
permissive
-- don't want people to be able to write to this! -- adding RLS without a policy should mean it can't be read or written alter table public.flyway_schema_history enable row level security; drop policy if exists all_role_select on public.flyway_schema_history; create policy all_role_select on public.flyway_schem...
true
86ffb9cc6669cfc40d90ab4f3a870f0da281ca7a
SQL
RyouHikaru/LibrarySystem
/8-written_work.sql
UTF-8
784
3.234375
3
[]
no_license
declare cursor c_book is select isbn_no, copy_no from book; cursor c_author is select author_id from author; v_random NUMBER; v_bookno book.isbn_no%TYPE; v_copy_no book.copy_no%TYPE; v_author author.author_id%TYPE; begin OPEN c_book; OPEN c_author; LOOP ...
true
c7b37b5a6ad59633e4cdfbba69a2acb2f5c523e6
SQL
lucasltt/Sisgraph
/Duplicação Dados CPFL/off_features.sql
UTF-8
988
2.9375
3
[]
no_license
create or replace procedure OFF_FEATURES is cursor dataTables is select c.g3e_table from g3e_component c where c.g3e_detail = 0 group by c.g3e_table; cursor dataFNO is select c.g3e_fno from B$COMMON_N c group by c.g3e_fno; begin -- limpar tabela de de-para off_clean_feature...
true
c3f22cc642f5654d6d88a2f67a2a43053b0fa5c4
SQL
zarmstrong/newznab-tmux
/test/DB/patches/old/db_update_01_01_2014_2.sql
UTF-8
916
3.0625
3
[ "LicenseRef-scancode-warranty-disclaimer" ]
no_license
ALTER TABLE releases DROP COLUMN nzbstatus; ALTER TABLE releases DROP COLUMN relnamestatus; ALTER TABLE releases DROP COLUMN hashed; ALTER TABLE releases DROP COLUMN request; DROP TRIGGER IF EXISTS check_insert; DROP TRIGGER IF EXISTS check_update; DELIMITER $$ CREATE TRIGGER check_insert BEFORE INSERT ON releases FO...
true
1d2759ffa12f07df30464b9c2eb913577bf28b93
SQL
rmak-naz/CMPE2400_SQL_Assignments
/ICA8_RonaldMak.sql
UTF-8
854
3.671875
4
[]
no_license
-- Ronald Mak -- CMPE 2400 -- ICA 8 -- Q1 SELECT top 1 CompanyName as 'Supplier Company Name', Country as 'Country' FROM Suppliers ORDER BY Country ASC -- Q2 SELECT top 1 with ties CompanyName as 'Supplier Company Name', Country as 'Country' FROM Suppliers ORDER BY Country ASC -- Q3 SELECT Top 1...
true
d53acd63b8b00d585d7ebf3f1d4abc114e1d5763
SQL
woshihuo12/evilbonefun
/egameserver/src/main/resources/data/dynamic/sql/jinling.sql
UTF-8
287
2.59375
3
[ "Apache-2.0" ]
permissive
DROP TABLE IF EXISTS `jingling`; CREATE TABLE `jingling` ( `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, `charid` bigint(20) NOT NULL, `jinglingid` int(11) NOT NULL, `jinglingname` varchar(50) NOT NULL, PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; COMMIT;
true
502e9e07cd163c695140a645f5fdf1150a47fb38
SQL
mcasx/WorkoutTrackingMobileApp
/muscle_db/Muscle_db_alterations.sql
UTF-8
785
3.046875
3
[]
no_license
USE muscle2; /* Table Alterations ALTER TABLE EXERCISE_HISTORY ADD Plan_id INTEGER; ALTER TABLE PLAN ADD Name VARCHAR(255) ALTER TABLE PLAN ADD COLUMN Creator VARCHAR(255) NOT NULL DEFAULT 'Muscle';*/ /* Table Inserts UPDATE PLAN SET Name = 'All Body Easy' Where ID = '1'; UPDATE PLAN SET Name = 'All Body Mediu...
true
2cde9bc5b858d6eaff8059b632c83a34e9df6827
SQL
chinakite/emars
/doc/sql/emars_2018-05-03-makeContract.sql
UTF-8
5,451
3.21875
3
[]
no_license
# ************************************************************ # Sequel Pro SQL dump # Version 4541 # # http://www.sequelpro.com/ # https://github.com/sequelpro/sequelpro # # Host: 127.0.0.1 (MySQL 5.7.17) # Database: emars # Generation Time: 2018-05-02 22:26:15 +0000 # *************************************************...
true
04e91cf2ad50a488589aca1b9c077a7c7e31fdf5
SQL
jmartinmachado/HelpMe
/sql/hm_usuariosActualizarCoordenadas.sql
UTF-8
447
2.828125
3
[]
no_license
DELIMITER $$ DROP PROCEDURE IF EXISTS `hm_usuariosActualizarCoordenadas`$$ CREATE PROCEDURE `hm_usuariosActualizarCoordenadas`( /** Nombre: hm_usuariosActualizarCoordenadas Descripción: Comentarios: Autores: Juan Martin Machado Audit Trail: */ _email VARCHAR(30), _longitud DOUBLE, _latitud DOUBLE ) BEGIN ...
true
77ba3740b274b34e581903b4500b0a02324b0a25
SQL
ramsingh66/Supermarket-Database-management-System
/Supermarket.sql
UTF-8
12,905
2.96875
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.2.12deb2+deb8u1build0.15.04.1 -- http://www.phpmyadmin.net -- -- Host: localhost -- Generation Time: Nov 10, 2017 at 09:28 PM -- Server version: 5.6.28-0ubuntu0.15.04.1 -- PHP Version: 5.6.4-4ubuntu6.4 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET ...
true
89f2d7c99486262627d7652f46b304f8f3d16b7f
SQL
ProxayFox/DeadSimpleLoginSystem
/sql/form.sql
UTF-8
891
3.40625
3
[]
no_license
-- Database creation CREATE DATABASE forum; -- User Table with Identifier of UDID CREATE TABLE userData ( UDID INT(11) NOT NULL AUTO_INCREMENT, UName VARCHAR(100) NOT NULL UNIQUE, PWD VARCHAR(200) NOT NULL, email VARCHAR(150) NOT NULL UNIQUE, salt TEXT(12) NOT NULL, PRIMARY KEY (U...
true
865346c7bd4ced987e8bd8eb26d4ced600f02259
SQL
ernestpascual/isprog2-finalproject
/sql-queries-isprog2-finalproject.sql
UTF-8
1,447
3.546875
4
[]
no_license
--- log in sql Applicant select appEmail from jobTblApp where appEmail = ' ' AND appPwd = ' ' ---fill spaces with variables in C# --- log in sql Employer select empEmail from jobTblEmp where empEmail = ' ' AND empPwd = ' ' --- joining applicants, Industry and Location select * from jobTblApp A inner join ...
true
477e44d12e0327293f448aab6d02d4c8b4624016
SQL
yuxinvalo/ESIPE
/ING2/BD/create_ventes.sql
ISO-8859-1
121,137
2.515625
3
[]
no_license
DROP TABLE TEMPS; CREATE TABLE TEMPS (TID number(4), annee number(4), trimestre number(2),mois number(2), jour number(2)); INSERT INTO TEMPS VALUES (1,1996,3,7,4); INSERT INTO TEMPS VALUES (2,1996,3,7,5); INSERT INTO TEMPS VALUES (3,1996,3,7,6); INSERT INTO TEMPS VALUES (4,1996,3,7,7); INSERT INTO TEMPS VALUES (5,199...
true
cf863f5ea51cec88d5521d2a83f833cb482a1e49
SQL
BohdanKorinnyi/admin-panel
/src/main/resources/sql/admin_dashboard_charts.sql
UTF-8
2,246
4.125
4
[]
no_license
SELECT sum(details.revenue) AS 'revenue', sum(details.spent) AS 'spent', (sum(details.revenue) - sum(details.spent)) AS 'profit', month(details.date) AS 'date' FROM (SELECT TRUNCATE(sum(expenses.sum), 2) AS 'spent', 0 ...
true
b0da6a939ff0e745ee0333816d2e69d12ad89ed5
SQL
bikle/rluck
/svm62/btg2.sql
UTF-8
2,578
4
4
[]
no_license
-- -- btg2.sql -- -- I use this script to help me study relationship between scores, g2, and g6. -- I start by getting the 6 hr gain (g6) and g2 for each prdate. DROP TABLE btg10; PURGE RECYCLEBIN; CREATE TABLE btg10 COMPRESS AS SELECT prdate ,pair ,ydate ,(LEAD(clse,12*2,NULL)OVER(PARTITION BY pair ORDER BY ydate)-c...
true
bbbd7da2402749f3a3d41ebb2ab475935cb3c92c
SQL
6AHK0MAT/tower.local
/stats.sql
UTF-8
2,399
3.09375
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.4.15.5 -- http://www.phpmyadmin.net -- -- Хост: 127.0.0.1:3306 -- Время создания: Июн 07 2016 г., 12:16 -- Версия сервера: 5.5.48 -- Версия PHP: 5.3.29 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+07:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT *...
true
2c20a8146916ec53168bdacdead1f02c0782072e
SQL
knight-erraunt/KMS_SQL
/schema.sql
UTF-8
673
3.640625
4
[]
no_license
CREATE TABLE categories ( category_name VARCHAR(128) PRIMARY KEY ); CREATE TABLE categories_to_archive_files ( archive_file_id INTEGER REFERENCES archive_files, category_name VARCHAR(128) REFERENCES categories ); CREATE TABLE people ( person_id INTEGER PRIMARY KEY, name VARCHAR(128), surname VARCHAR(1...
true
192396f55cb275f20e2f977e23d9060ebcbf8138
SQL
hunter-parks/database-exercises
/functions_exercises.sql
UTF-8
1,195
4.53125
5
[]
no_license
USE employees; -- Update your queries for employees whose names start and end with 'E'. Use concat() to combine their first and last name together as a single column in your results. -- SELECT CONCAT(first_name,' ', last_name) AS entire_name FROM employees -- WHERE last_name LIKE 'e%' -- AND last_name LIKE '%e' -- ...
true
0995ce31948dbff16c69bee8376c9b2c091e232e
SQL
germanleonz/siradex
/src/java/BD/constraintSiradex.sql
UTF-8
1,546
3
3
[]
no_license
ALTER TABLE usuario_estudiante ADD CONSTRAINT FK_estudiante__usuario FOREIGN KEY (carnet) REFERENCES usuario (usbid); ALTER TABLE usuario_profesor ADD CONSTRAINT FK_profesor__usuario FOREIGN KEY (usbid) REFERENCES usuario (usbid); ALTER TABLE usuario_obrero ADD CONSTRAINT FK_obrero__usuario FOREIGN KEY (usbid) REFERE...
true
2d7b9d6d302f59bbb48dd24167a593c650d24a85
SQL
dapfel/RecipeAppDatabaseService
/RecipeAppDB-SQL.sql
UTF-8
2,352
3.765625
4
[]
no_license
DROP TABLE UserCuisines; DROP TABLE Follows; DROP TABLE RecipeCuisines; DROP TABLE RecipePictures; DROP TABLE RecipeIngredients; DROP TABLE RecipeInstructions; DROP TABLE RecipeComments; DROP TABLE Recipes; DROP TABLE UserProfiles; CREATE TABLE UserProfiles ( email varchar (320), password varchar (30...
true
36f5088dc21df8106054736a6604fc25fc07181c
SQL
Ugpoor/YFDA_BeX5_model
/BIZ/demo/process/data/init/process.kingbase.table.sql
UTF-8
690
2.5625
3
[]
no_license
DROP TABLE DEMO_Dynamic_Flows DROP TABLE DEMO_Dynamic_LeaveApply create table DEMO_Dynamic_Flows ( $clientDefine, fID VARCHAR(100) not null, version INTEGER, fProcess VARCHAR(512) not null, fProcessLabel VARCHAR(1024) not null ); alter table DEMO_Dynamic_Flows add primary ke...
true
3db4e8520f0547580d98dd2192aa7ee133600790
SQL
lmeromy/week3day1-hw
/cinema_hw.sql
UTF-8
3,316
3.578125
4
[]
no_license
-- ## Questions -- 1. Return ALL the data in the 'movies' table. SELECT * FROM movies; -- id | title | year | show_time -- ----+-------------------------------------+------+----------- -- 1 | Iron Man | 2008 | 23:50 -- 2 | The Incredible Hulk ...
true
0ec44c48c4306028ef7349a04fad7111c7bc7360
SQL
fetrina/Latihan_MSSQLServer
/Solution1/SQL Server Scripts1/SQLQuery33_ProcedureWithParameterInput.sql
UTF-8
234
3.140625
3
[]
no_license
CREATE PROCEDURE AmbilKelasTertentu @NamaSekolah varchar(50) AS SELECT Sekolah.NamaSekolah, Kelas.NamaKelas FROM Sekolah inner join Kelas ON Sekolah.IdSekolah = Kelas.IdSekolah WHERE NamaSekolah=@NamaSekolah ORDER BY NamaKelas
true
6ac86f5ec36030a7b61909ce1f521ff9dd37a8d3
SQL
marielle1022/mass_charities_project
/db_run_files/db_insert_data.sql
UTF-8
7,770
3.453125
3
[]
no_license
USE mass_nonprofits; -- Add all regions INSERT IGNORE INTO regions(regionName) VALUES ('Central Massachusetts'), ('Metro Boston'), ('Northeast-Suburban'), ('Southeast'), ('Western Massachusetts'); -- Add all (basic) languages -- INSERT INTO languages(languageName) -- VALUES ('American Sign Language'), ('A...
true
bc9bdf5d291ecaa1bc2f76503698e7e29a82eb50
SQL
AYIDouble/obevo
/obevo-db-impls/obevo-db-scenario-tests/src/test/resources/scenariotests/baseline-scenario/step3/SCHEMA1/table/TABLE_A.ddl
UTF-8
467
3.109375
3
[ "Apache-2.0" ]
permissive
//// CHANGE name=baseline1 CREATE TABLE TABLE_A ( A_ID INT NOT NULL, B_ID INT NULL, C_ID INT NULL, D_ID INT NULL ) GO //// CHANGE FK name=fkChange ALTER TABLE TABLE_A ADD FOREIGN KEY (B_ID) REFERENCES TABLE_B(B_ID) GO //// CHANGE name=index CREATE INDEX TABLE_A_IND1 ON TABLE_A (A_ID, B_ID) ///...
true
feabcb3bbbbe3fcfc067511e624c7dc96993a7f6
SQL
pussbb/KBaseCMS
/modules/content-management/sql/scheme.sql
UTF-8
2,321
3.9375
4
[]
no_license
DROP TABLE IF EXISTS `blog_categories`; CREATE TABLE `blog_categories` ( `id` int(11) NOT NULL AUTO_INCREMENT, `name` varchar(255) NOT NULL, `description` text NOT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; DROP TABLE IF EXISTS `blog_posts`; CREATE TABLE `blog_posts` ( `id` int(11) NO...
true
a7d3a923a8918f1a24e1d0a91df3727a657679c2
SQL
gbhTest/test1
/数据库.sql
UTF-8
13,027
3.21875
3
[]
no_license
/* SQLyog 企业版 - MySQL GUI v8.14 MySQL - 5.5.28 : Database - inventory ********************************************************************* */ /*!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
6199959e82e9449723b5ab2ea5d16e478212d158
SQL
islamshalaby/online-exam
/online.sql
UTF-8
12,689
3.015625
3
[ "MIT" ]
permissive
-- phpMyAdmin SQL Dump -- version 4.6.6deb5 -- https://www.phpmyadmin.net/ -- -- Host: localhost:3306 -- Generation Time: Jun 17, 2021 at 12:48 PM -- Server version: 5.7.31-0ubuntu0.18.04.1 -- PHP Version: 7.2.34-16+ubuntu18.04.1+deb.sury.org+1 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!401...
true
78154edc8cc911ebfe34094a2eacb09d74c5b0a5
SQL
codio-content/MySQL-Aggregate_functions
/.guides/sample-data/e_store.sql
UTF-8
3,330
3.4375
3
[ "MIT" ]
permissive
-- MySQL dump 10.13 Distrib 5.6.15, for Linux (x86_64) -- -- Host: localhost Database: e_store -- ------------------------------------------------------ -- Server version 5.6.15 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!...
true
6f2dbae27b5be5d3df49523ec61a94a73bec9bb3
SQL
sortingtisolutions/CTT_Cire
/_desarrollo/archivos_info/CTTRentals_Functions.sql
UTF-8
5,098
3.609375
4
[]
no_license
-- ************** FUNCIONES A CREAR *********************** --**************fun_addstock********************** DELIMITER // CREATE FUNCTION fun_addstock(prdid INT) RETURNS INT BEGIN declare lexist INT DEFAULT 0; select count(*) into lexist from ctt_products WHERE prd_id=prdid; IF (lexist >= 1) THEN UPDATE ctt_pr...
true
f27b0efde5115028195dfefe72c7c97848e76d16
SQL
thalysonalexr/disciplinas-si-ufmt
/disc-bancodedados/aula-20-07/querys.sql
UTF-8
5,786
4.0625
4
[]
no_license
-- AULA 20-07 -- CREATE OR REPLACE VIEW VisaoVendedores AS SELECT v.nomeVendedor FROM vendedores v WHERE nomeVendedor LIKE 'A%'; CREATE OR REPLACE VIEW ConsultaClientes AS SELECT cl.nomeCliente, SUM(ve.valor) TOTAL FROM vendas vd, veiculos ve, clientes cl WHERE ve.idveiculo=vd.idveiculo AND cl.idcliente = vd.idclien...
true
7648e6b599a83fcb2cbbd3b08355b68e4932a14d
SQL
AAYamoldin/TrainingPrograms
/SQL-ex/Task1.sql
UTF-8
266
2.765625
3
[]
no_license
/*Найдите номер модели, скорость и размер жесткого диска для всех ПК стоимостью менее 500 дол. Вывести: model, speed и hd*/ SELECT pc.model, pc.speed, pc.hd FROM pc WHERE pc.price < 500
true
60a31f1cfb46da990f8b1e1f90b6db2954637210
SQL
Andoromeda-Foundation/java-server-template
/pb-migration/src/main/resources/migrations/V201611221600__create_power_consume.sql
UTF-8
3,292
3
3
[]
no_license
INSERT INTO `power_broker`.`sidebars` (`name`, `link`, `nav_id`) VALUES ('客户耗电信息', 'maintain/powerConsumes', '2'); DROP TABLE IF EXISTS `bss_power_consume`; CREATE TABLE `bss_power_consume` ( `id` bigint NOT NULL AUTO_INCREMENT COMMENT 'ID', `customer_id` bigint NOT NULL COMMENT '客户ID', `main_business` varchar(4...
true
f0c15b6b2b9d8507dc3a7227d10b0cfbdc0c88a7
SQL
gurpreet19/ec198392_wht
/Database/06_CVX_template/01_RP_Packages/RPTP_REPORT_REF_GROUP.sql
UTF-8
3,083
2.625
3
[]
no_license
-- START PKG_GEN_PKGS.sf_get_functions at:05/08/2019 04.19.44 AM CREATE or REPLACE PACKAGE RPTP_REPORT_REF_GROUP IS FUNCTION ALIGNPARENTVERSIONS( P_VT IN ECTP_REPORT_REF_GROUP.VER_TAB_TYPE, P_GROUP_TYPE IN VARCHAR2, P_FROM_CLASS IN VARCHAR2 DEFAULT NULL) RETURN ECTP_REPORT_REF...
true
457b8a64f51358793124b1929544df6512524282
SQL
vaphor/array-benchmarks
/src/analysis.sql
UTF-8
2,262
3.90625
4
[]
no_license
.mode csv .separator ; .import !resfile! Bench .headers on .separator ; -- .tables -- .schema Bench CREATE VIEW nice AS SELECT file, (CASE WHEN file like '%buggy%' THEN 'buggy' WHEN file not like '%buggy%' and preprocess like '%hinted%' THEN 'hinted' WHEN file not l...
true
5934999034b902673f68a6716f3dd26e2f920f07
SQL
suad-alwajeeh/jubari_travel-trainning
/jubari (24).sql
UTF-8
36,359
3.09375
3
[ "MIT" ]
permissive
-- phpMyAdmin SQL Dump -- version 4.8.4 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1:3306 -- Generation Time: 04 فبراير 2021 الساعة 02:52 -- إصدار الخادم: 5.7.24 -- PHP Version: 7.3.1 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CH...
true
e8adb275afec382eec85779d51a9ce069bc2d569
SQL
G3Kaliaperumal/OnlineMovieTicketBookingSystem
/Ticket.sql
UTF-8
478
2.625
3
[]
no_license
create table T_XBBNHBS_Ticket(ticketId number primary key, movieName varchar(30), noOfSeats number, discountCode varchar(30), totalPrice number, theatreId number references T_XBBNHBS_TheatreDetails(theatreId), viewerId number references T_XBBNHBS_ViewerDetails(ViewerId)); insert into T_XBBNHBS_Ticket(ticketId,...
true
01b66c96d11f82b314ff90590f793fc5437d8d54
SQL
nakashimanh/mkn-grpc
/postgres/init/1_ initdb.sql
UTF-8
570
3.0625
3
[]
no_license
create table if not exists users ( id SERIAL NOT NULL, user_id text UNIQUE, password text, created_at timestamp with time zone not null default current_timestamp, updated_at timestamp with time zone not null default current_timestamp, PRIMARY KEY (id) ); create table if not exists mikans ( id SERIAL NOT N...
true
cd3d361736c3273dbb8b8efe08302230ee6e4e8f
SQL
nelson-portilla/rpcc-dw
/sql/query_ver_direcciones_no_marcadas.sql
UTF-8
998
3.28125
3
[]
no_license
--TIPO DE RESDENCIA MARCADA DIF A 9 PERO LA CIUDAD NO REGISTRA select dir.* from "PACIENTES" as pac,"DIRECCIONES" as dir where pac."IdUnion"=dir."IdUnion" and pac."NoReg" is not null and dir."PrimerDir"=true and dir."TipoResidencia" is not null and dir."TipoResidencia" <>9 and dir."Ciudad" is null order by dir."TipoRes...
true
2597680c8126a513a8ea97617bea765abe2ed966
SQL
ptomulik/veetou
/share/oracle/packages/veetou/types/uu/uu_ocena.tps
UTF-8
2,550
2.609375
3
[]
no_license
CREATE OR REPLACE TYPE V2u_Uu_Ocena_t FORCE AUTHID CURRENT_USER UNDER V2u_Dz_Ocena_B_t ( job_uuid RAW(16) , pk_ocena VARCHAR2(128 CHAR) -- DBG , dbg_os_ids NUMBER(5) , dbg_prot_ids NUMBER(5) , dbg_term_prot_nry NUMBER(5) , dbg_student_indices NUMBER(5) , dbg_map_subj_codes NUMBER(5...
true
83ef388480b2c07476ad13c48e9b684dd1ffb489
SQL
rsaraphael/flight-panel-api
/src/main/resources/db-scripts/01-relationship.sql
UTF-8
678
2.65625
3
[]
no_license
--liquibase formatted sql --changeset rsaraphael:02 ALTER TABLE ITINERARY ADD COLUMN PILOT_ID integer; ALTER TABLE ITINERARY ADD COLUMN AIRCRAFT_ID integer; ALTER TABLE ITINERARY ADD COLUMN FLIGHT_ID integer; ALTER TABLE ITINERARY ADD COLUMN ORIGIN integer; ALTER TABLE ITINERARY ADD COLUMN DESTINATION integer; ALTER ...
true
e81785677c2612f7cf729889d7fd4b209982a88e
SQL
raoyan18/mvcExample
/database/recruitment.sql
UTF-8
5,005
2.71875
3
[ "LicenseRef-scancode-unknown-license-reference", "MIT" ]
permissive
-- phpMyAdmin SQL Dump -- version 4.5.1 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: Sep 27, 2017 at 06:27 PM -- Server version: 10.1.16-MariaDB -- PHP Version: 7.0.9 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLI...
true
e1d88479141cc79a6b3d34a8c2f703f2c78d3d5b
SQL
caue-alves/Comandos-MySQL
/ManipuladorDeTabelas.sql
UTF-8
603
3.046875
3
[ "MIT" ]
permissive
USE sucos; INSERT INTO tbproduto( PRODUTO, NOME, EMBALAGEM, TAMANHO, SABOR, PRECO_LISTA ) VALUES ( '1040107','Light 350ml melância','Lata', 350, 'Melância', 4.56); INSERT INTO tbproduto( PRODUTO, NOME, EMBALAGEM, TAMANHO, SABOR, PRECO_LISTA ) VALUES ( '037797','Clean 2l laranja','PET', 2000, 'Laranja', ...
true
c967592a8111e4a03546a09c446afdad904341a0
SQL
arselzer/HTQueryOptimizer
/musicbrainz-schema.sql
UTF-8
168,325
2.96875
3
[]
no_license
CREATE TABLE public.artist_release_group ( is_track_artist boolean NOT NULL, artist integer NOT NULL, unofficial boolean NOT NULL, primary_type smallint, secondary_types smallint[], first_release_date integer, sort_character character(1) NOT NULL COLLATE musicbrainz.musicbrainz, release_...
true
d474ff627e2a3d686acfd280df9359e90418d122
SQL
enterstudio/pypi-legacy
/tools/sql-migrate-20070721.sql
UTF-8
404
2.703125
3
[ "BSD-3-Clause" ]
permissive
CREATE TABLE description_urls ( name TEXT, version TEXT, url TEXT, FOREIGN KEY (name, version) REFERENCES releases (name, version) ); CREATE INDEX description_urls_name_idx ON description_urls(name); CREATE INDEX description_urls_name_version_idx ON description_urls(name, version); grant all on description_...
true
5e78a7bbedc929f87d1a59eabd344fba9d95f11d
SQL
LuiDami/Restaurant
/historialBD/restaurante(conFKsinDatos).sql
UTF-8
14,397
3.25
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 5.0.3 -- https://www.phpmyadmin.net/ -- -- Servidor: 127.0.0.1 -- Tiempo de generación: 19-10-2020 a las 23:56:44 -- Versión del servidor: 10.4.14-MariaDB -- Versión de PHP: 7.4.11 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD...
true
f646052f82c4aaab9af8d13643cbcb99be9ba56d
SQL
radtek/abs3
/sql/mmfo/bars/Table/wcs_user_responsibility.sql
WINDOWS-1251
3,830
2.953125
3
[]
no_license
PROMPT ===================================================================================== PROMPT *** Run *** ========== Scripts /Sql/BARS/Table/WCS_USER_RESPONSIBILITY.sql =========* PROMPT ===================================================================================== PROMPT *** ALTER_POLICY_INFO...
true
95a185c99a0f3b6f9f399802181cf0478226e658
SQL
Jody-Geers/node-rest
/test/db_innit.sql
UTF-8
787
3.1875
3
[ "MIT" ]
permissive
/* OUR DATABASE */ /*DROP DATABASE node_rest;*/ CREATE DATABASE node_rest; USE node_rest; /* TEST TABLE CAR */ CREATE TABLE car ( car_id INT NOT NULL AUTO_INCREMENT, PRIMARY KEY( car_id ), car_make VARCHAR(50) NOT NULL, car_model VARCHAR(50) NOT NULL, car_body VARCHAR(50) NOT NULL ); DESCRIBE car; /* TE...
true
1f38709914a3f3be7e43c0175b6c9163da9698e8
SQL
rgmcrary/Xspency
/db/seeds.sql
UTF-8
1,915
2.84375
3
[ "ISC" ]
permissive
-- Test data for employees table. INSERT INTO employees (empName, userId, PASSWORD, mgrId, mgrFlag) VALUES ("Sue Smith", "suesmith", "1a30451ebc264721b4a5666598c74837517c275409312884d60b2e6619b0f262", 0, TRUE), ("John Jones", "jojones", "df38b468d607e6f9c846bd25bdedcee228bc747cee19669bc2dd7b925ccecd08", 1, FALSE)...
true