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
c890532a368b5fecddca0596331d50790bb7e706
SQL
sebastianbachmaier/DatabaseImplementation
/tpc-c/schema.sql
UTF-8
3,379
3.25
3
[]
no_license
create table warehouse ( w_id integer not null, w_name varchar(10) not null, w_street_1 varchar(20) not null, w_street_2 varchar(20) not null, w_city varchar(20) not null, w_state char(2) not null, w_zip char(9) not null, w_tax numeric(4,4) not null, w_ytd numeric(12,2) not null, primary key (w_id) ); create...
true
c7090ec6c85aeac9f18ac627ff7bb026f89c45f1
SQL
AlexandrTheMacedonian/Developer
/src/homework1/3.sql
UTF-8
199
3.625
4
[]
no_license
SELECT skills.name, sum(salary) FROM dev_skill join developers ON dev_skill.devID = developers.id join skills ON dev_skill.skillID = skills.id where skills.name like 'Java' group by skills.name;
true
85cdd1ce64f0e1b14b404bc41b5860776f40b6e1
SQL
sscotty71/alopq
/admin_queries/list_toast_tables.sql
UTF-8
207
3.203125
3
[]
no_license
---- list toast tables SELECT oid::regclass, reltoastrelid::regclass, pg_relation_size(reltoastrelid) AS toast_size FROM pg_class WHERE relkind = 'r' AND reltoastrelid <> 0 ORDER BY 3 DESC;
true
9a1105a67c1ee9fd63ee5cb2e7cfbe4bdcec5324
SQL
SofiaMGutierrez/soccero
/src/main/resources/database/schema.sql
UTF-8
14,413
3.0625
3
[ "Apache-2.0" ]
permissive
-- -- PostgreSQL database dump -- -- Dumped from database version 9.1.13 -- Dumped by pg_dump version 9.3.1 -- Started on 2016-01-19 16:42:58 SET statement_timeout = 0; SET lock_timeout = 0; SET client_encoding = 'UTF8'; SET standard_conforming_strings = on; SET check_function_bodies = false; SET client_min_messages ...
true
8ec04f56e51ccc2c42382e7f36314c91c1d42736
SQL
MILLOGO/igmvss
/bd_sql1/bd31102018vide.sql
UTF-8
108,643
2.859375
3
[]
no_license
-- -- PostgreSQL database dump -- -- Dumped from database version 9.5.3 -- Dumped by pg_dump version 9.5.3 -- Started on 2018-11-01 11:52:17 SET statement_timeout = 0; SET lock_timeout = 0; SET client_encoding = 'UTF8'; SET standard_conforming_strings = on; SET check_function_bodies = false; SET client_min_messages ...
true
fb9b6d72614ef18ef74ec2adf042ab8ecfa929f7
SQL
heitorchang/learn-code
/interview-topics/practice_2022-06/sql_cookbook/13_hierarchical.sql
UTF-8
1,098
4.03125
4
[ "MIT" ]
permissive
-- 13.1 expressing parent-child relationship select c.ename || ' works for ' || p.ename from emp c, emp p where c.mgr = p.empno; -- 13.2 child-parent-grandparent relationship with recursive x (tree, mgr, depth) as ( select ename, mgr, 0 from emp --where ename = 'MILLER' union all select x.tree || '->' |...
true
1ba9e9673e6468ed77678827e3ac0a4a539ae162
SQL
parker84/MMF_UofT
/credit_risk/feature_eng/eng_payments_and_cc_balance_lvl_features.sql
UTF-8
679
3
3
[]
no_license
create table payment_features as select "SK_ID_CURR" as sk_id_curr, "SK_ID_PREV" as sk_id_prev, cast("DAYS_ENTRY_PAYMENT" > "DAYS_INSTALMENT" as int) as is_late, cast("AMT_PAYMENT" < "AMT_INSTALMENT" as int) as underpaid from installments_payments; drop table if exists cc_history_features; create table cc_h...
true
351c189c5d3735b95adc43d19452a1215de4f20f
SQL
debsmita99/SQLite
/Northwind.sql
UTF-8
112,082
3.4375
3
[]
no_license
--SQLite code for creating Northwind database --Created by Debasmita Nandi --Creation of tables --Creating Customers table CREATE TABLE Customers ( customerID INTEGER PRIMARY KEY, customer_name TEXT NOT NULL, contact_name TEXT NOT NULL, address TEXT NOT NULL, city TEXT NOT NULL, postal_code TEXT, country TEXT NOT NUL...
true
9d316b9f3b9b012c8234215dc1311342ec2f823f
SQL
sidie82/BVC-Tech-Skills-Code
/We-Vote-Quality-Assurance/System Test/sqlTestCodes/SQLQuery - QA System Test Stored Procedures - Find Delete Duplicates.sql
UTF-8
539
2.5625
3
[]
no_license
USE WeVote3; INSERT INTO CandidateName VALUES (201,'Dup1',1), (202,'Dup1',2), (203,'Dup1',1) SELECT * FROM CandidateName; exec spFindDuplicates_SelectOneColumn CandidateName,CandidateNames exec spFindDuplicates_SelectTwoColumns CandidateName,FK_CandidateTypeIDs,CandidateNames SELECT * FROM CandidateName; exec...
true
0a222b4ddcdcbf97ee499192989dce3b5e9a8633
SQL
marciogreison/PrjTesteMyBatis
/customers.sql
UTF-8
419
2.859375
3
[]
no_license
drop table customers if exists; create table customers ( id int primary key auto_increment, name varchar(100) not null, city varchar(100) default 'Bangalore', email varchar(255), phone varchar(255) ); insert into customers (name, email, phone) values ('Vinod', 'vinod@vinod.co', '9731424784'), ('S...
true
7d07d68d40f4b08ff567c1bf2f52d06ce29e81d6
SQL
git786hub/DLL
/POST-CONVERSION-SCRIPTS/Temp-Fixes/COMP_UNIT_REQ_ATTR.sql
UTF-8
526
2.53125
3
[]
no_license
SET ECHO ON SET LINESIZE 1000 SET PAGESIZE 300 SET TRIMSPOOL ON SPOOL COMP_UNIT_REQ_ATTR.LOG ALTER TABLE GIS.B$COMP_UNIT_N DISABLE ALL TRIGGERS; UPDATE GIS.B$COMP_UNIT_N CU SET CU.WR_ID = DECODE (CU.WR_ID,NULL,'UNK',CU.WR_ID) WHERE WR_ID IS NULL; UPDATE GIS.B$COMP_UNIT_N CU SET CU.QTY_LENGTH_Q = DECODE (CU...
true
91f2dce5ee49673a11f6271f0c28420d8bc2c694
SQL
bomsoul/projWebtech
/Project/university.sql
UTF-8
7,201
3.375
3
[]
no_license
-- -------------------------------------------------------- -- Host: localhost -- Server version: 5.7.24 - MySQL Community Server (GPL) -- Server OS: Win64 -- HeidiSQL Version: 9.5.0.5332 -- -------------------------------------------------------- /*...
true
59f3bf2c43d2b3e701d5bebde59651f2dab30409
SQL
jbolo/phalertmanagement
/database.sql
UTF-8
4,614
3.734375
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='TRADITIONAL,ALLOW_INVALID_DATES'; CREATE SCHEMA IF NOT EXISTS `phmobile` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci ; USE `phmobile` ; -- ---...
true
3304236025eb53f5a7800e8dcbb44b8b1f8be9f6
SQL
sucreqw/template
/mysql/init/create_tables.sql
UTF-8
5,005
3.71875
4
[]
no_license
create database if not exists template; use template; SET NAMES utf8mb4; SET FOREIGN_KEY_CHECKS = 0; DROP TABLE IF EXISTS `sys_user`; CREATE TABLE `sys_user` ( `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键', `account` varchar(36) NOT NULL COMMENT '账号', `name` varchar(36) NOT NULL COMMENT '用户名称', `email` var...
true
9215e6b6f9202cd00f9b8d97c58e8c78bb2f963a
SQL
staugur/passport
/misc/passport.sql
UTF-8
6,635
3.6875
4
[ "BSD-3-Clause" ]
permissive
/* Navicat MySQL Data Transfer Date: 2018-08-08 17:39:09 */ SET FOREIGN_KEY_CHECKS=0; -- ---------------------------- -- Table structure for sso_apps -- ---------------------------- DROP TABLE IF EXISTS `sso_apps`; CREATE TABLE `sso_apps` ( `id` int(11) NOT NULL AUTO_INCREMENT, `name` varchar(18) NOT NULL COMMEN...
true
90277df3da9e8c806a0d716f53e055c4c6382e0e
SQL
bellmit/GitWrok
/Code/sql-template/其他通用脚本/20180412shiph22854(投后管理-风险预警信息-风险预警反馈自动提醒).sql
GB18030
1,816
2.875
3
[]
no_license
--[201802050341]20180412shiph22854(ԤϢԤԶ)--start-- declare v_clob_afn clob; begin --Ԥ v_clob_afn :='select distinct t.l_id, t.c_noticeto userid, (sysdate - to_date(''1970-01-01'', ''yyyy-mm-dd'') - 8 / 24) *86400000 senddate, ''Ԥ'' msgtitle, ''Ŀ['' || t.c_projectcode || '':'' || t.c_pr...
true
1c20ec47a96ae511e894d4e5c16870c86500c743
SQL
mikhael6363/database-design
/case-view-30-03.sql
UTF-8
12,406
4.15625
4
[]
no_license
/* CASE SELECT в данном случае выступает в роли console.log из js */ --1 SELECT ( CASE WHEN true THEN '+' WHEN false THEN '-' ELSE '???' END ) AS "test field"; --2 SELECT ( CASE WHEN true = false THEN '+' WHEN true THEN '-' ELSE '???' END ) AS "test field"; --п...
true
2761cb0a69107ef83c329ee0315825a4245def08
SQL
ASTAMBE/opnt
/opnt_sql/newPostwithmedia.sql
UTF-8
1,568
3.5625
4
[]
no_license
-- newPostwithmedia DELIMITER // DROP PROCEDURE IF EXISTS newPostwithmedia // CREATE PROCEDURE newPostwithmedia(topicid INT, userid varchar(45), message varchar(2000) , embedded_content varchar(1000), embedded_flag varchar(3) -- , postor_country_code varchar(5) ,media_content varchar (500),media_flag varchar(3)) thisP...
true
62bcf36c3307c28b73f8a46f148e136c14d640f0
SQL
oded05/UAS_Kelompok3
/point/baru.sql
UTF-8
2,746
3.15625
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.9.0.1 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Waktu pembuatan: 17 Jul 2020 pada 18.22 -- Versi server: 10.4.6-MariaDB -- Versi PHP: 7.3.9 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHAR...
true
7f07cc205699ce85c71b06ebe9fc480840a19e46
SQL
gxlself/all-plane
/plane.sql
UTF-8
6,246
3.40625
3
[]
no_license
/* SQLyog Professional v12.08 (64 bit) MySQL - 5.0.96-community-nt : Database - allplant ********************************************************************* */ /*!40101 SET NAMES utf8 */; /*!40101 SET SQL_MODE=''*/; /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; /*!40014 SET @OLD_...
true
70252b6c1ecf0871e6de6aa2744767cf371c753a
SQL
kevinmuturi5/town
/dashboard/config/customers.sql
UTF-8
3,314
2.84375
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.8.3 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Aug 28, 2019 at 01:23 PM -- Server version: 10.1.35-MariaDB -- PHP Version: 7.2.9 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD...
true
1ccd1e12e3475c1b36837acc03c48924f2eefc15
SQL
happy6eve/tongli
/tongli/WebRoot/META-INF/tc_sys_news_type.sql
UTF-8
6,247
2.921875
3
[]
no_license
/* Navicat MySQL Data Transfer Source Server : localhost Source Server Version : 50610 Source Host : localhost:3306 Source Database : tongli Target Server Type : MYSQL Target Server Version : 50610 File Encoding : 65001 Date: 2014-04-11 22:29:06 */ SET FOREIGN_KEY_C...
true
9524f7f7ed366955d87d6bbc7f13a8fbbcdea5c5
SQL
PedroSordi/RiverControl
/conf/evolutions/default/1.sql
UTF-8
504
2.6875
3
[ "Apache-2.0" ]
permissive
# --- Created by Ebean DDL # To stop Ebean DDL generation, remove this comment and start using Evolutions # --- !Ups create table leitura ( id bigint not null, pressao_at float, temperatura float, umidade float, distancia ...
true
e624bbfb88ffd5baac627628daae64d4a05a008b
SQL
cerdkamp/GSG-Financials
/XGSG_SummaryStatistics.sql
UTF-8
1,138
3.609375
4
[]
no_license
Alter View XGSG_SummaryStatistics as Select Year , Month , Period , AssetCount , IntermRent , Number , [Cost of Equipment] , sum([Sum Implicit Rate])/ Sum(Number) [Average Yield] From ( Select convert(varchar(4),year(lease_booked_post_date)) as Year ,right('0'+ convert(varchar(2),Month(lease_...
true
26300d49130600f3d094236ec6bb1ffecb0c74f5
SQL
Athira612/MYSQL
/SET 2/depositor.sql
UTF-8
172
2.625
3
[]
no_license
CREATE TABLE depositor ( cid int(15), dacno int(15), FOREIGN KEY(cid) REFERENCES customer(cid), FOREIGN KEY(dacno) REFERENCES Deposit(dacno) );
true
083c81aeb22a1d8e966c3720352b8d45e67ddc52
SQL
romanwin/StratasysERP
/ebs/database/apps/views/xxcs_instance_contract.sql
UTF-8
4,893
3.5
4
[]
no_license
CREATE OR REPLACE VIEW XXCS_INSTANCE_CONTRACT AS SELECT -------------------------------------------------------------------- -- name: XXCS_INSTANCE_CONTRACT -- create by: Yoram Zamir -- Revision: 2.2 -- creation date: 03/09/2009 -------------------------------------------------------------...
true
d5b669474b784f4e4d40f8bd02fccba4a60a5016
SQL
datoledoa/Certamen2DaiToledo-Fernandez
/noticia.sql
UTF-8
2,410
3.1875
3
[]
no_license
CREATE DATABASE IF NOT EXISTS `noticias` /*!40100 DEFAULT CHARACTER SET utf8 */; USE `noticias`; -- MySQL dump 10.13 Distrib 5.7.17, for Win64 (x86_64) -- -- Host: localhost Database: noticias -- ------------------------------------------------------ -- Server version 5.7.17-log /*!40101 SET @OLD_CHARACTER_SET_CL...
true
6365d9aeb4ab6b567698c3cad878bc0a84fe2fde
SQL
ReedOei/dt-fixing-tools
/src/main/sql/figures/count_cleaner_by_victim.sql
UTF-8
282
3.671875
4
[]
no_license
select odc.test_name, count(cg.test_name) as num from od_classification odc left join cleaner_groups cg on odc.test_name = cg.test_name where od_type = 'victim' and ifnull(cleaner_count, 0) >= ? and ifnull(cleaner_count, 0) <= ? group by odc.test_name having num >= ? and num <= ?;
true
af4f4feac015cce55720f7d26c36734dd81b9469
SQL
km1031kim/DBinSchool
/Basic/NVL_DECODE_GROUPBY.sql
UHC
3,115
4.15625
4
[]
no_license
-- NVL NULLΰ ٸ -- NVL NULLΰ NULL ƴѰ Ѵ ϴ. SELECT REGIONID ,YEARWEEK ,VOLUME -- NVL2(NULL ƴϸ 0 NULL̸ 1) ϴ°ſ ޶. , NVL2(VOLUME, '', '') AS VOLUME_NEW FROM NVL_CHECK --- DECODE (~,~ΰ?,Ʈ,ƴϸ) SELECT A.GENDER, UPPER(A.GENDER) AS GENDER_NEW, DECODE( UPPER(A.GENDER),'...
true
65dedcd25cfbb173801a2fda7bb3726bdea2c4fb
SQL
e64f/f1
/1_SQL.sql
UTF-8
178
3.90625
4
[]
no_license
SELECT c.id, c.name, COUNT(DISTINCT p.prodict_id) cnt FROM tbl_clients c, tbl_orders_products p WHERE p.client_id = c.id GROUP BY p.client_id HAVING cnt >= 3
true
c1fce8559d5bdf886b27c08618814884a3554c53
SQL
torentlikher/CS340
/sql/insert.sql
UTF-8
1,947
2.828125
3
[]
no_license
INSERT INTO Snakes (species, weight_lb, length, color, price) VALUES ('Rattlesnake', 5, 10, 'beige', 100); INSERT INTO Snakes (species, weight_lb, length, color, price) VALUES ('King Cobra', 15, 20, 'red', 150); INSERT INTO Snakes (species, weight_lb, length, color, price) VALUES ('Green Snake', 3, 25, 'green', 95); ...
true
ec6d8642a3cce6a33bd5f5cb2619b3f36ebbdcb3
SQL
3bugs/Bagculate
/web/db/bagculate_history.sql
UTF-8
1,600
2.921875
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.1.7 -- http://www.phpmyadmin.net -- -- Host: localhost -- Generation Time: Aug 11, 2019 at 04:36 PM -- Server version: 5.5.37 -- PHP Version: 5.4.33 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; ...
true
45a5ff8dd311a4ed0ffe713c6c5c5f8e7231eea7
SQL
brilz/samples
/newcreation.sql
UTF-8
3,112
3.3125
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.9.0.1 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Oct 26, 2019 at 12:43 AM -- Server version: 10.4.6-MariaDB -- PHP Version: 7.3.8 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OL...
true
68e5b92e22b7b28bc5e76fe39ee54698229686b9
SQL
735900718/canvas
/tarena.sql
UTF-8
215
2.515625
3
[]
no_license
SET NAMES UTF8; DROP DATABASE IF EXISTS tarena; CREATE DATABASE tarena CHARSET=UTF8; USE tarena; CREATE TABLE score( sId INT PRIMARY KEY AUTO_INCREMENT, stuName VARCHAR(16), chinese INT, math INT );
true
813ad48a550dd783d81e4b9aa43af326e5411e14
SQL
Zorigt/mysql
/CS155A/155A_06_demo/155A_06_demo/155A_06-03_demo.sql
UTF-8
2,894
3.59375
4
[]
no_license
Use a_testbed; /* demo01 */ Select z_em_emp.d_id As "EM_Emp.d_id" , z_em_dept.d_id As "EM_Dept.d_id" , d_name From z_em_dept Left Join z_em_emp On z_em_dept.d_id = z_em_emp.d_id Where z_em_emp.d_id Is Null ; /* demo02 */ Select z_em_emp.d_id As "EM_Emp.d_id" , z_em_dept.d_id As "EM_Dept.d_id" ...
true
fbb56fd8a13159bf9a2e22049220e8515708e643
SQL
2zoo0/java_basic
/day11-Book/sql/book.sql
UTF-8
617
3.515625
4
[]
no_license
CREATE TABLE book ( bookid VARCHAR2(5) , title VARCHAR2(200) NOT NULL , author VARCHAR2(50) NOT NULL , price NUMBER(10) , isbn VARCHAR2(13) , publish VARCHAR2(30) , regdate DATE DEFAULT sysdate , moddate DATE , CONSTRAINT pk_book PRIMARY KEY(bookid) ); SE...
true
f951c0cea47402beb8e680a505cc12bfeca47824
SQL
alecgorge/iguana
/data/00_artist_seed.sql
UTF-8
8,193
2.6875
3
[]
no_license
# ************************************************************ # sequel pro sql dump # Version 4096 # # http://www.sequelpro.com/ # http://code.google.com/p/sequel-pro/ # # Host: localhost (MySQL 5.6.10) # Database: lotusod # Generation Time: 2013-11-09 10:00:10 +0000 # *************************************************...
true
f867f9e8a3fa4c4bfe32cfd4bd646ffde0a5d0c8
SQL
ZhuTouSan123/vue_jd
/jd.sql
UTF-8
7,614
3.125
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.8.5 -- https://www.phpmyadmin.net/ -- -- 主机: localhost -- 生成日期: 2021-10-14 17:45:10 -- 服务器版本: 5.7.26 -- PHP 版本: 7.3.4 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLI...
true
72ee8414dfadc31552274085b64e3a3e701938a2
SQL
chimerast/karatachi-portus
/portus-core/src/main/java/org/karatachi/portus/core/dao/NodeDao_selectReplicationDestinationWithType.sql
UTF-8
356
3.828125
4
[]
no_license
SELECT node.* FROM node WHERE status = 1 AND node_type_id=/*node_type_id*/ AND node_block_id NOT IN (SELECT node_block_id FROM node JOIN storedinfo ON node.id = storedinfo.node_id WHERE file_id=/*file_id*/) AND (SELECT count(*) FROM storedinfo WHERE node_id=node.id AND file_id=/*file_id*/) = 0...
true
a7b4b27518f80231586d08f0714d4b287660303a
SQL
andraarianti/KUIS-MINGGU-INI-Input-Buku-
/PerpusDB/perpus.sql
UTF-8
4,088
3.046875
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 5.0.2 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Waktu pembuatan: 14 Apr 2020 pada 22.29 -- Versi server: 10.4.11-MariaDB -- Versi PHP: 7.4.4 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CH...
true
6e3da26c47ab4876b660cc6b05fa4379a777e1d8
SQL
Kevingili/parking
/parking (2).sql
UTF-8
4,975
3.265625
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.1.4 -- http://www.phpmyadmin.net -- -- Client : 127.0.0.1 -- Généré le : Sam 05 Décembre 2015 à 19:40 -- Version du serveur : 5.6.15-log -- Version de PHP : 5.4.24 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARAC...
true
8ca9184f8eb14dd1f3b730f9e6c8d340565dedb1
SQL
samyan19/SQL-Scripts
/SAM - SQL Takeovers/p. Check previous wait stats.sql
UTF-8
472
3.015625
3
[]
no_license
/* We've hit the major pain points on reliability and security. Now let's do a little poking around in performance. Let's query the server's wait stats, which tell us what things the server has been waiting on since the last restart. For more about wait stats, check out: http://sqlserverpedia.com/wiki/Wait_Typ...
true
89de57fff62d59eaeb4cce38f9140b68184f0406
SQL
330114067/zend-framework-extjs6.0
/doc/07SQL/01CreateTables.sql
UTF-8
2,634
3.21875
3
[ "Apache-2.0" ]
permissive
DROP TABLE IF EXISTS `t_org`; CREATE TABLE `t_org` ( `id` int(10) NOT NULL AUTO_INCREMENT COMMENT '主键', `full_name` varchar(255) NOT NULL COMMENT '组织机构全路径名称', `name` varchar(255) NOT NULL COMMENT '组织机构名称', `org_code` varchar(255) NOT NULL COMMENT '组织机构编码', `parent_id` varchar(255) DEFAULT NULL COMMENT '上级组织机构...
true
cf90de806b70d35813a30d98446bece5bb0d5a5d
SQL
mr-rider/sql_tut
/project/selects.sql
UTF-8
546
3.90625
4
[]
no_license
-- Выборка 3-х лидерующих команд в заданном соревновании SELECT teams.name AS "Team name", score AS "Score" FROM team_scores LEFT JOIN teams ON team_scores.team_id = teams.id WHERE team_scores.competition_id = 3 ORDER BY team_scores.score DESC LIMIT 3; -- Количество участников в каждой команде SELECT COUNT(*) AS Me...
true
5e091eaf32edb25075d967e37412f6e7d565186d
SQL
jinyingone/hope-java-demo
/demo-ddd/src/main/resources/db/schema.sql
UTF-8
2,030
3.640625
4
[]
no_license
DROP TABLE IF EXISTS user; CREATE table user( id int IDENTITY PRIMARY KEY, user_id int not null , phone varchar(11) not null , user_name varchar(64) not null , avatar varchar(256) not null, password varchar(64) not null, create_time datetime not null, update_time datetime not null ); create unique index uk_userId on us...
true
d450cffe8a13916a46a47538b1b1a61b37f6f501
SQL
thehyve/genetics-backend
/loaders/clickhouse/manhattan.sql
UTF-8
3,025
3.203125
3
[ "Apache-2.0" ]
permissive
create database if not exists ot; create table if not exists ot.manhattan( study String, chrom Enum8('1' = 1, '2' = 2, '3' = 3, '4' = 4, '5' = 5, '6' = 6, '7' = 7, '8' = 8, '9' = 9, '10' = 10, '11' = 11, '12' = 12, '13' = 13, ...
true
6e3d9d57f0c7b834df8a863f2ad9471ec4f211f8
SQL
ssivtsov1/energo
/scr/ded/works/upd_point_inspector.sql
UTF-8
3,446
3.484375
3
[]
no_license
UPDATE "pg_class" SET "reltriggers" = 0 WHERE "relname" = 'eqm_point_tbl'; update eqm_point_tbl set id_position= null where id_position not in (select id from clm_position_tbl); update eqm_point_h set id_position= null where id_position not in (select id from clm_position_tbl); update eqm_point_tbl set id_...
true
79ccebff70c2609254c2ed6b84777531e9b40522
SQL
JcGaara/SGA-PLSQL-OPE
/SGA-OPERACION/Scripts/Inserts_INICIATIVA-108.SGA_8.AG.sql
UTF-8
5,584
2.578125
3
[]
no_license
declare ln_max_tipopedd number; ln_max_opedd number; maxidlista number; maxidcampo number; maxordentel number; maxordenint number; maxordentv number; maxordenftthint number; maxordenftthtel number; begin select max(TIPOPEDD) + 1 into ln_max_tipopedd from op...
true
fc9f5c729ee796df63864ef0cd1a2c5bfd300f52
SQL
HenkVanTol/assetid_old
/sql/create.sql
UTF-8
716
3
3
[]
no_license
create table user ( id int auto_increment not null primary key, email varchar(255), password varchar(255) ); create table assetMaster ( id int auto_increment not null primary key, hierarchyTypeId int, masterId int, classId int, name varchar(255), description varchar(255), serial var...
true
ed83124692614b300566e5b4c32faaf18507dcdc
SQL
lipeng1223/BCCH
/src/main/sql/migrate.sql
UTF-8
52,811
3.65625
4
[]
no_license
SET FOREIGN_KEY_CHECKS=0; -- trigger drops drop trigger if exists order_item_update_trigger; drop trigger if exists inventory_item_update_trigger; drop trigger if exists received_item_update_trigger; drop table if exists bri_count; -- user alter table users rename to user; alter table user drop primary key; alter ta...
true
4385207a795b61d02807314c019b335c60b44ed4
SQL
PraktikumWebdas4103/jurnal-modul-6-giovanitc
/pendaftaran.sql
UTF-8
2,159
2.796875
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.8.2 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Waktu pembuatan: 09 Okt 2018 pada 11.59 -- 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
06111a4cb5eabbec6c9f7f9ba50f5a8bf51e2eda
SQL
AlinaKZN/Spring-SpringWithJPA
/src/main/resources/create_db_script.sql
UTF-8
712
3.34375
3
[]
no_license
-- ----------------------------------------------------- -- Schema employee_db -- ----------------------------------------------------- CREATE SCHEMA IF NOT EXISTS `employee_db` DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci ; USE `employee_db` ; -- ----------------------------------------------------- -- Ta...
true
14e318e1bb467aa75a7500a1f4534cc92e3f76de
SQL
josepitteloud/VESPA
/Vespa Projects/002 - Trollied Analysis/Current Code/002b - Weighted Viewing Analysis for Trollied v2.sql
UTF-8
25,580
3.71875
4
[]
no_license
/*------------------------------------------------------------------------------ Project: Weighted Trollied Viewing Version: 1 Created: 20111205 Lead: Dan Barnett Analyst: SK Prod: 10 --This Code uses the UK base table and the viewing data created for the Trollie...
true
cec5cfa22d86b66d2187c9f4c1c9fd9c691ca847
SQL
Nasibulin/SQL
/sql-ex/cte_color.sql
UTF-8
393
3.65625
4
[]
no_license
WITH a AS ( SELECT Q_ID,x.V_ID, 0 B_VOL FROM utq CROSS JOIN (SELECT min(v_id) V_ID, V_COLOR FROM utv GROUP BY v_color) x UNION SELECT B_Q_ID,B_V_ID,B_VOL FROM utB) SELECT DISTINCT a.q_id, V_color,sum (b_vol),CAST(CAST (ROUND ( (sum (b_vol) + 64) * 1.0 / 64, 0, 1) AS INT) AS VARCHAR) grp_name ...
true
0206f3d6f9b72369b495af12022c265433182780
SQL
dmaisano/NJIT-CS
/CIS-278/notes/oct25.sql
UTF-8
652
4.0625
4
[]
no_license
/* Students getting loans - id, first AND last name, lender code, amount Join ON ALL cols WITH same name IN both TABLES (ONLY returns ROWS WHERE a student has a loan) */ SELECT id, first, last, lender_id, amount FROM b_students NATURAL JOIN b_financial_aid; /* shows NULL values */ SELECT id, first, last, lender_id, ...
true
2f5c545cc250c6d4c6b34b9369db858008d63b68
SQL
neostreet/poker_session_data
/allfers.sql
UTF-8
202
2.84375
3
[]
no_license
use poker select poker_session_date,count(*) from poker_sessions where poker_style in (1,3) group by poker_session_date having count(*) > 1 and count(*) = sum(place) order by poker_session_date; quit
true
1c8ecf906d74f8e0d5138f3fae76064c229fd138
SQL
eh8491/data-models
/mobile/v1/redshift/sql-runner/sql/standard/03-optional-modules/01-app-errors/99-complete/99-app-errors-cleanup.sql
UTF-8
1,471
2.8125
3
[ "LicenseRef-scancode-warranty-disclaimer", "Apache-2.0" ]
permissive
/* Copyright 2021 Snowplow Analytics Ltd. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by a...
true
cad6f25c237b5e3ea2f31c01647716b5117bab2e
SQL
h1v3r/EDR
/sql_procedures.sql
UTF-8
18,747
3.71875
4
[]
no_license
SET serveroutput ON; / /********************************************************************* /** /** Procedure: sp_add_ort /** Out: l_n_pk_out - primary Key ID of the existing or added element /** Out: l_n_error_out - Error code if error occured /** In: l_n_plz_in - the desired PLZ for the new Ort /** In: l_v_ortsnam...
true
528e2f408c6d56bfd54cfc5a2521be85faaf4fc5
SQL
PMSOFTPROJECT/PMSOFT
/bd/01_SQL_Crear_Proyecto.sql
UTF-8
898
3.140625
3
[]
no_license
-- Table: public.proyecto -- DROP TABLE public.proyecto; CREATE TABLE public.proyecto ( proyecto_id bigint NOT NULL, proyecto_editable boolean NOT NULL, proyecto_estado integer NOT NULL, proyecto_nombre character varying(255) NOT NULL, proyecto_objeto character varying(255) NOT NULL, proyecto_usuariocrea...
true
e4910aba684184b6e72f8f063884fcad0cefe10b
SQL
MrJGX/dbHomeWork
/DB_SQL/insertData.sql
GB18030
4,527
2.609375
3
[]
no_license
use expertsys; delete from userbase; delete from contact; delete from certificate; delete from education; delete from avoidplace; delete from qualify_num; delete from reviewfield; delete from reviewexp; delete from workexp; delete from administrator; delete from useraccount; insert into administrator ...
true
18fdd76eac65693865d64297aff2549f8a4194b8
SQL
ThayanithiKokulan/shelfari
/book.sql
UTF-8
2,453
2.703125
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 3.5.2.2 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: Jul 23, 2013 at 03:38 PM -- Server version: 5.5.27 -- PHP Version: 5.4.7 SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /...
true
281213ceba7d54559573722f818750af6e7f0a2a
SQL
xwzl/spring-cloud
/spring-websocket/sql/wtf.sql
UTF-8
108,401
3.390625
3
[]
no_license
/* Navicat Premium Data Transfer Source Server : aliyun Source Server Type : MySQL Source Server Version : 80012 Source Host : 47.105.218.58:3306 Source Schema : wtf Target Server Type : MySQL Target Server Version : 80012 File Encoding : 65001 Date: 16/07/2019 09:37...
true
a6cb0cf53249046fdceca6ba65f024216f4a8c38
SQL
rodrigo-portilio/PortTodo.Backend
/sql/Initial.sql
UTF-8
866
3.484375
3
[ "MIT" ]
permissive
CREATE TABLE IF NOT EXISTS "__EFMigrationsHistory" ( "MigrationId" character varying(150) NOT NULL, "ProductVersion" character varying(32) NOT NULL, CONSTRAINT "PK___EFMigrationsHistory" PRIMARY KEY ("MigrationId") ); START TRANSACTION; DO $$ BEGIN IF NOT EXISTS(SELECT 1 FROM "__EFMigrationsHistory"...
true
502c569dcc199f4f5850d4bebbe4f6cbc290d138
SQL
mutedalien/sql_less
/less_3/shop.sql
UTF-8
4,780
3.828125
4
[]
no_license
DROP TABLE IF EXISTS catalogs; CREATE TABLE catalogs ( id SERIAL PRIMARY KEY, name VARCHAR(255) COMMENT 'Название раздела' ) COMMENT = 'Разделы интернет-магазина'; -- INSERT INTO catalogs VALUES (NULL, 'Процессоры'); -- INSERT INTO catalogs (name, id) VALUES ('Мат.платы', NULL); -- INSERT INTO catalogs VALUES (DEFAU...
true
51fee1778eec10dcd8c063483ff692ced7929606
SQL
paulaolivar99/Proyecto-fin-DAW
/PhpProject1/php/reservas.sql
UTF-8
1,151
3.34375
3
[]
no_license
/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ /** * Author: PAULA * Created: 30 may. 2021 */ SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; -- -- Table s...
true
663fcdac1fc2639b5767c14bf9eb2956fd0820c1
SQL
MAdinugroho/nms
/simajar.sql
UTF-8
5,044
3.015625
3
[ "MIT", "LicenseRef-scancode-unknown-license-reference" ]
permissive
/* Navicat Premium Data Transfer Source Server : xampp Source Server Type : MySQL Source Server Version : 100129 Source Host : localhost:3306 Source Schema : simajar Target Server Type : MySQL Target Server Version : 100129 File Encoding : 65001 Date: 03/09/2019 16:0...
true
a60f0bdbd3c17c24b1cb13822f2c9b9bb84171c3
SQL
KeerthiAkella3/Grubhub-simulation-Lab2-013858819
/Demo-Grubhub/grubHubDatabase.sql
UTF-8
2,262
3.78125
4
[]
no_license
create database grubHub; use grubHub; show tables; CREATE TABLE restaurantSectionTable( sectionItemId INT NOT NULL AUTO_INCREMENT, restaurantId INT NOT NULL, sectionName VARCHAR(100) NOT NULL, PRIMARY KEY (sectionItemId) ); CREATE TABLE restaurantMenuTable( menuItemId INT NOT NULL AUTO...
true
4ebd84ce5ad972488e788226d74b4dd35ae3b4a8
SQL
emanuelbesliu/iSQL
/count_records_day.sql
UTF-8
365
3.34375
3
[ "MIT" ]
permissive
SELECT DATEPART(YEAR, Timestamp) AS 'Year', DATEPART(MONTH, Timestamp) AS 'Month', DATEPART(DAY, Timestamp) AS 'Day', COUNT(*) AS 'Visits' FROM (change_table_name) GROUP BY DATEPART(DAY, Timestamp), DATEPART(MONTH, Timestamp), DATEPART(YEAR, Timestamp) ORDER BY...
true
d11b963318e1dd3486a701c88727407643360675
SQL
lkcbharath/Lab_Assignments
/5th Semester/IT301 DBMS/Lab 6/queries.sql
UTF-8
3,144
4.125
4
[]
no_license
-- Exercise 1 DROP PROCEDURE IF EXISTS usp_get_employees; DELIMITER && CREATE PROCEDURE usp_get_employees(IN target_salary INT) BEGIN SELECT Fname, Lname FROM Employee WHERE Salary >= target_salary ORDER BY Fname ASC, Lname ASC; END && DELIMITER ; CALL usp_get_employees(48100); -- Exercise 2 DROP PROCEDURE IF...
true
450a9ecf1959f18d41ad6e918cc3123e831d0dcb
SQL
cassiowt/TT_ORACLE_SQLI
/Oracle SQL Fundamentos I/RespostaExercicio03.sql
UTF-8
1,513
4.3125
4
[]
no_license
/* 1. Inicie uma sessão do SQL Developer. 2. Crie uma consulta para exibir o id e a data de compra (dt_compra) dos contratos com o total superior a 10000. */ SELECT ct.id, ct.dt_compra, ct.total FROM TCONTRATOS ct WHERE ct.total > 10000 order by 3; /* 3. Crie uma consulta para exibir o nome, endereço, cidade, cep ...
true
c3d81af661943d371f90ed6ee45d2fd156bcc6bf
SQL
alphagov/pay-products
/src/main/resources/migrations/00024_add_unique_two_column_constraint_to_products_for_product_path.sql
UTF-8
269
2.65625
3
[ "LicenseRef-scancode-proprietary-license", "MIT" ]
permissive
--liquibase formatted sql --changeset uk.gov.pay:add_unique_two_column_constraint_to_products_for_product_path ALTER TABLE products ADD UNIQUE (service_name_path, product_name_path); --rollback alter table payments drop unique (service_name_path, product_name_path);
true
46ad45643ecff18a0bdc83aa70230fe5c279c000
SQL
SebastianKuhn/OOPBallers
/Loser_Groups/Group_5/OOP_Project Kopie/Database/dump_data.sql
UTF-8
2,776
2.6875
3
[]
no_license
-- MySQL dump 10.13 Distrib 5.7.17, for macos10.12 (x86_64) -- -- Host: 127.0.0.1 Database: oopproject -- ------------------------------------------------------ -- Server version 5.7.21 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS...
true
8b2de1cacc5b95c0109677ecd8c29fb9022534b8
SQL
mykelabania/MOLE
/mole_database/mole_database.sql
UTF-8
7,830
2.90625
3
[ "MIT" ]
permissive
-- phpMyAdmin SQL Dump -- version 4.2.7.1 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: Feb 22, 2015 at 02:14 PM -- Server version: 5.6.20 -- PHP Version: 5.5.15 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */...
true
8c9b2fe883eadabe1c91d9308c04b559ea7b6c41
SQL
mskutlu/bonita-migration
/src/it/resources/sql/v7_7_1/dependency/oracle.sql
UTF-8
941
3.359375
3
[]
no_license
CREATE TABLE dependency ( tenantid NUMBER(19, 0) NOT NULL, id NUMBER(19, 0) NOT NULL, name VARCHAR2(150 CHAR) NOT NULL, description VARCHAR2(1024 CHAR), filename VARCHAR2(255 CHAR) NOT NULL, value_ BLOB NOT NULL, CONSTRAINT UK_Dependency UNIQUE (tenantId, name), PRIMARY KEY (tenantid, id) ); CREATE INDE...
true
d53bc04d66dfee1893331e4fe524db16e63ca1c5
SQL
VictorGub/codeigniter-github-api
/github-api.sql
UTF-8
1,848
2.859375
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 3.5.8 -- http://www.phpmyadmin.net -- -- Хост: localhost -- Время создания: Авг 22 2013 г., 11:51 -- Версия сервера: 5.1.67-rel14.3-log -- Версия PHP: 5.3.17 SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT...
true
6d57df2b6f858633408aba6c66bcbe22cc2bdf74
SQL
NosajGithub/pitchPrediction
/src/sql-queries/initialize-and-generate-pygameday-tables.sql
UTF-8
2,594
3.234375
3
[]
no_license
create table game ( game_id varchar(30) not null primary key, game_type varchar(1) not null, local_game_time varchar(10), game_pk integer, game_time_et varchar(10), home_sport_code varchar(10), home_id integer, home_team_code varchar(3), home_fname varchar(30), home_sname varchar(30), home_wins integer, hom...
true
3150f5840522384eb2bdf09c201c08fab6c1a3b4
SQL
CTMaiorino/MMIAD-SeniorCapstoneProject
/database/mmiadDump/mmiadDB_Admin.sql
UTF-8
2,879
2.75
3
[]
no_license
CREATE DATABASE IF NOT EXISTS `mmiadDB` /*!40100 DEFAULT CHARACTER SET utf8 */; USE `mmiadDB`; -- MySQL dump 10.13 Distrib 8.0.22, for macos10.15 (x86_64) -- -- Host: 34.73.36.95 Database: mmiadDB -- ------------------------------------------------------ -- Server version 5.7.33-google-log /*!40101 SET @OLD_CHARA...
true
2ed051dc6e8b4602cfdbf7ea0c09c83f9005ebd8
SQL
Roberlynk/Red-social-Thix-o
/SQLQueryThixio.sql
ISO-8859-10
1,053
3.21875
3
[]
no_license
create database Thixio use Thixio create table Usuario( idUsuario int identity(1,1) primary key, nombre varchar(45), apellido varchar(45), telefono varchar(12), correo varchar(45), nombreUsuario varchar(45), contrasea varchar(255), statuss bit null default '0' ) create table amigo( idAmigo int, idUsuario in...
true
3ad04ad22b125c81222507df2debd95381e78ea1
SQL
abdulganrepo/assesment-full-stack
/manajemenskorliga.sql
UTF-8
9,915
2.828125
3
[ "MIT" ]
permissive
-- phpMyAdmin SQL Dump -- version 5.1.1 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Oct 03, 2021 at 02:07 AM -- Server version: 10.4.21-MariaDB -- PHP Version: 8.0.11 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIE...
true
eca4b5b12d28665306d32dd6742bf3c56ae9da15
SQL
j7ng/CLFY_SA
/SA/Tables/TABLE_X_TRACKING_SITE.sql
UTF-8
571
2.890625
3
[]
no_license
CREATE TABLE sa.table_x_tracking_site ( objid NUMBER, x_site_id VARCHAR2(20 BYTE), x_site_desc VARCHAR2(50 BYTE) ); ALTER TABLE sa.table_x_tracking_site ADD SUPPLEMENTAL LOG GROUP dmtsora1124594692_0 (objid, x_site_desc, x_site_id) ALWAYS; COMMENT ON TABLE sa.table_x_tracking_site IS 'Contains the Site reco...
true
df45e5ba932947b24e910efed2e2f10f44a8b566
SQL
lajixiaowang/JD_1905
/JD_project/db/wzm (1).sql
UTF-8
2,911
2.640625
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.6.4 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: 2019-07-12 01:18:16 -- 服务器版本: 5.7.14 -- PHP Version: 5.6.25 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
59c8e2c126ee6029f7b2dd601079024e2becd3b4
SQL
radtek/Telecommunication
/K7/DataBase/SCRIPTS_FROM_DB/CORP_MOBILE/VIEW/V_BILL_FOR_DILER_TEST.SQL
UTF-8
9,293
3.375
3
[]
no_license
CREATE OR REPLACE FORCE VIEW "CORP_MOBILE"."V_BILL_FOR_DILER_TEST" ("ACCOUNT_ID", "YEAR_MONTH", "PHONE_NUMBER", "BILL_SUM_ORIGIN", "BILL_SUM", "DISCOUNT_VALUE", "DILER_PAYMENT", "DILER_PAYMENT_FULL", "SUBSCRIBER_PAYMENT_NEW", "SUBSCRIBER_PAYMENT_OLD", "SUBSCRIBER_PAYMENT_ADD_OLD", "OPTION_COST_DILER", "OPTION_COST_D...
true
03d7bc00c09e0e4b6caef54e13b46a566281858b
SQL
dbflute-test/dbflute-test-active-hangar
/src/main/resources/org/docksidestage/hangar/dbflute/exbhv/MemberStatusBhv_selectDisplayMemberStatus.sql
UTF-8
188
2.765625
3
[ "Apache-2.0" ]
permissive
select memberStatus.MEMBER_STATUS_CODE , memberStatus.MEMBER_STATUS_NAME , memberStatus.DISPLAY_ORDER from MEMBER_STATUS memberStatus order by memberStatus.DISPLAY_ORDER asc
true
0537c45982996c71bb1232e6ef0a1d94a5dc1a84
SQL
kls551/365
/lab4/BAKERY-info.sql
UTF-8
1,115
3.921875
4
[]
no_license
-- Q1 SELECT Flavor, Food, Price from goods where Flavor='Chocolate' order by Price DESC; -- Q2 SELECT g.Flavor, g.Food, g.Price from goods g where (g.Price > 1.1 and g.Food='Cookie') or g.Flavor='Lemon' or (g.Flavor='Apple' and g.Food<>'Pie') order by g.Flavor, g.Food; -- Q3 SELECT distinct c.FirstName, c.LastName f...
true
c8c3b0f4589400be1844757ac5660118ce482409
SQL
codebase-berkeley/judging-portal
/db/heroku.sql
UTF-8
576
2.890625
3
[]
no_license
DROP TABLE scores; DROP TABLE judges; DROP TABLE projects; DROP TABLE apis; CREATE TABLE judges ( judgeId SERIAL PRIMARY KEY, name VARCHAR(254), API VARCHAR(254) ); CREATE TABLE projects ( projectId SERIAL PRIMARY KEY, name VARCHAR(254), github VARCHAR(254), categories VARCHAR(254)[], tableName VARCHA...
true
4492c24f602b28ef4bb1b970c0a5e273017c6abf
SQL
aybee9/uci_homework_ah
/07-SQL-Challenge/EmployeeSQL/sql-challenge-queries.sql
UTF-8
2,236
4.625
5
[]
no_license
-- 1 -- List the following details of each employee: -- employee number, last name, first name, sex, and salary. SELECT e.emp_no, e.last_name, e.first_name, s.salary FROM employees e INNER JOIN salaries s ON e.emp_no = s.emp_no -- 2 -- List first name, last name, and hire date for employees who were hired in 1986. SEL...
true
50b4941ce5e87a45372edc5dbed00f7c0fec0ef7
SQL
rainasmoon/online-application
/online-mgc/src/main/resources/db/hsqldb/initDB.sql
UTF-8
1,435
3.75
4
[]
no_license
DROP TABLE users IF EXISTS; DROP TABLE packages IF EXISTS; DROP TABLE package_details IF EXISTS; CREATE TABLE users ( id INTEGER IDENTITY PRIMARY KEY, user_name VARCHAR(100), password VARCHAR(100), user_role VARCHAR(50), fail_times INTEGER, is_locked BOOLEAN, created_date TIMESTAMP, updated_date ...
true
a83ffbd7cff2a7c12d6fb5e0d37c3c0a16e0afcd
SQL
IsabelKt/bamazon
/bamazon.sql
UTF-8
1,813
3.1875
3
[]
no_license
CREATE DATABASE bamazon; USE bamazon; CREATE TABLE products( id INT AUTO_INCREMENT NOT NULL, product_name VARCHAR(150) NOT NULL, department_name VARCHAR(75) NOT NULL, year SMALLINT NOT NULL, price DECIMAL(8,2) NOT NULL, stock_quantity INTEGER NOT NULL, PRIMARY KEY(id...
true
4996d5b96734afd8b6669bf82ab6a45ab1e682ea
SQL
slayerfat/sistemaJAG
/scriptBD/modeloTentativo/originales/curso.sql
UTF-8
3,278
3.3125
3
[]
no_license
CREATE TABLE curso ( codigo tinyint(3) unsigned primary key, grado tinyint(3) unsigned NOT NULL, seccion tinyint(3) unsigned NOT NULL, descripcion varchar(50) NOT NULL, status tinyint(1) unsigned not null default 1, cod_usr_reg int unsigned not null, fec_reg timestamp not null default current_timestamp, ...
true
98eda8d9e44b7d81d077f33efcadbfb02afc3c51
SQL
ltnscp9028/approvalDocument
/prisma/migrations/20210311114341_/migration.sql
UTF-8
1,410
4
4
[]
no_license
-- CreateEnum CREATE TYPE "ApprovalStatus" AS ENUM ('DOING', 'APPROVAL', 'REJECT'); -- CreateTable CREATE TABLE "user" ( "user_id" SERIAL NOT NULL, "email" TEXT NOT NULL, "name" TEXT NOT NULL, PRIMARY KEY ("user_id") ); -- CreateTable CREATE TABLE "document" ( "document_id" SERIAL NOT NULL, "...
true
41c5bf78c51d8bb276afc8b44545cf4ac6e98612
SQL
thienphanexcalibur/employee-management-php
/user.sql
UTF-8
2,188
3.109375
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.8.0 -- https://www.phpmyadmin.net/ -- -- Host: localhost -- Generation Time: Jun 13, 2018 at 04:53 PM -- Server version: 10.1.31-MariaDB -- PHP Version: 7.2.4 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD...
true
3ba2563195780d54332e3c8d98d18177ba45e3a0
SQL
jmullan/mt-daapd-sqlite3-m3u-maker
/sql_to_playlist/added_this_month.sql
UTF-8
344
3.625
4
[]
no_license
SELECT path FROM songs INNER JOIN ( SELECT DISTINCT artist, album FROM songs WHERE time_added > strftime("%s", DATETIME("now", "-1 months")) ) AS added ON songs.artist = added.artist AND songs.album = added.album ORDER BY songs.artist, songs.year, songs....
true
02d82325266cdc2177f8b49a88deba922bbf6b39
SQL
qxev/cv2
/db/summarycommission.sql
UTF-8
2,222
3.53125
4
[]
no_license
DROP TABLE IF EXISTS `cv2`.`summarycommission`; CREATE TABLE `cv2`.`summarycommission` ( `id` int(11) NOT NULL auto_increment, `advertiserId` int(11) default 0, `advertiserName` varchar(255) default NULL, `campaignId` int(11) default 0, `campaignName` varchar(255) default NULL, `affiliateId` int(11) defaul...
true
49bc704014403cb07a0f009b62eb0775943af801
SQL
LeonXZhou/LightBnB
/1_queries/most_visited_cities.sql
UTF-8
191
3.8125
4
[]
no_license
SELECT city, count(reservations.id) AS total_reservations FROM properties INNER JOIN reservations ON reservations.property_id = properties.id GROUP BY city ORDER BY total_reservations DESC;
true
947fc8c8c255de102d764290820282cf1055c10a
SQL
mdutt247/student-sql-plsql
/TMV ORACLE Practical Paper Solution by Nikhil/Basic/balancecut.sql
UTF-8
1,143
3.28125
3
[]
no_license
/* * This program debits the Account * of the Users whose balance is lower * than the set low balance rate. */ SET SERVEROUTPUT ON; SET VERIFY OFF; Declare mCur_Bal Number (10,2); Acct_No1 varchar2 (7); Fine number(3) := 100; Min_Bal constant number (7,2) := 3000.00; latest_bal number(10,2); Begin Acct_...
true
88ca5094b733d0ac920e1f11fc8f25e5e23b1c4f
SQL
beomyeongpark/sql
/20200702.sql
UTF-8
5,226
4.3125
4
[]
no_license
GROUP BY 함수 특징 1. NULL은 그룹함수 연산에서 제외가 된다 부서번호별 사원의 sal,comm 칼럼의 총 합을 구하기 SELECT deptno, SUM(sal + comm), SUM(sal + NVL(comm,0)), SUM(sal) + SUM(comm) FROM emp GROUP BY deptno; NULL 처리의 효율 SELECT deptno, SUM(sal + comm), SUM(sal) + SUM(comm), SUM(sal) + NVL(SUM(comm),0), SUM(sal) + SUM(NVL(comm,0)) FROM emp GROUP BY...
true
9cf75b38b353ed0f4b98c1b4d969be44fd23d3b7
SQL
MichaelWakahe/SQL
/PostgreSQL/PostgreSQL Tutorial/SQL Tutorials/Section 3 - Joining Multiple Tables/cross_join.sql
UTF-8
888
4.40625
4
[ "MIT" ]
permissive
--====================== -- PostgreSQL CROSS JOIN --====================== -- A CROSS JOIN clause allows you to produce a Cartesian Product of rows in two or more tables. -- Different from other join clauses such as LEFT JOIN or INNER JOIN, the CROSS JOIN clause does not have a join -- predicate. -- The following ill...
true
7dbea326da39d4c1650a5c60cff7f033b0f47fa0
SQL
cintiaxdiaz/Amarte
/dump.sql
UTF-8
8,913
2.890625
3
[ "MIT" ]
permissive
-- phpMyAdmin SQL Dump -- version 5.1.0 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Sep 21, 2021 at 01:42 AM -- Server version: 10.4.18-MariaDB -- PHP Version: 7.4.16 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIE...
true
c3e72dc251c62f1681437bb076125effa321e739
SQL
santiago-m/Apuntes
/Base de Datos/Ejercicios/SQL Practica 3/script/ejercicio3MySql.sql
UTF-8
1,814
3.546875
4
[]
no_license
CREATE DATABASE IF NOT EXISTS ejercicio3anio2017; USE ejercicio3anio2017; DROP TABLE IF EXISTS `alumno`; CREATE TABLE `alumno` ( `nro_alumno` int(11) NOT NULL, `dni` int(11) NOT NULL, `nombre` VARCHAR(45) NOT NULL, `apellido` VARCHAR(45) NOT NULL, `sexo` VARCHAR(20) NOT NULL, PRIMARY KEY ...
true
84a71d761879e1d9515c6c0efa7a3020adf0d02a
SQL
hiphp7/boss
/docs/sql/32_express.sql
UTF-8
843
3.234375
3
[]
no_license
/* 快递公司表 */ SET FOREIGN_KEY_CHECKS=0; -- ---------------------------- -- Table structure for express -- ---------------------------- DROP TABLE IF EXISTS `express`; CREATE TABLE `express` ( `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '序号', `exp_name` varchar(100) DEFAULT NULL COMMENT '快递名称', `exp_code` varchar...
true