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
3b4d05278b51247f64f451cb0d4044a3752f5bf1
SQL
qq92573837/code
/MYSQL/ec.sql
UTF-8
1,546
3.40625
3
[]
no_license
CREATE TABLE product( `id` INT unsigned NOT NULL PRIMARY KEY AUTO_INCREMENT, `title` VARCHAR (64) not NULL, `price` DOUBLE not NULL, `cover_src` text varchar (1024), `stock` int unsigned 0, `des` text, `cat_id` int nut unsigned NULL ) DEFAULT charset = utf8mb4 engine = innodb; create tab...
true
168673c5b5c868ce36bb2d0fafbbe564afff8c88
SQL
nasim85/Automation
/SQL/Week Off.sql
UTF-8
1,027
3.265625
3
[]
no_license
sp_helptext USP_EmployeeWeekOffReport sp_helptext USP_EDB_UpdateAutomaticWeekOff sp_helptext USP_EDB_InsertWeekoff select * from LeaveDetails where EmployeeID=101209 and DateApplied='12/9/2012' select * from LeaveSummary where LeaveSummaryID in(218938) select * from LeaveSummary where AppliedBy in(101122123...
true
7817edb93114d29b88114f3d912dfd1ac86e1eb6
SQL
LIGHT1213/MySQL_Class
/FinalWork/XXXXSystem.sql
UTF-8
846
3.125
3
[ "MIT" ]
permissive
DROP DATABASE IF EXISTS XXXXSystem; CREATE DATABASE XXXXSystem; USE XXXXSystem; CREATE TABLE SysManager ( ManagerID VARCHAR(20) PRIMARY KEY, ManagerPWD VARCHAR(10) NOT NULL ); INSERT INTO SysManager VALUES('admin','admin'); `librarymanagesystem` CREATE TABLE SysUser ( SysUserID VARCHAR(20) PRIMARY KEY, SysUserPWD...
true
e6364e687833732be2cc8f44f18d723d16489cce
SQL
hariesvanw/shop
/db_shop.sql
UTF-8
18,252
2.78125
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.8.1 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Waktu pembuatan: 09 Sep 2019 pada 18.37 -- Versi server: 10.1.33-MariaDB -- Versi PHP: 7.2.6 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARA...
true
a672ebb055c39073dd43fd7fbbe1bfab2ed65ace
SQL
vv0rkman/lab2-DAO-Metamodel
/lab2-Data/DB_Scripts/Lab2Metamodel~6.sql
UTF-8
343
3.640625
4
[]
no_license
SELECT o.OBJECT_ID, o.PARENT_ID, o.OBJECT_NAME FROM OBJECTS o INNER JOIN OBJECT_TYPES_PERMISSIONS otp ON otp.subject_id = o.OBJECT_TYPE_ID AND otp.ROLE_NAME = 'CEO' AND (otp.PERMISSION = 'r' OR otp.PERMISSION = 'rw') AND (o.OBJECT_TYPE_ID = 3 OR ( o.OBJECT_TYPE_ID = ( SELECT a.PARENT_ID FROM OBJECT_TYPES a WHERE a.OB...
true
c4e95fcc446efb02a178a70bec261eef06d3cfc8
SQL
Oppo-sit/Study-Univ
/Web_DB_Programming/7 여러 기능.sql
UTF-8
228
2.671875
3
[]
no_license
show tables; show indexes from membertbl; use employees; select * from employees; select * from titles; select * from employees.titles; -- 주석 처리 하는 방법이다 /* 이것도 주석 처리 하는 방법이다 */
true
bbdc464516440866a6ed6b662fe8bcea7495b6d4
SQL
zzyzx-rd/serpico-migra-symfony
/migrations/first_install.sql
UTF-8
470,297
3
3
[ "MIT" ]
permissive
-- phpMyAdmin SQL Dump -- version 4.9.0.1 -- https://www.phpmyadmin.net/ -- -- Hôte : localhost:3306 -- Généré le : jeu. 04 fév. 2021 à 10:47 -- Version du serveur : 5.7.26 -- Version de PHP : 7.3.8 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTE...
true
56ebae4b7ac0f1232533213833bf8730f804c5fe
SQL
andrewmcgov/make-your-picks
/prisma/migrations/20210102234626_/migration.sql
UTF-8
458
3.109375
3
[]
no_license
-- CreateTable CREATE TABLE `LeaderboardEntries` ( `id` INT NOT NULL AUTO_INCREMENT, `userId` INT NOT NULL, `wildcard` INT NOT NULL, `division` INT NOT NULL, `conference` INT NOT NULL, `superbowl` INT NOT NULL, PRIMARY KEY (`id`) ) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; ...
true
e06ce7d2beb3af08bcc9b57882b3e5b02ea90d28
SQL
bastienterrier/cours-julien
/server/database/db.sql
UTF-8
282
2.796875
3
[]
no_license
CREATE EXTENSION IF NOT EXISTS "uuid-ossp"; CREATE DATABASE julien; CREATE TABLE users ( id uuid PRIMARY KEY DEFAULT uuid_generate_v4(), name varchar(255) NOT NULL ); INSERT INTO users (name) VALUES ('Julien'); INSERT INTO users (name) VALUES ('Bastien'); DELETE FROM users;
true
cbd9235fc67df73501330d21e47a5d03b759faa1
SQL
rbe/dmerce
/dmerce3/src/applications/listbox/sql/mysql.sql
UTF-8
593
2.6875
3
[]
no_license
-- MySQL dump 9.09 -- -- Host: localhost Database: dmerce --------------------------------------------------------- -- Server version 4.0.15-nt -- -- Table structure for table `vkunde` -- CREATE TABLE vkunde ( kundennr int(3) unsigned NOT NULL auto_increment, name varchar(255) NOT NULL default '0',...
true
afb8d6d1e21ea4b3d5a63775da2aed884fa90c95
SQL
MargoSolo/stared-repos-p2
/evernote-clone/documentation/database.sql
UTF-8
1,312
3.75
4
[]
no_license
CREATE TABLE "users" ( "id" int PRIMARY KEY NOT NULL, "username" string(50) NOT NULL, "email" string(100) UNIQUE NOT NULL, "hashed_password" string(255) NOT NULL, "created_at" timestamp NOT NULL ); CREATE TABLE "notebooks" ( "id" int PRIMARY KEY NOT NULL, "title" string(100) NOT NULL, "user_id" int NOT...
true
9fa69117d7c7e96d57c65da9d70eebb9162d940f
SQL
akshay-madar/codestack
/Leetcode/Database/tree-node.sql
UTF-8
208
3.03125
3
[]
no_license
/* Write your PL/SQL query statement below */ select id, case when p_id is null then 'Root' when id in (select distinct p_id from tree) then 'Inner' else 'Leaf' end as Type from tree order by id;
true
5be5824014f26166892e7e892f3a730bce6fb605
SQL
maxaqq/Proyecto-de-java
/Base de Datos/almacenproductos (1).sql
UTF-8
10,483
2.953125
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.7.0 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Jul 26, 2017 at 01:24 AM -- Server version: 10.1.25-MariaDB -- PHP Version: 7.1.7 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD...
true
385bf7c308b1dcdc8717b65588e1fa30231a9a37
SQL
SMC1/JK1
/Integration/kegg.sql
UTF-8
345
2.625
3
[]
no_license
drop table IF EXISTS kegg; CREATE TABLE kegg ( kegg_id varchar(63) NOT NULL, kegg_desc text, gene_sym varchar(31) NOT NULL, primary key (kegg_id,gene_sym) ); /*LOAD DATA LOCAL INFILE "/EQL1/TCGA/GBM/array_cn/TCGA_GBM_CNA_SNP6_tumorOnly.dat" INTO TABLE array_cn;*/ LOAD DATA LOCAL INFILE "/data1/Sequence/geneinfo/KE...
true
a700d9744cbaaeb4a8bc45740d447bfcab7181c8
SQL
TailaFranco/Projeto-WishList
/BD/scripts/WishList_03_DQL.sql
UTF-8
157
2.875
3
[]
no_license
SELECT * FROM Usuarios; SELECT * FROM Desejos; SELECT descricao, email, senha FROM Usuarios FULL OUTER JOIN Desejos ON Usuarios.idDesejo = Desejos.idDesejo;
true
b46833651a51ee8e54b050eab8b5661f36b714e5
SQL
Nickoog/mysql-workshop-3
/exercice 6.sql
UTF-8
121
2.765625
3
[]
no_license
SELECT content FROM Phone JOIN Entry ON Entry.id = Phone.entryId WHERE lastName = "Jenkins" AND firstName = "Charlotte";
true
3e648c567b381d1a40bd3af87a2d5e5a9bb61d11
SQL
theboocock/OtagoGalaxy
/src/ensembl/sql/patch_59_60_c.sql
UTF-8
914
3.078125
3
[ "BSD-2-Clause" ]
permissive
# patch_59_60_c.sql # # Title: # A patch to fix a couple of inconsistencies in the schema. # # Description: # QC turned up issues with the signedness of a number of fields in # the Ensembl Core schema. This patch fixes these. The fields # are: karyotype.seq_region_start, karyotype.seq_region_end and # seq_r...
true
ed3cb6f46db8b194e6c45b32f393474df8f6ee8d
SQL
jMichaelA/db-homework
/query-3.sql
UTF-8
222
3.65625
4
[]
no_license
SELECT DISTINCT "nameFirst", "nameLast" FROM master m JOIN pitching p ON p."masterID" = m."masterID" JOIN teams t ON t."teamID" = p."teamID" WHERE p."teamID" = 'MON' ORDER BY "nameLast", "nameFirst" ASC
true
65af66d50899c56ce5e8c0491f52bd14ed6ad466
SQL
vodinhvien/webshop
/db/dataWeb2.sql
UTF-8
21,767
3.109375
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 5.0.2 -- https://www.phpmyadmin.net/ -- -- Máy chủ: 127.0.0.1 -- Thời gian đã tạo: Th6 22, 2020 lúc 05:17 PM -- Phiên bản máy phục vụ: 10.4.11-MariaDB -- Phiên bản PHP: 7.2.29 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHAR...
true
2520081fcad759966e5b688470691c0b0169c2c9
SQL
machine-intelligence/arbital-open-source
/schemas/domains.sql
UTF-8
858
3.59375
4
[ "Apache-2.0" ]
permissive
/* This table contains all domains and relevant info. */ CREATE TABLE domains ( /* Domain id. */ id BIGINT NOT NULL AUTO_INCREMENT, /* Id of the home page for this domain. FK into pageInfos. */ pageId VARCHAR(32) NOT NULL, /* When this page was originally created. */ createdAt DATETIME NOT NULL, /* Id of the use...
true
92b92c550798f15f3c70caa08d5e0a8300098369
SQL
CUBRID/cubrid-testcases
/sql/_31_cherry/issue_22054_on_update/cases/prepare_001.sql
UTF-8
649
3.65625
4
[ "BSD-3-Clause" ]
permissive
drop table if exists t; create table t( a int, b timestamp on update current_timestamp ); insert into t(a) values(1); prepare st from 'update t set a=?'; execute st using 2; select if(current_timestamp-b>=0 and current_timestamp-b<10,'ok','nok') from t; drop prepare st; drop table if exists t; create table t( a int pr...
true
4893dd2e4cb0ccaca1370aa157041e4f9b7b6120
SQL
zhilangtaosha/customer-analyse
/sql/query.sql
UTF-8
3,377
4.1875
4
[]
no_license
############### RMF值计算 ################# # R值计算 select customerId, datediff('2011-01-30', MAX(invoiceDate)) as last_buy_date_diff from cleaned GROUP by customerId; # F值计算 select customerId, COUNT(DISTINCT(DATE(invoiceDate))) as total_buy_times from cleaned GROUP BY customerId; # M值计算 select customerId, SUM(quantity...
true
8874ebcc5483bac76c1547a6b74ad9e0ea9e9dc9
SQL
vitolike/sparkOS
/base.sql
UTF-8
7,444
3.140625
3
[ "MIT" ]
permissive
-- phpMyAdmin SQL Dump -- version 4.8.5 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: 05-Jun-2019 às 09:28 -- Versão do servidor: 10.1.38-MariaDB -- versão do PHP: 5.6.40 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @...
true
951d9f4e1d1e19f36921cbf849883fcb5352a78b
SQL
Oxfordvaccinegroup/Electronic-Data-Capture-for-Large-Scale-Typhoid-Surveillance---STRATAA
/2.strataa_create_member_table.sql
UTF-8
2,742
2.8125
3
[]
no_license
-- MySQL dump 10.13 Distrib 5.7.12, for Win64 (x86_64) -- -- Host: localhost Database: k_strataa -- ------------------------------------------------------ -- Server version 5.5.50-0ubuntu0.12.04.1 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHA...
true
29062ad8df5f72ea411b81a40ac907bd4542889d
SQL
mallory-jpg/hacker-news-analysis
/trolls_vocal_users.sql
UTF-8
412
3.484375
3
[]
no_license
-- find whether a vocal minority exists SELECT SUM(score) FROM hacker_news; SELECT user, SUM(score) FROM hacker_news GROUP BY user HAVING SUM(score) > 200 ORDER BY 2 DESC; SELECT (517 + 309 + 304 + 282) / 6366.0; -- 4 users contribute about 22% of posts! -- find users who rickroll too much lol SELECT user, COUNT(*) ...
true
decc03d8c1ba1aeb182a3fd0a29a36ccd391f26a
SQL
chrlembeck/vaadin-grid-bug
/src/main/resources/schema.sql
UTF-8
389
3
3
[ "BSD-3-Clause" ]
permissive
DROP TABLE aliases if exists; CREATE TABLE testtable ( id INTEGER NOT NULL GENERATED BY DEFAULT AS IDENTITY, column1 VARCHAR(128) NOT NULL, column2 VARCHAR(128) NOT NULL, CONSTRAINT pk_testtable PRIMARY KEY (id), CONSTRAINT u_aliases_col1 UNIQUE (column1), CONSTRAINT u_aliases_col2 UNIQUE ...
true
67e7b362b158c4d53e8cbfcc6814fc7fea4b5eb6
SQL
itachi92/ZGL_ADMIN
/admin/data/.svn/text-base/tb_admin.sql.svn-base
UTF-8
2,301
3.1875
3
[]
no_license
/* Navicat MySQL Data Transfer Source Server : openz Source Server Version : 50617 Source Host : 192.168.1.24:3306 Source Database : h34 Target Server Type : MYSQL Target Server Version : 50617 File Encoding : 65001 Date: 2015-08-29 10:00:43 */ SET FOREIGN_KEY_CHECKS=0; -- ------...
true
c40d423f514318694de0543235b3a377e01cc299
SQL
ucdavis/ipa-web
/src/main/resources/db/migration/V66__Add_BannerWindow2_and_StartDate_and_EndDate_To_Terms.sql
UTF-8
473
2.65625
3
[ "MIT" ]
permissive
ALTER TABLE `Terms` CHANGE COLUMN `BannerStartWindow` `BannerStartWindow1` DATE NULL DEFAULT NULL , CHANGE COLUMN `BannerEndWindow` `BannerEndWindow1` DATE NULL DEFAULT NULL , ADD COLUMN `BannerStartWindow2` DATE NULL DEFAULT NULL AFTER `BannerEndWindow1`, ADD COLUMN `BannerEndWindow2` DATE NULL DEFAULT NULL AFTER `Ban...
true
20faba5470fca86b682947063bb34a2c11789707
SQL
jemedina/Sistema-Ferreteria
/api/__install/trigger_decrementa_inventario.sql
UTF-8
237
2.96875
3
[]
no_license
delimiter // create trigger resta_producto after insert on producto_venta for each row begin declare cant int; set cant=new.cantidad; update producto set existencia_bodega=(existencia_bodega-cant) where codigo=new.codigo; end; //
true
f321cbf1dbfe6f73d86177d3435e960bfb0b93e2
SQL
xiaozi0513/springboot2
/SQL/a库.sql
UTF-8
725
2.6875
3
[]
no_license
/* Navicat Premium Data Transfer Source Server : local Source Server Type : MySQL Source Server Version : 80011 Source Host : localhost:3306 Source Schema : a_master Target Server Type : MySQL Target Server Version : 80011 File Encoding : 65001 Date: 13/09/2018 12:07...
true
7ce9ac19e35ba576e6afd095f1df3ca228471d9b
SQL
whlucas/nodeJs
/4.MySql/第4课-SQL语句的增删改查.sql
UTF-8
3,502
4.3125
4
[]
no_license
# 增 # insert into + 表名 + () 括号里面是给那些字段赋值 + values () 括号里面赋值 # 其中id不用设置,因为设置了自动递增了 show databases ; use school; insert into students (`stu_num`, `name`, `age`, `class`) values(1, "吴浩霖", 18, 9); insert into students (`stu_num`, `name`, `age`, `class`) values(2, "xxx", 19, 6); insert into students (`stu_num`, `name`, `age...
true
31e792b1e9f148956b28e26f2abb3d45f99ef013
SQL
sdolgy/openarchive
/src/main/database/archive_hsqldb.sql
UTF-8
1,849
2.984375
3
[]
no_license
CREATE TABLE archiveConversations ( conversationId BIGINT NOT NULL PRIMARY KEY, startTime BIGINT NOT NULL, endTime BIGINT NOT NULL, ownerJid VARCHAR(255) NOT NULL, ownerResource VARCHAR(255), withJid VARCHAR(25...
true
620fa17619f4fb8f81ed011483a8be509dbf0421
SQL
s18006/Oracle_SQL_DB
/1213/1213.2.sql
UTF-8
180
2.8125
3
[]
no_license
define column_name = "姓名" define column_name2 = "部門番号" define id = 176 select last_name &column_name, department_id &column_name2 from employees where employee_id=&id;
true
7378643bbe5da3bec455d6d591df45484bca030d
SQL
lshearer20/FriendlyFoodFinder
/backend/database script.sql
UTF-8
2,054
3.125
3
[]
no_license
postgres( create table Family( familyId integer IDENTITY(1,1), familyName varchar, primary key(familyId) ); create table Person ( personId integer IDENTITY(1,1), personName varchar, primary key(personId) ); create table Users ( userId integer IDENTITY(1,1), personId integer, userName varchar, primary key(use...
true
0f55fa560c17be96e836ddcca1924e00b4fa430e
SQL
Aaron-Usher/Capstone-2017
/SnackOverFlowDB/Old Stuff/Scripts/Driver/sp_retrieve_driver.prc
UTF-8
463
2.984375
3
[]
no_license
USE [SnackOverflowDB] GO IF EXISTS(SELECT * FROM sys.objects WHERE type = 'P' AND name = 'sp_retrieve_driver') BEGIN DROP PROCEDURE sp_retrieve_driver Print '' print ' *** dropping procedure sp_retrieve_driver' End GO Print '' print ' *** creating procedure sp_retrieve_driver' GO Create PROCEDURE sp_retrieve_driver...
true
b32d92ae31e36813d00348f81dd2412c6a03d11b
SQL
slvdrew/tablestructure
/seeds.sql
UTF-8
629
2.75
3
[]
no_license
/* SEEDS FILE */ insert into dc(superhero_name, alter_ego, first_appearance, occupation) VALUES ('Batman', 'Bruce Wayne', 1939, 'CEO of Wayne Enterprises'), ('Commissioner James Gordon', 'James Gordon', 1939, 'Police Commissioner'), ('Robin','Boy Wonder', 1940); insert into marvel(superhero_name, alter_ego, first_app...
true
c1eafc206ba97644a41f838dcdac663f41585a01
SQL
NohDongWan/JspProJect
/WebContent/ch12_db/_3.state&Expre&call/student.sql
UHC
719
3.53125
4
[]
no_license
drop table student; create table student( num number, name varchar(20), primary key(num) ); select * from STUDENT; delete from student; create table emp1 as select * from emp; -- (ALT + C)---- create or replace procedure del_all is begin delete from emp1; end; -- (ALT + C)---- select * from emp1; sele...
true
086c6bdf7653d81a6e604701401b2056b59f28fd
SQL
Me-K/site-ancien-iut
/SQL/SetupTables.sql
UTF-8
881
3.171875
3
[]
no_license
CREATE TABLE role ( id_role INTEGER PRIMARY KEY, nom_role VARCHAR(50) NOT NULL ); CREATE TABLE entreprise ( id_entreprise INTEGER PRIMARY KEY, nom_entreprise VARCHAR(50) NOT NULL, effectif_entreprise INTEGER NOT NULL, ville_entreprise VARCHAR(50) NOT NULL ); CREATE TABLE promo ( id_promo I...
true
070831571983611efcfb4ebfee614aed22fbd0b8
SQL
v0ldemar01/dumpster_bot
/db/store_new.sql
UTF-8
24,365
3.515625
4
[]
no_license
SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0; SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0; SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION'; -- --------------------------...
true
5838ad4fce02796eaccaf76deed544e98cd2f8a2
SQL
radtek/slin_code
/DataServer/DataServer_TIP/CONFIG/my_learn_STE_AQ/prc_enq_others.sql
UTF-8
1,947
3.359375
3
[]
no_license
DELIMITER $$ DROP PROCEDURE IF EXISTS `prc_enq_others` $$ CREATE DEFINER=`IT271350_5`@`%` PROCEDURE `prc_enq_others`( IN p_queue VARCHAR(80), IN p_msgid VARCHAR(38), IN p_sid BIGINT(20) UNSIGNED, IN p_recipient VARCHAR(4000) ) BEGIN DECLARE v_rec_name ...
true
a0aa7a2843e9db2b25987374aa16494d09682a13
SQL
Laquat/Schreibservice
/Datenbank/user.sql
UTF-8
1,876
3.140625
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.3.11 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Erstellungszeit: 31. Aug 2015 um 16:14 -- Server-Version: 5.6.24 -- PHP-Version: 5.6.8 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!...
true
4e94736ae4fc0726ee3be8a515374e6e5c0dbf1d
SQL
GDVFox/tenjin
/database/task.sql
UTF-8
231
2.828125
3
[]
no_license
CREATE TABLE IF NOT EXISTS `task` ( `post_id` int(11) NOT NULL, `title` varchar(255) NOT NULL, PRIMARY KEY (`post_id`), FOREIGN KEY (`post_id`) REFERENCES `employee_post`(`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
true
f89ecd25abcce9d06722a7c4b8175ca469e68d33
SQL
pimlapas/endproject_master
/database/my_db.sql
UTF-8
31,171
3.25
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 5.0.4 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Feb 18, 2021 at 12:34 PM -- Server version: 10.4.17-MariaDB -- PHP Version: 8.0.1 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIEN...
true
3de659d809c43dfff8cc56b77ce88582b4c4b9fd
SQL
jsvue/BooKingsIncPOS
/Bookings new search tables pages/sql/books.sql
UTF-8
1,609
3.078125
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.7.4 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Apr 30, 2018 at 05:26 PM -- Server version: 10.1.30-MariaDB -- PHP Version: 7.2.1 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD...
true
66ab92f8fc191333e56df34518fd397611d91ea7
SQL
ahenn89/Database-Concepts
/finalproject/finalproject.sql
UTF-8
5,547
4.40625
4
[]
no_license
--#1 Part 1 Create table ProductCategory( CategoryID int identity(1,1), CategoryName varchar(50) ) Insert into ProductCategory(CategoryName) Select distinct Category from Product Alter table product add CategoryID int update Product set CategoryID = c.CategoryID from Product p join ProductCategory c...
true
e3cf42c6db89f167d4b5e7c5fc86a39dfdaedd52
SQL
kerrykato/SQL-Scripts
/Acct Cat List CSV - no table variable.sql
UTF-8
1,069
3.921875
4
[]
no_license
SELECT AccountId , LEFT(catCSV , LEN(catCSV)-1) catCSV FROM ( select a.AccountId, c.CatShortName from ( select AccountID from scAccountsCategories group by AccountID having count(*) > 1 ) a join scAccountsCategories ac on a.accountid = ac.accountid join dd_scAccountCategories c on ac.categoryid = c...
true
ef99df7d4212d14df99f26559d3511c01bdea47f
SQL
OHDSI/WebAPI
/src/main/resources/db/migration/oracle/V1.0.0.6.1__schema-create_laertes.sql
UTF-8
8,721
3.75
4
[ "Apache-2.0" ]
permissive
-- Authors: Richard D Boyce, Erica Voss, Lee Evans -- 2014/2015 -- Oracle script -- DROP any existing objects from previous runs -- for Oracle only, this section is commented out for reference in case they need to be run manually -- the other DBMS create scripts can dynamically drop objects instead -- DROP TABLE DRUG_...
true
db8f1b9bb89a900d947120faf36fe7cb7b273ba3
SQL
milosvukadinovic/SQL-tests
/03_select_nobel.sql
UTF-8
3,848
4.59375
5
[]
no_license
-- SELECT from Nobel Tutorial -- 1. Change the query shown so that it displays Nobel prizes for 1950. SELECT yr, subject, winner FROM nobel WHERE yr = 1950 -- 2.Show who won the 1962 prize for Literature. SELECT winner FROM nobel WHERE yr = 1962 AND subject = 'Literature' -- 3.Show the year and subject that...
true
af11ac785aa67fde6a68ec9a716b3a69515dfe7e
SQL
alexbern/sdam
/sdam.sql
UTF-8
3,718
3.15625
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.4.10 -- http://www.phpmyadmin.net -- -- Host: localhost:3306 -- Generation Time: Jun 06, 2016 at 12:13 AM -- Server version: 5.5.42 -- PHP Version: 7.0.0 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT...
true
723a24f46fa2723091a38b45af46e82362152f25
SQL
delphi1977/NewDicomPACS
/Database/oracle/indexes/asu.tkladr_id_owner.sql
UTF-8
446
2.609375
3
[]
no_license
DROP INDEX ASU.TKLADR_ID_OWNER / -- -- TKLADR_ID_OWNER (Index) -- CREATE INDEX ASU.TKLADR_ID_OWNER ON ASU.TKLADR (FK_OWNER) NOLOGGING TABLESPACE USR PCTFREE 10 INITRANS 2 MAXTRANS 255 STORAGE ( INITIAL 17M NEXT 1M MINEXTENTS 1 MAXEX...
true
54b8519440998d88781152d51ff3e4b2f6f159b9
SQL
acarrmo/WebAlexRomero
/base de datos/alexrome_cms.sql
UTF-8
3,373
2.953125
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.0.8 -- http://www.phpmyadmin.net -- -- Servidor: localhost -- Tiempo de generación: 26-12-2013 a las 15:59:38 -- Versión del servidor: 5.5.34-cll -- Versión de PHP: 5.3.17 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CH...
true
dc3c708f1b9562adbe80591ec0ac9f9a9476f891
SQL
bellmit/origin
/family_order/sql/TF_B_TRADE_GRP_MERCHP/SEL_BY_TRADEID_PRODUCT_ORDER_ID.sql
UTF-8
287
3.328125
3
[]
no_license
SELECT TRADE_ID, ACCEPT_MONTH, 'BBOSS_'||to_char(sysdate,'MMDDhh24mmss') ||:INDEX as ATTR_CODE, T.PRODUCT_SPEC_CODE FROM TF_B_TRADE_GRP_MERCHP T WHERE T.PRODUCT_ORDER_ID = :PRODUCT_ORDER_ID and T.TRADE_ID=TO_NUMBER(:TRADE_ID) and T.accept_month = TO_NUMBER(SUBSTR(:TRADE_ID, 5,2))
true
2e61433ca8b37e960e74ddd6b3a73309e3a95100
SQL
tanbinh123/cinemaManageSystem
/sql/cinema.sql
UTF-8
16,327
3.375
3
[ "MIT" ]
permissive
/* Navicat MySQL Data Transfer Source Server : cinema Source Server Version : 80016 Source Host : localhost:3306 Source Database : cinema Target Server Type : MYSQL Target Server Version : 80016 File Encoding : 65001 Date: 2019-06-13 09:48:06 */ SET FOREIGN_KEY_CHECKS=0; -- -----...
true
151a2acb5b4447f9bbd5f205453924ec9350a634
SQL
ClickHouse/ClickHouse
/tests/queries/0_stateless/02731_replace_partition_from_temporary_table.sql
UTF-8
1,669
3.21875
3
[ "Apache-2.0", "BSL-1.0" ]
permissive
-- Tags: no-replicated-database DROP TEMPORARY TABLE IF EXISTS src; DROP TABLE IF EXISTS dst; DROP TABLE IF EXISTS rdst; CREATE TEMPORARY TABLE src (p UInt64, k String, d UInt64) ENGINE = MergeTree PARTITION BY p ORDER BY k; CREATE TABLE dst (p UInt64, k String, d UInt64) ENGINE = MergeTree PARTITION BY p ORDER BY k;...
true
9511b1ee2d2bc4465a0e7f82cf5c52faaf779e9f
SQL
Dala0/God-Generator
/database/gg_apparel.sql
UTF-8
2,200
2.84375
3
[]
no_license
CREATE DATABASE IF NOT EXISTS `gg` /*!40100 DEFAULT CHARACTER SET utf8 */; USE `gg`; -- MySQL dump 10.13 Distrib 5.6.17, for Win32 (x86) -- -- Host: 127.0.0.1 Database: gg -- ------------------------------------------------------ -- Server version 5.6.19-log /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_...
true
3eef949ac622331f25d5057c4f7e8932c5ce7f13
SQL
forderation/nest-bot
/nest-bot-dev.sql
UTF-8
16,384
2.796875
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 5.0.2 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Sep 08, 2020 at 06:12 AM -- Server version: 10.4.14-MariaDB -- PHP Version: 7.4.9 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIEN...
true
8e846c53363a52d05fc6a9a722d64446afc849b9
SQL
P79N6A/fast
/install/efast365/api_weipinhuijit_store_out_record.sql
UTF-8
1,220
3.09375
3
[]
no_license
DROP TABLE IF EXISTS `api_weipinhuijit_store_out_record`; CREATE TABLE `api_weipinhuijit_store_out_record` ( `id` int(11) unsigned NOT NULL AUTO_INCREMENT, `shop_code` varchar(100) NOT NULL COMMENT '店铺code', `delivery_no` varchar(50) NOT NULL COMMENT '出库单号', `notice_record_no` varchar(50) NOT NULL COMMENT ...
true
f925f8908ccca4f1046cb26140b951e1e239ac77
SQL
nnkemail/MasterServer
/conf/evolutions/default/1.sql
UTF-8
1,153
3.28125
3
[ "Apache-2.0" ]
permissive
# --- !Ups create table "user" ("userID" VARCHAR NOT NULL PRIMARY KEY,"firstName" VARCHAR,"lastName" VARCHAR,"fullName" VARCHAR, "email" VARCHAR,"avatarURL" VARCHAR, "score" INT NOT NULL); create table "friends" ("userID" VARCHAR NOT NULL, "friendID" VARCHAR NOT NULL, FOREIGN KEY ("userID") REFERENCES "user"("userID"...
true
ea864e23fada56224397662ed1e281e3eb3892b6
SQL
lzhenkang/expense_tracker
/tables.sql
UTF-8
400
3.03125
3
[]
no_license
CREATE TABLE IF NOT EXISTS members ( id SERIAL PRIMARY KEY, name TEXT, password TEXT ); CREATE TABLE IF NOT EXISTS expense ( id SERIAL PRIMARY KEY, user_id TEXT, category TEXT, amount numeric(12, 2), description TEXT, time_entered TIMESTAMPTZ DEFAULT Now() ); CREATE TABLE IF NOT EX...
true
ac6193f39499e978da2740b596ae51b988aec78c
SQL
ainz713/job4j_design
/1. Inner join [#493898].sql
UTF-8
851
3.6875
4
[]
no_license
create table nomer( id serial primary key, name varchar(255), auto_id int references auto(id) ); insert into auto(marka, model, price) values ('bmw', '3', 35000); insert into auto(marka, model, price) values ('audi', '4', 45000); insert into auto(marka, model, price) values ('mercedes', 'c', 55000); insert into n...
true
36fd1e0519e9115f6de901ba121cc099e9216142
SQL
Osar7an/-Omar-Hefny_u4_p2_code
/Hamzastore.sql
UTF-8
4,631
3.140625
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 5.0.4 -- https://www.phpmyadmin.net/ -- -- Host: localhost -- Generation Time: Jun 02, 2021 at 10:15 PM -- Server version: 10.4.17-MariaDB -- PHP Version: 8.0.2 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIEN...
true
fc7185762b7de09da0653931d9731c7678daef45
SQL
wanglongxiao/logsme
/database/db.sql
UTF-8
3,517
3.109375
3
[ "MIT" ]
permissive
DROP TABLE IF EXISTS `post`; CREATE TABLE `post` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `sourcedomain` varchar(100) COLLATE utf8_unicode_ci NOT NULL, `url` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `title` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `description` varchar(255) COLLATE utf8_un...
true
f8a2e4230370e7384c9bb1896f526468211b265f
SQL
bersace/strass
/include/Strass/Migrate/To10.php
UTF-8
4,544
3.9375
4
[]
no_license
<?php /*-*- sql -*-*/ require_once 'Strass/Journaux.php'; class Strass_Migrate_To10 extends Strass_MigrateHandler { function offline() { error_log("Renommage des dossiers d'article"); //' foreach (glob('data/journaux/*/*/*') as $src) { $journal = dirname(dirname($src)); $dest = $journal . '/' ....
true
90d0924efaa80a8870d72f3109fd6de1f90914f1
SQL
Brenins/PROCEDURES_SQL
/Aula 1.sql
UTF-8
858
3.46875
3
[]
no_license
---- Criar --CREATE PROCEDURE SP_HELLO_WORLD --AS --BEGIN -- SELECT 'OLA MUNDO!'; --END; ----Executar --EXEC SP_HELLO_WORLD; --CREATE PROCEDURE SP_FILME_VALOR --AS --BEGIN -- SELECT descricao, valor -- FROM filme --END --EXEC SP_FILME_VALOR --EXEC sp_helptext 'SP_FILME_VALOR'; --EXERCICIO 1 TIAGAO --ALTER PRO...
true
48521ef33cdf8c3b7571bb5c4692be544f75abc3
SQL
sufyan3738/clusternamnoi
/clusternamnoi.sql
UTF-8
22,115
3.234375
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.7.4 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Mar 16, 2018 at 03:22 PM -- Server version: 10.1.30-MariaDB -- PHP Version: 7.2.1 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD...
true
aeebea771aee6ec9e9c0eb2427d1b87c671a8b14
SQL
Beerkay/IFTTT_measurement
/testbed/serviceServer/init.sql
UTF-8
706
2.65625
3
[]
no_license
--device table Create Table device (id INT auto_increment not null primary key, name varchar(256), userId int, createdTime datetime, deviceType varchar(128), deviceState smallint); insert into device (name, deviceType, createdTime, userId) values("Wemo Switch 1", "switch", "2017-02-27 13:30:03", 1); insert into device ...
true
00713d368f4ba8be68b0e4bf38339e23307a37c9
SQL
LaaGx/ProyectosCoperativa
/ModuloTC/tarjetasdb.sql
UTF-8
8,641
2.609375
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 5.0.2 -- https://www.phpmyadmin.net/ -- -- Servidor: localhost -- Tiempo de generación: 02-09-2020 a las 16:50:54 -- Versión del servidor: 10.4.11-MariaDB -- Versión de PHP: 7.4.5 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_...
true
43e1a946c0fe616c4ceb15fb9415f322eb562a58
SQL
maxbull/live-feed-api
/sql-schema.sql
UTF-8
523
3.28125
3
[]
no_license
DROP TABLE IF EXISTS `filters`; DROP TABLE IF EXISTS `subscriptions`; CREATE TABLE IF NOT EXISTS subscriptions ( id SERIAL PRIMARY KEY, failures int NOT NULL, callback VARCHAR(2083) NOT NULL, callback_type VARCHAR(25) NOT NULL, status VARCHAR(20) NOT NULL, info TEXT, access_token VARCHAR(255), username VARCHAR...
true
b747eb6dd2d1e3f50b1f4ccdc9e0ecea31eea2a0
SQL
gergana-grozdanova/SQl-Exercises
/SQLCRUD.sql
UTF-8
4,272
4.25
4
[]
no_license
SELECT [Name] FROM [Departments] SELECT [FirstName],[MiddleName],[LastName] FROM [Employees] SELECT [FirstName]+'.'+[LastName]+'@softuni.bg' FROM [Employees] AS ["Full Email Address"] SELECT DISTINCT [Salary] FROM [Employees] SELECT * FROM [Employees] WHERE [JobTitle]='Sales Representative' SELECT [FirstName],[L...
true
15834c2bd1f7285d85ecd88eac4f0ed82058b31b
SQL
orangezeit/leetcode
/CPP/1201-1300/1294-Weather Type in Each Country.sql
UTF-8
343
3.78125
4
[ "BSD-3-Clause" ]
permissive
# Write your MySQL query statement below SELECT country_name, CASE WHEN tmp <= 15 THEN "Cold" WHEN tmp >= 25 THEN "Hot" ELSE "Warm" END AS weather_type FROM Countries c JOIN (SELECT country_id, AVG(weather_state) AS tmp FROM Weather WHERE MONTH(day) = 11 AND YEAR(day) = 2019 GROUP BY country_id) w ON c.coun...
true
4ea73d2ae88a125ce7d22f3cbcb1fc1fa70333f7
SQL
satriamegaartha/data-monografi-mengwi
/document/rika.sql
UTF-8
3,585
2.75
3
[ "MIT" ]
permissive
-- phpMyAdmin SQL Dump -- version 4.8.3 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Sep 08, 2020 at 04:44 AM -- Server version: 10.1.37-MariaDB -- PHP Version: 7.2.12 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OL...
true
8659a17911fb4019351318b67e495d60bd4e5c2c
SQL
Jahnavi11/SIE557-2021-FinalProj
/DBBackup/sie557-2021-fp.sql
UTF-8
94,121
2.953125
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.9.5 -- https://www.phpmyadmin.net/ -- -- Host: localhost:3311 -- Generation Time: May 06, 2021 at 07:45 AM -- Server version: 5.7.24 -- PHP Version: 7.4.1 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHA...
true
c9c6e01220faadd9da4295c24e28e75e90085749
SQL
Joshua-Enrico/holbertonschool-higher_level_programming
/0x0E-SQL_more_queries/14-my_genres.sql
UTF-8
776
4.1875
4
[]
no_license
-- Import the database dump from hbtn_0d_tvshows to your MySQL server: download (same as 13-count_shows_by_genre.sql) -- Write a script that uses the hbtn_0d_tvshows database to lists all genres of the show Dexter. -- The tv_shows table contains only one record where title = Dexter (but the id can be different) ...
true
0fa2ecac6fe634b9abf2c6ff47d61f4bdf55a450
SQL
silence-do-good/stress-test-Postgres-and-MySQL
/dump/high/day21/select2350.sql
UTF-8
191
2.828125
3
[]
no_license
SELECT timeStamp, temperature FROM ThermometerObservation WHERE timestamp>'2017-11-20T23:50:00Z' AND timestamp<'2017-11-21T23:50:00Z' AND SENSOR_ID='4bf823dd_2e41_4e4e_95a9_f81467d2fd59'
true
f1037ba7918c785230e498e73e00e19f5bac4765
SQL
duskat92/sql
/7-th_query.sql
UTF-8
1,136
3.578125
4
[]
no_license
with chosen_order as ( select * from eshop.orders as o where o.order_id = 10344) select ch_o.order_id as ch_o_order, ch_o.employee_id as ch_o_employee, ch_o.ship_via as ch_o_ship, o2.order_id as o2_order, o2.employee_id as o2_employee, o2.ship_via as o2_ship from chosen_order as ch_o join eshop.orders as o2 o...
true
25a8b6a6e29388e0d3c30dbb8b99d9c39f12c23e
SQL
Fetchinator7/Food-Pantry-Check-In
/database.sql
UTF-8
2,882
3.578125
4
[ "MIT" ]
permissive
-- Run these commands to initialize the database after creating a database. CREATE TABLE "account" ( "id" serial NOT NULL, "name" varchar(60) NOT NULL, "email" varchar(320) NOT NULL UNIQUE, "password" varchar(320) NOT NULL, "access_level" integer NOT NULL DEFAULT '1', "active" BOOLEAN NOT NULL DEFAULT 'true', "...
true
fa5a7e87b9e56114617f3889150ec4691ed7fe7f
SQL
jlessa/marl
/FP-LU/finalProject/goodbooze-integration-test/goodbooze-citrus/src/citrus/resources/dbCreation/liquorstore.sql
UTF-8
7,701
3.15625
3
[]
no_license
DROP DATABASE if exists liquorstore; CREATE DATABASE liquorstore; USE liquorstore; -- MySQL dump 10.13 Distrib 5.6.26, for Linux (x86_64) -- -- Host: localhost Database: liquorstoreTest -- ------------------------------------------------------ -- Server version 5.6.26 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CH...
true
4befa5587ea32f9b9da717c002ee21d8e1babd10
SQL
easyforgood/cc_web
/SourceManage/Mysql.sql
UTF-8
20,386
3.359375
3
[ "Apache-2.0" ]
permissive
-- phpMyAdmin SQL Dump -- version 4.1.14 -- http://www.phpmyadmin.net -- -- Host: 219.219.220.200 -- Generation Time: 2015-03-15 09:03:06 -- 服务器版本: 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 */; /*!4010...
true
0304bfe62a6cf95f642b15671e0ac9e8605355a5
SQL
ImPanayotov/SoftUni
/MS SQL Server/Additional Exercises/12.PopulationAndAreaByContinent.sql
UTF-8
296
3.859375
4
[]
no_license
SELECT CO.ContinentName, (SUM(CAST((C.AreaInSqKm) AS BIGINT))) AS CountriesArea, (SUM(CAST((C.Population) AS BIGINT))) AS CountriesPopulation FROM Continents AS CO LEFT JOIN Countries C on CO.ContinentCode = C.ContinentCode GROUP BY CO.ContinentName ORDER BY CountriesPopulation DESC
true
2cdedf5d0fc73b6cdfeb9a9847f40ad09ab64a2b
SQL
hramos123/SampleTrackingApp
/db_20130611.sql
UTF-8
8,087
2.953125
3
[ "MIT" ]
permissive
-- -------------------------------------------------------- -- Host: 50.116.98.111 -- Server version: 5.5.23-55 - Percona Server (GPL), Release rel25.3, Revision 2 -- Server OS: Linux -- HeidiSQL version: 7.0.0.4147 -- Date/time: 20...
true
b0bc9e1081ca9c5570a367bda8e2fc824aca3949
SQL
superdongte/mybatis_dev_sdj
/Scripts/Script(user).sql
UTF-8
358
3.203125
3
[]
no_license
show tables; select * from courses; select stud_id as studid, name, email, dob,phone from students where stud_id=1; insert into students values("") select * from students; select Stud_id, name, email, phone, A.addr_id, street, city, state, zip, country from students s left outer join addresses A on s...
true
cfe1ba657b52a3d3004c7d098d09693d44485a72
SQL
SlavyanaC/CSharp-DB-Fundamentals
/DatabaseBasics–MSSQL/09ЕxamPreps/03-January-18/03Querying.sql
UTF-8
5,373
4.125
4
[]
no_license
--05. Showroom SELECT Manufacturer, Model FROM Models ORDER BY Manufacturer, Id DESC --06. Y Generation SELECT FirstName, LastName FROM Clients WHERE YEAR(BirthDate) >= 1977 AND YEAR(BirthDate) <= 1994 ORDER BY FirstName, LastName, Id --07. Spacious Office SELECT t.[Name], o.[Name], o.ParkingPlaces FROM Offices AS...
true
c3828c2ee6dadc67a54ef82fa8e87df4568357ac
SQL
gvieri/segui
/db/precharged_values.sql
UTF-8
3,939
3
3
[]
no_license
/* insert cultures */ insert into culture (name, description) values ('A culture', 'A culture is a very interesting culture'); insert into culture (name, description) values ('B culture', 'B culture is a quite interesting culture'); insert into culture (name, description) values ('C culture', 'C culture is an amazi...
true
0f928ad1d300565a57316b0130663edc1c0cefc9
SQL
yuttpan/hidata
/hi.sql
UTF-8
865
2.703125
3
[]
no_license
/* Navicat MySQL Data Transfer Source Server : localhost_3306 Source Server Version : 50153 Source Host : localhost:3306 Source Database : hi Target Server Type : MYSQL Target Server Version : 50153 File Encoding : 65001 Date: 2013-07-30 07:44:15 */ SET FOREIGN_KEY_...
true
fb6dfc220821877e7b5be6e8492aee7897cd8a05
SQL
0xCM/Meta.Core
/src/SqlT.Schemas.Systems/Factory/Definitions/TypeColumn.sql
UTF-8
730
2.984375
3
[]
no_license
create table [Factory].[TypeColumn] ( FactoryKey bigint not null constraint DF_TypeColumn_FactoryKey default(next value for [Factory].[FactorySequence]), TableTypeIdentifier nvarchar(75) not null, ColumnName nvarchar(128) not null, ColumnPosition int not null, DataTypeName nvarchar(128) not null, IsNull...
true
59355c146464be22a203ee6573ee2a2d8520429c
SQL
Wandazz/SQL-Database
/sampledb.sql
UTF-8
1,547
3.75
4
[]
no_license
/** CREATE TABLE Persons ( PersonID int NOT NULL, LastName varchar(255), FirstName varchar(255), Address varchar(255), City varchar(255), PRIMARY KEY(PersonID) ); CREATE TABLE Orders ( OrderID int NOT NULL PRIMARY KEY, OrderNumber int NOT NULL, PersonID int, FOREIGN KEY(PersonID) REFERENCES Persons(PersonID)...
true
6b594418c7b8403de38983c1d0224a82333e743b
SQL
Melyxi/SQL
/lesson9/procedures,functions,triggers.sql
UTF-8
3,302
4.09375
4
[]
no_license
/* Создайте хранимую функцию hello(), которая будет возвращать приветствие, в зависимости от текущего времени суток. С 6:00 до 12:00 функция должна возвращать фразу "Доброе утро", с 12:00 до 18:00 функция должна возвращать фразу "Добрый день", с 18:00 до 00:00 — "Добрый вечер", с 00:00 до 6:00 — "Доброй ночи". */ ...
true
2cab69fdf5691e5dfe80cf47d393c7e25cc6f7dd
SQL
padamowiczUWM/database_project
/projekt/5_triggers_and_others.sql
UTF-8
1,629
3.890625
4
[]
no_license
SET GLOBAL log_bin_trust_function_creators = 1; DROP TRIGGER IF EXISTS `product_date_updated`; DROP TRIGGER IF EXISTS `check_order_product_amount`; DROP PROCEDURE IF EXISTS `add_product_to_basket`; DROP FUNCTION IF EXISTS `get_register_user_count`; # Zmiana daty aktualizacji produktu DELIMITER $$ CREATE TRIGGER `prod...
true
815ea7c354866c3c1ee51c7c87dd1437f494b55f
SQL
CUBRID/cubrid-testcases
/sql/_27_banana_qa/issue_5765_timezone_support/_01_table_operations/_02_alter/cases/_02_alter_change_nodata_dttz1.sql
UTF-8
859
3.578125
4
[ "BSD-3-Clause" ]
permissive
--change DATETIMETZ from without DEFAULT/constraints to with DEFAULT/constraints, no data drop table if exists tz; create table tz( c_dttz1 datetime with time zone, c_dttz2 datetime with time zone, c_dttz3 datetime with time zone, c_dttz4 datetime with time zone, c_dttz5 datetime with time zone ); --test: not...
true
c71b201fa7f53a748f3792401e7a46d7a87eff32
SQL
leokaos/projectZeta
/server/src/main/resources/db/V9__create_exigencia.sql
UTF-8
330
3.046875
3
[]
no_license
CREATE TABLE rh.exigencias ( vaga_id int8 NOT NULL, qualificacao_id int8 NOT NULL, CONSTRAINT exigencias_pk PRIMARY KEY (vaga_id,qualificacao_id), CONSTRAINT exigencias_vaga_fk FOREIGN KEY (vaga_id) REFERENCES rh.vaga(id), CONSTRAINT exigencias_qualificacao_fk FOREIGN KEY (qualificacao_id) REFERENCES rh.qualificac...
true
4f1b0e9f7f225f177a50bcf2d59c6a24b93acbb4
SQL
mbotsko7/HospitalDatabaseProject
/queries.sql
UTF-8
7,222
4.25
4
[]
no_license
#Use the Create View statement to create the following views: # 1 Employees-Hired: This view returns the First Name, Last Name, and Date Hired of all Hospital Employees. CREATE VIEW Employees_Hired AS SELECT FirstName, LastName, HireDate FROM Employee e INNER JOIN PersonInHospital p ON p.personID = e.personID; # 2 N...
true
20427e94266f793fe160d30bef583c3aae808f55
SQL
seesharper/heatkeeper
/src/HeatKeeper.Server.Database/Dashboard/GetAllDashboardLocations.sql
UTF-8
615
2.625
3
[]
no_license
SELECT l.Id, l.Name, (SELECT lzm.Value FROM LatestZoneMeasurements lzm WHERE lzm.MeasurementType = 1 and lzm.ZoneId = l.DefaultOutsideZoneId) OutsideTemperature, (SELECT lzm.Value FROM LatestZoneMeasurements lzm WHERE lzm.MeasurementType = 2 and lzm.ZoneId = l.DefaultOutsideZoneId) OutsideHumidity, ...
true
2283835c9b6108f43a4fd15c361d4dd41e8e057e
SQL
pSCANNER/USC-source-code
/hqmf2sqlserver/ephir_queries/mssql/MSQL_CMS130v4.sql
UTF-8
25,117
3.40625
3
[ "Apache-2.0" ]
permissive
--set search_path = results; create view results.measure_130_0_all as SELECT patient_base.base_patient_id, (SELECT CASE WHEN EXISTS (SELECT anon_2.patient_id, anon_2.start_dt, anon_2.end_dt, anon_2.audit_key_value FROM (SELECT dc_32.hqmf_cypress_ep_diagnosis_...
true
e6df8f4ab3f29e5447cc95ed2f933e0c61b730da
SQL
bitgittry/BaseCodeAnalysis
/trunk/dbv/stored_routines/LoyaltyGetSportBookWeights.sql
UTF-8
8,480
3.0625
3
[]
no_license
-- ------------------------------------- -- LoyaltyGetSportBookWeights.sql -- ------------------------------------- DROP procedure IF EXISTS `LoyaltyGetSportBookWeights`; DELIMITER $$ CREATE DEFINER=`bit8_admin`@`127.0.0.1` PROCEDURE `LoyaltyGetSportBookWeights`(gameManufacturerId BIGINT) BEGIN SELECT sp.sb_spor...
true
3d9c084a131e6286cdcf2da7a476d139fce6944b
SQL
github-ek/e-connect-data
/ttcwmsprd/dbo/Views/spcins_for_shipment.sql
UTF-8
1,139
3.171875
3
[]
no_license
create view dbo.spcins_for_shipment as select insmst.*, dscmst.short_dsc, dscmst.lngdsc, dscmst.locale_id, shipment_ins.cmpl_flg, shipment_ins.ordnum, cast(null as nvarchar(10) ) ordlin, cast(null as nvarchar(10) ) ordsln, shipment_ins.client_id, shipment_ins.ship_id, ca...
true
03d0c1755d5c5b43b15af81f7b1fa8395e0f62b0
SQL
naomachida/docker
/mysql/scrapy_target.sql
UTF-8
263
3.15625
3
[]
no_license
CREATE TABLE scrapy_target( id int auto_increment ,url varchar(255) ,unique(id) ); INSERT IGNORE INTO scrapy_target (id, url) SELECT * FROM (SELECT 1, 'http://c-netchina.com.cn/') AS tmp WHERE NOT EXISTS ( SELECT id FROM scrapy_target WHERE id = 1 ) LIMIT 1;
true
4e91151d07514651e20006deaf5275c03d4d9bdd
SQL
gunjan1991/CSC-455---Assignments
/Assignment 4-Gunjan-Part 1 Solution.sql
UTF-8
682
3.453125
3
[]
no_license
/*Assignment: 4 Name: Gunjan Pravinchandra Pandya Part: 1*/ DROP TABLE CITY; DROP TABLE DRIVER; CREATE TABLE CITY ( CHAUFFERCITY VARCHAR2(20) NOT NULL, CHAUFFERSTATE VARCHAR2(20), CONSTRAINT CHAUCITY_PK PRIMARY KEY(CHAUFFERCITY) ); CREATE TABLE DRIVER ( LICENSENUMBER INTEGER, RENEWED VARCHAR...
true
c440a94a0c7071f32612b8cc73ea1b9d514325ca
SQL
strogo/mattermost-data-warehouse
/transform/snowflake-dbt/models/events/hourly/daily_server_user_agent_events.sql
UTF-8
7,135
3.078125
3
[]
no_license
{{config({ "materialized": "incremental", "schema": "events", "tags":"union", "unique_key":"id" }) }} WITH daily_server_user_agent_events AS ( SELECT events.timestamp::DATE AS date , COALESCE(events.user_id, events.context_trait...
true
4375a2c1f95ebd9f7cbf986db2100a6a42636b00
SQL
Samistine/School
/SQL/SQL Homework.sql
UTF-8
949
3.375
3
[]
no_license
CREATE TABLE Patients ( uid int NOT NULL PRIMARY KEY AUTO_INCREMENT, first_name VARCHAR(30) NOT NULL, last_name VARCHAR(30) NOT NULL, phone_no CHAR(10) NOT NULL, address VARCHAR(60), ssn CHAR(9) not null ); CREATE TABLE Dentists ( uid int NOT NULL PRIMARY KEY AUTO_INCREMENT, first_name VARCHAR(30) NOT NULL, last_name ...
true
3a75203810096df09aa69db073b34917e33370d1
SQL
ferkopar/estodo
/TABLES/SUBJ_REL.sql
UTF-8
1,970
3.28125
3
[]
no_license
-------------------------------------------------------- -- DDL for Table SUBJ_REL -------------------------------------------------------- CREATE TABLE "SUBJ_REL" ( "SUBJ_REL_ID" NUMBER(12,0), "ROLL_TYPE" NUMBER(1,0) DEFAULT 0, "REL_TYPE_ID" NUMBER(12,0), "SUBJ_ID1" NUMBER(12,0), "SUBJ_ID2" NUMBER(12,0...
true