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
4907500a107dfd3e8caa0f771a552fc17e76e9a3
SQL
reference-project/php
/qf_php.sql
UTF-8
13,159
2.921875
3
[ "Apache-2.0" ]
permissive
-- phpMyAdmin SQL Dump -- version 4.4.15.6 -- http://www.phpmyadmin.net -- -- Host: localhost -- Generation Time: 2017-08-22 15:59:48 -- 服务器版本: 5.5.48-log -- PHP Version: 7.0.7 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101...
true
3cef4d7b0a71b694c54449e7827b394ac9cd5e46
SQL
ka10a/DIHT
/DataBases/SQL/097.SQL
UTF-8
393
3.734375
4
[]
no_license
SELECT code, speed, ram, price, screen FROM Laptop WHERE EXISTS(SELECT 1 x FROM ( SELECT v, RANK() OVER(ORDER BY v) rn FROM ( SELECT CAST(speed AS FLOAT) AS sp, CAST(ram AS FLOAT) AS rm, CAST(price AS FLOAT) AS pr, CAST(screen AS FLOAT) AS sc )l UNPIVOT(v FOR c in (sp, rm, pr, sc))u )l PIVOT(MAX(v) FOR rn in ([1]...
true
8d402278dd8bfcb1b48fc401fdee4f4be6bddcfc
SQL
ashishUTD/AirlineReservationSystem
/sqldump/airline_management_air_flight.sql
UTF-8
2,698
3
3
[]
no_license
CREATE DATABASE IF NOT EXISTS `airline_management` /*!40100 DEFAULT CHARACTER SET utf8 */; USE `airline_management`; -- MySQL dump 10.13 Distrib 5.7.17, for Win64 (x86_64) -- -- Host: localhost Database: airline_management -- ------------------------------------------------------ -- Server version 5.7.19-log...
true
0e44c25a5783eb974ae75e3a8f8d3872f57dcf9b
SQL
jreidmke/jobly
/data.sql
UTF-8
1,506
3.8125
4
[]
no_license
\c jobly DROP TABLE IF EXISTS companies CASCADE; DROP TABLE IF EXISTS jobs CASCADE; DROP TABLE IF EXISTS users CASCADE; CREATE TABLE companies( handle TEXT PRIMARY KEY, name TEXT NOT NULL UNIQUE, num_employees INT, description TEXT, logo_url TEXT ); CREATE TABLE jobs( id SERIAL PRIMARY KEY, ...
true
c3b0acdd9549203679ddb30b0a11d555b4f7ffcc
SQL
gaFregatto/5COP009
/ListaConsultas-S19/ex14.sql
UTF-8
245
3.03125
3
[]
no_license
SELECT disciplina.nome_disc, disc_prereq.nome_disc AS disc_prereq FROM disciplina NATURAL LEFT JOIN prereq LEFT JOIN disciplina AS disc_prereq ON disc_prereq.cod_depto = prereq.cod_depto_prereq AND disc_prereq.num_disc = prereq.num_disc_prereq;
true
d579776ffb86903acbd88ae4361c24c4eb24d8e0
SQL
JoannaScibor/PHP-Wstawianie-danych-do-bazy
/pacjenci.sql
UTF-8
2,757
2.6875
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.9.0.1 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Czas generowania: 24 Cze 2019, 22:07 -- Wersja serwera: 10.3.16-MariaDB -- Wersja PHP: 7.3.6 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHA...
true
3ca7c498a222ae18d87beddd4a5a81218c7c9cfb
SQL
sbabenko/teamSix
/fireM2/adminTools/data_deletion.sql
UTF-8
728
2.65625
3
[]
no_license
# Team Name: FIRE^2 (First Responder Framework Improvement Researchers) # Product Name: FIRE-M^2 (First Responder Mission Management) # File Name: data_deletion.sql # # Date Last Modified: November 16, 2018 (Aditya Kaliappan) # # Copyright: (c) 2018 by FIRE^2 # and all corresponding participants which include: # Aditya...
true
4aa3819bf541112fa4bcbbfd6858b972d725435c
SQL
JohnsonZZ/storehouse
/huachuang.sql
UTF-8
4,514
3.109375
3
[]
no_license
-- phpMyAdmin SQL Dump -- version phpStudy 2014 -- http://www.phpmyadmin.net -- -- 主机: localhost -- 生成日期: 2016 年 06 月 20 日 11:41 -- 服务器版本: 5.5.47 -- PHP 版本: 5.3.29 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_CHARA...
true
e4ab30656a916f83bc8a9bbe88935dc781c86ee4
SQL
QuentDa/Blog
/sql/blog.sql
UTF-8
7,479
3.328125
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.7.7 -- https://www.phpmyadmin.net/ -- -- Hôte : localhost -- Généré le : jeu. 01 fév. 2018 à 11:33 -- Version du serveur : 5.7.20-18-log -- Version de PHP : 7.1.11 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 ...
true
60dd752819f36a1541425fc78881865a5fdd5a6b
SQL
ntserver2003/SQLScripts
/ExtendedProperties/Primary-keys.sql
UTF-8
544
4.03125
4
[]
no_license
SELECT 'Primary Key' AS PropertyType ,SCH.name AS SchemaName ,TBL.name AS TableName ,SKC.name AS PrimaryKeyName ,SEP.name AS DescriptionType ,SEP.value AS DescriptionDefinition ,TBL.object_id AS TableObjectID ,SKC.object_id AS SubObjectID FROM sys.tables TBL INNER JOIN sys.schemas SCH ON TBL.schema_id =...
true
e984909475870f886c53ca80884241d059120023
SQL
CUBRID/cubrid-testcases
/sql/_13_issues/_12_2h/cases/bug_bts_7187.sql
UTF-8
6,028
3.984375
4
[ "BSD-3-Clause" ]
permissive
set system parameters 'create_table_reuseoid=no'; --TEST: 'Accessing deleted object error' occurs when creating a trigger with delete action on 'before update' event. autocommit off; --original scenario drop table if exists t1; create table t1(a int); insert into t1 values(1), (2), (3), (4); create trigger trigg1 b...
true
1ccc1a80831483d86132bcff91e2204502e6bf69
SQL
BottleMoon/Assignment
/DataBase/SQL HW#2/제출 과제/9.sql
UTF-8
141
3.09375
3
[]
no_license
SELECT studioName, COUNT(distinct producerNo) FROM Movie, MovieExec WHERE certNo=producerNo GROUP BY studioName Having AVG(netWorth)>1000000;
true
cfe6d37e1d6b1f06c3f59f3a189311572125cdef
SQL
CSE6242/IBicgicBackend
/all_sql_code.sql
UTF-8
14,229
3.546875
4
[]
no_license
use testyuhao; CREATE TABLE Bike ( tripDuration int NOT NULL, startTime datetime, stopTime datetime, startStationId int NOT NULL, startStationName varchar(255) NOT NULL, startStationLatitude float NOT NULL, startStationLongitude float NOT NULL, endStationId int NOT NULL, endStationN...
true
d8de1f5fd4b96fcfea8e3a827359c649d68f43cd
SQL
diocaponi/Estudos
/SQL/TSQL/COMANDOS_DEMO.sql
UTF-8
560
3
3
[]
no_license
-- Exclui a coluna ID_Autor ALTER TABLE LIVRO DROP COLUMN ID_Autor -- Adiciona coluna ID_Autor, em seguida a transforma em chave estrangeira que faz -- referencia a tabela AUTORES ALTER TABLE LIVRO ADD ID_Autor SMALLINT NOT NULL CONSTRAINT fk_ID_Autor FOREIGN KEY (ID_Autor) REFERENCES AUTORES -- Adici...
true
ce1b363e6f8e2928c902a81e54671022a740c4cc
SQL
dbarrett24/DevMountain
/First-Time/week6/day3/massive-demo/db/getAllIncidents.sql
UTF-8
408
3.671875
4
[]
no_license
select incidents.id, incidents.us_state, injuries.name as injury_name, affected_areas.name as affected_area_name, causes.name as cause_name from incidents join injuries on injuries.id = incidents.injury_id join affected_areas on injuries.affected_area_id = affected_areas.id join causes on causes.id ...
true
e47ed4710ff47ce65e0a4dba62b60519f796b0e2
SQL
sd20i/db_database_docs
/sql_scripts/DatabaseSetup.sql
UTF-8
10,262
2.921875
3
[]
no_license
CREATE DATABASE IF NOT EXISTS `carBuilder` /*!40100 DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci */ /*!80016 DEFAULT ENCRYPTION='N' */; USE `carBuilder`; -- MySQL dump 10.13 Distrib 8.0.15, for macos10.14 (x86_64) -- -- Host: 127.0.0.1 Database: carBuilder -- -------------------------------------------...
true
2422d90ff81b3e14f7d8e4dc42cc5e8651e3521c
SQL
teeencho/predi
/db_dump/users.sql
UTF-8
1,362
2.578125
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.9.7 -- https://www.phpmyadmin.net/ -- -- Servidor: localhost:3306 -- Tiempo de generación: 08-02-2023 a las 23:49:59 -- Versión del servidor: 10.3.38-MariaDB -- Versión de PHP: 7.4.33 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00...
true
2663f66ae327dd0b376fc1dd0bd33cf86e76c22e
SQL
qqsmko/mohrss_edp
/edp-core/src/main/resources/sql/tbl_indicator_statistics.sql
UTF-8
1,278
3.4375
3
[]
no_license
DROP TABLE IF EXISTS "public"."tbl_indicator_statistics"; CREATE TABLE "public"."tbl_indicator_statistics" ( "id" serial, "indicator_type" varchar(32) COLLATE "default" DEFAULT ''::character varying NOT NULL, "indicator_name" varchar(32) COLLATE "default" DEFAULT ''::character varying NOT NULL, "cycle_time" varchar(32...
true
2d97e81cfa2e4e3448b19e8f7158770d829e8921
SQL
HenryYuen128/SSH_note-project
/SSH部门员工管理项目/ssh_employee.sql
UTF-8
2,428
3.46875
3
[]
no_license
/* Navicat MySQL Data Transfer Source Server : Demo1 Source Server Version : 50720 Source Host : localhost:3306 Source Database : ssh_employee Target Server Type : MYSQL Target Server Version : 50720 File Encoding : 65001 Date: 2017-12-17 18:01:28 */ SET FOREIGN_KEY_CHECKS=0; -- ...
true
d6d94b80b85841125c47895569263c67f97dc9f6
SQL
NikolaevaKO/ComicsLibrary
/src/main/resources/database/initDB.sql
UTF-8
331
3
3
[]
no_license
--DROP TABLE IF EXISTS authors; --DROP SEQUENCE IF EXISTS authors_id_seq; CREATE TABLE IF NOT EXISTS authors ( id INTEGER PRIMARY KEY , nickname VARCHAR(200) NOT NULL , name VARCHAR(200), country VARCHAR(200), description VARCHAR(1000) ); CREATE SEQUENCE authors_id_seq START WITH 4 INCR...
true
37cbf984bd4c927f5f1c30bad4bdf3f59a133296
SQL
tarou-tokumasu/SQLdrill
/chapter4-null.sql
UTF-8
258
2.546875
3
[]
no_license
create table ta1(c1 varchar(200) , c2 int); insert into ta1(c2) values(1); insert into ta1(c1,c2) values(null,2); insert into ta1(c1,c2) values('NULL' , 3); insert into ta1(c1,c2) values('' , 4); select * from ta1 ; select length(c1),c2 from ta1 ;
true
00bcf1bf6a2edd06406addd79c2df32ec59270aa
SQL
bnbasilio/holbertonschool-higher_level_programming
/0x0D-SQL_introduction/11-best_score.sql
UTF-8
209
3.578125
4
[]
no_license
-- lists all records with a score >= 10 in the table second_table -- displays both the score and the name (records ordered by score) SELECT score, name FROM second_table WHERE score >= 10 ORDER BY score DESC;
true
e14721bf55a15dfaf1f4ab444b64a9e6b598b8a6
SQL
anh309/Java_SOAP_webservice_project
/QuanLySinhVien.sql
UTF-8
18,626
3.359375
3
[]
no_license
create database QuanLySinhVien ON PRIMARY( NAME=QuanLySinhVien, FILENAME='D:\DB\QuanLySinhVien.mdf', SIZE=10MB, MAXSIZE=unlimited, FILEGROWTH=20% ) LOG ON( NAME=QuanLySinhVienLog, FILENAME='D:\DB\QuanLySinhVien.ldf', SIZE=5MB, MAXSIZE=unlimited, FILEGROWTH=1MB ) use QuanLySinhVien create table MonHoc( MMH...
true
bbd0ce7578ad29492f564a459546f3f75beb7f5f
SQL
edson-dev/flask-vue
/wotv/dump-postgres-202010302049.sql
UTF-8
2,363
2.765625
3
[]
no_license
-- -- PostgreSQL database dump -- -- Dumped from database version 12.2 (Debian 12.2-2.pgdg90+1) -- Dumped by pg_dump version 12.2 -- Started on 2020-10-30 20:49:13 SET statement_timeout = 0; SET lock_timeout = 0; SET idle_in_transaction_session_timeout = 0; SET client_encoding = 'UTF8'; SET standard_conforming_strin...
true
c904795361c1969197b558e4ba370599e8b4afb7
SQL
bstano/ProjectQueries
/how many at each station.sql
UTF-8
84
2.890625
3
[]
no_license
select start_station, count(*) trip_count from trips group by start_station
true
a83e1ac7f853a034f86b1263119d8d9475dc699a
SQL
lecaillon/Evolve
/test/Evolve.Tests/Integration/PostgreSQL/Resources/Sql_Scripts/OutOfOrder/V1_5__create_table.sql
UTF-8
146
2.546875
3
[ "MIT" ]
permissive
-- Create table out_of_order CREATE TABLE out_of_order ( did integer PRIMARY KEY, name varchar(40) NOT NULL CHECK (name <> '') );
true
bcb10be5ad5c3c5cfe596e66a2db80a212765ff9
SQL
boyangwang/fragen
/src/private/schema.sql
UTF-8
7,498
3.875
4
[]
no_license
SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0; SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0; SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='TRADITIONAL,ALLOW_INVALID_DATES'; CREATE SCHEMA IF NOT EXISTS `laughing_avenger` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci ; USE `laughing_av...
true
a6cd0a737a0a1af7cb5ab42cebf55216f71079d3
SQL
ntudor11/DBExercises
/imdb/queries.sql
UTF-8
5,404
4.4375
4
[]
no_license
-- 1. a. The person relation contains 573 entries with a registered height greater than 190 centimetres. How many entries do not have a registered height? select count(*) from person where height > 190; -- test select count(*) from person where height is null; -- result: 47315 -- 1. b. In the database, there are 365...
true
379057cd2f1751cc3e6674b24b6633dd7ad39bea
SQL
Adrici/BancoDeDadosMySQL
/introducao_MySQL/aula 25-09_ex3.sql
UTF-8
1,749
4.15625
4
[]
no_license
create database aula_select; use aula_select; create table clientes ( codigo_cliente int not null primary key, nome varchar (50), cidade varchar (10), serie char (1) ); CREATE table funcionarios ( id int not null auto_increment, nome varchar(30) NOT NULL, nascimento date, sexo enum ('M','F'), peso decimal(5,...
true
c2a2be390ac9774c651c07b7549bea7048cc48fc
SQL
zhjzjnb/sdk-server
/sdkserver.sql
UTF-8
2,091
3.1875
3
[ "MIT" ]
permissive
/* Navicat Premium Data Transfer Source Server : localhost Source Server Type : MySQL Source Server Version : 50635 Source Host : localhost Source Database : sdkserver Target Server Type : MySQL Target Server Version : 50635 File Encoding : utf-8 Date: 01/27/2018 14:03...
true
a274d404540a393a647fec68a325c802633a6e2e
SQL
r99r99r99/shdb
/db/table/aiot/beach/aiot_beach_threshold.sql
UTF-8
1,016
3.15625
3
[]
no_license
/* Navicat MySQL Data Transfer Source Server : 192.168.10.80 Source Server Version : 50713 Source Host : 192.168.10.80:3306 Source Database : ytsocean Target Server Type : MYSQL Target Server Version : 50713 File Encoding : 65001 Date: 2018-06-27 15:49:07 */ SET FOREIGN_KEY_CHECKS...
true
6c506a61a418ef0c70a4e06f1f164bbfed168cd7
SQL
n1ghtcr4wl3r26/4ct1v0s_db
/ACTIVOS_OWA_SYLK_ddl.sql
UTF-8
7,252
3.140625
3
[]
no_license
CREATE OR REPLACE PACKAGE owa_sylk as -- type owaSylkArray is table of varchar2(2000); -- procedure show( p_file in utl_file.file_type, p_query in varchar2, p_parm_names in owaSylkArray default owaSylkArray(), p_parm_values in owaSylkArray default owaSylkArray(), ...
true
0eeff9cef3730867c97a604c2e55a1472619b556
SQL
jaeeun-jung/dbSql
/20200422.sql
UHC
3,959
3.484375
3
[]
no_license
date ǽ fn3] ڿ => ¥ ==> ¥ ==> TO_DATE('201912', 'YYYYMM') SELECT TO_DATE(:YYYYMM, 'YYYYMM'), LAST_DAY(TO_DATE(:YYYYMM, 'YYYYMM')), TO_CHAR(LAST_DAY(TO_DATE(:YYYYMM, 'YYYYMM')), 'DD') FROM dual; EXPLAIN PLAN FOR SELECT * FROM emp WHERE empno = '7369'; ...
true
0c6607ed1b6482c7cbc7c61ce09effcc64e19c71
SQL
dakar24/basjoo-doc
/sql/receive_address_info.sql
GB18030
824
2.9375
3
[]
no_license
CREATE TABLE `receive_address_info` ( `address_id` varchar(64) NOT NULL COMMENT 'ַID', `user_id` varchar(64) NOT NULL COMMENT 'ûID', `receiver` varchar(64) NOT NULL COMMENT 'ռ', `tel` varchar(64) DEFAULT NULL COMMENT 'ϵ绰', `section` varchar(256) DEFAULT NULL COMMENT 'ڵ', `street` varchar(256) DEFAULT NULL C...
true
b79e1518c4b8db8bf817f05f30daca3ba6d62639
SQL
mila89/Database-MSSQL
/IndicesandDataAggregation/4. SmallestDepositGroupPerMagicWandSize.sql
UTF-8
149
2.984375
3
[]
no_license
SELECT TOP(2) DepositGroup from (select DepositGroup, AVG(MagicWandSize) AS M FROM WizzardDeposits GROUP BY DepositGroup) as d ORDER BY d.m;
true
e9ecb254933cbc66e01d54e37c89529501c2a891
SQL
Team100/Scouting2016
/Server/WebServer/admin/data/compsystem-tables.sql
UTF-8
26,436
3.796875
4
[]
no_license
# # $Revision: 3.0 $ # $Date: 2016/03/14 23:00:02 $ # $Id$ # # Red Rock Robotics, WildHats, Verkler # Competition System Table Schema # # Notes: # - creates all tables for a new instance of the competition system # # - if you modify a table, make _sure_ the modification is also made in this schema # # - to execute, ...
true
29f8c6b5f48a78c946010c425b3dd6cd6e601b9e
SQL
whdydgkr7/proj
/Volume/src/main/webapp/resources/volume.sql
UTF-8
4,914
3.09375
3
[ "MIT" ]
permissive
/* Drop Tables */ DROP TABLE eChat CASCADE CONSTRAINTS; DROP TABLE eComment CASCADE CONSTRAINTS; DROP TABLE eEntry CASCADE CONSTRAINTS; DROP TABLE eBBS CASCADE CONSTRAINTS; DROP TABLE pComment CASCADE CONSTRAINTS; DROP TABLE pEntry CASCADE CONSTRAINTS; DROP TABLE pReview CASCADE CONSTRAINTS; DROP TABLE pBBS...
true
4336ea094efa1a26f3c832f4eaf6b82521cec33d
SQL
VTracyHuang/SpringBoot-multiDatasource
/SpringBoot-mybatis/src/main/resources/sql/t_user.sql
UTF-8
642
2.609375
3
[]
no_license
/* Navicat MySQL Data Transfer Source Server : 127.0.0.1 Source Server Version : 50717 Source Host : 127.0.0.1:3306 Source Database : test Target Server Type : MYSQL Target Server Version : 50717 File Encoding : 65001 Date: 2018-04-12 13:33:39 */ SET FOREIGN_KEY_CHE...
true
356fced7b487ee8055c1fef7f5af3813ea2b1496
SQL
mshoop/Yelp-Database-Search
/ParseYelpData/UPDATE.sql
UTF-8
599
4.0625
4
[]
no_license
--CHECKIN --UPDATE UPDATE business SET numcheckins = table2.checkinsum FROM business B INNER JOIN (SELECT checkin.business_id, sum(count) AS checkinsum FROM checkin GROUP BY checkin.business_id) AS table2 ON B.business_id = table2.business_ID WHERE table2.business_ID = business.business_ID --REVIEWCOUNT (TIP COU...
true
4dc90845e456c6c90be31993372ab5e8fc4c657c
SQL
MLGB3/mlgb.cron
/index/update_index_entry_copies.sql
UTF-8
5,306
3.203125
3
[ "Apache-2.0" ]
permissive
-- Add decodes of flags embedded in the copy codes update index_entry_copies set survives_yn = 'y' where copy_code like '%*%' \p\g update index_entry_copies set printed_yn = 'y' where copy_code like '%{P}%' \p\g update index_entry_copies set uncertain_yn = 'y' where copy_code like '%{+}%' \p\g update index_entry_co...
true
56657b925eb54070cd000c4933893c93c2d1b9cd
SQL
MukulKolpe/almanac.httparchive.org
/sql/2021/page-weight/pageweight_by_header_body.sql
UTF-8
269
2.515625
3
[ "Apache-2.0" ]
permissive
SELECT _TABLE_SUFFIX AS client, AVG(reqHeadersSize) / 1024 AS request_header_size, AVG(respHeadersSize) / 1024 AS response_header_size, AVG(respBodySize) / 1024 AS response_body_size FROM `httparchive.summary_requests.2021_07_01_*` GROUP BY client
true
3d5602c9de6308d39f4456a0609f72855560c0df
SQL
rastaayoub/hitskart
/u276455193_hits.sql
UTF-8
100,962
2.96875
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 3.5.2.2 -- http://www.phpmyadmin.net -- -- Host: localhost -- Generation Time: Nov 26, 2015 at 05:20 AM -- Server version: 10.0.20-MariaDB -- PHP Version: 5.2.17 SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_C...
true
a21a8cf90d95ef329e60e824c570da594a92c87a
SQL
hobos/baosuzhai
/server/build/com.zizibujuan.drip.server.sql/mysql/TABLE/FOREIGN_KEY.sql
UTF-8
578
2.9375
3
[]
no_license
ALTER TABLE `drip`.`DRIP_EXERCISE` ADD constraint FK_EXERCISE_USER FOREIGN KEY (CRT_USER_ID) REFERENCES `drip`.`DRIP_USER_INFO` (`DBID` ) ALTER TABLE `drip`.`DRIP_ANSWER` ADD constraint FK_ANSWER_USER FOREIGN KEY (CRT_USER_ID) REFERENCES `drip`.`DRIP_USER_INFO` (`DBID` ) ALTER TABLE `drip`.`DRIP_ANSWER` ...
true
fc87ca00559d9c6ef3aba84fd4cb9ed3be58dea4
SQL
Kenyda/flibusta_server
/source/sql/author_search.sql
UTF-8
1,193
4.0625
4
[ "Apache-2.0" ]
permissive
WITH filtered_authors AS ( SELECT * FROM author, plainto_tsquery($1) f_query WHERE EXISTS (SELECT * FROM bookauthor RIGHT JOIN book ON bookauthor.book_id = book.id WHERE book.lang = ANY ($2::text[]) AND bookauthor.author_id = author.id) AND author.search_content @@ f_query ) SELECT json_...
true
4b16ea911b1ddbcde74c7dcf1c91f38ac39c56b8
SQL
esti-leroy/sql
/src/Task4.sql
UTF-8
1,318
3.34375
3
[]
no_license
DECLARE nEmpID hr.employees.employee_id%TYPE := &Номер_сотрудника; nOldSalary hr.employees.salary%TYPE; nNewSalary hr.employees.salary%TYPE; sFirstName hr.employees.first_name%TYPE; sLastName hr.employees.last_name%TYPE; dHireDate hr.employees.hire_date%TYPE; nYears number(4, 0); BEGIN S...
true
ec09ca93d536bfdb74be1957511abd284c8a5647
SQL
rcFlechas/Script_SQL
/SERVICIO_CLIENTE_CONSULTAS_POR_VENDEDOR.sql
UTF-8
993
3.609375
4
[]
no_license
-- REPORTE RUTA DIARIA POR VENDEDOR SELECT R.codigoCliente, R.numeroFactura, R.idtipoDeMovimiento, R.nombreDeCliente, R.direccion, R.nombresConductor, E.celularCorporativo, R.nombreCausalDeRechazo FROM rutero R, empleados E WHERE R.estadoManifiesto = '3' AND R.vendedor = 'VARON CABRERA ROSSIE' AND E.cedula = R.conduct...
true
1deccbc5d3e4e16e5281bd7ce1bd988c958ba4a7
SQL
cherotwokibet/sqltrials
/mosh/outer_join.sql
UTF-8
167
3.21875
3
[]
no_license
USE sql_store; SELECT c.customer_id, c.first_name, o.order_id FROM orders o RIGHT JOIN customers c ON c.customer_id = o.customer_id ORDER BY c.customer_id
true
da0436590c97ffbcbb575ff4f8df69ec4425618e
SQL
dipinkp1993/servicefriend
/id12739384_oscm(1).sql
UTF-8
17,343
3
3
[ "MIT" ]
permissive
-- phpMyAdmin SQL Dump -- version 4.9.5 -- https://www.phpmyadmin.net/ -- -- Host: localhost:3306 -- Generation Time: Jun 11, 2020 at 06:10 AM -- Server version: 10.3.16-MariaDB -- PHP Version: 7.3.12 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SE...
true
818548ce6ea7ea02b7f09b198b906721f9f425a7
SQL
YngJian/meeting-room-reservation
/code/service/src/main/resources/sql/meetting-room-resvervation.sql
UTF-8
3,638
3.703125
4
[]
no_license
CREATE SCHEMA IF NOT EXISTS reservation; #########################用户信息表######################### CREATE TABLE `reservation`.`t_user_info` ( `id` int NOT NULL AUTO_INCREMENT COMMENT '主键', `user_id` varchar(32) CHARACTER SET utf8mb4 NOT NULL COMMENT '用户id', `user_...
true
ae0995f90f6564f52fe8bdcc9e7ffb768e16ceff
SQL
SMNGJackob/virmisco
/web/query/scientific-name-record.sql
UTF-8
1,525
3.703125
4
[ "CC0-1.0" ]
permissive
## # @author SednaSoft A. Schaffhirt & A. Wünsche GbR <info@sedna-soft.de> # @version 2015-12-01 (date of last modification) # @since 2015-11-09 (date of creation) # @license https://creativecommons.org/publicdomain/zero/1.0/ CC0-1.0 ## # id # organismId # validNameId # higherTaxa # genus # subgenus # specificEpithet #...
true
c7b6128a57782c5674329db1664fea433fb7ff18
SQL
Jjosimar/ControllerBackup
/Dados/appsuporte.sql
UTF-8
3,442
3.296875
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.7.0 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: 10-Ago-2017 às 22:56 -- Versão do servidor: 10.1.25-MariaDB -- PHP Version: 7.1.7 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD...
true
4cbc768b39ceb45e730ddee056b14c865ad3a962
SQL
jwerderits/MySQL-Project
/sql_class/run_query.sql
UTF-8
1,006
4.46875
4
[]
no_license
-- SELECT -- DATE_FORMAT(created_at, '%W') as day_week, -- count(*) as 'count' -- FROM users -- GROUP BY day_week -- ORDER BY count DESC; -- SELECT -- username, -- count(photos.user_id) as total_pics -- FROM users -- LEFT JOIN photos -- ON photos.user_id = users.id -- GROUP BY username -- HAVING ...
true
fee40eaac88f75455e016ce9fe42912d5aefe686
SQL
slickhoss/CSharp-Library-App
/CreateAccountTable.sql
UTF-8
279
2.53125
3
[]
no_license
CREATE TABLE Account (userId INT NOT NULL PRIMARY KEY IDENTITY(1,1),email VARCHAR(255), userLogin VARCHAR(255), password VARCHAR(255)); ALTER TABLE Account ALTER COLUMN password NVARCHAR(255) COLLATE Latin1_General_CS_AS ALTER TABLE Account ADD CONSTRAINT userLogin UNIQUE(Name);
true
eb2c724e81e19e0af660b39a617f3def1dbcaf88
SQL
CodeChild/SpringBootDemo
/news.sql
UTF-8
209
2.53125
3
[]
no_license
-- 新闻表 create table `news`( id varchar (32) not null, `title` varchar (256) not null comment '标题', `content` text not null comment '内容', primary key (id) ) comment '新闻表';
true
e41a0a9ad9d4ae079fc507e148cc01421dfeca2f
SQL
TylerWilhelmWD/cs313-php
/web/db.sql
UTF-8
478
3.3125
3
[]
no_license
CREATE TABLE IF NOT EXISTS course ( id SERIAL PRIMARY KEY NOT NULL, name VARCHAR(80) NOT NULL, number VARCHAR(10) NOT NULL ); CREATE TABLE IF NOT EXISTS ta_users ( id SERIAL PRIMARY KEY NOT NULL, username VARCHAR(64) NOT NULL, password VARCHAR(255) NOT NULL ); CREATE TABLE note (id SERIAL PRIMA...
true
bda754b932c6891c41dfc5822a81bb430ca57af5
SQL
JacobVN/GestorComunidadesDAIS
/app/sql.sql
UTF-8
2,028
4.03125
4
[]
no_license
//info propietarios-viviendas-comunidad SELECT c.id_comunidad, v.id_vivienda, v.numero, v.coeficiente, pv.id_propietario, p.nombre, p.apellidos, p.nif from comunidad c join vivienda v on c.id_comunidad = v.comunidad_fk left join prop_vivienda pv on pv.id_vivienda = v.id_vivienda left join propietario p on p.id...
true
01377e84ca0326c81f13ed717767a310edba91d2
SQL
TDeepanshPandey/Library_Management_System
/incrtrigger.sql
UTF-8
520
3.25
3
[]
no_license
CREATE OR REPLACE TRIGGER incr_trigger AFTER INSERT OR UPDATE ON trans FOR EACH ROW BEGIN IF INSERTING THEN UPDATE book SET no_of_books = no_of_books-1 WHERE book_no = :NEW.book_no; UPDATE MEMBER SET no_of_books = no_of_books+1 WHERE mem_no = :NEW.mem_no; ELSIF UPDATING THEN ...
true
fcf430a429c058907864212222c353aad1023a65
SQL
adrian1605/Bank
/db/sql/patch_1.sql
UTF-8
1,542
3.15625
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.2.7.1 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: Oct 30, 2014 at 12:47 PM -- Server version: 5.6.20 -- PHP Version: 5.5.15 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */...
true
0e12094d1bedd1f6139415ee7d1e7f2a54bc6f00
SQL
Bauer312/election-data
/Model/process_index.sql
UTF-8
240
2.765625
3
[ "MIT" ]
permissive
\connect election; set search_path to federal; insert into federal_index select to_date(election_date, 'YYYY-MM-DD'), election_type, state, office, district, to_number(index, '999') from federal_index_raw where election_type = 'general';
true
8e8516b765a2ec715a553487eaae78d9a52f874d
SQL
jkampa3/Homework_9_NodeSQL
/schemaSetup.sql
UTF-8
1,714
3.1875
3
[]
no_license
DROP DATABASE IF EXISTS bamazon; CREATE DATABASE bamazon; USE bamazon; CREATE TABLE products ( item_id INTEGER(10) AUTO_INCREMENT NOT NULL, product_name VARCHAR(40) NOT NULL, department_name VARCHAR(30) NOT NULL, price DECIMAL(10,2) NOT NULL, stock_quantity INTEGER(10) NOT NULL, PRIMARY KEY (item_id) ); INSER...
true
cd885c18282084f04fa7f0c1104140876999ff25
SQL
Viki-Meszaros/CEU-Data_Engineering1
/HW5.sql
UTF-8
796
3.796875
4
[]
no_license
-- Exercise3 -- Create a stored procedure which returns category of a given row. Row number is IN parameter, while category is OUT parameter. Display the returned category. -- CAT1 - amount > 100.000, CAT2 - amount > 10.000, CAT3 - amount <= 10.000 use classicmodels; DROP PROCEDURE IF EXISTS GetCategory; DELIMITER $$...
true
612199ab96371197c884c098eb3e7e0b9e76a11c
SQL
filimonadrian/bd
/test2_lab/recap.sql
UTF-8
4,794
4.03125
4
[]
no_license
-- Sa se afiseze toti angajatii ce au sosit in firma in anul 1981, care au un venit mai mare decat cel al sefului lor, afisand o lista cu antetul : -- Nume angajat, Den departament, Nume sef, Venit angajat, Venit sef, Ultima zi luna angajare -- Venitul lunar este egal cu suma dintre salariu si comision. -- Sa se rezolv...
true
ff69715170de75796f3268b6a7b45551ad3a5699
SQL
iqbalmaed/Iqbalmaed-Arkademy-test
/Soal6.sql
UTF-8
756
3.953125
4
[]
no_license
CREATE DATABASE Gudang; CREATE TABLE Categories( id INTEGER NOT NULL PRIMARY KEY ,name VARCHAR(15) NOT NULL ); INSERT INTO Categories(id,name) VALUES (1,'Peralatan Mandi') ,(2,'Mie Instan') ,(3,'Olahan Daging'); CREATE TABLE Products( id INTEGER NOT NULL PRIMARY KEY ,name VARCHAR(15) ...
true
b6dbd013f7cee04be68a0b75caf538638f995328
SQL
github/vitess-gh
/examples/local/backups/create_customer_schema.sql
UTF-8
288
2.875
3
[ "Apache-2.0" ]
permissive
create table customer( customer_id bigint not null, email varbinary(128), primary key(customer_id) ) ENGINE=InnoDB; create table corder( order_id bigint not null, customer_id bigint, sku varbinary(128), price bigint, primary key(order_id) ) ENGINE=InnoDB;
true
9a172ed0cef3af4404e342e01a059535ea799c15
SQL
RjLi13/Tools
/datasources/botgarden/botgardenMetadataV1dead.sql
UTF-8
5,891
2.84375
3
[]
no_license
select co.id as id, co.objectnumber as AccessionNumber_s, case when (tig.taxon is not null and tig.taxon <> '') then regexp_replace(tig.taxon, '^.*\)''(.*)''$', '\1') end as Determination_s, case when (fc.item is not null and fc.item <> '') then regexp_replace(fc.item...
true
001ae244ecdf119bf7e9318d9082724cfbd1f759
SQL
myarist/Progate
/Languages/SQL/sql_study_2/page4/exercise2.sql
UTF-8
166
2.703125
3
[ "MIT" ]
permissive
/* dapatkan nilai rata-rata dari kolom price dimana nilai character_name adalah "Ninja Ken" */ SELECT AVG(price) FROM purchases WHERE character_name = "Ninja Ken" ;
true
a289a7fb77b51661982d81aa2dbd6050b091d0f9
SQL
Bettdominic/Test-Project
/DBScript.sql
UTF-8
1,355
3.734375
4
[]
no_license
Create Table tblCustomer( CustomerId int IDENTITY(1,1) NOT NULL, Name Varchar(20) NOT NULL, City Varchar(20) NOT NULL, Country Varchar(20) NOT NULL, Gender Varchar(6) NOT NULL ) Create procedure sp_AddCustomer ( @Name VARCHAR(20), @City VARCHAR(20), @Country VARCHAR...
true
394c0b0d569bd141b1ca6913da69918150bdee8f
SQL
kiki128qk/gold
/sql/gold_msg.sql
UTF-8
691
2.75
3
[]
no_license
CREATE TABLE `test`.`gold_msg` (`GOLD_MSG_num` INT(11) NOT NULL AUTO_INCREMENT COMMENT '고유번호' , `GOLD_MSG_name` VARCHAR(20) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '메세지 작성자' , `GOLD_MSG_email` VARCHAR(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '작성자 이메일' , `GOLD_MSG_tit` VARCHA...
true
ea1b1d163dae448c761425595afb134118eb44e5
SQL
l0uvre/Simple-Codes
/SQL/labs/lab2/lab2.sql
UTF-8
5,441
3.859375
4
[]
no_license
-- MySQL Script generated by MySQL Workbench -- Mon Oct 2 18:35:42 2017 -- Model: New Model Version: 1.0 -- MySQL Workbench Forward Engineering -- ----------------------------------------------------- -- Schema mydb -- ----------------------------------------------------- -- -------------------------------------...
true
5b9eb5c74fea322295412f3f6f5e1c770f2b6bb6
SQL
jw6/ERSystem
/Jay_Wang_Code/SQLAssignments/lab1.sql
UTF-8
5,347
4.09375
4
[]
no_license
--2.1 SELECT --Select all records from the Employee table / SELECT * FROM EMPLOYEE; / --Select all records from the Employee table where last name is King / SELECT * FROM EMPLOYEE WHERE LASTNAME = 'King'; / --Select all records from the Employee table where first name is Andrew and REPORTSTO is null / SELECT...
true
86856069e913eeed39280c7114fdb2694af917a8
SQL
andreneves/BDII
/BDIIA07-EXERCICIOS.sql
UTF-8
799
3.5625
4
[]
no_license
-- EXERCICIOS -- 1) Crie o comando que altera a tabela abaixo colocando o campo id como chave primárias CREATE TABLE estudantes ( id INT, nome varchar(255) NOT NULL, cidade varchar(255) NOT NULL ); -- 2) Crie uma tabela contendo os campos abaixo e colocando o campo cpf_responsavel como unique Tabela: escritori...
true
08bbe39a8f3118e0830154b305dc85ef05b6cb5b
SQL
sterligov/otus_highload
/dating/migrations/20210116152202_create_friends_table.sql
UTF-8
510
3.5625
4
[]
no_license
-- +goose Up -- SQL in this section is executed when the migration is applied. CREATE TABLE IF NOT EXISTS friends ( id INT(11) AUTO_INCREMENT PRIMARY KEY, user_id INT(11) NOT NULL, friend_id INT(11) NOT NULL, UNIQUE (user_id, friend_id), FOREIGN KEY (user_id) REFERENCES user(id) ON DELETE RESTRICT, ...
true
0f17c6d7211c5b0279a326dd7bde57583bb8d491
SQL
MrK493/surtidora
/database scripts/Database-script.sql
UTF-8
2,775
4.09375
4
[ "MIT" ]
permissive
CREATE DATABASE IF NOT EXISTS db_surtido_r CHARACTER SET UTF8 COLLATE utf8_unicode_ci; USE db_surtido_r; CREATE TABLE IF NOT EXISTS categories( id_category INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY, category_name VARCHAR(100) UNIQUE NOT NULL COMMENT 'Must be UNIQUE to avoid confusion', category_image VARCHA...
true
ed97ae9c97ebdfab56a600b09d493b2a05240f69
SQL
Jonathanbees/UMProgramacion
/Marzo/Bases de datos/modelo base de datos perrinchis SQL.sql
UTF-8
3,172
3.765625
4
[]
no_license
#Tarea Consulta documentación MySQL /* Funciones y operadores de comparación & = AND > = mayor que >= mayor o igual que Nota: Si no se cumple algún operador, arrojará 0, sino, un 1 Ejemplo: SELECT 3 <= 2; -> 0 < = menor que <= menor o igual que <> Ó != distinto de <=> No es distinto: si ambos ope...
true
51dc14b5afab6898b3bfcab7b26667b1cbfad2f7
SQL
SEkomposter/EasyBreezzy
/dbscheme.sql
UTF-8
8,780
3.03125
3
[]
no_license
-- MySQL Script generated by MySQL Workbench -- Tue Jun 19 20:38:10 2018 -- 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
678b2d05d364b97c56e3ed9f0f026dda90550743
SQL
ClickHouse/ClickHouse
/tests/queries/0_stateless/02809_prewhere_and_in.sql
UTF-8
1,665
3.375
3
[ "Apache-2.0", "BSL-1.0" ]
permissive
DROP TABLE IF EXISTS t_02809; CREATE TABLE t_02809(a Int64, b Int64, s String) ENGINE=MergeTree order by tuple() AS SELECT number, number%10, toString(arrayMap(i-> cityHash64(i*number), range(50))) FROM numbers(10000); CREATE TABLE t_02809_set(c Int64) ENGINE=Set() AS SELECT * FROM numbers(10); CREATE TABLE t_02809_...
true
ebc6c33766feb6276f6ca2438393ec6e0188b9df
SQL
tecnocat/Scripts
/sql/SQL-Interesting.sql
UTF-8
2,098
3
3
[]
no_license
/** * UPDATE NODE TITLES WITH THEIR REVISIONS TOO */ UPDATE `node_revision`, `node` SET `node_revision`.`title` = CONCAT(`node`.`type`, ' : ', `node_revision`.`title`), `node`.`title` = CONCAT(`node`.`type`, ' : ', `node`.`title`) WHERE `node_revision`.`nid` = `node`.`nid` AND `node`.`type` IN ( 'attraction', 'bann...
true
2bbd9279b9f91fb078acb58e567123a77a34d67e
SQL
geert-timmermans/sql
/sql basic exercises/commands.sql
UTF-8
1,683
3.96875
4
[]
no_license
/* assignment: */ /* https://github.com/becodeorg/GNK-Holberton-1.9/tree/master/3-De-berg/06-SQL/sql-exo */ /* Displays all data. */ SELECT * FROM students JOIN school ON students.school = school.idschool; /* Shows only first names. */ SELECT prenom FROM students; /* Shows the names, birth dates and school of each. ...
true
96b40affd255ab2186d2259b8e83c1f5ea374712
SQL
mnbv09870987/Pdd
/share/migrations/PostgreSQL/deploy/1/001-auto.sql
UTF-8
595
3.15625
3
[]
no_license
-- -- Created by SQL::Translator::Producer::PostgreSQL -- Created on Sat Jan 18 10:26:13 2020 -- ; -- -- Table: answers -- CREATE TABLE "answers" ( "id" serial NOT NULL, "ticket" integer NOT NULL, "question" integer NOT NULL, "answer" integer NOT NULL, "student_id" integer NOT NULL, "time" integer DEFAULT...
true
5c12cbeedb122d7656caed3d5443629fefd50ad0
SQL
s-nao/jupyter_lab_docker
/containers/mysql/init/1_create_db.sql
UTF-8
550
3.125
3
[]
no_license
-- データベースを作成 CREATE DATABASE IF NOT EXISTS jupyter_local DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci; CREATE DATABASE IF NOT EXISTS world DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci; -- データベースアクセスユーザーの作成 CREATE USER 'username'@'%' IDENTIFIED BY 'password'; -- データベースアクセスユーザーの権限を設定 GRANT ALL P...
true
4684e58e4f8d8aac2dcb55ab09c00f586ce9f8ef
SQL
pactechteam/vaultreporter
/working.sql
UTF-8
9,285
2.921875
3
[]
no_license
-- CREATE TABLE users ( -- users_id serial PRIMARY KEY, -- users_username VARCHAR (255) UNIQUE NOT NULL, -- users_email VARCHAR(255) UNIQUE NOT NULL, -- users_emailvalidated BOOLEAN, -- users_storedhash VARCHAR(255) NOT NULL, -- users_role VARCHAR(255) NOT NULL, -- users_category VARCHAR(255) -- ); -- DR...
true
96192b01012e8389f382e2beb0cbd23b27c62909
SQL
rayailieva/Database-Basics---MySQL
/08.Exams/exam/p13.ExtractTjeShortestJourney.sql
UTF-8
289
3.71875
4
[]
no_license
SELECT j.id, p.name AS 'planet_name', s.name AS 'spaceport_name', j.purpose AS 'journey_purpose' FROM journeys AS j JOIN spaceports AS s ON j.destination_spaceport_id = s.id JOIN planets AS p ON s.planet_id = p.id ORDER BY DATEDIFF(j.journey_end, j.journey_start) LIMIT 1;
true
95b5e93f03d75922c251506716cdc46b2ca2b259
SQL
Omer5284/data_analyst_case
/analysis/workfile 1.sql
UTF-8
8,250
3.59375
4
[]
no_license
---Revenue per country, chanel------ SELECT b.country_name, b.region, b.sub_region , marketing_channel_id, SUM(net_revenue) FROM subscriptions a LEFT JOIN countries b ON a.signup_country_code=b.country_code WHERE subscription_date BETWEEN '2016-10-01' AND '2017-03-31' AND is_paid_cha...
true
69d34d184ea531277ecadc724b1c95c87302a3d0
SQL
mbilasco/projet-technique-takeaphoto
/bdd/script_creation.sql
UTF-8
2,227
3.0625
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.1.9 -- http://www.phpmyadmin.net -- -- Généré le : Ven 27 Février 2015 à 16:39 -- Version du serveur : 5.1.73-2+squeeze+build1+1-log -- Version de PHP : 5.3.8 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SE...
true
ec87892f1310265c018391af353dba779fe31e38
SQL
Ramya1402/DBMS-Lab
/Program 9 = Movie Database/Prog9.sql
UTF-8
3,713
3.59375
4
[]
no_license
CREATE DATABASE MOVIE; USE MOVIE; CREATE TABLE ACTOR ( ACT_ID INT, ACT_NAME VARCHAR (20), ACT_GENDER CHAR (1), PRIMARY KEY (ACT_ID)); DESC ACTOR; CREATE TABLE DIRECTOR ( DIR_ID INT, DIR_NAME VARCHAR (20), DIR_PHONE REAL, PRIMARY KEY (DIR_ID)); DESC DIRECTOR; CREATE TABLE MOVIES ( MOV_ID ...
true
af19398cf562983fae0f8c08f970461f598d3de4
SQL
enzopanebianco/senai-backend-senatur-
/01_CRIACAO_BD.sql
UTF-8
449
2.640625
3
[]
no_license
create database Senatour_Tarde create table Pacotes( ID int identity primary key ,NomePacote varchar(255) not null ,Descricao varchar(255) ,DataIda datetime not null ,DataVolta datetime not null ,Valor decimal(10,2) not null ,Ativo int not null ,Cidade varchar(255) not null ); create table Usuarios( ID int ...
true
e51a758e613cb42410c66b2fc3e23b46017c41b8
SQL
2ASIX2018/Instaweb
/instaweb/bd/Instaweb.sql
UTF-8
1,538
2.96875
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.6.6deb5 -- https://www.phpmyadmin.net/ -- -- Servidor: localhost:3306 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_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!40101 SE...
true
0530388453af3de3c68ed9c1a6e36dbe6d572e37
SQL
Phixia/PTA-Basic-Database
/Natures.sql
UTF-8
2,155
2.71875
3
[]
no_license
DROP TABLE IF EXISTS "Natures"; CREATE TABLE Natures (NatureID INTEGER PRIMARY KEY, Name TEXT, StatUp TEXT, StatDown TEXT); INSERT INTO "Natures" VALUES(1,'Cuddly','HP','Atk'); INSERT INTO "Natures" VALUES(2,'Distracted','HP','Def'); INSERT INTO "Natures" VALUES(3,'Proud','HP','SpAtk'); INSERT INTO "Natures" VALUES(4,'...
true
f575c2d1c62557dfe8deebe7e6897d902bd4e479
SQL
chocosin/2019-11-otus-spring-selevenko
/05/src/main/resources/schema.sql
UTF-8
491
3.09375
3
[]
no_license
create table books ( id bigint primary key auto_increment, title varchar(30) ); create table authors ( id bigint primary key auto_increment, firstName varchar(30), lastName varchar(30) ); create table genres ( id int primary key auto_increment, name varchar(30) ); create table bookAuthors ...
true
d4fe3bcf744e016d2311c9d1664d0774c25149ce
SQL
bakink/DBA_Oracle
/temporary_tbs_usage.sql
UTF-8
1,501
3.765625
4
[]
no_license
--Temporary Segments SELECT A.tablespace_name tablespace, D.mb_total, SUM (A.used_blocks * D.block_size) / 1024 / 1024 mb_used, D.mb_total - SUM (A.used_blocks * D.block_size) / 1024 / 1024 mb_free FROM v$sort_segment A, ( SELECT B.name, C.block_size, SUM (C.bytes) / 1024 / 1...
true
cf9a71736fcd124c87ced084b62271d3beda833a
SQL
tejasoberoi27/DBMS_Projects
/dbms_project_2017332_2017123/query files/q7.sql
UTF-8
135
3.015625
3
[]
no_license
select * from Patient P where P.PackageID IN ( select `Package ID` from Package P1 where P.PackageID=P1.`Package ID` AND P1.Type="WL");
true
d5322bddc6de65a05b41dc7e50adfb725b49e2eb
SQL
giuliobosco/WebSAMT
/consulting/generated-sql/consulting.sql
UTF-8
1,644
3.46875
3
[ "Apache-2.0" ]
permissive
# This is a fix for InnoDB in MySQL >= 4.1.x # It "suspends judgement" for fkey relationships until are tables are set. SET FOREIGN_KEY_CHECKS = 0; -- --------------------------------------------------------------------- -- consultant -- --------------------------------------------------------------------- DROP TABL...
true
7401fdd61d6bcf57dc913cb1179ea5fba810aa3c
SQL
ttowncompiled/databases
/project_one/queries/query4.sql
UTF-8
822
4.25
4
[]
no_license
SELECT any_user."uid", any_user."name", any_user."gender", agg_female_friends.num_female_friends, agg_male_friends.num_male_friends FROM Users any_user LEFT JOIN ( SELECT female_friends."uid1", COUNT(female_friends."uid2") AS num_female_friends FROM Friends female_friends INNER JOIN Users females ON fem...
true
7813dcadce3c6324b6cc63abca1bab2ce84d320c
SQL
jemn21819/holbertonschool-higher_level_programming
/0x0E-SQL_more_queries/100-not_my_genres.sql
UTF-8
378
4.125
4
[]
no_license
-- uses the hbtn_0d_tvshows database to list all genres not linked to the show Dexter SELECT tv_genres.name FROM tv_genres WHERE tv_genres.id NOT IN ( SELECT tv_genres.id FROM tv_genres INNER JOIN tv_show_genres ON tv_genres.id = tv_show_genres.genre_id INNER JOIN tv_shows ON tv_show_genres.show_id = tv_shows.id W...
true
3df98a0827eee47c0ef534f8260b1d04b39027a4
SQL
nmrs-nigeria/nigeria-mrs-distribution
/api/src/main/resources/sql/role/role_privilege.sql
UTF-8
42,136
2.515625
3
[]
no_license
SET FOREIGN_KEY_CHECKS=0/0xd REPLACE INTO `role_privilege` VALUES ('Adherence','App: coreapps.findPatient'), ('Adherence','App: coreapps.patientDashboard'), ('Adherence','App: coreapps.patientVisits'), ('Adherence','App: coreapps.summaryDashboard'), ('Adherence','App: patientqueueing.providerDashboard'), ('Ad...
true
1048ed61ba455f945945beaf89a65e8656ebe8b8
SQL
CUNLUO/ETLSqueeSAR
/MetodosSQL/table poligono_resumen.sql
UTF-8
686
2.71875
3
[]
no_license
CREATE TABLE squeesar.poligono_resumen ( id_poligono bigint, direccion character varying(20), cant_registros bigint, height double precision, h_stdev double precision, vel double precision, v_stdev double precision, acc double precision, coherence double precision, a_stdev double precision, eff_a...
true
bfd8ba9d17b185e05e6ccd9bfa2b666ec943ad74
SQL
hlavacek/uml-testing-lecture
/src/main/resources/import.sql
UTF-8
1,850
2.65625
3
[]
no_license
INSERT INTO CATEGORY(ID, NAME) VALUES (1, 'Fantasy'); INSERT INTO CATEGORY(ID, NAME) VALUES (2, 'Science Fiction'); INSERT INTO CATEGORY(ID, NAME) VALUES (3, 'Programming'); INSERT INTO AUTHOR(ID, NAME) VALUES (1, 'John Ronald Reuel Tolkien'); INSERT INTO AUTHOR(ID, NAME) VALUES (2, 'Douglas Adams'); INSERT INTO AU...
true
07d967af68a23af89e27fd2ad83ef7bf75184ce9
SQL
shardulmangade/Secure-Banking-System
/Database/storedprocedures/sp_deactivateManagerCEO3.sql
UTF-8
1,487
3.5
4
[]
no_license
/******************************************* Name : sp_deactivateManagerCEO3 Description : Deactivate a manager Called By : UI (LoginDBConnectionManager.java) Create By : Ram Kumar Kumaresan Modified Date : 10/26/2013 ********************************************/ DROP PROCEDURE IF EXISTS sp_deac...
true
a1c9d35d7f878bee66e1c4fb2d4f639874031e6c
SQL
lhm2k1/Database
/DBQuanLyBanHang.sql
UTF-8
5,335
3.1875
3
[]
no_license
--create database QuanLyBanHang use QuanLyBanHang create table Sign_up( [Susername] nvarchar(50) not null, Spassword nvarchar(50) not null, Gmail nvarchar(50) not null, ) create table Nhanvien ( [Manhanvien] nvarchar(20) not null, Hoten nvarchar(50) not null, SDT nvarchar(10) not...
true
b3c6f5b3cd1ebff205f9d6aeab6d13b97350a713
SQL
Ensembl/ensembl-biomart
/var_mart/tables/structvar__phenotype__dm/select.sql
UTF-8
489
3.578125
4
[]
no_license
SELECT sv.structural_variation_id AS structural_variation_id_2072_key, REPLACE(REPLACE(p.description, ",", ""), "&", "") as phenotype_name, s.name AS phenotype_source FROM VAR_DB.structural_variation sv LEFT OUTER JOIN VAR_DB.phenotype_feature pf ON (sv.variation_name=pf.object_id AND pf.type...
true