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
eed4255f792c2c2bf322a412ef52b26b9aa6ce6c
SQL
Danzki/Tournament
/tables.sql
UTF-8
846
3.09375
3
[]
no_license
create table Team ( TeamId INTEGER PRIMARY KEY UNIQUE NOT NULL, Name VARCHAR NOT NULL, City VARCHAR, Logo VARCHAR ); create table Tournament ( TornamentId INTEGER PRIMARY KEY UNIQUE NOT NULL, Name VARCHAR NOT NULL, Matches INTEGER, Teams INTEGER, Setting INTEGER ); create table Se...
true
8341af58e45597d283f5b550d0022d8c88bbc034
SQL
Sergey-Panchenko/simple-todo-list
/query.sql
UTF-8
2,276
4.96875
5
[]
no_license
--1. SELECT DISTINCT name FROM tasks --2. get the count of all tasks in each project, order by tasks count descending Select projects.name, COUNT(projects.name) as 'count_tasks' FROM projects INNER JOIN tasks on tasks.project_id = projects.id GROUP BY projects.name ORDER BY count_tasks DESC; -- --3. get the count of...
true
4f5edfa50c3434685242b91ede8a3b59c34fc480
SQL
CodeurLibreOuPresque/Back-end
/mysql/AS.sql
UTF-8
668
3.96875
4
[]
no_license
/* Les alias SQL sont utilisés pour donner une table, ou une colonne dans une table, un nom temporaire. Les alias sont souvent utilisés pour rendre les noms de colonne plus lisibles. Un alias n'existe que pour la durée de la requête */ SELECT column_name AS alias_name FROM table_name; FROM table_name AS alias_name...
true
5082a69ea4a13a4cce7d05f4c3f36702e6cd9768
SQL
KurangKering/TravelAlgen
/travel_algen.sql
UTF-8
3,769
3.234375
3
[]
no_license
-- -------------------------------------------------------- -- Host: 127.0.0.1 -- Server version: 10.1.19-MariaDB - mariadb.org binary distribution -- Server OS: Win32 -- HeidiSQL Version: 9.4.0.5169 -- ------------------------------------------------...
true
b2a78c9d1b625d80a22ca3ef6dcbc8bd8c7b3d70
SQL
marcusruas/estudo-sql-intermediario
/Aula12 - Aritmetica.sql
UTF-8
1,882
3.828125
4
[]
no_license
-- FUNCOES DE AGREGACAO NUMERICA CREATE TABLE VENDEDOR( IDVEN INT PRIMARY KEY AUTO_INCREMENT, NOME VARCHAR(30) NOT NULL, SEXO ENUM('M','F') NOT NULL, JANEIRO FLOAT(10,2), FEVEREIRO FLOAT(10,2), MARCO FLOAT(10,2) ); INSERT INTO VENDEDOR(NOME,SEXO,JANEIRO,FEVEREIRO,MARCO) VALUES('Tiago Costa','M',78550.12,12345.99,1000...
true
2d4d1d7ae0309bf4dc6c73f4b87595966440aeab
SQL
EggEggKing/aiqiyi
/video.sql
UTF-8
11,761
3.1875
3
[ "Apache-2.0" ]
permissive
/* Navicat MySQL Data Transfer Source Server : localhost Source Server Version : 50553 Source Host : localhost:3306 Source Database : video Target Server Type : MYSQL Target Server Version : 50553 File Encoding : 65001 Date: 2018-05-16 18:43:30 */ SET FOREIGN_KEY_CHECKS=0; -- ---...
true
161d760953c46a559d8f3a9ba57c5a91cd22f478
SQL
matthcol/Oracle202105
/sql_stage/dba12_day1.sql
UTF-8
607
3.3125
3
[]
no_license
grant create view to movie; -- view documentation : Database Reference -- static view select count(*) from all_tables; select count(*) from dba_tables; -- dynamic view select * from v$session where username = 'MOVIE'; select * from stars where name like 'Bruce Wil%'; -- stars not visible without schema select * from...
true
8012039cbc1531ca8f85bd514147367b51286251
SQL
jgarzonext/plsql-testing
/script_plsql/bd_iaxis/script/Scripts Complementarios/IAXIS-5267/script_iaxis_5267.SQL
UTF-8
4,366
2.6875
3
[]
no_license
/* Formatted on 2019/09/19 13:55 (Formatter Plus v4.8.8) */ BEGIN UPDATE detgaranformula SET clave = 750126 WHERE clave = 750058 AND sproduc = 80007; UPDATE garanformula SET clave = 750126 WHERE sproduc = 80007 AND ccampo = 'IPRITAR'; COMMIT; END; / BEGIN UPDATE detgaranformula ...
true
fc0da3140922e0b56e3804bf60358ba373f2ba25
SQL
CUBRID/cubrid-testcases
/sql/_19_apricot/_11_partitions/cases/_05_index.sql
UTF-8
1,131
3.390625
3
[ "BSD-3-Clause" ]
permissive
-- --+ holdcas on; set system parameters 'dont_reuse_heap_file=yes'; create table tpl(i int) partition by list (i)( partition prime values in (2, 5, 7, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97), partition mul_3 values in (0, 3, 6, 9, 12, 15, 18, 21, 24, 27, 30, 33, 36, 39, 42, 45,...
true
b72a5f1233eb96a0e3bb07b63b7dfebdd4162854
SQL
Zurmansor/bank_app
/src/main/resources/dump.sql
UTF-8
1,569
3.9375
4
[]
no_license
CREATE TABLE client ( id INT(11) PRIMARY KEY NOT NULL, first_name VARCHAR(32) NOT NULL, last_name VARCHAR(32) NOT NULL, email VARCHAR(32), phone VARCHAR(16) NOT NULL, address TEXT, created_at TIMESTAMP DEFAULT 'CURRENT_TIMESTAMP' NOT NULL ); CREATE UNIQUE INDEX client_id_uindex ON client (id...
true
e93db921348a1f4caa987270a1119655b5a29822
SQL
theonlydude/RandomMetroidSolver
/web/database/create_extended_stats.sql
UTF-8
6,808
2.828125
3
[ "MIT" ]
permissive
-- store statistics about item placements create table if not exists extended_stats ( -- uniq identifier for join with item_locs id int unsigned not null auto_increment, -- skill preset randoPreset varchar(32), -- randomizer preset skillPreset varchar(32), -- how many seeds count int unsigned default ...
true
8ab9b95caf18b3939e97590c0a9d72cfd68427fd
SQL
silence-do-good/stress-test-Postgres-and-MySQL
/dump/high/day20/select0031.sql
UTF-8
262
2.921875
3
[]
no_license
SELECT sen.name FROM SENSOR sen, SENSOR_TYPE st, COVERAGE_INFRASTRUCTURE ci WHERE sen.SENSOR_TYPE_ID=st.id AND st.name='WeMo' AND sen.id=ci.SENSOR_ID AND ci.INFRASTRUCTURE_ID=ANY(array['2221','3002','5051','3048','2209','5204','3054','4056','4231','5100_2'])
true
4761cadc5eb782fbe008496e916adad5ced2f3d8
SQL
masterofpubbets/top_sql_db
/sewa/AddInstrumentCalibrationRFINo.sql
UTF-8
254
2.671875
3
[]
no_license
CREATE PROC AddInstrumentCalibrationRFINo @Id INT, @RFI NVARCHAR(100) AS UPDATE tblInstruments SET calibrationRFINo = @RFI WHERE ins_id = @Id UPDATE tblInstruments SET calibration_date = GETDATE() WHERE ins_id = @Id AND calibration_date IS NULL
true
fdd0c1cf51e707dae520a3668b48b5aa12340d08
SQL
VaniEpi/SQL-challenge
/queries.sql
UTF-8
2,555
4.6875
5
[]
no_license
--1. List the following details of each employee: employee number, last name, first name, gender, and salary. SELECT e.emp_no, e.last_name, e.first_name, e.gender, s.salary FROM employees AS e LEFT JOIN salaries AS s ON (e.emp_no = s.emp_no) ORDER BY e.emp_no; --2. List employees who were hir...
true
cf7a7b4d0e95cf7791fe9e7abff641ceda9c33c3
SQL
popovic-marko/UniversityRegister
/university_register.sql
UTF-8
8,222
3.703125
4
[]
no_license
/* SQLyog Community v12.2.1 (64 bit) MySQL - 5.7.9 : Database - university_register ********************************************************************* */ /*!40101 SET NAMES utf8 */; /*!40101 SET SQL_MODE=''*/; /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; /*!40014 SET @OLD_FOREIG...
true
bc436b9bf4f226f94c59f2aa99ff9358bcacd57d
SQL
tart-summer-camp-2011/Fatih-Gudul
/imdb/imdb.sql
UTF-8
4,028
3.40625
3
[]
no_license
CREATE SCHEMA imdb; CREATE TABLE imdb."Album" ( id int4 NOT NULL, photos text NULL, CONSTRAINT pk_album PRIMARY KEY ( id ) ); CREATE TABLE imdb."AwardList" ( "awardID" int4 NOT NULL, "awardType" varchar( 40 ) NULL, CONSTRAINT pk_awardlist PRIMARY KEY ( "awardID" ) ); CREATE TABLE imdb."Awards" ( "awardID" ...
true
58cc87f9be60fc9e2e75bedb350dd0eafea8d245
SQL
EdwinPalacio5/learning-sql
/SQL intermedio-avanzado/17. DDL.sql
ISO-8859-1
2,656
4.125
4
[]
no_license
---------------------------- Lenguaje de Definicin de Datos DDL ----------------------------------- -- ALTER TABLE -- Alter table ADD -- Permite agregar una columna Alter table author Add (LASTNAME varchar(50) Not Null); -- Alter table MODIFY -- Permite modificar la definicin de una columna Alter table author Mod...
true
a1ec91d475e91bfc9da284de11316ca68aba1f23
SQL
itfilip/zend
/scripts/schema.zf-tutorial.sql
UTF-8
504
3.078125
3
[]
no_license
-- scripts/schema.zf-tutorial.sql -- -- You will need load your database schema with this SQL. CREATE TABLE IF NOT EXISTS albums ( id int(11) NOT NULL auto_increment, artist varchar(100) NOT NULL, title varchar(100) NOT NULL, PRIMARY KEY (id) ); CREATE TABLE IF NOT EXISTS users ( id int(11) NOT NULL AUTO_INCREM...
true
20a367816ba4127b5686a3da771c62da82df224e
SQL
tokusato/oracle_shell
/ddl/insert_test.sql
UTF-8
8,896
2.765625
3
[]
no_license
DROP TABLE TEST ; CREATE TABLE TRY.TEST /* TRYスキーマに簡易な表を作成する */( id number, name varchar(60) ); CREATE INDEX idx1 ON TEST(id); INSERT INTO TEST VALUES (1,'ノセ'); INSERT INTO TEST VALUES (2,'シダ'); INSERT INTO TEST VALUES (3,'タバタ'); INSERT INTO TEST VALUES (4,'タケイチ'); INSERT INTO TEST VALUES (5,'ゴウハラ'); INSERT INTO TES...
true
db519175a403264c2531bb59fb81346570933a5c
SQL
NoisyFlowers/LoginTest02
/DataDef/geomapmaker.sql
UTF-8
1,352
3.59375
4
[]
no_license
CREATE EXTENSION postgis; CREATE EXTENSION postgis_topology; CREATE TABLE public.users ( id serial PRIMARY KEY, name text UNIQUE NOT NULL, notes text ); CREATE TABLE public.features ( id serial PRIMARY KEY, user_id integer REFERENCES public.users(id), geom geometry, preceded_by integer REFERENCES public...
true
b7f347b1a8d5ae5c3d569de5c157e971f649d583
SQL
SLSU-MIS/CAPAS-MIS
/sql/capas_tpdb (4).sql
UTF-8
9,118
3.171875
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.4.14 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: Dec 19, 2016 at 10:07 AM -- Server version: 5.6.26 -- PHP Version: 5.6.12 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;...
true
00f10a48f03ff8c58e6c682a479a61081b54c78c
SQL
FireZenk/dokifytest
/dump.sql
UTF-8
1,508
3.265625
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.1.9 -- http://www.phpmyadmin.net -- -- Servidor: localhost:8889 -- Tiempo de generación: 15-06-2014 a las 17:15:36 -- Versión del servidor: 5.5.34 -- Versión de PHP: 5.5.10 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; -- -- Base de datos: `dokifytest` -- -- --...
true
67d3d83e83885742c2ee88ee93d15a29fb9d901e
SQL
andresgalaz/apisql
/hlpDisNoSincro.sql
UTF-8
2,427
3.296875
3
[]
no_license
call prControlCierreTransferenciaInicioDef(0); SELECT w.cPatente , DATE_FORMAT(w.dProximoCierreIni, '%d/%m/%Y') dInicio , DATE_FORMAT(w.dProximoCierreFin, '%d/%m/%Y') dFin , w.nDiasNoSincro , u.cEmail, u.cNombre cNombre /* ...
true
e73b47145862e25150c70ce52d81dee7c29e3e9b
SQL
shakir11/hexlet
/postgresql_ddl/0716_alter_table.sql
UTF-8
792
3.421875
3
[]
no_license
https://www.postgresql.org/docs/9.1/static/sql-altertable.html -- Adding a Column ALTER TABLE products ADD COLUMN description text; ALTER TABLE products DROP COLUMN description; -- Adding a Constraint: (!!!) ALTER TABLE products ADD CONSTRAINT some_name UNIQUE (id); ALTER TABLE products DROP CONSTRAINT some_name; ALT...
true
c6720f8ce2f7b649b938b17808b549f618c0cb6c
SQL
ozzychel/SDP
/database/cassandraDB/cass_schema.cql
UTF-8
11,492
3.84375
4
[ "MIT" ]
permissive
DROP KEYSPACE IF EXISTS calendar; CREATE KEYSPACE calendar WITH replication = {'class': 'SimpleStrategy', 'replication_factor': 1}; USE calendar; DROP TABLE IF EXISTS hotel_by_id_and_title; CREATE TABLE hotel_by_id_and_title ( hotel_id int, title text, zip_code text, address text, url text, rating float, ...
true
b7e02dbef326a98e7818e51fa26b50ca05284d40
SQL
hmotta/sql
/amortizaciones.sql
UTF-8
2,273
3.109375
3
[]
no_license
/* Navicat Premium Data Transfer Source Server : Oficinas Source Server Type : PostgreSQL Source Server Version : 80207 Source Host : sucursal15.cyolomecatl.com:5432 Source Catalog : cajayolo03 Source Schema : sucursal3 Target Server Type : PostgreSQL Target Server Vers...
true
f7a338493c5b7f717c5aae00fc26d3557c102a8a
SQL
sunlongv520/go-micro-v2
/28,课程短评功能、表初步设计/course_topic.sql
UTF-8
2,154
3.453125
3
[]
no_license
/* Navicat Premium Data Transfer Source Server : mysql57 Source Server Type : MySQL Source Server Version : 50721 Source Host : localhost:3307 Source Schema : jt Target Server Type : MySQL Target Server Version : 50721 File Encoding : 65001 Date: 16/05/2020 16:08:48 ...
true
431af0b18670cce9174ac46359d3c62149e3a10d
SQL
JonathanRH07/Control-de-versiones
/DB ICAAVweb/Suite_mig_conf/Stored_Procedures/sp_adm_permiso_role_d.sql
UTF-8
1,109
3.40625
3
[]
no_license
DELIMITER $$ CREATE DEFINER=`suite_deve`@`%` PROCEDURE `sp_adm_permiso_role_d`( IN pr_id_role INT(11), IN pr_id_tipo_permiso INT(11), IN pr_id_submodulo INT(11), OUT pr_affect_rows INT, OUT pr_message VARCHAR(500)) BEGIN /* @nombre: sp_adm_permiso_role_d @fecha:...
true
dbeb3c770c7b3c12ee0f35de1ddab501763cadf9
SQL
vkro/bootcampx
/4_queries/7_average_assistance_wait_time.sql
UTF-8
148
2.59375
3
[]
no_license
-- Calculate average time it take to start an assistance request SELECT AVG(started_at - created_at) AS average_wait_time FROM assistance_requests;
true
a4e095fe989bcdc75ef3eff5128f263870750bd4
SQL
vamsikrish53/PHP-EMAIL
/Email/email.sql
UTF-8
1,963
2.96875
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.5.1 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: Mar 23, 2016 at 04:14 PM -- Server version: 10.1.9-MariaDB -- PHP Version: 5.6.15 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLI...
true
d580d09e34c9c322b9e3b3ede2a5663d48d4fc5e
SQL
ganeshbabuNN/Databases
/RDMS/Oracle Database/Listing 2_13.sql
MacCentralEurope
95
3.40625
3
[]
no_license
select ename from employee where city in (select city from employee where ename = SUNIL);
true
072507be395573b0d8ac23d958be8071972b948b
SQL
isracortes62/ClubImperial
/db/clubimperial.sql
UTF-8
6,394
3.3125
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.0.4 -- http://www.phpmyadmin.net -- -- Servidor: localhost -- Tiempo de generación: 11-11-2013 a las 23:32:10 -- Versión del servidor: 5.6.12-log -- Versión de PHP: 5.4.12 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CH...
true
d0ac4e06f1cbb97e344cea7be8fb0d10ec7e8b3e
SQL
chanel-andchill/and_chill_dbt_repository
/models/bookings/average_daily_rate_per_booking.sql
UTF-8
909
3.96875
4
[]
no_license
{{ config(materialized='view') }} -- Joins the calendar view with ba_bookings to determine the average daily rate. -- Note this model does not consider Airbnb data as we do not have total paid. WITH ba_bookings AS (SELECT * FROM {{ref('ba_bookings')}}), nights_occupied_per_booking AS (SELECT * FROM {{ref('nigh...
true
e0f2b4ce694a7ba2a6ab2c381b0ce04d49da0c04
SQL
rlafferty/oracle-scripts
/poder_pub/sqlt.sql
UTF-8
411
2.734375
3
[]
no_license
column sqlt_sql_text heading SQL_TEXT format a100 word_wrap select hash_value, -- sql_id, -- old_hash_value, child_number chld#, -- plan_hash_value plan_hash, optimizer_mode opt_mode, sql_text sqlt_sql_text from v$sql where lower(sql_text) like lower('%&1%') --and hash_value != (select sq...
true
96ab9a1605d2ecb1758935e887f95ec00e5083ef
SQL
flmch/digitalOcean
/project2/schema.sql
UTF-8
966
3.90625
4
[]
no_license
DROP TABLE IF EXISTS posts; DROP TABLE IF EXISTS comments; DROP TABLE IF EXISTS tags; DROP TABLE IF EXISTS taggings; CREATE TABLE posts ( id integer PRIMARY KEY autoincrement, title text NOT NULL, content text NOT NULL, author text, vote integer DEFAULT 0, email text NOT NULL, commentsCount integer DEFAULT 0, ...
true
5ab59eae11ad3fe6e16295c3ed86c4139e3915b7
SQL
nguyentienlong/solid-tut
/database.sql
UTF-8
3,219
3.125
3
[]
no_license
-- -- PostgreSQL database dump -- 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 = warning; -- -- Name: plpgsql; Type: EXTENSION; Schema: -; Owner: -- CREATE EXTENSION IF NOT EXISTS plpgs...
true
a038af0ab3298db257565eace3bfa9473e15cd95
SQL
fandashtic/arc_chennai
/Sivabalan-SQL/SQL_STORED_PROCEDURE/mERP_sp_List_OLClass_TypeDesc.sql
UTF-8
1,730
2.84375
3
[]
no_license
Create Procedure mERP_sp_List_OLClass_TypeDesc(@CLASSTYPE nVarchar(25)) As Begin If @CLASSTYPE = 'CHANNEL' Select Distinct Channel_Type_Desc,Channel_Type_Code From tbl_mERP_OLClass Where Channel_Type_Active = 1 And Channel_Type_Desc Not In ( select Distinct [Value] From tbl_mERP_RestrictedOLClass Where TypeName =...
true
518f5ff84af1fc5168c0ed7ef37b0f3453ac0997
SQL
javiaspiroz/BBDD
/Twitter/usuario.sql
UTF-8
230
2.953125
3
[ "MIT" ]
permissive
CREATE TABLE IF NOT EXISTS usuario ( id_user INTEGER PRIMARY KEY, email TEXT NOT NULL, username TEXT NOT NULL UNIQUE, psw TEXT NOT NULL, user_type BOOL NOT NULL, id_tw INTEGER, FOREIGN KEY (id_tw) REFERENCES tweet(id_tw) );
true
865447922f03d671e79076b2e86c4a985303a99f
SQL
iservng/bluemark-school-app
/sql/pins.sql
UTF-8
170
2.75
3
[]
no_license
DELIMITER $$ CREATE PROCEDURE student_get_pin_info(IN inPin VARCHAR(100)) BEGIN SELECT pin_id, pin FROM admissionpin WHERE pin = inPin; END $$ DELIMITER ;
true
5002f94df274498d48a253c814609c586c30a5e6
SQL
ticmonares/sci
/sql/sci-bd-llena.sql
UTF-8
34,211
2.890625
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.8.5 -- https://www.phpmyadmin.net/ -- -- Servidor: 127.0.0.1 -- Tiempo de generación: 29-09-2020 a las 17:28:02 -- Versión del servidor: 10.1.38-MariaDB -- Versión de PHP: 5.6.40 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00";...
true
1eb574f2176a35b829f104b8c4b9f1298e696d7e
SQL
ashncook/OrderTracker
/ddl/Initialize_Data.sql
UTF-8
1,024
3.046875
3
[]
no_license
CREATE TABLE CUSTOMER_ORDERS ( ID BIGINT NOT NULL AUTO_INCREMENT, TIME_ORDER_PLACED TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, CUSTOMER_ID BIGINT NOT NULL, RECIPE_ID BIGINT NOT NULL, TIME_ORDER_UPDATED TIMESTAMP NOT NULL DEFAULT CURRENT_TIME...
true
c9f6349065809f03c76f37439ade0518bfdd0e45
SQL
abmiguez/letta
/additional-material/db/letta.full.sql
UTF-8
81,014
4.03125
4
[]
no_license
DROP DATABASE IF EXISTS `letta`; CREATE DATABASE `letta`; USE `letta`; GRANT ALL PRIVILEGES ON letta.* TO 'letta'@'localhost' IDENTIFIED BY 'lettapass'; FLUSH PRIVILEGES; CREATE TABLE `Capital` ( `capital` varchar(20) NOT NULL, PRIMARY KEY (`capital`) ); CREATE TABLE `Registration` ( `uuid` varchar(3...
true
429240f149338b01091c1eac6beec047dd98f14c
SQL
BarbaraKuofie/sql-table-relations-library-lab
/lib/insert.sql
UTF-8
1,253
3.15625
3
[ "LicenseRef-scancode-unknown-license-reference", "LicenseRef-scancode-public-domain" ]
permissive
INSERT INTO series (id, title, author_id, subgenre_id) VALUES (1, 'The hunger games', 1, 1), (2, 'A song of ice and fire', 2, 1); INSERT INTO books (id, title, year, series_id) VALUES (1, "A game of thrones", 1996, 2), (2, "Cathing Fire", 2009, 1), (3, "Mockingjay", 2010, 1), (4, "The hunger games", 2008, 1), (5, "A...
true
11ff8b96d98c6d3309505c6139ad3ef3f009ab53
SQL
kivitendo/kivitendo-erp
/sql/Pg-upgrade2/chart_category_to_sgn.sql
UTF-8
409
2.640625
3
[]
no_license
-- @tag: chart_category_to_sgn -- @description: Fuegt eine Hilfsfunktion ein mit der die interne Reprasentation der Konten (Haben positiv) in die Mehrungsrepraesentation gewandelt werden kann. -- @depends: CREATE OR REPLACE FUNCTION chart_category_to_sgn(CHARACTER(1)) RETURNS INTEGER LANGUAGE SQL AS 'SELECT 1 WH...
true
84730fdbb531fd772d2424468671d95562b8e14a
SQL
conrrak/GestionBasesDatos
/Tema4/scripts/P411.SQL
UTF-8
1,668
3.71875
4
[]
no_license
PROMPT ================================ Practica 11 ================================ PROMPT ________________________________ Ejercicio 1 ________________________________ SELECT AVG(salar) "Salario medio", MIN(salar) "Salario mínimo", MAX(salar) "Salario máximo" FROM EMPLEADOS; PROMPT ___________________...
true
a3b5ada77ca0eafde0bc27cac5d89505380ebd23
SQL
akula-srinu/Customization_Test
/custom/NVWB_FA_Trial_Balance_Vsat.sql
UTF-8
83,009
2.59375
3
[]
no_license
-- ******************************************************************************* -- FileName: NVWB_FA_Trial_Balance_Vsat.sql -- -- Date Created: 2019/Aug/28 06:12:39 -- Created By: nemuser -- -- Source: -- - Package: Package_2018_P11_B1_DEV_NEW -- - Environment: EBSPJD1...
true
ff7aba6e291baee19b014b04ef2e3d12e75c9d9a
SQL
o-uggla/EDAF75
/lab1/d.sql
UTF-8
113
2.765625
3
[]
no_license
SELECT first_name, last_name, ssn FROM students WHERE substr(ssn, 10, 1) % 2 = 0 ORDER BY last_name, first_name
true
7b8b9630d7e89c38cac4a3c6d351a699c56d1dc5
SQL
jha359/Past-Work
/CSE 111/Lab5/jaeha-hwang/test/4.sql
UTF-8
224
3.859375
4
[]
no_license
SELECT n_name, COUNT(DISTINCT c_custkey), COUNT(DISTINCT s_suppkey) FROM nation, customer, supplier WHERE (c_nationkey = n_nationkey AND n_regionkey = 3) AND (s_nationkey = n_nationkey AND n_regionkey = 3) GROUP BY n_name
true
1423f3e2e72971037eb18cc48feb724e50eae882
SQL
kivitendo/kivitendo-erp
/sql/Pg-upgrade2/price_rules.sql
UTF-8
1,198
3.46875
3
[]
no_license
-- @tag: price_rules -- @description: Preismatrix Tabellen -- @depends: release_3_1_0 CREATE TABLE price_rules ( id SERIAL PRIMARY KEY, name TEXT, type TEXT, priority INTEGER NOT NULL DEFAULT 3, price NUMERIC(15,5), discount NUMERIC(15,5), obsolete BOOLEAN NOT NULL DEFAULT FALSE, itim...
true
0d21f6e14569e3dff5ff9eb1a56328ff2bbd578e
SQL
Tognolia/Calsses
/class_3/window_function.sql
UTF-8
1,224
3.546875
4
[ "Apache-2.0" ]
permissive
#Ranks #Build on top of the previous query and rank films by length within the rating category (filter out the rows that #have nulls or 0s in length column). #In your output, only select the columns title, length, rating and the rank. select title, length, RANK() over (order by length ASC) from film; # in this cas...
true
442b3b0ffb8c5046a7835638282fd782017c89a5
SQL
hannavarhan/hogwarts-courses
/src/main/resources/sql_requests/create.sql
UTF-8
4,901
3.328125
3
[]
no_license
CREATE TABLE `answers` ( `id_answer` int unsigned NOT NULL AUTO_INCREMENT, `id_question` int unsigned NOT NULL, `answer` varchar(45) NOT NULL, `is_correct` bit(1) NOT NULL DEFAULT b'0', ...
true
f687aa65c1267131fdc9f2f30e0907036b2909c9
SQL
ajugjacob/application-software-lab
/lab3.sql
UTF-8
844
3.984375
4
[]
no_license
USE lab; CREATE TABLE Employee ( empid VARCHAR(4) NOT NULL, name VARCHAR(10) NOT NULL, designation VARCHAR(30), dob DATE, salary INT, PRIMARY KEY (empid) ); CREATE TABLE Employeedetails ( code INT NOT NULL, age INT, city VARCHAR(30), empid VARCHAR(4), PRIMARY KEY (code), FOREIGN KEY (empid) REFERENCES Emp...
true
166b11e5ec8f2122c56524d3927f1e8eb6e5593e
SQL
KingGodDanny/SQL
/Practice/Practice05.sql
UTF-8
11,738
4.625
5
[]
no_license
/* 21/06/29 SQL_혼합 문제 */ --문제1. --담당 매니저가 배정되어있으나 커미션비율이 없고, 월급이 3000초과인 직원의 --이름, 매니저아이디, 커미션 비율, 월급 을 출력하세요. (45건) select emp.first_name 이름, emp.manager_id 매니저아이디, emp.commission_pct 커미션비율, emp.salary 월급 from employees emp, employees man where emp.manager_id = man.employee_id a...
true
449417b9d11ca320eec37f55eded7dcc5180d64c
SQL
gyawalirajiv/Database-Problems
/80-driversInfo/driversInfo.sql
UTF-8
1,391
4.09375
4
[]
no_license
CREATE PROCEDURE driversInfo() BEGIN /*order by two things: driver_name and date create names table and dates table, join on driver_name*/ CREATE TABLE IF NOT EXISTS Names( min_date DATE, driver_name VARCHAR(20), name_info VARCHAR(100) ); INSERT INTO Names SELECT ...
true
384c241996ef06b82e5c87a52ddc8f01cb2ac5f0
SQL
nguio/SIINCO_web
/FormasOracleForms/Repautw95/SQL/PlSugRes.sql
UTF-8
3,106
2.84375
3
[]
no_license
SET TERMOUT ON set underline = col men heading '|||Generando Plano Sugerido a Comprar Varios Proveedores (&&1..csv)|Espere por favor|' format a100 select '....................................' men from dual / SET TERMOUT OFF SET SPACE 0 SET LINESIZE 300 SET PAGESIZE 35 SET ECHO OFF SET FEEDBACK OFF SET VERIFY OFF SET...
true
4d10202b70bf2effbdaa770a73e38bbd78174d84
SQL
jongvin/werp
/werp/erpw/general/t_web/sql/Function/F_T_GetBudgFirstSeq.sql
UTF-8
1,532
3.140625
3
[]
no_license
Create Or Replace Function F_T_GetBudgFirstSeq ( Ar_COMP_CODE Varchar2, Ar_DEPT_CODE Varchar2, Ar_CLSE_ACC_ID Varchar2, Ar_CRTUSERNO Varchar2 ) Return Number Is Pragma Autonomous_transaction; lnSeq Number; Begin Lock Table T_BUDG_DEPT_H In Exclusive Mode ; Begin Select Min(CHG_SEQ) Into ...
true
2375ab0a764eed4a9dde52b76888ce93b0427308
SQL
qzztf/ideaconfig
/config/consoles/db/031e5abb-206c-4ff3-a0c7-774a3a14d091/console_35.sql
UTF-8
696
3.3125
3
[]
no_license
SELECT f.* FROM (SELECT d.apply_no, e.outside_status,d.handle_time,d.matter_key FROM (SELECT a.apply_no, b.handle_time, b.matter_key FROM biz_apply_order a INNER JOIN biz_order_matter_record b ON a.apply_no = b.apply_no AND (a.partner_insurance_id LIKE concat('X...
true
47f9d9185134f54ddaaa2f12166a5b0fc8a0bea8
SQL
i-am-phoenix/rice-btcmp-hw9-sql-challenge
/queries.sql
UTF-8
2,893
4.65625
5
[]
no_license
DROP VIEW ALL_IN_ONE_TABLE CREATE VIEW ALL_IN_ONE_TABLE AS (SELECT DISTINCT EMPLOYEES.EMP_NO, EMP_TITLE_ID, TITLES.TITLE, BIRTH_DATE, FIRST_NAME, LAST_NAME, SEX, HIRE_DATE, DEPT_EMP.DEPT_NO, DEPARTMENTS.DEPT_NAME, SALARIES.SALARY FROM EMPLOYEES INNER JOIN SALARIES ON SALARIES.EMP_NO ...
true
e28460c7545d0c683af4c865a2e930ea035dd2b6
SQL
CodeAshing/inventory-management-system
/Data base/create payyment(I).sql
UTF-8
1,308
3.09375
3
[]
no_license
use ALROUGI create table Ipay( رقم_الهوية int IDENTITY(1,1) primary key, رقم_العقد int FOREIGN KEY REFERENCES التركيب(رقم_العقد), ااسم_العميل nvarchar (100) collate arabic_ci_ai , التيليفون nvarchar (100) collate arabic_ci_ai, القسط BIGint , قيمة_العقد BIGint, النسبة_المئوية float , ...
true
b317da4f366719c0045e4b8c0d0bccdf65b6a0d5
SQL
btdiem/Java
/Projects/Evoter/evoter_server/db/select_query.sql
UTF-8
742
4.09375
4
[]
no_license
-- select user, user type and subject select subject.title, user.username, user.email_address, user.passwd, user_type.user_type_value from subject, user, user_subject, user_type where subject.id=3 and subject.id=user_subject.subject_id and user_subject.user_id=user.id and user.user_type_id=user_type.id ; -- selec...
true
088f260da3f3d3ea12ae15e78b8face0c75c6923
SQL
VictorZ94/holbertonschool-higher_level_programming
/0x0E-SQL_more_queries/7-cities.sql
UTF-8
295
3.125
3
[]
no_license
-- Create a table with constrants -- CREATE TABLES CREATE DATABASE IF NOT EXISTS hbtn_0d_usa; USE hbtn_0d_usa; CREATE TABLE IF NOT EXISTS cities(id INT UNIQUE AUTO_INCREMENT NOT NULL PRIMARY KEY, state_id INT NOT NULL, name VARCHAR(256) NOT NULL, FOREIGN KEY(state_id) REFERENCES states(id));
true
9a4c187cc2b7ac218eec41f80feca66af6cc0f94
SQL
qi330553352/spring-cloud-1.0
/sql/book-db.sql
UTF-8
4,798
3.53125
4
[]
no_license
CREATE DATABASE /*!32312 IF NOT EXISTS*/`book-user` /*!40100 DEFAULT CHARACTER SET utf8 */; USE `book-user`; DROP TABLE IF EXISTS `user`; CREATE TABLE `user` ( `id` int(10) NOT NULL AUTO_INCREMENT COMMENT '自增主键', `user_name` varchar(50) DEFAULT NULL COMMENT '用户名', `password` varchar(50) NOT NULL COMMENT '密码', ...
true
83d6869543262640e666b704ba4f500ad97c9dad
SQL
CUBRID/cubrid-testcases
/sql/_13_issues/_12_2h/cases/bug_bts_8321_1.sql
UTF-8
718
2.875
3
[ "BSD-3-Clause" ]
permissive
-- default values CREATE TABLE tt1 (id integer, m1 monetary default \TL10.15, m2 monetary default \KHR10.15, m3 monetary default \IRP10.15, m4 monetary default \RBL10.15, m5 monetary default \AUD10.15, m6 monetary default \CAD10.15, m7 monetary default \BRL10.15, m8 monetary default \RON10.15, m9 monetary default \EUR...
true
2aeaa5eb1734fddc955a1396efa76add6941c3a2
SQL
faraby7/Covoiturage
/covoiturage.sql
UTF-8
15,216
3.25
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.7.4 -- https://www.phpmyadmin.net/ -- -- Hôte : 127.0.0.1 -- Généré le : Dim 02 déc. 2018 à 12:56 -- Version du serveur : 10.1.30-MariaDB -- Version de PHP : 7.2.1 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 ...
true
7f7c9d794fc64d7387b9656607ef076c4ec289ae
SQL
isha060701/DBMS_Lab
/Lab4/student_db.sql
UTF-8
2,897
4.46875
4
[]
no_license
create database student_db; use student_db; CREATE TABLE student( snum INT, sname VARCHAR(10), major VARCHAR(2), lvl VARCHAR(2), age INT, primary key(snum)); CREATE TABLE faculty( fid INT,fname VARCHAR(20), deptid INT, PRIMARY KEY(fid)); CREATE TABLE class( cname VARCHAR(20), metts_at TIMESTAMP, room V...
true
7f64bc65d1b72e6eaecf2eda8c9421aa01c6ff00
SQL
abeob1/sg-ab-isdn
/PO ETA Date Listing/3. HANA Script/AE_SP001_ETADateListings.sql
UTF-8
4,871
3.65625
4
[]
no_license
CREATE PROCEDURE "AE_SP001_ETADateListings" (IN PONO VARCHAR(20) , IN PRDNO VARCHAR(20)) AS LPONO INT; LPRDNO INT; BEGIN IF PONO = '' THEN LPONO := 0; ELSE LPONO := TO_INTEGER(PONO); END IF; IF PRDNO = '' THEN LPRDNO := 0; ELSE LPRDNO := TO_INTEGER(PRDNO); END IF; CREATE COLUMN TABLE ORDRINFO ...
true
4248d75470ef37245766a72e94b6223119bf84d8
SQL
aravindharov/student_management
/student_management.sql
UTF-8
3,204
3.34375
3
[ "MIT", "LicenseRef-scancode-unknown-license-reference" ]
permissive
-- phpMyAdmin SQL Dump -- version 4.9.2 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1:3306 -- Generation Time: Jun 21, 2021 at 07:50 PM -- Server version: 10.4.10-MariaDB -- PHP Version: 7.0.33 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SE...
true
14e41f1f5ccc4fb1f6d993652950266cef6be64d
SQL
Dedimoe/excel2collections
/plugin/process_type_plugin_nl_amis_scheffer_process_excel2collection.sql
UTF-8
38,873
2.921875
3
[ "MIT" ]
permissive
set define off set verify off set serveroutput on size 1000000 set feedback off WHENEVER SQLERROR EXIT SQL.SQLCODE ROLLBACK begin wwv_flow.g_import_in_progress := true; end; / -- AAAA PPPPP EEEEEE XX XX -- AA AA PP PP EE XX XX -- AA AA PP PP EE XX XX -- ...
true
a8e934af57ec39e18455218b5b0b0f3ea0412d5b
SQL
IvyLu/leetcode
/Database.sql
UTF-8
730
4.46875
4
[]
no_license
# 175. Combine Two Tables select p.FirstName, p.LastName, a.City, a.State from Person p left outer join Address a on p.PersonId = a.PersonId # 176. Second Highest Salary select max(salary) as SecondHighestSalary from Employee where salary < (select max(salary) from Employee) #177. Nth Highest Salary select distinct...
true
390ddde954b63a0cb9ad86ca3c713ef8d64d0877
SQL
mtunc000/FriendFinder
/schema.sql
UTF-8
811
3.296875
3
[]
no_license
DROP DATABASE IF EXISTS friendFinderDB; CREATE DATABASE friendFinderDB; USE friendFinderDB; -- Create the table plans. CREATE TABLE findFriends( id INT NOT NULL AUTO_INCREMENT, name VARCHAR(255) NOT NULL, q1 INTEGER, q2 INTEGER, q3 INTEGER, q4 INTEGER, q5 INTEGER, q6 INTEGER, q7 INTEGER, q8 INTEGER, q9 INTEGER, q10 I...
true
f7cffa557bbd2e7a2241c99b6431a55b67117cb7
SQL
rinostrozacl/erp
/erp.sql
UTF-8
31,771
3.34375
3
[ "MIT" ]
permissive
-- -------------------------------------------------------- -- Host: 127.0.0.1 -- Versión del servidor: 5.7.19 - MySQL Community Server (GPL) -- SO del servidor: Win64 -- HeidiSQL Versión: 10.1.0.5464 -- -------------------------------------------------------- /...
true
7e687366536ed11dedbd43b6f7e6f22688cf7c37
SQL
sergeiboikov/SergeiBoikov-DWH
/SergeiBoikov-DWH/dwh/Tables/DimLocation.sql
UTF-8
674
2.859375
3
[]
no_license
CREATE TABLE [dwh].[DimLocation] ( [DimLocationKey] BIGINT IDENTITY (1, 1) NOT NULL, [Latitude] DECIMAL(5,3) NOT NULL, [Longitude] DECIMAL(5,3) NOT NULL, [sysCreatedAt] DATETIME CONSTRAINT [DF_DimLocation_sysCreatedAt] DEFAULT (getutcdate()) NULL, [sysChangedAt] DATE...
true
2c39aed9db36c2f58438e63ac84a920222494cea
SQL
wenxiaphp/OcaloneShop
/stuff/sql/ocaloneshop.sql
UTF-8
866
2.609375
3
[ "MIT" ]
permissive
/* Navicat MySQL Data Transfer Source Server : 47.93.121.52 Source Server Version : 50718 Source Host : localhost:3306 Source Database : ocaloneshop Target Server Type : MYSQL Target Server Version : 50718 File Encoding : 65001 Date: 2017-10-31 15:05:02 */ SET FOREI...
true
ef34e7404baafb83407aac04263b0781a108d0e8
SQL
Aakashbist/PhpOnlineStore
/database_tables/database/onlinestore.sql
UTF-8
17,109
2.71875
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.6.6deb5 -- https://www.phpmyadmin.net/ -- -- Host: localhost:3306 -- Generation Time: Oct 04, 2019 at 03:39 AM -- Server version: 5.7.27-0ubuntu0.18.04.1 -- PHP Version: 7.2.19-0ubuntu0.18.04.2 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHA...
true
81971bfc85fe8b4fb935ba2dbf3fea399391fe22
SQL
shujianhui/ihealthbaby-hospital
/target/classes/sql/db-schema.sql
UTF-8
6,165
3.59375
4
[]
no_license
-- ---------------------------- -- Table structure for `cat_option` -- ---------------------------- DROP TABLE IF EXISTS `cat_option`; CREATE TABLE `cat_option` ( `id` bigint(20) NOT NULL AUTO_INCREMENT, `cat_option_name` varchar(100) DEFAULT NULL COMMENT '选项名', `cat_option_detail` varchar(100) DEFAULT NULL COMME...
true
c93030587ec9e2baf0448fec46d8e00127f61951
SQL
powerstack/powerstack-blog
/app/sql/pgsql.sql
UTF-8
757
3.328125
3
[ "MIT", "LicenseRef-scancode-unknown-license-reference" ]
permissive
CREATE TABLE users( id SERIAL NOT NULL PRIMARY KEY, username VARCHAR(32) UNIQUE, password TEXT NOT NULL, roles TEXT NOT NULL, name VARHCAR(100) NOT NULL ); CREATE TABLE posts( id SERIAL NOT NULL PRIMARY KEY, author INTEGER NOT NULL, title VARCHAR(255) NOT NULL, content TEXT NOT NULL...
true
9690240e47c2736427778118e05d49d7b18e2b9d
SQL
824zzy/Leetcode
/_misc/SQL/Select/595_Big_Countries_L0.sql
UTF-8
140
2.671875
3
[]
no_license
""" https://leetcode.com/problems/big-countries/ """ select name, population, area from World where area>=3000000 or population>=25000000;
true
71182814de21b1fe4529f8c2801dbe9cc5c043aa
SQL
mrachelb/lookafter-project
/sql/calendar_need.sql
UTF-8
380
2.921875
3
[]
no_license
DROP TABLE IF EXISTS calendar_need; CREATE TABLE calendar_need ( id SERIAL PRIMARY KEY, user_id INTEGER NOT NULL REFERENCES users(id), hood VARCHAR, title VARCHAR NOT NULL CHECK (title <> ''), event_start VARCHAR NOT NULL CHECK (event_start <> ''), event_end VARCHAR NOT NULL CHECK (event_end <>...
true
186eb4289f3fa6c77671889818520c2e63df84f2
SQL
RahulMadhukaKeshara/mini-project
/bookshop-2/database/bookshop.sql
UTF-8
4,908
3.109375
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.8.4 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1:3309 -- Generation Time: Aug 03, 2020 at 01:31 PM -- Server version: 5.7.24 -- PHP Version: 7.2.14 SET FOREIGN_KEY_CHECKS=0; SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:0...
true
f511c0c4b9590ef5c02518384a165f6f7805423a
SQL
keiwatanabe42/practice_SQL
/chap3/3-3/103_having2.sql
SHIFT_JIS
208
2.890625
3
[]
no_license
-- iނŃO[vA̔P̕ς2500~ȏ̂̂o SELECT shohin_bunrui, AVG(hanbai_tanka) FROM Shohin GROUP BY shohin_bunrui HAVING AVG(hanbai_tanka) >= 2500;
true
fdf3bdb0acace3b8acbcc7b71dd66f1767ade19c
SQL
Stuti-3001/Covid_Data_Analysis_SQL
/covid_analysis_sql.sql
UTF-8
3,711
4.46875
4
[]
no_license
#Total_cases vs Population #(Shows what percentage of the country's population had covid on a particular day) SELECT location, str_to_date(DATE,'%d-%m-%Y'), total_cases, population, (total_cases/population)*100 AS percentage_infected FROM covid_deaths WHERE location="India" ORDER BY location, str_to_date(DATE,'%d-%m-...
true
1b7e22b69ca0139b22946c4599d4a42c21527fdb
SQL
kang772421912/ArkPHP
/pecan/arkphp.sql
UTF-8
441
2.6875
3
[ "Apache-2.0" ]
permissive
USE arkblog; CREATE TABLE `ark_post` ( `id_ark_post` int(11) DEFAULT NULL AUTO_INCREMENT PRIMARY KEY, `title` varchar(16) DEFAULT NULL, `content` text DEFAULT NULL, `md_content` text DEFAULT NULL, `category` varchar(32) DEFAULT NULL, `tag` varchar(100) DEFAULT NULL, `user_id` varchar(100) DEFAULT NULL, ...
true
62953cb26f7a3a5df638739f469a17910d551bde
SQL
marcvifi10/Programacio-web-PICE
/9 - PHP/BDD/bdd36/sql/tienda-19022018.sql
UTF-8
9,885
3.296875
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.7.4 -- https://www.phpmyadmin.net/ -- -- Servidor: 127.0.0.1 -- Tiempo de generación: 19-02-2018 a las 09:43:36 -- Versión del servidor: 10.1.26-MariaDB -- Versión de PHP: 7.1.9 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; ...
true
c496bd50a37e9d6caf6c0d919e7f1e180171d5af
SQL
clathrop75/PortfolioManager
/database/watchlistitems.sql
UTF-8
1,642
3.234375
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.1.14 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: Nov 16, 2015 at 08:39 PM -- Server version: 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 */;...
true
29c120bd28042df543d09c42ee39a3871fd72998
SQL
edgarmeneses/PlataformaSerpenO
/scripts/ctconvenio.sql
UTF-8
510
2.53125
3
[]
no_license
-- Nombre del archivo: ctconvenios -- Descripcion: creacion de la tabla CONVENIOS -- Creado por: Eliana Ayala, Diana Gonzales, Edgar Meneses, Daniela Blanco -- Fecha creacion: 28 de abril del 2015 -- Ultima modificacion por: Diana Gonzalez -- Fecha ultima modificacion: 28 de abril del 2015 -- Revisado por: -- Fe...
true
1c46f73609714e3d8253049527386c0c2b44bffc
SQL
fredtucs/application-web-template
/src/main/resources/sql/trigger.sql
UTF-8
2,311
3.3125
3
[]
no_license
CREATE OR REPLACE TRIGGER comprobante_pago_before_insert BEFORE INSERT OR UPDATE ON t_comprobantepago FOR EACH ROW WHEN (new.codigo IS NULL) DECLARE v_codigo VARCHAR2(50); v_idexp NUMBER(19); BEGIN v_idexp := :new.idexpedientepago; SELECT lpad(nvl(max(cast(cp.codigo AS NUMBER(10, 0))), 0) + 1, 5, '0...
true
00b648c84aa259b06881d59af821c69aca3779a8
SQL
uday001/CmpE_272_FALL14_TEAM12
/sql files/nodejs_rate.sql
UTF-8
2,433
3.078125
3
[]
no_license
CREATE DATABASE IF NOT EXISTS `nodejs` /*!40100 DEFAULT CHARACTER SET utf8 */; USE `nodejs`; -- MySQL dump 10.13 Distrib 5.6.17, for Win32 (x86) -- -- Host: 127.0.0.1 Database: nodejs -- ------------------------------------------------------ -- Server version 5.6.21-log /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CH...
true
52c3733f288e5c6c8d87a45c769200f826733ce6
SQL
hhhcccggg/dbj
/adminserver/src/main/resources/db/migration/V11__encashment.sql
UTF-8
1,964
2.828125
3
[]
no_license
ALTER TABLE `core_userCoinTypes` ADD `lockedCoins` bigint NOT NULL DEFAULT 0; ALTER TABLE `core_userCoinDetails` ADD `tradeNo` varchar(128) NULL; ALTER TABLE `core_userCoinDetails` ADD `tradeType` varchar(50) NULL; CREATE TABLE `core_enCashAccounts` ( `id` bigint NOT NULL, `createTime` timestamp NOT NULL DE...
true
a5d308f13ae933d549eda465a6fec32f2629ce2e
SQL
Katsarov/DB
/06.Built-In_Functions_Excersise/10_RankEmployeesBySalary.sql
UTF-8
204
4
4
[ "MIT" ]
permissive
SELECT EmployeeID, FirstName, LastName, Salary, DENSE_RANK() OVER(PARTITION BY Salary ORDER BY EmployeeID) AS [Rank] FROM Employees WHERE Salary BETWEEN 10000 AND 50000 ORDER BY Salary DESC
true
329536af8e4e0afcd38b62d7bad9d723445b731e
SQL
CMKawser7476/basicsqltest
/group_by.sql
UTF-8
677
3.078125
3
[]
no_license
-- group by sql SELECT article, color FROM shirt_table; SELECT article, description FROM shirt_table GROUP BY article; SELECT article, COUNT(*) FROM shirt_table GROUP BY article; SELECT article, size, last_worn FROM shirt_table; SELECT article, description, last_worn FROM shirt_table GROUP BY last_worn; S...
true
247038bbb23d8b4c230a00124e1c75829a1c56a2
SQL
Bekzod5/Avtopark
/conf/evolutions/default/1.sql
UTF-8
653
3.171875
3
[]
no_license
# --- Created by Slick DDL # To stop Slick DDL generation, remove this comment and start using Evolutions # --- !Ups create table "BUSSY" ("ID" SERIAL NOT NULL PRIMARY KEY,"NAME" VARCHAR(254) DEFAULT '' NOT NULL); create table "CARLIST" ("ID" SERIAL NOT NULL PRIMARY KEY,"NOMI" VARCHAR(254) DEFAULT '' NOT NULL,"MODELI...
true
d94d778ce6068c71fbd5486e6ad738a0d0c2514a
SQL
lequangphu/lequangphu.github.io
/blog/posts/base-supply-side-growth/queries/contract_conversion.sql
UTF-8
3,292
4.5
4
[ "GPL-3.0-only" ]
permissive
with _txs AS ( SELECT BLOCK_TIMESTAMP, FROM_ADDRESS, TO_ADDRESS, TX_HASH FROM base.goerli.fact_transactions WHERE STATUS = 'SUCCESS' AND BLOCK_TIMESTAMP < CASE WHEN CURRENT_DATE < '2023-03-27' THEN CURRENT_DATE ELSE '2023-03-27' END ), _deployed_txs AS ( S...
true
37f5d6b44557cc82259265587f0b5f108b6fb61e
SQL
pacificnm/pacificnm-category
/sql/category.sql
UTF-8
1,709
3.25
3
[ "BSD-3-Clause" ]
permissive
-- phpMyAdmin SQL Dump -- version 4.2.12deb2+deb8u2 -- http://www.phpmyadmin.net -- -- Host: localhost -- Generation Time: Jan 08, 2017 at 09:19 PM -- Server version: 10.0.28-MariaDB-0+deb8u1 -- PHP Version: 5.6.29-0+deb8u1 SET FOREIGN_KEY_CHECKS=0; SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; --...
true
3dcf5988eea2e1c55c39fdebeb51d0fbc6f579a3
SQL
mannhuynh/PLSQL-by-Khaled-Part2
/Section 19 - Using the PLSQL Compiler/chapter-19-part-1.sql
UTF-8
932
2.859375
3
[]
no_license
SELECT name, value FROM v$parameter WHERE name ='plsql_code_type' ; drop procedure p1; create or replace procedure p1 is begin dbms_output.put_line('P1'); end; select * from user_plsql_object_settings where name ='P1'; ALTER SESSION SET plsql_code_type=native; --you can do alter system, but this f...
true
8ddb6fac53c937b7df7f5ef94621f5b2433eefaf
SQL
angelcardoflores/a2800276
/remote-js/src/sql/events.sql
UTF-8
514
3.015625
3
[]
no_license
drop table EVENTS; create table EVENTS ( EVENT_ID integer primary key autoincrement, -- need this to determine order SES int, PACKAGE int, -- need this to determine order also TYP int, TIME int, X int, Y int ); drop table SESSIONS; -- collect once per session on intialization. create table SESSIONS ( SES int...
true
0c04491fa4326dbd7df990e8264322e92f2943c7
SQL
iTerminate/Taskington
/docs/schema.sql
UTF-8
4,484
3.96875
4
[ "MIT" ]
permissive
DROP TABLE IF EXISTS "role" CASCADE; Create Table "role" ( "id" SERIAL NOT NULL, "name" VARCHAR(30) NOT NULL, description VARCHAR(200), CONSTRAINT role_pkey PRIMARY KEY (Id), UNIQUE("name") ); DROP TABLE IF EXISTS beamline CASCADE; Create Table beamline ( Id SERIAL NOT NULL, Name VARCHAR(30) NOT ...
true
d1fd8b07fbf2d9a471ec3c7379a1b1796d71b083
SQL
OpenTenure/database
/config/users.sql
UTF-8
8,601
2.75
3
[]
no_license
-- -- PostgreSQL database dump -- -- Dumped from database version 9.5.3 -- Dumped by pg_dump version 9.5.3 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 = warning; SET row_security = off; ...
true
94e48b874f8c3ac08c16011a9c5091cb66dd376d
SQL
IliaIliev94/SoftUni-Work
/C# MS SQL/Indices and Data Aggregation Exercise/02. Longest Magic Wand Solution 2.sql
UTF-8
120
2.640625
3
[]
no_license
SELECT TOP(1) MagicWandSize AS LongestMagicWand FROM WizzardDeposits GROUP BY MagicWandSize ORDER BY MagicWandSize DESC
true
cc795d7b5451f765dc4de0351cad6a57cfe11d4f
SQL
ytyaru/Sqlite3.Syntax.Default.Constraint.20190830065938
/src/literal_insert.sql
UTF-8
854
3.015625
3
[ "CC0-1.0" ]
permissive
create table A(A int default 0, B int); create table B(A int default -1, B int); create table C(A real default -0.1, B int); create table D(A text default 'A', B int); create table E(A blob default x'00', B int); create table F(A text default NULL, B int); create table G(A text default CURRENT_TIME, B int); create ta...
true
09908af83165985dca45799a26119860e58e90f0
SQL
cregmi/etextbook
/EtextbookSystem/include/tables.sql
UTF-8
1,640
3.828125
4
[]
no_license
CREATE database library; USE library; DROP TABLE IF EXISTS book; CREATE TABLE book ( id smallint unsigned NOT NULL auto_increment, name varchar(100) NOT NULL, description_tag varchar(100) NOT NULL, language_tag varchar(100) NOT NULL, entry_date datetime NOT NULL, pdf_file_name varchar(100) NOT NULL, image_f...
true