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
913359b982fbe9dd009235edb1adabbe8232f3bf
SQL
Marcinar1010/CS50
/pset7/movies/7.sql
UTF-8
112
3.09375
3
[]
no_license
SELECT title, rating FROM movies JOIN ratings ON (id = movie_id) WHERE year = 2010 ORDER BY rating DESC, title;
true
1ff0f79d444d1aec730d69451e526ca7b113fb7c
SQL
ngthanhtien1104/Railway-08
/SQL/Testing_System/Testing_System_7.sql
UTF-8
361
3.453125
3
[]
no_license
USE testing_system; -- Question 1: Tạo trigger không cho phép người dùng nhập vào Group có ngày tạo trước 1 năm trước DELIMITER $$ CREATE TRIGGER log_in BEFORE INSERT ON `group` FOR EACH ROW BEGIN SELECT Creatdate FROM `group` WHERE Creatdate (yeah(Now) - yeah(creatdate) >= 1); END $$ ...
true
fef4b4622e76f533c47973710921851c0c80be50
SQL
unison/unison
/misc/sql-scraps/assign_tax_id.sql
UTF-8
3,269
3.125
3
[ "LicenseRef-scancode-unknown-license-reference", "Apache-2.0", "CC-BY-4.0" ]
permissive
-- ----------------------------------------------------------------------------- -- NAME: assign_tax_id.sql -- PURPOSE: assign tax_id in the paliasorigin table -- -- $Id: assign_tax_id.sql,v 1.7 2004/04/02 19:52:15 rkh Exp $ -- ----------------------------------------------------------------------------- -- swiss...
true
7085c2101af554be450668c7f1a49058bc8b3d4c
SQL
guidecayeux/temporis-v-back
/sql_scripts/logs.sql
UTF-8
303
2.796875
3
[]
no_license
CREATE TABLE public.logs ( id integer NOT NULL GENERATED ALWAYS AS IDENTITY ( INCREMENT 1 START 1 MINVALUE 1 MAXVALUE 2147483647 CACHE 1 ), log text COLLATE pg_catalog."default", CONSTRAINT logs_pkey PRIMARY KEY (id) ) TABLESPACE pg_default; ALTER TABLE public.logs OWNER to root;
true
5dd2fa7279949debd79d0fddd4484d6ba945aad7
SQL
MarvinEdorh/Data-Mining
/survival_table.sql
UTF-8
2,003
4.4375
4
[]
no_license
WITH visit AS ( SELECT fullvisitorid, MIN(date) AS date_first_visit, MAX(date) AS date_last_visit FROM `bigquery-public-data.google_analytics_sample.ga_sessions_*` GROUP BY fullvisitorid), device_visit AS ( SELECT DISTINCT fullvisitorid, date, device.deviceCategory FROM `bigquery-public-data.google_analytic...
true
0e8b6cb45ff6ad52e5a014f6fa70934caa4f1628
SQL
hernan-alperin/urbix
/test.sql
UTF-8
3,343
4.15625
4
[]
no_license
select day, round(avg(data)*workday_duration) as totdias, day_colour from bkn_variable o, bkn_result m, ftn_time_period n where date( m.time) = n.date and m.variable_id = o.variable_id and m.variable_id = 10 and date(m.time) between date('2015/04/19') and date('2015/05/04') and extract(hour from time) between ext...
true
f33a87ef6171227cf0e9fa70b77538a31d0082d3
SQL
Yorymotoru/learning-sql
/Practice 3/Task 11.sql
UTF-8
124
3.15625
3
[]
no_license
SELECT d.DEPTNO FROM DEPT d WHERE 3 >= (SELECT COUNT(e.EMPNO) FROM EMP e WHERE e.DEPTNO = d.DEPTNO);
true
57de1d7405e16703eecf8a4a0cf5d4d7f669d6aa
SQL
romanV7/rest
/src/database.sql
UTF-8
785
3.609375
4
[ "MIT" ]
permissive
SET FOREIGN_KEY_CHECKS=0; DROP TABLE IF EXISTS users; SET FOREIGN_KEY_CHECKS=1; CREATE TABLE users ( id INTEGER PRIMARY KEY AUTO_INCREMENT, name varchar(255) NOT NULL, email varchar(255) NOT NULL UNIQUE, password varchar(255) NOT NULL ) ENGINE InnoDB; DROP TABLE IF EXISTS files; CREATE TABLE files ( id INT...
true
0a58964edd423bff3a3d170be2c25b77d57b5eb6
SQL
Brandonluke/PusheenUnicorns
/Downloads/Tables - Copy.sql
UTF-8
831
3.25
3
[]
no_license
CREATE TABLE Job( jobCode char(4), jobdesc varchar(50) PRIMARY KEY (jobCode), CONSTRAINT JOB_JOBCODE CHECK(jobCode IN('CAST', 'ENGI', 'INSP', 'PMGR')) ) CREATE TABLE Employee( empNumber char(8), firstName varchar(25), lastName varchar(25), ssn char(9), address varchar(50), state char(2), zip char(5), jo...
true
dbb7edb1da168633ac18f4f91580420406d02254
SQL
ithillel-nikitamuzichenko/eJournal
/eJournal/db/Journal.sql
UTF-8
1,195
3.703125
4
[]
no_license
CREATE SCHEMA IF NOT EXISTS EJOURNAL; CREATE TABLE IF NOT EXISTS EJOURNAL.USERS ( ID INT NOT NULL AUTO_INCREMENT , ROLE INT NOT NULL , NAME VARCHAR(45) NULL , SURNAME VARCHAR(45) NULL , BIRTHDATE DATETIME NULL , SEX INT NULL, LOGIN VARCHAR(45) NOT NULL , PASSWORD VARCHAR(45) NOT NULL , PRIMARY KEY (I...
true
e340028f4e6d91f65a8ee5c52312caf40051a2cb
SQL
greenplum-db/gpdb
/src/test/regress/sql/index_constraint_naming_upgrade.sql
UTF-8
5,330
4.40625
4
[ "Apache-2.0", "LicenseRef-scancode-generic-cla", "PostgreSQL", "OpenSSL", "LicenseRef-scancode-stream-benchmark", "ISC", "LicenseRef-scancode-openssl", "LicenseRef-scancode-other-copyleft", "LicenseRef-scancode-ssleay-windows", "BSD-2-Clause", "Python-2.0" ]
permissive
-- -- test that index-backed constraints have matching index and constraint names -- that work with pg_upgrade. We are either testing results here or simply -- creating tables that will be placed in ICW so that pg_upgrade will see them -- in testing. DROP FUNCTION IF EXISTS constraints_and_indices(); CREATE FUN...
true
cd32993e1c8fe7caf5d0a4dc572c95b1810f030a
SQL
bruno-victor32/Aula-de-banco-de-dados-faculdade-esamc
/Softblue/Primeiro banco de dados/Exercicio 1.sql
UTF-8
3,165
4.3125
4
[ "MIT" ]
permissive
-- Cria o banco de dados e acessa o mesmo -- CREATE DATABASE SOFTBLUE DEFAULT CHARSET=latin1; USE SOFTBLUE; -- -- Cria a tabela TIPO -- CREATE TABLE TIPO ( CODIGO INTEGER UNSIGNED NOT NULL AUTO_INCREMENT, -- Código interno (PK) TIPO VARCHAR(32) NOT NULL, -- Descrição PRIMARY KEY(CODIGO) -- Define o campo COD...
true
772ad488869702962412e4e22cc8a0e279c553e2
SQL
mbikas/Undergraduate-Projects
/PL-SQL/even_odd/program.sql
UTF-8
513
2.875
3
[]
no_license
DECLARE p number; cursor my_cursor is select * from even_odd; temp my_cursor % rowtype; BEGIN open my_cursor; LOOP fetch my_cursor into temp; exit when my_cursor % notfound; select num into p from even_odd where num = temp.num; dbms_output.put_line(p); if p mod 2 = 0 then...
true
d274610212f2f0ef37382533e2a4de191ec86a1a
SQL
babtsoualiaksandr/shop-telethones-be
/create_and_mock_DB.sql
UTF-8
927
3.90625
4
[ "MIT" ]
permissive
create table products ( id uuid primary key default uuid_generate_v4(), title text not null, description text, price numeric ); -- CREATE extension if not exists "uuid-ossp"; create table stocks ( id uuid primary key default uuid_generate_v4(), product_id uuid UNIQUE, count numeric, foreign key...
true
549939249cd39564152f044b33d2a057b542ee38
SQL
konradczarnecki/Lunchmaster
/src/main/resources/database/v_0_0_2/data/lunchmaster_user.sql
UTF-8
1,647
2.5625
3
[]
no_license
-- MySQL dump 10.13 Distrib 5.7.17, for Win64 (x86_64) -- -- Host: localhost Database: lunchmaster -- ------------------------------------------------------ -- Server version 5.6.36-log /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS...
true
b6bfeaf0bed151126a621e29b27a59f864e14a47
SQL
phuongtn2/manager-building
/db/building_t_user.sql
UTF-8
2,826
3.046875
3
[]
no_license
-- MySQL dump 10.13 Distrib 5.7.12, for Win64 (x86_64) -- -- Host: localhost Database: building -- ------------------------------------------------------ -- Server version 5.5.5-10.1.13-MariaDB /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET...
true
a3a2d96c1768b573b05e3d8caaa8a267f38afe3d
SQL
raulprogramacionfuenla/Formas_De_AprendizajeUAQ.net
/palabrasclave.sql
UTF-8
4,887
2.8125
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.5.1 -- http://www.phpmyadmin.net -- -- Servidor: 127.0.0.1 -- Tiempo de generación: 06-09-2017 a las 00:34:10 -- Versión del servidor: 10.1.10-MariaDB -- Versión de PHP: 5.5.30 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT...
true
5b5a1797aa5cf67ba601e1688f47fafbbdcdaee8
SQL
mkovar52/database-exercises
/subqueries_exercises.sql
UTF-8
1,337
4.1875
4
[]
no_license
-- # Find ALL the employees with the SAME "HIRE_DATE" as employee 101010 using a sub-query. -- # output: 69 Rows -- # desired hire_date for these employees is 1990-10-22 / Oct. 22nd / 1990 select e.hire_date from employees as e where e.emp_no = '101010'; -- # exercise 1 ====================== select first_name, last_...
true
890a521e6956a80a95a15a47397fb64052d17fdc
SQL
1admiral4/unfinished
/database.sql
UTF-8
262
2.671875
3
[]
no_license
create database kevin_db; use kevin_db; CREATE TABLE `products` ( `pId` int(11) NOT NULL auto_increment, `pName` varchar(100) NOT NULL, `pDesc` float NOT NULL, `pPrice` int NOT NULL, `pStock` varchar(100) NOT NULL, PRIMARY KEY (`id`) );
true
9713fd2e2ae36a523fb238b289b9396a1f0d2e14
SQL
antlr/grammars-v4
/sql/plsql/examples-sql-script/trigger_examples.sql
UTF-8
391
2.546875
3
[]
permissive
create or replace trigger trg_status_tick after insert or update or delete on status for each row declare begin if inserting then tp_ticket_util.fire('status', tp_ticket_const.cinsert, :new.id); elsif updating then tp_ticket_util.fire('status', tp_ticket_const.cupdate, :new.id); elsif deleting then tp_tick...
true
6cfce9562f6a267b5e896c5eac62218c01cde965
SQL
bgulbis/stroke_ich
/cva_acei_kyndol/qry/allergies_supp.sql
UTF-8
1,220
3.71875
4
[]
no_license
WITH PATIENTS AS ( SELECT DISTINCT ENCOUNTER.ENCNTR_ID, ENCOUNTER.PERSON_ID, ENCNTR_ALIAS.ALIAS AS FIN, ENCOUNTER.REG_DT_TM, ENCOUNTER.DISCH_DT_TM FROM ENCNTR_ALIAS, ENCOUNTER WHERE ENCNTR_ALIAS.ALIAS IN @prompt('Enter value(s) for Alias','A',,Multi,Free,Persistent,,User:0) AND ENCNTR_ALIAS.ENCN...
true
445597ef4a170239c8db53a81f42ce3b98c75087
SQL
pucinsk/scripts
/select_defect_outter_join.sql
UTF-8
283
3.15625
3
[]
no_license
SELECT defects.name AS Defektas, defect_types.name AS Defekto_tipas, defect_positions.name AS Defekto_pozicija FROM defects, defect_types, defect_positions WHERE defects.id = defect_types.defects_id(+) AND defects.id = defect_positions.defects_id(+);
true
bac1ee71972dae96ad7cfb53db96c6dc89069b96
SQL
jworkman119/HTC
/Pinnacle/Database/SQL/qryMonthly_QuarterlyReport.sql
UTF-8
566
3.953125
4
[]
no_license
Select ReportColumns.Name , ReportColumns.ID as Column , Staff.FirstName || ' ' || Staff.LastName as Staff , Avg(ReviewCost.PayRate) as Avg_PayRate , sum(ReviewCost.Hours) as Hours , sum(ReviewCost.Cost) as Cost From ReportColumns, Staff Left Join ReviewCost on ReviewCost.Funding_ID = ReportColumns.Name an...
true
3f7329e4d7e087ca0c0979bfea6281f7e64e484a
SQL
wangjiexin123456/rrepository
/t88_zt_gzsb_modresource.sql
UTF-8
1,169
3.109375
3
[]
no_license
/* Navicat MySQL Data Transfer Source Server : xx Source Server Version : 50626 Source Host : 39.105.229.154:3306 Source Database : gzsb Target Server Type : MYSQL Target Server Version : 50626 File Encoding : 65001 Date: 2019-11-23 22:06:31 */ SET FOREIGN_KEY_CHECK...
true
1f772206baa44ac6b38865daeabaf5912db7ece5
SQL
Balamuralit/sqlqueries
/GGACDR19_Source~1.sql
UTF-8
2,532
3.390625
3
[]
no_license
select create bigfile tablespace BTEST; CREATE USER BTEST IDENTIFIED BY BTEST DEFAULT TABLESPACE BTEST; grant dba to BTEST; create bigfile tablespace BTEST1; CREATE USER BTEST1 IDENTIFIED BY BTEST1 DEFAULT TABLESPACE BTEST1; grant dba to BTEST1 select username from dba_users; select * from dba_tablespaces; desc...
true
0fcaf4cf96256af9092328862b7dd22ceba9998e
SQL
Kyouru/SUNAT-ECR-2018-2019
/May2021/ECR 2020.sql
UTF-8
29,969
3.046875
3
[]
no_license
--Reporte del periodo 2020 CREATE TABLE SISGODBA.ECR_ACCOUNTREPORT AS SELECT DISTINCT 'OECD1' cDocTypeIndic, --Cambiar el periodo 'PE20202011106501300001' || LPAD(ROW_NUMBER() OVER(ORDER BY numerocuenta ASC),5,'0') AS cDocRefId, numerocuenta cAccountNumber, 'OECD605' cTypeAccountNumber, 'false' cUndocumented...
true
31529b10ce596a1426441ffbbb2ccdef396e080b
SQL
zhiyinn/ETL_Project
/Farzad/Resources/LADATA.sql
UTF-8
1,999
2.875
3
[]
no_license
DROP DATABASE IF EXISTS LADATA_DB; CREATE DATABASE LADATA_DB; USE LADATA_DB; CREATE TABLE `LADATA_DB`.`la_crimes_rate` ( `DR Number` int(11) NOT NULL, `Date_Reported` varchar(45) DEFAULT NULL, `Date_Occurred` varchar(45) DEFAULT NULL, `Time_Occurred` varchar(45) DEFAULT NULL, `Area_ID` varchar(45) DEF...
true
8ab0682f87149f9677c1c7543c7902e2423fbb04
SQL
tamminh2003/BookAdminConsole
/src/BookStoreSchema.sql
UTF-8
2,184
3.859375
4
[]
no_license
Create database IF NOT EXISTS BOOKSTORE; Use BOOKSTORE; CREATE TABLE IF NOT EXISTS users ( uid int NOT NULL AUTO_INCREMENT, lastname VARCHAR(30), firstname VARCHAR(30), username VARCHAR(30), pass VARCHAR(30), isadmin boolean, PRIMARY KEY (uid) ); INSERT INTO users (uid, lastname,firstname,use...
true
5d8671455fd9ad63fc5dfdc0873ee3af83b07cd0
SQL
kiosowski/Database
/Projects/DatabaseBasics/Exam/Exam/01.DDL.sql
UTF-8
1,948
4.1875
4
[]
no_license
CREATE DATABASE TripService USE TripService CREATE TABLE Cities ( Id INT NOT NULL IDENTITY, [Name] NVARCHAR(20) NOT NULL, CountryCode CHAR(2) NOT NULL CONSTRAINT PK_Cities PRIMARY KEY(Id) ) CREATE TABLE Hotels ( Id INT NOT NULL IDENTITY, Name NVARCHAR(30) NOT NULL, CityId INT NOT NULL, EmployeeCount INT N...
true
4d6940e40787fc19458e0be753c14168280f78c8
SQL
halaszd/email-system
/backend/prisma/migrations/20211015144643_init/migration.sql
UTF-8
695
3.71875
4
[]
no_license
-- CreateTable CREATE TABLE "Email" ( "id" INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, "createdAt" DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP, "fromId" INTEGER NOT NULL, "toId" INTEGER NOT NULL, "message" TEXT, CONSTRAINT "Email_fromId_fkey" FOREIGN KEY ("fromId") REFERENCES "User" ("id") ON DE...
true
782f708fd76965eac560b06aae0fcf9b8a6c622e
SQL
alazar-des/alx-higher_level_programming
/0x0D-SQL_introduction/11-best_score.sql
UTF-8
143
2.8125
3
[]
no_license
-- Show name and score of a table in ascending order SELECT score, name FROM second_table WHERE score >= 10 ORDER BY score DESC;
true
9d62962c0191accf9707cdd65bbc4e14b82a9ec3
SQL
giovanne-rf/professor-allocation
/src/main/resources/db/migration/V0_0_1_1__create_tables.sql
UTF-8
1,598
3.484375
3
[]
no_license
CREATE TABLE `course` ( `id` bigint NOT NULL AUTO_INCREMENT, `name` varchar(255) NOT NULL, PRIMARY KEY (`id`), UNIQUE KEY `UK_4xqvdpkafb91tt3hsb67ga3fj` (`name`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; CREATE TABLE `department` ( `id` bigint NOT NULL AUTO_INCREMENT, `...
true
4ee6903a945fc9fb89e726c4af48c69b55115087
SQL
AitorAlday/PROYECTO-SOLO
/BASES/Tablas.sql
ISO-8859-10
2,033
3.203125
3
[]
no_license
--LAS TABLAS DEL PROYECTO DROP TABLE Equipo CASCADE CONSTRAINTS; CREATE TABLE Equipo ( id_equipo INTEGER NOT NULL, nombre VARCHAR(15) NOT NULL, CONSTRAINT id_eq_pk PRIMARY KEY(id_equipo)); DROP TABLE Jugador CASCADE CONSTRAINTS; CREATE TABLE Jugador ( id_jugador INTEGER NOT NULL, nickname VAR...
true
460c266c85e9e64fb7ee98c508199159db65a406
SQL
LordOfDarknessAlexander/Auto_ObsessionsX
/Users/achievements.sql
UTF-8
249
2.828125
3
[]
no_license
-- -------------------------------------------------------- -- Table structure for table `achievements` create table achievements( achievement_id int not null auto_increment, description varchar(100) not null, primary key (achievement_id) )
true
fd9124c82bc21f1bf7dc87f1d3a2cbf294a28426
SQL
qxev/cv2
/db/splitReportTrackMatch/proc_move_report_trackmatch_one_by_one.sql
UTF-8
977
3.59375
4
[]
no_license
drop procedure IF EXISTS `cv2`.`proc_move_report_trackmatch_one_by_one`; DELIMITER $$ CREATE PROCEDURE `cv2`.`proc_move_report_trackmatch_one_by_one`(IN p_name varchar(25), IN p_cur_date varchar(20)) BEGIN DECLARE d_step int(4) default 0; DECLARE done int(1) default 0; DECLARE CONTINUE HANDLER FOR SQLEXCEPTION SET...
true
90183251ceaaa32908827283912e6c6c21d127e5
SQL
nathanmoon/sql-tutorial
/queries/tut-aggregate-mistake-raw.sql
UTF-8
1,642
4.65625
5
[ "MIT" ]
permissive
/* Take a look at the raw table to see why the previous query was wrong: */ SELECT * FROM inventory inv JOIN item it ON inv.item_id = it.id JOIN review r ON r.item_id = it.id ; /* We have more rows in our table because there are multiple reviews per item, so we get multiple rows with the same inventory info. Those dup...
true
18ab4b71288ff93111a55cea7f1190107d6b2bfd
SQL
facka/phcsa
/sql/CR_Table_Unidad.sql
UTF-8
706
3.921875
4
[]
no_license
-- Table: unidad -- DROP TABLE unidad; CREATE SEQUENCE unidad_idunidad_seq; CREATE TABLE unidad ( id integer NOT NULL DEFAULT nextval('unidad_idunidad_seq'::regclass), numero integer, direccion_extendida character varying(120), idedificio integer NOT NULL, CONSTRAINT unidad_pkey PRIMARY KEY (id), CONSTRA...
true
75adaee5cd0c86a7208c17e04bc7ca69f4330057
SQL
marcwright/WDI_ATL_1_Instructors
/REPO - DC - Students/w03/d02/Adam/domains_hw/travel_log.sql
UTF-8
294
2.90625
3
[]
no_license
CREATE TABLE entries ( id serial PRIMARY KEY, city varchar(30) NOT NULL, content varchar(500) NOT NULL, ); CREATE TABLE tags ( id serial PRIMARY KEY, parent_id integer REFERENCES tags (id), ); CREATE TABLE location_keys ( id serial PRIMARY KEY location varchar(100) NOT NULL );
true
cb07367813d8ba798e7c9dcf8ea1fbe7d22f0095
SQL
rumman189/generic-dashboard
/controller/water-tank/datasoft_water_tank.sql
UTF-8
1,814
3.125
3
[ "MIT" ]
permissive
-- phpMyAdmin SQL Dump -- version 4.5.1 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: Jun 19, 2018 at 08:33 AM -- Server version: 10.1.16-MariaDB -- PHP Version: 7.0.9 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLI...
true
320d0a04c3c09da79e29fa0e93b50e3387ea112f
SQL
mferle/DemoSF
/Scripts/Create objects/Create_tables_and_sequences.sql
UTF-8
3,771
2.515625
3
[]
no_license
CREATE OR REPLACE TABLE LD_26_PLC_CANDIDATES ( "ID" NUMBER, "SDT_ID" NUMBER, "ZPT_ID" NUMBER, "STEVILKA_DOKUMENTA" VARCHAR2(50), "ISK_ID" NUMBER, "SDT_DATVNO" DATE, "DATVNO" DATE, "DATUM_DO_OO" DATE, "VELJAVNOST_SPR_OD" DATE, "VELJAVNOST_ZAC_DOK" DATE, "VELJAVNOST_POT_DOK" DATE, ...
true
370012337b35898e23c8945f32c1b54545832b44
SQL
a1is3n/oracle
/MONITOR/oracle_trace_run_details.sql
UTF-8
511
2.796875
3
[]
no_license
-- ----------------------------------------------------------------------------------- -- Hazırlayan : Bugra Parlayan -- Güncel : www.bugraparlayan.com.tr -- ----------------------------------------------------------------------------------- SELECT e.runid ,e.event_seq ,TO_CHAR(e.event_time, 'DD-MON-Y...
true
2a6922a9307b8bae615386bc0e719c1fb576d599
SQL
Dorothywilk/PHP
/agc7/bdd/sql/reqMatch.sql
UTF-8
144
2.65625
3
[]
no_license
-- Requête pour taux de pertinence<br><br> SELECT id, nom, espece, MATCH(nom) AGAINST('bubulle') AS tx FROM animal ORDER BY tx DESC
true
9abb99b4fa3795c07226d245f03b7429b337fefa
SQL
joshiadvait8/RajhansRealEstate
/rajhansrealestate.sql
UTF-8
5,222
2.9375
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.8.0.1 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: May 06, 2019 at 03:09 AM -- Server version: 10.1.32-MariaDB -- PHP Version: 7.0.30 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @...
true
7a137ad662ef8f49f5d892c9238678bcf3ce73cd
SQL
linhhvo/database-modeling
/scripts.sql
UTF-8
8,834
3.71875
4
[]
no_license
-- Create tables based on proposed schema -- TRAINER create table trainer (employee_number integer not null, fname varchar(25), mname varchar(25), lname varchar(25), street1 varchar(30), street2 varchar(25), city varchar(25), state varchar(10), zip varchar(10), phone_number varchar(15), email varchar(25), hire_date da...
true
6f7e7d046690a55148e35de69ac13297667b5a5f
SQL
ralitsanikolova/SQL-Exercises
/Subqueries and Joins/Problem 2. Addresses with Towns.sql
UTF-8
226
3.5625
4
[]
no_license
SELECT TOP(50) FirstName, LastName,Towns.Name as Name, Addresses.AddressText FROM Employees JOIN Addresses ON Employees.AddressID = Addresses.AddressID JOIN Towns ON Addresses.TownID = Towns.TownID ORDER BY FirstName, LastName
true
095b9bae27c01996f33a35b085199ae2d1f65690
SQL
yoe88/springboot-jpa-mybatis
/src/main/resources/how-to-set/Account.sql
UTF-8
1,122
3.375
3
[]
no_license
drop table if exists account cascade; create table account ( id varchar(100) not null, password varchar(100) not null, nickname varchar(50) not null, email varchar(300) not null, zone_code varchar(30), address varchar(300), extra_address varcha...
true
d558ce2d7acfcb48dd2fade541be834c34db25d4
SQL
NTXpro/NTXbases_de_datos
/DatabaseNTXpro/ERP/Stored Procedures/Procs1/Usp_Sel_Propiedad_Export.sql
UTF-8
460
3.171875
3
[]
no_license
CREATE PROCEDURE [ERP].[Usp_Sel_Propiedad_Export] @Flag bit AS BEGIN SELECT PR.ID , UM.ID IdUnidadMedida, PR.Nombre NombrePropiedad, UM.Nombre NombreUnidadMedida, UM.CodigoSunat CodigoSunat, PR.FechaRegistro FechaRegistro FROM [Maestro...
true
8ee3b4cab988dfeb57adf9208ab7f99dd6751057
SQL
nikolay-doichev/Csharp-Databases-Basics-September-2019
/Databases Basics - MS SQL Server/06.Basics-Subqueries-And-JOINs/03. Sales Employees.sql
UTF-8
219
3.9375
4
[]
no_license
SELECT e.EmployeeID, e.FirstName, e.LastName, d.[Name] AS [DepartmentName] FROM Employees AS e JOIN Departments AS d ON e.DepartmentID = d.DepartmentID WHERE d.[Name] = 'Sales' ORDER BY e.EmployeeID ASC
true
856b24b2aa4a9da1e07a26eb0044bdaba8ad97ca
SQL
SDC-HRSJO1/reviews
/SchemaCassandra/cassandraReview.cql
UTF-8
2,724
3.71875
4
[]
no_license
DROP KEYSPACE IF EXISTS review; CREATE KEYSPACE review WITH replication = {'class': 'SimpleStrategy', 'replication_factor' : 3}; USE review; CREATE TABLE review.review ( pid int, rid int, user_name text, age_range text, create_date text, review_title text, recommendationYN text, purchased_for text...
true
ad16581c4e105234249b868d373df9b2ade956a7
SQL
fikepaci/alx-higher_level_programming
/0x0E-SQL_more_queries/13-count_shows_by_genre.sql
UTF-8
403
4.03125
4
[]
no_license
-- Lists all genres from the database hbtn_0d_tvshows along with the number of -- shows linked to each. -- Does not display genres without linked shows. -- Records are ordered by descending number of shows linked. SELECT g.`name` AS `genre`, COUNT(*) AS `number_of_shows` FROM `tv_genres` AS g INNER JOIN `tv_show_genres...
true
854fd52e1dd82b793d66e54340b937f7f24c4915
SQL
cornelioroyer/abaco-design
/v_cgl_financiero_cglsldocuenta.sql
UTF-8
628
3.3125
3
[]
no_license
drop view v_cgl_financiero_cglsldocuenta; create view v_cgl_financiero_cglsldocuenta as select cglsldocuenta.compania, gralcompanias.nombre, cgl_financiero.no_informe, gralperiodos.inicio, cgl_financiero.d_fila, cglsldocuenta.cuenta, cglsldocuenta.debito, cglsldocuenta.credito from cgl_financiero, cglsldocuenta, gral...
true
d2d7639c72fd99fc839eba89708d571c6642c4cf
SQL
aasthakumar/FitnessFreak
/SQL/Triggers/trg_AfterInsertToUser_UpdateProgress.sql
UTF-8
616
2.953125
3
[]
no_license
USE FitnessFreak; -- ============================================= -- Author: Aastha Kumar -- Create date: Nov, 28, 2017 -- Description: Trigger to insert record into progress -- Version: 0.1 -- ============================================= DROP TRIGGER IF EXISTS InsertIntoProgress; DELIMITER $$ CREATE TRIGG...
true
e4110e8124daf9a5bf8ef6782bcac827a7cfa029
SQL
snakewqq/cmd
/sql/ndb/task/ndb修改task为arrange.sql
UTF-8
328
2.640625
3
[]
no_license
SELECT *,FROM_UNIXTIME(createtime) FROM ndb_project_task WHERE id = 352239 SELECT *,FROM_UNIXTIME(starttime) FROM ndb_project_consultation_task WHERE id = 352239 UPDATE ndb_project_consultation_task SET starttime=UNIX_TIMESTAMP('2015-11-24 22:00') WHERE id = 352239 UPDATE ndb_project_task SET `status` = 7 WHERE id ...
true
ec2d8f68fed0fd70d360588180b14e1b9d90fe02
SQL
tormoz70/Bio.Framework.8
/dbmodel/bioSys/BIOSYS_AI_UTL_20130125.sql
WINDOWS-1251
32,419
2.96875
3
[]
no_license
-- Start of DDL Script for Package BIOSYS.AI_UTL -- Generated 25.01.2013 15:15:07 from BIOSYS@GIVCDB_EKBS02 CREATE OR REPLACE PACKAGE biosys.ai_utl IS type T_VARCHAR_TBL is table of varchar2 (4000); type T_INLIST_REC is record (item varchar2 (4000)); type T_INLIST_TBL is table of T_INLIST_REC; ...
true
a4aa2bc862da63ec3d07ed11a5120289f5c509cc
SQL
oosunkeye/SQL-Oracle-DBS301
/LAB1.SQL
WINDOWS-1250
550
3.25
3
[]
no_license
4. /*THERE ARE THREE CODING ERRORS IN THIS STATEMENT. WRITE THE CORRECT SYNTAX. SELECT LAST_NAME LNAME, JOB_ID JOB TITLE, FROM EMPLOYEES WHERE JOB_ID <> SA_REP AND SALARY NOT BETWEEN (4000,8000); */ SELECT LAST_NAME LNAME, JOB_ID AS "JOB TITLE" FROM EMPLOYEES WHERE JOB_ID <> 'SA_REP' ...
true
f64c77e96f42c7962ddfb5f202c8d9dc8291a2dc
SQL
jongvin/werp
/werp/erpw/general/t_web/sql/FBS/Functions/f_recieve_file_from_van.sql
UHC
6,854
3.046875
3
[]
no_license
/*************************************************************************/ /* */ /* 1. ID : f_recieve_file_from_van */ /* 2. ̸ : AN翡 data ޾ file մϴ. */ /* 3. ý : ȸý ...
true
76d6e73f180dd029d55272388150b217bddf569b
SQL
kalex32/Hib2
/src/main/resources/database/init1dB.sql
UTF-8
333
2.8125
3
[]
no_license
CREATE TABLE IF NOT EXISTS developers( id INT AUTO_INCREMENT PRIMARY KEY, first_name VARCHAR(50) NOT NULL, last_name VARCHAR(50) NOT NULL, specialty VARCHAR(100) NOT NULL, experience INT NOT NULL ); CREATE user 'root'@'%' identified by 'root'; grant all privileges on testhib.* to olexiy; flush privileges; create data...
true
1912af2e8d7041fd7e98123b24c3563ca54dc541
SQL
Pathik1973Git/MyFirstRepo
/db_Test/DB_SSISDB/catalog/Views/object_versions_1.sql
UTF-8
724
3.5625
4
[]
no_license
 CREATE VIEW [catalog].[object_versions] AS SELECT vers.[object_version_lsn], vers.[object_id], vers.[object_type], projs.[name] AS [object_name], vers.[description], vers.[created_by], vers.[created_time], vers.[restored...
true
38df95405817a648cfdec6f3aa6d67a21deb0036
SQL
lghtman/sqlzoo-solutions
/join-soccer.sql
UTF-8
3,525
4.59375
5
[]
no_license
-- 1. Show the matchid and player name for all goals scored by Germany SELECT matchid , player FROM goal WHERE teamid = 'GER' -- 2. Show id, stadium, team1, team2 for just game 1012 SELECT id , stadium , team1 , team2 FROM game WHERE id = 1012 /* 3. Show the player, teamid, stad...
true
2c20a9daf9c646dbaf584b2a7afa9b6d3f511068
SQL
TimDorand/netfriends
/netfriends.sql
UTF-8
4,349
3.1875
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.4.10 -- http://www.phpmyadmin.net -- -- Client : localhost:8889 -- Généré le : Jeu 12 Novembre 2015 à 23:30 -- Version du serveur : 5.5.42 -- Version de PHP : 5.6.10 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHAR...
true
b3390ba960fcde58e76d7ecfdb208f388e5570d6
SQL
fernandocanizo/short-tips
/postgresql/postgis/add.postgis.sql
UTF-8
593
2.546875
3
[ "MIT" ]
permissive
-- You only need to add the features you want: -- Enable PostGIS (includes raster) CREATE EXTENSION postgis; -- Enable Topology CREATE EXTENSION postgis_topology; -- Enable PostGIS Advanced 3D -- and other geoprocessing algorithms -- sfcgal not available with all distributions CREATE EXTENSION postgis_sfcgal; -- f...
true
647a5359226d9544d276fb49ba2b272843e55129
SQL
DavidDeArmon/Better-Habits
/db/getHabitDays.sql
UTF-8
160
3.421875
3
[]
no_license
SELECT * FROM habits JOIN user_habits ON(habits.habit_id=user_habits.id) WHERE habits.user_id = $1 AND habits.date BETWEEN $2 AND $3 ORDER BY habits.date DESC;
true
223b468c9dad15d2f9afa25a0a813349656f0035
SQL
ErikLarsson82/smash-ladder-be
/postgres.sql
UTF-8
2,002
3.046875
3
[]
no_license
DROP TABLE players; DROP TABLE schedule; DROP TABLE matches; CREATE TABLE players ( id serial PRIMARY KEY, name text, playerslug text, main text, secondary text, trend integer, qc integer[], rank integer ); ...
true
bf1d8450d404bd0523a312af373ce72be1b412c0
SQL
zhaoya1998/dubbo-hgshop
/hg_brand.sql
UTF-8
28,942
2.890625
3
[]
no_license
/* Navicat MySQL Data Transfer Source Server : cms Source Server Version : 50557 Source Host : localhost:3306 Source Database : 1710d Target Server Type : MYSQL Target Server Version : 50557 File Encoding : 65001 Date: 2020-04-17 09:38:02 */ SET FOREIGN_KEY_CHECKS=0...
true
088ac3bde4fce38eae68c83c278ba297d09f1b5b
SQL
Riceyo/QA-Consulting-ONS-Academy
/PL SQL/procedure_type_output.sql
UTF-8
254
2.5625
3
[]
no_license
create or replace procedure selectproduct(id in number) is name products.name % type; begin select name into name from products where productid = id; dbms_output.put_line(name); end; set serveroutput on execute selectproduct(301);
true
3bb82b6895626d2a790e0802fbb1870036969a8e
SQL
AmjadMKhan/AnalyticsPipeline
/Develop/05 Data Exploration with SQLOD.sql
UTF-8
261
2.5625
3
[]
no_license
SELECT TOP 100 * FROM OPENROWSET( BULK 'https://<storage_Account>.dfs.core.windows.net/<container_name>/<folder_path>/OrdersByState/part-00000-83ea4f3d-173b-413e-9b7e-45959f6b78d0-c000.snappy.parquet', FORMAT='PARQUET' ) AS [result]
true
7cf1028b3f740d6249e90a90db44bf53bc4e9dd3
SQL
stefanpfriend/Tournament-Capstone
/java/database/schema.sql
UTF-8
5,177
3.96875
4
[]
no_license
BEGIN TRANSACTION; DROP TABLE IF EXISTS team_games, tournament_games, tournament_teams, team_player, invited_players; DROP TABLE IF EXISTS users , tournaments , games , matches , teams; DROP SEQUENCE IF EXISTS seq_user_id; CREATE SEQUENCE seq_user_id INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; ...
true
7f2b6dbdc4452a328774a572c595c204b4468ba3
SQL
laryseptisarim/Project
/laravel.sql
UTF-8
13,350
3.03125
3
[ "MIT" ]
permissive
-- phpMyAdmin SQL Dump -- version 5.0.4 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Waktu pembuatan: 19 Jun 2021 pada 09.03 -- Versi server: 10.4.17-MariaDB -- Versi PHP: 8.0.0 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CH...
true
482275d6a88bf5345313735ab10ace5c8abec097
SQL
eainfo/teste-sistemacadastro
/DBSISTEMACADASTRO.sql
UTF-8
4,298
3.21875
3
[]
no_license
-- MySQL dump 10.13 Distrib 8.0.16, for Win64 (x86_64) -- -- Host: localhost Database: login -- ------------------------------------------------------ -- Server version 5.7.26-log /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULT...
true
c4df655919c29b067b520cafe9bf657e6fb25ad4
SQL
davay521/IS362_Assignment-1-
/Assignment #1 .sql
UTF-8
1,096
3.875
4
[]
no_license
#Part 1 #Question 1 Select count(speed),min(speed) as 'Minimum Distance' ,max(speed) as 'Maximum distance' from planes; #Question 2 select sum(distance) as 'Total distance' from flights Where year ='2013' and month ='1'; #Question 3 Select planes. manufacturer, sum(flights.distance) From flights Inner join plan...
true
d3d56f3c700262495ba4c556fada9a08b1a4f3f9
SQL
l09benavides/webserver
/db.sql
UTF-8
1,369
3.3125
3
[]
no_license
create table tbl_roles ( id INT(10) AUTO_INCREMENT, nombre VARCHAR(10), descripcion VARCHAR(100), Primary key(id) ); create table tbl_usuario ( id INT(10) AUTO_INCREMENT, cedula VARCHAR(10), nombre VARCHAR(50), apellidos VARCHAR(50), telefono VARCHAR(10), email VARCHAR(50), usuario VARCHAR(50), password VARCHAR(15), i...
true
5d55043b277931d70bb90a784759278d9866e887
SQL
ferdn4ndo/infotrem
/legacy/trem_db/tblFerroviaVagaoManga.sql
UTF-8
1,130
3.375
3
[ "MIT" ]
permissive
# tblFerroviaVagaoManga # # DESC: Tabela de armazenamento das mangas dos vagões das ferrovias # TODO: - # NOTES: - # DROP TABLE IF EXISTS tblFerroviaVagaoManga; CREATE TABLE tblFerroviaVagaoManga ( CodFerroviaVagaoManga INT(8) NOT NULL AUTO_INCREMENT PRIMARY KEY COMMENT 'Código de indexação', LetraVagaoMang...
true
7c27e016412b4c4b9c50b3b23a03cd12f66a7827
SQL
addyyg/cancer_data_deepdive
/aggregate-queries.sql
UTF-8
2,368
4.09375
4
[]
no_license
--Looked at the average count of people per population center that had a case of cancer -- with mortality and had an average count over 100. select avg(count) from cancer_stats.Cancer_By_Area_Mortality having avg(count) > 100 --Looked at the average population of each area (state) as long as it was over 9,999,999 th...
true
032f2d33163faa0842bcfe5bcca04cb36ce82800
SQL
edmond-dev/server-bof
/db/query/products.sql
UTF-8
862
3.921875
4
[]
no_license
/* name: CreateProduct :execresult */ INSERT INTO products ( product_id, category_id, image_url_public_id, image_url_secure_id, product_name, product_description, price, quantity_in_stock ) VALUES ( ?, ?, ?, ?, ?, ?, ?, ? ); /* name: UpdateProduct :exec */ UPDATE products SET image_url_public_id =...
true
59dc282a7e5cb8bce8d70d75c9b6d0ad99a0b7d9
SQL
mutedalien/js_chess
/chess.sql
UTF-8
1,258
2.546875
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.9.0.1 -- https://www.phpmyadmin.net/ -- -- Хост: 127.0.0.1:3306 -- Время создания: Май 31 2020 г., 14:56 -- Версия сервера: 10.3.13-MariaDB-log -- Версия PHP: 7.3.9 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SE...
true
2329ee1ecfd81b32908c1527818de777081a28a9
SQL
alexlatam/oxas_app
/administracion/Oxa/CreadorDB.sql
UTF-8
2,688
3.59375
4
[ "MIT" ]
permissive
#CREAR BASE DE DATOS CREATE DATABASE OXA; #CREACION DE TABLAS CREATE TABLE USUARIO ( IDUSUARIO int NOT NULL, CORREO varchar(255), SALUDO varchar(255), DESPEDIDA varchar(255), ACCESSTOKEN varchar(255), REFRESTOKEN varchar(255), PRIMARY KEY (IDUSUARIO), UNIQUE (CORREO) ); CREATE TAB...
true
5e3994a4b34209b0a0780a5036ca92f88140e86d
SQL
RobertWSmith/TD_SQL
/PSI/PSI Monthly - Production Credits.sql
UTF-8
2,248
4.21875
4
[]
no_license
/* Daily Production Credits Query Created: 2014-04-23 Validated against PSMS 2014-04-23 for PBU 01 and Facility N508 - Lawton -- aggregates within 1% of PSMS for the month of 2014-April Aggregates daily credits into monthly buckets */ SELECT CAST( 'Credits' AS VARCHAR(25) ) AS QRY_TYP, CR.PROD_TYP, CR.B...
true
9bb9062638a2f1428d3d8bf611309c3a1095936d
SQL
eobaah/pleasant-polecat
/bookstorereact/database/schema.sql
UTF-8
447
2.8125
3
[]
no_license
DROP DATABASE IF EXISTS pleasantpolecat; CREATE DATABASE pleasantpolecat; \c pleasantpolecat DROP TABLE IF EXISTS booklist; CREATE TABLE booklist ( book_id SERIAL PRIMARY KEY, title VARCHAR(150) NOT NULL, author VARCHAR(150), description VARCHAR(3000), genre VARCHAR(150), image_url VARCHAR(1000) ); COPY ...
true
0a7afe4eeb164c149a163a44ee660ad3cc4a1911
SQL
lancexin/infogiga
/dbstore/mstore.sql
UTF-8
10,232
2.96875
3
[]
no_license
-- MySQL Administrator dump 1.4 -- -- ------------------------------------------------------ -- Server version 5.1.40-community /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNE...
true
6bf4c319b730c0540d0dcdf2a1749252af772d75
SQL
gollucomputers/sarkaree
/mysql.sql
UTF-8
6,477
2.90625
3
[ "MIT" ]
permissive
-- MySQL dump 10.13 Distrib 5.7.23, for Linux (x86_64) -- -- Host: localhost Database: mx -- ------------------------------------------------------ -- Server version 5.7.23-0ubuntu0.16.04.1 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RES...
true
515856a01fcb89d30d0ee3bb4ea4229d8c7b2a0b
SQL
cvranjith/misc
/mick/clear_recon.sql
UTF-8
540
2.671875
3
[]
no_license
undef DCN delete mstb_dly_msg_in where dcn = '&&DCN' / delete RETB_UPLOAD_STATEMENT where UPLOAD_SOURCE_REF_NO = '&&DCN' / delete RETB_UPLOAD_ENTRY where UPLOAD_SOURCE_REF_NO = '&&DCN' / delete retbs_external_statement where UPLOAD_SOURCE_REF_NO = '&&DCN' / delete RETB_EXTERNAL_ENTRY where EXTERNAL_ENTITY||EXTERNA...
true
4287d97afd3eddd008fedbc0eba57401234150e0
SQL
JustinData/GA-WDI-Work
/w03/d03/Ann/receipt_cmd/parent.sql
UTF-8
315
3.71875
4
[]
no_license
#parent name #avg num of presents per parent SELECT SUM(number_of_item) from receipts WHERE parent = 'Dad'; #avg present cost per parent SELECT AVG(price) from receipts WHERE parent = 'Dad'; #order by price desc (each parent) SELECT items from receipts WHERE parent IN ('Dad') ORDER BY price DESC;
true
5addac4e9e1eaf4c977220f7b74edc58ad42ba93
SQL
emine2021/sqlCalisma
/day04_update.sql
ISO-8859-9
1,201
3.484375
3
[]
no_license
CREATE TABLE tedarikCiler ( vergi_no NUMBER(3), firma_ismi VARCHAR2(50), irtibat_ismi VARCHAR2(50), CONSTRAINT pk_ted PRIMARY KEY(vergi_no) DISABLE ); INSERT INTO tedarikciler VALUES (101 , 'IBM', 'Kim Yon'); INSERT INTO tedarikciler VALUES (102 , 'Huawei', 'Cin Li'); INSERT INTO tedarikciler VALUES (103 , 'Erikson', '...
true
3f2be24a60e361ddb68e3a590fc6dd535419a592
SQL
jsyi1995/SCU-COEN-Schoolwork
/COEN178/hw/hw2/tables.sql
UTF-8
565
3.40625
3
[]
no_license
Drop table Rental; Drop table Customer; Drop table Car; Create table Car ( carId varchar(10) PRIMARY KEY, model varchar(25), year numeric(4), bodytype char(5) check (bodytype in ('sedan', 'van', 'suv')), status char(10) check (status in ('available', 'out'))); Create table Customer ( custId varchar(10) PRIMARY KEY, f...
true
457f69764f0a876396fdafcfe02f1fad361e773c
SQL
dalirouissi/restaurent-project
/restaurent/src/main/resources/import.sql
UTF-8
4,176
3.25
3
[]
no_license
DROP TABLE IF EXISTS authorities; CREATE TABLE authorities (id bigint auto_increment not null, username varchar_ignorecase(50) not null, authority varchar_ignorecase(50) not null, constraint fk_authorities_users foreign key(username) references users(username)); INSERT INTO users (id, username, password,enabled) VALUE...
true
deb9ecdb76d7ff7a0dd62578b4924afe0716eafb
SQL
ferkopar/ToDoSchema
/V_EPI_SUBJ.sql
UTF-8
851
3.125
3
[]
no_license
-------------------------------------------------------- -- DDL for View V_EPI_SUBJ -------------------------------------------------------- CREATE OR REPLACE VIEW "V_EPI_SUBJ" ("EPI_ID", "PARAM_TYPE_ID", "VALUE", "UNIT_TYPE_ID", "DESCRIPTION", "CRU", "CRD", "MDU", "MM_ID", "VALUE_TYPE_ID", "ORDER_NO", "UNIT", "FRO...
true
6bdea2ab4a7eb931d1ffebdff1b2ba00434c7a5f
SQL
Psiale/SQL-ZOO
/8 SELF JOIN.sql
UTF-8
1,466
4.46875
4
[]
no_license
-- #1 SELECT COUNT(*) FROM stops -- #2 SELECT id FROM stops WHERE name = 'Craiglockhart' -- #3 SELECT DISTINCT id, name FROM stops JOIN route ON (stops.id = route.stop) WHERE num = '4' AND company = 'LRT' -- #4 SELECT company, num, COUNT(*) FROM route WHERE stop=149 OR stop=53 GROUP BY company, num HAVING COUNT(*) ...
true
0b9eda7890b41fa8109af184d89887eac752952d
SQL
cacalote/wso2-microservices-poc
/kubernetes-mysql/scripts/mysql-customer-db.sql
UTF-8
402
2.78125
3
[ "Apache-2.0" ]
permissive
CREATE DATABASE customer_db; USE customer_db; CREATE TABLE `CUSTOMER` ( `ID` int(11) NOT NULL AUTO_INCREMENT, `FNAME` varchar(100) DEFAULT NULL, `LNAME` varchar(100) DEFAULT NULL, `ADDRESS` varchar(100) DEFAULT NULL, `STATE` varchar(45) DEFAULT NULL, `POSTAL_CODE` varchar(45) DEFAULT NULL, `COUNTRY` varc...
true
b3b7e699c90d287f4bf3136eb796093a77439c7e
SQL
wiltonsg/folhams
/consultas.sql
UTF-8
2,532
3.65625
4
[ "MIT" ]
permissive
# . Copyright (C) 2020 Jhonathan P. Banczek (jpbanczek@gmail.com) # -- DB Browser for SQL -- -- 100 maiores salarios por remuneração base -- :data -- select f.nome as NOME, f.orgao as ORGÃO, f.situacao as SITUAÇÃO, F.CARGO AS CARGO, replace(f.rem_base, '.', ',') as REM_BASE, replace(f.outras_verbas, '.', ',') as O...
true
e13cea1a7f3f53582db37121f692462d1b2fd968
SQL
microsoft/dicom-server
/src/Microsoft.Health.Dicom.SqlServer/Features/Schema/Sql/Sprocs/GetChangeFeedLatestByTimeV39.sql
UTF-8
927
3.546875
4
[ "LicenseRef-scancode-generic-cla", "Apache-2.0", "BSD-2-Clause", "MIT", "MS-PL", "OFFIS", "IJG", "BSD-3-Clause", "LicenseRef-scancode-warranty-disclaimer" ]
permissive
/***************************************************************************************/ -- STORED PROCEDURE -- GetChangeFeedLatestByTimeV39 -- -- FIRST SCHEMA VERSION -- 36 -- -- DESCRIPTION -- Gets the latest dicom change by timestamp /*********************************************************************...
true
64217dd912986d805886ebd954d6b5933fe65210
SQL
rodrigofontanela/contas-pagar
/src/main/resources/db/changelog/migrations/002-create-table-contas-pagar.sql
UTF-8
2,278
3.4375
3
[]
no_license
-- liquibase formatted sql -- changeset rodrigo.fontanela:1 context:dev splitStatements:false create table if not exists contas_pagar.contas_pagar ( id int8 not null, owner varchar(50) not null default current_user, nome varchar(200) not null, valor_original numeric(14,2) null de...
true
1731f8c29ced04b46aba934a62afe8f330c06bcc
SQL
hodefoting/lyd
/lyd/core/lyd-ops.inc
UTF-8
8,903
3.265625
3
[ "ISC" ]
permissive
/* This file defines the core lyd language, adding a new line here adds * support to both virtual machine and compiler for the new instruction. * * The macros used for OUT, ARG etc are documented at the top of lyd-vm.c * * Instructions that need to be infix need special treatment in the compiler. */ /* LYD_O...
true
2e3ef65fac4913cbf940e42bffcccbb5ec1f92c7
SQL
NiharRan/fiverr-invoice
/invoice.sql
UTF-8
3,335
3.390625
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.2.11 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: Apr 07, 2021 at 04:38 PM -- Server version: 5.6.21 -- PHP Version: 5.6.3 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; ...
true
4b233bf4f30051ba4091c99f051314c412f3d0fb
SQL
github188/smartbooks
/SmartThird/河南交通厅高管局网站/08河南省高管局路政信息管理系统/FreeDBScript/package/ORAHYD.PKG_PATROL_QUERY_ddl.sql
GB18030
2,453
3.609375
4
[]
no_license
-- Start of DDL Script for Package ORAHYD.PKG_PATROL_QUERY -- Generated 29--2012 14:31:34 from ORAHYD@ORAHYD CREATE OR REPLACE PACKAGE orahyd.pkg_patrol_query IS /* ---------------------------------------------------------------------------- --̰PKG_PATROL_QUERY --ߣ --ʱ䣺2012-5-07 --˵˰Ѳ־ݲѯ -----------------...
true
47c5589b1655f78136cb0ba41e62ec202660533e
SQL
mfleitao/SQL-Language
/seneca-lab/lab 4/L04_MATHEUS_LEITAO.sql
UTF-8
3,103
4.375
4
[]
no_license
-- *********************** -- Name: Matheus Leitao -- ID: 148 300 171 -- Date: 01/31/2019 -- Purpose: Lab 4 DBS301 -- *********************** -- Question 1 -- Display the difference between the Average pay and Lowest pay in the company. Name this result Real Amount. Format the -- output as currency with 2 decimal pl...
true
911b6446125e595d94d262dea01d9067d533c0f5
SQL
Seif-Abaza/BuyAndSellOnline
/database/database_schema.sql
UTF-8
3,346
3.921875
4
[]
no_license
-- Drop and recreate the database. DROP DATABASE IF EXISTS baso; CREATE DATABASE baso; -- Use the database. USE baso; -- Create groups, such as members, administrators, etc. CREATE TABLE `groups` ( `id` INT(1) NOT NULL, `name` VARCHAR(20) NOT NULL UNIQUE, PRIMARY KEY(`id`...
true
ae1ef4569fc52b63f9a8aa8592e3910897587668
SQL
DanielOfad/showcase
/projects/bookmyshow_clone/sql/review_search.txt
UTF-8
353
2.671875
3
[]
no_license
mysql> SELECT * FROM comments JOIN user ON user.id = comments.user_id WHERE user.name = 'neel'; +----+---------------+---------+----+------+ | id | name | user_id | id | name | +----+---------------+---------+----+------+ | 3 | K3G emotional | 2 | 2 | neel | +----+---------------+---------+----+------+...
true
a3e920c1804ea5c5dac88a72e9549d02affed707
SQL
erankitsrivastava/Algo-Trading-Strategies-PHP
/stock_monthly_values.sql
UTF-8
1,203
3.234375
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.9.0.1 -- https://www.phpmyadmin.net/ -- -- Host: localhost -- Generation Time: Dec 14, 2019 at 08:22 AM -- Server version: 10.3.15-MariaDB -- PHP Version: 7.1.30 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; -- -- Database:...
true
9c2ebb2035fc0cb0a62ab352fd24efdc32f25631
SQL
zhanggang-24/JAVA-01
/Week_07/2021-03-03/dataSouce/version1/table.sql
UTF-8
1,113
3.1875
3
[]
no_license
-- master 库 CREATE DATABASE IF NOT EXISTS master; USE master; CREATE TABLE IF NOT EXISTS account( id INT UNSIGNED AUTO_INCREMENT NOT NULL, name VARCHAR(100) NOT NULL, phone VARCHAR(20) NOT NULL, money DECIMAL(10,2) NOT NULL, PRIMARY key(id) ); insert into account(name,phone,money) values('master-张三','1829999999',...
true
ce4955dd38b38778015b15b952f26409a776d686
SQL
codylee02/babytivities-api
/migrations/001.do.create_project_db.sql
UTF-8
1,263
3.75
4
[]
no_license
CREATE EXTENSION IF NOT EXISTS "uuid-ossp"; CREATE TYPE type AS ENUM ( 'Physical', 'Literacy', 'Art', 'Sensory', 'Science' ); CREATE TYPE age AS ENUM ( '0-3m', '4-6m', '7-12m', '13-24m', '25-36m', '36m+' ); CREATE TABLE babytivities_users ( id uuid DEFAULT uuid_generate_v4 () UNIQUE, username ...
true