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
e532ec420b1e1dd40f17944f10b38eff587b73a5
SQL
nyluke/geointerestingness
/build_db.sql
UTF-8
380
3.703125
4
[]
no_license
create table t_geo ( country varchar(255) ); alter table t_geo add constraint ct_country_geo unique ( country ) ; create table t_photo ( id int not null primary key, country varchar(255) ); alter table t_photo add constraint fk_country_photo_geo foreign key ( country ) references t_geo ( country ); ...
true
89b076b67d8def33fb952e0bde78691b5b4275de
SQL
Dario23797/my_workspace
/sql/.svn/text-base/br.sql.svn-base
UTF-8
8,905
3.78125
4
[]
no_license
drop database BR; /*create database BR DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci; use BR; */ create database BR; use BR; /*用户表*/ create table USER ( id varchar(32) primary key, user_name varchar(255), user_id varchar(20), /*学生号或教师工号*/ user_password varchar(50), first_login_time dateti...
true
56ccf76d97d4eed2d5fae0b08f3940c8addc4239
SQL
antoniofern/bd2-scripts
/functions-procedures-II/8.sql
UTF-8
242
2.9375
3
[ "MIT" ]
permissive
delimiter // CREATE OR replace procedure nome_milhas(codCliente int) contains SQL BEGIN SELECT cl.nome, m.quantidade FROM cliente cl, milhas m WHERE cl.codigo = codCliente AND m.cliente = codCliente; END // delimiter ; CALL nome_milhas(1);
true
4ef09ffd5c1ba0066ccd7a551393897ac12d6be4
SQL
wpalomo/fguerrero
/sql/Retenciones_Recibidos.sql
UTF-8
1,101
3.171875
3
[]
no_license
Select * from retenreci select distinct d.code, scode, sname, d.fecha, d.scedula, d.sruc, d.num, d.nomdoc, d.subconiva, d.subsiniva, d.descuconiva, d.descusiniva, d.montototal, f.valorren, f.valoriva, f.numret from vdocuments d left join retenreci f on (d.code=f.code) where d.code=328343 and d.isaccount and n...
true
e7306a7cbb8252a665e359fae7093c92a2f0c729
SQL
vijaydairyf/TimelyFish
/SolomonApp/dbo/Stored Procedures/dbo.ARDoc_Bat_Cust_Type_Ref2.sql
UTF-8
415
2.75
3
[]
no_license
 /****** Object: Stored Procedure dbo.ARDoc_Bat_Cust_Type_Ref2 Script Date: 4/7/98 12:30:32 PM ******/ CREATE PROCEDURE ARDoc_Bat_Cust_Type_Ref2 @parm1 varchar (10), @parm2 varchar (15), @parm3 varchar ( 2), @parm4 varchar ( 10) as SELECT * FROM ARDoc WHERE CpnyId = @parm1 AND CustId = @parm2 AND DocType ...
true
d0df93f5889cbe5a253b7b967b780ae71c662bba
SQL
luisroel/apq
/spAPQ_Execute_Runtime.sql
UTF-8
1,354
2.59375
3
[]
no_license
drop procedure if exists `spapq_execute_runtime`; delimiter $$ create procedure `spapq_call_runtime`( idruntime bigint ) begin -- By Summary call `spapq_create_equipmentsummary`( idruntime ); call `spapq_create_availabilitysummary`( idruntime ); call `spapq_create_prodtimessummary`( idruntime ); call `spapq_crea...
true
e9b4115acc90543f2dd50846c57ce9ee76608cd5
SQL
penelopeg/daw
/create.sql
UTF-8
5,414
3.546875
4
[]
no_license
CREATE TABLE user_type ( id INT(6) AUTO_INCREMENT PRIMARY KEY, type VARCHAR(30) NOT NULL ); CREATE TABLE product_category ( id INT(6) AUTO_INCREMENT PRIMARY KEY, category VARCHAR(30) NOT NULL ); CREATE TABLE order_status ( id INT(6) AUTO_INCREMENT PRIMARY KEY, status VARCHAR(30) NOT NULL ); CREATE TABLE country( id ...
true
8f808ffde0e937fa334e7e3e69d3ea6167b988fa
SQL
AlyaSelviaTamzila/Rest-API-Authentication
/penyewaan_mobil.sql
UTF-8
5,253
3.109375
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.8.3 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Nov 30, 2020 at 10:48 AM -- Server version: 10.1.36-MariaDB -- PHP Version: 7.2.10 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OL...
true
1ccafae92d7f23fa611edbd781b8e048bc4a758a
SQL
cncf/devstats
/util_sql/inactive_prs_wip.sql
UTF-8
6,275
3.71875
4
[ "Apache-2.0" ]
permissive
with dtfrom as ( select '{{to}}'::timestamp - '3 months'::interval as dtfrom ), dtto as ( select case '{{to}}'::timestamp > now() when true then now() else '{{to}}'::timestamp end as dtto ), issues as ( select distinct sub.issue_id, sub.user_id, sub.created_at, sub.event_id from ( select distinc...
true
19fd5eb0d34e00b2ff101dc8efcfcc338b220709
SQL
planetacomputer/phpFoment2016
/sql/ej2-1.sql
UTF-8
664
3.0625
3
[]
no_license
CREATE TABLE T_OFFICES( OFFC_ID INT NOT NULL, OFFC_COUNTRY VARCHAR(30) NOT NULL, OFFC_DESCRIPTION VARCHAR(80) NOT NULL, OFFC_NAME VARCHAR(30) ); DROP TABLE T_OFFICES; -- HOLA ESTO ES UN COMENT -- CREATE TABLE T_OFFICES( OFFC_ID INT NOT NULL, OFFC_COUNTRY VARCHAR(30) NOT NULL, OFFC_DESCRIPTION VARCHAR(90...
true
0e1bc2b5c558b802bfe915baf3e6e182ef4d1a00
SQL
Pashkalab/PHPAcedemy4
/1909-oop/mvc20171107.sql
UTF-8
2,143
2.84375
3
[]
no_license
-- MySQL dump 10.13 Distrib 5.5.57, for debian-linux-gnu (x86_64) -- -- Host: 0.0.0.0 Database: mvc -- ------------------------------------------------------ -- Server version 5.5.57-0ubuntu0.14.04.1 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACT...
true
924f82f0ecedfa1850eb56234129ef74ecd53c57
SQL
libinruan/recipes_molinaro_sql_cookbook
/code/1-06 referencing aliases in the WHERE clause.sql
UTF-8
383
2.9375
3
[]
no_license
/* the following is false. select sal as [salary], comm as [commission] from emp where salary < 5000; */ select ename, salary, commission from ( select ename, sal as salary, comm as commission from emp ) x --- Don't forget it. where salary >= 2000; -- note: you need to use an outer query to refere...
true
c779bcea1a3aca0641f557fc19962d0c1a6c9271
SQL
bellmit/flexdb
/2.HOST/3.Procedure/ca0006.sql
UTF-8
3,256
3.59375
4
[]
no_license
CREATE OR REPLACE PROCEDURE ca0006 ( PV_REFCURSOR IN OUT PKG_REPORT.REF_CURSOR, OPT IN VARCHAR2, BRID IN VARCHAR2, V_CACODE IN VARCHAR2 ) IS -- -- PURPOSE: BRIEFLY EXPLAIN THE FUNCTIONALITY OF THE PROCEDURE -- BAO CAO TAI KHOAN TIEN TONG HOP CUA NGUOI DAU ...
true
e78d30040858f44f5e654fde27dd3c9fa2addb67
SQL
DestinGit/courses-sql
/clients-trigger-beforeInsert.sql
UTF-8
339
2.75
3
[]
no_license
CREATE DEFINER = CURRENT_USER TRIGGER `cours`.`clients_BEFORE_INSERT` BEFORE INSERT ON `clients` FOR EACH ROW BEGIN INSERT INTO historique(nom_table, nom_colonne, operation, nouvelle_valeur) VALUES ('clients', 'nom', 'insert', NEW.nom), ('clients', 'prenom', 'insert', NEW.prenom), ('clients', 'cp', 'in...
true
495e223f60dea14e51c614a5fecf559e56fcb6ca
SQL
nja-006/database
/Nath_DB/SimulateTransaction.sql
UTF-8
3,930
3.140625
3
[]
no_license
USE Liem --DML di bawah ini merupakan Pencatatan data header atas sebuah transaksi yang terjadi transaksi pada supply --Data yang dibutuhkan pada table ini adalah SupplyID, FactoryID, StaffID, dan juga TransactionDate --Syntax INSERT INTO berguna untuk memasukan data ke dalam table INSERT INTO TrHeaderSupply VA...
true
55d07c050991f2a3fb3c5b3cd096e9b040b20b7f
SQL
es021/cf-app
/ref/field_study.sql
UTF-8
4,420
3.15625
3
[]
no_license
CREATE TABLE `wp_career_fair`.`ref_field_study` ( `ID` INT NOT NULL AUTO_INCREMENT , `val` VARCHAR(700) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL , `category` varchar(100) CHARACTER SET latin1 COLLATE latin1_swedish_ci DEFAULT NULL, PRIMARY KEY (`ID`), UNIQUE(`val`,`category`), INDEX (`val`), INDEX (...
true
6b1968d3d9b8cb037776a6a9f81b5c5b21a9ae22
SQL
rudiedirkx/11nk5
/secret_tags.sql
UTF-8
247
4.03125
4
[]
no_license
select t.*, (select count(1) from l_links where tag_id = t.id) links, (select count(1) from l_links l1 join l_links l2 on l2.url_id = l1.url_id where l1.tag_id = t.id) xlinks from l_tags t having links > 1 and links = xlinks order by t.tag asc
true
f73640fd54a57591f5a0d2e8b47afa04f642af43
SQL
johndspence/holbertonschool_higher_level_programming
/mysql_scripts_and_python_integration/0-main.sql
UTF-8
682
4.0625
4
[]
no_license
# Queries below as specified in project 169 \! echo "\nList of all tables?" show tables; \! echo "\nDisplay the table structure of TVShow, Genre and TVShowGenre?" SHOW CREATE TABLE TVShow; SHOW CREATE TABLE Genre; SHOW CREATE TABLE TVShowGenre; \! echo "\nList of TVShows, only id and name ordered by name (A-Z)?" SELE...
true
431b68cfdb4cd31009ee908073f8b3694cded5c7
SQL
leohill33/taxi
/0.数据清洗/cleansing.sql
UTF-8
691
3.765625
4
[]
no_license
#建表 create external table track (name STRING, time STRING, jd DOUBLE, wd DOUBLE, status INT, v DOUBLE, angle INT, dist DOUBLE) row format delimited fields terminated by ',' lines terminated by '\n' stored as textfile LOCATION 'hdfs://localhost:9000/input/track'; #除异常值 insert overwrite table track select * from ...
true
b63b6e9ce0c0825ef2c13fa7f1517b76cb123260
SQL
anupamgodse/DBMS_COEP_Class_of_2018
/Assignments/111408016SQL3.sql
UTF-8
4,862
4.375
4
[]
no_license
/* Each offering of a course (i.e. a section) can have many Teaching assistants; each teaching assistant is a student. Extend the existing schema(Add/Alter tables) to accommodate this requirement. */ drop table assistant; create table assistant ( ID varchar(5), course_id varchar(8), sec_id varchar(8)...
true
7368aa0e66699e28ee38aec4c530cd2b4cf59158
SQL
zzxtz007/ssm_simple_demo
/src/main/resources/sql/sql_init.sql
UTF-8
497
3.703125
4
[]
no_license
#学生表 student # 学生 id #学生姓名 name CREATE TABLE student ( id INT(10) PRIMARY KEY AUTO_INCREMENT, name VARCHAR(64) NOT NULL ); # 学生成绩表 # 成绩id id # 学生id student_id # 科目名 lesson # 成绩 score CREATE TABLE score ( id INT(10) PRIMARY KEY AUTO_INCREMENT, student_id INT(10) NOT NULL , lesson VARCHAR(64) NOT NULL , scor...
true
b11dea74aebe154fa196b826b8571ab8e8a14588
SQL
andyzhaozhao/securityclass
/securityday2/src/main/resources/data.sql
UTF-8
1,442
2.671875
3
[]
no_license
-- INSERT INTO `users` VALUES ('admin', '$2a$10$vLSbLoHEsnjqlHVe8pv24ec11Qr/Qi.RfY7DiBE/cGfu1sdwbOQ82', '1'), ('user', '$2a$10$vLSbLoHEsnjqlHVe8pv24ec11Qr/Qi.RfY7DiBE/cGfu1sdwbOQ82', '1'); -- INSERT INTO `authorities` VALUES ('admin', 'ROLE_ADMIN'), ('user', 'ROLE_USER'); -- insert into user_info (password, roles, use...
true
f7912334f7272bdc564156c0bb05e386c09f810d
SQL
tanvipenumudy/Competitive-Programming-Solutions
/HackerRank/Sql/type_of_triangle.sql
UTF-8
822
4.21875
4
[ "MIT" ]
permissive
-- Write a query identifying the type of each record in the TRIANGLES table using its three side lengths. -- Output one of the following statements for each record in the table: -- Equilateral: It's a triangle with 3 sides of equal length. -- Isosceles: It's a triangle with 2 sides of equal length. -- Scalene: It's a...
true
7d55b8ec6249399c8852c0a850f547d35634508c
SQL
codeauslander/actualize-class
/sql/employees.sql
UTF-8
2,493
4.0625
4
[]
no_license
-- select * from employees; -- Get all info about employees whose last names begin with “Z”. -- select * from employees where last_name ilike 'z%'; -- Get the first name and last name of employees whose last names begin with “Mi”. -- select first_name, last_name from employees where first_name ilike 'Mi%' and last_n...
true
a1815300c082716020c8378b7e7c06119b7998e1
SQL
hialstkd/sql-challenge
/table_schemata.sql
UTF-8
1,000
3.671875
4
[]
no_license
Create Table departments( dept_no VARCHAR(30) NOT NULL, dept_name VARCHAR(30) NOT NULL, primary key(dept_no) ); Create Table dept_emp( emp_no int, dept_no VARCHAR(30) NOT NULL, Foreign Key (dept_no) references departments(dept_no), Foreign Key (emp_no) references employees(emp_no) ); Create Table dept_manager(...
true
5cfc6651ecf71df5478123f824e1b7cd1399da82
SQL
diogo-barradas/PSI18H_M16_2218089_DiogoBarradas
/scriptsbd/PSI18H_M16_2218089_DiogoBarradas.sql
UTF-8
4,062
2.71875
3
[]
no_license
create database psi18h_m16_2218089_diogobarradas; CREATE SCHEMA `psi18h_m16_2218089_diogobarradas`; use psi18h_m16_2218089_diogobarradas; CREATE TABLE `psi18h_m16_2218089_diogobarradas`.`registo` ( `ID` INT NOT NULL AUTO_INCREMENT, `Username` VARCHAR(50) NOT NULL, `PIN` VARCHAR(4) NOT NULL, `Idade` INT NOT NU...
true
8f6a8d9acb020f374c64e52ae4ada0bc2debf4f4
SQL
yying1/For-class-2-15
/InClass-06.sql
UTF-8
1,866
4.625
5
[]
no_license
use AdventureWorks2012; /*Activity 1. Using the HumanResource.Employee table, provide a count of the number of employees by job title. The query should consider only current employees (the CurrentFlag must equal 1). */ select jobtitle, count (BusinessEntityID) as number_of_employee from HumanResources.Employee Wher...
true
15aa5c56562f9b0b6c1c5f2850e18276ce1ed1b8
SQL
GuilhermeS94/desafio-dock
/desafio-db/script-db.sql
UTF-8
1,411
3.75
4
[]
no_license
create database desafiodockdb; use desafiodockdb; /* Primeiro a tabela que nao depende de nenhum relacionamento */ create table Pessoas( IdPessoa INT PRIMARY KEY IDENTITY(1,1), Nome VARCHAR(100) NOT NULL, Cpf VARCHAR(11) NOT NULL, DataNascimento DATE NOT NULL ); /* Conta vinculada a uma pessoa */ crea...
true
8d89b69f2b452c6d6c280f97d16d90349b909412
SQL
herohoy/usrit
/usrit-api/src/main/resources/sql/temp.sql
UTF-8
963
3.015625
3
[]
no_license
select * from user; insert into user values( 1000000001 ,'lh' ,'today36524' ,'13344556677' ,'abc@123.com' ,'123456789' ,0 ,1 ,sysdate() ,2000000001 ,CURRENT_TIMESTAMP ,2000000001 ,''); insert into user ( user_name ,password ,telephone ,email ,qq ,integral ,created_at ,created_by ,updated_at ,updated_by ,remark ) va...
true
729882cebb9a4e1855ad579a13897457a6e5dfb9
SQL
rifkiharbiawali/online-book-store
/bb.sql
UTF-8
705
2.75
3
[]
no_license
/* SQLyog Community MySQL - 10.4.14-MariaDB ********************************************************************* */ /*!40101 SET NAMES utf8 */; create table `bb` ( `id` bigint (20), `created` datetime , `created_by` varchar (765), `last_modified` datetime , `last_modified_by` varchar (765), `count` varchar (76...
true
b6cb67bc3691996a293a0a89d97a0a8e7d435665
SQL
DanielMuthupandi/FAST
/FAST/vsql/NETSUITE/NS_Cost_Center_Segment_Mapper_bkp.sql
UTF-8
5,877
3.6875
4
[]
no_license
/**** ****Script Name : NS_Cost_Center_Segment_Mapper.sql ****Description : Incremental data load for NS_Cost_Center_Segment_Mapper ****/ /* Setting timing on**/ \timing /**SET SESSION AUTOCOMMIT TO OFF;**/ \set ON_ERROR_STOP on CREATE LOCAL TEMP TABLE Start_Time_Tmp ON COMMIT PRESERVE ROWS AS select count(*) co...
true
9c4dc94c7666145dc9edbb8412ccf9407d1004e3
SQL
Orbisnetworkadmin/orbis-grcmanager
/resources/migrations/00000000000103-password_history.up.sql
UTF-8
698
2.625
3
[ "MIT" ]
permissive
CREATE TABLE password_history ( id_password_history BIGSERIAL NOT NULL PRIMARY KEY, user_id BIGINT NOT NULL REFERENCES users (user_id), change_password_history TIMESTAMP NOT NULL DEFAULT (now() AT TIME ZONE 'utc'), password_password_history TEXT ); --...
true
133c9e32de2ee42dc6711a155266de8fc81f256d
SQL
doc333/monannonce
/monannonce.sql
UTF-8
8,358
3.46875
3
[ "MIT", "BSD-3-Clause" ]
permissive
-- MySQL Script generated by MySQL Workbench -- Mon Nov 17 12:28:05 2014 -- Model: New Model Version: 1.0 -- MySQL Workbench Forward Engineering SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0; SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0; SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='TR...
true
8811a3a18be691c90097058ecb198791eac983e2
SQL
bjprogrammer/UDR_Music_App
/mysql/udrradio.sql
UTF-8
1,479
2.78125
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.5.1 -- http://www.phpmyadmin.net -- -- Host: fdb14.biz.nf -- Generation Time: Jun 04, 2016 at 10:24 AM -- Server version: 5.5.38-log -- PHP Version: 5.5.36 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIE...
true
ad27243766b238a677e79a0812d566d3fbeda27b
SQL
google/grr
/grr/server/grr_response_server/databases/mysql_migrations/0017.sql
UTF-8
597
3.109375
3
[ "Apache-2.0" ]
permissive
CREATE TABLE `client_rrg_startup_history` ( -- A unique identifier of the row. `id` BIGINT NOT NULL AUTO_INCREMENT, -- A unique identifier of the client. `client_id` BIGINT UNSIGNED NOT NULL, -- A timestamp at which the startup record was written. `timestamp` TIMESTAMP(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(...
true
cafc4a076af96d52d74fd3b9c0332e9c0b5cd605
SQL
BhaskaranR/kmeal
/services/postgres/migrations/00040_menu.sql
UTF-8
2,442
3.703125
4
[]
no_license
CREATE TABLE IF NOT EXISTS kmeal."menu_book" ( "menu_book_id" SERIAL PRIMARY KEY, "restaurant_id" INTEGER NOT NULL REFERENCES kmeal.restaurant("restaurant_id"), "menu_book" VARCHAR(100) NOT NULL, "sort_order" INTEGER NOT NULL ); CREATE TABLE kmeal."menu_book_section" ( "section_id" SERIAL PRIMARY KEY, "s...
true
17a9bc96b46351e71d7cbeac8222c54afd6e22d8
SQL
dapriad/list_details_products
/Projecte_1.0/bd_gamebets.sql
UTF-8
1,642
2.90625
3
[]
no_license
CREATE DATABASE IF NOT EXISTS `bd_gamebets` USE `bd_gamebets`; -- phpMyAdmin SQL Dump -- version 4.0.10deb1 -- http://www.phpmyadmin.net -- -- Servidor: 127.0.0.1 -- Tiempo de generación: 17-10-2016 a las 02:44:54 -- Versión del servidor: 5.5.50-0ubuntu0.14.04.1 -- Versión de PHP: 5.5.9-1ubuntu4.19 SET SQL_MODE = "NO...
true
d40263192bcbb78991ddeef3c15300d5e053c784
SQL
habibapalekar/TrackingWebApp
/Public/db.sql
UTF-8
423
3.15625
3
[]
no_license
CREATE DATABASE tracker; use tracker; CREATE TABLE diary ( id INT(10) UNSIGNED AUTO_INCREMENT PRIMARY KEY, food VARCHAR(30) NOT NULL, serving INT(50) NOT NULL, kcal INT(30), meal VARCHAR(100), date TIMESTAMP ); CREATE TABLE users ( id INT NOT NULL PRIMARY KEY AUTO_INCREMENT, username VARCHAR(50) NO...
true
05c311232c8a5d2e1e246ce827b884e29f166bf6
SQL
LuisEduardoER/petshop-website
/ petshop-website --username iamwanhe@gmail.com/food.sql
UTF-8
1,053
3.015625
3
[]
no_license
-- ---------------------------- -- Table structure for foot -- ---------------------------- DROP TABLE IF EXISTS `foot`; CREATE TABLE `foot` ( `id` int(11) NOT NULL auto_increment, `code` varchar(10) collate utf8_bin default NULL, `name_ch` varchar(50) collate utf8_bin NOT NULL, `name_en` varchar(50) collat...
true
0b3f9805eb3b74c2b8018070e24ca47afa5facc8
SQL
Jangbe/ebe-bot
/bot_wa.sql
UTF-8
64,628
2.546875
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.9.2 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Dec 06, 2020 at 07:00 AM -- Server version: 10.4.10-MariaDB -- PHP Version: 7.2.25 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OL...
true
3adab632667cafac1956cd0e8caf15493ac86c74
SQL
cr1315/leetcode_database
/LC0610.sql
UTF-8
373
3.625
4
[]
no_license
create database `LC0610`; use LC0610; Create table If Not Exists triangle (x int, y int, z int); Truncate table triangle; insert into triangle (x, y, z) values ('13', '15', '30'); insert into triangle (x, y, z) values ('10', '20', '15'); SELECT x, y, z, CASE when x + y > z and x + z > y and y + z > x then ...
true
a564082bd9a4cb42772ad9be2620243f365e76c0
SQL
koreahong/bigquery
/ch08/27.sql
UTF-8
162
3.421875
3
[]
no_license
WITH days AS ( SELECT GENERATE_DATE_ARRAY('2019-06-23', '2019-08-22', INTERVAL 10 DAY) AS summer ) SELECT summer_day FROM days, UNNEST(summer) AS summer_day
true
51d80e298ab297f29e4d8cad14af2ab349e81014
SQL
SethDeSilva10/cse414
/hw3/submission/hw3-q6.sql
UTF-8
476
3.421875
3
[]
no_license
-- question six with subFlight as (select distinct f1.carrier_id from FLIGHTS as f1 where f1.origin_city = 'Seattle WA' and f1.dest_city = 'San Francisco CA') select c1.name as carrier from CARRIERS as c1, subFlight as sub where c1.cid = sub.carrier_id order by c1.name asc; /* result: 1.the number of the query return...
true
0c4a91196aecd8dd8205d96aee4be9181e1ab120
SQL
yunzhangMr/footprint
/footprint.sql
UTF-8
41,870
3.3125
3
[]
no_license
-- -------------------------------------------------------- -- 主机: 127.0.0.1 -- 服务器版本: 5.6.26 - MySQL Community Server (GPL) -- 服务器操作系统: Win32 -- HeidiSQL 版本: 9.3.0.4984 -- -------------------------------------------------------- /*...
true
520ad543c37041037e20abb6812df4ed8793c32a
SQL
jessicabrock/oracle
/oracle/dba/ipcbc.sql
UTF-8
1,256
3.09375
3
[]
no_license
-- ******************************************************************** -- * Filename : ipcbc -- * Author : Jess Brock -- * Original : 03-mar-2015 -- * Last Update : 03-mar-2015 -- * Description : Instance parameter related to the cache -- * buffer chains....
true
4f978fa67e6be7254d1db53d8a200c591fd63f76
SQL
mesteves9/BDCGH_20192020
/Ficha4_PovoarTabelas.sql
UTF-8
2,032
3.078125
3
[]
no_license
/* SAMPLE DO POVOAMENTO DAS TABELAS */ INSERT INTO Ficha3.ALUNO (id_aluno, nome, data_nascimento, n_contribuinte, n_cc, nome_pai, nome_mae, nome_encarregado_educacao, rua, codigo_postal, localidade) VALUES (1, 'Mario Goncalves', '1993-01-09', 123456789, '123456781ABC', 'Joaquim Alves', 'Maria Duarte', 'Maria Duarte'...
true
84c68eb2856f17540a26489f68f6574c129ad418
SQL
NTXpro/NTXbases_de_datos
/DatabaseNTXpro/ERP/Stored Procedures/Procs1/Usp_Sel_Cuenta_Inactivo.sql
UTF-8
372
3.265625
3
[]
no_license
 CREATE PROC [ERP].[Usp_Sel_Cuenta_Inactivo] @IdEmpresa INT AS BEGIN SELECT C.ID, C.Nombre, E.Nombre AS NombreBanco, PC.CuentaContable, PC.Nombre AS NombrePlanCuenta FROM ERP.Cuenta C LEFT JOIN ERP.Entidad E ON E.ID = C.IdEntidad LEFT JOIN ERP.PlanCuenta PC ON PC.ID = C.IdPlanCuenta W...
true
3a2aa0b9953de3b9f8c590634f44bd22858513be
SQL
henrique-tavares/IFB-Banco-de-Dados-1
/Lista 2 MER/02/02.sql
UTF-8
4,464
3.8125
4
[ "MIT" ]
permissive
create table enderecos ( cep numeric(8) primary key, rua varchar(30), bairro varchar(30), numero int, complemento varchar(50) ); create table faculdades ( codigo int primary key auto_increment, nome varchar(50) not null, localizacao varchar(50) not null, fone numeric(13) not null ); create table funcionarios...
true
b916eb455a359f83e31af9f29fd5ae2fe48c6fea
SQL
JoaoPrata/NeuroPsi
/3ªEntrega/NeuroPsiDB.sql
UTF-8
6,084
3.5
4
[]
no_license
create table Location (locId int auto_increment primary key, coords point); create table User (userId int auto_increment primary key, name varchar (30), sex enum('M', 'F'), email varchar (30), birthdate date, user_locId int, foreign key (user_locId) references Location (locId)); create table Patient (patientId int aut...
true
ff3525e6a040f54969dafd4333b3a7375ca83db7
SQL
LabKey/onprcEHRModules
/extscheduler/resources/queries/extscheduler/PMIC_getFolderInfo.sql
UTF-8
195
3.203125
3
[]
no_license
SELECT r.Id, r.name as resourceid, r.color, r.room, r.bldg, r.Container, c.name as FolderName FROM Resources r, core.Containers c Where c.EntityId = r.container And c.name like 'PMIC Scheduler'
true
49c215b3abdeeaaa98bebbc0b42245edfd34ee41
SQL
anhtuta/LilianaPlayer
/LilianaPlayer/src/main/resources/db/migration/V1__init.sql
UTF-8
1,355
3.734375
4
[]
no_license
CREATE TABLE `liliana_player`.`song` ( `id` INT NOT NULL AUTO_INCREMENT, `title` VARCHAR(100) NULL, `artist` VARCHAR(100) NULL, `listens` INT NULL DEFAULT 0, `file_path` VARCHAR(500) NULL, PRIMARY KEY (`id`)); ALTER TABLE `liliana_player`.`song` ADD COLUMN `album` VARCHAR(100) NULL AFTER `artist`; ...
true
4b7e3a792558d7d521c2317c2471a4cd0ee838b1
SQL
LJChao3473/Trackr
/vagrant/db/trackr.sql
UTF-8
3,581
4
4
[]
no_license
drop database if exists Trackr; create database Trackr; use Trackr; create table `user` ( id int primary key auto_increment, fname varchar(20) not null, lname varchar(20) not null, email varchar(50) not null, `password` varchar(32) not null ); create table to_do_folder ( id int primary ke...
true
949c8521978b149211375f942b92813bf9934ffc
SQL
Imm0bilus/InterestingStuff
/INF Übungen/INF_Views.sql
UTF-8
2,228
4.0625
4
[]
no_license
USE bikelbs4; -- ÜBUNG 1 -- CREATE VIEW Übung1 AS SELECT a.AuftrNr AS Auftragsnummer ,a.Datum ,k.Vorname AS Kunde_Vorname ,k.Nachname AS Kunde_Nachname ,p.Vorname AS Bearbeiter_Vorname ,p.Nachname AS Bearbeiter_Nachname ,SUM(a.AuftrNr) AS Summe FROM auftrag a INNER JOIN kunde k ON k.K...
true
8706003df48a52c969a572c538125d91e5d18425
SQL
ksjtop03/voicek
/PPAS/조회/FUNCTION_조회.sql
UTF-8
948
3.125
3
[]
no_license
/* ---------------------------------------------------------------------------------------------------- FUNCTION 조회 ---------------------------------------------------------------------------------------------------- */ select pg_get_functiondef(p.oid) as src from pg_proc p ...
true
b692a8495b28d30df8f0be69470264970c1080fb
SQL
ardelingga/Aplikasi-Absensi-Pegawai-QRCode
/absensi.sql
UTF-8
11,727
3
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.5.0.2 -- http://www.phpmyadmin.net -- -- Host: localhost -- Generation Time: Feb 10, 2018 at 08:32 AM -- Server version: 5.6.20 -- PHP Version: 5.5.15 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */...
true
017cdae828bfdbbadff7553d77248af5795ed6d8
SQL
sonali-sohoni/u-develop-it
/db/schema.sql
UTF-8
705
3.6875
4
[]
no_license
use election; drop table if exists parties; create table parties( id integer auto_increment primary key, name varchar(50) not null, description text ); drop table if exists candidates; create table candidates ( id INTEGER AUTO_INCREMENT PRIMARY KEY, first_name VARCHAR(30) NOT NULL, last_name VARCHAR(30) NOT NULL...
true
f1484a6c48a67e6e311044223bbec60598061dc9
SQL
oracle/oracle-db-tools
/ords/Parameters/parameters_rest.sql
UTF-8
5,737
3.421875
3
[ "MIT" ]
permissive
-- Generated by Oracle SQL Developer REST Data Services 17.4.0.355.2349 -- Exported REST Definitions from ORDS Schema Version 17.4.1.353.06.48 -- Schema: HR Date: Fri Jan 19 11:46:40 EST 2018 -- BEGIN ORDS.DEFINE_MODULE( p_module_name => 'parameters', -- the name of RESTFul Service Module that will be used...
true
798215ad5b2c429a5b32ed7f64a2008c300c29ac
SQL
mebelousov/antlr_psql
/src/test/resources/sql/explain/29c92098.sql
UTF-8
180
2.625
3
[ "MIT" ]
permissive
-- file:groupingsets.sql ln:282 expect:true explain (costs off) select a, b, grouping(a,b), sum(v), count(*), max(v) from gstest1 group by grouping sets ((a),(b)) order by 3,1,2
true
91923d2e5aa08e59d79a699175899e6adf6d630c
SQL
kabocha23/Algorithms
/satascratch/noOrderCustomers.sql
UTF-8
485
4.3125
4
[]
no_license
-- No Order Customers -- Find customers who didn't place orders from 2019-02-01 to 2019-03-01. Output customer's first name. WITH feb_orders AS ( SELECT id, first_name, co.* FROM customers c LEFT JOIN ( SELECT cust_id, order_date FROM or...
true
8c315f5ca7ba6f4f854f00df313b79cc2823ac7f
SQL
AVER343/pgsql
/sql/patient.sql
UTF-8
409
3.203125
3
[]
no_license
CREATE TABLE patients( id SERIAL PRIMARY KEY, username VARCHAR(64) NOT NULL UNIQUE, "firstName" VARCHAR(32) NOT NULL, "lastName" VARCHAR(32) NOT NULL, age INTEGER NOT NULL , "dateOfBirth" TIMESTAMP, "registeredDate" TIMESTAMP DEFAULT CURRENT_TIMESTAMP , gender VARCHAR(6) NOT NULL, "...
true
26d58ba55816485cad6f091ecc9467d9b05a963f
SQL
georgi-vasilev/Database-Basics-MS-SQL-Server-May-2020-SoftUni
/Exam Preparation Part Two/09. User per Employee.sql
UTF-8
293
3.84375
4
[]
no_license
USE [Service] SELECT CONCAT([FirstName], ' ' ,[LastName]) AS [FullName], COUNT(DISTINCT UserId) AS [UsersCount] FROM Reports AS r RIGHT JOIN Employees AS e ON e.[Id] = r.[EmployeeId] GROUP BY r.[EmployeeId], e.[FirstName], e.[LastName] ORDER BY [UsersCount] DESC, [FullName] ASC
true
d03da80bc42fdb06e03efd331a4f2e3e5368038a
SQL
chenlwh/springintegration
/springbootstart/src/main/resources/Script-2.sql
GB18030
3,929
3.84375
4
[]
no_license
select to_char(t1.expire_date, 'yyyy-mm-dd') as date, sum(-t1.amount) amount, '' classify from release_data t1 where t1.expire_date>=current_date-30 and t1.expire_date<=current_date+30 group by t1.expire_date union all select to_char(t2.release_date, 'yyyy-mm-dd') as date, sum(t2.amount) amount, '' classify from rele...
true
415db0e19fa593366a75abc9d567e7c8e7fec650
SQL
W4nn4Die/practica-mysql
/3Constraints.sql
UTF-8
721
3.515625
4
[]
no_license
CREATE TABLE users ( userid INT IDENTITY NOT NULL, usermail VARCHAR(100) NOT NULL, userpass BINARY(16) NOT NULL, username VARCHAR(50) NOT NULL, userrol VARCHAR NOT NULL DEFAULT 'user', PRIMARY KEY (userid) ); CREATE TABLE hosting ( idhosting INT NOT NULL, hostingplan INT NOT NULL CHECK (hostingplan <> ...
true
33c5b5256ac57a584e58d59034587f3cf51523f6
SQL
krishnamohankaruturi/secret
/aart-web-dependencies/db/other/US18780_StudentRosterChanges.sql
UTF-8
1,509
3
3
[]
no_license
-- Resetting student tracker and inactivating students tests for the student :000721026 UPDATE studentsresponses SET activeflag = false, modifieduser = (SELECT id FROM aartuser WHERE username = 'cetesysadmin'), modifieddate = now() WHERE studentstestsid IN (13815603,13830039); UPDATE studentstestsections SET ac...
true
f03d83aa4c555da27bb5905d95841b66cf10cabe
SQL
BiserHristov/SoftUni
/05. C# DataBase/01. MS SQL/05. Subqueries and JOINs/Homework_Joins/15. Continents and Currencies.sql
UTF-8
372
4.0625
4
[ "MIT" ]
permissive
SELECT ContinentCode, CurrencyCode, CurrencyUsage FROM ( SELECT ContinentCode, CurrencyCode, COUNT(CurrencyCode) AS CurrencyUsage, DENSE_RANK() OVER (PARTITION BY ContinentCode ORDER BY COUNT(CurrencyCode) DESC) AS Ranked FROM Countries GROUP BY ContinentCode,CurrencyCode ) AS k WHERE Cur...
true
2e0167a88334f447c742db1b7a559755fe0b5751
SQL
kojhliang/BaaSV1.0
/explorer.sql
UTF-8
11,455
3.234375
3
[]
no_license
/* Navicat MySQL Data Transfer Source Server : localhost Source Server Version : 50622 Source Host : localhost:3306 Source Database : explorer_lmh Target Server Type : MYSQL Target Server Version : 50622 File Encoding : 65001 Date: 2017-11-03 16:26:19 */ SET FOREIGN_KEY_CHECKS=0; ...
true
a1de1acc1d340ca229cc8525c877a3c8cb0fcd1d
SQL
radtek/abs3
/sql/mmfo/bars/Table/fm_partner_tmp.sql
UTF-8
2,352
2.90625
3
[]
no_license
PROMPT ===================================================================================== PROMPT *** Run *** ========== Scripts /Sql/BARS/Table/FM_PARTNER_TMP.sql =========*** Run ** PROMPT ===================================================================================== PROMPT *** ALTER_POLICY_INFO...
true
599bef271eca3d221d401da57b2c554abaa0934b
SQL
EdwinkC/Student_Management
/student_management.sql
UTF-8
4,312
3.0625
3
[]
no_license
/* Navicat Premium Data Transfer Source Server : mysql Source Server Type : MySQL Source Server Version : 50721 Source Host : localhost:3306 Source Schema : student_management Target Server Type : MySQL Target Server Version : 50721 File Encoding : 65001 Date: 22/08/...
true
5e4837f4565f445fad28f24f59f6ca8f44f1f230
SQL
ganareynara/liburbareng
/liburbareng.sql
UTF-8
2,380
3.0625
3
[ "CC-BY-4.0", "CC-BY-3.0" ]
permissive
/* SQLyog Ultimate v12.5.1 (64 bit) MySQL - 10.4.11-MariaDB : Database - liburbareng ********************************************************************* */ /*!40101 SET NAMES utf8 */; /*!40101 SET SQL_MODE=''*/; /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; /*!40014 SET @OLD_FOREI...
true
fd54a3edbcaa25108c4608195487e3a739e81d92
SQL
Tempta36/westos
/_installation/mysql.sql
UTF-8
320
2.984375
3
[]
no_license
CREATE TABLE users( user_id int(11) NOT NULL AUTO_INCREMENT, user_name varchar(64) COLLATE utf8_unicode_ci NOT NULL, user_password_hash varchar(255) COLLATE utf8_unicode_ci NOT NULL, PRIMARY KEY (user_id), UNIQUE KEY (user_name) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='user data';
true
3677e29869f8b2c11f4bbbd4f24c1c093c02480a
SQL
teamvanguard/vanguard
/database.setup/database.sql
UTF-8
1,998
3.71875
4
[]
no_license
-- Run these commands in SQL -- First create the Database CREATE DATABASE vanguard; -- To create the users table CREATE TABLE "users" ( "id" serial primary key, "username" varchar(60) UNIQUE, "password" varchar(100), "name" varchar(50), "student_id" integer UNIQUE, "pic" varchar(300), "pts" integer DEFA...
true
b9c9512d9041853fb1d7dc6fbfd8bdb73fb4bc61
SQL
thangduong3010/PL-SQL
/Practice/declare_NestedTables.sql
UTF-8
365
2.640625
3
[]
no_license
SET SERVEROUTPUT ON DECLARE TYPE location_type IS TABLE OF hr.locations.city%TYPE; offices location_type; BEGIN offices := location_type ('Bombay', 'Tokyo', 'Singapore', 'Oxford'); FOR i IN 1 .. offices.COUNT () LOOP DBMS_OUT...
true
c4cb4bd716a2a887b95b8c50ab06a5f934624bcb
SQL
larslunddk/APLLU_TestVSTS_GIT
/SQL/DemkoTests/LP_20080609_ULCertificateView.SQL
UTF-8
2,139
3.0625
3
[]
no_license
SELECT bmssa.PROJCERTIFICATE.CERTIFICATEID, bmssa.PROJTABLE.ENDDATE AS Cert_DateOfIssue, dbo.PROJINVOICETABLE.COUNTRYID AS Customer_location_Country, dbo.COUNTRY.REGIONCODE AS Customer_Region, 'DK' AS CO_Location, bmssa.PROJCERTIFICATE.CERTTYPE AS Certificate_Type, dbo.PROJDECISIONLINK.DEC...
true
99a2451941c36c15ae8e8fc245ecc4ac10251927
SQL
ucabogm/prob-poly-DSH
/SQL_queries/150_medication_stop_query.sql
UTF-8
3,498
4.09375
4
[]
no_license
# get a table of all rows of medication 150 in the therapy table CREATE TABLE oliver.therapy_150_single_row AS SELECT * FROM 17_205R_Providencia.therapy WHERE bnfcode = 150; # get a list of patients that recieve medication 150 at some point in their therapy CREATE TABLE oliver.patids_150 AS SELECT DISTINCT patid FROM ...
true
0f1087f815386a410b63a9a73a2ed1bf3af31683
SQL
nicolash0125/SuperAndes
/docs/ScriptsRequerimientos/RFC1.sql
UTF-8
204
2.671875
3
[]
no_license
--SELECT * FROM CLIENTE; SELECT sucursal, sum(total) FROM venta WHERE fechaventa BETWEEN TO_DATE('2018/9/12','yyyy/mm/dd') AND TO_DATE('2018/12/12','yyyy/mm/dd') GROUP BY sucursal; commit; rollback;
true
64a92f381b2381e501a4ed7052be62db23c5f877
SQL
danielrogersenable/advent-of-code-2020
/2020-Day24-1.sql
UTF-8
23,987
2.65625
3
[]
no_license
IF OBJECT_ID('tempdb.dbo.#Input', 'U') IS NOT NULL BEGIN DROP TABLE #Input END CREATE TABLE #Input ( InputRowId bigint not null IDENTITY(1,1), DirectionRow nvarchar(max) ) --INSERT INTO #Input --VALUES --('sesenwnenenewseeswwswswwnenewsewsw'), --('neeenesenwnwwswnenewnwwsewnenwseswesw'), --('seswneswswsenwwnwse'),...
true
1f361b32a247af42c9c748097482573aaddab29d
SQL
ramirezra/gowebapp
/06/6.13/setup.sql
UTF-8
396
3.375
3
[]
no_license
drop table posts cascade if exists; drop table comments if exists; create table posts ( id serial primary key, content text, author varchar(255) ); create table comments ( id serial primary key, content text, author varchar(255), post_id integer references posts(id) ); GRANT USAGE, SELECT ON SEQUENCE p...
true
d7090822fa3494baad31f88ad0f31247fa798024
SQL
dzonint/NotesNT
/notesnt.sql
UTF-8
499
3.46875
3
[]
no_license
CREATE TABLE authors ( authorid INT NOT NULL AUTO_INCREMENT, username VARCHAR(20) NOT NULL, password VARCHAR(255) NOT NULL, email VARCHAR(80) NOT NULL, registrationdate DATETIME DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY(authorid) ); CREATE TABLE notes ( noteid INT NOT NULL AUTO_INCREMENT, ...
true
82ed0dce48264db5c25e2ad7a38d28beba10d303
SQL
rubenavila9/VETERINARIA-SQL
/insercion registros.sql
UTF-8
1,042
2.9375
3
[]
no_license
insert into CLIENTE values (123242424, 'Ruben','Avila','barrio cuba', '09686389390','ruben@gmail.com'), (128883913, 'deiby','vera','barrio altamira', '0938173823','deiby@gmail.com'), (113233142, 'ricardo','lugo','barrio cuba', '09839281992','ricardo@gmail.com'), (131313313, 'ariel','zambrano','barrio cuba', '091738928...
true
06fe5689d6e3885e2a8ad186fecc5f9ab7f9aae7
SQL
htamakos/oracle_samples
/partition/partitioning_enhancement_oracle_11g/sigle_partition_transportable/create_partition.sql
UTF-8
837
3.59375
4
[]
no_license
CREATE TABLE transport_test_tab ( id NUMBER NOT NULL, code VARCHAR2(10) NOT NULL, description VARCHAR2(50), created_date DATE, CONSTRAINT transport_test_pk PRIMARY KEY (id) ) PARTITION BY RANGE (created_date) ( PARTITION part_2017 VALUES LESS THAN (TO_DATE('01-JAN-2018', 'DD-MON-YYYY')) TABLESPACE trans...
true
6197d2cafdff325c0a1f76691bfef84631ff0783
SQL
inasafe/inasafe-fba
/fixtures/schema/03_external_module/00_tables/00_census_kemendagri.sql
UTF-8
1,388
3.09375
3
[ "MIT" ]
permissive
-- Table structure taken from ArcGIS REST API of GIS Dukcapil Kemendagri Indonesia: -- source: https://gis.dukcapil.kemendagri.go.id/peta/ -- ArcGIS REST API Endpoint: https://gis.dukcapil.kemendagri.go.id/arcgis/rest/services/Data_Baru_26092017/MapServer/ create table if not exists census_kemendagri ( objectid big...
true
61c2bc7c7c247309caa0ab15e5c0b401f2d42b34
SQL
radtek/abs3
/sql/mmfo/bars/View/v_ins_limits.sql
UTF-8
1,215
2.875
3
[]
no_license
PROMPT ===================================================================================== PROMPT *** Run *** ========== Scripts /Sql/BARS/View/V_INS_LIMITS.sql =========*** Run *** = PROMPT ===================================================================================== PROMPT *** Create view V_IN...
true
eb452fddf0ce7b88dcd648d72103fb91aeb4db2f
SQL
floperrier/projet-docker
/dump/db.sql
UTF-8
941
3.015625
3
[]
no_license
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; /*!40101 SET NAMES utf8mb4 */; CREATE TABLE `users...
true
c6fcfc52a33c4c4e8dc1f346b7c0131d99043676
SQL
radtek/abs3
/sql/mmfo/bars/Table/cck_cusseg.sql
WINDOWS-1251
3,602
3.109375
3
[]
no_license
PROMPT ===================================================================================== PROMPT *** Run *** ========== Scripts /Sql/BARS/Table/CCK_CUSSEG.sql =========*** Run *** == PROMPT ===================================================================================== PROMPT *** ALTER_POLICY_INFO...
true
ff2a24937cf9a1d0e0dddd193f256df88eaeb926
SQL
batego/db_fintra
/fintra/public/Tables/ex_ofertas_consi.sql
UTF-8
900
2.84375
3
[]
no_license
-- Table: ex_ofertas_consi -- DROP TABLE ex_ofertas_consi; CREATE TABLE ex_ofertas_consi ( id_solicitud character varying(15) NOT NULL, id_consideracion integer NOT NULL DEFAULT nextval('ofertas_consi_id_consideracion_seq'::regclass), reg_status character varying(1) NOT NULL DEFAULT ' '::character varying, la...
true
fe6a5e940c50cf696947c3ea9e119a4065909fbb
SQL
nikolovkiril/SoftUni
/SQL/Databases MS SQL-Server/MSSQL Server Retake Exam - 11 August 2020/08. Customers by Criteria.sql
UTF-8
277
3.84375
4
[]
no_license
SELECT cu.FirstName, cu.Age, cu.PhoneNumber FROM Customers AS cu JOIN Countries AS co ON co.Id = cu.CountryId WHERE (cu.FirstName LIKE '%an%' AND cu.Age >= 21 ) OR (RIGHT(cu.PhoneNumber , 2) = '38' AND co.Name NOT LIKE 'Greece') ORDER BY cu.FirstName , cu.Age DESC
true
f25b1702229994cfbee397738c155efe3e32c619
SQL
lyrasis/postgres-util-ansible-role
/files/db_autovacuum_running.sql
UTF-8
411
2.75
3
[ "CC0-1.0" ]
permissive
/* * Displays the databases in which autovacuum is running and for how long * https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Appendix.PostgreSQL.CommonDBATasks.html#Appendix.PostgreSQL.CommonDBATasks.Autovacuum.AutovacuumRunning */ SELECT datname, usename, pid, waiting, current_timestamp - xact_start AS xact_ru...
true
358c4162dbc79d813956dce9bade9ecaf3d192d0
SQL
phahok/scripts_sql
/consulta nfe oficinas.sql
UTF-8
1,592
3.203125
3
[]
no_license
use sigma select * from drlingerie.dbo.faturamento a left join entradas b on b.chave_nfe=a.chave_nfe where a.emissao between '20170801' and '20170831' and a.NOME_CLIFOR='sigma condominio' and a.NATUREZA_SAIDA ='130.01' and b.CHAVE_NFE is null select * from drlingerie.dbo.faturamento a join entradas b on b.chave_nfe=a...
true
0a22bcbcefeaaeb8c63cc22274f9f45c902fb631
SQL
takagotch/rails1
/super/binary/InstantRails-1.7-win/InstantRails/rails_apps/typo-2.6.0/db/schema.mysql.sql
UTF-8
4,722
3.4375
3
[ "MIT" ]
permissive
CREATE TABLE `users` ( `id` int(11) NOT NULL auto_increment, `login` varchar(80) default NULL, `password` varchar(40) default NULL, `name` varchar(80) default NULL, `email` varchar(80) default NULL, PRIMARY KEY (`id`), UNIQUE KEY `login` (`login`) ) TYPE=MyISAM; CREATE TABLE `articles` ( `id` int(11) ...
true
f43e5123a91be2b45f7fd5d7cc9da187ba9e5bf0
SQL
kioyong/spring-mysql-azure-demo
/src/main/resources/template/mysql_script_test.sql
UTF-8
1,375
3.78125
4
[]
no_license
create database IF NOT EXISTS test DEFAULT CHARACTER SET utf8; show databases; use test; create table person ( id varchar(25), first_name varchar(25), last_name varchar(25) ); create table car ( id varchar(25), person_id varchar(25), car_name varchar(25) ); drop table c...
true
f1e8b58b6a0af7fc82caeed8603eea44b8bf21a2
SQL
thn99/webCalendar
/database/calendar.sql
UTF-8
1,832
3.40625
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.8.3 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: 10-Mar-2019 às 00:07 -- Versão do servidor: 10.1.37-MariaDB -- versão do PHP: 7.2.12 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @...
true
7502d64d1b95ef9d7864d1162264576d224f3995
SQL
kousuketk/sql_practice
/Easy/182_DuplicateEmails.sql
UTF-8
399
3.03125
3
[]
no_license
-- 同じテーブルの同じ重複するものを選ぶから、同じテーブルを見て同じものを出力するだけdistinct select distinct P1.Email from Person P1, Person P2 where P1.Email = P2.Email and P1.Id != P2.Id; -- 答えみたら天才がいた -- こういうやり方もあるみたい, 保守性は微妙だけど select Email from Person group by Email having count(*) > 1
true
898e10a443d45c37b38d598947da1d6ba8e05f36
SQL
Isur/isomorphic-react-app
/prisma/migrations/20210129220828_init/migration.sql
UTF-8
502
3.84375
4
[ "MIT" ]
permissive
-- CreateTable CREATE TABLE "User" ( "id" TEXT NOT NULL, "username" TEXT NOT NULL, "email" TEXT NOT NULL, "createdDate" TIMESTAMP(3) NOT NULL, "password" TEXT NOT NULL, PRIMARY KEY ("id") ); -- CreateTable CREATE TABLE "Session" ( "id" TEXT NOT NULL, "userId" TEXT NOT NULL, "expiry...
true
174933e1ed1e71e20d20a238f14eadcd9ac23c52
SQL
rohitjain01/get2015
/Web/Case Study Phase IV/dbscripts/20151022.sql
UTF-8
1,156
3.09375
3
[]
no_license
CREATE DATABASE Vehicle_Management; USE Vehicle_Management; CREATE TABLE Vehicle( vehicle_id INT AUTO_INCREMENT, created_by VARCHAR(10) NOT NULL, created_time timestamp NOT NULL, make VARCHAR(20) NOT NULL, model VARCHAR(20) NOT NULL, engine_cc INT NOT NULL, fuel_capacity INT NOT NULL, milage INT NOT NULL, price REAL...
true
5181ae4787a2d0aa054ab55bb94240aa45b05df4
SQL
lixinpingfriend/zhiban
/WEB-INF/action/project/dutyjoin/searchDutyUser/query-base.sql
UTF-8
432
3.171875
3
[]
no_license
select d.tuid,d.user_id,d.plan_date from pm_duty d where (to_timestamp(to_char(d.plan_date,'yyyy-MM-dd')||d.begin_date||' 00','yyyy-MM-dd HH24:mi:ss')-15/24/60)<=to_timestamp('${def:timestamp}','yyyy-MM-dd HH24:mi:ss:ff') and to_timestamp(to_char(d.plan_date,'yyyy-MM-dd')||d.end_date||' 00','yyyy-MM-dd HH24:mi:...
true
7befe191faaa568a3768ccf86216cfedcd8f3f6e
SQL
shakir337/Automobiles-
/Auto/autoerp.sql
UTF-8
6,219
3.09375
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.8.0.1 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Sep 14, 2018 at 05:21 PM -- Server version: 10.1.32-MariaDB -- PHP Version: 7.1.17 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @...
true
d4d4681977d5ddea8d94d9aae1105abad9b6db80
SQL
ybg345/sql-hands-on
/SQL-Zoo/3_SELECT from Nobel/12_SELECT from Nobel_Apostrophe.sql
UTF-8
133
2.65625
3
[]
no_license
/* Problem Statement: Find all details of the prize won by EUGENE O'NEILL. */ -- Solution: SELECT * FROM nobel WHERE winner = 'EUGENE O\'NEILL';
true
9bb73b5281adbcbbfa61bbf0ec567d71ab4c9865
SQL
lexiehansen/employee-tracker
/db/seed.sql
UTF-8
601
3.203125
3
[]
no_license
USE employees_db; INSERT INTO department (department_name) VALUES ("Sales"), ("HR"), ("Finance"), ("Engineering"), ("Operations"); INSERT INTO roles (title, salary, department_id) VALUES ("Sales Agent", 40000 , 1), ("HR Coordinator", 60000, 2), ("Accountant", 100000, 3), ("Lead Engineer", 150000 , 4), ("Lead...
true
58a8228c0d438b7d89600f7a969168e5d1a8978f
SQL
d-Soyam/EcommerceApplicationUsingPHP
/Database/shopping.sql
UTF-8
8,565
3.046875
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 3.5.2.2 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: Dec 31, 2014 at 05:24 AM -- Server version: 5.5.27 -- PHP Version: 5.4.7 SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /...
true
7d1927c18deeb4fbd6628066b3b1ad0a913c8d95
SQL
hepitk/bird-forum-tsoha
/schema.sql
UTF-8
703
3.1875
3
[]
no_license
CREATE TABLE users ( id SERIAL PRIMARY KEY, username TEXT UNIQUE, password TEXT ); CREATE TABLE categories ( id SERIAL PRIMARY KEY, name TEXT ); CREATE TABLE threads ( id SERIAL PRIMARY KEY, category_id INTEGER REFERENCES categories, user_id INTEGER REFERENCES users, content TEXT )...
true