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
02c6ea4f1f870c2d2103a4622a4a247b0d09256a
SQL
akanthos/MobilityServices
/backend/whoelse.sql
UTF-8
6,141
3.375
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.3.11 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: May 22, 2015 at 07:46 PM -- 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
65a14f09e062a4868b331b2d5d550bc3c5d2e0bb
SQL
TADSUNIC/LabIVLocadora
/banco locadora.sql
UTF-8
13,220
2.96875
3
[]
no_license
-- -------------------------------------------------------- -- Host: 127.0.0.1 -- Server version: 5.6.12-log - MySQL Community Server (GPL) -- Server OS: Win64 -- HeidiSQL Version: 8.2.0.4675 -- --------------------------------------------------------...
true
9dc339b9a05d447002d5b66551aad5b49ea17aaf
SQL
spyapali/Veganista
/tests/test.sql
UTF-8
11,407
3.0625
3
[]
no_license
-- -- PostgreSQL database dump -- -- Dumped from database version 9.5.0 -- Dumped by pg_dump version 9.5.0 SET statement_timeout = 0; SET lock_timeout = 0; SET client_encoding = 'UTF8'; SET standard_conforming_strings = on; SET check_function_bodies = false; SET client_min_messages = warning; SET row_security = off; ...
true
30f7df0b88cda7a764af460a3e83ed5c014e9ae5
SQL
vinojah/e_channeling
/Hospital_Web/sql/karuna_clinic_center.sql
UTF-8
8,642
3.203125
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 3.3.9 -- http://www.phpmyadmin.net -- -- Host: localhost -- Generation Time: Feb 12, 2019 at 08:07 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_SE...
true
bb0cf7cef5ea64f8d63d95f23186c8c45e3fa36d
SQL
wind828552/BulidSchool_2020_Front-End
/SQL-HW/0424/0424-03.sql
BIG5
342
3.65625
4
[]
no_license
--CXثeSws~,bLhgQǫȤqʹL SELECT P.ProductID, O.CustomerID, COUNT(O.CustomerID) FROM Products P INNER JOIN [Order Details] OD ON OD.ProductID = P.ProductID INNER JOIN Orders O ON O.OrderID = OD.OrderID WHERE P.UnitsInStock = 0 GROUP BY P.ProductID, O.CustomerID ORDER BY O.CustomerID ASC
true
fe23950e34e30236f044b2adc2677e3dc4a84535
SQL
liyanpro/email-manager
/src/main/java/cloud/liyan/emailmanager/dao/sql/user_info.sql
UTF-8
896
2.9375
3
[]
no_license
/* Navicat MySQL Data Transfer Source Server : email Source Server Type : MySQL Source Server Version : 80017 Source Host : localhost:3306 Source Schema : email Target Server Type : MySQL Target Server Version : 80017 File Encoding : 65001 Date: 07/09/2019 14:05:07 *...
true
b5c32577428e67b8c092ce5155c21d8edbde37c1
SQL
mahirjain25/OnTrack
/ontrack/ontrack/script.sql
UTF-8
260
2.5625
3
[ "MIT" ]
permissive
DROP DATABASE IF EXISTS ontrack; CREATE DATABASE ontrack DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_general_ci; USE ontrack; GRANT ALL PRIVILEGES ON ontrack.* TO 'django'@'localhost' IDENTIFIED BY 'password' WITH GRANT OPTION; FLUSH PRIVILEGES;
true
88d893f1efff223b15e0b56600652a63db0bfd7a
SQL
qwe333ty/course-work
/server/src/main/resources/db/changelog/sql/001-create-user-and-inherited-tables.sql
UTF-8
1,257
3.609375
4
[]
no_license
create sequence user_id_sequence; create table users ( id integer default nextval('user_id_sequence'::regclass), username varchar(100) not null, email varchar(100) not null, password varchar(60) not null, registration_date TIMESTAMP not...
true
9baec608e6fe583af06c49d9b23c1f333065af18
SQL
MyDuan/codeIgniter
/sql/duan-sample.sql
UTF-8
6,799
3.15625
3
[ "MIT" ]
permissive
-- phpMyAdmin SQL Dump -- version 4.6.5.2 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: 2017 年 11 朁E18 日 18:26 -- サーバのバージョン: 10.1.21-MariaDB -- PHP Version: 7.1.11 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIEN...
true
67a70b81841e401a48aed3513ed77e7603b5243f
SQL
HansDeveloper/appPrueba
/cuest/cuest/static/actualizacion3.sql
UTF-8
1,046
3.375
3
[]
no_license
create database culturales; use culturales; create table preguntas( id_pregunta integer primary key auto_increment, pregunta varchar(250), campos integer, tipo integer); create table respuestas( id_respuesta integer primary key, respuesta varchar(250), idPregunta integer, foreign key (idPregunta) references preg...
true
c14930b1305a42c96e64a619fc551f9e446f336b
SQL
apache/hive
/standalone-metastore/metastore-server/src/main/sql/mssql/upgrade-2.3.0-to-3.0.0.mssql.sql
UTF-8
13,398
3.40625
3
[ "Apache-2.0", "MIT", "LicenseRef-scancode-unknown-license-reference", "BSD-3-Clause", "Python-2.0", "BSD-2-Clause" ]
permissive
SELECT 'Upgrading MetaStore schema from 2.3.0 to 3.0.0' AS MESSAGE; -- :r 026-HIVE-16556.mssql.sql CREATE TABLE METASTORE_DB_PROPERTIES ( PROPERTY_KEY VARCHAR(255) NOT NULL, PROPERTY_VALUE VARCHAR(1000) NOT NULL, DESCRIPTION VARCHAR(1000) ); ALTER TABLE METASTORE_DB_PROPERTIES ADD CONSTRAINT PROPERTY_KEY_PK PRI...
true
ffd55399c32076a6e0ff05f6e08da00ba1264fec
SQL
happysky/test19th
/sql/user.sql
UTF-8
853
2.703125
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 3.3.8.1 -- http://www.phpmyadmin.net -- -- 主机: xx:xxx -- 生成日期: 2018 年 03 月 22 日 15:48 -- 服务器版本: 5.6.23 -- PHP 版本: 5.3.3 SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RES...
true
2f8eafcf9795b73be7fa19cec43581830cb6133a
SQL
erkansezgin/SQLScripts
/Performance Metrics.sql
UTF-8
1,845
3.734375
4
[ "LicenseRef-scancode-warranty-disclaimer" ]
no_license
-- Metrics from Tom LaRock - http://thomaslarock.com/2012/05/are-you-using-the-right-sql-server-performance-metrics/ -- SQL COMPILATIONS PERCENTAGE (~10%) SELECT (1.0 * cntr_value / (SELECT 1.0 * cntr_value FROM sys.dm_os_performance_counters WHERE counter_name = 'Batch Requests/sec')) * 100 AS [S...
true
199498a65929f8c0c74451c5a61316040d23897f
SQL
escsequence/COMPSCI382
/assignment5/assignment5.sql
UTF-8
2,812
4.15625
4
[ "MIT" ]
permissive
/******************************** Assignment 5 Author: James Johnston Created: 2/26/2021 *******************************/ -- Need to establish what database we are using (moviestore) USE moviestore; -- 1. Display the firstName, lastName, and phone fields from the members table (List of Members). SELECT firs...
true
c517bcd47f0bbab0ded21c2bc50c3251e256fee9
SQL
GiamoE/DiscordBot
/src/main/resources/db_updates/012_013.sql
UTF-8
150
2.625
3
[ "Apache-2.0" ]
permissive
CREATE TABLE bot_playing_on ( guild_id VARCHAR(32), channel_id VARCHAR(32), CONSTRAINT bot_playing_on_pk PRIMARY KEY (guild_id, channel_id) );
true
2c05420a87d71d86da7dacbe95c21d8a408f697c
SQL
mucheniski/pl-sql-examples
/Precedencia.sql
ISO-8859-1
796
2.796875
3
[]
no_license
SET SERVEROUTPUT ON DECLARE vNota1 NUMBER(11,2) := 7.0; vNota2 NUMBER(11,2) := 6.0; vNota3 NUMBER(11,2) := 9.0; vNota4 NUMBER(11,2) := 6.0; vMedia NUMBER(11,2); BEGIN vMedia := vNota1 + vNota2 + vNota3 + vNota4 / 4; -- Errado 23.5 a diviso feita primeiro pois tem precedncia D...
true
25578dca4f5d01faacb8c21f4ea493476bdd3bd7
SQL
WillZWL/project
/database/change script/valuebasket.com/20120814.sql
UTF-8
2,056
3.625
4
[]
no_license
CREATE TABLE `so_compensation` ( `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, `so_no` char(8) NOT NULL, `line_no` smallint(5) unsigned NOT NULL, `item_sku` varchar(15) NOT NULL, `qty` smallint(5) unsigned NOT NULL, `status` tinyint(2) unsigned NOT NULL DEFAULT '0' COMMENT '0 = Denied / 1 = Pendin...
true
2aeb5d7e4d475700b800f62e3478ed9269db76fe
SQL
CodingwithJess/employee-tracker
/db/seed.sql
UTF-8
1,158
2.671875
3
[]
no_license
INSERT INTO department (depName) VALUES ("Sales"), ("Marketing"), ("Finance"), ("IT"), ("Engineering"), ("Customer Service"); INSERT INTO role (title, salary, department_id) VALUES ("Sales Associate", 80000, 1); INSERT INTO role (title, salary, department_id) VALUES ("Marketing Manager", 95000, 2); INSERT INTO role (t...
true
d83c57f8d5fc2c108fcc6faae26c284b1222d40c
SQL
globalSolutionsContinex/data_flow_driver
/DataFlow/DataDestination/StoreProcedures/PostgreSQL/upsert_generic.sql
UTF-8
257
2.671875
3
[ "MIT" ]
permissive
with generic_json (doc) as ( values ('{data}'::json) ) insert into {table} {columns} select p.* from generic_json l cross join lateral json_populate_recordset(null::{table}, doc) as p on conflict ({primary_key}) do update set {duplicate_format};
true
0ed9b78e636adcc2064f6c72083e7caf177ecd0a
SQL
Juliocotzo/BD1_PROYECTO_CLASE
/[BD1]Calificacion.sql
UTF-8
18,674
3.59375
4
[]
no_license
/*ELIMINAR TABLAS TEMPORALES*/ DROP TABLE TEMP_REGION; DROP TABLE TEMP_ENCUESTA; DROP TABLE TEMP_DATOS; /*ELIMINAR TABLAS ER*/ DROP TABLE PAIS_ENCUESTA; DROP TABLE RESPUESTA; DROP TABLE PREGUNTA; DROP TABLE ENCUESTA; DROP TABLE PROFESIONAL_AREA; DROP TABLE AREA; DROP TABLE PROFESIONAL_INVENTO; DROP TABLE PROFESIONA...
true
15fa1b0154407c96d0f25b4c5a164e26d1d134e6
SQL
toandang93/C0221G1-DangAnhToan
/module3/case_study_DB/case_task_2_3_4_5.sql
UTF-8
1,288
4.125
4
[]
no_license
use case_study_db; -- task_2 select * from nhan_vien where ((ho_ten like 'H%') or (ho_ten like 'K%') or (ho_ten like 'T%')) and length(ho_ten)<=15; -- task_3 select * from khach_hang where (year(curdate()) - year(ngay_sinh) between 18 and 50) and (dia_chi in ("Da Nang","Quang Tri")); -- task_4 select kh.id_khach_hang...
true
942e1ce0c0601d3175cc87c1ab4342f7e669d521
SQL
HellBz/HGA-Altis_EXILE
/MySQL/2_exile_db_changes_for_infistar.sql
UTF-8
597
3.15625
3
[]
no_license
/* FOR "USE_DATABASE_WHITELIST" YOU NEED TO RUN THIS QUERY: */ ALTER TABLE `account` ADD `whitelisted` INT(1) UNSIGNED NOT NULL DEFAULT '0'; /* FOR "USE_LOG_TO_DATABASE" YOU NEED TO RUN THIS QUERY: */ CREATE TABLE `infistar_logs` ( `id` INT(11) NOT NULL AUTO_INCREMENT, `servername` TEXT NULL, `logname` TEXT NULL,...
true
c3d866f6ad8d4914089909c9d8fc453651ba4f24
SQL
Qasim-1develop/Mutimonitor
/server/mysql/init.sql
UTF-8
3,342
3.375
3
[]
no_license
Drop database if EXISTS multimonitor; create database multimonitor; use multimonitor; CREATE TABLE IF NOT EXISTS `user`( `id` INT UNSIGNED AUTO_INCREMENT KEY , `username` VARCHAR(20) NOT NULL UNIQUE , `password` CHAR(32) NOT NULL, `email` VARCHAR(50) NOT NULL UNIQUE , `sex` ENUM('man','woman','baomi') NOT NULL DEFAULT ...
true
6f987e3ee982f040bef3a05e5a2040e5f5601d1b
SQL
tieshengdetie/hyperf-vuetify-admin
/docker-compose/db/hyperf_vuetify_admin.sql
UTF-8
26,343
2.671875
3
[]
no_license
/* Navicat Premium Data Transfer Date: 30/03/2020 16:50:22 */ SET NAMES utf8mb4; SET FOREIGN_KEY_CHECKS = 0; -- ---------------------------- -- Table structure for casbin_rule -- ---------------------------- DROP TABLE IF EXISTS `casbin_rule`; CREATE TABLE `casbin_rule` ( `id` int(11) NOT NULL AUT...
true
08fe04648d8b0b71aaeccbc7194f3a92660108b3
SQL
yefc/CBOE
/subprojects/Classic/Consulting/Abbott/Inventory/ChemInv/config/oracle_install_scripts/Create_blank_ChemInv_DB/sql/Packages/pkg_Requests_def.sql
UTF-8
8,741
2.765625
3
[]
no_license
CREATE OR REPLACE PACKAGE "REQUESTS" AS TYPE CURSOR_TYPE IS REF CURSOR; FUNCTION CREATEREQUEST( pContainerID IN inv_requests.Container_ID_FK%Type, pQtyRequired IN inv_requests.Qty_Required%Type, pDateRequired IN Date, pUserID inv_requests.User_ID_FK%type, pDeliveryLocation inv_requests.delivery_location_i...
true
b6e109cdfd309edb35250cb6b4cdf42d0410acb4
SQL
KebecStatoil/SqlJambalaya
/Scripts/OPT/OptQueryTuning/TableCountsWithFilters.sql
UTF-8
861
3.015625
3
[ "MIT" ]
permissive
select 'workorder' [table & filter], count(*) [count] from workorder w with (nolock) union all select 'Workorderuserstatus' [table & filter], count(*) [count] from Workorderuserstatus wss with (nolock) union all select 'Workorderuserstatus where convert(nvarchar(1), Inact) not like ''X''' [table & filter], count(*) ...
true
4c19959b6a34fcaf7fe910aebfc3b77fb6a3342f
SQL
ll0513ll/KoscomSurveyNew
/table.sql
UTF-8
3,439
3.59375
4
[]
no_license
CREATE TABLE `cate` ( `cateNo` int(11) NOT NULL AUTO_INCREMENT, `cateName` varchar(100) NOT NULL, `cateInfo` varchar(500) DEFAULT NULL, PRIMARY KEY (`cateNo`) ) ENGINE=InnoDB AUTO_INCREMENT=28 DEFAULT CHARSET=utf8 CREATE TABLE `company` ( `companyNo` int(11) NOT NULL AUTO_INCREMENT, `companyName...
true
dc058f1d85a6308c848e388d6bed55e29bc3f528
SQL
wikimedia/analytics-wmde-scripts
/src/wikidata/site_stats/sql/active_user_changes_by_namespace.sql
UTF-8
370
3.484375
3
[]
no_license
SELECT actor_name, rc_namespace as namespace, COUNT( * ) as changes FROM wikidatawiki.recentchanges JOIN wikidatawiki.actor ON rc_actor = actor_id WHERE actor_user != 0 AND rc_bot = 0 AND ( rc_log_type != 'newusers' OR rc_log_type IS NULL) AND rc_timestamp >= DATE_FORMAT(DATE_SUB(NOW(), INTERVAL 30 day), '%...
true
513259eb3308a9a793c3c51c2194df8fa2b0f3b7
SQL
bpk1337/CIS425
/4.14.SQL_Lesson.sql
UTF-8
2,256
3.34375
3
[]
no_license
Insert into Suppliers (name, address, startdate, verified) values ("Big Supplier", "123 Main St.", "2020-04-12", true); -- To add another supplier, remove the first line and add another Insert into Suppliers (name, address, startdate, verified) values ("Medium Supplier", "456 University Dr.", "2020-04-12", false); -...
true
8ec71cc27fd0cdeff538b6df5ae21c66d80032b7
SQL
karimhaddad32/Serenity
/Database Import/Do not import these, testing/serenity (Karim Changes).sql
UTF-8
38,202
3.53125
4
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.9.1 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Nov 27, 2019 at 01:46 PM -- Server version: 10.4.8-MariaDB -- PHP Version: 7.1.32 GRANT ALL PRIVILEGES ON *.* TO 'root'@'127.0.0.1' IDENTIFIED BY PASSWORD '*28F7E1E5C0419388B5CCDD3D696922771E311F9D' WITH GR...
true
5248a4047be84013a0657ea567549869b890f560
SQL
tsebal/JavaRushTasks
/3.JavaMultithreading/src/com/javarush/task/sql/task05/task0529/query.sql
UTF-8
252
4
4
[]
no_license
-- Write your code here: SELECT author.full_name, COUNT(DISTINCT publisher.name) AS publishers FROM author LEFT JOIN book ON author.id = book.author_id LEFT JOIN publisher ON publisher.id = book.publisher_id GROUP BY author.full_name;
true
da80bc7ac48a1d0ebc486011f0790c01874c6e19
SQL
v002436/RiverturnReporter
/var/www/cgi-bin/get_table_schema_run.sql
UTF-8
1,404
3.25
3
[]
no_license
set colsep ',' set echo off set feedback off set pagesize 0 set sqlprompt '' set trimspool on set headsep off set heading off set verify off set linesize 132 spool myfile.csv define schema=TRUTH define table=UNITS define CR=chr(10) define TAB=chr(9) col x noprint col y noprint select tc.table_name y, column...
true
bc55f0ac335f01f036e2cf1979b6855e90992ba3
SQL
technologic27/yelp-reviews
/sql_scripts/queries/Business_2.sql
UTF-8
147
2.875
3
[]
no_license
SELECT state, SUM(CAST(stars AS DECIMAL))/COUNT(*) AS AvgStars FROM yelp.business GROUP BY state ORDER BY SUM(CAST(stars AS DECIMAL))/count(*) DESC
true
31b0db959fc536fd8c50d9b44885e383842f4446
SQL
vani4ka66/C-Sharp-Database-Basics
/Homeworks/06. Functions-Triggers-and-Transactions/29. Peaks-with-their-Mountain, County-and-Continent.sql
UTF-8
348
3.328125
3
[]
no_license
select p.PeakName, m.MountainRange as Mountain, c.CountryName, ct.ContinentName -??? from Peaks p left join Mountains m on m.Id = p.MountainId left join MountainsCountries mc on mc.MountainId = m.Id left join Countries c on c.CountryCode = mc.CountryCode left join Continents ct on ct.ContinentCode = c.CountryCode orde...
true
bce326f3ff6894e7b5f8e9c2dea9181693f23dc4
SQL
markfindley/sql-challenge
/EmployeeSQL/SQLHomeworkSchema.sql
UTF-8
2,318
3.8125
4
[]
no_license
--DROP TABLE Employees --DROP TABLE Salaries --DROP TABLE Titles --DROP TABLE Departments --DROP TABLE DeptEmp --DROP TABLE DeptManager CREATE TABLE Employees ( EmpNo int NOT NULL, BirthDate date NOT NULL, FirstName varchar(100) NOT NULL, LastName varchar(100) NOT NULL, Gender char(1) ...
true
92c3387d41961dfedb1737e0b24a6970f320b6bc
SQL
Mikex718/mysql_recipes
/recipes.sql
UTF-8
3,200
3.546875
4
[]
no_license
create table Recipe (id INT NOT NULL PRIMARY KEY AUTO_INCREMENT, name VARCHAR(25), description VARCHAR(50), instructions VARCHAR(500)) ENGINE=InnoDB DEFAULT CHARSET=utf8; create table Ingredient (id INT NOT NULL PRIMARY KEY AUTO_INCREMENT, name VARCHAR(50)) ENGINE=InnoDB DEFAULT CHARSET=utf8; create table Measure (id ...
true
1a5b2dd648af0f2f31bf1099ea4029933b7c2a0c
SQL
SE305-PTS/RockWallManagement
/src/main/resources/dbInit.sql
UTF-8
908
3.546875
4
[ "MIT" ]
permissive
CREATE TABLE IF NOT EXISTS Patron ( id INTEGER PRIMARY KEY, firstname VARCHAR(30) NOT NULL, lastname VARCHAR(30) NOT NULL, gender CHAR(1) CHECK(gender in ('M','F')), email VARCHAR(80), subscriber BOOLEAN DEFAULT FALSE, belaycert BOOLEAN DEFAULT FALSE, leadcert BOOLEAN DEFAULT FALSE, suspension DATE );...
true
e82e8e6b21ffe92ccc7312f702299c8ae6361530
SQL
Paulsanjo/ultimate-mysql-bootcamp
/challenges/crud-challenge.sql
UTF-8
1,962
4.15625
4
[]
no_license
-- drop database if it already exists DROP DATABASE shirts_db; -- create database CREATE DATABASE shirts_db; -- select database USE shirts_db; -- create table CREATE TABLE shirts ( shirt_id INT NOT NULL AUTO_INCREMENT, article VARCHAR(20) NOT NULL, colour VARCHAR(10) NOT NULL, shirt_size CHA...
true
61e103856ac3ba684b62cff581e8a16a60a885f6
SQL
jlmc/hibernate-tunings
/schema-management/src/main/resources/flyway/db/hsqldb/migration/V1_3__post_tag.sql
UTF-8
270
3.640625
4
[ "MIT" ]
permissive
create table post_tag (post_id bigint not null, tag_id bigint not null); alter table post_tag add constraint POST_TAG_TAG_ID_FK foreign key (tag_id) references tag (id); alter table post_tag add constraint POST_TAG_POST_ID_FK foreign key (post_id) references post (id);
true
f0e8f6cf7db2cd1e3f982b06a7808d0b0f52e102
SQL
rach-j/codeclan-work
/cc-week03/day05-hw-cinema/db/codeclan_cinema.sql
UTF-8
618
3.515625
4
[]
no_license
DROP TABLE IF EXISTS tickets; DROP TABLE IF EXISTS screenings; DROP TABLE IF EXISTS customers; DROP TABLE IF EXISTS films; CREATE TABLE customers ( id SERIAL4 PRIMARY KEY, name VARCHAR(255) NOT NULL, funds DECIMAL(10,2) NOT NULL ); CREATE TABLE films ( id SERIAL4 PRIMARY KEY, title VARCHAR(255) NOT NULL, ...
true
20eaa438460fb717185aab9da13f0ec08266fe0d
SQL
YYMo/csc343automarker
/all/g3chenhu/a2.sql
UTF-8
5,373
4.1875
4
[]
no_license
-- Add below your SQL statements. -- You can create intermediate views (as needed). Remember to drop these views after you have populated the result tables. -- You can use the "\i a2.sql" command in psql to execute the SQL commands in this file. -- Query 1 statements INSERT INTO Query1 ( select c1.cid c1id, c...
true
33c9ca6fccc970f9b563e7238ec30b5930aadb6b
SQL
shurashs/CDW_DWH
/Projects/DataWarehouse/CDW/V_FACT_VISIT_DIAGNOSES.sql
UTF-8
1,619
3.84375
4
[]
no_license
CREATE OR REPLACE VIEW v_fact_visit_diagnoses AS SELECT -- 9-Mar-2018, SG: created ap.network, ap.visit_id, ap.problem_number AS problem_nbr, pid.code AS icd_code, DECODE(pid.coding_scheme_id, '5', 'ICD-9', 'ICD-10') coding_scheme, pp.patient_key, pp.patient_id, vv.facility_key, ap.diagnosis_dt, TO...
true
d9e06734db7b889590cdf7b466baf0d297dff534
SQL
Ashwani-Tandon/Quiz
/quiz.sql
UTF-8
8,372
2.640625
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.5.1 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: Nov 20, 2016 at 06:28 PM -- Server version: 10.1.8-MariaDB -- PHP Version: 5.6.14 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLI...
true
580e1df8b125ff42290084baff3342c921d3614b
SQL
asoto134/Proyecto2_Web
/Base de Datos/Scripts Parte Liza/2. select_especie_genero_pajaro_tipo_pico_por_id.sql
UTF-8
2,513
3.421875
3
[]
no_license
-- Autor del archivo y scripts: Liza Chaves Carranza -- BÚSQUEDAS PARA TABLA ESPECIE -- Búsqueda del idEspecie por especie DELIMITER // CREATE PROCEDURE get_especie_id(IN especie varchar(50)) BEGIN SELECT e.idEspecie FROM especie AS e WHERE e.Especie = especie; END// -- Búsqueda del idEspecie por idGenero DELIMITE...
true
48ada234208936936b418b95f23f36b4d2927d88
SQL
antarin/address
/conf/evolutions/default/1.sql
UTF-8
717
2.78125
3
[ "CC0-1.0" ]
permissive
# --- Created by Ebean DDL # To stop Ebean DDL generation, remove this comment and start using Evolutions # --- !Ups create table address ( id bigint auto_increment not null, postal_code integer, city varchar(255), rest_of_address ...
true
5b036e6ed1b184a89cf12001e946d966d05ddb4a
SQL
GabrieleGarlaschelli/progetto-basi-di-dati
/create_tables.sql
UTF-8
3,660
3.578125
4
[]
no_license
CREATE TABLE Utente ( CF VARCHAR(16) primary key, Nome VARCHAR(30) not null unique, Indirizzo VARCHAR(50) not null, Email VARCHAR(30) not null unique, Password VARCHAR(30) not null, CHECK (LENGTH(Nome) >= 6), CHECK (LENGTH(Password) >= 6) ); CREATE TABLE Magazzino ( CodiceMagazzino INTEGER primary...
true
7f9ca3f05fe67de93c0a0be378ecb5bf80094c07
SQL
IbanJ/Casa-Trabajos
/Base De Datos/EjerciciosClase/Programacion/F_4.sql
UTF-8
325
3.140625
3
[]
no_license
-- Una funcion que recibe como parametro: -- Una Fecha -- Y devulve : el numero de empleados que nacieron en esa fecha. -- AdventureWorks2014 Create function F_4 ( @p_fecha date ) returns smallint as begin return( SELECT count(*) FROM AdventureWorks2014.HumanResources.Employee WHERE BirthDate = @p_fecha) en...
true
854473745f2c05f0aeb45ae46f48a93ba5177adc
SQL
jduncan9720/bamazon
/bamazon-query.sql
UTF-8
1,448
3.21875
3
[]
no_license
CREATE DATABASE bamazon; ​ CREATE TABLE products( item_id INT AUTO_INCREMENT NOT NULL PRIMARY KEY, product_name VARCHAR(100), department_name VARCHAR(100), price DECIMAL(10,2), stock_quantity INTEGER(10) ); ​ INSERT INTO products (product_name, department_name, price, stock_quantity) values ('Doom', 'Games',...
true
ab9682164f21277d1757c14133bca89fd3b473b6
SQL
CUBRID/cubrid-testcases
/sql/_13_issues/_11_2h/cases/bug_bts_5861_2.sql
UTF-8
2,816
3.765625
4
[ "BSD-3-Clause" ]
permissive
--+ holdcas on; set system parameters 'dont_reuse_heap_file=yes'; create table t(id int, val int, fk int); create table u(id int, val int, text string); create index _t_id on t(id); create index _t_val on t(val); create index _u_id on u(id); create index _u_val on u(val); create index _u_r_text on u(right(text, 2)); ...
true
f8a62da5a9e8dafe33d65761bee275445a03d720
SQL
silence-do-good/stress-test-Postgres-and-MySQL
/dump/high/day17/select0724.sql
UTF-8
178
2.59375
3
[]
no_license
SELECT timeStamp, temperature FROM ThermometerOBSERVATION o WHERE timestamp>'2017-11-16T07:24:00Z' AND timestamp<'2017-11-17T07:24:00Z' AND temperature>=34 AND temperature<=52
true
923c61d475a2aae74df053a871d664913355997a
SQL
AlbertZheng66/B-Cloud
/scripts/APP_VERSION_CREATE.SQL
GB18030
956
2.9375
3
[]
no_license
CREATE TABLE APP_VERSION( OID VARCHAR(64) NOT NULL, -- ڲ APP_OID VARCHAR(64) NOT NULL, -- Ӧñ VERSION VARCHAR(64) NOT NULL, -- 汾 CODE VARCHAR(128), -- Ӧô DESCRIPTION VARCHAR(1024) NOT NULL, -- Ϣ DEPLOY_FILE_NAME ...
true
e9c67a6f0e4a5e94ca64a25d2e43cfe379e55957
SQL
JohnnyCatsvill/BEP
/Lab5/Task2.sql
UTF-8
533
3.03125
3
[]
no_license
CREATE TABLE "dvd" ( "dvd_id" INTEGER PRIMARY KEY AUTOINCREMENT UNIQUE, "title" TEXT NOT NULL, "production_year" INTEGER NOT NULL ); CREATE TABLE "customer" ( "customer_id" INTEGER PRIMARY KEY AUTOINCREMENT, "first_name" TEXT NOT NULL, "last_name" TEXT NOT NULL, "passport_code" INTEGER NOT NULL, "registration_...
true
3ac730a26551645753398f98f6aa567e5e3bbf86
SQL
devatsrs/neon.web
/dbv-1/data/schema/prc_GetLastRateTableRate.sql
UTF-8
898
3.5
4
[ "MIT" ]
permissive
CREATE DEFINER=`root`@`localhost` PROCEDURE `prc_GetLastRateTableRate`(IN `p_companyid` INT, IN `p_RateTableId` INT, IN `p_EffectiveDate` datetime) BEGIN SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED; SELECT Code, Description, tblRateTableRate.Interval1, ...
true
8ebe4631a1a4942bfc926d0d95f95eddef69e38e
SQL
robathija/leetcode-and-hackerrank-sql
/top-competitors.sql
UTF-8
350
3.953125
4
[]
no_license
SELECT h.hacker_id, h.name FROM Submissions AS s INNER JOIN Hackers AS h ON s.hacker_id = h.hacker_id INNER JOIN Challenges AS c ON s.challenge_id = c.challenge_id INNER JOIN Difficulty AS d ON c.difficulty_level = d.difficulty_level WHERE s.score = d.score GROUP BY h.hacker_id, h.name HAVING COUNT(*)>1 ORDER B...
true
e9a61cf59068eaa6c03dc6ab4e54b2dc063c1934
SQL
P79N6A/fast
/install/efast365/api_schedule_log.sql
UTF-8
1,124
2.765625
3
[]
no_license
/* Navicat MySQL Data Transfer Source Server : baison Source Server Version : 50703 Source Host : localhost:3306 Source Database : api Target Server Type : MYSQL Target Server Version : 50703 File Encoding : 65001 Date: 2015-03-04 16:10:33 */ SET FOREIGN_KEY_CHECKS=...
true
e11a005a4345abdf6f8d0bce3ec8736d651dbdb2
SQL
mtiowl/oracle
/tuning/Specific Requests/26-Jan-2012/ep.sql
UTF-8
2,543
2.78125
3
[]
no_license
REM Check the following packages: REM REM PCPM_BATCH_SETTLEMENT_DRIVER REM PCPM_SETTLEMENT_SUPPORT REM REM set timing on; REM SHOW PARAMETER OPTIMIZER_MODE alter session set optimizer_mode = CHOOSE; --alter session set optimizer_mode = RULE; DELETE plan_table where statement_id = 'MTI' / EXPLAIN P...
true
436133dd6f446957a6415a10078a083ba8c4a06a
SQL
way8/Sotalogger
/src/main/resources/data.sql
UTF-8
1,904
2.6875
3
[]
no_license
INSERT INTO radio_ham (callsign, qth) VALUES ('SP9GI', 'Krakow'); INSERT INTO radio_ham (callsign, qth) VALUES ('SP9OZI', 'Rzeszow'); INSERT INTO radio_ham (callsign, qth) VALUES ('SQ8JMZ', 'Podkarpacie'); INSERT INTO radio_ham (callsign, qth) VALUES ('SP9ML', 'Śląsk'); INSERT INTO notes (ACTIVATION_NOTES) VALUES ('"L...
true
466fee751c0e4d74d1558c605b1809f233d0c479
SQL
franciscoww/mintic_UTP
/Ciclo 2/Retos/reto3/Scripts/reto4.sql
UTF-8
1,403
4.5625
5
[]
no_license
SELECT DISTINCT L.Nombre || ' ' || L.Primer_Apellido AS 'Lider',L.Cargo, COUNT(P.ID_Proyecto) AS 'Proyectos' FROM Lider AS L INNER JOIN Proyecto AS P ON P.ID_Lider = L.ID_Lider WHERE P.Constructora = 'Arquitectura S.A.' GROUP BY L.ID_Lider ORDER BY Cargo,Lider; --Requerimiento 1 SELECT Nombre || ' ' || Primer_Apel...
true
5a933f9cbecdfd5a8635bcbe0d17dc7bcde65503
SQL
future4code/Paula-Vitoria
/semana18/aula53/webservices/tables.sql
UTF-8
1,131
3.78125
4
[]
no_license
CREATE TABLE IF NOT EXISTS to_do_list_users ( id VARCHAR(64) PRIMARY KEY, name VARCHAR(64) NOT NULL, nickname VARCHAR(64) NOT NULL, email VARCHAR(64) NOT NULL, role VARCHAR(6) NOT NULL DEFAULT 'NORMAL' ); CREATE TABLE IF NOT EXISTS to_do_list_tasks ( id VARCHAR(64) PRIMARY KEY, title VARCHA...
true
f88c542c06442c8e7846e6179c3cab980596b1ec
SQL
RAJALAKSHMIRAJKUMAR/LCE
/FORM OBJECTS/SP_TENDER_SUMMARY_UPDATE_VER0.2_27042015.SQL
UTF-8
4,786
3.765625
4
[]
no_license
-- VER 0.1 DATE:01/04/2014 DESC: SP TO UPDATE MARGIN CALCULATION DONE BY DHIVYA DROP PROCEDURE IF EXISTS SP_TENDER_SUMMARY_UPDATE; CREATE PROCEDURE SP_TENDER_SUMMARY_UPDATE(TMID INTEGER,MARKDOWN INTEGER,USERSTAMP VARCHAR(50),OUT SUCCESS_MESSAGE INTEGER) BEGIN DECLARE MINID INTEGER; DECLARE MAXID INTEGER; DECLARE TIID...
true
110e4a7bb05edac0262480258fb2e80bd438b45d
SQL
gwcms/gwcms
/sql/2022-12-01-1 gw_order_group_discounts.sql
UTF-8
855
2.609375
3
[]
no_license
ALTER TABLE `gw_order_group` ADD `discount_id` INT NOT NULL AFTER `adm_message`; ALTER TABLE `shop_discountcode` ADD `singleuse` TINYINT NOT NULL AFTER `create_order_id`, ADD `use_count` INT NOT NULL AFTER `singleuse`; ALTER TABLE `gw_order_group` ADD `amount_coupon` FLOAT NOT NULL AFTER `amount_shipping`; ALTER TABL...
true
b08546813ac639c1649ecfc7d3db389db4d31cd8
SQL
KatelynRains/sqlscripts
/students-majors.sql
UTF-8
137
2.90625
3
[]
no_license
Select * from dbo.Student s left join dbo.Major m on s.MajorId = m.Id where GPA not between 3.5 and 3.99 order by GPA desc, SAT desc
true
89f3f55cf3865660c83cef6f9c640c83753b0e90
SQL
CUBRID/cubrid-testcases
/sql/_13_issues/_13_2h/cases/bug_bts_12608_datetime.sql
UTF-8
1,567
3.1875
3
[ "BSD-3-Clause" ]
permissive
--test cases from qa --test: datetime type column with function as default value --1. NOW() drop table if exists t1; create table t1( a int primary key, b int, c datetime default NOW() ); merge into t1 A using db_root B on (A.a=1) WHEN MATCHED THEN UPDATE SET c=default WHEN NOT MATCHED THEN INSERT (A.a, A.b) VALUES(1...
true
6bc51bd2daf9153250f39fc431941fbfc87a4b92
SQL
iamabhishek98/RideShare
/SQL/schema_code.sql
UTF-8
4,337
3.96875
4
[]
no_license
-- drop table if exists users CASCADE; drop table if exists driver CASCADE; drop table if exists passenger CASCADE; drop table if exists vehicles CASCADE; drop table if exists drives CASCADE; drop table if exists message CASCADE; drop table if exists advertisesTrip CASCADE; drop table if exists bid CASCADE; drop table ...
true
8c0b3f7282adb2e0023e99bdc56509262fc60de7
SQL
daniel-wenzel/polonius
/2_entity-clustering/erc20/heuristicComputer/sql/labelTransfers.sql
UTF-8
595
3.078125
3
[]
no_license
UPDATE Transfer SET isIntoDepositAddress = 1 WHERE Transfer.`to` in (SELECT address FROM Address WHERE isDepositAddress = 1); UPDATE Transfer SET isIntraCapp = 1 WHERE Transfer.`from` in (SELECT address FROM Address WHERE isCappReceiver = 1 OR isDepositAddress = 1 OR isCappStorage = 1 OR isCappOther = 1) and ...
true
d75b024780a26124907d0dc4e50bb44dc1eb8564
SQL
kuldeep-k/CodeCompare
/data/prog_lang.sql
UTF-8
4,770
3.1875
3
[ "BSD-3-Clause" ]
permissive
-- MySQL dump 10.13 Distrib 5.1.69, for debian-linux-gnu (i686) -- -- Host: localhost Database: prog_lang -- ------------------------------------------------------ -- Server version 5.1.66-0ubuntu0.11.10.2 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@C...
true
9e04a8eb0a31686b0e4c40f6c5f67ba803168038
SQL
sarvan2190/MIOT-INS
/TRANSACTION_MIG/JSON_VIEWS/05_vAirPatientAdditionalDetails.sql
UTF-8
8,166
3.421875
3
[]
no_license
CREATE VIEW vAirPatientAdditionalDetails AS SELECT ( SELECT (SELECT pa.guid as'_id.$oid', (SELECT TOP 1 GUID FROM ReferenceValue WHERE uid=pa.PAALIUID) as 'aliastypeuid.$oid', (SELECT TOP 1 ValueCode FROM Referenc...
true
eeda7637714090c3fde808e2e33296eaca12612d
SQL
cbttrevor/mysql-table-partition
/02-generate-data.sql
UTF-8
1,295
2.96875
3
[]
no_license
-- Insert Denver location DROP PROCEDURE IF EXISTS cbtpart.addRows; DELIMITER // CREATE PROCEDURE cbtpart.addRows () MODIFIES SQL DATA BEGIN SET @current_count = 0; WHILE @current_count < 300 DO INSERT INTO cbtpart.races (firstName, timeInSeconds, location) VALUES ROW('Trevor', 200, 'Denver'); ...
true
41c5e1e065c19aef60198936323e1958230a0c4f
SQL
0x50Fc/golang
/features/member/sql/v1.0.sql
UTF-8
541
2.953125
3
[ "MIT" ]
permissive
CREATE TABLE IF NOT EXISTS `member_member` ( id BIGINT NOT NULL AUTO_INCREMENT #ID ,`bid` BIGINT DEFAULT 0 #[字段] 商户ID ,`uid` BIGINT DEFAULT 0 #[字段] 成员ID ,`title` VARCHAR(255) DEFAULT '' #[字段] 备注名 ,`keyword` VARCHAR(2048) DEFAULT '' #[字段] 搜索关键字 ,`options` JSON DEFAULT NULL #[字段] 其他数据 ,`ctime` BIGINT DEFA...
true
0e33fbafaba1de7d02a204b3a1361b0778d0b630
SQL
prodigasistemas/gsan-migracoes
/comercial/scripts/20160818203230_adiciona_coluna_de_grau_de_abastecimento_nas_tabelas_de_imovel.sql
UTF-8
1,054
2.8125
3
[]
no_license
-- // adiciona coluna de grau de abastecimento nas tabelas de imovel -- Migration SQL that makes the change goes here. alter table cadastro.imovel add column imov_percentual_abastecimento smallint; alter table cadastro.imovel_atlz_cadastral add column imac_percentual_abastecimento smallint; alter table atual...
true
be93af742f255b271f42b009d081caf575404461
SQL
choo95dev/schooladmin
/javascript/database/DDL.sql
UTF-8
1,593
4.09375
4
[]
no_license
CREATE DATABASE IF NOT EXISTS school_administration_system; USE school_administration_system; CREATE TABLE teacher( id INT UNSIGNED AUTO_INCREMENT PRIMARY KEY, name varchar(100), email varchar(50) UNIQUE, updatedAt datetime, createdAt datetime ); CREATE TABLE student( id INT UNSIGNED AUTO_INCREMENT...
true
16953b5375c60d816da6c4db459f84ebaa665e1a
SQL
silence-do-good/stress-test-Postgres-and-MySQL
/dump/low/day12/select0303.sql
UTF-8
264
2.890625
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='WiFiAP' AND sen.id=ci.SENSOR_ID AND ci.INFRASTRUCTURE_ID=ANY(array['1422','4211','3100_7','2082','6024','1423','5081','6084','2231','3051'])
true
18d07a75da1d3082123a9c839362ffbd1cf5bd1a
SQL
WillZWL/shop
/admincentre/dbv/data/schema/delivery_time.sql
UTF-8
1,558
3.375
3
[]
no_license
CREATE TABLE `delivery_time` ( `id` int(11) NOT NULL AUTO_INCREMENT, `scenarioid` int(11) NOT NULL COMMENT 'id in lookup_delivery_scenario', `country_id` char(2) NOT NULL COMMENT 'International country code (2 characters)', `ship_min_day` int(3) NOT NULL COMMENT 'min ship days (dispatch)', `ship_max_day` int(...
true
914743ee368cd5b76922a2c41580942a329831e6
SQL
radtek/abs3
/sql/mmfo/bars/Table/kf77.sql
WINDOWS-1251
4,528
2.921875
3
[]
no_license
PROMPT ===================================================================================== PROMPT *** Run *** ========== Scripts /Sql/BARS/Table/KF77.sql =========*** Run *** ======== PROMPT ===================================================================================== PROMPT *** ALTER_POLICY_INFO...
true
3eaac0c0c63cf6fcee3ab1e649026da793ae3677
SQL
MikeRena77/sdlw
/SQL/Executables/MainPerlScripts/selectEnv2Creator.sql
UTF-8
225
2.84375
3
[]
no_license
select envobjid, environmentname, harenvironment.creationtime, username, realname from harenvironment, haruser where harenvironment.creatorid = haruser.creatorid order by username;
true
95435a1079cefb4351bb6a0d241af32afdc2110a
SQL
eugenicon/testTasks
/shopfactory/src/main/resources/createdb.sql
UTF-8
1,033
3.984375
4
[]
no_license
drop database if exists dbshops; create database dbshops; use dbshops; create table shop ( id int not null auto_increment, name varchar(100) not null, primary key (id) ); create table category ( id int not null auto_increment, name varchar(100) not null, id_shop int not null, primary key (id), foreign k...
true
02482a80b3007feb4713e5db4713d84228eb4839
SQL
AndreMessi/skripsiBE
/service_category.sql
UTF-8
1,464
2.96875
3
[ "MIT" ]
permissive
-- phpMyAdmin SQL Dump -- version 4.6.6deb5 -- https://www.phpmyadmin.net/ -- -- Host: localhost:3306 -- Generation Time: Jan 01, 2020 at 03:23 AM -- Server version: 10.3.17-MariaDB-1 -- PHP Version: 7.2.9-1 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CH...
true
8d651fbecaf431a0a7b29cb0fbff02eeaedd3773
SQL
yefc/CBOE
/subprojects/Classic/Consulting/DFCI/ChemInv/config/oracle_install_scripts/Create_blank_ChemInv_DB/sql/PLSQL/Functions/f_UpdatePhysPlateType.sql
UTF-8
2,973
3.71875
4
[]
no_license
-- UpdatePhysicalPlateType CREATE OR REPLACE FUNCTION "UPDATEPHYSPLATETYPE" (pPhysPlateId IN inv_physical_plate.phys_plate_id%Type, pGridFormatId IN inv_physical_plate.grid_format_id_fk%Type, pPhysPlateName IN inv_physical_plate.phys_plate_name%Type, pRowCount IN inv_grid_format.row_count%Type, pColCount ...
true
b4918f82ee56bb35cf8cdfe5059993f4407b2091
SQL
zuoxiaojun/sql
/数据库导入导出.sql
GB18030
1,104
3.078125
3
[]
no_license
/* oracleݿ⵼ */ --1û CREATE USER NC20190521 IDENTIFIED BY 1 DEFAULT TABLESPACE NNC_DATA01 TEMPORARY TABLESPACE temp; GRANT connect,dba to NC20190521; --2Ŀ¼ѯѾĿ¼ create or replace directory expdp_dir as 'D:\';--· select * from dba_directories; --3ȨûдĿ¼Ȩ grant read,write on directory expdp_dir to NC20190521; --쵼䣨ҪcmdִУ ...
true
ec21a6cbdafb6173b21b91f60643f66e989fe892
SQL
kxjl168/gsvr
/gserver.sql
UTF-8
23,534
3.015625
3
[]
no_license
/* Navicat MySQL Data Transfer Source Server : 10.204.37.192-消息服务器web3 Source Server Version : 50629 Source Host : 10.204.37.192:3306 Source Database : gserver Target Server Type : MYSQL Target Server Version : 50629 File Encoding : 65001 Date: 2017-12-15 17:17:15 */ ...
true
6a4b744cbaaf543271b5a428e8999c788da454d7
SQL
DavidBarbosa425/BancoDeDadosMySQL-CV
/Aula013/F_join_3Entidades.sql
UTF-8
555
3.703125
4
[ "MIT" ]
permissive
use cadastro; create table gafanhotos_assiste_cursos ( id int not null auto_increment, data date, idgafanhoto int, idcurso int, primary key(id), foreign key(idgafanhoto) references gafanhotos(id), foreign key(idcurso) references cursos(idcurso) ) default charset = utf8; insert into gafanhotos_assiste_cursos values (...
true
263423892466d231898c71ab95dae5866b57f7c0
SQL
sonnerberg/jsramverk-backend
/db/migrate.sql
UTF-8
308
3.25
3
[]
no_license
CREATE TABLE IF NOT EXISTS users ( email VARCHAR(255) NOT NULL, password VARCHAR(60) NOT NULL, UNIQUE(email) ); CREATE TABLE IF NOT EXISTS texts ( kmom VARCHAR(10) NOT NULL, text VARCHAR NOT NULL, link VARCHAR(30) NOT NULL, UNIQUE(kmom), CHECK(like('%github.com%', link)) );
true
5bede9823027b8ed2c0d8e364d7eb419b2fd5dd3
SQL
WardahSuhaim/ensembl-production
/modules/t/test-genome-DBs/multi/compara/table.sql
UTF-8
35,272
3.25
3
[ "Apache-2.0" ]
permissive
CREATE TABLE `CAFE_gene_family` ( `cafe_gene_family_id` int(10) unsigned NOT NULL AUTO_INCREMENT, `root_id` int(10) unsigned NOT NULL, `lca_id` int(10) unsigned NOT NULL, `gene_tree_root_id` int(10) unsigned NOT NULL, `pvalue_avg` double(5, 4 ) DEFAULT NULL, `lambdas` v...
true
8b9e635f4ff9f620b42bc5fb6195c53ecc3d633c
SQL
Diegoferreiradev/Oracle_PL-SQL
/Capítulo 13/Secao_25.sql
UTF-8
3,733
4.15625
4
[]
no_license
SELECT COD_ALUNO, TRUNC(DATA), SUM(DESCONTO) DESCONTO, SUM(TOTAL) TOTAL FROM TCONTRATO GROUP BY ROLLUP( COD_ALUNO, TRUNC(DATA) ); -- SELECT COD_ALUNO, CASE WHEN TRUNC(DATA) IS NULL AND COD_ALUNO IS NOT NULL THEN 'SUB-TOTAL' WHEN COD_ALUNO IS NULL ...
true
b9c1e515b591e60a82456841d7ef6c82493c5084
SQL
AprameyaGupta/vedisoft-backend-restapi
/New.sql
UTF-8
11,155
3.15625
3
[]
no_license
CREATE DATABASE IF NOT EXISTS `vedisoft` /*!40100 DEFAULT CHARACTER SET latin1 */; USE `vedisoft`; -- MySQL dump 10.13 Distrib 5.5.62, for debian-linux-gnu (x86_64) -- -- Host: 127.0.0.1 Database: vedisoft -- ------------------------------------------------------ -- Server version 5.5.62-0ubuntu0.14.04.1 /*!40101...
true
1a32632e2002f301aaf8f8f796b1c7201fde8eec
SQL
jgarzonext/plsql-testing
/script_plsql/bd_iaxis/script/tables/PAGOS_MASIVOSDET.sql
ISO-8859-1
1,979
2.984375
3
[]
no_license
-------------------------------------------------------- -- DDL for Table PAGOS_MASIVOSDET -------------------------------------------------------- CREATE TABLE "AXIS"."PAGOS_MASIVOSDET" ( "SPAGMAS" NUMBER(10,0), "NUMLIN" NUMBER(6,0), "SPERSON" NUMBER(10,0), "SSEGURO" NUMBER, "NRECIBO" NUMBER(9,0), "F...
true
6aeb500fbca9f4573175d24b7f557c83643e8216
SQL
97-Istanbul-PHP-Laravel-Bootcamp/hafta-1-odev-tarikkamat
/db.sql
UTF-8
2,309
3.328125
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 5.0.2 -- https://www.phpmyadmin.net/ -- -- Anamakine: 127.0.0.1:3306 -- Üretim Zamanı: 17 Tem 2021, 07:12:50 -- Sunucu sürümü: 8.0.21 -- PHP Sürümü: 7.3.21 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@C...
true
ba0b1fec6ca2b52158dfd2325d7646a100c7b06e
SQL
wzl1898/MovieSite
/movieSite.sql
UTF-8
616
2.796875
3
[]
no_license
CREATE TABLE movies( id INT PRIMARY KEY, `name` VARCHAR(40), director VARCHAR(40), location VARCHAR(40), actor VARCHAR(40), filmedTime DATE ); INSERT INTO movies(id, `name`, director, location, actor, filmedTime) VALUES(1, '唐人街探案3', '陈思诚', '中国大陆', '王宝强', '2021-02-12'); INSERT INTO ...
true
425e7c099f21ae569e3baafc1c772903572f5965
SQL
ztpence/Hot-Restaurant
/restaurant.sql
UTF-8
993
3.203125
3
[]
no_license
DROP DATABASE IF EXISTS restaurant; CREATE database restaurant; USE restaurant; CREATE TABLE reservation ( res_id INT NOT NULL AUTO_INCREMENT, last_name VARCHAR(100) NULL, first_name VARCHAR(100) NULL, email VARCHAR(100) NULL, people INT NULL, phone INT NULL, PRIMARY KEY (res_id) ); SELECT * FROM reser...
true
e3b34343a28f32875e0fb8179c8f855d76aaf516
SQL
tiagoboaventuramiranda/OracleII
/exemploCursorOtimizado.sql
UTF-8
314
2.90625
3
[]
no_license
SELECT * FROM CLIENTE; DECLARE CURSOR CUR_CLIENTE IS SELECT ID FROM CLIENTE; V_SEGMERCADO_ID CLIENTE.SEGMERCADO_ID%TYPE := 1; BEGIN FOR CLI_REC IN CUR_CLIENTE LOOP ATUALIZAR_SEGMERCADO(P_SEGMERCADO_ID => V_SEGMERCADO_ID, P_ID => CLI_REC.ID); END LOOP; END;
true
c0962075a6aafe0607826cc0304e0217d3c9b4fc
SQL
rajkowski/crm-platform
/src/sql/postgresql/upgrade/2007-09-27-script01-mr.sql
UTF-8
1,136
3.71875
4
[ "LicenseRef-scancode-warranty-disclaimer" ]
no_license
CREATE TABLE lookup_payment_status ( code SERIAL PRIMARY KEY, description VARCHAR(300) NOT NULL, default_item BOOLEAN DEFAULT false, level INTEGER DEFAULT 0, enabled BOOLEAN DEFAULT true ); ALTER TABLE order_payment ADD order_item_id INT REFERENCES order_product(item_id); ALTER TABLE order_payment ADD histor...
true
043ba1965166b29605021c0c2369c8b40d404292
SQL
olegtaranenko/prsrc
/dbupdate-parent/prior/src/main/liquibase/triggers/OrdersEquip.wf_lastModified_delete.sql
UTF-8
390
3.3125
3
[]
no_license
if exists (select 1 from systriggers where trigname = 'wf_lastModified_delete' and tname = 'OrdersEquip') then drop trigger OrdersEquip.wf_lastModified_delete; end if; create TRIGGER wf_lastModified_delete before delete order 2 on OrdersEquip referencing new as new_name for each row begin update orders o...
true
b633dc7465745050aa4b9858ff2f79b61d7f6f6c
SQL
mominabhi/cineplex
/database/cineplex.sql
UTF-8
15,176
3.171875
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.8.0.1 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Oct 27, 2018 at 11:40 AM -- Server version: 10.1.32-MariaDB -- PHP Version: 7.2.5 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @O...
true
be6464fa2c67c2a093c9bfffb6cb9326e6dea95b
SQL
Nikunj3121994/finansii
/api/app/database/seeds/CompaniesSeed.sql
UTF-8
1,971
2.609375
3
[ "MIT" ]
permissive
SET FOREIGN_KEY_CHECKS=0; INSERT INTO `companies` (`company_code`, `company_name`, `company_short_name`, `company_address`, `municipality_code`, `settlement_code`, `street_code`, `telephone1`, `telephone2`, `fax`, `mail`, `owner`, `authorized`, `activity`, `id_number`, `tax_code`, `tax_payer`,`user`) VALUES ('002', 'Co...
true
037b180625f1a01d20663271d262dfe204eb214a
SQL
bellmit/dbSmellsData
/data/open-source/extracted_sql/TCA-Team_TumCampusApp.sql
UTF-8
3,077
3.5625
4
[ "MIT" ]
permissive
SELECT dishName,mensaId FROM favorite_dishes WHERE date = date('now','localtime') SELECT answerid FROM openQuestions WHERE question = ? UPDATE chat_room SET room=?, joined=1, members=? WHERE name=? AND semester_id=? SELECT * FROM tumLocks WHERE url=? CREATE TABLE IF NOT EXISTS openQuestions (question INTEGER PRIMARY K...
true
b836cfff09812724b7213569207828daf1a3f2cf
SQL
gksfk6165/JavaWork
/Lec_DBMS/04_SingleRowFunction/SingleRow2_Null.sql
UTF-8
1,494
3.90625
4
[]
no_license
SELECT * FROM T_PROFESSOR ; SELECT NAME ,PAY ,BONUS , PAY +BONUS FROM T_PROFESSOR ; SELECT SUM(pay),sum(BONUS) FROM T_PROFESSOR ; SELECT NAME ,PAY ,BONUS FROM T_PROFESSOR ; SELECT NAME ,PAY ,BONUS ,PAY+NVL(BONUS,0) AS 총지급액 FROM T_PROFESSOR ; -- #4201) Professor 테이블 : 101번 학과 교수들의 이름(name), 급여(pay), 보너스(bonus ), 연봉(pay...
true
558a487ae26efeabb522cea6fc9ef19c4c3ba8a1
SQL
zetayue/wiZAN
/fascinate/dataprep/script/gene_disease.sql
UTF-8
207
2.71875
3
[]
no_license
CREATE TABLE gene_disease( gene_index INT(10) UNSIGNED NOT NULL, disease_index INT(10) UNSIGNED NOT NULL, status VARCHAR(255), PRIMARY KEY(gene_index, disease_index), UNIQUE KEY(gene_index, disease_index));
true
175b1dcde3deab54f1ac0634fd8d4149fd6c58d5
SQL
ASlayton/ChinookQueries
/ChinookQuery15.sql
UTF-8
388
3.015625
3
[]
no_license
use Chinook /*********************************************************** Number 15 Provide a query that shows the total number of tracks in each playlist. The Playlist name should be include on the resulant table. ************************************************************/ select PlaylistId as PlaylistId, co...
true
f7dd83d239849367548103e6c7e53eae29360058
SQL
bujanvdv/MySQl_base
/lesson_6_vk_Eduard_Buyanov.sql
WINDOWS-1251
1,514
3.890625
4
[]
no_license
/* , , . . * vk , :*/ -- ____________________________________________________________________________________________________________ /* . , * .*/ use vk; SELECT from_user_id, count(*) FROM messages WHERE to_user_id = 2 GROUP BY from_user_id ORDER BY count(*) DESC LIMIT 1 ...
true
872026d9c62e0e74bc8a98640f7879caefbd9dc0
SQL
ferisagaragu/expenditure-web
/trash/procedures.sql
UTF-8
14,041
4.15625
4
[]
no_license
use expenditure; DELIMITER // create procedure login(in userP varchar(300), in passwordP varchar(300)) begin SELECT id,user,CONVERT(AES_DECRYPT(password,'root') USING utf8) as password,email,active,firstname,lastname FROM users where (user = userP and CONVERT(AES_DECRYPT(password,'root' )USING utf8) = passwordP)...
true