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
b4fb9ea933ff289c1823528d6fe2276835e37e7b
SQL
wallacevncs/LibraryGUI
/script/libraryScript.sql
UTF-8
489
2.96875
3
[ "MIT", "curl" ]
permissive
create database library; CREATE TABLE library.user( id int AUTO_INCREMENT, name varchar(100) NOT NULL, cpf varchar(11) NOT NULL, dateOfBirth varchar(10) NOT NULL, numberOfPhone varchar(11) NOT NULL, address varchar(100) NOT NULL, historic json, PRIMARY KEY (id) ); CREATE TABLE library.book( id int AUTO_INCREMENT, boo...
true
0527376c1663dfa53e1c6f3afd96c5b287acee93
SQL
techgeeker/obsolete
/online-shopping-demo/src/main/resources/sql/table_order.sql
UTF-8
3,156
4.0625
4
[]
no_license
SET NAMES utf8; DROP TABLE IF EXISTS `tb_product`; CREATE TABLE `tb_product` ( `id` BIGINT(20) NOT NULL AUTO_INCREMENT COMMENT 'primary key', `prod_name` VARCHAR(20) NOT NULL DEFAULT '', `model` VARCHAR(50) NOT NULL DEFAULT '', `prod_type` TINYINT(4) NOT NULL DEFAULT 0 COMMENT '0 no type, or other specific typ...
true
8978f8851d45077bfca2f6c957d06b485f1dcad7
SQL
aleagustin/pillsbox-server
/database.sql.sql
UTF-8
5,062
3.125
3
[]
no_license
create database pillsbox; CREATE TABLE usuarios ( id serial, email varchar(100) NOT NULL, contrasena varchar(64) NOT NULL, nombre varchar(20) NOT NULL, apellido varchar(20) NOT NULL, fecha_nacimiento date NOT NULL, notificaciones boolean NOT NULL DEFAULT false, PRIMARY KEY (id), UNIQUE (email) ); CREAT...
true
a1380f800d0ab72f0df351c94d7f42dc8b2529a3
SQL
GabrielVargasR/University-DB1-Auto-Parts-Shop
/src/sql_scripts/create/InsertOrganizacion.sql
UTF-8
745
3.515625
4
[]
no_license
DELIMITER // DROP PROCEDURE IF EXISTS InsertOrganizacion// CREATE PROCEDURE InsertOrganizacion ( IN pCedula DECIMAL(10, 0), IN pTelefono DECIMAL(8,0), IN pNombreContacto VARCHAR(40), IN pTelefonoContacto DECIMAL(8,0), IN pCargoContacto VARCHAR(25), IN pIdCliente INT ) BEGIN DECLARE cont DECI...
true
d45ea4ad65f08fe2e411677075002e98c6ba4f53
SQL
anirudhr/CS6083-DB
/as2/cus-5mov.sql
UTF-8
270
3.265625
3
[]
no_license
USE videoRentalChain; SELECT balance, cid FROM customer WHERE cid IN ( SELECT cid FROM rented WHERE outdate >= (SELECT DATE_SUB(curdate(), INTERVAL 2 WEEK)) GROUP BY cid HAVING COUNT(cid) >= 5 )
true
8a0fd5211f7d46aa5868cd387bf658650351cf1a
SQL
N05TR4/Sistema_Universitario
/bd_universidad.sql
UTF-8
1,487
3.796875
4
[]
no_license
create database bd_universidad; use bd_universidad; create table login( Usuario varchar(30) not null, Contraseña varchar(30) not null, fecha TIMESTAMP ) select * from login; create table Estudiante( nombre varchar(50) not null, apellido varchar(50) not null, direccion varchar(100) not null, fecha_nacimiento varchar(...
true
f12cbc92c95b35dfcdcad77110cb55c8f3b731c5
SQL
dseng905/newstyper-app
/server/database/create_database.sql
UTF-8
930
3.3125
3
[]
no_license
CREATE DATABASE newstyper; CREATE TABLE user_profiles( id SERIAL PRIMARY KEY, email VARCHAR(255) UNIQUE, password VARCHAR(255), first_name VARCHAR(255), last_name VARCHAR(255) ); CREATE TABLE article_typing_results( id SERIAL PRIMARY KEY, user_id SERIAL REFERENCES user_profiles(id), ar...
true
0b09395810a018085946913a02fb4180b951c135
SQL
ManuelPalomares/pruebaSophosNodeJsGimnasio
/ScriptBd/DML.sql
UTF-8
2,180
3.421875
3
[]
no_license
/* drop table `prueba_sophos`.`sedes_usuarios`; drop table `prueba_sophos`.`sedes`; drop table `prueba_sophos`.`ciudades`; drop table `prueba_sophos`.`usuarios`;*/ CREATE TABLE IF NOT EXISTS `prueba_sophos`.`usuarios` ( `id` INT NOT NULL AUTO_INCREMENT, `login` VARCHAR(45) NULL, `nombre` VARCHAR(45) NOT NULL, ...
true
65505bb1dc4c014d830a366297264b56ccee891b
SQL
rootPan/Hospital
/hospital.sql
UTF-8
21,913
3.015625
3
[]
no_license
/* Navicat MySQL Data Transfer Source Server : . Source Server Version : 50717 Source Host : 127.0.0.1:3306 Source Database : hospital Target Server Type : MYSQL Target Server Version : 50717 File Encoding : 65001 Date: 2017-04-23 14:18:05 */ SET FOREIGN_KEY_CHECKS=0; -- --------...
true
7edcca91d8fb06858b20cde8c5fb4a551f3823ab
SQL
freitmi/queries-vldb2020
/graph/queries/1.sql
UTF-8
151
2.734375
3
[]
no_license
SELECT COUNT(*) FROM edges e1, edges e2, edges e3 WHERE e1.sink = e3.source AND e1.source = e2.source AND e2.sink = e3.sink;
true
b77821a231739df7a038fbba7962e62fbdab3c00
SQL
PedroFreitas90/Sakila-NoSQL
/Oracle/constraints.sql
UTF-8
2,437
3.203125
3
[ "MIT" ]
permissive
ALTER TABLE city ADD CONSTRAINT fk_city_country FOREIGN KEY (country_id) REFERENCES country(country_id); ALTER TABLE address ADD CONSTRAINT fk_address_city FOREIGN KEY (city_id) REFERENCES city(city_id); ALTER TABLE staff ADD CONSTRAINT fk_staff_address FOREIGN KEY (address_id) REFERENCES address (address_id); ALTER...
true
1d9ab4fa99f18f22c9695572a4af7237a29ac0f9
SQL
chanrychhoy/project1_php
/database/project_programing.sql
UTF-8
12,197
3.234375
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 5.1.1 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Aug 22, 2021 at 07:42 PM -- Server version: 10.4.20-MariaDB -- PHP Version: 8.0.9 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIEN...
true
9305ad6bb3b7de2c98bfc6b87acf4740a8c86337
SQL
Lucaskp96/Peoplegrid
/_documentacao/tabelasPeopleGrid/resposta.sql
UTF-8
1,080
3.375
3
[]
no_license
-- Table: peoplegrid.resposta -- DROP TABLE peoplegrid.resposta; CREATE TABLE peoplegrid.resposta ( id serial NOT NULL, codnivelescolaridade serial NOT NULL, codrendafamiliar serial NOT NULL, codvocepensoucomo serial NOT NULL, codquestionario serial NOT NULL, CONSTRAINT pk_resposta PRIMARY KEY (id), CON...
true
cd352dcb8f5a5b36258490280520a51813db3aeb
SQL
chenlixinpeng/test
/db/damai.sql
UTF-8
8,046
2.765625
3
[]
no_license
SET NAMES UTF8; CREATE DATABASE damai CHARSET=UTF8; USE damai; CREATE TABLE dm_product( pid INT NOT NULL PRIMARY KEY AUTO_INCREMENT, title VARCHAR(128) NOT NULL, detail VARCHAR(128) DEFAULT NULL, showTime VARCHAR(128) NOT NUll, city VARCHAR(128) NOT NULL, venues VARCHAR(128) NOT NULL, classify VARCHAR(128...
true
3ae6475c87dde91ebed42e7d245fcc4a1ef5c29b
SQL
sfoster2008/bamazon
/bamazon.sql
UTF-8
707
2.859375
3
[]
no_license
CREATE DATABASE bamazon; USE bamazon; CREATE TABLE products ( item_id INT NOT NULL AUTO_INCREMENT, product_name VARCHAR(64) NOT NULL, dept_name VARCHAR(32) NOT NULL, price DECIMAL (10,2) NOT NULL, quantity INT NOT NULL, PRIMARY KEY (item_id) ); INSERT INTO products (product_name, dept_name, price, quantity)...
true
323b0ac7d57f7f58b83f74daa552f05a02050eec
SQL
naresh-nandu/NanduGST
/WePGSTDB/dbo/Stored Procedures/usp_Update_Invoices_MissingInGSTR2A.sql
UTF-8
10,973
3.671875
4
[]
no_license
 /* (c) Copyright 2017 WEP Solutions Pvt. Ltd.. All rights reserved Description : Procedure to Update Invoices missing in GSTR2A Written by : Sheshadri.mk@wepdigital.com Date Who Decription 07/31/2017 Seshadri Initial Version 11/02/2017 Seshadri Modified the code related to Accept ...
true
bd7ab3146057df194c5653154d0f3e0c4d3e9fed
SQL
arjun0419/databases
/server/schema.sql
UTF-8
883
3.5
4
[]
no_license
DROP DATABASE chat; CREATE DATABASE chat; USE chat; CREATE TABLE messages ( /* Describe your table here.*/ id int auto_increment, message varchar(300), roomname varchar(40), username varchar(50) REFERENCES users(id), PRIMARY KEY (id) ); /* Create other tables and define schemas for them here! */ CREATE...
true
12efcd9cf9163773efd5440155a55e0e19a892c7
SQL
leobancosta/devsecops
/backend/dso-mysql/sprint_userstory/init.sql
UTF-8
493
3.03125
3
[]
no_license
CREATE DATABASE dso; GRANT ALL PRIVILEGES ON dso.* TO 'dsouserstory'@'%' IDENTIFIED BY 'dsopass'; GRANT ALL PRIVILEGES ON dso.* TO 'dsosprintuserstory'@'localhost' IDENTIFIED BY 'dsopass'; USE dso; CREATE TABLE sprint_userstory ( sprint_userstory_id INT NOT NULL AUTO_INCREMENT PRIMARY_KEY, sprint_id INT NOT NULL, ...
true
18ea0ca2f39ea17e4afc17fcb8ba8006cb2ece2c
SQL
andrecontisilva/SQL-aprendizado
/HackerRank/SQL-MSServer/HackerRank_SQL-MSServer_WeatherObservationStation2.sql
UTF-8
866
3.484375
3
[ "MIT" ]
permissive
/* Site: HackerRank Type: Practice Subdomain: Aggregation Difficulty: Easy Skill: SQL (MS Server) Problem: Weather Observation Station 2 URL: https://www.hackerrank.com/challenges/weather-observation-station-2/problem */ -- SOLUTION: -- v1: Using FORMAT() with 'F2' SELECT FORMAT(ROUND(SUM(lat_n),2),'F2'), F...
true
62bf45e0907861401c18664fad4fcb32c45b2d97
SQL
tsmit317/ITCS-3160-Homework
/Assignment03/ITCS_3160Assignment3.sql
UTF-8
1,437
3.609375
4
[]
no_license
/*Taylor Smith ITCS 3160 Assignment 3 */ USE PRETTYPRINTS; /* 1. */ SELECT Customer_name, customer_add, customer_city, customer_state, customer_zip FROM Customers ; /* 2. */ SELECT customer_name, customer_phone FROM Customers WHERE customer_state = 'GA' ; /* 3. */ SELECT customer_name, customer_zip FROM Cu...
true
30b45d2b47bf810f5022e4a6d70afcdb8ccf676d
SQL
christinaashworth/PoKi
/SQLQuery2.sql
UTF-8
3,960
4.40625
4
[]
no_license
 -- What grades are stored in the database? SELECT * FROM Grade; -- What emotions may be associated with a poem? SELECT e.Name FROM Emotion e; -- How many poems are in the database? SELECT Count(Poem.Id) AS NumberOfPoems FROM Poem; -- Sort authors alphabetically by name. What are the names of the top 76 authors...
true
1e04a320a409daaf2e1159afca266fdd24635514
SQL
LioKr/parkshark-fisher
/src/main/java/com/switchfully/parksharkfisher/domain/dbscripts/createTable.sql
UTF-8
3,007
3.765625
4
[]
no_license
drop table if exists divisions cascade; create table divisions ( id uuid not null constraint divisions_pk primary key, division_name varchar(60) not null, original_name varchar(60), director varchar(60) not null ); create table address ( id uuid ...
true
5e88720554746a9c8ee65bc9e2d60e8a3691fe35
SQL
method5/method5.github.io
/presentations/Method5 demo without showing target names.sql
UTF-8
2,571
3.1875
3
[ "MIT" ]
permissive
-------------------------------------------------------------------------------- --Method5 live demo for presentations. --(Normally these statements would include a simpler "select *", but I used -- some extra code to hide the target names.) --------------------------------------------------------------------------...
true
a45b51e2bcf6cbf79796b682a5073edaa4481cfb
SQL
CarlosZr09/HotelFaraon
/basereservanew.sql
UTF-8
7,978
3.296875
3
[]
no_license
-- MySQL Script generated by MySQL Workbench -- 03/22/18 11:01:41 -- Model: New Model Version: 1.0 -- MySQL Workbench Forward Engineering SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0; SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0; SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='TRADITION...
true
4104acf94c8ef0468cfe845ddf49a4d069120215
SQL
gtmsallu/store
/adminpanel/uploads/1591205646_ecommercesite (2).sql
UTF-8
5,143
2.96875
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.8.5 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: May 21, 2020 at 01:11 PM -- Server version: 10.1.38-MariaDB -- PHP Version: 7.3.3 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD...
true
6f9805e6597ff48adf396be375cca784cdb346d9
SQL
AbeerHDD/IStore
/boutique2.sql
UTF-8
2,949
2.546875
3
[]
no_license
INSERT INTO `categories` VALUES (1, 'PC-Protable', 1), (2, 'PC-Bureau', 1), (3, 'Tablette', 1), (4, 'Phone', 1); INSERT INTO `produits` VALUES (1, 'Portable Asus', 'Pack Fnac PC Portable Asus R556YI-XX001T', 1, 1600, 1), (2, 'HP Notebook', 'PC Portable HP Notebook 17-x103nf', 1, 1100, 1), (3, 'Asus ROG', 'PC Porta...
true
56253b5d2d4ee4f5fa144c84837db57034f38c17
SQL
HeeSeok-Kwon/R_study
/R_kmooc1/4weeks/4주차 SQL query.sql
UHC
2,590
3.921875
4
[]
no_license
select * from ֹ order by ȣ; select sum(ǸŰ) as Ѹ from ֹ where ȣ = 2; select sum(ǸŰ) as Ѿ, avg(ǸŰ) as , min(ǸŰ) as ּ, max(ǸŰ) as ִ from ֹ; select count(*) as ǸŰǼ from ֹ; select ȣ, count(*) as , sum(ǸŰ) as ǸѾ from ֹ group by ȣ; select ȣ, count(*) from ֹ where ǸŰ >= 8000 group by ȣ ...
true
423a090235ff7975140bae6c8fa6dce56816eade
SQL
404-html/coursework
/Database Systems/CW1/03.sql
UTF-8
134
2.953125
3
[]
no_license
SELECT * FROM Orders O WHERE O.odate < '20160916' AND NOT EXISTS (SELECT 1 FROM Details D WHERE O.ordid = D.ordid);
true
2c38a744cd6e40267d28139be7a2a2c747ca0a7d
SQL
bellmit/kem
/kem/target/classes/upgrade/dbupdater/special_config_tag@10v111.sql
UTF-8
1,032
3.75
4
[]
no_license
CREATE PROCEDURE exe() BEGIN DECLARE ts VARCHAR(50) DEFAULT "{{dataBaseName}}"; DECLARE tn VARCHAR(50) DEFAULT "special_config_tag"; -- 表结构创建: -- 删除例子 -- DROP TABLE IF EXISTS db_ver; -- 创建例子 drop view if exists special_config_tag; IF not EXISTS(SELECT * FROM information_schema.`TABLES` WHERE TABLE_NAME=tn AN...
true
aeedba87b6d126df42f4272aeb33423a27d1b418
SQL
emilymendelson/Move-Restore
/Move & Restore/loginsystem.sql
UTF-8
3,152
3.234375
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 5.0.2 -- https://www.phpmyadmin.net/ -- -- Host: localhost -- Generation Time: Jul 05, 2020 at 04:58 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
bf8f06124c60e1531ab16f9f8a63a53e255d9a9f
SQL
FeXyK/Authory
/CreateAuthorySchema.sql
UTF-8
2,885
3.203125
3
[]
no_license
CREATE DATABASE IF NOT EXISTS `authory` /*!40100 DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci */ /*!80016 DEFAULT ENCRYPTION='N' */; USE `authory`; -- MySQL dump 10.13 Distrib 8.0.22, for Win64 (x86_64) -- -- Host: 192.168.0.65 Database: authory -- ------------------------------------------------------...
true
f5d765d587c4c372446d3e0574b42badf53bbacc
SQL
sknabniai/karbase
/Sungero.Parties/VersionData/2.5.18.0/Script/convert_after_mssql.sql
UTF-8
737
3.25
3
[]
no_license
-- Заполнить св-во КА "Эл. обмен" if exists(select * from INFORMATION_SCHEMA.TABLES where TABLE_NAME='Sungero_Parties_ExchangeBoxes') and exists(select * from INFORMATION_SCHEMA.TABLES where TABLE_NAME='Sungero_Parties_Counterparty') begin update counterparty set CanExchange = case when exists(select * ...
true
2d6a3fa7f260607a20cb55180c96505f95387fe1
SQL
FThorson/just_practice
/SQLQuery7.sql
UTF-8
380
3.265625
3
[]
no_license
select count(InvoiceNumber) as NumInv ,SUM(InvoiceTotal) as TotBal from Invoices where InvoiceTotal - PaymentTotal - CreditTotal > 0 select 'After 9/1/2011' as SelDate ,count(*) as NumInv ,AVG(InvoiceTotal) as AvInv ,sum(InvoiceTotal) as Total ,MIN(InvoiceTotal) as LowInv ,MAX(InvoiceTotal)...
true
f672cdd3df2203e175df3b86955a7523237ee497
SQL
Ariah-Group/Research
/db_scripts/main/KC-RELEASE-3_2-SCRIPT/mysql/constraints/KC_FK_NEGOTIATION_CUSTOM_DATA.sql
UTF-8
172
2.84375
3
[ "Apache-2.0", "ECL-2.0" ]
permissive
DELIMITER / ALTER TABLE NEGOTIATION_CUSTOM_DATA ADD CONSTRAINT FK_NEGOTIATION_CUSTOM_DATA FOREIGN KEY (CUSTOM_ATTRIBUTE_ID) REFERENCES CUSTOM_ATTRIBUTE(ID) / DELIMITER ;
true
c3123b9a1c4c8f150567ac5a49e775b0790796e4
SQL
zz2555/NeuroFlow-Data-Challenge
/Part2/SQL Problem2.sql
UTF-8
161
3.171875
3
[]
no_license
SELECT organization_name FROM Providers p1 LEFT JOIN Phq9 p2 ON p1.provider_id=p2.provider_id GROUP BY p1.organization_name ORDER BY AVG(p2.score) DESC LIMIT 5
true
1d0fa8e4c2da98198a6e5813210fa7b4b46b464f
SQL
teqonix/smartplugdatabug
/ouimeauxDBProject/ouimeauxDBProject/dw/Tables/dimStatusList.sql
UTF-8
651
2.703125
3
[]
no_license
CREATE TABLE [dw].[dimStatusList] ( [statusIK] BIGINT CONSTRAINT [DF_dimStatusList_statusIK] DEFAULT (NEXT VALUE FOR [dw].[dimStatusListIK]) NOT NULL, [statusNaturalKey] BIGINT NOT NULL, [statusLabel] NVARCHAR (255) NULL, [statusNumberRepresent...
true
799f788ab75bd1267b2a7d5b5499ba11c7d441fa
SQL
mabr3/HackerRank
/SQL/BasicJoin/ContestLeaderboard.sql
UTF-8
272
4.4375
4
[]
no_license
SELECT h.hacker_id, h.name, SUM(max_s.sc) as S FROM Hackers h inner join (SELECT hacker_id, max(score) sc from Submissions GROUP BY challenge_id, hacker_id) max_s on h.hacker_id = max_s.hacker_id GROUP BY h.hacker_id, h.name HAVING S <>0 ORDER BY S desc, h.hacker_id asc
true
7d9ec72ff4327dc83f107ad3d68b547a46d2ccdc
SQL
keshaan/myrepo
/notebooks/Users/prasakumar@clearlightau.com/DIM_Consolidation_Group.sql
UTF-8
1,110
3.46875
3
[]
no_license
-- Databricks notebook source -- Drop table Dim Consolidation Group in Databricks /*Drop Table if exists pmfd_db.dim_consolidation_group */ -- COMMAND ---------- -- Create table Dim Consolidation Group in Databricks /*CREATE TABLE pmfd_db.dim_consolidation_group ( consolidation_group_unit_sk bigint NOT NULL,...
true
41f0aa26a424f62b06ab8555601b2c782528add9
SQL
mattfarrow1/7330-term-project
/mysql/SQLqueries.sql
UTF-8
7,726
4.28125
4
[]
no_license
use jeopardy; # Get the top 10 categories SELECT category, count(*) AS games FROM board GROUP BY category ORDER BY games DESC LIMIT 10; # Get the top 10 double Jeopardy locations SELECT subquery.rowcat, subquery.colcat, count(*) as count FROM ( SELECT board.clueid, board.doublejeop, location.rowcat, location.colcat ...
true
fd83e8e65e357652959cfc1bbe747556024da244
SQL
hs731/homephplearning
/CourseworkWebsite/mysql tables/users.sql
UTF-8
1,588
2.90625
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 3.4.10.2 -- http://www.phpmyadmin.net -- -- Host: localhost -- Generation Time: Apr 20, 2019 at 05:52 PM -- Server version: 5.5.21 -- PHP Version: 5.6.18 SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;...
true
ea7140072854c0ff84030c584e023225b9e2d1f2
SQL
SunriseSoftVN/qlkh
/src/database/v.1.0.6.sql
UTF-8
353
2.78125
3
[]
no_license
ALTER TABLE `subtaskannualdetail` DROP `lastYear`; ALTER TABLE `subtaskannualdetail` DROP `currentYear`; ALTER TABLE `qlvt`.`subtaskannualdetail` ADD UNIQUE `sub_task_detail_annual_index` ( `taskDetailId` , `branchId` ); -- Fix bug set time on client when time on client is not correct. update `taskdetail` set `...
true
a60e9bcf126c4222524b75c4eb1d2d066c6aed62
SQL
escalantegc/mupum
/sql/20-09-2018.sql
UTF-8
1,444
3.5
4
[]
no_license
-- Table: public.cabecera_cuota_societaria -- DROP TABLE public.cabecera_cuota_societaria; CREATE TABLE public.cabecera_cuota_societaria ( idcabecera_cuota_societaria SERIAL NOT NULL, archivo bytea NOT NULL, periodo character(7), fecha_importacion date, idconcepto_liquidacion integer, CONSTRAINT cabecera_...
true
fe06c8873cd01191c57e0c30f8bf0449a30b296c
SQL
DJAHIDDJ13/S4
/BDAplus/create_r_db2.sql
UTF-8
1,176
4.03125
4
[]
no_license
CREATE TABLE City ( city_id INT NOT NULL UNIQUE PRIMARY KEY, city_name VARCHAR(64) NOT NULL, NOC VARCHAR(3) NOT NULL ); CREATE TABLE CountryCode ( NOC VARCHAR(3) NOT NULL PRIMARY KEY, country_name VARCHAR(64) NOT NULL , ISOCode VARCHAR(2) NOT NULL ); CREATE TABLE Discipline ( discipline_id INT NOT ...
true
ba661fc606911f25ed0e2949448499c645065f83
SQL
MalvikaBodh/Data-Engineering
/Project 5: Data Pipeline/dags/create_tables.sql
UTF-8
1,842
3.328125
3
[]
no_license
CREATE TABLE IF NOT EXISTS public.staging_events ( artist varchar, auth varchar, firstname varchar, gender varchar, iteminsession integer, lastname varchar, length float, level varchar, location varchar, method varchar, page varchar, registration bigint, sessionid integer, song...
true
c685e0697e0fa36bc74ee939f73ef8ec87652110
SQL
minji0320/Algorithm_for_CodingTest
/Sehoon/Programmers/SQL/최댓값 구하기.sql
UTF-8
1,368
3.796875
4
[]
no_license
-- 문제 설명 -- ANIMAL_INS 테이블은 동물 보호소에 들어온 동물의 정보를 담은 테이블입니다. ANIMAL_INS 테이블 구조는 다음과 같으며, ANIMAL_ID, ANIMAL_TYPE, DATETIME, INTAKE_CONDITION, NAME, SEX_UPON_INTAKE는 각각 동물의 아이디, 생물 종, 보호 시작일, 보호 시작 시 상태, 이름, 성별 및 중성화 여부를 나타냅니다. -- -- NAME TYPE NULLABLE -- ANIMAL_ID VARCHAR(N) FALSE -- ANIMAL_TYPE VARCHAR(N) FALSE -- DATETI...
true
5b36807973cfffefeaf3016ffd6e64553d5ecca1
SQL
tuanhiep/deanSpring
/src/main/resources/initial.data/initialize_deanSpring.sql
UTF-8
3,620
3.515625
4
[]
no_license
-- MySQL Workbench Forward Engineering SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0; SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0; SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTI...
true
1bb79d14fa9dbec4774e88defc3ba429cc784bd3
SQL
wfyson/Disaggregator2
/extensions/dbschema.sql
UTF-8
8,916
3.046875
3
[]
no_license
-- MySQL dump 10.13 Distrib 5.5.46, for debian-linux-gnu (x86_64) -- -- Host: localhost Database: disaggregatordb -- ------------------------------------------------------ -- Server version 5.5.46-0ubuntu0.14.04.2 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RES...
true
7302d1ea6c43929c7703a320c8152ea635a8fe5d
SQL
guitarmind/datasci_course_materials
/assignment2/prob3_i.sql
UTF-8
1,001
3.921875
4
[]
no_license
CREATE VIEW search_view AS SELECT * FROM frequency UNION SELECT 'q' AS docid, 'washington' AS term, 1 AS count UNION SELECT 'q' AS docid, 'taxes' AS term, 1 AS count UNION SELECT 'q' AS docid, 'treasury' AS term, 1 AS count; SELECT sum(result) AS sim FROM ( SELECT f1.docid AS docid1, f1.te...
true
54553a7887991c2705af33b88e50a5f1f3888923
SQL
PranjitGautam/DBMS-Project
/after_discharge.sql
UTF-8
654
2.921875
3
[]
no_license
-- -- Script was generated by Devart dbForge Studio 2020 for MySQL, Version 9.0.470.0 -- Product home page: http://www.devart.com/dbforge/mysql/studio -- Script date 07-12-2020 22:46:07 -- Server version: 10.4.17 -- Client version: 4.1 -- Please backup your database before running this script -- SET NAMES ...
true
e1cdf6dd2608b3c50fd546baf717cb94e543eddb
SQL
tranquiliza/RemoteLabels
/RemoteLabels.Database/Procedures/GetLatestPositionForUser.sql
UTF-8
247
3.296875
3
[]
no_license
CREATE PROCEDURE [Core].[GetLatestPositionForUser] @username NVARCHAR(50) AS BEGIN SELECT TOP (1) [Latitude], [Longitude], [Altitude], [Timestamp], [Username] FROM [Core].[Position] WHERE Username = @username ORDER BY [Timestamp] DESC END
true
6a75c66a73e1850c23bbc752924b9f89d845d4b1
SQL
Rajagunasekaran/Code-Backup
/NEW PROJECT SQL/SAMPLE/SP_MIG_CONFIG_INSERT.sql
UTF-8
6,197
2.609375
3
[]
no_license
-- version:1.5 -- sdate:18/06/2014 -- edate:18/06/2014 -- issue:805 --commentno#26,28 --desc:added cgn_id in ocbc_configuration(78,79,80) --done by:RL -- version:1.4 -- sdate:12/06/2014 -- edate:12/06/2014 -- issue:598 --commentno#63 --desc:removed left join queries --done by:RL & dhivya -- version:1.3 -- sdate:09/06...
true
f6dddd1f186345efb81e86e8b2051f5148c6f8eb
SQL
SahilGogna/SQL-Basics
/SQL class/sahilgogna_simulation.sql
UTF-8
2,117
4.125
4
[]
no_license
-- Design the relational model E-R -- Be sure all the tables are in the three normal forms -- Create relationships between tables -- Identify primary keys and foreign keys CREATE TABLE Member( code VARCHAR(5), first_name VARCHAR(20), last_name VARCHAR(20), phone VARCHAR(10), city VARCHAR(15), CO...
true
30f36649645c6ad255417fc515b5ffda0412559b
SQL
EdwinVanRooij/yakuza-general
/source/sql/procedures/p_wipe_table.sql
UTF-8
1,190
4.40625
4
[]
no_license
-- -- UNSAFE - THIS PROCEDURE WIPES A TABLE PERMANENTLY -- -- Trigger DDL Statements DELIMITER $$ -- Drop the previously made procedure DROP PROCEDURE IF EXISTS p_wipe_table $$ -- Create the procedure CREATE PROCEDURE p_wipe_table (IN p_table VARCHAR(100)) -- Start the procedure BEGIN -- Variable to count rows affect...
true
530a2711ff7066affad14bda1e3f9efc47418082
SQL
nataliajanssen/Labs_Ironhack
/SQL/lab_sql6.sql
UTF-8
2,598
4.71875
5
[]
no_license
USE sakila; -- 1. Write a query to display for each store its store ID, city, and country. SELECT s.store_id,c.city,co.country FROM sakila.store s JOIN sakila.address a USING (address_id) JOIN sakila.city c USING (City_id) JOIN sakila.country co USING (Country_id); -- 2. Write a query to display how much business, in...
true
9fabae5e06cffbda619be2685097f583400433a0
SQL
marcos-goes/casadocodigo-nodejs
/cdc.sql
UTF-8
2,590
3.015625
3
[]
no_license
-- MySQL dump 10.13 Distrib 5.7.16, for Linux (x86_64) -- -- Host: 0.0.0.0 Database: casadocodigo -- ------------------------------------------------------ -- Server version 5.7.17 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; ...
true
067d2c7c6efa9f2ed38dcca3e84e119865cdaa00
SQL
PraktikumWebDasar41-02/modul6-rifqiryandi
/dbjurnal.sql
UTF-8
1,626
3
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.8.2 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Waktu pembuatan: 12 Okt 2018 pada 05.01 -- Versi server: 10.1.34-MariaDB -- Versi PHP: 7.2.7 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARA...
true
1fb0b2cffb0f87bcf407f2512fce0243adb9da7f
SQL
JJHillWebDev/TripleS-Database
/EMPLOYEE.sql
UTF-8
1,212
3.03125
3
[]
no_license
INSERT INTO EMPLOYEE_INFO (EID, SSN, Green_Card,First_Name, Last_Name, DOB) VALUES (101, 123456789,NULL, 'Mathieu', 'Landretti', '02-03-2000'), (102, 123456787,NULL,'Jerry', 'Seinfeld','04-29-2000'), (103, 123456788,NULL, 'Amy', 'Johnson', '04-25-1996'); INSERT INTO EMPLOYEE_CONTACT(ECID, EID, Em...
true
10f8e134476d28cf822fd5bded7b70361afbbe5b
SQL
awxm5698/babyManage
/baby/schema.sql
UTF-8
5,173
2.953125
3
[]
no_license
--drop table if exists user; --create table user( -- id integer primary key autoincrement, -- user_name character(20) unique not null, -- password character(100) not null, -- user_level integer default 1, -- phone character(11) default null, -- email character(50) unique not null, -- is_deleted integer defaul...
true
127b7f914a5c2f2ae35f52bff7c14f5a0f475e37
SQL
hernanudea/SQL-Oracle-
/02 - Curso Oracle - Funciones 4.sql
ISO-8859-1
4,359
4.15625
4
[]
no_license
--VIDEO 20 -- TOCHAR() => convierte datos de otro tipo en tipo caracter --TO_CHAR(EXPR, [formato], [lenguaje]) SELECT TO_CHAR(10) FROM dual; SELECT TO_CHAR(0000001) FROM dual; SELECT TO_CHAR(000001, '09999999') FROM dual; --el 9 representa un digito --el cero inicial indica que si el numero tiene ceros al comienzo est...
true
1e62cb9b13a7691cdc74e00f19a863fe48a33ba2
SQL
DenisKasyanenka/Oauth2-client-and-server-for-WSO2
/server/src/main/resources/sql-scripts/data.sql
UTF-8
676
2.5625
3
[]
no_license
INSERT INTO app_role (id, role_name, description) VALUES (1, 'ROLE_USER1', 'Standard User - Has no admin rights'); INSERT INTO app_role (id, role_name, description) VALUES (2, 'ROLE_ADMIN', 'Admin User - Has permission to perform admin tasks'); -- password: password INSERT INTO app_user (id, first_name, last_name, pas...
true
70e847058d2622df68c16040cc113eb3eb7b0675
SQL
MrSanySnay/DB_2_2
/Лабораторная работа номер 7/3. Дополнительное задание.sql
WINDOWS-1251
200
3.28125
3
[]
no_license
use K_UNIVER SELECT [GROUP].IDGROUP, count(STUDENT.IDSTUDENT) [- ] FROM [GROUP] inner join STUDENT ON [GROUP].IDGROUP = STUDENT.IDGROUP group by [GROUP].IDGROUP
true
98a30d628aef4f44c73a2bdd385da641057a09f0
SQL
valentina1978/Tekwill-SQL
/lesson 9-10/Valentina.sql
UTF-8
3,181
4.03125
4
[]
no_license
select phone_number ,to_number (replace (phone_number,'.',','),'999,999,9999') as to_number_1 ,to_number (replace (phone_number,'.',','),'9999999999')as to_number_2 ,to_char (145.782,'999D999') as to_char from employees where employee_id between 100 and 144; select first_name ||' '||Last_name as f...
true
0ed726acebec325cc7c81fdd4ea361499e8f1d79
SQL
kadenaperpetua/twu_biblioteca_database_gabriela_guaman
/q5.sql
UTF-8
180
3.390625
3
[]
no_license
SELECT member.name FROM member WHERE member.id IN ( SELECT checkout_item.member_id FROM checkout_item GROUP BY checkout_item.member_id HAVING COUNT(checkout_item.member_id) > 1)
true
fc664c879c6d54cdc6b3031a1085df7d182a3245
SQL
percevalseb1309/ExpressFood
/express_food.sql
UTF-8
21,609
3.375
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.6.4 -- https://www.phpmyadmin.net/ -- -- Client : 127.0.0.1 -- Généré le : Mar 05 Septembre 2017 à 23:33 -- Version du serveur : 5.7.14 -- Version de PHP : 5.6.25 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACT...
true
6a3680fd0bc83b6a4a9ddfe8278f88616bbf692b
SQL
ducquyen/mycorpro-Indonesian-Couriers-Service-PRO
/query.sql
UTF-8
3,474
2.765625
3
[]
no_license
ALTER TABLE `oc_order` ADD `payment_district_id` INT(11) NULL DEFAULT NULL, ADD `shipping_district_id` INT(11) NULL DEFAULT NULL, ADD `payment_district` VARCHAR(128) NULL DEFAULT NULL, ADD `shipping_district` VARCHAR(128) NULL DEFAULT NULL; ALTER TABLE oc_address ADD COLUMN district_id INT(11) NULL; ALTER T...
true
0a50fec26682dbac90d39c4de9c35ecf2ea45c71
SQL
dipendrabharati/DatabaseManagementSystem
/homeworks/databasemodel.sql
UTF-8
13,816
3.28125
3
[]
no_license
-- MySQL Workbench Forward Engineering SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0; SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0; SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTI...
true
f709e4d735924c8e9bb27376ce0337adfe93a771
SQL
malusoares0/chinook
/task_8_github.sql
UTF-8
375
3.8125
4
[]
no_license
-- Quantos atendimentos foram feitos por funcionário? -- How many calls were made per employee? SELECT e.EmployeeId AS funcionario_id, e.FirstName || " " || e.LastName AS nome_funcionario, COUNT(e.Title) AS n_atendimentos FROM Customer c JOIN Employee e ON c.SupportRepId=e.EmployeeId GROUP BY e.FirstName || " " || ...
true
5ff9ca11cf0b2c1d9f455c0ae346e216b91eac87
SQL
GianluigiMemoli/AskToReply
/Database/StoredProcedure/AddInteresseUtente.sql
UTF-8
387
2.796875
3
[]
no_license
use asktoreply; DELIMITER $$ CREATE PROCEDURE AddInteresseUtente( email VARCHAR(256), nomeCategoria VARCHAR(256) ) BEGIN SELECT id INTO @userId FROM Utenti WHERE Utenti.email = email; SELECT id INTO @categoriaId FROM Categorie WHERE Categorie.nome = nomeCategoria; I...
true
23c4be77c538422c809dfb6e4feff61eb843f768
SQL
tmlsergen/eComTez
/DB File Sql/eComfinal.sql
UTF-8
64,200
3.25
3
[]
no_license
-- -------------------------------------------------------- -- Host: 127.0.0.1 -- Server version: 5.7.23 - MySQL Community Server (GPL) -- Server OS: Linux -- HeidiSQL Version: 9.5.0.5332 -- -------------------------------------------------------- /*...
true
ef502078c3c2418cfee5fcc1fc911560ba5c8d39
SQL
johnwongca/Analysis
/Analysis/Quote/q/Stored Procedures/q.UpdateAlgorithm.sql
UTF-8
388
2.96875
3
[]
no_license
CREATE procedure [q].[UpdateAlgorithm] ( @AlgorithmName varchar(128), @Class varchar(256), @Description varchar(max) ) as begin set nocount on update q.Algorithm set Class = @Class, Description = @Description where AlgorithmName = @AlgorithmName if @@rowcount = 0 insert into q.Algorithm(AlgorithmName, Class...
true
339177fea62033c75e8682eda1124e429bf337a8
SQL
ppedvAG/Turbo_SQL_Grundlagen_VC_2021_01_29
/2021_01_29_Turbo_SQL_Grundlagen/2021_01_29_Turbo_SQL_Grundlagen/005_ Wildcards.sql
ISO-8859-1
2,225
3.84375
4
[]
no_license
-- WILDCARDS beim LIKE -- % steht fr beliebig viele unbekannte Zeichen (0 - ?) -- Wertebereiche [] -- steht fr genau 1 Zeichen in einem bestimmten Bereich -- funktioniert auch mit Sonderzeichen -- funktioniert fr 'von-bis' [a-c] -- _ beim LIKE - genau 1 unbekanntes Zeichen -- *************************************...
true
12505e9799d59da78ed843e4a931d71dcac5ebec
SQL
azuki-framework/azuki-grep
/src/test/resource/sql/SELECT01.sql
UTF-8
628
3.375
3
[ "Apache-2.0" ]
permissive
-- subquery_factoring_clause SELECT /*+ hind */ DISTINCT column1 , column2 FROM table1 , ( SELECT UNIQUE column1 , column2 FROM table4 ) table2 , ( SELECT ALL column1 , column2 FROM...
true
2dcf096acd46471442be9cd7e860fcc4ea70ad4c
SQL
dominik-kutrowski/ListTuDu
/src/main/resources/List_Tu_Du.mysql
UTF-8
4,528
2.859375
3
[]
no_license
-- MySQL dump 10.13 Distrib 8.0.18, for Win64 (x86_64) -- -- Host: localhost Database: List_Tu_Du -- ------------------------------------------------------ -- Server version 8.0.18 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; ...
true
5e6c5e7f5164b1577249d5eb33a416fe4daf3d5e
SQL
LAmor0214/programmer_community
/src/main/resources/db/migration/V1__Create_user_table.sql
UTF-8
1,452
3.171875
3
[]
no_license
CREATE TABLE `user` ( `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键', `username` varchar(50) DEFAULT NULL COMMENT '用户名', `password` varchar(20) DEFAULT NULL COMMENT '密码', `nickname` varchar(50) DEFAULT NULL COMMENT '昵称', `gender` tinyint(4) DEFAULT '0' COMMENT '性别(0:男;1:女)', `phono_url` varchar(255) DEFA...
true
1146526f691b758c7cca3bc7ae2abeddd81fd321
SQL
micaiah-buttars/sql-2-afternoon
/SQL II/delete_rows.sql
UTF-8
1,115
2.6875
3
[]
no_license
-- DUMMY DATA -- CREATE TABLE practice_delete ( name TEXT, type TEXT, value INTEGER ); -- INSERT INTO practice_delete ( name, type, value ) VALUES ('delete', 'bronze', 50); -- INSERT INTO practice_delete ( name, type, value ) VALUES ('delete', 'bronze', 50); -- INSERT INTO practice_delete ( name, type, value ) VALUES (...
true
991f36e40ddc028f60717b8987418e494afbe3aa
SQL
sujitrai/Anguler-Bootstrap-node
/myDB.sql
UTF-8
1,656
2.796875
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 3.4.10.1deb1 -- http://www.phpmyadmin.net -- -- Host: localhost -- Generation Time: Sep 14, 2015 at 04:20 PM -- Server version: 5.5.44 -- PHP Version: 5.3.10-1ubuntu3.19 SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTE...
true
b12f96ad038ab3c893e3d2baa4470bed7346b437
SQL
the-night-wing/SQL_the_vets_clinic
/queries/select_procedures_matched_to_details.sql
UTF-8
104
2.8125
3
[]
no_license
SELECT * FROM procedures_history LEFT JOIN procedures_details USING (procedure_type, procedure_subcode)
true
5955c85482f638855cc6edbd9374fe5a5f083d71
SQL
julianurregoar/apollo-server-and-prisma
/prisma/migrations/20210215020723_init/migration.sql
UTF-8
305
3.609375
4
[]
no_license
-- CreateTable CREATE TABLE "Pet" ( "id" INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, "name" TEXT NOT NULL, "userId" INTEGER, FOREIGN KEY ("userId") REFERENCES "User" ("id") ON DELETE SET NULL ON UPDATE CASCADE ); -- CreateIndex CREATE UNIQUE INDEX "Pet_userId_unique" ON "Pet"("userId");
true
81eb63f96be87d08d81fe24730f5f619256c1854
SQL
sydney-sisco/LightBnB
/seeds/01_seeds.sql
UTF-8
1,533
2.8125
3
[]
no_license
INSERT INTO users (name, email, password) VALUES ('example user', 'hello@example.com', '$2a$10$FB/BOAVhpuLvpOREQVmvmezD4ED/.JBIDRh70tGevYzYzQgFId2u.'), ('test user', 'hello@test.com', '$2a$10$FB/BOAVhpuLvpOREQVmvmezD4ED/.JBIDRh70tGevYzYzQgFId2u.'), ('sample user', 'hello@sample.com', '$2a$10$FB/BOAVhpuLvpOREQVm...
true
6bf4eec5eb8f6dbcad9be5e67cce939db3e76372
SQL
ign-argentina/geoportal-desnormalizadas
/09.atributo_quitar_create_table.sql
UTF-8
1,186
2.96875
3
[]
no_license
-- Definición de la tabla atributo_quitar, se utiliza para filtar los atributos que no se van a publicar de la DB de IGN -- -- PostgreSQL database dump -- -- Dumped from database version 9.5.7 -- Dumped by pg_dump version 9.6.2 -- Started on 2019-05-02 13:23:36 SET search_path = desnormalizacion, pg_catalog; SET de...
true
e182c4dac09fabc855907816dafe78e90a79076d
SQL
xinyangwy/hfut-cs-assignments
/数据库系统/lab8.sql
UTF-8
918
4.125
4
[ "MIT" ]
permissive
/* CREATE VIEW V_SC_G(sno, sname, cno, cname, grade) AS SELECT student.sno, sname, course.cno, course.cname, grade FROM student, course, sc WHERE student.sno = sc.sno AND sc.cno = course.cno */ /* CREATE VIEW V_YEAR(sno, birthday) AS SELECT sno, YEAR(GETDATE()) - sage FROM student; */ /* CREATE...
true
7c08257ed945b87456016220e4a30b9cd4aeabef
SQL
ArvinRad/BootcampX
/4_queries/11_days_with_assignment_assist_number.sql
UTF-8
330
4.03125
4
[]
no_license
-- Get each day with the total number of assignments and the total duration of the assignmentsSELECT assignments.id as id, assignments.name as name, SELECT assignments.day as day, COUNT(assignments.id) as total_Number_of_assignment, SUM(assignments.duration) as duration FROM assignments GROUP BY assignments.day ORDER b...
true
644dd6ac232e5bdcb8ec90e5df69c1b97458aff5
SQL
dmitrilacour/ClientProject
/DB SP/spSubmitTask.sql
UTF-8
416
2.875
3
[]
no_license
DELIMITER // CREATE PROCEDURE `spSubmitTask`(IN `intJobID` INT(11), IN `strTitle` VARCHAR(250), IN `strDescription` TEXT, IN `strDuration` TINYINT(4), IN `strPeople` TEXT, IN `strSupplies` TEXT) BEGIN INSERT INTO tblTask (`JobID`, `Title`, `Description`, `Duration`, `People`, `Supplies`) VALUES (intJobID, strT...
true
5d0d3bf0d0f13a6176ee03435947f8501a9b97d0
SQL
AnuragDhn/Online-Restaurant-Booking
/hotel.sql
UTF-8
12,027
2.65625
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.1.4 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: Jul 24, 2015 at 05:57 PM -- Server version: 5.6.15-log -- PHP Version: 5.5.8 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT *...
true
616ae89daf8504c93a22d49b5961a51be7aaed22
SQL
thorwbm/lixiera_sql
/correcao/home/IMPORTAR_ATIVIDADE_COMPLEMENTAR.sql
UTF-8
5,286
3.71875
4
[]
no_license
/* --######################################################################################### -- ALINHAR AS TABELAS TIPO E MODALIDADE ------------------------------------------------------------------------------------------- insert into atividades_complementares_tipo (criado_em , atualizado_em, criado_por, atual...
true
223cf00a100c523d55924bbea4ef0950770a5ea4
SQL
brodix78/cinema
/src/db/schema.sql
UTF-8
756
3.484375
3
[]
no_license
CREATE TABLE halls ( id INT, placeId SERIAL PRIMARY KEY, row VARCHAR(10), place VARCHAR(10) ); CREATE TABLE customers ( id SERIAL PRIMARY KEY, name TEXT, phone TEXT ); CREATE TABLE sessions ( id SERIAL PRIMARY KEY, hallId INT, time BIGINT, movie TEXT, price NUMERIC ); CREATE TABLE re...
true
5b91faf1cdef970c9e1a287e285f35370830e10d
SQL
AlexanderKrustev/SoftUni
/CSharp Profession/DB Basics/06. Table Relations/10. Employee Departments.sql
UTF-8
199
3.953125
4
[]
no_license
SELECT TOP (5) e.EmployeeID, e.FirstName, e. Salary, d.Name FROM Employees AS e INNER JOIN Departments AS d ON e.DepartmentID=d.DepartmentID WHERE e.Salary>15000 ORDER BY e.DepartmentID
true
3ef6820a3bb9af2ce96b80e01d0f1b215a27802f
SQL
danstoyanov/CSharp-Databases
/HackerRank - MS SQL SERVER Problems/P38_AfricanCities.sql
UTF-8
125
3.609375
4
[ "MIT" ]
permissive
SELECT c.Name FROM City AS c JOIN Country AS ct ON ct.Code = c.CountryCode WHERE ct.Continent = 'Africa'
true
dc4a0f76867dc6a4a9d601baf9703be1ea55791a
SQL
lorenaelias/automatic-annotation
/sql/ExportAllwith1002.sql
UTF-8
2,664
3.390625
3
[]
no_license
select 'FT CDS complement(' || gene.pos_begin || '..' || gene.pos_end || ')', 'FT /locus_tag="' || gene.systematic_id ||'"', 'FT /gene="' || curated.name || '"', 'FT /product="' || curated.product || '"' , 'FT /similarity="Similar ...
true
6a250443d58fe8efd65195df8a6457ae1fc5f9c0
SQL
giuliodse/EuroDS
/hive/exercises/3.sql
UTF-8
261
3.34375
3
[]
no_license
# For each company find the firts users who joined the SN # ====> Some companies had users register at the same time create table first_users_by_company as select company_id, user_id, min(unix_timestamp(created_at)) over (partition by company_id) from users ;
true
66edf0222fcca9df6a474eaebc93ff7bec86aca4
SQL
FelipeZuriel/blackwhite
/blackandwhite (1).sql
UTF-8
4,565
3.4375
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.8.5 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1:3306 -- Generation Time: 08-Nov-2019 às 13:23 -- Versão do servidor: 5.7.26 -- versão do PHP: 7.2.18 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_...
true
d7978bf847e356acfbff2a2983e92614bac435bb
SQL
phuonganh1003/leduongphuonganh
/BT đang làm.sql
UTF-8
7,406
4.1875
4
[]
no_license
-- select * from transactions select * from customer select * from Branch select * from account select * from Bank select count (cust_name) from customer select count(*) from customer --1. Có bao nhiêu khách hàng có ở Quảng Nam thuộc chi nhánh ngân hàng Vietcombank Đà Nẵng Select COUNT(*) as soluongKH from customer...
true
5c683e4e15b6608f6abc28b9ecbfdf38775acaea
SQL
wwwjiahuan/message-board
/message.sql
UTF-8
2,249
3.203125
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.1.14 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: 2016-09-12 16:15:58 -- 服务器版本: 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 */; /*!40101 SET ...
true
2fb0404a5b3222294f19e414118e427330ce6358
SQL
NareshViriyala/PHP
/mysql/ServerProcs/Restaurant/dbo.usp_get_PlacedOrderItems.sql
UTF-8
1,077
3.453125
3
[]
no_license
DROP PROCEDURE IF EXISTS dbo.usp_get_PlacedOrderItems; DELIMITER $$ CREATE PROCEDURE dbo.usp_get_PlacedOrderItems(input NVARCHAR(64)) BEGIN DECLARE _SubjectID INT; SELECT SubjectID INTO _SubjectID FROM dbo.tbl_mstr_EntitySubject WHERE SubjectGuid = input; SET SQL_SAFE_UPDATES=0; UPDATE dbo.tbl_rest_PlacedOrderM...
true
78d0cb2f8b3f05cced6428598b4d093c11af7a7e
SQL
a11smiles/ica-wbs
/Starter-artifacts/Resources/LAMP-lift-and-shift-starter/osticket-master/include/upgrader/streams/core/9ef33a06-8f99b8bf.patch.sql
UTF-8
878
2.921875
3
[ "MIT" ]
permissive
/** * @version v1.9.0 * @signature 8f99b8bf9bee63c8e4dc274ffbdda383 * @title Move organization support from UserAccount to User model. * */ ALTER TABLE `%TABLE_PREFIX%user` ADD `org_id` int(11) unsigned NOT NULL AFTER `id`, ADD `status` int(11) unsigned NOT NULL DEFAULT 0 AFTER `default_email_id`, AD...
true
ce82bf6da92a47138575962813410c0fe3578c61
SQL
gfang200/additionalCodeExamples
/GameLtvModel/moves_adjust_ltv.sql
UTF-8
11,893
4
4
[]
no_license
--model_dataset_all-#-$- select case when publisher in ('organic','organic') then 'organic' else 'pac' end as source, 'all' as country, firstdate, stat_date-firstdate as date_diff, dense_rank() over (order by firstdate) as cohort, count(distinct user_uid) as user_cnt, ...
true
bf577381a448e4d38fc51f542f897953a6cdc413
SQL
MikaelEpelbaum/094241-DB-project
/create_commands.sql
UTF-8
2,959
4.09375
4
[]
no_license
CREATE TABLE Character( cName VARCHAR(50) PRIMARY KEY, role VARCHAR(110), hairColor VARCHAR(40) ); CREATE TABLE Wizard( cName VARCHAR(50) PRIMARY KEY, wandID INTEGER CHECK(wandID > 0), ...
true
272fc606d9464b513460ef440e8c7c1ac51b29e1
SQL
pfmaher67/SoftLi
/src/test/resources/data.sql
UTF-8
1,122
2.859375
3
[]
no_license
insert into LicenseModel(id, name, licenseMetricId, softwareCategoryId) values ('MB-1', 'WAS ND', 0, 0) ,('MB-2', 'RHEL', 2, 1) ,('MB-3', 'MongoDB', 2, 0) ,('MB-4', 'Qualys', 2, 1) ,('MB-5', 'Kafka', 0, 0); insert into LicenseRight(id, appId, licenseModelId, qtyOwned, qtyReserved) values ('AB-1-MB-1', 'AB-1', 'MB-1'...
true
dda4ddcbe398256280a206c884ee1523c8b73de7
SQL
AESJaverianaPica2020/jav-eas-providers-data-model
/mock_vuelos.sql
UTF-8
797
3.234375
3
[]
no_license
CREATE DATABASE VIVA_COLOMBIA_DB; USE VIVA_COLOMBIA_DB; CREATE TABLE VUELOS ( id INT PRIMARY KEY AUTO_INCREMENT, cabina VARCHAR(50) NOT NULL, ciudad_salida VARCHAR(250) NOT NULL, ciudad_llegada VARCHAR(250) NOT NULL, precio DECIMAL(12,2) NOT NULL, fecha_salida DATE NOT NULL, fecha_llegada DATE NOT NULL )...
true
ffb66c16d8defb9af2235a5d49e41fad72894638
SQL
math209/yii
/db_books.sql
UTF-8
4,004
3.265625
3
[ "BSD-3-Clause" ]
permissive
-- phpMyAdmin SQL Dump -- version 4.7.4 -- https://www.phpmyadmin.net/ -- -- Хост: 127.0.0.1 -- Время создания: Фев 02 2018 г., 14:11 -- Версия сервера: 10.1.30-MariaDB -- Версия PHP: 7.2.1 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHAR...
true