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
b8091e861cbb0c783a8d1489e73411a37ff19dbf
SQL
lolson/bash_scripts
/scripts/home/leif/p_scripts/scripts/SQL Scripts/sample_queries.sql
UTF-8
732
3.453125
3
[]
no_license
select count(device_id) as cnt, device_id from profile group by device_id order by cnt; in ascending order, display the counts of device ids found in the profile table. one column for counts, and second for device_ids select device_group.device_id, device.device_class from device_group join device on dev...
true
0e81899fb87d2125babd0141975a6a118bb64d58
SQL
chounhlee/SQL_Excercise
/SQL_Excercise/Database management code along/createAlbum.sql
UTF-8
333
3.109375
3
[]
no_license
#DROP DATABASE IF EXISTS vinylrecordshop; #CREATE DATABASE vinylrecordshop; #USE vinylrecordshop; #SHOW DATABASES; #show tables CREATE TABLE album( albumId INT AUTO_INCREMENT, CONSTRAINT pk_album primary key (albumId), albumTitle VARCHAR(100) NOT NULL, label VARCHAR(50), releaseDate DATE, price DE...
true
2047d6b05924238ff63a7e96f780aae2915a753c
SQL
timrourke/timrourke.com
/migrations/0003_add_content_columns_to_posts.up.sql
UTF-8
250
2.765625
3
[ "MIT" ]
permissive
ALTER TABLE `posts` ADD COLUMN `title` VARCHAR(250) AFTER `updated_at`, ADD COLUMN `excerpt` TEXT AFTER `title`, ADD COLUMN `content` LONGTEXT AFTER `excerpt`, ADD COLUMN `permalink` VARCHAR(250) AFTER `content`, ADD INDEX `permalink` (`permalink`);
true
de3da43d24870cabc76e741585f90949a3fef497
SQL
jadilson12/studied
/Mysql/13 - Count- having-avg-where.sql
UTF-8
115
2.6875
3
[]
no_license
select * from gafanhotos where peso > 100 group by altura having altura > (select avg(altura) from gafanhotos)
true
36d19677aa2ba2635298a19db1b2f90185fb5e13
SQL
Berlione1/0323_2020DATAPAR
/Labs/module_1/Advanced-mySQL/Challenges2.sql
UTF-8
491
3.828125
4
[]
no_license
CREate temporary table T1 select t.title_id, au_id, round(advance*royaltyper/100) as advance, round(price*ytd_sales*royalty/100*royaltyper/100) as sales_royalty from titles t inner join titleauthor ta on t.title_id=ta.title_id inner join sales s on t.title_id=s.title_id; create temporary table T2 select title_id, a...
true
532bfe0766e4eba880c64c421948bfcbf5172adf
SQL
muntaza/Open_Persediaan
/sql4_persediaan/kartu_barang2_sql/kartu_barang2_disdik.sql
UTF-8
395
3.0625
3
[ "BSD-2-Clause", "BSD-3-Clause" ]
permissive
DROP VIEW IF EXISTS view_kartu_barang2_disdik; CREATE VIEW view_kartu_barang2_disdik AS SELECT *, sum(pra_saldo) OVER (PARTITION BY kode_barang ORDER BY tanggal, id_persediaan) as saldo FROM view_kartu_barang_disdik WHERE 1 = 1 AND id_skpd = 7; GRANT ALL PRIVILEGES ON view_kartu_barang2_disdik TO lap_disdik; R...
true
4e02ad6678e55fbfeca30fd768fa99875a1cbed5
SQL
ClickHouse/ClickHouse
/tests/queries/0_stateless/02354_annoy_index.sql
UTF-8
11,971
3.375
3
[ "BSL-1.0", "Apache-2.0" ]
permissive
-- Tags: no-fasttest, no-ubsan, no-cpu-aarch64, no-ordinary-database, no-asan SET allow_experimental_annoy_index = 1; SET allow_experimental_analyzer = 0; SELECT '--- Negative tests ---'; DROP TABLE IF EXISTS tab; -- must have at most 2 arguments CREATE TABLE tab(id Int32, vector Array(Float32), INDEX annoy_index v...
true
4fe461f8283f2ecc4f58728c9361e1b05698f04f
SQL
noah-cho/ecg-viewer-proto
/back-end/sql/02_init_table.sql
UTF-8
833
3.234375
3
[]
no_license
CREATE TABLE `user` ( `id` INTEGER not null, `email` varchar(30) not null, `created_time` datetime DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY (`id` AUTOINCREMENT) ); CREATE TABLE `ecg_test` ( `id` INTEGER not null, `region` varchar(5) not null, `sta...
true
928610116f503cb5c8c86710e01e9b19aebf3f9f
SQL
boabo/sis_conexionVPN
/base/data000001.sql
UTF-8
1,135
2.5625
3
[]
no_license
/***********************************I-DAT-FEA-CVPN-1-22/06/2017****************************************/ INSERT INTO segu.tsubsistema ("codigo", "nombre", "fecha_reg", "prefijo", "estado_reg", "nombre_carpeta", "id_subsis_orig") VALUES (E'CVPN', E'Sistema de Conexion VPN', E'2017-06-22', E'CVPN', E'activo', E'conexio...
true
8a0f2b9407772587065d94d5ea98e5d3e4c2a0b4
SQL
silence-do-good/stress-test-Postgres-and-MySQL
/dump/low/day11/select1111.sql
UTF-8
178
2.59375
3
[]
no_license
SELECT timeStamp, temperature FROM ThermometerOBSERVATION o WHERE timestamp>'2017-11-10T11:11:00Z' AND timestamp<'2017-11-11T11:11:00Z' AND temperature>=33 AND temperature<=59
true
9c53f6c5eb8ebc461afb560f3ca137d00222fd7a
SQL
patryksem/dentistry-system
/phpdocker/db/init/init.sql
UTF-8
7,978
3.484375
3
[]
no_license
-- -------------------------------------------------------- -- -- Struktura tabeli dla tabeli `attachemnt` -- CREATE TABLE `attachemnt` ( `id` int(11) NOT NULL, `user_id` int(11) DEFAULT NULL, `image_name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_...
true
fca77e8e606826179f235088b86a020f4a8ec080
SQL
codenautas/backend-plus
/examples/tables/install/data_db.sql
UTF-8
14,253
2.984375
3
[ "MIT" ]
permissive
set search_path = ext; insert into ext."users" (username, md5pass, rol, active_until) values ('bob', md5('bobpass'||'bob'), 'boss', '2099-12-31'); insert into ext."users" (username, md5pass, rol, active_until) values ('died', md5('diedpass'||'died'), 'boss', '1999-12-31'); insert into ext."users" (use...
true
a6d2dd96cc365d7ac8c28b3494defab922fd55c0
SQL
xeph/LOG350.TP3
/create_alerts_tables.sql
UTF-8
455
3.09375
3
[]
no_license
DROP TABLE IF EXISTS tasks_alerts; DROP TABLE IF EXISTS events_alerts; CREATE TABLE tasks_alerts ( ID INTEGER PRIMARY KEY AUTOINCREMENT, task_id INTEGER REFERENCES tasks(ID) ON DELETE CASCADE, action INTEGER, when_value INTEGER, when_specifier INTEGER ); CREATE TABLE events_alerts ( ID INTEGER PRIMARY KEY AUTO...
true
38014e8bfb019b18a8fb884800f89a0fa1528fd5
SQL
2SUE/210315Fullstack
/database/210416/210416_5.sql
UTF-8
884
3.921875
4
[]
no_license
# kang 강성헌 대구 달서구 용산동 SELECT * FROM membertbl; INSERT INTO membertbl (memberID, memberName, memberAdress) VALUES ('kang', '강성헌', '대구 달서구 용산동'); # AUTO_INCREMENT 자동으로 증가,, # int형, primary key 컬럼에만 사용 가능 # insert로 값 넣을 때 신경 안 써도 댐 CREATE TABLE testTBL2 ( id INT AUTO_INCREMENT, userName CHAR(3), age INT, PRIMARY K...
true
a61552a5803e9123a11bdddbec1bfec737f0d1be
SQL
ALittleRunaway/SQL_Queries
/1. Основы реляционной модели и SQL/1.7 Таблица Нарушения ПДД, запросы корректировки/5.sql
UTF-8
1,369
3.84375
4
[]
no_license
/*В таблице fine увеличить в два раза сумму неоплаченных штрафов для отобранных на предыдущем шаге записей. Пояснение к заданию Для всех нарушений, по которым штраф еще не оплачен, (тех, у которых date_payment имеет пустое значение Null), необходимо проверить, является ли данное нарушение для водителя и машины пов...
true
6c929a910d0bb6e4c90432b07d1058fd501fff72
SQL
viethoang1999/BTMySql
/store.sql
UTF-8
577
2.984375
3
[]
no_license
create schema if not exists store_cms_plusplus default character set utf8mb4; use store_cms_plusplus; create table if not exists ` store_cms_plusplus`.`laptop`( `id` int not null auto_increment primary key, `name` varchar(225) null, `url` varchar(225) null, `maker` varchar(45) null, `type` varchar(45) null, `ram` va...
true
160b75d3a5a227b5abdbbce9727234846e809bfd
SQL
tockri/hello-next
/conf/evolutions/default/1.sql
UTF-8
11,013
3.578125
4
[ "MIT" ]
permissive
# --- !Ups -- MySQL Workbench Forward Engineering -- ----------------------------------------------------- -- Table `space` -- ----------------------------------------------------- CREATE TABLE `space` ( `id` INT NOT NULL AUTO_INCREMENT, `name` VARCHAR(40) NOT NULL, `icon` VARCHAR(200) NULL, `nulabapps_space_k...
true
c3f82a17258338a82561d7907d37d9f5250667d8
SQL
Lucyhou/sqlleetcode
/q615 Average Salary Departments vs Company.sql
UTF-8
1,386
4.28125
4
[]
no_license
#615. Average Salary: Departments vs. Company drop table if exists q615salary; drop table if exists q615employee; Create table If Not Exists q615salary (id int, employee_id int, amount int, pay_date date); Create table If Not Exists q615employee (employee_id int, department_id int); Truncate table q615salary; insert i...
true
f826ca9f4a3b8a07e4dc40447f576cbb1a739366
SQL
rafkandos/PelitaJaya
/pelitajaya.sql
UTF-8
8,010
3.46875
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 5.1.1 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Waktu pembuatan: 05 Jul 2021 pada 14.19 -- Versi server: 10.4.19-MariaDB -- Versi PHP: 8.0.7 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CH...
true
bdebb266041f067db4b40140b9799dc4dcc95c18
SQL
bpk/Gopher_Country_Health_Initiative
/SQL_Scripts/Create_table_member.sql
UTF-8
1,460
3.765625
4
[]
no_license
/* create table Member ( MemberId int IDENTITY(1,1) NOT NULL, FirstName nvarchar(50) not null, LastName nvarchar(50) not null, Address1 nvarchar(50) null, City nvarchar(30) null, StateProvCode nvarchar(2) null, Zip5 char(5) null, Zip4 char(4) null, County nvarchar(50) null, DateOfBirth date null, ...
true
89433f47651740e10fe00962df094d8fca449dfb
SQL
roger-mayer/database-exercises
/join_exercises.sql
UTF-8
1,752
4.375
4
[]
no_license
use employees; # get dept name and dept manager SELECT departments.dept_name as 'Department name', CONCAT (employees.first_name, ' ', employees.last_name) AS 'Department Manager' FROM employees join dept_manager on employees.emp_no = dept_manager.emp_no join departments on dept_manager.dept_no ...
true
9ea2f0cbcfcea3438594ab2aacc0f157b6a87844
SQL
binknam/Java-basic-web-app
/src/main/resources/db/migration/V20181024083000__create_schema.sql
UTF-8
1,878
3.484375
3
[]
no_license
CREATE TABLE CATEGORIES ( ID SERIAL NOT NULL, NAME VARCHAR(128), CONSTRAINT CATEGORY_TK PRIMARY KEY (ID) ); CREATE TABLE USERS ( USERNAME VARCHAR(32) NOT NULL, PASSWORD VARCHAR(32) NOT NULL, CONSTRAINT USER_PK PRIMARY KEY (USERNAME) ); CREATE TABLE...
true
518f33adaa096ff510554bcebe32526dd44bf579
SQL
Fermec28/holbertonschool-higher_level_programming
/0x0E-SQL_more_queries/16-shows_by_genre.sql
UTF-8
286
3.765625
4
[]
no_license
-- Write a script that lists all Comedy shows in the database SELECT tv_shows.title, tv_genres.name FROM tv_shows LEFT JOIN tv_show_genres ON tv_shows.id = tv_show_genres.show_id LEFT JOIN tv_genres ON tv_show_genres.genre_id = tv_genres.id ORDER BY tv_shows.title, tv_genres.name;
true
c9e1402ba3da4ce58de6f409eddd73f66e7aafb5
SQL
egovernments/DIGIT-OSS
/municipal-services/egov-user-event/src/test/resources/db/migration/main/V20170227185618__updated_combination_pk.sql
UTF-8
5,403
3.03125
3
[ "MIT", "LicenseRef-scancode-generic-cla" ]
permissive
---------------------------- DROP FOREIGN KEYS ---------------------------- ALTER TABLE egeis_assignment DROP CONSTRAINT fk_egeis_assignment_employeeid; ALTER TABLE egeis_hoddepartment DROP CONSTRAINT fk_egeis_hoddepartment_assignmentid; ALTER TABLE egeis_employeejurisdictions DROP CONSTRAINT fk_egeis_employeejurisdic...
true
fc5a5334b4e74f66da1663112f7bccfb4611a0d4
SQL
DarrenMLie/wmi-item-service
/db/migrations/1622554720_users.up.sql
UTF-8
704
2.75
3
[]
no_license
CREATE TABLE IF NOT EXISTS users ( id varchar(510), bio varchar(510), username varchar(255) unique, first_name varchar(510), last_name varchar(510), email varchar(510), birt...
true
4cbed3545df4a537202c75bf74af22a415e62504
SQL
murari-goswami/bi
/ETL/DataVirtuality/views/tableau/tableau.mkt_rt_performance_by_sales_channel.sql
UTF-8
1,040
3.546875
4
[]
no_license
-- Name: tableau.mkt_rt_performance_by_sales_channel -- Created: 2015-09-02 12:37:33 -- Updated: 2015-09-02 13:49:53 CREATE VIEW tableau.mkt_rt_performance_by_sales_channel AS SELECT CAST(date_invoiced as date) as date_invoiced, order_id, sales_channel, sales_channel_special, shipping_country, CASE WHEN sale...
true
bd397c4f8718c904a6a4640f4c8d44fb13199d15
SQL
tedbow/drupalorg_infrastructure
/snapshot/drupal_localize.dev.sql
UTF-8
1,591
3.21875
3
[]
no_license
UPDATE users SET access = 280299600; -- Get rid of irrelevant data. TRUNCATE og_notifications; -- Get rid of unpublished/blocked nodes, users, comments and related data in other tables. DELETE FROM node WHERE status <> 1; DELETE FROM comment WHERE status <> 0; DELETE node FROM node LEFT JOIN users ON node.uid = users...
true
5904941202373eabb1019d6954239d100a2d3c7a
SQL
esineokov/ml
/db/diplom/select.sql
UTF-8
907
4
4
[]
no_license
use mvideo; # Активнные бонусные карты покупателя select u.id, u.email, uc.code, uc.points from users u left join user_cards uc on u.id = uc.user_id where u.id = 1; # Все заказы покупателя с ценой, статусом и количеством товаров в заказе select u.id, u.email, o.create_at, o.total_price, os.name, count(*) from users u...
true
905eb87028fd093a8408b54412eabcbfa7312f3f
SQL
petersen65/CSharp-Projects
/DPAG KISS PoC V5.0/Kiss Database/Schema Objects/Views/sd.StandingDataCatalogAll.view.sql
UTF-8
130
2.609375
3
[]
no_license
CREATE VIEW [sd].[StandingDataCatalogAll] AS SELECT Id AS sd_id FROM [sd].[StandingData] WHERE StandingData IS NOT NULL
true
b44396e0936121bf34dab478fbcfd40b9ee0c2b0
SQL
aasif-iqbal/Dynamic-Category-Subcategory-php-mysql-ajax
/dynamic-category-subcategory-php-mysql-ajax/tbl_categories.sql
UTF-8
2,014
3.140625
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 5.0.1 -- https://www.phpmyadmin.net/ -- -- Host: localhost -- Generation Time: Jul 27, 2020 at 03:08 PM -- Server version: 10.4.11-MariaDB -- PHP Version: 7.2.28 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OL...
true
657a359aac95cdb104aedc1fc271139a70cb9fae
SQL
chen18051916/videoPlayer
/conf/evolutions/default/1.sql
UTF-8
2,740
3.0625
3
[ "Apache-2.0" ]
permissive
# --- Created by Ebean DDL # To stop Ebean DDL generation, remove this comment and start using Evolutions # --- !Ups create table collection ( id integer auto_increment not null, collectionaccount varchar(255), collectionnmae varchar(255), collectionsong ...
true
ecb94c4ecd508caa656531256d4272b57b64ed49
SQL
gcoronelc/EMPRENDEDORES_2016_1
/ABD/TAREA_001.SQL
WINDOWS-1250
490
2.625
3
[]
no_license
pregunta 01 =========== Desarrollar un procedimiento que permita actualizar la nota de un estudiantes en un curso. pregunta 02 =========== Desarrollar un procedimiento que permita obtener un listado de los estudiantes matriculados en un curso con sus respectivas notas. Debe mostrar el nombre completo de los estudi...
true
c6177729ba9bf0b87f073b4a93eac886a8f7fe87
SQL
jafukaka/directory
/directory.sql
UTF-8
1,234
2.859375
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.9.2 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1:3306 -- Generation Time: Mar 25, 2021 at 04:56 AM -- Server version: 10.4.10-MariaDB -- PHP Version: 5.6.40 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SE...
true
d4e029959908015548512dc598fff1bf89fb60f4
SQL
WakeDown/UN1T_DataProvider
/DataProvider/SpeCalcDb/Stored Procedures/Claim/FilterTenderClaimsCount.sql
UTF-8
1,756
3.609375
4
[]
no_license
 CREATE procedure FilterTenderClaimsCount ( @idClaim int = null, @tenderNumber nvarchar(150) = null, @claimStatusIds nvarchar(max) = null, @manager nvarchar(500) = null, @managerSubDivision nvarchar(500) = null, @tenderStartFrom datetime = null, @tenderStartTo datetime = null, @overdie bit = null, @idProductM...
true
0d455a3386ee404d8a60c15d716434ea404b89ee
SQL
zhall6/Database-Project-26
/Procedures/add_driver_score.sql
UTF-8
706
3
3
[]
no_license
DELIMITER ;; CREATE DEFINER=`root`@`localhost` PROCEDURE `add_driver_score`( IN rating_id INT, IN person_id INT, IN order_id INT, IN driver_id INT, IN driver_score INT, IN rate_comment TEXT) BEGIN SET @new_rating_id = ((SELECT MAX(dr_id) FROM driver_score) + 1), @new_person_id = person_id, ...
true
4846cd78a695c7f72db0583c6a96f80d64f514cf
SQL
oussamakarim/academic_collection
/gestion_notes/sql/professors.sql
UTF-8
787
4.0625
4
[]
no_license
-- get courses be class select courses.id, courses.course_name, courses.course_semester from courses inner join teaching on teaching.course_id = courses.id where teaching.class_id = 4; -- get classes by professors select classes.id, classes.class_name, classes.class_full_name from teaching inner ...
true
705e6db01e2f24e20e941c2b0f96b59c7e56d806
SQL
bon-app-etit/popularDishes
/checkTiming.sql
UTF-8
1,841
2.921875
3
[]
no_license
\c test2; -- \timing -- select "ReviewId", "UserReviewRating", "UserReviewDate", "UserId" from "DishReviews" where "ReviewId"= 1000000 limit 1; -- select "ReviewId", "UserReviewRating", "UserReviewDate", "UserId" from "DishReviews" where "ReviewId"= 4000000 limit 1; -- select "ReviewId", "UserReviewRating", "User...
true
1d25b5113131fff63a5c77ad005393541377b367
SQL
Chucooleg/archived_w205_2017_summer_DataEngineering
/exercise_1/investigations/best_states/best_states.sql
UTF-8
470
3.671875
4
[]
no_license
SELECT state, ROUND(procedures_mean, 4) as procedures_mean, CEIL((PERCENT_RANK() OVER(ORDER BY procedures_mean DESC) + 0.0000001)*5) as rank_mean_group, ROUND(procedures_std_err, 4) as procedures_std_err, RANK() OVER(PARTITION BY CEIL((PERCENT_RANK() OVER(ORDER BY procedures_mean DESC) + 0.0000001)*5) ORDER BY procedu...
true
df8081d488054a433f7e056a1814ce4567db7400
SQL
blamb31/personal-project-fleet
/db/get_cars.sql
UTF-8
493
3.859375
4
[]
no_license
-- SELECT * FROM admins a -- JOIN cars c ON a.admin_id = c.admin_id -- LEFT JOIN drivers d ON c.driver_id = d.driver_id -- WHERE a.admin_id = $1 AND c.driver_id IN (SELECT driver_id from drivers WHERE admin_id = $1) -- OR c.driver_id IS null SELECT * FROM admins a JOIN cars c ON a.admin_id = c.admin_id LEFT JOIN driv...
true
a4a3f27fce94cdf2793335c0bdfbdc82c7a82124
SQL
CUBRID/cubrid-testcases
/medium/_02_xtests/cases/set1.sql
UTF-8
211
2.640625
3
[ "BSD-3-Clause" ]
permissive
autocommit off; select name, multiset(select r1.name from public.resort r1 where r0.activities * r1.activities <> {} order by 1) from public.resort r0 order by 1; rollback;
true
e4b58e5ad2b7ac3435ded8976e738ea0900dcbdc
SQL
VladislavRb/oracle_komunarka_project
/upgrade/lab3/table_folder/create_ingredients.sql
UTF-8
1,137
4.21875
4
[]
no_license
DEFINE USER_NAME = &&1 DEFINE TABLESPACE_NAME = "&&USER_NAME._DATA" DEFINE TABLESPACE_INDEX_NAME = &&USER_NAME._INDEX SET SERVEROUTPUT ON CREATE TABLE ingredients ( product_id NUMBER NOT NULL, component_name VARCHAR(500), weight NUMBER(10,5), CONSTRAINT compose_pk PRIMARY KEY (product_id, component_name...
true
be71298372201a097ee191335b12947aa94b0ba0
SQL
puppetpies/Snippets
/voc_queries.sql
UTF-8
729
3.3125
3
[]
no_license
CREATE VIEW v_craftsmen AS (SELECT v.*, c.onboard_at_departure, c.death_at_cape, c.left_at_cape, c.onboard_at_cape, c.death_during_voyage, c.onboard_at_arrival FROM voyages v JOIN craftsmen c ON (v.number = c.number)); CREATE VIEW v_invoices AS (SELECT v.*, i.invoice FROM voyages v JOIN invoices i ON (v.number = ...
true
a0c03c52922d03246ff3a61e9ea72e3775ee3c7b
SQL
jgarzonext/plsql-testing
/script_plsql/bd_iaxis/script/tables/AGE_TRANSICIONES.sql
ISO-8859-1
2,092
3.15625
3
[]
no_license
-------------------------------------------------------- -- DDL for Table AGE_TRANSICIONES -------------------------------------------------------- CREATE TABLE "AXIS"."AGE_TRANSICIONES" ( "CEMPRES" NUMBER(2,0), "CTIPAGE" NUMBER(2,0), "NORDEN" NUMBER(6,0), "CREALIZA" NUMBER(8,0), "CESTANT" NUMBER(3,0), ...
true
af6037e9d28723a998e6c108fa7e5c092c7432fe
SQL
rsobook/ms-database
/docker/sql/create-table-images.sql
UTF-8
201
2.5625
3
[]
no_license
CREATE TABLE public.images ( id uuid NOT NULL, filename VARCHAR, url VARCHAR ) WITH ( OIDS = FALSE ) TABLESPACE pg_default; ALTER TABLE public.images OWNER to postgres;
true
3cc60472a496b73ebc1f099c8a552871458167ca
SQL
HTTPArchive/almanac.httparchive.org
/sql/2020/css/transition_properties.sql
UTF-8
3,570
4.09375
4
[ "Apache-2.0" ]
permissive
#standardSQL CREATE TEMPORARY FUNCTION getTransitionProperties(css STRING) RETURNS ARRAY<STRING> LANGUAGE js OPTIONS (library = "gs://httparchive/lib/css-utils.js") AS ''' try { function compute(ast) { let ret = { properties: new Set(), animation_names: new Set(), timing_functions: {}, //...
true
e930fbc28a20c2346d448d5e74c4a29273ca7275
SQL
Orlandoguti/fundiacero
/fundiacero.sql
UTF-8
28,133
3.40625
3
[]
no_license
-- -------------------------------------------------------- -- Host: localhost -- Versión del servidor: 5.7.24 - MySQL Community Server (GPL) -- SO del servidor: Win64 -- HeidiSQL Versión: 10.2.0.5599 -- -------------------------------------------------------- /...
true
1a2e29ce013ee9c34c7084e6a08956aa46360722
SQL
lemamon/MeusPontos
/DevFiles/src/SQL/meuspontos.sql
UTF-8
2,064
3.78125
4
[]
no_license
USE meuspontos; CREATE TABLE IF NOT EXISTS `Usuario` ( `email` varchar(50) NOT NULL, `nome` varchar(150) NOT NULL, `sexo` varchar(9) NOT NULL, `IMC` float NOT NULL, `limPontos` float NOT NULL, `altura` float NOT NULL, `peso` float NOT NULL, `dataNasc` date NOT NULL, `senha` varchar(60) NOT NULL, PR...
true
a2b29a7e0cc0f0c81ba9c61a99007e73b4b0a222
SQL
webstream-framework/Database
/docker/postgresql/10.14/setup.sql
UTF-8
1,265
3.625
4
[ "MIT" ]
permissive
CREATE DATABASE sandbox; GRANT ALL PRIVILEGES ON DATABASE sandbox TO postgres; \c sandbox; DROP TABLE IF EXISTS t_webstream; DROP TABLE IF EXISTS t_webstream_entity_mapping; DROP TABLE IF EXISTS t_webstream_entity_mapping_type; CREATE TABLE t_webstream ( id serial NOT NULL, name character varying(100), CONSTRAI...
true
f28c155997cb7f1766bd309fba94bafeb5012b6f
SQL
mauriciocoruja/generation
/Aprendendo-Java/Spring/gfood/src/main/resources/mysql/script.sql
UTF-8
961
3.609375
4
[]
no_license
drop database gfood; create database gfood; use gfood; create table produto( id integer not null auto_increment, nome varchar(100) not null, descricao varchar(200), preco float not null , primary k...
true
b17822c404d4fcae39e8a94fa6e125c2c18e1b83
SQL
GreyCat20142017/doingsdone
/schema.sql
UTF-8
1,652
3.875
4
[]
no_license
DROP DATABASE IF EXISTS ddone; CREATE DATABASE ddone DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_general_ci; USE ddone; CREATE TABLE users ( id INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY, registration_date TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, email VARCHA...
true
2a0bd875362c64b50c7448840fff3e68f7b0094f
SQL
nhnhat1208/SalesManagement_WinForm_SQL
/INSERT DATA/EmployeeSearch.sql
UTF-8
1,240
3.4375
3
[]
no_license
--SELECT Nhan_Vien_MaNV,Nhan_Vien_HoTen,Nhan_Vien_NgayVaoLam, NhanVien_ChiNhanh_MaCN,NhanVien_ChiNhanh_ThoiGianBDLam,NhanVien_ChiNhanh_ConLamHayKo -- FROM Nhan_Vien INNER JOIN NV_ChiNhanh ON NhanVien_ChiNhanh_MaNV=Nhan_Vien_MaNV WHERE NhanVien_ChiNhanh_MaCN = 'CN1' -- ORDER BY Nhan_Vien_MaNV ASC; --SELECT Hoa_Don...
true
cfd2752aea14d0cade83105d8b86f2cc8ea991e7
SQL
LuisTaquire/Schema-and-Data_ToyRC
/Schema.sql
UTF-8
3,541
3.46875
3
[]
no_license
CREATE DATABASE toyRC ; USE toyRC; -- Table: ACTA CREATE TABLE ACTA ( Id_Partida int NOT NULL AUTO_INCREMENT COMMENT 'Aqui se ingresara el Codigo de Cada Apta de nacimiento ', Fech_Naci date NOT NULL COMMENT 'Aquí se ingresara la fecha de nacimiento de los usuarios ', Cod_Pers int NOT NULL COMMENT 'Codigo ...
true
0c717e9bef6025cc3cb79b6662ef5b93166dd1b1
SQL
smartXia/account
/src/main/resources/db/migration/V3__Create_account_binds.sql
UTF-8
739
3.03125
3
[]
no_license
DROP TABLE IF EXISTS `account_binds`; CREATE TABLE `account_binds` ( `id` int(11) NOT NULL AUTO_INCREMENT, `appkey` varchar(32) NOT NULL DEFAULT '', `channel` int(11) NOT NULL DEFAULT '0', `account_id` varchar(255) NOT NULL, `account_type` varchar(255) NOT NULL COMMENT '账号类型, phone qq weixin weibo', `openid...
true
6f4567e972f559a03566e4b7beea487ca1f0774c
SQL
retana/Prueba
/database.sql
UTF-8
4,924
3.328125
3
[]
no_license
/* SQLyog Ultimate v9.02 MySQL - 5.6.16 : Database - db_tienda ********************************************************************* */ /*!40101 SET NAMES utf8 */; /*!40101 SET SQL_MODE=''*/; /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; /*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FORE...
true
6953f0aa5794242e07f2ff888d5996f2784b4d6d
SQL
DevShashi1993/imdb-review-app
/server/schema.sql
UTF-8
969
3.9375
4
[]
no_license
--CREATE EXTENSION IF NOT EXISTS "uuid-ossp"; CREATE DATABASE imdb; CREATE TABLE IF NOT EXISTS movies ( id INT GENERATED ALWAYS AS IDENTITY (START WITH 100001) PRIMARY KEY, name VARCHAR ( 100 ) NOT NULL, director VARCHAR ( 100 ) NOT NULL, imdb_score NUMERIC(2,1) NOT NULL, popularity NUMERIC(3,1) NOT NULL ); ...
true
fd45bffdc73b81bae76797c2bc35fc100e641477
SQL
springusername/flyreservationdb
/reservation_passenger.sql
UTF-8
2,923
2.90625
3
[]
no_license
-- MySQL dump 10.13 Distrib 8.0.20, for Win64 (x86_64) -- -- Host: 127.0.0.1 Database: reservation -- ------------------------------------------------------ -- Server version 8.0.20 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;...
true
fdb42b1240dc37427aba80c4daab27c7b9dc057f
SQL
MAUQUINHOS/DEV
/NFC_RPI/INSTALL/base_de_dados.sql
UTF-8
3,188
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='TRADITIONAL,ALLOW_INVALID_DATES'; -- ----------------------------------------------------- -- Schema nfc -- --...
true
948b47e9869471c42f49ea22027cdf1b4b66dc58
SQL
wushujames/maxwell
/src/test/resources/sql/ddl/mysql-test.sql
UTF-8
408
2.671875
3
[ "Apache-2.0" ]
permissive
create table t1 (t1 timestamp not null default now(), t2 datetime, t3 timestamp NOT NULL DEFAULT '0000-00-00 00:00:00') create table t1 (t1 timestamp not null default now() on update now(), t2 datetime) REPAIR TABLE federated.t1 REPAIR TABLE federated.t1 QUICK REPAIR TABLE federated.t1 EXTENDED REPAIR TABLE federated.t...
true
b4b9a2a1c48f2858a8e54952cd020b29b290532c
SQL
kevin2520/prueba-nexus
/bd.sql
UTF-8
5,680
3.234375
3
[]
no_license
CREATE DATABASE IF NOT EXISTS `prueba` /*!40100 DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci */ /*!80016 DEFAULT ENCRYPTION='N' */; USE `prueba`; -- MySQL dump 10.13 Distrib 8.0.19, for macos10.15 (x86_64) -- -- Host: localhost Database: prueba -- ------------------------------------------------------ ...
true
0a1fb5648c9537f19f8e22ae3432bcd0e7da8e3b
SQL
bishwaskalika/PHP-CRUD
/sandesh.sql
UTF-8
4,521
3.09375
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.3.11 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: Apr 29, 2016 at 05:36 AM -- Server version: 5.6.24 -- PHP Version: 5.6.8 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; ...
true
6822b6a6b44857b70e138b865b4aa9f14fd77c8b
SQL
qpoussie/FearMyPower
/conf/evolutions/default/1.sql
UTF-8
834
2.734375
3
[]
no_license
# --- Created by Ebean DDL # To stop Ebean DDL generation, remove this comment and start using Evolutions # --- !Ups create table questionnaire ( id bigint auto_increment not null, titre varchar(255), createur varchar(255), debut ...
true
8a56c8ab560fd0001a28f20c8b09b47822826416
SQL
mdj44518/human_example
/mix/goods_sql/goods.sql
UHC
3,978
3.09375
3
[]
no_license
-------------------------------------------------------- -- - -10-02-2019 -------------------------------------------------------- -------------------------------------------------------- -- DDL for Table GOODS -------------------------------------------------------- CREATE TABLE "GOODS"."GOODS" ( "GNAME"...
true
258529801e54d946702a3cf59284fbe80fae303d
SQL
silence-do-good/stress-test-Postgres-and-MySQL
/dump/high/day11/select1939.sql
UTF-8
276
3.140625
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='Thermometer' AND sen.id=ci.SENSOR_ID AND ci.INFRASTRUCTURE_ID=ANY(array['4081','3100_9','4100_7','2100_2','3100_10','5058','5048','3234','2099','4231'])
true
aa389a0b37d8423a6695e141894d256acb3766fe
SQL
Adambear1/Employee-Tracker
/db/schema.sql
UTF-8
1,005
4.0625
4
[]
no_license
drop database if exists homeworkdb; CREATE DATABASE homeworkdb; USE homeworkdb; CREATE TABLE department ( id int not null auto_increment, name varchar(30) not null, primary key (id) ); CREATE TABLE role ( id int not null auto_increment, title VARCHAR(30) NOT NULL, salary decimal NOT NULL, ...
true
0f8c08b46369817e827daa6bc52699ec36a1da28
SQL
stagadimples/OrderClassification
/primary_site.sql
UTF-8
266
3.125
3
[]
no_license
-- primary dc select prod_code, fulfillingdc from ( select prod_code , fulfillingdc , count(*) , row_number()over(partition by prod_code order by count(*) desc)myrank from test_orders group by prod_code , fulfillingdc ) where myrank = 1;
true
de7cbde2a1d26451259b57d939a5311a07a2beb7
SQL
huangliliu0917/jh
/data/Dump20171112/db_jh_pay_refund_order.sql
UTF-8
3,202
3.09375
3
[]
no_license
-- MySQL dump 10.13 Distrib 5.7.17, for macos10.12 (x86_64) -- -- Host: localhost Database: db_jh -- ------------------------------------------------------ -- Server version 5.7.20-log /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS ...
true
eb1e7997341b1f46736c797808e9c023c17f331a
SQL
international-school-of-curitiba/TOTVSRM
/Classis/Diretorio/Classis_Directory_Complete.sql
WINDOWS-1252
3,037
3.25
3
[]
no_license
select distinct Umatricpl.MatAluno, ZFamilia.Nome, isnull(Eacompl.A_publica, 'No') as Publica, vw_info_familia.Pessoa1, Case when Zfamilia.Class_Pessoa1 = 'Me' then 'Mother' when Zfamilia.Class_Pessoa1 = 'Pai' then 'Father' else 'Responsable' End as Class_Pessoa1, vw_info_familia.No...
true
e8b45b6d51e0b9b15dc62df4dfce4a7b9521444c
SQL
sheik2306/inf3080-a2019-Base_Donnee
/lab/moviedata.sql
UTF-8
3,532
3.484375
3
[]
no_license
drop table Movie; drop table Reviewer; drop table Rating; create table Movie( mID integer NOT NULL PRIMARY KEY, title varchar(50) NOT NULL, year integer NOT NULL check ( year > 1900), director varchar(30), CONSTRAINT pk_couple UNIQUE (title, year), CONSTRAINT chk_spiel CHECK ( director NOT LIKE ...
true
d91547b27184e64348b9de17aeebf3eb26f8ea64
SQL
olanseverson/surveillance_system
/sql_script/4G_InsertToday.sql
UTF-8
487
3.015625
3
[]
no_license
TRUNCATE isat_tmp.susy4G_today; Replace into isat_tmp.susy4G_today select a.oss,a.xdate,c.SITE_ID,a.name, a.cellname, a.MRBTS,a.lnbts,a.LNCEL,b.earfcnDL,b.dlchbw, a.pMax from isat_cm.lncel a Join isat_cm.LNcel_fdd b On a.oss = b.oss and a.xdate = b.xdate and a.LNBTS = b.lnbts and a.MRBTS = b.mrbts and a.LNCEL = b.l...
true
937ac3300b44c52ebc54771cd2c0b8e2416a8a98
SQL
nfbf/sistema-de-autenticacao
/src/main/resources/import.sql
UTF-8
2,831
2.640625
3
[]
no_license
USE ProjectPOO INSERT INTO Usuario VALUES ('admin', 'Administrador', 'admin', 'Desbloqueado','Ativo' ) INSERT INTO Usuario VALUES ('PEDRO', 'Administrador', '123456', 'Desbloqueado','Ativo' ) INSERT INTO Usuario VALUES ('NICOLLY', 'Administrador', '12221', 'Desbloqueado','Ativo' ) INSERT ...
true
42d6fe15461cca95207891766e2232543ad0b626
SQL
FelipeRamosOliveira/Portfolio
/Sql/SQL 301/5. COMO DELETAR DADOS.sql
UTF-8
2,277
3.671875
4
[ "Python-2.0", "MIT" ]
permissive
-- SELECIONAR BANCO DE DADOS USE vendas_sucos; -- INSERIR DADOS ALETÓRIOS INSERT INTO PRODUTOS (CODIGO,DESCRITOR,SABOR,TAMANHO,EMBALAGEM,PRECO_LISTA) VALUES ('1001001','Sabor dos Alpes 700 ml - Manga','Manga','700 ml','Garrafa',7.50), ('1001000','Sabor dos Alpes 700 ml - Melão','Melão','700 ml','Garrafa',7....
true
9b5e2a7b35558cb1cfb8b9dbd19d284cc095d121
SQL
johnthethird/postgres-all-the-things
/database/api_schema/views/me.sql
UTF-8
370
2.90625
3
[ "MIT" ]
permissive
CREATE VIEW me AS SELECT (SELECT row_to_json(t) FROM (SELECT id, email FROM tenant_members WHERE id = app.user_id()) t) AS user, (SELECT row_to_json(t) FROM (SELECT id, name FROM tenants WHERE id = app.tenant_id()) t) AS tenant, (SELECT to_jsonb(array_agg(row_to_json(t))) FROM (SELECT * FROM tenants) t) ...
true
39baf67e6e1e39ee26cd517e154a9a8d026f80b7
SQL
nijrhymes/rar
/mcodingc_rarafrica.sql
UTF-8
10,398
3.015625
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.9.7 -- https://www.phpmyadmin.net/ -- -- Host: localhost:3306 -- Generation Time: Aug 19, 2021 at 02:20 PM -- Server version: 5.7.35-cll-lve -- PHP Version: 7.3.28 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET...
true
54f05590333d10c72965363b999e4554541efea0
SQL
anjuls/Richards-Monitor
/Scripts/longOps.sql
UTF-8
227
2.703125
3
[]
no_license
SELECT sid , SUBSTR(username, 1, 20) "Username" , elapsed_seconds , time_remaining , start_time "Start Time" , message FROM gv$session_longops l WHERE sofar != totalwork ORDER BY time_remaining desc
true
9be1476f3e5de7c4a2a86cf96dfed7f446f45ee2
SQL
Rachelxdr/text_recognition
/my_app/schema.sql
UTF-8
700
3.359375
3
[]
no_license
DROP TABLE IF EXISTS users; DROP TABLE IF EXISTS pictures; DROP TABLE IF EXISTS results; CREATE TABLE users ( id INTEGER PRIMARY KEY AUTOINCREMENT, username TEXT UNIQUE NOT NULL, password TEXT NOT NULL bucket_name TEXT album_name TEXT ); -- CREATE TABLE pictures ( -- id INTEGER PRIMARY KEY AUT...
true
bcfd6bae7c4e621579be94456ad5dbdd6aac853a
SQL
CMitchell5619/undertakings
/setup.sql
UTF-8
568
3.6875
4
[]
no_license
USE undertakings; CREATE TABLE dockets ( id INT NOT NULL AUTO_INCREMENT, title VARCHAR(255) NOT NULL, creatorId VARCHAR(255) NOT NULL, PRIMARY KEY (id) ); CREATE TABLE undertakings ( id INT NOT NULL AUTO_INCREMENT, docketId INT NOT NULL, body VARCHAR(255) NOT NULL, public TINYINT(1), creatorId VARCHAR(255) NOT NULL,...
true
7392b7416b8cb2a58603d1d412507d9e78ae5c32
SQL
MohammadRaziei/DB2019
/Workspace/Project/Files/functions.sql
UTF-8
2,178
4
4
[]
no_license
-- VIEWs : CREATE VIEW customers_have_sign as select distinct CID from Customer_sign; create view Amaade_Padakht_list as select AID, Nsign, count(*) as signs from Customer_Account_Access natural join ( select Nsign, AID from (DastorPardakht as P) inner join (Account as A) on A.AID = P.Origin_AID ...
true
b1354e09ffd4ec8e862e6f2c1ad44d1101e32628
SQL
lukepetercurran/database-exercises
/indexes_lecture.sql
UTF-8
996
3.609375
4
[]
no_license
USE employees; # use of indexes is part of Query Optimization SHOW INDEXES FROM employees; SHOW INDEXES FROM departments; # Lets say I want some salary information SELECT salary FROM salaries Where salary BETWEEN 50000 AND 70000; ALTER TABLE salaries ADD INDEX salary_index (salary); USE codeup_test_db; CREATE ...
true
2b4a86b8a933a317f750ee1dc39ceeacdb64c4dd
SQL
ptaconet/r_sql_datawarehouse
/sql_scripts_datawarehouse_creation/create_schema_metadata.sql
UTF-8
2,538
4.03125
4
[]
no_license
CREATE SCHEMA metadata AUTHORIZATION "%db_admin%"; GRANT ALL ON SCHEMA metadata TO "%db_admin%"; GRANT USAGE ON SCHEMA metadata TO "%db_read%"; ALTER DEFAULT PRIVILEGES IN SCHEMA metadata GRANT SELECT ON TABLES TO "%db_read%"; CREATE TABLE metadata.metadata ( id_metadata serial NOT NULL, identifier text, pe...
true
19041247dc543cffa3781e6a0f8377c5a493d099
SQL
rk-nu/TableTennis
/DatabaseScripts/pingpong.sql
UTF-8
501
2.765625
3
[]
no_license
CREATE SCHEMA `pingpong` ; CREATE TABLE pingpong.`player` ( `id` INT PRIMARY KEY AUTO_INCREMENT, `playerName` VARCHAR(50) NOT NULL, `win` INT DEFAULT '0', `loss` INT DEFAULT '0' ) COLLATE='utf8_general_ci' ENGINE=InnoDB ; insert into pingpong.player values(1,"Ram", 0 , 0); insert into pingpong.player values(2...
true
9acf1d1fd8aea429ec010f569257c7caa3e87013
SQL
mobileworkspace/youthleague
/others/youthleague.sql
UTF-8
6,137
3.375
3
[]
no_license
/* Navicat MySQL Data Transfer Source Server : conn1 Source Server Version : 50512 Source Host : localhost:3306 Source Database : youthleague Target Server Type : MYSQL Target Server Version : 50512 File Encoding : 65001 Date: 2013-06-19 16:02:18 */ SET FOREIGN_KEY_CHECKS=0; -- --...
true
f7883e0ebaf154c9640ffc3cc01fbd79769bc5e7
SQL
geruetzel/wuzzlerliga
/wuzzeln.sql
UTF-8
2,907
3.109375
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 3.4.11.1deb2+deb7u1 -- http://www.phpmyadmin.net -- -- Host: localhost -- Generation Time: Feb 26, 2015 at 05:38 PM -- Server version: 5.5.40 -- PHP Version: 5.4.35-0+deb7u2 SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHAR...
true
59e2cea91e382c677685fe19a7d89fa2ab03edc1
SQL
jdrew1303/sqlgenerate
/test/sql/expressions/expression-grouping-1.sql
UTF-8
110
2.65625
3
[ "MIT" ]
permissive
CREATE INDEX bees.hive_state ON hive (happiness ASC, anger DESC) WHERE ((anger != null) AND NOT happiness);
true
774526b1fb5408581227c06d8f35b012c861f8a7
SQL
MikhailovOlegM/auto_scan
/src/main/resources/templates/script.sql
UTF-8
749
3.65625
4
[]
no_license
DROP TABLE IF EXISTS user; DROP TABLE IF EXISTS filter; DROP TABLE IF EXISTS viewed_history; CREATE TABLE IF NOT EXISTS user( id INT(6) AUTO_INCREMENT PRIMARY KEY, user_name VARCHAR(100) NOT NULL UNIQUE, first_name VARCHAR(100) ); CREATE TABLE IF NOT EXISTS filter( id INT(6) AUTO_INCREMENT PRIMARY KEY, user_id INT(...
true
bbce6fc6eb98519513ad670e3d389465cf8afbda
SQL
silence-do-good/stress-test-Postgres-and-MySQL
/dump/low/day18/select0711.sql
UTF-8
178
2.625
3
[]
no_license
SELECT timeStamp, temperature FROM ThermometerOBSERVATION o WHERE timestamp>'2017-11-17T07:11:00Z' AND timestamp<'2017-11-18T07:11:00Z' AND temperature>=28 AND temperature<=62
true
903a01b795404c6c9f41264547c86de759dff5c2
SQL
Jafet6/Jafet6.github.io
/back-end/my-sql/exercises/21_1/exercises10.sql
UTF-8
572
3.4375
3
[]
no_license
SELECT * FROM hr.employees; SET SQL_SAFE_UPDATES=0; SELECT job_id, GROUP_CONCAT(employee_id, ' ') FROM hr.employees GROUP BY job_id; UPDATE hr.employees SET phone_number = REPLACE(phone_number, '124', '999') WHERE phone_number LIKE '%124%'; SELECT * FROM hr.employees WHERE LENGTH(first_name) >= 8; UPDATE hr.empl...
true
ad6ea9d22113546fe6784cb364d0555054a1e551
SQL
brian-campbell-said-mba18/video_69
/69_sql.sql
UTF-8
2,423
4.21875
4
[]
no_license
USE mavenfuzzyfactory; CREATE TEMPORARY TABLE IF NOT EXISTS temp AS WITH sessions_cte AS ( SELECT DATE(created_at) AS the_date , HOUR(created_at) AS the_hour , CASE WHEN WEEKDAY(created_at) = 0 THEN 1 ELSE NULL END AS mon , CASE WHEN WEEKDAY(created_at) = 1 T...
true
b98003f16665dc19edb66fee0b42c3dc2becea24
SQL
cgoIT/grails-formula-bug
/grails-app/sqlviews/sql/view.sql
UTF-8
172
3.0625
3
[]
no_license
CREATE OR REPLACE VIEW person_project_vw AS SELECT COUNT(*) prj_cnt, id as pers_id FROM person_project pp, person pe WHERE pp.person_id = pe.id GROUP BY id;
true
3cfc57184806a2e2bbeb4a1a979520cd99c7dd9b
SQL
drtheuns/MDTeam26
/11-06-2016.sql
UTF-8
4,315
3.671875
4
[]
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='TRADITIONAL,ALLOW_INVALID_DATES'; -- ----------------------------------------------------- -- Schema mydb -- -...
true
a5c7373f546b0ee7d3429830d3429c3be76a1819
SQL
syliano/Queries
/Queries/CreationIndex.sql
UTF-8
412
3.265625
3
[]
no_license
use DWH_PRD; with cte as ( select 'Create index [IX_' + t.name +'] on ['+SCHEMA_NAME(t.schema_id)+'].['+t.name+']('+ STUFF( ( SELECT ',[' + name+']' from sys.columns c where c.object_id = t.object_id AND (c.name LIKE '%_ID' or c.name like '%_BK') for XML PATH('') ) ,1,1,'')+')' as cmd FROM sys.tabl...
true
05c721295089271223597b61e096a0a9d4610e1f
SQL
herbertcordeiro/roteiros-bd
/lista2.sql
UTF-8
2,015
4.5
4
[]
no_license
--a) SELECT DISTINCT funcionario.nome, cidade.nome FROM funcionario JOIN cidade ON funcionario.naturalidade = cidade.codigo JOIN pedido ON funcionario.codigo = pedido.vendedor JOIN itens ON pedido.codigo = itens.pedido JOIN produto ON produto.codigo = itens.produto WHERE produto.nome = 'Liquidificador' --b) SE...
true
b1b8cdf7df2f1d34f46c58a2b0121d702ecbb936
SQL
iservng/bluemark-school-app
/sql/corectedorderinfo.sql
UTF-8
267
3.0625
3
[]
no_license
DELIMITER $$ CREATE PROCEDURE orders_get_order_info(IN inOrderId INT) BEGIN SELECT order_id, total_amount, created_on, shipped_on, status, comments, customer_name, shipping_address, customer_email FROM orders WHERE order_id = inOrderId; END $$ DELIMITER ;
true
ee5a358e7de6d5d956d73db2001f561aa275ef81
SQL
wllfl/scripts-SQLServer
/Migração GUIA/Insert_Cadastros.sql
UTF-8
720
2.984375
3
[]
no_license
/* Limpando registros e resetando IDENTITY */ TRUNCATE TABLE saoroque.dbo.cadastro /* Desligando campos IDENTITY */ SET IDENTITY_INSERT saoroque.dbo.cadastro ON INSERT INTO saoroque.dbo.cadastro ( id ,nome_empresa ,cnpj ,cep ,endereco ,numero ,complemento ,bairro ,cidade ,email_empresa , telefone_empresa ,telefone_o...
true
18b17de65deb47e47d4c9f2e49659a1c74fc7e0e
SQL
manniru/ecommerce
/sql1.sql
UTF-8
461
2.53125
3
[]
no_license
CREATE TABLE IF NOT EXISTS users (id INTEGER PRIMARY KEY AUTOINCREMENT, username TEXT, password TEXT, role TEXT, fullname TEXT, mobileno TEXT, email TEXT, cctype TEXT, ccname TEXT, ccno TEXT); CREATE TABLE IF NOT EXISTS products (id INTEGER PRIMARY KEY AUTOINCREMENT, category TEXT, name TEXT, price INTEGER, qty INTEGE...
true
d3e1635bb58a9f1b9dd0e84cc44ea1217bf0534f
SQL
igor-fortaleza/myrepository
/Codes/web-php/Banco de dados - appinventor/app_php/root/acaidacerta_7.2/loja.sql
UTF-8
5,335
3.171875
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.0.4.2 -- http://www.phpmyadmin.net -- -- Máquina: localhost -- Data de Criação: 06-Jun-2018 às 22:55 -- Versão do servidor: 5.6.13 -- versão do PHP: 5.4.17 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIE...
true
a06e62f4ea0d93aebd8b48bd0517fb5877c72a6d
SQL
AlisherKKK/Leetcode
/182.duplicate-emails.sql
UTF-8
243
2.703125
3
[]
no_license
-- -- @lc app=leetcode id=182 lang=mysql -- -- [182] Duplicate Emails -- -- @lc code=start # Write your MySQL query statement below select distinct p1.Email from Person p1, Person p2 where p1.id!=p2.id AND p1.Email=p2.Email -- @lc code=end
true
62706a1fce431004cc82383e27158cda527709da
SQL
TonyKartony/BI-Lab-2017
/_0. DWH/Projects/Aliaksandr_Labayeu/dwso/system/USERS_SYS.sql
UTF-8
688
2.78125
3
[]
no_license
-- USERS DROP USER sa_src CASCADE; DROP USER bl_cl CASCADE; DROP USER bl_3nf CASCADE; DROP USER bl_cl2 CASCADE; DROP USER dwh CASCADE; -- sa_src CREATE USER sa_src IDENTIFIED BY 123456; GRANT CREATE ANY DIRECTORY TO sa_src; GRANT CONNECT TO sa_src; GRANT CREATE TABLE TO sa_src; GRANT CREATE ANY SYNONYM TO sa_src; ALTE...
true
b12c4a635c6300301e5445e5ee3613bc1e4de163
SQL
DGov1234/Harmony
/main/App/Database/adhocSql/Intake/IntakeFixes/CorrectTechOpsTrainingType.sql
UTF-8
585
2.671875
3
[]
no_license
BEGIN TRAN T SELECT DISTINCT TechOpsTraining, TechOpsTrainingType FROM ReleaseRequest SELECT LastSyncDate, TechOpsTraining, TechOpsTrainingType FROM ReleaseRequest ORDER BY LastSyncDate UPDATE ReleaseRequest SET TechOpsTrainingType = TechOpsTraining WHERE LastSyncDate IS NULL OR (TechOpsTrainingTy...
true
8f888ac70113592ffa478ca44e3bfe2e3bef221a
SQL
NCULiXiaobin/Hello-world
/基于二维码的高校学生课堂签到系统的设计与实现/WebOffice/src/schame/Teacher.sql
UTF-8
835
3.046875
3
[]
no_license
DROP DATABASE IF EXISTS signdb; CREATE DATABASE signdb DEFAULT CHARACTER SET utf8; USE signdb; ##创建教师信息表 DROP TABLE IF EXISTS t_teacher; CREATE TABLE t_teacher( teacher_id INT NOT NULL AUTO_INCREMENT PRIMARY KEY , teacher_account INT NOT NULL , teacher_password VARCHAR(30) NOT NULL DEFAULT 123456, teacher_name...
true
f4875c168eeeb36becc91a0534084c13f70a3322
SQL
sanmuganathan78/ajax_crud_datatables
/crud.sql
UTF-8
713
2.890625
3
[ "MIT", "LicenseRef-scancode-unknown-license-reference" ]
permissive
CREATE TABLE IF NOT EXISTS `persons` ( `id` int(11) NOT NULL AUTO_INCREMENT, `firstName` varchar(255) NOT NULL, `lastName` varchar(255) NOT NULL, `gender` varchar(255) NOT NULL, `address` varchar(255) NOT NULL, `dob` date NOT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREME...
true