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
1ff6e0c9356925996bfc178a397dd40a43f496d0
SQL
lhale/MeanGreenSoftware
/pnuke/includes/v4blib/extra/openstar_indexes.sql
UTF-8
3,855
2.5625
3
[]
no_license
-- -- This file supplements the regular table structure which -- results from the build of the OpenStar system. -- -- -- Taken from -- http://centre.ics.uci.edu/~grape/modules.php?op=modload&name=Wiki&file=index&pagename=Performance%20Tips -- ALTER TABLE os_core_comments ADD INDEX idx_pid (pn_pid); ALTER TABLE os_c...
true
171a3a4cb9ea782fa67aa1307a399d2376942328
SQL
ANSEduGroup/6th-sem-labs
/DBMS/Assignment8/program11_1.sql
UTF-8
307
2.6875
3
[ "MIT" ]
permissive
CREATE OR REPLACE FUNCTION totalRecords RETURN number IS total number(2) := 0; BEGIN SELECT count(*) into total FROM emp_sal_it_006; RETURN total; END; / DECLARE c number(2); BEGIN c := totalRecords(); dbms_output.put_line('Total no. of Employees: ' || c); END; /
true
53ed9f956ed15736bb2495cea02783f82425aaa6
SQL
Oscajunq/HandsON
/HandsON_Oracle/DBA/VER_BLOQUEIO_OBJ.SQL
UTF-8
2,376
3.421875
3
[]
no_license
-- -- ver detalhamento dos sql que estao sendo executado no momento -- -- scripts criado em 10/01/2008 -- DBA: Osmar -- -- SELECT lk.SID, se.username, se.osuser, se.machine, DECODE (lk.TYPE, 'TX', 'Transaction', 'TM', 'DML', 'UL', 'PL/SQL User Lock', lk...
true
9fd8966e491f7f7a82c6fc7de23929757ca5daf4
SQL
KAY53N/WYmanage
/databases/kadmin.sql
UTF-8
9,179
2.828125
3
[ "BSD-3-Clause" ]
permissive
-- phpMyAdmin SQL Dump -- version 4.1.14 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: 2015-07-24 09:06:28 -- 服务器版本: 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
8b3a5433ae3cff1abad5367582e1d82b255fb64c
SQL
PiastkaR/PersistanceTraining
/jpa-training/src/main/resources/data.sql
UTF-8
3,165
2.921875
3
[]
no_license
INSERT INTO person_jpa (id, name, location, birth_date) VALUES (10001, 'Rafal', 'Warsaw', sysdate()); INSERT INTO person_jpa (id, name, location, birth_date) VALUES (10002, 'James', 'NYC', sysdate()); INSERT INTO person_jpa (id, name, location, birth_date) VALUES (10003, 'Peter', 'Amsterdam', sysdate()); --------------...
true
989161c9622021517bdcc01b89b9dcb0e7cbf0da
SQL
liaof/12-u-vote-it
/db/schema.sql
UTF-8
2,270
4.03125
4
[]
no_license
/* to use, type 'source db/schema.sql' in the sql cmd prmpt*/ /* db.sql -> schema.sql -> seeds.sql*/ /*if 'candidates' and 'partie's exist, delete 'candidates' and 'parties' Ensures we start with a clean slate each time this file is run*/ DROP TABLE IF EXISTS votes; DROP TABLE IF EXISTS candidates; DROP TABLE IF EXI...
true
06c5af73a6cf9ea8b5a16ba97a2289f07180020d
SQL
yellowrangler/solorte
/sql/mysqldumpmymeddemo.sql
UTF-8
205,753
2.765625
3
[]
no_license
## MySQL dump 8.23 ## ## Host: localhost Database: ClientInfoDemoDB ########################################################- ## Server version 3.23.58-log ## ## Table structure for table `AccessLogTBL` ## DROP TABLE IF EXISTS AccessLogTBL; CREATE TABLE AccessLogTBL ( DateTimeStamp datetime NOT NULL default '000...
true
f0e27849c880d72f6057975b789076498aca2dca
SQL
zxcseraph/-
/分区表新/分区表5.0--未打包一键/add_par_for_tab.sql
UTF-8
832
2.8125
3
[]
no_license
drop procedure add_par_for_tab; create procedure add_par_for_tab() DEFINE sql_err INTEGER; DEFINE isam_err INTEGER; DEFINE err_txt varchar(200); define v_tabname varchar(50); define v_fragment_type char(1); define v_procname varchar(50); set debug file to '/tmp/add_par_...
true
a7266b390967e43d11f7579b3420f71b1254087f
SQL
litkhai/tpcds-oracle
/queries/query56.sql
UTF-8
1,695
3.421875
3
[]
no_license
/* **** 56 */ with ss as ( select i_item_id,sum(ss_ext_sales_price) total_sales from store_sales, date_dim, customer_address, item where i_item_id in (select i_item_id from item where i_color in ('powder','green','cyan')) and ss_item_sk = i_item_sk and ss_sold_date_sk = ...
true
39aa72057389c6ecea197bb698e2db9a4c6929d2
SQL
Domi305/ecommerce
/backend/src/main/resources/db/migration/V4__add_missing_columns_to_product_table.sql
UTF-8
420
3.265625
3
[]
no_license
ALTER TABLE products ADD COLUMN IF NOT EXISTS type VARCHAR(63) NOT NULL; ALTER TABLE products ADD COLUMN IF NOT EXISTS author BIGINT NOT NULL; ALTER TABLE products ADD COLUMN IF NOT EXISTS category BIGINT NOT NULL; ALTER TABLE products ADD CONSTRAINT FK_AUTHOR FOREIGN KEY (author) REFERENCES authors(id); ALTER TABLE p...
true
f7ad24c998fc6ec574d5a8c54513f4375a081ae0
SQL
acuestarosas/CodeCode
/codeigniter.sql
UTF-8
3,606
2.984375
3
[ "LicenseRef-scancode-unknown-license-reference", "MIT" ]
permissive
-- phpMyAdmin SQL Dump -- version 4.6.5.2 -- https://www.phpmyadmin.net/ -- -- Servidor: 127.0.0.1 -- Tiempo de generación: 28-11-2017 a las 02:39:03 -- Versión del servidor: 10.1.21-MariaDB -- Versión de PHP: 5.6.30 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CL...
true
d9f70e1049688db690493bd57b4a9a75b92a838b
SQL
torilife/torilife
/data/sql/setup/note_comment.sql
UTF-8
522
3.578125
4
[]
no_license
CREATE TABLE `note_comment` ( `id` int(11) NOT NULL AUTO_INCREMENT, `note_id` int(11) NOT NULL, `member_id` int(11) DEFAULT NULL, `body` text NOT NULL, `created_at` datetime NOT NULL, `updated_at` datetime NOT NULL, PRIMARY KEY (`id`), KEY `note_id_created_at` (`note_id`,`created_at`), KEY `note_id_id...
true
e58ff7e2f283ec0561d390752718d0300d4e8ef8
SQL
iscoct-universidad/DDSI
/Ignacio/sql/cursor.sql
UTF-8
893
3.65625
4
[]
no_license
/* Cursor de producción - Ignacio Barragán Lozano */ -- Listado de productos enviados a un distribuidor y su familia -- DELIMITER $$ CREATE PROCEDURE cursorEnviados (INOUT listaEnviados varchar(4000)) BEGIN DECLARE NombreProducto VARCHAR(20); DECLARE FamiliaProducto VARCHAR(20); DECLARE fin INTEGER...
true
4ed9d85c043b5e486b8f3971267bb0fd06d84331
SQL
jocrau/contagged
/ext_tables.sql
UTF-8
2,309
2.921875
3
[]
no_license
# # Table structure for table 'tx_contagged_terms' # CREATE TABLE tx_contagged_terms ( uid int(11) NOT NULL auto_increment, pid int(11) DEFAULT '0' NOT NULL, tstamp int(11) DEFAULT '0' NOT NULL, crdate int(11) DEFAULT '0' NOT NULL, cruser_id int(11) DEFAULT '0' NOT NULL, t3ver_oid int(11) DEFAULT '0' NOT NULL, t...
true
cdb6c3bb1b18bcace7e789d79b344f115fd573c3
SQL
kerrykato/SQL-Scripts
/Fix Sequences Numbers from Restored DB.sql
UTF-8
1,833
3.453125
3
[]
no_license
begin tran --|for comparison after the update select mt.MTCode, mst.Code, msi.ManifestSequenceItemId, msi.ManifestSequenceTemplateId, msi.AccountPubid, msi.Sequence, tmp.Sequence as [Recovered Seq] into #sequences from scManifestTemplates mt join scManifestSequenceTemplates mst on mt.ManifestTemplateId = mst.Manifes...
true
8763b94ba46dd75291a3888d3fcd46ab6bf64671
SQL
meme-es/sql-zoo
/2.0 SELECT from World.sql
UTF-8
2,402
4.34375
4
[]
no_license
-- 01 shows name, continent and population of all countries SELECT name, continent, population FROM world; -- 02 shows the name for the countries that have a population of at least 200 million SELECT name FROM world WHERE population >= 200000000; -- 03 gives the name and the per capita GDP for those countries with a ...
true
e95a3394cecadd40b46ab392363cf773312bbc1b
SQL
quockhanhtn/RemoteDockerContainer
/Database.sql
UTF-8
399
2.8125
3
[]
no_license
DROP SCHEMA IF EXISTS `container_db`; CREATE SCHEMA IF NOT EXISTS `container_db`; USE `container_db`; CREATE TABLE IF NOT EXISTS `USER` ( `PORT` INT AUTO_INCREMENT NOT NULL, `FULL_NAME` NVARCHAR(100) NOT NULL, `EMAIL` VARCHAR(40) NULL, `CONTAINER_NAME` VARCHAR(40) NULL, PRIMARY KEY(`PORT`) ) ENGINE=I...
true
9bd821ba46b38c29f1af979eb74cc6a74251e219
SQL
folio-org/mod-kb-ebsco-java
/src/main/resources/templates/db_scripts/create-transaction-ids-table.sql
UTF-8
281
2.640625
3
[ "Apache-2.0" ]
permissive
ALTER TABLE transaction_ids DROP COLUMN IF EXISTS jsonb, DROP CONSTRAINT IF EXISTS transaction_ids_pkey, DROP COLUMN IF EXISTS id, ADD COLUMN IF NOT EXISTS transaction_id VARCHAR(50), ADD COLUMN IF NOT EXISTS created_at TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT CURRENT_TIMESTAMP;
true
48ec7d29e91721d058a4c6594df8b687b42315c8
SQL
ndchaps/CHAPS
/Queries for Measures/Procedures for Insertion/Create_SP_Insert_Sire_Profile.sql
UTF-8
4,159
3.671875
4
[]
no_license
DELIMITER // DROP PROCEDURE IF EXISTS Insert_NewSireProfileInfo // CREATE PROCEDURE Insert_NewSireProfileInfo(input_herd_id varchar(16),input_sire_id varchar(20),input_calf_id_at_birth varchar(2),input_birth_date date,input_breed VARCHAR(16), input_reg_num VARCHAR(30),input_reg_name VARCHAR(30),input_elec_id VARCHAR...
true
30b10281c6dbb3e85ec41e904d488d0a45d4a24c
SQL
kunaksergey/SpringRemoteWork
/src/main/resources/schema.sql
UTF-8
260
2.96875
3
[]
no_license
DROP TABLE IF EXISTS CONTACT; CREATE TABLE CONTACT( ID INT NOT NULL AUTO_INCREMENT ,FIRST_NAME VARCHAR(60) NOT NULL ,LAST_NAME VARCHAR(40) NOT NULL ,BIRTH_DATE DATE ,VERSION INT NOT NULL DEFAULT 0 ,UNIQUE UQ_CONTACT_1(FIRST_NAME,LAST_NAME) ,PRIMARY KEY (ID) );
true
515892298b66440479f7420d56f282ce32ce81ab
SQL
pporche87/mysql
/data_types/timestamps.sql
UTF-8
602
3.203125
3
[ "MIT" ]
permissive
-- CREATE TABLE comments ( -- content VARCHAR(100), -- created_at TIMESTAMP DEFAULT NOW() -- ); -- INSERT INTO comments (content) -- VALUES('lol what a funny article'); -- -- INSERT INTO comments (content) -- VALUES('i found this offensive'); CREATE TABLE comments2 ( content VARCHAR(100), changed_at TIMESTAMP DEF...
true
a1b9a01dee54a1285c53d372725a7b87083266c3
SQL
bertmclin/Personal-Project-5
/db/display_bikes.sql
UTF-8
258
2.96875
3
[]
no_license
select users.user_id, users.username, users.city, users.state, bikes.bike_id, bikes.title, bikes.description, bikes.make, bikes.model, bikes.bike_size, bikes.bike_type, bikes.wheel_size, bikes.image_url from bikes join users on users.user_id = bikes.user_id;
true
0ad054f759eefd5a9a28836de42d39547ae8ef6c
SQL
suraj95/SQL-Practice
/SQL-Practice-Problems.sql
UTF-8
16,118
4.34375
4
[]
no_license
# Introductory Problems # 1. Which shippers do we have? SELECT * FROM shippers; # 2. Certain fields from Categories (Table does not exist, change categories to Inventory_transactions) SELECT id, type_name FROM Inventory_transaction_types; # 3. We’d like to see just the FirstName, LastName, and HireDate of all th...
true
c9f0bb49b85c8c29392a2c798529a855205be65b
SQL
mattsalo81/adaptive_infrastructure
/SQL_configs/pcd_rev.sql
UTF-8
320
2.859375
3
[]
no_license
create table pcd_rev( PCD varchar2 (16), ACTIVE varchar2 (3) check (ACTIVE in ('CUR', 'OLD')), REV varchar2 (16), DATE_ALIGNED DATE default sysdate, constraint pcd_rev_pk PRIMARY KEY (PCD, REV) ); insert into pcd_rev (pcd, active, rev) values ('EXCEPTION_TEST', 'CUR', '1.0');
true
4c3ae75af0b221a3a9596cbd4a5fa3ad481565c3
SQL
ParadeTo/ayoulovenl
/server/tools/ayoulovenl.sql
UTF-8
5,380
2.8125
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.7.0 -- https://www.phpmyadmin.net/ -- -- Host: localhost -- Generation Time: 2018-07-31 03:25:50 -- 服务器版本: 5.7.18 -- PHP Version: 5.6.30 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=...
true
1a33b54bed70921bb8de30241b160ad7c126d876
SQL
Rheola/go-trip-calc
/db/init.sql
UTF-8
349
2.5625
3
[]
no_license
CREATE DATABASE tripdb WITH ENCODING = 'UTF8' LC_COLLATE = 'en_US.utf8' LC_CTYPE = 'en_US.utf8'; \c tripdb; create table rates ( id bigserial primary key, from_point point, to_point point, status smallint, distance int8, duration int8, created_at timestamp...
true
a2f7a3fda0a4ceb4effc54b625a354b025033724
SQL
XoopsModules25x/tad_evaluation
/sql/mysql.sql
UTF-8
1,909
3.203125
3
[]
no_license
CREATE TABLE `tad_evaluation` ( `evaluation_sn` smallint(6) unsigned NOT NULL auto_increment COMMENT '評鑑編號', `evaluation_title` varchar(255) NOT NULL default '' COMMENT '評鑑名稱', `evaluation_description` text NOT NULL COMMENT '評鑑說明', `evaluation_enable` enum('1','0') NOT NULL COMMENT '是否啟用', `evaluation_uid` me...
true
a4e489a811789270659823118ec88d3e2ab62b5b
SQL
shitalphadtare/Client
/SEALINKERES/HANA/QUERY_REPORTS/SALES/SALES_GROSS_PROFIT_REPORT/SALES GROSS PROFIT REPORT.sql
UTF-8
1,526
3.3125
3
[]
no_license
CREATE VIEW SALES_GROSS_PROFIT_REPORT AS ((SELECT DISTINCT T0."TaxDate" AS "Posted", CASE WHEN T0."ObjType" = 13 THEN 'Invoice' WHEN T0."ObjType" = 14 THEN 'CrMemo' ELSE 'Error' END AS "Inv/CM", T0."DocEntry", T0."DocNum" AS "Num", T0."CardCode" AS "Cust Code", T0."CardName" AS "Custo...
true
3d094688221a33f708278cfd5ecf866c2e4cf92c
SQL
adytyakha/PROJEK-SIMBK-APRIL-2019
/id9653960_simbkup.sql
UTF-8
8,902
2.9375
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.8.5 -- https://www.phpmyadmin.net/ -- -- Host: localhost:3306 -- Waktu pembuatan: 29 Jun 2019 pada 06.15 -- Versi server: 10.3.14-MariaDB -- Versi PHP: 7.3.2 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_...
true
6691fa7ff63beac7b4ca0a005621b48f5842cd91
SQL
mgarmashov/words3000
/_sql/words_w_yandex.sql
UTF-8
359,531
2.96875
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.8.2 -- https://www.phpmyadmin.net/ -- -- Host: localhost -- Generation Time: Jul 22, 2018 at 07:16 AM -- Server version: 5.7.19 -- PHP Version: 7.1.14 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACT...
true
c761baaadb6e8de8d839ea7664328ced8e7b76d4
SQL
Jakezo/SpringFolder
/FinalProject/src/main/webapp/WEB-INF/views/db/Board.sql
UTF-8
284
2.875
3
[]
no_license
DROP TABLE BOARD; CREATE TABLE BOARD ( BIDX NUMBER PRIMARY KEY, BWRITER VARCHAR2(20) NOT NULL, BTITLE VARCHAR2(100) NOT NULL, BCONTENT VARCHAR2(2000), BDATE DATE ); DROP SEQUENCE BOARD_SEQ; CREATE SEQUENCE BOARD_SEQ START WITH 1000 INCREMENT BY 1 MAXVALUE 9999 NOCYCLE NOCACHE;
true
979b4df966beaf30de8f2ded07b45a9baad52f07
SQL
MohamedMamdouh18/CS50x-Introduction-to-computer-science-
/Pset7/Movies/10.sql
UTF-8
208
3.390625
3
[]
no_license
SELECT distinct(people.name) FROM people join directors on directors.person_id = people.id join movies on directors.movie_id = movies.id join ratings on ratings.movie_id = movies.id where rating >= 9.0 ;
true
64226073c2e8ba76cc93c79faebe424a1b8f24b6
SQL
gideonkosgei/work-report-scripts
/ADGG/Harisson/HN-FARM-LIST.sql
UTF-8
1,770
3.71875
4
[]
no_license
SELECT `core_country`.`code` `country_code`, `core_country`.`name` AS `country_name`, `region`.`code` AS `region_code`, `region`.`name` AS `region_name`, `district`.`code` AS `zone_code`, `district`.`name` AS `zone_name`, `ward`.`code` AS `ward_code`, `ward`.`name` AS `ward_name`, `village`.`code` AS `vill...
true
3cde113ed05580942df63e77f59d295572120362
SQL
jpapadim/BootCampTeamProjectAP
/project/DataBase/air_parking (structure).sql
UTF-8
8,199
3.234375
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.5.4.1deb2ubuntu2 -- http://www.phpmyadmin.net -- -- Host: localhost -- Generation Time: Sep 16, 2017 at 10:26 AM -- Server version: 5.7.18-0ubuntu0.16.04.1 -- PHP Version: 7.0.18-0ubuntu0.16.04.1 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_C...
true
7a5f9433f0acd65ef630e525ca425beac0ea00f6
SQL
nisshii0313/practiceSQL
/SELECT_within_SELECT_Tutorial/4_2.sql
UTF-8
227
3.484375
3
[]
no_license
/*Show the countries in Europe with a per capita GDP greater than 'United Kingdom'.*/ SELECT name FROM world WHERE continent = 'Europe' AND gdp/population > (SELECT gdp/population FROM world WHERE name = 'United Kingdom')
true
8938954ee25179a6b44c55c74c975b46a7dbdb4f
SQL
MaligneCanyon/dba
/lesson1/expense_project/expense_db.sql
UTF-8
2,455
3.28125
3
[]
no_license
-- -- PostgreSQL database dump -- -- Dumped from database version 9.5.17 -- Dumped by pg_dump version 9.5.17 SET statement_timeout = 0; SET lock_timeout = 0; SET client_encoding = 'UTF8'; SET standard_conforming_strings = on; SELECT pg_catalog.set_config('search_path', '', false); SET check_function_bodies = false; S...
true
a24da4fc53343ee758d8be56cdf62468bdfc3b9f
SQL
firetom5900/at-work
/SQL/^^ Monitor.02. Active Transactions.sql
UTF-8
1,297
2.828125
3
[]
no_license
select transaction_id, name, transaction_begin_time ,case transaction_type when 1 then '1 = Read/write transaction' when 2 then '2 = Read-only transaction' when 3 then '3 = System transaction' when 4 then '4 = Distributed transaction' end as transaction_type ,case transaction_state when 0 then '...
true
a403042ed872643017376978b89594f57bc6f345
SQL
Hiaggo/cs50
/Harry Potter/9.sql
UTF-8
145
3.46875
3
[]
no_license
select name from people P join stars S on P.id = S.person_id JOIN movies M on S.movie_id = M.id where M.year = 2004 group by name order by birth;
true
b5ec774ef56f5035b340c19f687c8eb8931f1c66
SQL
McMayday/aiogram
/create_db.sql
UTF-8
811
3.890625
4
[]
no_license
create table instagram ( username text, created_at date, updated_at date, in_blacklist boolean, user_count integer, id serial primary key ); alter table instagram owner to postgres; create table usernames ( id serial primary key, username text, chat_id text, users_id i...
true
723bff486814533599bf77d10d58b8da254f672f
SQL
EBS-IT-GIT/REPOSITORIO_MYDASHBOARD
/public/006_-_SAE_Excluir_Registro_Documentos.sql
UTF-8
9,438
3.84375
4
[]
no_license
/*-------------------------------------------------------------------------------- ------------- -- Entregavel neste script • 1 (um) Script para excluir os documentos com título repetido e arquivos do tipo PDF. ----------------------------------------------------------------------------------------------*/ set ser...
true
82abf69a3e2fa6f88d9a8a51755028521b40b9c0
SQL
OvidiuEDSgrup/TET
/SCRIPT/120605/termenecontr.sql
UTF-8
1,199
3.765625
4
[]
no_license
select * from pozcon where tert='0212679091913' and tip='bf' select * from termene select distinct tip from pozcon TRUNCATE TABLE termene insert termene SELECT --*, p.subunitate --Subunitate char no 9 ,p.tip --Tip char no 2 ,p.Contract --Contract char no 20 ,p.Tert --Tert char no 13 ,p.Cod --Cod char no 20 ,p.Data --D...
true
db31eadb432cf0b1d92f7d36811d33eca8b05e38
SQL
PriyankaBiswas/Data-Science
/Unit1_DS_investigations/L2_SQL/SQL1_drill.sql
UTF-8
549
3.9375
4
[]
no_license
-- Drills from SELECT, FROM, WHERE --Drill1: The ID's and durations for all trips of duration greater than 500, --ordered by duration. SELECT trip_id, duration FROM trips WHERE duration > 500 -- 165545 rows returned -- Drill2: Every column of the stations table for station id 84. SELECT * FROM stations ...
true
7fa3bde5ff345b001c3677daadae6e2892689c75
SQL
0x1d/bandman
/modules/core/db/init/hsql/10.create-db.sql
UTF-8
3,270
3.359375
3
[]
no_license
-- begin BANDMAN_INVENTORY create table BANDMAN_INVENTORY ( ID varchar(36) not null, CREATE_TS timestamp, CREATED_BY varchar(50), VERSION integer, UPDATE_TS timestamp, UPDATED_BY varchar(50), DELETE_TS timestamp, DELETED_BY varchar(50), -- NAME varchar(255) not null, -- p...
true
2d12df96e307de74cb37c217d0407f7e3bb076b0
SQL
lilililidada/Spending-Bill
/sql/hutubill.sql
UTF-8
7,627
2.75
3
[]
no_license
-- MySQL dump 10.13 Distrib 8.0.16, for Win64 (x86_64) -- -- Host: localhost Database: test -- ------------------------------------------------------ -- Server version 8.0.16 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!401...
true
b19a201b550b4ed429c791a2a8698f639d2d2396
SQL
LDAforVisProject/VKPSA
/dbConstruction.sql
UTF-8
2,821
3.890625
4
[ "MIT" ]
permissive
-- -- File generated with SQLiteStudio v3.0.6 on Mi Okt 28 13:40:59 2015 -- -- Text encoding used: windows-1252 -- PRAGMA foreign_keys = off; BEGIN TRANSACTION; -- Table: ldaConfigurations CREATE TABLE ldaConfigurations (ldaConfigurationID INTEGER PRIMARY KEY AUTOINCREMENT, alpha DOUBLE, kappa INTEGER, eta DOUBLE, UNI...
true
feaa229332949e0f5bb461a928be95418bf120ea
SQL
alphaMarDiallo/1_VLG18
/02-back/01_SQL/EXERCICE 2.sql
UTF-8
7,941
4.09375
4
[]
no_license
1 -- Exercice 2: Depuis votre terminal shell vous créé une base de donnée nommée "hotel". CREATE DATABASE hotel; 2 -- Le modèle des tables est le suivants: 1 MariaDB [hotel]> CREATE TABLE chambres(id INT(3) PRIMARY KEY AUTO_INCREMENT NOT NULL, num_chambre INT(3), prix FLOAT, nb_lit INT, nb_pers INT(3), confort V...
true
6440f746e2db8f4fb0b526f651a3c5c02c9d2646
SQL
alibaba/canal
/parse/src/test/resources/ddl/alter/test_19.sql
UTF-8
1,037
2.578125
3
[ "Apache-2.0" ]
permissive
CREATE TABLE `tb_gbdjlupmhj` ( `col_zciuwofqxv` float(151,15) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; CREATE TABLE `tb_yubjqntjhv` LIKE `tb_gbdjlupmhj`; RENAME TABLE `tb_yubjqntjhv` TO `tb_obmtwwzsar`, `tb_gbdjlupmhj` TO `tb_acbpixrigq`; RENAME TABLE `tb_obmtwwzsar` TO `tb_hefguylckk`, `tb_acbpixrigq` TO `tb_nfcvlzwedu...
true
31d939d6bb84fc43dbbcca1254a5c7cd6f4b98f3
SQL
cmgscott/classwork-traveldb
/traveldb.sql
WINDOWS-1252
42,861
3.984375
4
[]
no_license
CREATE DATABASE traveldb; USE [traveldb]; CREATE TABLE Continent ( ContinentName VARCHAR(30) NOT NULL, CONSTRAINT ContinentPK PRIMARY KEY (ContinentName) ); CREATE TABLE Country ( CountryName VARCHAR(75) NOT NULL, ContinentName VARCHAR(30) NOT NULL, CONST...
true
dba9465bc0cb31f5b1b4068d82e395725a3587f8
SQL
Hajaniaina07/TrainerV3
/base/trainerV1.sql
UTF-8
5,110
3.640625
4
[ "LicenseRef-scancode-unknown-license-reference", "MIT" ]
permissive
/*==============================================================*/ /* Nom de SGBD : MySQL 5.0 */ /* Date de création : 06/05/2019 05:43:23 */ /*==============================================================*/ drop table if exists ACCES; drop table if exists ...
true
823da4d1e6fd48bdf182b52c065c910af3c13e41
SQL
chazhenricks/music-sql
/music-history.sql
UTF-8
3,808
4.84375
5
[]
no_license
select * from Genre; select * from Artist; select * from Album; select * from Song; --Query all the enteries in the Genre Table select g.Label, g.GenreId from Genre g; --Using the INSERT statement, add one of your favorite artist to the Artist table. insert into Artist values(null, "The Rolling Stones", 1963); ...
true
ef4459b9831d71623774a42981d51819f1801b8e
SQL
wangjcStrive/SQL-Server
/exer8.sql
UTF-8
675
4
4
[]
no_license
-- solution 1. not correct. 这样选出来的是所有同时都选了3门课的同学 select s.SId, s.Sname from Student s inner join (select SId from SC where CId = 01) t1 on s.SId = t1.SId inner join (select SId from SC where CId = 02) t2 on s.SId = t2.SId inner join (select SId from SC where CId = 03) t3 on s.SId = t3.SId -- 从SC选出01同学所有的课(共3门课) -> 得...
true
274a146fb5fea32f21bc478554fc0ef4b8773f5e
SQL
GeoNet/fits
/etc/ddl/user-permissions.ddl
UTF-8
316
2.609375
3
[ "Apache-2.0" ]
permissive
GRANT CONNECT ON DATABASE fits TO fits_w; GRANT USAGE ON SCHEMA fits TO fits_w; GRANT ALL ON ALL TABLES IN SCHEMA fits TO fits_w; GRANT ALL ON ALL SEQUENCES IN SCHEMA fits TO fits_w; GRANT CONNECT ON DATABASE fits TO fits_r; GRANT USAGE ON SCHEMA fits TO fits_r; GRANT SELECT ON ALL TABLES IN SCHEMA fits TO fits_r;
true
5e43240588d67bd90a2755bf5c903abbaa273f9a
SQL
shenzhim/blog
/blog/dbs/dbManager/script/mysql.sql
UTF-8
2,294
3.375
3
[]
no_license
DROP TABLE IF EXISTS `ids`; CREATE TABLE `ids` ( `IdName` varchar(16) NOT NULL DEFAULT '', `nowId` bigint(20) DEFAULT NULL, PRIMARY KEY (`IdName`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; Insert Into `ids` (`IdName`, `nowID`) values ('object',0); Insert Into `ids` (`IdName`, `nowID`) values ('sms',0); Insert Into `i...
true
5dad903830da1f72308c8a6afe576e2eed7dc01c
SQL
hdivine/chat-system
/chat.sql
UTF-8
2,444
3.140625
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 5.0.2 -- https://www.phpmyadmin.net/ -- -- Host: localhost -- Generation Time: May 20, 2020 at 02:37 PM -- Server version: 10.4.11-MariaDB -- PHP Version: 7.4.5 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIEN...
true
fba6987a1ab2f54a8cee80bf7c5f6f09327c7975
SQL
McxmCxmcX/MySQL
/sql/lwx.sql
UTF-8
633
3.21875
3
[]
no_license
DROP DATABASE IF EXISTS db_1702; CREATE DATABASE db_1702; DROP TABLE IF EXISTS db_1702.student; CREATE TABLE db_1702.student( id INT AUTO_INCREMENT PRIMARY KEY COMMENT 'ID PK', name VARCHAR(255) COMMENT '姓名', gender CHAR(2) COMMENT '性别', age INT COMMENT '年龄' ); SHOW FULL COLUMNS FROM db_1702.student; INSERT INTO db_170...
true
b7bf14695a8d904383ad02ede946d31d733cd835
SQL
Warthog710/Database-Management-Systems
/Assignment4/2_populate_db.sql
UTF-8
656
2.703125
3
[]
no_license
INSERT INTO COURSE VALUES (1, 'Database Design', 'CSC'); INSERT INTO SECTION VALUES (1, 4); INSERT INTO STUDENT VALUES ('123456789', 'John', 'Smith', 'Howe Ave', 'Sacramento', '12345', 'California'); INSERT INTO ENROLLS VALUES ('123456789', 4, 1); INSERT INTO EXAM VALUES (1, 4, 1); INSERT INTO ...
true
d0e5b09f4c4ba4393f5567f230c4d91a6cb87987
SQL
pythonsmallwhite/dbmon
/setup/oracle(在被监控库执行)/table.sql
UTF-8
3,265
3.078125
3
[]
no_license
------------------------------------------- -- Export file for user DBMON@ORCL -- -- Created by gmk on 2018/12/4, 11:28:57 -- ------------------------------------------- set define off spool table.log prompt prompt Creating table LOGMNR_CONTENTS prompt ============================== prompt create table LOGMNR_C...
true
5ac7b4d45cd28721779030aba202dfff33abe3ce
SQL
shostakmaksim/login_form
/db/service.sql
UTF-8
624,904
3.078125
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.6.5.2 -- https://www.phpmyadmin.net/ -- -- Хост: 127.0.0.1:3306 -- Время создания: Июл 17 2017 г., 19:36 -- Версия сервера: 5.5.53 -- Версия PHP: 5.6.29 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT ...
true
bfd416c9c7a6b36c086eec684427b920dacf92f9
SQL
iscas-ljc/leetcode-easy
/601-700/620.Not Boring Movies.sql
UTF-8
128
2.765625
3
[]
no_license
select id,movie,description,rating from cinema where id%2=1 and description!="boring" order by rating DESC #DESC表示降序
true
d32e104650f653e6363b21dc9cf8b2d8d2bde36e
SQL
chengqiangliu/benben-springboot
/benben-dao/src/test/resources/schema.sql
UTF-8
1,517
2.875
3
[]
no_license
CREATE TABLE `user_table` ( `id` int(11) NOT NULL AUTO_INCREMENT, `account_id` varchar(36) NOT NULL, `username` varchar(30) NOT NULL, `password` varchar(50) NOT NULL, `email` varchar(50), `group_no` int(5), `fail_login_count` int(1), `is_first_login` boolean, `last_logon_time` datetime, `logon_time`...
true
d39a48784363aa071b0571d53871968cc47c31c2
SQL
hugoliegeard/WF3-Guadeloupe
/06-Sql/06-Exercices.sql
UTF-8
1,416
4.0625
4
[]
no_license
# Afficher le service de l'employé 5. SELECT service FROM employes WHERE id_employes = 5 ; # Afficher la date d'embauche de : Melissa. SELECT date_embauche FROM employes WHERE prenom = 'Melissa' ; # Afficher le nombre de commerciaux. SELECT COUNT(*) AS nb_commerciaux FROM employes WHERE service = 'commercial' ; #...
true
ba414cd9e115004438d1bcd822e3725435a3fad6
SQL
juliazhigaryova/Migrations
/migrations/up/002_good.sql
UTF-8
432
2.90625
3
[]
no_license
CREATE TABLE `good` ( `id` INT(11) UNSIGNED NOT NULL auto_increment, `title` VARCHAR(150) NOT NULL, `weight` INT(3) NOT NULL, `price` INT(11) NOT NULL, PRIMARY KEY (id) ) ENGINE = innodb AUTO_INCREMENT = 1 CHARACTER SET utf8 COLLATE utf8_general_ci; -- Вставка товаров -- INSERT into `good` (`title...
true
282dcd048f8c5afb7fbd94a35717430b145d17c7
SQL
navikt/familie-ba-sak
/src/main/resources/db/migration/V206__valutakurs.sql
UTF-8
999
3.4375
3
[ "MIT" ]
permissive
CREATE TABLE VALUTAKURS ( ID BIGINT PRIMARY KEY, FK_BEHANDLING_ID BIGINT REFERENCES BEHANDLING (ID) NOT NULL, FOM TIMESTAMP(3), TOM TIMESTAMP(3), VALUTAKURSDATO TIMESTAMP(3) DEFAULT null, VALUTAKODE VARCHAR DEFAULT null, KURS ...
true
149284cc9fc03f859c6f35d08c3e87c6f3c945b4
SQL
robdubrish/MYSQL-Homework
/UCI SQL Assignment/Sakila 7a.sql
UTF-8
244
2.859375
3
[]
no_license
USE sakila; SELECT TITLE FROM FILM WHERE (TITLE LIKE 'K%' OR TITLE LIKE 'Q%') -- WHY CANT BELOW JUST BE LANGUAGE? ISNT THIS AN ALIAS? AND LANGUAGE_ID= (SELECT LANGUAGE_ID FROM LANGUAGE WHERE NAME LIKE '%ENGLISH%');
true
7d1121b5f4ed5b1d901d55e627f40e8072e7968e
SQL
ShanaMaid/Docs-Share
/crebas.sql
UTF-8
2,467
3.390625
3
[]
no_license
/*==============================================================*/ /* DBMS name: MySQL 5.0 */ /* Created on: 2016/10/17 19:07:56 */ /*==============================================================*/ drop table if exists Article; drop table ...
true
5dcc582ee81560e9cefab0dd1e91d1ec4bf819ac
SQL
mfattoru/My-Personal-Projects
/University Projects/Web Development Project/Dump/Agenda_PartecipaEvento.sql
UTF-8
2,428
3.03125
3
[]
no_license
CREATE DATABASE IF NOT EXISTS `Agenda` /*!40100 DEFAULT CHARACTER SET latin1 */; USE `Agenda`; -- MySQL dump 10.13 Distrib 5.5.28, for debian-linux-gnu (x86_64) -- -- Host: localhost Database: Agenda -- ------------------------------------------------------ -- Server version 5.5.28-0ubuntu0.12.04.3 /*!40101 SET @...
true
0e240a43d5cc6f271ecd59e591aff5aaebc03743
SQL
radtek/abs3
/sql/mmfo/bars/View/v_staff_uprklirozr.sql
UTF-8
1,461
2.984375
3
[]
no_license
PROMPT ===================================================================================== PROMPT *** Run *** ========== Scripts /Sql/BARS/View/V_STAFF_UPRKLIROZR.sql =========*** Run PROMPT ===================================================================================== PROMPT *** Create view V_ST...
true
57845206044d3747019c165a65fb1bf196160957
SQL
solber/Piscine-php
/d05/ex06/ex06.sql
UTF-8
93
2.578125
3
[]
no_license
SELECT titre, resum FROM film WHERE LOWER(resum) LIKE '%vincent%' ORDER BY id_film ASC;
true
3f22bdbe62cc37e5d53f1322642009a0e8a07287
SQL
cucker0/mysql
/exercise/6_05_流程控制经典案例.sql
UTF-8
1,075
3.609375
4
[]
no_license
-- 流程控制经典案例 -- 题目 /* article表结构如下: CREATE TABLE article ( id INT PRIMARY KEY AUTO_INCREMENT, content VARCHAR(20) ); 向该表插入指定个数的记录,content为随机字符串 */ USE test; CREATE TABLE article ( id INT PRIMARY KEY AUTO_INCREMENT, content VARCHAR(20) ); SELECT * FROM article; DELI...
true
f5759d1be94cc2967561b7f08378dc49c9f81134
SQL
silence-do-good/stress-test-Postgres-and-MySQL
/dump/high/day27/select1239.sql
UTF-8
191
2.65625
3
[]
no_license
SELECT timeStamp, temperature FROM ThermometerObservation WHERE timestamp>'2017-11-26T12:39:00Z' AND timestamp<'2017-11-27T12:39:00Z' AND SENSOR_ID='70bf954f_ea95_42f2_9f9c_052055441515'
true
5bf99e8f9d4c0afcccbc80679976e32d7f23b075
SQL
Oumamem/quizz
/qcm.sql
UTF-8
2,993
3.21875
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.9.2 -- https://www.phpmyadmin.net/ -- -- Hôte : 127.0.0.1:3308 -- Généré le : Dim 23 août 2020 à 10:53 -- Version du serveur : 8.0.18 -- Version de PHP : 7.3.12 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET...
true
c7807289a5bac9ccf29a671ae203b82e1c6867cf
SQL
htlim/timescaledb
/test/sql/insert.sql
UTF-8
4,175
3.515625
4
[ "Apache-2.0", "LicenseRef-scancode-free-unknown" ]
permissive
\ir include/insert_two_partitions.sql SELECT * FROM test.show_columnsp('_timescaledb_internal.%_hyper%'); SELECT * FROM test.show_indexesp('_timescaledb_internal._hyper%'); SELECT * FROM _timescaledb_catalog.chunk; SELECT * FROM "two_Partitions" ORDER BY "timeCustom", device_id; SELECT * FROM ONLY "two_Partitions"; ...
true
8f1a911c7f6fd9dd129ecbbdf00e38805c9abc0e
SQL
Enterprise-System-Management-Solutions/Analytics
/dwhnode02/database/procedures/R_BIN37_1.sql
UTF-8
5,029
3.390625
3
[]
no_license
-- -- R_BIN37_1 (Procedure) -- CREATE OR REPLACE PROCEDURE DWH_USER.R_BIN37_1 IS VDATE_KEY NUMBER; BEGIN SELECT DATE_KEY INTO VDATE_KEY FROM DATE_DIM WHERE TO_CHAR(DATE_VALUE,'RRRRMMDD')=TO_CHAR(SYSDATE-1,'RRRRMMDD'); --EXECUTE IMMEDIATE 'TRUNCATE TABLE PKPI DROP STORAGE'; --EXECUTE IMMEDIATE '...
true
16d59851de2e2d2e7b2203f391849512f0f0d246
SQL
cjbara/oracleBuild
/insert/insert_comments.sql
UTF-8
152
2.515625
3
[]
no_license
load data infile '../data/comments.dat' insert into table comments fields terminated by "," optionally enclosed by '"' (user_id,post_id,text,anonymous)
true
84c7c0f65fc01b8a36110a2ee8051517b55f27e7
SQL
zubaer93/pm
/config/schema/seach_summary.sql
UTF-8
481
2.78125
3
[]
no_license
CREATE TABLE IF NOT EXISTS `search_summary` ( `id` int(11) NOT NULL AUTO_INCREMENT, `search_tag` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `content_type` enum('company','user','trader') COLLATE utf8_unicode_ci DEFAULT NULL, `content_id` char(36) COLLATE utf8_unicode_ci NOT NULL, `params` text COLLATE utf...
true
3d8f2d9a0e75e70a0225c819a34ee4b7d4d51b6a
SQL
timchermokin/Tower-Defence
/tower_of_is.sql
UTF-8
6,142
3.15625
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.7.7 -- https://www.phpmyadmin.net/ -- -- Хост: 127.0.0.1:3306 -- Время создания: Ноя 19 2018 г., 09:34 -- Версия сервера: 5.6.38 -- Версия PHP: 7.2.0 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTE...
true
eac0607fb20f204a3f00fdd2f3115375a9e113b6
SQL
nprabhav/HP3
/abc.sql
UTF-8
4,201
3.1875
3
[ "MIT" ]
permissive
-- phpMyAdmin SQL Dump -- version 4.4.3 -- http://www.phpmyadmin.net -- -- Host: localhost -- Generation Time: Jun 01, 2016 at 02:45 AM -- 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
f16b664a5a9a6af84f3e5f558a982d784e6b5357
SQL
dylaanliu/Smith-Sustainability-Studies
/support/Testing/createPostTable.sql
UTF-8
3,177
3.5
4
[]
no_license
-- SQL script to initialize the study table. -- first, remove then create database -- DROP DATABASE `cisc498`; -- CREATE DATABASE `cisc498`; -- ALTER DATABASE `cisc498` CHARACTER SET utf8 COLLATE utf8_bin; -- use `cisc498`; -- create post table and fill it with values DROP TABLE IF EXISTS postTable; CREATE TABLE `pos...
true
76282e270b6c8a7e82839875d100993675f89390
SQL
w4hyud1/ta_leni_karyawan
/ta_leni.sql
UTF-8
13,059
2.953125
3
[ "MIT", "LicenseRef-scancode-unknown-license-reference" ]
permissive
/* SQLyog Ultimate v12.4.3 (64 bit) MySQL - 10.1.32-MariaDB : Database - ta_leni ********************************************************************* */ /*!40101 SET NAMES utf8 */; /*!40101 SET SQL_MODE=''*/; /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; /*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@...
true
00e582ba8694e95f1ccd688d5bd7c9fc6e51e939
SQL
williamtellme123/repos
/sql-certification-student-files/CHAPTER_ARCHIVE/_/Chapter 4 STUDENTS a.sql
UTF-8
5,136
3.890625
4
[]
no_license
-- ============================================================================= -- CHAPTER 4 /* DML, DDL, TCL :: Page 95 Execute a Basic SELECT Statement Describe How Schema Objects Work */ -- ----------------------------------------------------------------------------- -- SELECT BASICS -- -------------...
true
da1039d6877a74b5eab40b0d44234f00e0b74810
SQL
gianlucanatali/demo-scene
/kafka-connect-zero-to-hero/data/mysql/00_setup_db.sql
UTF-8
372
2.53125
3
[ "Apache-2.0" ]
permissive
CREATE USER 'debezium'@'%' IDENTIFIED WITH mysql_native_password BY 'dbz'; CREATE USER 'replicator'@'%' IDENTIFIED BY 'replpass'; GRANT SELECT, RELOAD, SHOW DATABASES, REPLICATION SLAVE, REPLICATION CLIENT ON *.* TO 'debezium'; GRANT REPLICATION SLAVE, REPLICATION CLIENT ON *.* TO 'replicator'; create database demo;...
true
09cc851ddd567f87fb5b7a02a39931a2061f47ac
SQL
zzg19950727/CatDB
/tools/tpch-queries/22.sql
UTF-8
901
4.125
4
[]
no_license
SELECT cntrycode, Count(*) AS numcust, Sum(c_acctbal) AS totacctbal FROM (SELECT Substr(c_phone, 1, 2) AS cntrycode, c_acctbal FROM customer WHERE Substr(c_phone, 1, 2) IN ( '20', '40', '22', '30', '39', '...
true
7ac6544e7cc104503760f51c00f1bae57d11a1c2
SQL
FoxComm/highlander
/phoenix-scala/sql/V1.090__create_discounts.sql
UTF-8
681
3.359375
3
[ "MIT" ]
permissive
create table discounts( id serial primary key, context_id integer not null references object_contexts(id) on update restrict on delete restrict, shadow_id integer not null references object_shadows(id) on update restrict on delete restrict, form_id integer not null references object_forms(id) on update ...
true
dd641fe96203f2fe6e96fbe66215a9f7e5ccbe24
SQL
AlexanderPro/SQL
/PostgreSQL/IndexesAndTheirSizes.sql
UTF-8
929
3.859375
4
[]
no_license
SELECT idx.relname as table_name, idx.indexrelname as index_name, atr.attname as column_name, pg_size_pretty( pg_relation_size( cls.oid ) ) AS table_size, pg_size_pretty( pg_relation_size( idx.indexrelid ) ) as index_size, pg_size_pretty( pg_total_relation_size( cls.oid ) ) AS total_s...
true
27207d2cca04dada6fb7f1de1d6ac36adcfe0d15
SQL
mateuszkoncikowski/selenium-tutorial
/src/main/resources/forum/db.sql
UTF-8
1,526
3.78125
4
[]
no_license
DROP DATABASE IF EXISTS forum; CREATE DATABASE forum; USE forum; CREATE TABLE categories ( cat_id INT(8) NOT NULL AUTO_INCREMENT, cat_name VARCHAR(255) NOT NULL, cat_description VARCHAR(255) NOT NULL, UNIQUE INDEX cat_name_unique (cat_name), PRIMARY KEY (cat_id) ); CREATE TABLE topics ( topic_id INT(8) NOT ...
true
1e5722460cdfa4623954e11df7d7dd5f9c6d0803
SQL
anishmo99/CPP
/test.sql
UTF-8
1,844
3.5
4
[ "MIT" ]
permissive
update prof set city='kolkata' where empid=1; update prof set city='mumbai' where empid=5; update prof set city='delhi' where empid=10; update prof set city='delhi' where empid=8; update prof set city='delhi' where empid=4; update prof set city='hyderabad' where empid=7; update prof set city='hyderabad' wh...
true
06de6f2a681986453ffa1f83f5355db82121f393
SQL
ntStudent/php1
/PHP-1/lesson-8/php_lesson8_src/comments2.sql
UTF-8
2,008
2.96875
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.5.1 -- http://www.phpmyadmin.net -- -- Хост: 127.0.0.1 -- Время создания: Сен 08 2016 г., 22:54 -- Версия сервера: 10.1.9-MariaDB -- Версия PHP: 7.0.1 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */...
true
63a876fe9b572346b8812bc35ba5ea43dd944565
SQL
koreahong/bigquery
/ch02/25.sql
UTF-8
347
3.8125
4
[]
no_license
SELECT gender , ARRAY_AGG(numtrips order by year) AS numtrips FROM ( SELECT gender , EXTRACT(YEAR FROM starttime) AS year , COUNT(1) AS numtrips FROM `bigquery-public-data`.new_york_citibike.citibike_trips WHERE gender != 'unknown' AND starttime IS NOT NULL GROUP BY gender, year HAVING ye...
true
603bf2947d7c09cb316cb785b0df740e9abde602
SQL
UCASV/proyecto-final-grupo4
/Proyecto BASES-POO 2021/Programación orientada a objetos/EN_Proyecto-Script-V1.2.sql
ISO-8859-1
5,757
3.578125
4
[]
no_license
-- Proyecto POO-BD 01/2021 -- Grupo 4 -- Integrante 1 [00074320 Barahona Hernndez, Eddy Ren] -- Integrante 2 [00051120 Canales Guilln, Ernesto Jos] -- Integrante 3 [00143320 Peraza Bolaos, Vctor Daniel] -- Integrante 4 [00043920 Ramos Guardado, Diego Fernando] CREATE DATABASE G4ProyectoDB; USE G4ProyectoDB; SET LANGUA...
true
483c46f239d2ec0cb40102c125623877fc7ad58d
SQL
team-leverage/reviews-database
/schema.sql
UTF-8
1,311
3.40625
3
[]
no_license
CREATE DATABASE reviews; \c reviews; CREATE TABLE reviews ( id SERIAL PRIMARY KEY, product_id INTEGER, rating INTEGER, date_submitted VARCHAR(100), summary VARCHAR(1000), body VARCHAR(1000), recommend BOOLEAN, reported BOOLEAN, reviewer_name VARCHAR(50), reviewer_email VARCHAR(...
true
cc89450b766b7870ba67df6aea819ed8238e7a08
SQL
natalidavid/Rally
/express-back-end/db/queries/organizations/03_all_volunteers.sql
UTF-8
205
3.578125
4
[]
no_license
SELECT users.* FROM users JOIN approved_users ON users.id = user_id JOIN organizations ON organizations.id = organization_id WHERE organizations.id = $1 AND approved = 'true' ORDER BY users.last_name;
true
080b5c3ee351b1a41814c20ac55d946aa76a15ef
SQL
rajpratyush/Local-Hack-Day-Share-
/budget-application/db/expenses/get_monthly_expense.sql
UTF-8
108
3.140625
3
[]
no_license
SELECT category, SUM(amount) FROM expenses WHERE user_id = $1 AND date BETWEEN $2 AND $3 GROUP BY category;
true
7632374c3f5263cc6fe6ab6ccc9a9f6658a59543
SQL
Tangol/Osclass-Locations
/locations/CF-Central_African_Republic.sql
UTF-8
8,836
2.734375
3
[]
no_license
REPLACE INTO /*TABLE_PREFIX*/t_country (pk_c_code, s_name, s_slug) VALUES ('CF', 'Central African Republic', 'central-african-republic'); REPLACE INTO /*TABLE_PREFIX*/t_region (pk_i_id, fk_c_country_code, s_name, b_active, s_slug) VALUES (1001259, 'CF', 'Bamingui-Bangoran Prefecture', 1, 'bamingui-bangoran-prefectur...
true
87c3ce02f9db4aafd893f6527cb3a8ea47f6a83d
SQL
webbdm/FuelTrackerSystem
/sql/AverageFuelMonthToDate.sql
UTF-8
236
3.953125
4
[]
no_license
Select Stops.StopName, AVG(FuelEvents.FuelUsed) 'Average Fuel Used' from FuelEvents join Stops on FuelEvents.Location=Stops.StopID where MONTH(FuelEvents.Time) = Month(getdate()) Group By StopName Order BY 'Average Fuel Used' DESC;
true
74969b78531337e34231ccc8632ef01919f14737
SQL
jairandresdiazp/Meiko
/sql/meiko-jd.sql
UTF-8
4,528
3.5
4
[ "MIT" ]
permissive
-- phpMyAdmin SQL Dump -- version 4.6.4 -- https://www.phpmyadmin.net/ -- -- Servidor: 127.0.0.1 -- Tiempo de generación: 22-01-2019 a las 14:59:12 -- Versión del servidor: 5.7.14 -- Versión de PHP: 5.6.25 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHAR...
true
492a5fa1a10208729d2b1fe170db13a3db76f23b
SQL
abondar24/WebScrumBoard
/server/src/main/resources/db/migration/V2__create_project_table.sql
UTF-8
205
2.5625
3
[ "MIT" ]
permissive
CREATE TABLE IF NOT EXISTS project ( id SERIAL PRIMARY KEY, name VARCHAR(255) NOT NULL, start_date TIMESTAMP, end_date TIMESTAMP, repository VARCHAR(255), is_active BOOLEAN );
true
e88111d45d6adf2f4fed922926d5ab01d4300ee4
SQL
WaterLord404/CyberNinjaStore-BE
/CYBERNINJA_STORE_SCHEMA.sql
UTF-8
5,642
3.40625
3
[]
no_license
CREATE DATABASE `CYBERNINJA_STORE_SYS` /*!40100 DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci */ /*!80016 DEFAULT ENCRYPTION='N' */; USE CYBERNINJA_STORE_SYS; CREATE TABLE `CUSTOMERS` ( `CUSTOMER_ID` bigint NOT NULL AUTO_INCREMENT, `ADDRESS` varchar(255) NOT NULL, `EMAIL` varchar(255) NOT NULL, `LAST...
true
e790560e22014efd12f8eaba571b1845bac0caff
SQL
indiratemk/nomnom
/src/main/resources/db/migration/V1__create_tables_category_and_product.sql
UTF-8
775
3.8125
4
[]
no_license
CREATE TABLE product ( product_id INT NOT NULL AUTO_INCREMENT, product_title VARCHAR(45) NULL, product_description VARCHAR(255) NULL, product_image VARCHAR(45) NULL, product_price INT NULL, category_id INT NULL, PRIMARY KEY (product_id)) engine = innodb auto_increment = 1 character set utf8 collate...
true
fa68370f74e7417b9d46d7413e1ab303bdca161a
SQL
borisslijepcevic/SpringBootSimpleGPPD
/sql-scrypt/get_post_put_delete_api.sql
UTF-8
621
2.90625
3
[]
no_license
create database if not exists `get_post_put_delete_api`; use `get_post_put_delete_api`; drop table if exists `user`; create table `user` ( `user_id` int(11) not null auto_increment, `first_name` varchar(45), `last_name` varchar(45), `e_mail` varchar(45) unique, primary key (user_id) ) ENGINE=InnoDB AUTO_INCREMENT=1 ...
true
6be7da29a40d139a3566c8c1a9c597adb3573864
SQL
RHoKAustralia/hills-carpal
/migrations/sqls/20210103045356-make-preferences-not-nullable-up.sql
UTF-8
579
2.625
3
[]
no_license
UPDATE rides SET driverGender = 'any' WHERE driverGender IS NULL; UPDATE rides SET carType = 'All' WHERE carType IS NULL; ALTER TABLE `carpal`.`rides` CHANGE COLUMN `driverGender` `driverGender` VARCHAR(10) NOT NULL , CHANGE COLUMN `carType` `carType` VARCHAR(255) NOT NULL ; UPDATE clients SET driverGender =...
true