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
720bad68dc06be38e97ff623be9891b521ea863c
SQL
zhuoliu0920/database-systems
/Project2/phase2/zhuo_update/query.sql
UTF-8
284
3.015625
3
[]
no_license
CREATE RECURSIVE VIEW R ( DD , a , b , pp , value ) AS ( SELECT 1 , a , b , 1 , value FROM graph UNION ALL SELECT DD + 1 , R . a , R . b , R . pp * graph . pp , R . s + graph . s FROM R JOIN graph ON R . b = graph . a WHERE DD < 10 ) ; SELECT DISTINCT a , b , DD INTO O FROM R;
true
d9220181b9f76f4ff7dfb9e3912ad839ea904161
SQL
tinased95/Database
/zahra_Athari_9331027_Tina_Sedaghat_9331044/phase 2/queries/q15.sql
UTF-8
836
3.125
3
[]
no_license
use OnlineShopping1; select person.PersonName as 'registered Customer name' , person.PersonFamilyName as 'registered Customer lastname' , RegisteredCostumerUsernames.CostumerUsername as 'registeredCustomer username' from person , RegisteredCostumerUsernames,boughtDetail,bought where person.personID=RegisteredCostumerU...
true
a00765f80d7ef2e4e25ace186496e730fce3a6b6
SQL
Karanveer-1/Time-entry-system
/Resources/timesheet.sql
UTF-8
7,014
3.84375
4
[]
no_license
CREATE DATABASE TES; CREATE USER 'employee'@'localhost' IDENTIFIED BY 'password'; CREATE USER 'employee'@'%' IDENTIFIED BY 'password'; GRANT ALL PRIVILEGES ON TES.* TO 'employee'@'localhost' WITH GRANT OPTION; GRANT ALL PRIVILEGES ON TES.* TO 'employee'@'%' WITH GRANT OPTION; USE TES; -- create table CREDENTIALS CRE...
true
ca8e15de7fddbf93d01debbf5c025241144dff4d
SQL
reetahan/ears
/Database/user_delete.sql
UTF-8
775
3.625
4
[ "Apache-2.0" ]
permissive
DROP PROCEDURE IF EXISTS USER_DELETE ; DELIMITER // CREATE PROCEDURE USER_DELETE( userID_ INT ) BEGIN DECLARE val1 INT DEFAULT NULL ; DECLARE done INT DEFAULT FALSE ; DECLARE cursor1 CURSOR FOR SELECT CourseId FROM Enrollment WHERE UserId = userID_; DECLARE CONTINUE HANDLER FOR N...
true
0a0ed4b3f4ab125a79e27271653709cf83804248
SQL
sionguo/esms
/sql/guoxy.sql
UTF-8
34,719
3.09375
3
[]
no_license
<<<<<<< HEAD /* Navicat MySQL Data Transfer Source Server : localhost Source Server Version : 50719 Source Host : localhost:3306 Source Database : guoxy Target Server Type : MYSQL Target Server Version : 50719 File Encoding : 65001 Date: 2017-10-20 15:13:21 */ SET F...
true
314d9bafc3d48e22ff0fedde93ad94fb0094bbd9
SQL
ChristianMurphy/SurveyPortlet
/src/main/sql/ciData.sql
UTF-8
56,707
2.953125
3
[ "BSD-3-Clause", "LicenseRef-scancode-free-unknown", "MPL-1.1", "WTFPL", "CDDL-1.0", "MIT", "LGPL-2.0-or-later", "CC-BY-SA-3.0", "EPL-1.0", "Classpath-exception-2.0", "GPL-2.0-only", "Apache-2.0", "LicenseRef-scancode-public-domain", "LGPL-2.1-only" ]
permissive
-- -- Licensed to Apereo under one or more contributor license -- agreements. See the NOTICE file distributed with this work -- for additional information regarding copyright ownership. -- Apereo licenses this file to you under the Apache License, -- Version 2.0 (the "License"); you may not use this file -- except in c...
true
bc453c96e67bf959abec42cf3f9e8552f09ff4a6
SQL
mgg-dev-it/demo
/SpringBoot/pizza-due/db/init_db.sql
UTF-8
666
3.34375
3
[ "MIT" ]
permissive
DROP USER IF EXISTS pizzadue; DROP DATABASE IF EXISTS pizzadue; CREATE USER 'pizzadue'@'%' IDENTIFIED BY 'pizzadue'; CREATE DATABASE pizzadue DEFAULT CHARACTER SET 'utf8' DEFAULT COLLATE 'utf8_general_ci'; GRANT ALL PRIVILEGES ON pizzadue.* TO 'pizzadue'@'%'; SET PASSWORD FOR 'pizzadue'@'%' = 'pizzadue'; use pizzadu...
true
0d3ca97334b779b66b60951fd09d1553e1689c7c
SQL
ninjayoto/Introduction-To-Database-Systems
/hw1-q5.sql
UTF-8
273
2.65625
3
[]
no_license
-- Seoyoung Park -- CSE 414 -- HOMEWORK 1, Problem 5 select Name, Distance from MyRestaurants WHERE Distance <= 20 ORDER BY Name ASC; -- AppleBees 6 -- Chipotle 7 -- Hosoonyi 10 -- Isarn 9 -- WildWasabi 6
true
ac2c694fa86629a090b071f8dbf709b40af40e55
SQL
Jwils21/UdemySqlPractice
/2.6 Using In Between & Wildcard charachters.sql
UTF-8
854
3.5
4
[]
no_license
SELECT * FROM HumanResources.vEmployee where FirstName = 'Chris' or FirstName = 'Steve' or FirstName = 'Michael' or FirstName = 'Thomas' --Benefit of using in, same as above SELECT * FROM HumanResources.vEmployee where FirstName IN ('Chris', 'Steve', 'Michael', 'Thomas') --between clause SELECT * FROM Sal...
true
7a9c90e36ed3ad34908502befecfd2e40d5da79e
SQL
Awelerson/option_ajax
/banco/jmusic.sql
UTF-8
2,838
3.34375
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.3.11 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: 24-Nov-2016 às 02:12 -- Versão do servidor: 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
8bb109864013dbe0a9001c2185f6128fcb644e76
SQL
radtek/abs3
/sql/mmfo/bars/Table/finmon_que_vid2.sql
WINDOWS-1251
5,095
3.25
3
[]
no_license
PROMPT ===================================================================================== PROMPT *** Run *** ========== Scripts /Sql/BARS/Table/FINMON_QUE_VID2.sql =========*** Run * PROMPT ===================================================================================== PROMPT *** ALTER_POLICY_INFO...
true
e6364da0d59ed8d67b111400e0e10d730aef97a0
SQL
adityamanocha/liquidemo
/src/main/db/sql/insertcommands.sql
UTF-8
1,123
2.921875
3
[]
no_license
--liquibase formatted sql --changeset devopsadmin:change_2 INSERT INTO emp(EmpId, EmpName, EmpMob) VALUES (1, "Aditya", 99606496); --changeset devopsadmin:change_3 INSERT INTO emp(EmpId, EmpName, EmpMob) VALUES (2, "Manocha", 99606497); INSERT INTO emp(EmpId, EmpName, EmpMob) VALUES (3, "Pawan", 99606494); --change...
true
2c2080b0ea24689ae5485d1b857445e5492dd091
SQL
photoszzt/code_practice
/database/leetcode/s176.sql
UTF-8
124
3.140625
3
[]
no_license
select MAX(Employee.Salary) as SecondHighestSalary from Employee where Salary < (select max(Employee.Salary) from Employee)
true
d760ec838848e399cb1083235149766433b6b43c
SQL
LJLinga/FRAP_sd
/SQL Dumps/Dump20190320 (1)/facultyassocnew_documents.sql
UTF-8
3,665
3.078125
3
[]
no_license
CREATE DATABASE IF NOT EXISTS `facultyassocnew` /*!40100 DEFAULT CHARACTER SET latin1 */; USE `facultyassocnew`; -- MySQL dump 10.13 Distrib 5.7.25, for Win64 (x86_64) -- -- Host: 127.0.0.1 Database: facultyassocnew -- ------------------------------------------------------ -- Server version 5.7.25-log /*!40101 SE...
true
dbd02e6b571a7e809446726747e2607492acb667
SQL
zhangfengqi937/SQL
/premiere.sql
UTF-8
3,976
3.21875
3
[]
no_license
CREATE TABLE Rep (RepNum CHAR(2) PRIMARY KEY, LastName CHAR(15), FirstName CHAR(15), Street CHAR(15), City CHAR(15), State CHAR(2), Zip CHAR(5), Commission DECIMAL(7,2), Rate DECIMAL(3,2) ) ; CREATE TABLE Customer (CustomerNum CHAR(3) PRIMARY KEY, CustomerName CHAR(35) NOT NULL, Street CHAR(15), City C...
true
df9d447c539f3e2709238342cda6c8009c90243e
SQL
chrismesina14/CSE_572_Winter2020
/Labs/lab3.sql
WINDOWS-1252
6,120
4.25
4
[]
no_license
/* Christian Mesina (005319687) CSE 572 Lab 3 Created on 01/28/2020 */ /* Question 1: Create a query to display the last name, department number and department name for all employees. */ SELECT E.LAST_NAME, E.DEPARTMENT_ID, D.DEPARTMENT_NAME FROM HR.EMPLOYEES E INNER JOIN HR.DEPARTMENTS D ...
true
4f79815c8005b1be7602508e34da9800bbe4551d
SQL
SneakoXU/TE-Pair-Exercise-Mod2Day4
/pair-exercises/constraints-and-transactions-exercises-pair.sql
UTF-8
2,665
4.40625
4
[]
no_license
-- Write queries to return the following: -- Make the following changes in the "world" database. -- 1. Add Superman's hometown, Smallville, Kansas to the city table. The -- countrycode is 'USA', and population of 45001. (Yes, I looked it up on -- Wikipedia.) INSERT INTO city (name, countrycode, district, population)...
true
dca7b9efd223a273cf027a108e0bd86a33038dc5
SQL
BaymaxHWY/PersonManageSystem
/keshe.sql
UTF-8
7,062
3.09375
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.8.0 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: 2018-06-05 12:29:52 -- 服务器版本: 5.7.21 -- 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_CHARACTER_SET_CLIENT=@...
true
21fa2ce8d5aebc873fd80bc19657126666b0a711
SQL
roojs/Pman.Core
/sql/projectdirectory.sql
UTF-8
978
3.046875
3
[]
no_license
-- we duplicate office_id and company_id here... -- not sure if we should keep doing that in the new design... -- we should improve our links code to handle this.. CREATE TABLE ProjectDirectory ( id int(11) NOT NULL auto_increment, PRIMARY KEY (id) ) ; ALTER TABLE ProjectDirectory ADD COLUMN project_id int(...
true
a2bea3c0083b56557b96e6dce4e6ef56dc6363fe
SQL
josepitteloud/VESPA
/ad_hoc/Product Analytics/Toolbox/SQL in General - Dynamic Week Numbering generation.sql
UTF-8
1,327
3.625
4
[]
no_license
/* A practical example to: Create buckets of N days relative to any starting date... The query shows the mechanics of how this works... */ with base as ( select thedate from ( select date('2017-03-09 00:00:00') as thedate union select date('2017-03-10 00:00:00') union select...
true
f73d60b38fb5c189869dd80d485af374487a8f55
SQL
aakashmt97/SQL
/b72. UPDATE_values.sql
UTF-8
418
3.078125
3
[]
no_license
UPDATE account SET last_login = CURRENT_TIMESTAMP WHERE last_login IS NULL; SELECT * FROM account; UPDATE account_job SET hire_date = CURRENT_TIMESTAMP; SELECT * FROM account_job; UPDATE account_job SET hire_date = account.created_on FROM account WHERE account_job.user_id = account.user_id; SELECT * FROM account...
true
144c9c7f96287870adb1743f02ba09a0bae41b45
SQL
danziss/Bazy-danych-cwiczenia-MySQL
/salonSamochodowyNew.sql
UTF-8
6,266
3.90625
4
[]
no_license
CREATE TABLE marki_pojazdow( id int auto_increment not null, nazwa varchar(40) not null, kraj_pochodzenia varchar(40), data_dodania DATETIME, data_edycji DATETIME, PRIMARY KEY (id) ); CREATE TABLE modele( id int auto_increment not null, id_marki int not null, nazwa varchar(40) not n...
true
44672fb5a0b6e8e8e566c6e070c2767babb116bc
SQL
pavel-voinov/oracle-dba-workspace
/scripts/reports/by_schema/views.sql
UTF-8
402
3.03125
3
[ "MIT" ]
permissive
/* */ @reports/reports_header define schema=&1 column view_name format a30 heading "View name" column text_length format 99999990 heading "Length of query text" column status format a10 heading "Status" SELECT v.view_name, v.text_length, o.status FROM dba_views v, dba_objects o WHERE v.owner = '&schema' AND o.owner ...
true
99ca35e6888e46fbacd407219422f3e34a5aa2e8
SQL
slzjw26/learn_Pthon
/杂项/test2.sql
UTF-8
262
2.984375
3
[ "MIT" ]
permissive
A: select S#, GRADE from SC where C# = 'C2'; B: select sname from S where sname like 'D%'; C: select S.sname, S.S# from S, SC, C where C.C# = SC.C# and SC.S# = S.S# and C.CNAME = 'Maths'; D: select SC.S# from SC, C where C.C# = SC.C# and C.C# in ('C2', 'C4');
true
b662ca992c488ed65431b72bdeee7ddfb514544c
SQL
thluiz/sam-apinode
/database/Database/Database/Stored Procedures/getDataForChangeOwnershipLength.sql
UTF-8
1,009
3.390625
3
[ "MIT" ]
permissive
CREATE procedure getDataForChangeOwnershipLength( @ownership_id int, @start_date datetime, @end_date datetime ) as begin select * into #incidents_to_be_reschudeled from vwLightIncident where id in (select id from incident where ownership_id =...
true
50da66a872e28a5b2e15b83d15e5c658af533ce8
SQL
kkadusic/online-shop-database
/Scripts/create-tables.sql
UTF-8
7,256
3.796875
4
[]
no_license
CREATE TABLE Kontinent ( KontinentID NUMBER(10) NOT NULL, Naziv VARCHAR(100) NOT NULL, CONSTRAINT kontinent_pk PRIMARY KEY (KontinentID) ); CREATE TABLE Drzava ( DrzavaID CHAR(10) NOT NULL, KontinentID NUMBER(10) NOT NULL, Naziv VARCHAR (100) NOT NULL, CONSTRAINT DrzavaID_pk PRIMARY KEY (Dr...
true
1628ad46d173e98367048e2a65346ee1408f949c
SQL
OlivierCoue/NamelessAPI
/sql/nameless_db.sql
UTF-8
3,923
3.234375
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.1.14 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: Feb 07, 2016 at 10:48 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
b266abae738ab9202c098109d9b9fcc961dc1bcc
SQL
zavierjack1/Oracle_Docker
/Schemas/Zavier/Tables/tblCompany.sql
UTF-8
390
3.015625
3
[]
no_license
DECLARE v_count number; BEGIN select count(*) into v_count from ALL_TABLES where upper(owner) = 'ZAVIER' and upper(table_name) = 'TBLCOMPANY'; if v_count > 0 then execute immediate ('DROP TABLE ZAVIER.TBLCOMPANY'); end if; execute immediate ( 'CREATE TABLE tblCompany( COM...
true
68bbf3cc0b6f8b7c50a0acce8d13f8c12b36addb
SQL
GeriTosti/books-lab03
/books3.sql
UTF-8
6,154
3.234375
3
[]
no_license
-- MySQL dump 10.13 Distrib 5.7.12, for Win32 (AMD64) -- -- Host: localhost Database: books -- ------------------------------------------------------ -- Server version 5.7.12-log /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS...
true
4947361e680a2967c9c38b42fee928ea146d67c9
SQL
janspicka/trash
/plsql/call_procedure.sql
UTF-8
284
2.96875
3
[]
no_license
set serveroutput on; declare -- GLOBAL emp employees%rowtype; begin get_employee(50,emp); dbms_output.put_line(emp.first_name || ' ' || emp.last_name || ' ' || emp.salary); exception when others then dbms_output.put_line('ERR: ' || sqlcode || ' '|| sqlerrm); end; /
true
01ef5b284aff299c2ab30d84e1edd96bce66cb02
SQL
Elpuma/SQL-DEV-FOLDER
/SQL for Data Analysis - Udacity/04 SQL Subqueries/13. Text Quiz WITH vs Subquery.sql
UTF-8
799
4.34375
4
[]
no_license
/* Your First WITH (CTE) The same question as you saw in your first subquery is provided here along with the solution. QUESTION: You need to find the average number of events for each channel per day.*/ WITH events AS ( SELECT DATE_TRUNC('day',occurred_at) AS day, channel, COUNT(*) ...
true
03bfabb1190a35840c4c8dc979c8f16eee712679
SQL
RedisGraph/ldbc_snb_implementations
/umbra/queries/interactive-complex-10.sql
UTF-8
1,949
4.4375
4
[ "Apache-2.0" ]
permissive
/* Q10. Friend recommendation \set personId 17592186044461 \set month 5 */ SELECT Person.id, firstName, lastName, ( SELECT count(DISTINCT Message.id) FROM Message, Message_hasTag_Tag pt1 WHERE CreatorPersonId = Person.id AND ParentMessageId IS NULL -- post, not comment...
true
98881844c2fe10a280679e276f74a6b5aa527902
SQL
GemsTracker/gemstracker-library
/configs/db/tables/gems__track_appointments.100.sql
UTF-8
2,145
3.578125
4
[ "BSD-3-Clause" ]
permissive
CREATE TABLE if not exists gems__track_appointments ( gtap_id_app_field bigint unsigned not null auto_increment, gtap_id_track int unsigned not null references gems__tracks (gtr_id_track), gtap_id_order int not null default 10, gtap_field_name ...
true
135bb2c79a93847e37da2010465321c9f6a2456e
SQL
LyudaBo/Java-Developer
/Homework1/5.sql
UTF-8
293
4.28125
4
[]
no_license
SELECT customers.CUSTOMER_NAME, min(cost) as min_income FROM (SELECT CUSTOMER_ID, COMPANY_ID, min(cost) AS cost FROM projects GROUP BY CUSTOMER_ID, COMPANY_ID) AS t1 LEFT JOIN customers ON t1.CUSTOMER_ID = customers.CUSTOMER_ID GROUP BY CUSTOMER_NAME;
true
4de2a081e6c567b4389cd9d017e922eeace509c2
SQL
rohithreddy197/DBMS_Assignments
/SQL_QUERY_ASSIGNMENT_PT2/Sci-fiJonStevens.sql
UTF-8
345
3.4375
3
[]
no_license
select count(distinct f.title) from film f join film_category fc on f.film_id=fc.film_id join category c on fc.category_id=c.category_id join inventory i on i.film_id=fc.film_id join rental r on i.inventory_id=r.inventory_id join staff s on r.staff_id=s.staff_id where c.name="sci-fi" and s.first_name="Jon" and...
true
7aa8784eacf4fe7813fdd37124f36679916c6a40
SQL
gavoneill6/Advanced-Databases
/Assignment/SQL code tips/TestConversionRainfallDublin.sql
UTF-8
684
2.78125
3
[]
no_license
SELECT Location_Code ,Location ,Year_Month ,CAST(SUBSTRING(Year_Month, 1, 4) AS INT) ,CASE SUBSTRING(Year_Month, 5, 3) WHEN 'M01' THEN 1 WHEN 'M02' THEN 2 WHEN 'M03' THEN 3 WHEN 'M04' THEN 4 WHEN 'M05' THEN 5 WHEN 'M06' THEN 6 ...
true
ff55a6554f75b99b483d743304b271bb6fea62a6
SQL
Southbay-CityChurch/crossings-community
/sermons/__lib/tests/frameworks/active_record_test.sql
UTF-8
253
2.828125
3
[ "MIT" ]
permissive
drop table if exists products; create table products ( id int not null auto_increment, name varchar(255) not null, product_id int not null, quantity int not null default 0, unit_price decimal(10,2) not null, primary key (id) );
true
e7669850fda94b7fc9b3208b221259b28033db96
SQL
noelvalentin/ICOM5016-P3
/schema.sql
UTF-8
1,178
3.421875
3
[]
no_license
create table Users(uid serial primary key, first_name varchar(20), last_name varchar(30), phone char(10), email varchar(50), password varchar(20)); create table ContactList(uid integer references Users(uid), cid integer references Users(uid), primary key(uid, cid)); create table Message(mid serial primary key, i...
true
3383a665ec4c528527eac2eb55d53743c6f9885e
SQL
vietduc030496/VTI-Java07-08
/TUAN.phamvan2/sql/Assignment-SQL-6.sql
UTF-8
6,187
4.28125
4
[]
no_license
-- Q1 DROP PROCEDURE IF EXISTS input_dept; DELIMITER // CREATE PROCEDURE input_dept(IN department_name VARCHAR(45)) BEGIN SELECT * FROM `account` acct INNER JOIN ( SELECT * FROM ( SELECT d.DepartmentID, d.DepartmentName FROM `account` a INNER JOIN `department` d ON ...
true
aa19d97e5ed1a8ab1d401b1a336d11b6797127e3
SQL
celestelayne/react-backend-starter-code
/database/seed.sql
UTF-8
430
2.765625
3
[]
no_license
\c moviesdb DELETE FROM movies; DELETE FROM favorites; INSERT INTO movies VALUES (DEFAULT, 'Guardians of the Galaxy Volume 2', 2017, 'PG-13', '136 min', 'Action'); INSERT INTO movies VALUES (DEFAULT, '12 Angry Men', 1957, 'PG-13', '96 min', 'Drama'); INSERT INTO movies VALUES (DEFAULT, 'Inception', 2010, 'PG-13', '14...
true
117468f36fc67175f211dd13318ad7e4bc533ee9
SQL
david32145/test-docs
/server/dump.sql
UTF-8
10,690
3.09375
3
[]
no_license
-- -- PostgreSQL database dump -- -- Dumped from database version 11.7 (Ubuntu 11.7-0ubuntu0.19.10.1) -- Dumped by pg_dump version 11.7 (Ubuntu 11.7-0ubuntu0.19.10.1) SET statement_timeout = 0; SET lock_timeout = 0; SET idle_in_transaction_session_timeout = 0; SET client_encoding = 'UTF8'; SET standard_conforming_str...
true
d9dedf09ebe7cd1fd18eba01cb31cb148c627705
SQL
tirumaraiselvan/graphql-engine
/community/sample-apps/todo-auth0-jwt/hasura/migrations/default/1613665146384_init/up.sql
UTF-8
501
3.421875
3
[ "MIT", "Apache-2.0" ]
permissive
CREATE TABLE public.todo ( id integer NOT NULL, task text NOT NULL, completed boolean NOT NULL, user_id text NOT NULL ); CREATE SEQUENCE public.todo_id_seq AS integer START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; ALTER SEQUENCE public.todo_id_seq OWNED BY public.to...
true
2aa060ec3d267707615d713fdcb793fd976de469
SQL
Mrtree24/SQL
/197. Rising Temperature.sql
UTF-8
110
3.3125
3
[]
no_license
select a.Id from Weather a, Weather b where TO_DAYS(a.Date)=TO_DAYS(b.Date)+1 and a.Temperature>b.Temperature;
true
bb34c069e4c5c330a21d1194abbcf4e80cdec82f
SQL
yurjimar/IC-Inventory
/Programación/MySQL/Select Template.sql
UTF-8
414
3.328125
3
[]
no_license
select Client.First_Name, Client.Last_Name1, History.Start_Date, Stock.Barcode, Status.Name,Object.Name, Category.Name from Client INNER JOIN History ON History.Client = Client.idClient INNER JOIN Stock ON Stock.Barcode = History.Barcode_Stock INNER JOIN Status ON Status.idStatus = Stock.Barcode INNER JOIN Object ON ...
true
561466bd28f8bbabb24c1e54a74d45d5b8419baf
SQL
briansheen/myWeather
/sql/create_tables.sql
UTF-8
936
3.8125
4
[ "Unlicense" ]
permissive
CREATE TABLE `user` ( `username` varchar(256) NOT NULL, `password` varchar(256) NOT NULL, `enabled` tinyint(1) DEFAULT NULL, `created_at` varchar(10) DEFAULT NULL, `updated_at` varchar(10) DEFAULT NULL, PRIMARY KEY (`username`) ) ENGINE=InnoDB; CREATE TABLE `authorities` ( `username` varchar(256) NOT NUL...
true
36badf0ac6878c61edc1f985a97f757319637261
SQL
antoncom/messenger
/assets/components/themebootstrap/js/extract_promocode.sql
UTF-8
442
3.75
4
[]
no_license
SELECT pagetitle, modTemplateVarResource.value AS blg FROM `modx_site_content` AS `modResource` LEFT JOIN `modx_site_tmplvar_contentvalues` `modTemplateVarResource` ON (`modTemplateVarResource`.`tmplvarid` = '5' AND `modTemplateVarResource`.`contentid` = modResource.id) WHERE ( `modResource`.`parent` = 5135 AND `modRe...
true
93e8d4bf142bb0df5f32b039dbd72fd45dd16380
SQL
sun-wangbaiyu/emr-code
/pkuhit.iih.mr-impl/src/main/resources/META-INF/pkuhit/iih/qa/dao/qacustom/CusQaMrAmrDao/selectTerminalAmrZyAdtByCondition.sql
UTF-8
4,120
2.765625
3
[]
no_license
select amr.EN_PK, amr.PA_ID, amr.EN_CNT, amr.PA_NM, amr.SEX_CD, amr.AGE, amr.ORG_CD, amr.AMR_NO, amr.EN_NO, amr.EN_TP_CD, amr.EN_STA_CD, amr.AMR_STA_CD, amr.AMR_RANK_CD, amr.QA_SCR, amr.QA_AUTO_SCR, amr.REG_TIME, amr.REG_USER_ID, amr.REG_DEPT_CD, amr.RCV_USER_ID...
true
5a044c68ca7b9b1b130629d7aff1fe17862657f3
SQL
tenohira-xyz/MagazineManager
/src/main/resources/schema.sql
UTF-8
881
3.53125
4
[]
no_license
DROP ALL OBJECTS; /* ユーザマスタ */ CREATE TABLE IF NOT EXISTS m_user ( name VARCHAR(50) PRIMARY KEY, password VARCHAR(255), authority VARCHAR(20) ); /* 雑誌テーブル */ CREATE TABLE IF NOT EXISTS magazine ( magazine_id INT auto_increment PRIMARY KEY, name VARCHAR(30) NOT NULL, number VARCHAR(20) NOT NULL, publisher VARCH...
true
0f3cd51711cbfe7ece95d7f91c5a612d1c1b52f5
SQL
DhirajChauhan1997/GroceryMs
/SQL/grocerydb (2).sql
UTF-8
31,543
3.109375
3
[ "LicenseRef-scancode-unknown-license-reference", "MIT" ]
permissive
-- phpMyAdmin SQL Dump -- version 4.8.5 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1:3306 -- Generation Time: Nov 05, 2019 at 11:59 AM -- Server version: 5.7.26 -- PHP Version: 7.2.18 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CH...
true
3c07d347be67c655ab8bf1e52c7b0556f602b437
SQL
GambuzX/Movie-Theater-DB
/int6.sql
UTF-8
1,371
4.4375
4
[ "MIT" ]
permissive
.mode columns .headers on .nullvalue NULL DROP VIEW IF EXISTS HorariosPorCinema; CREATE VIEW HorariosPorCinema AS SELECT nomeC, Horario_t, COUNT(Horario_t) as quant FROM (SELECT CASE WHEN time(horaInicio) >= '07:00:00' AND time(horaInicio) <= '11:00:00' THEN 'Inicio da Manhã' WHEN time(horaInicio)...
true
5868da2e3303c0e9e88cf3a252d40e871b36ccd6
SQL
zhangjunapk/invoke-interface
/src/main/resources/somethinginteresing.sql
UTF-8
6,653
2.65625
3
[]
no_license
/* Navicat Premium Data Transfer Source Server : local Source Server Type : MySQL Source Server Version : 50559 Source Host : localhost:3306 Source Schema : somethinginteresing Target Server Type : MySQL Target Server Version : 50559 File Encoding : 65001 Date: 07/0...
true
c25ddbf27bd80846a133bfc70888336c8a0204b3
SQL
KatyoonMehr/SQL
/SQLQuery_Basics.sql
UTF-8
20,145
3.921875
4
[]
no_license
-- Access GRANT CREATE TABLE TO Guest; CREATE ROLE Data_Scientist; GRANT CREATE TABLE TO Data_Scientist; ALTER ROLE Data_Scientist ADD MEMBER Kati_Mehr; ALTER ROLE Data_Scientist DROP MEMBER Kati_Mehr; DROP ROLE Data_Scientist; ------------------------------------------------------------ -- Day 1 ...
true
169cde29e4b338f4c8f9b2827783f0a3e50bf764
SQL
rakaprmda/datagrip
/Order by seller, delivery fee, buyer.sql
UTF-8
2,641
3.890625
4
[]
no_license
SELECT date_trunc('month', timezone('Asia/Jakarta',"order".created_at)) order_date , ou.order_id , s.unique_id , city.name city , province.name province , s.address_latitude , s.address_longitude , "order".id , CASE WHE...
true
e64dde5fa2ba1011a10f2dc79d992ac59aa7a60f
SQL
MGoldstein18/learningPython
/hacker_news_sql.sql
UTF-8
762
4.09375
4
[]
no_license
/*Analyse data from Hacker News using SQL*/ SELECT title, score FROM hacker_news ORDER BY 2 DESC LIMIT 5; SELECT user, SUM(score) AS 'Score' FROM hacker_news GROUP BY 1 HAVING Score > 200 ORDER BY Score DESC; SELECT (517 + 309 + 304 + 282) / 6366.0; SELECT user, COUNT(*) FROM hacker_news WHERE url LIKE '%watch?...
true
1233a07f4b64c4ef936b4658c1bc50af8548db91
SQL
j7ng/CLFY_SA
/SA/Tables/TABLE_COMMUNICATION.sql
UTF-8
2,642
3.25
3
[]
no_license
CREATE TABLE sa.table_communication ( objid NUMBER, dev NUMBER, title VARCHAR2(255 BYTE), s_title VARCHAR2(255 BYTE), "TEXT" LONG, creation_time DATE, direction NUMBER, to_list VARCHAR2(255 BYTE), from_address VARCHAR2(255 BYTE), delivery_status NUMBER, auto_exec_ind NUMBER, communic...
true
b2724ae5eae808f4e719a658e0bc7f0df6d48ce8
SQL
18838988676/OAByView
/system_oa.sql
UTF-8
10,826
2.96875
3
[]
no_license
/* Navicat MySQL Data Transfer Source Server : localhost_3306 Source Server Version : 50626 Source Host : localhost:3306 Source Database : system_oa Target Server Type : MYSQL Target Server Version : 50626 File Encoding : 65001 Date: 2017-08-25 00:39:38 */ SET FOREI...
true
fd0eec3bfc36daf434ff276c8f7d1250b4553a0b
SQL
ahmadharis-ux/PraktikumBasdatUas
/10119266_Kepegawaian.sql
UTF-8
3,372
3.1875
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 5.1.0 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Waktu pembuatan: 14 Agu 2021 pada 02.30 -- Versi server: 10.4.18-MariaDB -- Versi PHP: 7.3.27 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@C...
true
5c496e771bfe8e19b9643e449016f56e9a57c4dd
SQL
cha63506/arc-124
/arc.sql
UTF-8
629
3.0625
3
[]
no_license
-- -- Database: `arc` -- -- -------------------------------------------------------- -- -- Table structure for table `users` -- CREATE TABLE IF NOT EXISTS `users` ( `id` int(11) NOT NULL AUTO_INCREMENT, `auth_email` varchar(75) NOT NULL, `auth_passw` varchar(40) NOT NULL, `auth_creds` varchar(255) DEFAULT NU...
true
d70155a4fdb75309726d18e55a2ba0b7f02104b2
SQL
andyawe/UAS
/makanan.sql
UTF-8
4,321
3.140625
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.8.4 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Mar 09, 2019 at 12:40 PM -- Server version: 10.1.37-MariaDB -- PHP Version: 7.3.1 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD...
true
dc7e0a52897c62d896d48547faa02a224b7f75a4
SQL
AnastasiaPetrikevich/.NETMentoringD1
/03. Basic SQL/Northwind/Northwind/Task 2/Task2.1.sql
WINDOWS-1251
1,251
4.25
4
[]
no_license
---Task 2.1--- --1-- -- Order Details . -- 'Totals'. SELECT SUM(Quantity * UnitPrice * ( 1 - Discount )) AS Totals FROM [Order Details]; --2-- -- Orders , (.. ShippedDate ). -- COUNT. WHERE GROUP. SELECT COUNT(*)-COUNT(ShippedDate) AS Totals FROM Orders --3-- -- Order...
true
6b26705dca04e51517195af70649724034f4abdf
SQL
nikku-b/Bellabeat_Case_Study
/averagecaloriesburnedpertimeofday.sql
UTF-8
1,681
4.53125
5
[]
no_license
/* I started my analysis by setting the time of days and looking at average calories burned, average steps, and average intensity level for the time of days. I found that most average calories burned were burned in the evening, closely followed by the afternoon. The least calories were burned at night. The highest av...
true
524d00febd6894f2102aecc0bef699117b688a98
SQL
bellmit/flexdb
/2.HOST/1.View/vw_afln_info_log.sql
UTF-8
1,844
2.9375
3
[]
no_license
create or replace force view vw_afln_info_log as select cf.custodycd, af.acctno, ln.actype lntype, max(case when ln.rrtype = 'B' then cspks_cfproc.fn_getavlcflimit(ln.custbank, af.custid, 'DFMR') else 0 end) banklimit, sum(decode(ftype,'DF',1,0)*(prinnml+prinovd+intnmlacr+intdue+intovdacr+intnmlovd+feeintnmlacr+feeintd...
true
8df793cda6655a0f9367fefd84769e50e40d1686
SQL
nbrahman/HackerRank
/06 SQL/05 Advanced Join/Interviews_MySQL.sql
UTF-8
868
4.125
4
[]
no_license
select co.contest_id, co.hacker_id, co.name, sum(ss.sts), sum(ss.stas), sum(vs.stv), sum(vs.stuv) from contests co, colleges cl, challenges ch, (select ch2.challenge_id, sum(vs2.total_views) stv, sum(vs2.total_unique_views) stuv from challenges ch2 left join view_stats vs2 on ch2.challenge_id = vs2.challenge...
true
f54236b959f98ee101c83b4d91e7e71b9aac0ac2
SQL
Giannandrea-Vicidomini/DataBase_Project
/SQL_scripts/create_tables(2).sql
UTF-8
2,774
3.75
4
[]
no_license
/********************************************************************* If you didn't create the db yet run reset_db(1). This file generates all the tables, make sure the db is actually empty if it isn't run reset_db(1) **********************************************************************/ use steamDB; create table...
true
c818fb250ebc5167215d74153d5791ecf650f296
SQL
microsoft/AzureSynapseScriptsAndAccelerators
/Scripts/Dedicated SQL pool/WLM/Get Workload Group Stats.sql
UTF-8
978
2.765625
3
[ "LicenseRef-scancode-generic-cla", "MIT" ]
permissive
/*************************************************************************************************** Create Date: 08-20-2020 Author: Casey Karst MSFT Description: This query runs against the user database and returns all information regarding WorkloadGroups provisioned on the database. *...
true
5e39f190569818d4f00ccadd25a182162116591c
SQL
Jenny6199/Repo_Diving_center
/Diving_center_1_Create_tables.sql
UTF-8
9,088
3.75
4
[]
no_license
-- ПРОЕКТ: Дайвинг-центр -- Максим Сапунов Jenny6199@yandex.ru -- Файл №1 -- СОЗДАНИЕ ТАБЛИЦ. CREATE DATABASE IF NOT EXISTS diving_center; USE diving_center; -- ТАБЛИЦА №1 Члены клуба. DROP TABLE IF EXISTS members; CREATE TABLE IF NOT EXISTS members ( id INT UNSIGNED PRIMARY KEY AUTO_INCREMENT COMMENT 'Идентификато...
true
5ee0a3001c136b43e156603e0cfb98d3e679f7ab
SQL
hsuthar1/w205_2017_summer
/exercise_1/investigations/best_hospitals/best_hospitals.sql
UTF-8
192
3.046875
3
[]
no_license
drop table best_hosp; create table best_hosp as select hospital_name, avg(score) as avg_score from te_care group by hospital_name ; select * from best_hosp order by avg_score desc limit 10 ;
true
6474e5bd4dec4f3bb7cba934e0420bd56d6bde85
SQL
JinmingChen12/InformationArchitecturesFinal
/Codes/Dimension tables.sql
UTF-8
1,530
3.5
4
[]
no_license
use master_dw; drop table if exists `Arrest_Dim`; create table `Arrest_Dim`( `Record ID` int primary key, `Arrest ID` varchar(50), `Arrest_Date` varchar(50) ); drop table if exists `Crime_Dim`; create table `Crime_Dim`( `Record ID` int primary key, `Law Code Category Description` varchar(30), `Offense Description` v...
true
5567b37258a7329b5e18ad7f0bd7aa27b0395297
SQL
amarlokman110/Data-Scientist-with-Python-datacamp-
/13 Joining data in SQL/04-subqueries/13-final-challenge(3).sql
UTF-8
1,428
4.4375
4
[]
no_license
/* Welcome to the last challenge problem. By now you're a query warrior! Remember that these challenges are designed to take you to the limit to solidify your SQL knowledge! Take a deep breath and solve this step-by-step. You are now tasked with determining the top 10 capital cities in Europe and the Americas in terms...
true
c2ff35fcbd0e8250be8a364519e67a2f0c79a0ad
SQL
Krlees/zhihuikongtiao
/hotel.sql
UTF-8
439,049
3.15625
3
[]
no_license
git/* Navicat MySQL Data Transfer Source Server : local Source Server Version : 50717 Source Host : localhost:3306 Source Database : hotel Target Server Type : MYSQL Target Server Version : 50717 File Encoding : 65001 Date: 2017-05-09 15:18:37 */ SET FOREIGN_KEY_CHECKS=0; -- ----...
true
ff9c3d147320d61e75b9e59484abf0f8ca211c70
SQL
fleetmack/mines
/me/acknowledgment/acknowledgment 2004/ack_letters_sql/completed/standard_pc_done.SQL
UTF-8
6,339
2.9375
3
[]
no_license
/**************************/ /*** Standard PC Letter ***/ /**************************/ UPDATE a_ack_rcpt SET ack_letter1 = DECODE(ack_segment,'Gugg','I would personally like to t', 'T')|| 'hank you for your generous gift to Colorado School of Mines.'|| DECODE(flag_committe...
true
22d3713171ea9fbf5a6f2715ca0eca269bbafaa0
SQL
annewang27/cura
/schema.sql
UTF-8
579
2.75
3
[]
no_license
DROP TABLE IF EXISTS art; CREATE TABLE art ( id INTEGER PRIMARY KEY AUTOINCREMENT, title TEXT NOT NULL, artist TEXT NOT NULL, created TEXT NOT NULL, gallery_id INTEGER NOT NULL, summary TEXT NOT NULL, photo BLOB NOT NULL ); DROP TABLE IF EXISTS artist; CREATE TABLE artist ( id INTEGER...
true
625248259edc324f1ae617c9c854a2024df725e1
SQL
jg-db-riga/2
/l4-materialized_view_task.sql
UTF-8
2,303
3.375
3
[]
no_license
1. Create XX_CARS table with following attributes: ID PRIMARY KEY NUMBER, MANUFACTURER VARCHAR2(100), MODEL VARCHHAR2(100), YEAR VARCHAR2(4) 2. Insert a new car to XX_CARS table 3. COMMIT transaction 4. Create XX_CARS_MV materialized view with following properties: BUILD DEFERRED, REFRESH FORCE, ON DEMAND. Que...
true
ff11d7ac646f9d79b389678f368b8a387b19b4b8
SQL
Rafael7silva/Banco-de-dados
/Pizzaria carrinho.sql
UTF-8
2,727
3.984375
4
[ "MIT" ]
permissive
create database carrinhorafael; use carrinhorafael; -- carinho de compras Rafael -- decimal (tipo de dados numericos não int 10,2 dez digitos com 2 casas decimais de precisão create table carrinho ( codigo int primary key auto_increment, produto varchar(250) not null, quantidade int not null, valor decimal (10,2) ...
true
ac606970a2b9271696cc39bc72cb5bf99c9876d8
SQL
Mark4348/Employee-CMS
/schema.sql
UTF-8
638
3.515625
4
[]
no_license
DROP DATABASE IF EXISTS employeecms; CREATE DATABASE employeecms; USE employeecms; CREATE TABLE departments( id INTEGER NOT NULL AUTO_INCREMENT PRIMARY KEY, department_name VARCHAR(30) ); CREATE TABLE employees( id INTEGER NOT NULL AUTO_INCREMENT PRIMARY KEY, first_name NOT NULL VARCHAR(30), last...
true
d0209c53b2335bfe94fbda4b5e279b5a30e7e5cc
SQL
DominicAbogado/bamazon
/assignment12.sql
UTF-8
693
3.484375
3
[]
no_license
drop database if exists bamazon2; create database bitemnameamazon2; use bamazon2; create table products( -- item ID -- id integer not null auto_increment, product_name VARCHAR(50) NOT NULL, department_name VARCHAR(50) NOT NULL, price integer(100), stock_quantity integer(100), in_stock BOOLEAN default true NOT NULL, ...
true
41b21ce4bcf4125c7a40d456843a4889385ed857
SQL
sylxjtu/act-backend
/sql/migrate-v0.6-alpha.sql
UTF-8
337
3
3
[]
no_license
-- Allow NULL value occur in room ALTER TABLE `activity` CHANGE `roomId` `roomId` INT(11) NULL; -- Remove the restriction to delete room ALTER TABLE `activity` DROP FOREIGN KEY `activity_ibfk_1`; ALTER TABLE `activity` ADD CONSTRAINT `activity_ibfk_1` FOREIGN KEY (`roomId`) REFERENCES `room`(`id`) ON DELETE SET NULL ON...
true
1f979430027efa405f3facf4d56e5973129bf7c3
SQL
amydinsyahira/soapAPI
/api.sql
UTF-8
1,716
3.03125
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 3.1.3.1 -- http://www.phpmyadmin.net -- -- Host: localhost -- Waktu pembuatan: 17. Agustus 2011 jam 16:11 -- Versi Server: 5.1.33 -- Versi PHP: 5.2.9 SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_S...
true
7ba88f3d8d1731efec82e26a353ae85daf4ddf53
SQL
ElifKarakutukDinc/dvd_rental
/join_table/Script_2_16.sql
UTF-8
268
4.09375
4
[]
no_license
--Which store has the most movies? -- They can have the same movie select s.store_id, count(f.film_id) from store as s left join inventory as i on (s.store_id=i.store_id) left join film as f on (f.film_id=i.film_id) group by s.store_id order by count(f.film_id) desc;
true
bff8c868b6ed27e60fbbcf0a50d2c6acf3da0c33
SQL
ly2014/um
/src/main/resource/db.sql
UTF-8
341
2.578125
3
[]
no_license
if not exists table t_user; create table t_user ( id int primary key, num varchar(20) not null, name varchar(20) not null, sex varchar(2) not null, age int not null comment, remark varchar(255) comment, status int not null comment, create_time datetime not null, edit_time datetime no...
true
bc6d947d29269710bf6fea38de9ccfcbc1cf8afb
SQL
Lespig/Mycodingprogress
/SQL/module11/unions.sql
UTF-8
320
2.78125
3
[]
no_license
SELECT first_name AS Company_Names FROM employee UNION SELECT branch_name FROM branch UNION SELECT client_name FROM client; SELECT client_name, client.branch_id FROM client UNION SELECT supplier_name, branch_supplier.branch_id FROM branch_supplier; SELECT salary FROM employee UNION SELECT total_sales FROM works_with;
true
4126a655205f4a79db63558d5541ce76d9b95a17
SQL
esteves-esta/sistema-goodeyes
/bd_goodeyes_INSERTS.sql
UTF-8
20,851
3.484375
3
[]
no_license
/* PROCEDURES DO BANCO DE DADOS GOODEYES */ /* **INSERIR********************************************* */ /* -- LOGIN*/ DELIMITER $$ drop procedure if exists pa_inserirLogin $$ create procedure pa_inserirLogin ( $email varchar (60), $senha varchar (8), $nivel_acesso int ) main: begin insert into tbLogin ...
true
a6f8493640d1267ce08b5251ce9d902c6a495b37
SQL
diegocarreto/ALO
/Start Back Up/noticia_3.sql
UTF-8
1,693
2.734375
3
[]
no_license
INSERT INTO blog ( Fecha, Titulo, Subtitulo, Fuente, Descripcion, Etiquetas, Url, Tipo, Imagen, Autor, Especies ) values ( convert(date, '18/05/2017 ', 104), 'Granja del Futuro', '', 'maltaCleyton', '<p>Estimado equipo Neovia México</p> <p>Les queremos compartir de un gran proyecto innovador de Neovia llamado “Granja d...
true
2174c36c7e46e09c6a1fd338b6d5f73d6de20ea2
SQL
will-malpass/msc_diss
/mysql_scripts/network_effects_gen_US.sql
UTF-8
4,669
4.25
4
[]
no_license
CREATE TABLE networks.us_connections AS SELECT sdb.games_2.steamid, sdb.friends.friend_since, sdb.friends.steamid_b, sdb.player_summaries.timecreated FROM sdb.games_2 INNER JOIN sdb.friends ON sdb.games_2.steamid=sdb.friends.steamid_a INNER JOIN sdb.player_summaries ON sdb.games_2.s...
true
b127cad2ac164a3b817a8bcd2628ec2ffe7bd1bf
SQL
Rajeshbhartia/ComputerStoreWebsite
/db file/notebook_description.sql
UTF-8
2,567
3.0625
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.2.11 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: Mar 17, 2015 at 09:54 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
d48266fe1ebe247620aa9dc43fc8d6aae7a55488
SQL
flexagon9/demo
/SQLServer/Create_stores.sql
UTF-8
379
3.265625
3
[]
no_license
if not exists (select * from sys.tables t join sys.schemas s on (t.schema_id = s.schema_id) where s.name = 'sales' and t.name = 'stores') CREATE TABLE sales.stores ( store_id INT IDENTITY (1, 1) PRIMARY KEY, store_name VARCHAR (255) NOT NULL, phone VARCHAR (25), email VARCHAR (255), street VARCHAR (255), city V...
true
12d5c6ec10a50ee017b4c24350c09484e9c64d05
SQL
donald-strong/Dragonpark
/DragonPark/src/main/resources/schema.sql
UTF-8
1,388
3.046875
3
[]
no_license
create table parking_rate ( id int primary key auto_increment, rate_name varchar(50) not null, rate varchar(20) not null, type varchar(50) not null, entry_condition varchar(50) not null, exit_condition varchar(50) not null, primary key (id) ...
true
fc44215093d24d77a3d3ea87a4564b84702ea3e3
SQL
kongyew/gpdb
/src/test/tinc/tincrepo/mpp/gpdb/tests/storage/filerep_end_to_end/resync/sql/skip/resync_heap_alter_part_exchange_partrange.sql
UTF-8
4,696
3.21875
3
[ "Apache-2.0", "LicenseRef-scancode-generic-cla", "PostgreSQL", "LicenseRef-scancode-other-copyleft", "metamail", "BSD-3-Clause", "LicenseRef-scancode-openssl", "LicenseRef-scancode-other-permissive", "ISC", "Python-2.0", "bzip2-1.0.6", "LicenseRef-scancode-ssleay-windows", "LicenseRef-scanco...
permissive
-- start_ignore SET gp_create_table_random_default_distribution=off; -- end_ignore -- -- RESYNC HEAP TABLE 1 -- CREATE TABLE resync_heap_alter_part_exchange_partrange1 ( unique1 int4, unique2 int4 ) partition by range (unique1) ( partition aa start (0) end (500) every (100), default p...
true
6a5ea154625d5af4ae3482973055b5bafd4fcd6a
SQL
dmKronenberg/DS_BOS_07_Students
/MishaHerscu/HW_01/question_01/misha_herscu_hw_1_query_01.sql
UTF-8
565
3.5
4
[]
no_license
-- 1. Triple Crown Award Winners SELECT m.namefirst, m.namelast, ap.awardID, ap.yearID, b.H/b.AB AS batting_average, b.RBI, b.HR, b.AB, b.R, b.H, b.2B, b.3B, b.SB, b.CS, b.BB, b.SO, b.IBB, b.HBP, b.SH, b.SF, b.GIDP, b.G_Old...
true
b2e1f241596b04a86a0634949e6438d049335fb2
SQL
rafiyajaved/CPK-queries
/aggregate_our_data_w_cpdp.sql
UTF-8
1,567
3.234375
3
[]
no_license
WITH cpdp_updated as (SELECT *, lower(last_name) as l_name, lower(first_name) as f_name, FROM `linear-stock-314817.invisinsitute_chicago_police_data.accused_updated_aggregated`), team_spreadsheet as (SELECT *, lower(split(cop_name, " ")[OFFSET(0)]) as f_name, lower(split(cop_name, " ")[OFFSET(1)]) as l_name, FROM ...
true
bc21699d4fd197adacc3ae690611bf8e497022a0
SQL
cskiwi/ws1-creations
/Webscripten2/Labo1/todo.sql
UTF-8
1,802
3.046875
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 3.5.1 -- http://www.phpmyadmin.net -- -- Host: localhost -- Generation Time: Dec 19, 2012 at 02:05 PM -- Server version: 5.5.25 -- PHP Version: 5.4.4 DROP DATABASE IF EXISTS `todo`; CREATE DATABASE `todo` DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_general_ci; USE `todo`; SET SQL...
true
a710f39173416ccdf1b0ea71279435f97ef3fa21
SQL
comproro/gawi
/gawibawibo/gamequery.sql
UTF-8
1,087
2.859375
3
[]
no_license
select * from game; /*Table structure for table `game` */ drop table game; CREATE TABLE `game` ( `id` int(11) NOT NULL AUTO_INCREMENT, `choice` int(11) NOT NULL, `computerChoice` int(11) NOT NULL, `judgement` varchar(50) NOT NULL, `datetime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE C...
true
88e05d7033ee99cf282505cfcf7a02472e01f70a
SQL
RashidMaulana/tubes_psi
/tubes_psi.sql
UTF-8
24,915
2.703125
3
[ "MIT" ]
permissive
-- phpMyAdmin SQL Dump -- version 5.0.4 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Jul 04, 2021 at 09:34 AM -- Server version: 10.4.16-MariaDB -- PHP Version: 7.4.12 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIE...
true
90d15c6801e9ba88beed983baaea3e92527f5156
SQL
fflch/dados
/Queries/conta_alunosposgr_especiais_dpto.sql
UTF-8
257
2.890625
3
[]
no_license
SELECT COUNT(DISTINCT l.codpes) from VINCULOPESSOAUSP v INNER JOIN NOMEAREA n on v.codare = n.codare INNER JOIN LOCALIZAPESSOA l on v.codpes = l.codpes where v.sitatl = 'A' AND v.codclg = 8 and v.tipvin = 'ALUNOPOSESP' AND n.codare = __dpto__
true
9ae8a650c1360ce95f68e151ba3e6d46a6b0dfc8
SQL
dmullen17/work-samples
/Shiny Dashboard/SQL/acquired_28_day_spend_conversion_main.sql
UTF-8
6,360
3.984375
4
[]
no_license
drop table if exists acquired_28_day_spend_conversion_country; create table acquired_28_day_spend_conversion_country ( country varchar ,lifetime_28_day_bucket int ,engagement_status_total varchar ,deployment decimal(3,2) ,spender_status varchar ,User_Count int ,primary key(c...
true
a58235d88c032e515b2c670c4e94fa79efc5481f
SQL
meiclm/pupil-home-school
/home_school.sql
UTF-8
8,960
3.59375
4
[]
no_license
/* Navicat MySQL Data Transfer Source Server : MySQL Source Server Version : 50723 Source Host : localhost:3306 Source Database : home_school Target Server Type : MYSQL Target Server Version : 50723 File Encoding : 65001 Date: 2018-10-17 19:25:34 */ SET FOREIGN_KEY_CHECKS=0; -- -...
true
5489c444aa7d0405b3919a1cff3fed5c8834caa9
SQL
MrSnyder/bielefeldGEOCLIENT
/docker/postgres/postgresql_init_data/init.sql
UTF-8
761
2.640625
3
[ "Apache-2.0" ]
permissive
CREATE USER osm WITH PASSWORD 'osm'; CREATE USER mapbender WITH PASSWORD 'mapbender'; CREATE DATABASE osm OWNER osm; \connect osm; CREATE EXTENSION IF NOT EXISTS postgis; CREATE EXTENSION IF NOT EXISTS hstore; ALTER TABLE geometry_columns OWNER TO osm; ALTER TABLE spatial_ref_sys OWNER TO osm; CREATE DATABASE munim...
true
2ea701a972d05c71e732dd2e6b245ef40de3984a
SQL
MoniqueCampbell/Database2
/info3180-lab4-master (old version)/socialmedia.sql
UTF-8
5,170
3.875
4
[]
no_license
-- CREATE DATABASE socialmeadia; -- use socialmeadia; #Changed user_id to integer NOT NULL for all tables except User #Changed user_id for user table to integer NOT NULL AUTO_INCREMENT, #Changed profile_id for only profile table to integer NOT NULL AUTO_INCREMENT, #Changed image_id for only image table to integer NOT N...
true
7ab1885dc8dcfab1e943fedb298b373d85d98b86
SQL
w01f/VolgaTeam.PowerPointHtml5Tools
/ClientWebLinksApp/protected/schema/tables/tbl_activity_user.sql
UTF-8
438
2.984375
3
[]
no_license
DROP TABLE IF EXISTS `tbl_activity_user`; CREATE TABLE IF NOT EXISTS `tbl_activity_user` ( `id` bigint NOT NULL AUTO_INCREMENT, `id_activity` varchar(32) NOT NULL, `ip` varchar(64) DEFAULT NULL, `os` varchar(256) DEFAULT NULL, `device` varchar(256) DEFAULT NULL, `browser` varchar(256) DEFAULT NULL, ...
true
13f4f14a8effd4f85c4ff55d7d599a6e12b12a50
SQL
JoelPatricio/gestorCursos
/Base/procedimientos y volcado.sql
UTF-8
4,972
3.921875
4
[]
no_license
USE `gestorcursos` ; insert into registro (matricula,password) values ("B6ACA741566","h698115f5h"), ("A5ACB920483","n95110b1n"); DELIMITER $$ CREATE PROCEDURE login(IN matriculaIn VARCHAR(50), IN passwordIn VARCHAR(50)) BEGIN SELECT count(*) FROM registro WHERE matricula=matriculaIn...
true