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
8fc383c0993a2c43035c462068f055fe72459bee
SQL
anaxkokan/hackerrank-sql
/weather_observation_station_10.sql
UTF-8
153
2.578125
3
[]
no_license
-- https://www.hackerrank.com/challenges/weather-observation-station-10/problem select distinct CITY from STATION where CITY regexp ('[^aeiou]$');
true
4c200b5bbdbdf34bfc56ed42755b02c8b3a82e69
SQL
RobCardenas/w7_apartment_lab_sql
/apartmentlab.sql
UTF-8
309
2.890625
3
[]
no_license
DROP DATABASE IF EXISTS apartmentlab; CREATE DATABASE apartmentlab; -- owners table CREATE TABLE owners ( id SERIAL PRIMARY KEY, name VARCHAR(255), age INTEGER ); -- properties table CREATE TABLE properties ( id SERIAL PRIMARY KEY, name VARCHAR(255), num_units INTEGER, owner_id INTEGER REFERENCES owners );
true
c5a026dcfea3ad2658b41137af4cb7ff37b541b3
SQL
exprezzo/coral_erp
/criadero/criadero.sql
UTF-8
2,673
2.90625
3
[]
no_license
/* Navicat MySQL Data Transfer Source Server : localhost_3306 Source Server Version : 50508 Source Host : localhost:3306 Source Database : erp_id51_conecarne Target Server Type : MYSQL Target Server Version : 50508 File Encoding : 65001 Date: 2014-01-19 19:40:11 */ SET FOREIGN_KEY...
true
fdbafeef2b536a891a5cfd966102ea5092d7f39a
SQL
NikitaDev14/PostDesk
/post_desk.sql
UTF-8
2,906
3.625
4
[]
no_license
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 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; /*!40101 SET NAMES utf8 */; DROP TABLE IF EXISTS `c...
true
2146198b96e0f1071027dab3cf018314a28de436
SQL
TsvetomirAleksandrov/Software-University
/Databases Basics - MS SQL Server - May 2020/04.BuiltInFunctions/04.BuiltInFunctions/08.CreateViewEmployeesHiredAfter.sql
UTF-8
132
3.046875
3
[]
no_license
CREATE VIEW v_EmployeesHiredAfter2000 AS SELECT e.FirstName, e.LastName FROM Employees AS e WHERE YEAR(e.HireDate) > 2000
true
3572c6f51ca23474b45b8a09e639d4fd366d2239
SQL
CSubmerged/CostcutterTechnicalTest
/SQL-Test/SQLTest2.sql
UTF-8
244
3.453125
3
[]
no_license
#2. The total value of all invoices settled in April 2020 SELECT SUM(invoice_value) FROM practicaltest.invoices WHERE settlement_date BETWEEN '2020/04/01' AND '2020/05/01'; # BETWEEN is inclusive for the first date, but exclusive for the second
true
3fed85ec24a5b118f7ada2e98e97869678c5272b
SQL
yogitasn/SpringBoard-DE-Projects
/EuroCup SQL Mini Project/sql_q3_sol.sql
UTF-8
238
2.9375
3
[]
no_license
USE euro_cup_2016; /* Write a SQL query to find the match number, date, and score for matches in which no stoppage time was added in the 1st half.*/ SELECT match_no, play_date, goal_score FROM match_mast WHERE stop1_sec=0;
true
716b5a66ec669741a31235c552b5f3cc10d3d32b
SQL
Zerakul/JavaFX-Final-Project
/Project/place.sql
UTF-8
76
2.59375
3
[]
no_license
select count(avg) from student where dept = 'Mathematics' and avg > 80
true
b6aaa580a926355bf4e5c164214bd39287c44fde
SQL
afernandezjr/DB2
/Finals/json-orders-finals/E.sql
UTF-8
99
2.5625
3
[]
no_license
SELECT SUM ( CAST( info ->'items' ->> 'qty' AS INTEGER ) ) AS "TOTAL" FROM "030320".orders
true
801f541c263092fb093dca0e47e2888bbd779726
SQL
radtek/abs3
/sql/mmfo/bars/Table/kodobl.sql
UTF-8
3,367
2.84375
3
[]
no_license
PROMPT ===================================================================================== PROMPT *** Run *** ========== Scripts /Sql/BARS/Table/KODOBL.sql =========*** Run *** ====== PROMPT ===================================================================================== PROMPT *** ALTER_POLICY_INFO...
true
c1ab8a5015ce822955bc3d0e8974ef7a88be8c52
SQL
insaiyann/project-park
/sql/user_auth.sql
UTF-8
1,460
2.90625
3
[]
permissive
-- phpMyAdmin SQL Dump -- version 5.0.2 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Nov 18, 2020 at 03:19 AM -- Server version: 10.4.14-MariaDB -- PHP Version: 7.4.10 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIE...
true
d1453716fe2756673116a1865bd541b496d458f5
SQL
usbr/HDB
/check_data_consistency/work/check_bmdc_elevation.sql
UTF-8
2,842
3.953125
4
[ "Apache-2.0", "LicenseRef-scancode-warranty-disclaimer" ]
permissive
-- Query to check on consistency between Hydromet Dayfile (GOES) data -- and SCADA data for Blue Mesa Elevation -- command line argument for number of days to search back define days_back = 10 -- &1 avoid endless repetition of annoying warnings; -- setup output set feedback off set pagesize 9999 set linesize 100 set...
true
7d7e525a75cbf5b3a84eb1b61e5b705fcb881588
SQL
jampaniuday/scripts-2
/oracle/ETL/advanced_replication/2_Add_tbl/add_table.sql
UTF-8
3,202
2.578125
3
[]
no_license
set ver off spo .\temp\&1._&2._&3..lst CONNECT REPADMIN/REP095@&1 DECLARE use_existing_object BOOLEAN:= SYS.DIUTIL.int_to_bool (1); retry BOOLEAN := SYS.DIUTIL.int_to_bool (0); copy_rows BOOLEAN := SYS.DIUTIL.int_to_bool (0); BEGIN DBMS_REPCAT.create_master_repobject ('&2.', ...
true
ac35788d4f6f477b1f3563f1f2909f6496bf3fa4
SQL
dardanbakiu/bibloteka89
/biblotekistat.sql
UTF-8
1,976
3.046875
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 5.0.2 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Jan 25, 2021 at 04:42 PM -- Server version: 10.4.13-MariaDB -- PHP Version: 7.2.32 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIE...
true
9a89f847436d01e2f8390d13df46b429bfb6c7f7
SQL
gaoweidong11/MySQL
/sql/178.sql
UTF-8
1,984
3.890625
4
[]
no_license
# 1.显示所有好友基本信息,包括: # 姓名 # 性别 # 生日 # 手机 # 住址 # 微信 # QQ # 工作或学习的地点 # 爱好 # 认识时间 # 认识方式 # 特点 # 亲密程度 (亲密-一般:1-10) DROP TABLE IF EXISTS db_ceshi.friends; CREATE TABLE db_ceshi.friends ( id INT(10) NOT NULL UNIQUE PRIMARY KEY COMMENT 'id PK', name ...
true
103e2d28894b5ec5ec3d064f1dc448eccc787078
SQL
matheusolivesilva/stock-control-with-pdo
/database.sql
UTF-8
806
3.5625
4
[]
no_license
CREATE DATABASE stock; USE stock; CREATE TABLE categories ( id INT NOT NULL AUTO_INCREMENT, name VARCHAR(50) NOT NULL, PRIMARY KEY(id) ); CREATE TABLE products ( id INT NOT NULL AUTO_INCREMENT, name VARCHAR(150) NOT NULL, price DOUBLE(9,2) NOT NULL, quantity INT NOT NULL, category_id INT NOT NULL, ...
true
916fd72672feb7652f02f7340569828e19190c9f
SQL
WillyamThiele/AtividadesDDR
/aluno_prof_curso.sql
UTF-8
294
3.484375
3
[]
no_license
create table aluno_prof_curso( id int not null auto_increment, cd_prof_curso int not null, cd_aluno int not null, primary key(id), constraint aluno_prof_curso_aluno FOREIGN key (cd_aluno) references aluno(id), constraint aluno_prof_curso FOREIGN key (cd_prof_curso) references prof_curso(id) )
true
8e18511a70d2a5d63a9deedfaf0b09ba35d26ead
SQL
gracehwang9584/SQL-Marketing-Analysis
/Seasonality Analysis.sql
UTF-8
1,622
4.5
4
[]
no_license
USE mavenfuzzyfactory; SELECT * FROM website_pageviews; SELECT * FROM website_sessions; SELECT * FROM orders; -- #1 SELECT YEAR(A.created_at) AS yr, MONTH(A.created_at) AS mo, COUNT(DISTINCT(A.website_session_id)) AS sessions, COUNT(DISTINCT(order_id)) AS orders FROM website_sessions AS A LEFT...
true
cd510bf694edf376f8d14a6c42ca62815d1db2b5
SQL
AndoniAlonso/GesCom
/DataBase/GestionComercial/dbo.vAlbaranCompraPendientes.VIW
UTF-8
790
3.375
3
[]
no_license
SET QUOTED_IDENTIFIER OFF GO SET ANSI_NULLS ON GO CREATE VIEW dbo.vAlbaranCompraPendientes AS SELECT AlbaranCompraItems.Situacion, AlbaranCompraItems.AlbaranCompraItemID AS DocumentoID, AlbaranesCompra.Numero, Materiales.CODIGO AS Nombre, Materiales.NOMBRE AS Descripcion, AlbaranCompraItems.Canti...
true
638e3ec2b239200ce48b957804e2f7f6ac6da07f
SQL
GabrielPK/COEN_178_Final_Project
/t1.sql
UTF-8
1,305
3.78125
4
[]
no_license
CREATE OR REPLACE Procedure t1(branch_num in VARCHAR) As manager_name employee.name%type; Cursor prop_cur IS SELECT prop_id,street,city,zip,monthly_rent,num_rooms FROM property WHERE status='available' AND prop_id IN (SELECT prop_id FROM manages WHERE supervisor_id IN (SELECT employee_id FROM employs WHERE bran...
true
05895b2d35e8ef720325267f5b906f5dd665120f
SQL
diegorendon/workshop-01-devdocker
/src/main/resources/db/migration/V1__Create_Reservations_Table.sql
UTF-8
663
3.546875
4
[]
no_license
-- This DDL is used by flyway to initially setup the table -- which will hold the reservation entries -- CREATE SEQUENCE reservation_id_seq; -- Simple table for holding reservations create table public.reservation ( -- id for this table id integer NOT NULL DEFAULT nextval('reservation_id_seq'), -- res...
true
5e229f23f25aad46a0d60abaf8f6ac354a14a4a8
SQL
mh-developer/Avtokampi-WebAPI
/code/setup/postgres-container-setup/postgres/data/data.sql
UTF-8
14,564
3.375
3
[]
no_license
-- MySQL Script generated by MySQL Workbench -- Fri Nov 15 19:22:25 2019 -- Model: New Model Version: 1.0 -- MySQL Workbench Forward Engineering /* SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0; */ /* SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0; */ /* SET @OLD_SQL_MODE=@@SQL_MOD...
true
af3bbc44dda7fc3251813ba557368f92896da6d3
SQL
leReal/srp
/protected/modules/paiement/extentions/ireport/protected/data/schema.mysql.sql
UTF-8
2,601
3.234375
3
[]
no_license
CREATE TABLE IF NOT EXISTS `sample1` ( `no` int(11) NOT NULL AUTO_INCREMENT, `date` date NOT NULL, `itemname` varchar(30) NOT NULL, `qty` int(11) NOT NULL, `uom` varchar(10) NOT NULL, PRIMARY KEY (`no`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=7 ; INSERT INTO `sample1` (`no`, `date`, `itemn...
true
d97803bb6a4014d56d623390f0e631eaa57cae95
SQL
Feriixu/aia2_17
/DB/DDL Sportverein/SimonTobiEmreMark_SportvereinDB/SportvereinSQLSimonEmreMark.sql
UTF-8
972
3.46875
3
[]
no_license
mysql -u root create database db_sportverein; use db_sportverein; create table mitglied ( MitgliedNr int, Altersgruppe varchar(255), KontoNr int, Name varchar(255), Eintragsdatum date, primary key (MitgliedNr), foreign key (KontoNr) references Konto (KontoNr), foreign key (StufeNr) references altersstufe (StufeNr) )...
true
1571baed4312cbb5df0da0e3d1c1f0cf11116956
SQL
MavonCmc/PatentsView-DB
/resources/granted_patent_database.sql
UTF-8
911
2.515625
3
[]
no_license
{% set target_database = params.database %} {% set dbdate= execution_date+macros.timedelta(days=7) %} {% set year = dbdate.strftime('%Y') %} {% if params.add_suffix %} {% set target_database = target_database + dbdate.strftime('%Y%m%d')|string %} {% endif %} DROP TRIGGER if exists `{{target_datab...
true
26ba851e1f0df601ea9893e673cbd0761ad89ce1
SQL
BrunoBastos97/EventManager
/GerenciadorDePessoasDB.sql
UTF-8
2,459
3.546875
4
[]
no_license
create database gerenciador_de_pessoas; use gerenciador_de_pessoas; create table pessoas( id int auto_increment primary key, nome varchar(50) not null, sobreNome varchar(50) not null ); create table salasEventos( id int auto_increment primary key, nome varchar(50) not null, lotacao int not null...
true
9351c80505e24a94af1df936706b407b20e8efe8
SQL
pbarford/sandboxes
/akka-streams/init-cassandra.cql
UTF-8
852
3.125
3
[]
no_license
USE docker_dev; DROP TABLE selection_bet; DROP TABLE bet; DROP TABLE multi_bet; CREATE TABLE selection_bet ( selection_id text, bet_id text, sub_key text, bet_timestamp bigint, action text, stake double, price_type text, price double, bet_type text, cur text, PRIMARY KEY ((selection_id), bet_id,...
true
4c864c7af9517e8554220bae887f4857e3d2606c
SQL
ldb358/Nexus
/config/nexus.sql
UTF-8
5,878
3.328125
3
[ "Apache-2.0" ]
permissive
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 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; /*!40101 SET NAMES utf8 */; CREATE TABLE IF NOT EXIST...
true
3e8ef75c529cb3c51150ef7d6c42109002ec4ab2
SQL
giannini5/fields
/trunk/src/db/schedule/upgrade/052_addDateTimeIndexToGame.sql
UTF-8
653
3.5
4
[ "MIT" ]
permissive
drop procedure if exists 052_addDateTeamIndexToGame; delimiter $$ create procedure 052_addDateTeamIndexToGame() begin if not exists( select * from information_schema.statistics where TABLE_SCHEMA = DATABASE() and TABLE_NAME = 'game' and i...
true
30dfdefcb70dabe696fe681f1a3e3296c2776eb4
SQL
jackas779/sena
/base de datos/productos.sql
UTF-8
1,853
3.09375
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 3.5.1 -- http://www.phpmyadmin.net -- -- Servidor: localhost -- Tiempo de generación: 27-10-2020 a las 21:02:22 -- Versión del servidor: 5.5.24-log -- Versión de PHP: 5.4.3 SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARA...
true
7ca1bcdfcf69578e519bad5842998e31f2f8b9a8
SQL
jssfy/bc_study
/database/2016-08-31.patch.sql
UTF-8
332
2.703125
3
[]
no_license
DROP TABLE IF EXISTS `pending_qrcode_requests`; CREATE TABLE `pending_qrcode_requests` ( `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, `account_id` bigint(20) unsigned NOT NULL, `request_time` datetime DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4...
true
3cda7dd2b5f7bd96721f1ae0bc177ba8b61d2bea
SQL
Chelsi-create/sql-scripts
/task1.sql
UTF-8
411
3.734375
4
[]
no_license
USE employees_mod; SELECT emp_no, from_date, to_date FROM t_dept_emp; SELECT DISTINCT emp_no, from_date, to_date FROM t_dept_emp; #Problem1 : Solution in sql SELECT YEAR(d.from_date) AS calendar_year, e.gender, COUNT(e.emp_no) AS num_of_employees FROM t_employees e JOIN t_dept_emp d ON ...
true
03878bdfb699849deb4d92a537a455660379e540
SQL
michaelrondon27/etir_final3
/base de datos/dump.sql
UTF-8
11,097
3.234375
3
[]
no_license
-- -- PostgreSQL database dump -- 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; -- -- Name: plpgsql; Type: EXTENSION; Schema: -; Owner: -- CREATE EXTENSION IF NOT EXISTS plpgs...
true
2477eeea636b33c578673de0252a0d16d69fe1c8
SQL
eyeonechi/software-database-analysis
/src/Question10.sql
UTF-8
1,182
3.921875
4
[ "MIT" ]
permissive
-- ----------------------------------------------------- -- Question 10 -- ----------------------------------------------------- SELECT COUNT(DISTINCT Software.Name) AS SoftwareInstalled FROM Software INNER JOIN Licence INNER JOIN Consumer INNER JOIN ConsumerLocation INNER JOIN Location ON Software.SoftwareId = Licence...
true
a3413f4bfe2a644879f0685f7c66aecd4b35635c
SQL
chengjingming060241/gizwits-lease
/sql/0.6/user_update.sql
UTF-8
644
3.078125
3
[]
no_license
ALTER TABLE `user` CHANGE COLUMN `openid` `openid` VARCHAR(128) CHARACTER SET 'utf8mb4' NULL DEFAULT NULL COMMENT '微信用户的unionId', DROP COLUMN `wx_id`; ALTER TABLE `user_wx_ext` CHANGE COLUMN `user_openid` `user_openid` VARCHAR(60) CHARACTER SET 'utf8mb4' NULL DEFAULT NULL COMMENT '微信用户的unionid,对应user表的openid' , CHANGE...
true
8de57f4c8d27752b02b15963027d32863e8fc7ba
SQL
riyard/pkl
/pkl.sql
UTF-8
11,369
3.109375
3
[ "LicenseRef-scancode-unknown-license-reference", "MIT" ]
permissive
-- phpMyAdmin SQL Dump -- version 5.0.1 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: May 31, 2020 at 05:20 AM -- Server version: 10.4.11-MariaDB -- PHP Version: 7.4.2 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD...
true
5b539f6a7234ebc525663e7794ba00cf5cf53823
SQL
Codeniti/seva_wildlife_ecomm
/seva/New folder/seva_product.sql
UTF-8
1,940
2.859375
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 3.5.2.2 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: Feb 15, 2014 at 12:48 PM -- Server version: 5.5.27 -- PHP Version: 5.4.7 SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /...
true
ba1f272b47ec12c20892adedc6234078714221a0
SQL
mgrossbarth/CMSC-23500
/hw3/q1.sql
UTF-8
142
3.09375
3
[]
no_license
SELECT artistID, fname, lname, min(age_of_death) FROM (SELECT artistID, fname, lname, deathYear-birthYear as age_of_death FROM Artists);
true
6f16072276f14cfa83cc49767601e0fb0a2180ba
SQL
Bekor90/bibliotecav
/sql/respaldodb.sql
UTF-8
24,283
2.859375
3
[ "MIT", "LicenseRef-scancode-unknown-license-reference" ]
permissive
-- -- PostgreSQL database dump -- 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; -- -- Name: plpgsql; Type: EXTENSION; Schema: -; Owner: -- CREATE EXTENSION IF NOT EXISTS plpgs...
true
e5165140b73a7c1ec4ebc87062c21f78ce421f7b
SQL
zyftxdy/The-front-end-practice
/listStructure and listData/listStructure.sql
WINDOWS-1256
12,617
3.4375
3
[]
no_license
-------------------------------------------- -- Export file for user STORE -- -- Created by 12443 on 2019/6/5, 20:14:18 -- -------------------------------------------- set define off spool listStructure.log prompt prompt Creating table USERS prompt ==================== prompt create table STORE.USERS ( ...
true
0d2e3356879d2f948115fd651f3e4ea998e095f4
SQL
qnikst/haskell-fun
/postgres-report/static/01.table-size.sql
UTF-8
330
3.765625
4
[]
no_license
SELECT nspname || '.' || relname AS "relation", pg_size_pretty(pg_total_relation_size(C.oid)) AS "total_size" FROM pg_class C LEFT JOIN pg_namespace N ON (N.oid = C.relnamespace) WHERE nspname NOT IN ('pg_catalog', 'information_schema') AND C.relkind <> 'i' AND nspname !~ '^pg_toast' ORDER BY pg_total_relation_size(C.o...
true
dfe2f36f1ac6f8b2752b265b274c73e7a738ced7
SQL
mzaini30/personal-blog
/blog.sql
UTF-8
2,327
3.078125
3
[ "MIT", "LicenseRef-scancode-unknown-license-reference" ]
permissive
-- phpMyAdmin SQL Dump -- version 4.4.15.9 -- https://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: May 12, 2019 at 07:42 AM -- Server version: 5.6.37 -- PHP Version: 7.1.2 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT *...
true
7a1616a405d6919538f527c3bf25ea3b7614b772
SQL
itkasumy/MySQL
/02-后盾网向军/04-查询约束.sql
UTF-8
1,325
3.703125
4
[]
no_license
-- 修改表结构 alter table stu add birthday date; -- 修改出生日期 update stu set birthday = "1990/07/01"; select * from stu; update stu set birthday = "1992/5/24" where id = 2; update stu set birthday = "1995/6/8" where id = 3; update stu set birthday = "1992/3/12" where id = 4; update stu set birthday = "194/10/24" where id = 5; ...
true
539dd1671cb79f4894e6c09d10050108c8aa42f4
SQL
banhyungil/sql
/select/집계함수.sql
UTF-8
2,427
4.75
5
[]
no_license
select avg(salary), sum(salary) from salaries where emp_no='10060'; select emp_no, avg(salary), sum(salary) from salaries where to_date = '9999-01-01' group by emp_no having avg(salary) > 40000 order by avg(salary) asc; -- 각 사원별로 평균연봉 출력 -- 높은순서대로 select emp_no, avg(salary) from salaries group by emp_no order by avg...
true
0acf3ec3fd924d4ca64369b405ec7a2831379abc
SQL
rasarpmultimedia/ezCMSv1.1.2
/schema/sql_dump_files/ezcmsdb112.sql
UTF-8
15,697
3.15625
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.2.11 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: Mar 27, 2015 at 01:19 PM -- Server version: 5.6.21 -- PHP Version: 5.6.3 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; ...
true
2c9d4db86bb02e98e9ecda3e19929f91cabfbb19
SQL
davidchilds6/data21-final-project-DC-fork
/SQLViews/Weekly_Performance_View.sql
UTF-8
283
3.109375
3
[]
no_license
CREATE VIEW [Weekly Performance] AS SELECT c.candidate_id, wp.week_no, wp.analytic, wp.independent, wp.determined, wp.professional, wp.studious, wp.imaginative FROM candidate c INNER JOIN weekly_performance wp ON wp.candidate_id = c.candidate_id;
true
72c145bf2564b1dac37fad92e5d4326b66a33e53
SQL
fanzaiyang/workflow
/src/main/resources/local-sql/hec_workflow_task_history.sql
UTF-8
1,884
3.359375
3
[]
no_license
-- FINANCE_MAINT.HEC_WORKFLOW_TASK_HISTORY definition CREATE TABLE "HEC_WORKFLOW_TASK_HISTORY" ( "ID" NUMBER(38,0) NOT NULL ENABLE, "PROCESS_INSTANCE_ID" VARCHAR2(200) NOT NULL ENABLE, "PROCESS_DEFINITION_ID" VARCHAR2(200) NOT NULL ENABLE, "PROCESS_DEFINITION_KEY" VARCHAR2(200) NOT NULL ENABLE, "RECEIPT_ID...
true
2757d0dc0e6e1531c4db8628f784d57904acbd86
SQL
nikwalia/schedule-generator
/db/score_schedule_procedure.sql
UTF-8
4,537
4.21875
4
[ "MIT" ]
permissive
CREATE DEFINER=`admin`@`%` PROCEDURE `score_classes`( IN class_data JSON, -- has format '[{"course_id": "course 1", "score": score_of_neural_network}...]' IN credit_limit INT, -- 0 < credit_limit <= 18 IN user_interest VARCHAR(15), -- EX- CS-ENG-HPC, CS-MINOR OUT best_schedule VARCHAR(200), -- has format c...
true
029ced0c3e73ae9acd2c10a24b35861a60e46046
SQL
AugustoBernuy/bd-sesion13
/8_fact_and_dim_tables.sql
UTF-8
11,953
3.03125
3
[]
no_license
--https://github.com/salrashid123/bq-udf-xml --https://stackoverflow.com/questions/50402276/big-query-user-defined-function-dramatically-slows-down-the-query drop function if exists raw_zone2.xml_to_json; CREATE FUNCTION raw_zone2.xml_to_json(a STRING) RETURNS STRING LANGUAGE js AS """ return frmXML(a);...
true
6c3ad465cde6e55a638e8f04b641814e6c040dcc
SQL
deepaksonii-1/gps
/gps_service.sql
UTF-8
1,888
2.84375
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.0.4 -- http://www.phpmyadmin.net -- -- Host: localhost -- Generation Time: Apr 26, 2017 at 11:42 AM -- Server version: 5.6.12-log -- PHP Version: 5.4.12 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT ...
true
a99682a2c4bd38bf9ec330d80265e9f3e65edf0d
SQL
silence-do-good/stress-test-Postgres-and-MySQL
/dump/low/day24/select0357.sql
UTF-8
258
3.25
3
[]
no_license
SELECT infra.name, so.timeStamp, so.occupancy FROM OCCUPANCY so, INFRASTRUCTURE infra WHERE so.timeStamp > '2017-11-23T03:57:00Z' AND so.timeStamp < '2017-11-24T03:57:00Z' AND so.semantic_entity_id = infra.id ORDER BY so.semantic_entity_id, so.timeStamp
true
6b445ba37337082bbfa98b8fe3a831fc9c034eda
SQL
Ed-Fi-Exchange-OSS/Ed-Fi-X-OtisEd-iMart
/src/OtisEd-EdFi-Exchange/adw/Tables/dim_Term.sql
UTF-8
1,353
2.875
3
[ "Apache-2.0" ]
permissive
CREATE TABLE [adw].[dim_Term] ( [Term_Key] INT NOT NULL, [Calendar_Track_Cd] VARCHAR (30) NOT NULL, [Calendar_Track_Desc] VARCHAR (254) NULL, [Calendar_Track_Sort_Order] SMALLINT NULL, [Summer_School_Ind] CHAR...
true
6b87643af6f2100394f3555539b1a47339d86225
SQL
CHNnoodle/PyEtlOld
/ora_sql/需求/图书书目.sql
UTF-8
325
3.125
3
[]
no_license
select x.*, s_end-s_start+1 vdate from ( select trim(replace(substr(CCHQJ,1,instr(CCHQJ,'-',1,1)-1),'/',null)) s_start, trim(replace(substr(CCHQJ,instr(CCHQJ,'-',1,1)+1,length(CCHQJ)),'/',null)) s_end, t.* from TEMP_TS2 t where MARC_ID='0000328474') x select * from TEMP_TS2 t where cchqj like '%...
true
5f3f35264761c2e4d3dfe565f8e7c59992bea24d
SQL
DominikWawreczko/HomeLibrary
/DataBaseToIMPORT/WWW20_WAWRECZKO.sql
UTF-8
2,719
3.03125
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.6.6deb5ubuntu0.5 -- https://www.phpmyadmin.net/ -- -- Host: localhost:3306 -- Generation Time: Feb 27, 2021 at 01:28 PM -- Server version: 5.7.33-0ubuntu0.18.04.1 -- PHP Version: 7.2.24-0ubuntu0.18.04.7 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET...
true
36204ca4bf961f420d42efc116062f909c41ff12
SQL
Big-Data-Laboratory/nyc-taxi-bigdata
/queries/q6_total_money_per_week.sql
UTF-8
195
2.71875
3
[]
no_license
set hive.cli.print.header=true; select mm as weekofyear, sum(total_amount) as total_revenue from (select weekofyear(pickup_datetime) as mm, total_amount from fare) ff group by mm order by mm;
true
69ba31bf3988b8e92bc2fd4dfad6fbb5ac89d0ca
SQL
joshiviral/Techso-Inturnship-Module
/PROJECT/myapp.sql
UTF-8
3,802
3.09375
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.1.14 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: Apr 26, 2016 at 02:41 PM -- Server version: 5.6.17 -- PHP Version: 5.5.12 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;...
true
2b8f7c9a91a3059448eeaff8ed55d1553db69538
SQL
jonggialdo/lapakikan
/item (1).sql
UTF-8
2,225
3.03125
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.6.5.2 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: May 10, 2017 at 11:38 AM -- Server version: 10.1.21-MariaDB -- PHP Version: 5.6.30 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SE...
true
e36338de88dfc81b0b0f08a5b95d5af8405512b9
SQL
jameszelada/WV-TRUNK
/Database/Tables/TipoPuesto.sql
UTF-8
623
3.21875
3
[]
no_license
use VISIONMUNDIAL exec spCreatePhysicalTable "TipoPuesto", 1 -- Columns Definition ALTER TABLE TipoPuesto ADD TipoPuesto VARCHAR(100) not null ALTER TABLE TipoPuesto ADD TipoPuestoDescripcion VARCHAR(500) not null -- Default Constraints ALTER TABLE TipoPuesto ADD CONSTRAINT DF_TipoPuesto_TipoPuesto DEFAULT '' FO...
true
de4c99480195a22ef4e25aa70af12cc2a29138ab
SQL
mariogm89/PHPAlcoy
/MySQL/caso practico 2.sql
UTF-8
983
3.203125
3
[]
no_license
-- //Crear base de datos de biblioteca -- //Crear tablas -- //Usar un dominio adecuado para los atributos -- • Dar nombre adecuado a las restricciones (clave primaria, clave -- ajena, etc.). -- • Declarar como tal los campos que no deban ser nulos. -- • Añadir valores por defecto cuando lo creamos necesario. -- ...
true
0bfabe1707547d67c6945ead0cc71caccfd2764c
SQL
alexhawdon/Scrabble
/scrabbledb.sql
UTF-8
845
3.546875
4
[]
no_license
PRAGMA foreign_keys = ON; CREATE TABLE member ( id INTEGER PRIMARY KEY, first_name TEXT NOT NULL, last_name TEXT NOT NULL, email TEXT NOT NULL, phone TEXT NOT NULL, joined DATE DEFAULT CURRENT_TIMESTAMP NOT NULL, games_played INTEGER DEFAULT 0 NOT NULL, cumulative_score INTEGER DEFAUL...
true
3e7a7beeef0d400597b6ff94efa9fa34521724dc
SQL
fehcasa/MySQL
/MySQL/db_Game.sql
UTF-8
2,534
3.734375
4
[]
no_license
create database db_generation_game_online; use db_generation_game_online; create table tb_classe ( id int(5) auto_increment, tipo varchar (30) not null, ataque bigint (255), defesa bigint (255), primary key (id) ); insert into tb_classe (nome, ataque, defesa) values ("Suporte", 1260, 4480); insert into tb_classe (no...
true
9c293e8defcc31524020211a559445880f12d079
SQL
Jehaann-Manzanares/NicStore
/NicStore.sql
UTF-8
8,234
3.78125
4
[ "MIT" ]
permissive
create database NicStore; use NicStore; CREATE TABLE grado ( id int NOT NULL primary key auto_increment, nombre varchar(30) NOT NULL, condicion tinyint(4) NOT NULL, updated_at timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, created_at timestamp NOT NULL DEFAULT '0000-00-00 00:00:00'...
true
c45fffdef20be800e2836c1202f7c7d50b6cfbf1
SQL
kylebarnett/coinbase-project
/db/seed.sql
UTF-8
538
3.515625
4
[]
no_license
CREATE TABLE users( id serial primary key, username varchar(20), password varchar(20), email varchar(30) ); CREATE TABLE cart( id serial primary key, product varchar(20), price integer, quantity integer, user_id references users(id) ); CREATE TABLE orders( id serial primary key, product varchar(...
true
515e3fb3b6102337d77937fd8d4b803f13107d1b
SQL
BGCX262/zuo-community-svn-to-git
/trunk/Code/Script/OrgCommunity/sqlscripts/select_all_from_t1.sql
UTF-8
142
3.59375
4
[]
no_license
select u.user_name, ugc.group_id from user_group_clustered as ugc inner join users as u on u.user_id=ugc.user_id order by ugc.group_id
true
3ad9e5b937d236209fa643ce19e603b392e587fd
SQL
sergia-ch/inf
/mipt/s4/DB/1/trash/SQLQuery1_.sql
UTF-8
481
4.28125
4
[]
no_license
select sum(sales_order.total - price.min_price * item.quantity) as s, product.description from sales_order, item, product, price where sales_order.order_id = item.order_id and item.product_id = product.product_id and product.product_id = price.product_id and year(sales_order.ship_date)=1989 an...
true
e74a4d5f348a4413b1421e3448b565be1765b4ed
SQL
Juribiyan/overnullch
/util/overnullch.sql
UTF-8
1,394
2.796875
3
[]
no_license
CREATE TABLE IF NOT EXISTS `over_chans` ( `_id` int(11) NOT NULL AUTO_INCREMENT, `id` varchar(20) NOT NULL DEFAULT '', `name` varchar(50) NOT NULL DEFAULT '', `url` varchar(100) NOT NULL DEFAULT '', `default` tinyint(1) NOT NULL DEFAULT '0', `included` tinyint(1) NOT NULL DEFAULT '0', `offline` tinyint(1)...
true
566fc944c61aeab2f3dcca60d07ea0771a02a0d5
SQL
TaHieu-scuti/SQL_workshop
/database/design/structure/create_repo_adw_geotarget.sql
UTF-8
1,374
3.125
3
[]
no_license
CREATE TABLE `ADGAINER_db_SECURE`.`repo_adw_geotarget` ( `criteriaId` INT(20) NOT NULL COMMENT 'adwords api の Geotargets で定義された id', `name` VARCHAR(100) NOT NULL COMMENT 'adwords api の Geotargets で定義された都市名', `canonicalName` VARCHAR(200) NOT NULL COMMENT 'adwords api の Geotargets で定義された正式都市名', `parentId` INT(20)...
true
72d8cf039846452a5f5057a9d3afa384b4be804c
SQL
raethira/CSCI-585-Database-Systems
/HW2/Q2.sql
UTF-8
731
3.796875
4
[]
no_license
-- Remote server-based DB: http://sqlfiddle.com -- Database: PostgreSQL 9.6 -- Build Schema DROP TABLE IF EXISTS enrollment; CREATE TABLE enrollment (SID INTEGER NOT NULL, ClassName CHAR(30) NOT NULL, Grade CHAR(1) NOT NULL, PRIMARY KEY (SID, ClassName) ); -- Run SQL INSERT INTO enrollment(SID, ClassName, Grade) V...
true
0db0a06e879ac4f6585c2ccc096a75b0030d68e0
SQL
peteryu54089/learning
/sql/20181208_135601_add_unlock_status.sql
UTF-8
702
3.296875
3
[]
no_license
CREATE TABLE COURSE_RECORD_UNLOCK_STATUS ( ACTIVE_YEAR INTEGER NOT NULL, ACTIVE_SEM CHAR(1) NOT NULL, REG_NO VARCHAR(20) NOT NULL, START_TIME TIMESTAMP NOT NULL, END_TIME TIMESTAMP NOT NULL, PRIMARY KEY (ACTIVE_YEAR, ACTIVE_SEM, REG_NO), CONSTRAINT COURSERECOR...
true
260f092738ac251ee114825ac28f725ae2b18d30
SQL
woshishitou/general_java_project
/src/work_assist/second_post_58/sql/c1account.sql
UTF-8
6,312
3.078125
3
[]
no_license
CREATE TABLE `c1_account_base` ( `record_id` bigint(20) NOT NULL COMMENT '信息id 主键', `inf_rec_type` varchar(3) DEFAULT '210' COMMENT '信息记录类型 数据字典 默认210,代表个人借贷账户信息记录', `acct_type` varchar(2) DEFAULT 'C1' COMMENT '账户类型 数据字典 默认C1,代表催收账户', `acct_code` varchar(60) DEFAULT NULL COMMENT '账户标识码', `rpt_date`...
true
3913d55e3121ef443bc654ca15ee9a2b5c47e406
SQL
raphasShop/shop
/acropass_source_210625/adm/shop_admin/_comcose_sellprice.sql
UTF-8
5,427
3.171875
3
[]
no_license
-- -------------------------------------------------------- -- -- Table structure for table `comcose_sellprice_category_add` -- CREATE TABLE IF NOT EXISTS `comcose_sellprice_category_add` ( `cose_add_cat_id` int(11) NOT NULL AUTO_INCREMENT, `cose_cat_add_cat_id` varchar(255) NOT NULL, `cose_cat_add_cat_caname` ...
true
8789bc726f1aa822ee09560e038b6aa860719ce6
SQL
haodedong/springboot_easyDemo
/weibo.sql
UTF-8
3,088
3.359375
3
[]
no_license
/* Navicat MySQL Data Transfer Source Server : localhost_3306 Source Server Version : 50717 Source Host : localhost:3306 Source Database : weibo Target Server Type : MYSQL Target Server Version : 50717 File Encoding : 65001 Date: 2017-12-14 11:09:23 */ SET FOREIGN_KEY_CHECKS=0; -...
true
7418ccf12bbf7649caccb15a751ad32a5fc1fe17
SQL
JuliaMoonCrystal/Generation
/Banco de Dados/Aula02-Exercicios/Exercicio_1.sql
UTF-8
2,615
3.828125
4
[]
no_license
CREATE DATABASE db_generation_game_online; USE db_generation_game_online; -- DROP DATABASE db_generation_game_online; CREATE TABLE tb_classe( id BIGINT auto_increment NOT NULL, tipo VARCHAR(100) NOT NULL, equip_inicial VARCHAR(100), caracter VARCHAR(100), PRIMARY KEY(id) ); CREATE TABLE tb_personagem( id BIGINT aut...
true
dad5d13f6fff1904ae38c9026a7585a74edbfedf
SQL
daniandhk/CatNDoc
/database/catndoc.sql
UTF-8
7,150
3.0625
3
[ "LicenseRef-scancode-unknown-license-reference", "MIT" ]
permissive
-- phpMyAdmin SQL Dump -- version 4.9.1 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: May 02, 2020 at 11:29 AM -- Server version: 10.4.8-MariaDB -- PHP Version: 7.3.10 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD...
true
3fbb243ee5df89638703f355e36c5d07f4704a89
SQL
ianyang82/tyserver
/admin/src/test/java/upmptcl.sql
UTF-8
9,750
3.265625
3
[]
no_license
/* Navicat MySQL Data Transfer Source Server : localhost Source Server Version : 50515 Source Host : localhost:3306 Source Database : upmptcl Target Server Type : MYSQL Target Server Version : 50515 File Encoding : 65001 Date: 2015-09-11 17:03:28 */ SET FOREIGN_KEY_CHECKS=0; -- -...
true
00225ca416968d0a9fc370a3963b885766c1ef93
SQL
meera-ramesh19/sololearn-python
/in class queries/Averaging of multiple selection from one field.sql
UTF-8
443
3.4375
3
[]
no_license
/*Aggregate Functions - "Lumps" data together: sum - Totals or adds together count - Counts the records in a column min - Minimum value from a column max - Maximum value from a column avg - Averages*/ /* Return the average gross margin $ for in the Fitness, Essentails and Disc departments. Gross Margin $: Sales$- tot...
true
3fb9a01eb34f95199ae7112e1cf50d16f69bc353
SQL
jongvin/werp
/werp/erpw/general/t_web/sql/Procedure/SP_T_CODE_GROUP.sql
UHC
2,889
3.234375
3
[]
no_license
Create Or Replace Procedure SP_T_CODE_GROUP_I ( AR_CODE_GROUP_NO NUMBER, AR_CRTUSERNO VARCHAR2, AR_CODE_GROUP_ID VARCHAR2, AR_CODE_GROUP_NAME VARCHAR2, AR_FLEX_FIELD VARCHAR2, AR_...
true
b3ccc8339cdeb664ad415e2a8ab585dd9987ab1c
SQL
davmath/SistemaFuncionariosCRUD
/funcionarios_bd.sql
UTF-8
2,705
3.203125
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 5.0.2 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Tempo de geração: 30-Nov-2020 às 23:38 -- Versão do servidor: 10.4.13-MariaDB -- versão do PHP: 7.4.8 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CL...
true
a30fa3603a981ee9226dcff31e568f6f60302ec2
SQL
Miceplen/ProjectDatabase
/ddlHotel.sql
UTF-8
3,294
3.984375
4
[]
no_license
CREATE DATABASE HotelDatabase USE HotelDatabase CREATE TABLE Ms_Customer( CustomerID CHAR(5) CHECK(CustomerID LIKE 'CU[0-9][0-9][0-9]') PRIMARY KEY, CustomerName VARCHAR(30) NOT NULL, CustomerPhoneNumber CHAR(12) CHECK(CustomerPhoneNumber LIKE '08%') NOT NULL, CustomerEmail VARCHAR(50) CHECK(CustomerEmail...
true
84476c612fdff49f9184a499a5ae22ff9d443c1f
SQL
SalmonTheWise/python-course
/homework-spring/hw5/tasks.sql
UTF-8
2,793
4.34375
4
[]
no_license
--1. Всю информацию о всех пользователях (все колонки в любом порядке) SELECT * FROM Users; --2. Количество всех пользователей (число) SELECT users.name, count(*) FROM Users; --3. Количество пользователей 40 лет или старше (число). SELECT count(*) FROM Users WHERE birth_date <= date("1976-05-22"); --4. Страна +...
true
7c0a62a944aae4880209bdde987864d57ea0e727
SQL
Cultivatr/Marketplace-backend
/archive/postgres/tables/offered_items_produce.sql
UTF-8
643
2.65625
3
[]
no_license
BEGIN TRANSACTION; DROP TABLE IF EXISTS Offered_items_produce CASCADE; CREATE TABLE Offered_items_produce ( Id SERIAL PRIMARY KEY, Users_id INT REFERENCES Users ON DELETE RESTRICT, Product_name TEXT, Package_type TEXT, Date_planted DATE, Seed_type TEXT, Modified_seed BOOLEAN, Heirloom BOOLEAN, Fertilizer_type_used TE...
true
dd691627502e955b234c09e301f486099ebe4586
SQL
panchis7u7/SQL---BEDU
/Sesion1/Ejercicios_Sesion1.sql
UTF-8
2,050
3.8125
4
[]
no_license
#1 USE classicmodels; #2 SELECT lastname FROM employees; #3 SELECT lastname, firstname, jobTitle FROM employees; #4 SELECT * FROM employees; #5 SELECT lastname, firstname, jobTitle FROM employees WHERE jobTitle = "Sales Rep"; #6 SELECT lastname, firstname, jobTitle, officeCode FROM employees WHERE jobTitle = "Sales Re...
true
3f3c4c5dd6c13628e49cd184f2ddd24b6a40fb3b
SQL
wf-oadenaike/TestProject
/TestDBProject/Contacts/Tables/OutletIdMappings.sql
UTF-8
771
2.703125
3
[]
no_license
CREATE TABLE [Contacts].[OutletIdMappings] ( [OutletId] NVARCHAR (15) NOT NULL, [SalesforceAccountId] NVARCHAR (18) NOT NULL, [CADIS_SYSTEM_INSERTED] DATETIME CONSTRAINT [DF_OIM_CSI] DEFAULT (getdate()) NULL, [CADIS_SYSTEM_UPDATED] DATETIME CONSTRAINT [DF_OIM_C...
true
e747825dfda10b997898a8e09808dd7ac0c3ea50
SQL
domkris/Dbsolution
/CoreDB/dbo/Stored Procedures/crud_UpdateCountries.sql
UTF-8
331
2.8125
3
[]
no_license
CREATE PROCEDURE crud_UpdateCountries @CountryID int, @CountryCode char(3), @CountryTitle varchar(100), @UserCreated varchar(100), @DateCreated datetime AS BEGIN UPDATE Countries SET CountryCode = @CountryCode, CountryTitle = @CountryTitle, UserCreated = @UserCreated, DateCreated = @DateCreated WHERE CountryID = @Coun...
true
1a641c80a720cf3cdef4fb16ea20e97631b41ca8
SQL
shochcho46/didi
/xamppdb/didi.sql
UTF-8
58,392
3.109375
3
[ "MIT" ]
permissive
-- phpMyAdmin SQL Dump -- version 5.0.2 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Jun 12, 2021 at 10:14 PM -- Server version: 10.4.11-MariaDB -- PHP Version: 7.4.6 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIEN...
true
c37f8ecc5c0568f0d9730930985c39f29c9b5f3d
SQL
xxrepo/elite
/Scripts/0076.sql
UTF-8
386
2.875
3
[ "MIT" ]
permissive
/* ** BANCOS */ CREATE TABLE BANCOS ( CODIGO INTEIRO_VALIDO, NOME STR60_VALIDO, CONSTRAINT BANCOS_PK PRIMARY KEY (CODIGO))! GRANT ALL ON BANCOS TO PUBLIC! ALTER TABLE PAGAMENTOS ADD CONSTRAINT PAGAMENTOS_FK04 FOREIGN KEY (CH_BANCO) REFERENCES BANCOS(CODIGO) ON UPDATE CASCADE! INS...
true
b535b3f47263fec5e3c9fd2618e36c591a6ac8f4
SQL
silence-do-good/stress-test-Postgres-and-MySQL
/dump/high/day11/select0646.sql
UTF-8
191
2.703125
3
[]
no_license
SELECT timeStamp, temperature FROM ThermometerObservation WHERE timestamp>'2017-11-10T06:46:00Z' AND timestamp<'2017-11-11T06:46:00Z' AND SENSOR_ID='23c111bd_7fe9_456c_aee5_e00e28e714e8'
true
9a7f819d834438394b82bd20e6f6b7b8e8d2e830
SQL
SavaDimitrov/SUBD
/SUBD_5_sem.sql
WINDOWS-1252
3,903
4.5625
5
[]
no_license
SET SCHEMA DB2INST1; --############################# CAST #######################-- --Problem 1 /* For all employees in department D11, display their employee number, last name and text specifying if the employee's salary is low, high or normal. SALARY INCOME -------- -------- less than 25000 LOW between 25...
true
edb2ee13c988493025f023340619a532c79f36b4
SQL
smouli/xml-parser
/geninfo03_tax.sql
UTF-8
382
2.9375
3
[ "MIT" ]
permissive
CREATE TABLE public.geninfo03_tax ( taxid INTEGER DEFAULT nextval('geninfo03_tax_taxid_seq'::regclass) PRIMARY KEY NOT NULL, repno TEXT, taxonomytype TEXT, code TEXT, description TEXT, orders INTEGER ); CREATE UNIQUE INDEX geninfo03_tax_taxid_pk ON public.geninfo03_tax (taxid); CREATE UNIQUE IND...
true
502448c51a595840024f193dcbff24262a44e163
SQL
Z1ni/pyhatchery
/base.sql
UTF-8
1,841
3.6875
4
[ "MIT" ]
permissive
-- Create base schema CREATE TABLE app ( id INTEGER PRIMARY KEY, name TEXT NOT NULL UNIQUE ON CONFLICT FAIL, slug TEXT NOT NULL UNIQUE ON CONFLICT FAIL, user_id INTEGER NOT NULL, description TEXT NOT NULL, category_id INTEGER NOT NULL, status_id INTEGER NOT NULL, download_count INTEGER NOT NULL DEFAULT 0, newe...
true
6591905431692d12ea0b8b410e92726306ceb456
SQL
Semihc38/Modules
/module-2/05_Database_Design/student-lecture/relational-database-desing.sql
UTF-8
842
3.21875
3
[]
no_license
create table customer( customer_id serial primary key, first_name varchar(20), last_name varchar(30), address varchar(200), phone_number varchar(15) ); create table purchase( purchase_id serial primary key, artist_id ...
true
6c82f9740524cae55da2ba6d9a4e9bc2a92d7ca1
SQL
imqsl/explorerbackstage-
/bigdata.sql
UTF-8
2,311
3.1875
3
[ "Apache-2.0" ]
permissive
/* SQLyog 企业版 - MySQL GUI v8.14 MySQL - 5.5.19 : Database - bigdata ********************************************************************* */ /*!40101 SET NAMES utf8 */; /*!40101 SET SQL_MODE=''*/; /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; /*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@...
true
094c334c7c86e4a3161f273ec6fc0ddf9a5bad1b
SQL
SienaM/Master-in-Data-Science
/Trabajo fin de máster/Scripts carga y depuración/2. Depuración de datos.sql
UTF-8
2,060
4.0625
4
[]
no_license
--Comprobaciones --Vemos el número de registros de la tabla SELECT count(*), count(distinct rloc) FROM vuelos ;--9546302 2605835 --documentos distintos select count(document_number) from vuelos where document_number is not null;--828.875 --Fechas de salida de los vuelos ...
true
754637606c802b614d5220b6ae90d6652043ef8d
SQL
pantherajs/cli
/sql/tables/forum-statistics-mat.sql
UTF-8
1,436
4
4
[ "MIT" ]
permissive
CREATE TABLE IF NOT EXISTS forum_statistics_mat ( forum_id INTEGER NOT NULL, num_topics INTEGER NOT NULL DEFAULT 0, num_posts INTEGER NOT NULL DEFAULT 0, recent_topic_id INTEGER DEFAULT NULL, recent_post_id INTEGER...
true
7b9c2a5a9fa757d8a769a1bbe2dee7439acdf2ff
SQL
filimonov/ClickHouse
/dbms/tests/queries/0_stateless/00646_weird_mmx.sql
UTF-8
426
2.53125
3
[ "Apache-2.0" ]
permissive
DROP TABLE IF EXISTS test.weird_mmx; CREATE TABLE test.weird_mmx (x Array(UInt64)) ENGINE = TinyLog; -- this triggers overlapping matches in LZ4 decompression routine; 915 is the minimum number -- see comment in LZ4_decompression_faster.cpp about usage of MMX registers INSERT INTO test.weird_mmx SELECT range(number % ...
true
1b9b753b8cceb6d69e712bf801ba61516e1b9b50
SQL
maxflexx/unirate-back
/scripts/create.sql
UTF-8
3,236
4.1875
4
[]
no_license
SET FOREIGN_KEY_CHECKS = 0; #faculty DROP TABLE IF EXISTS faculty; CREATE TABLE faculty( id bigint NOT NULL AUTO_INCREMENT, name varchar(64) NOT NULL UNIQUE, short_name varchar(8) NOT NULL, PRIMARY KEY(id) ); #professions DROP TABLE IF EXISTS profession; CREATE TABLE profession( id bigint NOT NULL AUTO_I...
true
e99e5480f97e158d2e881c440183eacd595b9e37
SQL
bitze003/Devour-
/db/schema.sql
UTF-8
433
2.96875
3
[]
no_license
DROP DATABASE IF EXISTS `burgers_db`; CREATE DATABASE burgers_db; USE burgers_db; CREATE TABLE burgers ( id int NOT NULL AUTO_INCREMENT, burger_name varchar(255) NOT NULL, devoured BOOLEAN, PRIMARY KEY (id) ); INSERT INTO burgers (burger_name, devoured) VALUES ("Cheese", false); INSERT INTO burgers (burger...
true
d584a7849659a4670bd861ef1ec68b965cad9e57
SQL
yeoli/jsp20201103
/WebContent/WEB-INF/sql/select/20_11_18.sql
UHC
2,632
4.15625
4
[]
no_license
SELECT * FROM department; SELECT * FROM employee; SELECT * FROM salgrade; -- joinEx7 SELECT e.eno, e.ename, e.hiredate, e.salary, d.dname, e.job, s.grade, DECODE(ma.ename, null, e.ename, ma.ename) FROM employee e, employee ma, department d, salgrade s WHERE e.dno = d.dno AND e.eno = 7698 AND e.salary BETWEEN s.losal...
true
8af13b312a215d2d9e7ba3839004655464124982
SQL
lainer4/base-de-datos
/php/SQL_creationDB.sql
UTF-8
1,022
3.328125
3
[]
no_license
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; CREATE DATABASE IF NOT EXISTS `agendaJMAN` DEFAULT CHARACTER SET latin1 COLLATE latin1_swedish_ci; USE `agendaJMAN`; -- -------------------------------------------------------- CREATE TABLE `eventos` ( `id...
true
871171dafda7d88258082264cff115072e14636e
SQL
seener/dbt-exploration
/models/staging/customer_rental_summary.sql
UTF-8
615
3.609375
4
[]
no_license
with customer_rental_summary as ( SELECT customer_id, min(rental_date) as first_rental, max(rental_date) as last_rental, count(*) as num_rental, date_part('day', max(rental_date) - min(rental_date)) as period_days, date_part('day', max(rental_date) - min(rental_dat...
true