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
631bde6b4690cb28962cade5608fcc929995a959
SQL
Jensonmathew25/programs
/program10.sql
UTF-8
632
3.515625
4
[]
no_license
CREATE TABLE customers(ID INT,Name CHAR(20),Age INT,Address CHAR(50),Salary INT PRIMARY KEY(ID)); INSERT INTO customers VALUES(1,"Rahul",27,"Delhi",15000); INSERT INTO customers VALUES(2,"Sachin",29,"Ahmedabad",20000); INSERT INTO customers VALUES(3,"James",35,"Chennai",25000); SELECT * FROM customers; DECLARE ...
true
0e299049fec72edf5d7b9a81200bbd13032aef48
SQL
MashaN2004/MPIT-Lotus
/hackaton.sql
UTF-8
2,893
3.234375
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.7.7 -- https://www.phpmyadmin.net/ -- -- Хост: 127.0.0.1:3306 -- Время создания: Апр 18 2021 г., 03:45 -- Версия сервера: 5.6.38 -- Версия PHP: 5.5.38 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACT...
true
331835c8e05ce2eb6c52301a2514a1f9597c463b
SQL
bakriridhwan/dispertangan
/pw2.sql
UTF-8
8,649
2.796875
3
[ "LicenseRef-scancode-unknown-license-reference", "MIT" ]
permissive
-- phpMyAdmin SQL Dump -- version 5.0.2 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Jan 10, 2021 at 08:48 PM -- Server version: 10.4.14-MariaDB -- PHP Version: 7.4.10 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIE...
true
028be81108d99e8359a978725eb327bfb0f39a26
SQL
wvlvik/callme
/aes-sample/db/callmewx_scans.sql
UTF-8
1,418
2.84375
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.2.9 -- http://www.phpmyadmin.net -- -- Host: localhost -- Generation Time: Jun 14, 2018 at 04:15 PM -- Server version: 5.5.40 -- PHP Version: 5.4.33 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; ...
true
b18c662ae7345b8fb4f4d68500cb9830e76aece0
SQL
snoow/swganh_database
/swganh_static/scripts/travel_planet_routes.sql
UTF-8
3,911
3.25
3
[]
no_license
-- --------------------------------------------------------------------------------------- -- This source file is part of SWG:ANH (Star Wars Galaxies - A New Hope - Server Emulator) -- -- For more information, visit http://www.swganh.com -- -- Copyright (c) 2006 - 2012 The SWG:ANH Team -- ------------------------------...
true
86128ca87cf0126a36d26ef822ea723313bedc47
SQL
tatenda11/school-social-network
/dbs/fi_messages.sql
UTF-8
2,484
2.984375
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.5.1 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: Apr 26, 2016 at 07:51 PM -- Server version: 10.1.10-MariaDB -- PHP Version: 5.6.19 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CL...
true
a61b2aae9f2befdf4ad75711ee4ea6717d2655fb
SQL
rajuneelam/Student_Portal_web
/data/srs_db.sql/srs_db_prerequisites.sql
UTF-8
2,557
3
3
[]
no_license
-- MySQL dump 10.13 Distrib 8.0.23, for Win64 (x86_64) -- -- Host: localhost Database: srs_db -- ------------------------------------------------------ -- Server version 8.0.23 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS *...
true
321a32c2488f7f21c1c7a0218497f5dbee9c57d4
SQL
open-fred/db
/preprocessing/supply/forwind_oeko_renewable_feedin_per_federalstate.sql
UTF-8
3,935
3.328125
3
[]
no_license
/* A description of the module (short but could be more than one line). Modules names should have short, all-lowercase names. The module name may have underscores if this improves readability. __copyright__ = "Copyright Reiner Lemoine Institut gGmbH" __license__ = "GNU Affero General Public License Version 3 (AGPL-...
true
e6a9abca793649070627137eb8826a0f5448d528
SQL
cnslyq/ts
/sql/stock_ddl.sql
UTF-8
636
2.890625
3
[]
no_license
drop table if exists stock_info; create table stock_info( `id` bigint(20) primary key not null auto_increment, `code` varchar(8), `name` varchar(16), `industry` int(8), `concept` varchar(256), `area` int(6), `is_sme` int(1), `is_gem` int(1), `is_risk` int(1), `is_hs300` int(1), `is_sz50` int(1), `is_zz500` ...
true
49012b5734295867e7fb6066c0a46f6345371995
SQL
joseluisescobar09/proyecto_integrador
/proyecto.sql
UTF-8
755
3.328125
3
[]
no_license
CREATE TABLE IF NOT EXISTS accounts ( id_usuario INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, nombre VARCHAR(30) NOT NULL, apellido_paterno VARCHAR(30) NOT NULL, apellido_materno VARCHAR(30) NOT NULL, fecha_nacimiento CHAR(15) NOT NULL, genero TEXT CHECK( genero IN ('H','M') ) NOT NULL, email...
true
2e1f5eb4a504fa687b5c700737c476705f8c8077
SQL
mastorakakis/Private-School
/Database/selections.sql
UTF-8
3,672
4.1875
4
[]
no_license
-- List of all students------------ SELECT st_id 'Student ID', concat(first_name, ' ', last_name) 'Full Name', date_of_birth 'Birth Date', tuition_fees 'Tuition Fees' FROM students; -- Lists of all trainers------------- SELECT t_id 'Trainer ID', concat(first_name, ' ', last_name) 'Full Name', ...
true
83096c7f3f779c08d29d5f10e85b9f3f7fb21bf1
SQL
Maxxx-zh/SQL-Fundamentals-
/SQL Fundamentals.sql
UTF-8
5,778
4.375
4
[]
no_license
-- Start ## SELECT * FROM recent_grads -- First Query ## select * from recent_grads; -- The LIMIT Clause ## SELECT * FROM recent_grads LIMIT 5; -- Selecting Specific Columns ## SELECT Major , ShareWomen FROM recent_grads -- SELECT name , tagline , contributed_by FROM beers LIMIT 10; -- Filtering Rows Using...
true
dcdeb7bf235b94c7c7c1c542e6f6970630eb5e36
SQL
towenxie/tncrawler
/db/baidudb.sql
UTF-8
1,161
3.09375
3
[]
no_license
CREATE DATABASE IF NOT EXISTS `baidudb`; USE `baidudb`; -- -- Table structure for table `resitem` -- DROP TABLE IF EXISTS `resitem`; CREATE TABLE `resitem` ( `id` int(11) NOT NULL AUTO_INCREMENT, `name` varchar(200) DEFAULT NULL, `last_update` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIME...
true
da5000f8d00af8ed6c7c863e874731cd7da9a3e4
SQL
madararoz/EasyShopper
/src/main/resources/database.sql
UTF-8
483
3.34375
3
[]
no_license
create database if not exists EasyShopper; use EasyShopper; create table if not exists products( id int not null auto_increment, name varchar(80) not null, price decimal(10,2) not null, quantity int, cost decimal(10,2) not null, primary key(id) ); SELECT * FROM products; create table if not exists users ( id int no...
true
c4797051cce5442199b409fd11580ae4235518c4
SQL
LucaMD/SRL
/SEPSIS/MIMIC_sql/gcs_all.sql
UTF-8
951
3.90625
4
[]
no_license
set search_path to mimiciii; DROP MATERIALIZED VIEW IF EXISTS gcs CASCADE; create materialized view gcs as WITH agetbl AS ( SELECT ad.subject_id FROM admissions ad INNER JOIN patients p ON ad.subject_id = p.subject_id WHERE -- filter to only adults EXTRACT(EPOCH FROM (ad.admittime - p.dob)...
true
53f7b3f9849d58f9c457a121bc11b6332aef8023
SQL
ekeh77/Pracktice-Class
/Database/0422연습용~1.sql
UHC
7,586
2.875
3
[]
no_license
CREATE TABLE G_CLASS ( CLASS_ID CHAR(5) NOT NULL, CLASS_NAME VARCHAR(30) NOT NULL, YEAR_PRICE NUMBER(10) NOT NULL ); INSERT INTO (CLASS_ID, CLASS_NAME, YEAR_PRICE) VALUES ('CL001','',10000000); INSERT INTO (CLASS_ID, CLASS_NAME, YEAR_PRICE) VALUES ('CL002','',7000000); INS...
true
92df4a80a629f615e25bf317fb3f41e9c5199c6c
SQL
ralfsilvadba/Database
/Oracle/Administration/vdg.sql
UTF-8
495
2.953125
3
[]
no_license
clear columns column TOTAL_MB format 999,999,999,999.99 column FREE_MB format 999,999,999,999.99 column "USADO" format 999,999,999,999.99 column "% FREE" format 999.99 compute sum of TOTAL_MB on report compute sum of FREE_MB on report compute sum of "USADO" on report break on report set lines 200 pages 100 select NAME...
true
7df54778a5daa84bd3f5f6a75ed52503a36603d6
SQL
surya-9556/Day15_Task
/SQLQuery8.sql
UTF-8
246
3.1875
3
[]
no_license
use pubs create table tblMovie (id int identity(1,1) primary key, name varchar(20), duration float) select * from tblMovie update tblMovie set name = 'x-men first class' where id = '9' insert into tblMovie(name,duration) values('x-men',123.2)
true
1a0bdd839b16cffa96d4c48d29786448c8381e90
SQL
alanjj22/ADAPT
/Sprint 1 Book Rental B9/Learning Outcome 3/Books Availed by Most of the users.sql
UTF-8
355
3.59375
4
[]
no_license
/* Fetch the book which was availed for rent by most users */ select * from book where book_id = (select book_id from book_rental group by book_id having count(*)= (select * from (select count(*) from book_rental group by book_id order...
true
7afbccf6b7b36987efb97ddc7a0b8cca5c863907
SQL
Lemas97/Score4-Api
/DB/score4_schema.sql
UTF-8
4,362
3.078125
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 5.0.3 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Jan 04, 2021 at 12:21 PM -- Server version: 10.4.14-MariaDB -- PHP Version: 7.2.34 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIE...
true
881f0ccfc54ba760e20c739c45fe6898decade86
SQL
13816016736/yaoyy
/res/yaoyy/doc/sql/v0.3.sql
UTF-8
11,317
3.4375
3
[]
no_license
DROP TABLE IF EXISTS `area`; CREATE TABLE `area` ( `id` int(10) NOT NULL COMMENT 'ID', `areaname` varchar(50) NOT NULL COMMENT '栏目名', `parentid` int(10) NOT NULL COMMENT '父栏目', `shortname` varchar(50) DEFAULT NULL, `areacode` int(6) DEFAULT NULL, `zipcode` int(10) DEFAULT NULL, `pinyin` varchar(100) DEFAU...
true
674bd1e8e42ebdd2865e878983e012996ae1eb91
SQL
zoyron/oneauth
/migrations/075-to-076.sql
UTF-8
184
2.53125
3
[]
no_license
CREATE TABLE IF NOT EXISTS whitelist_domains ( id SERIAL PRIMARY KEY, domain VARCHAR(256) UNIQUE NOT NULL, "createdAt" TIMESTAMPTZ NOT NULL, "updatedAt" TIMESTAMPTZ NOT NULL )
true
6cb6a9561b0db32a42325a453f2489977fb43037
SQL
slastenovd/test2
/dz9-mysqli/install.sql
UTF-8
6,521
3.3125
3
[]
no_license
-- Adminer 4.2.3 MySQL dump SET NAMES utf8; SET time_zone = '+00:00'; SET foreign_key_checks = 0; SET sql_mode = 'NO_AUTO_VALUE_ON_ZERO'; DROP DATABASE IF EXISTS `%database_name%`; CREATE DATABASE `%database_name%` /*!40100 DEFAULT CHARACTER SET utf8 */; USE `%database_name%`; DROP TABLE IF EXISTS `ads`; CREATE TABL...
true
14dd6e39fc1f5baf9103af31ac55df6dabf70dbd
SQL
RubenLopezMompean/golden_race
/db_goldenrace.sql
UTF-8
3,441
3.25
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 5.1.0 -- https://www.phpmyadmin.net/ -- -- Servidor: 127.0.0.1 -- Tiempo de generación: 02-05-2021 a las 23:15:32 -- Versión del servidor: 10.4.18-MariaDB -- Versión de PHP: 8.0.3 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_...
true
cc1118ebac9afdee9e23b105f613edea67b2ed16
SQL
IndulisErgis/ABF
/dbo/Views/Alp_lkpArAlpCheckServiceProcessed.sql
UTF-8
462
2.984375
3
[]
no_license
CREATE VIEW dbo.Alp_lkpArAlpCheckServiceProcessed AS SELECT dbo.ALP_tblArAlpSiteRecBillServ .Processed, dbo.Alp_tblArAlpSite.SiteId FROM dbo.ALP_tblArAlpSiteRecBill INNER JOIN dbo.Alp_tblArAlpSiteRecBillServ ON dbo.ALP_tblArAlpSiteRecBill.RecBillId = dbo.Alp_tblArAlpSiteRecBil...
true
1dfafd06a7290ed6025d32abce53da7d7a125d83
SQL
YingchuLo/leetcode_sql
/sql.sql
UTF-8
1,777
4.21875
4
[]
no_license
#175 select firstname, lastname,city, state from person p left join address a on p.personid=a.personid #176 SELECT max(Salary) as SecondHighestSalary FROM Employee WHERE Salary < (SELECT max(Salary) FROM Employee) #177 CREATE FUNCTION getNthHighestSalary(N INT) RETURNS INT BEGIN SET N = N - 1; RETURN ( # Writ...
true
342a3b5b042758185564d9161e6106b900eb9e49
SQL
vatic/books
/src/db/sql/create_tables.sql
UTF-8
607
3.859375
4
[]
no_license
DROP TABLE IF EXISTS `books`; DROP TABLE IF EXISTS `authors`; CREATE TABLE `authors` ( `id` INT NOT NULL AUTO_INCREMENT, `name` VARCHAR(255) NOT NULL, PRIMARY KEY(`id`) ); CREATE TABLE `books` ( `id` INT NOT NULL AUTO_INCREMENT, `title` VARCHAR(255) NOT NULL, ...
true
36c89466197ba6e93ea7925bcb52e8ad82e88040
SQL
NikitaChernyavskii/mtg-collector
/DataBase/Create_Card_table_03082017.1406.sql
UTF-8
1,155
2.65625
3
[]
no_license
CREATE TABLE [Card] ( Id uniqueidentifier NOT NULL, MtgJsonId NVARCHAR(40) NOT NULL, CardSetId uniqueidentifier NOT NULL, Layout NVARCHAR(150) NULL, Name NVARCHAR(150) NOT NULL, Names NVARCHAR(350) NULL, -- array ManaCost NVARCHAR(150) NULL, Cmc FLOAT NULL, Colors NVARCHAR(150) NULL, -- arr...
true
895378959a6db657c61b75618e55fec034bf7b3b
SQL
laluhaenol12/tugasweb
/webd_haenol.sql
UTF-8
2,663
3.234375
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 5.0.2 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Dec 29, 2020 at 12:00 PM -- Server version: 10.4.14-MariaDB -- PHP Version: 7.4.10 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIE...
true
d67a6c7f05b5bebac7993ea76009deb140f16283
SQL
leonardomontagna/RipeTO
/RipeTO/out/artifacts/RipeTO_war_exploded/WEB-INF/lib/ripetizioni.sql
UTF-8
5,049
3.109375
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 5.0.1 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Creato il: Giu 30, 2020 alle 18:48 -- Versione del server: 10.4.11-MariaDB -- Versione PHP: 7.4.3 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_...
true
df64a94c031e64c27650026e78f5bd3da11c5d7b
SQL
j19791/PL-SQL
/aula2_bloco_insert.sql
ISO-8859-1
706
2.9375
3
[]
no_license
DECLARE --declarao das variveis, j inicializando-as - s obrigatrio DECLARE qdo for utilizar variaveis --v_id number(5) := 1; --v_descricao varchar2(100) := 'varejo'; --melhorando a definio do tipo da varivel p/ que seja sempre compatvel com a definio da coluna no banco v_id segmercado.id%type...
true
bf76b38f036d60e79d439f9d4117e7e00bdb06e6
SQL
tanbinh123/Restaurant
/src/main/resources/db/populateDB.sql
UTF-8
1,339
3.484375
3
[]
no_license
DELETE FROM user_roles; DELETE FROM votes; DELETE FROM dishes; DELETE from restaurants; DELETE FROM users; ALTER SEQUENCE global_seq RESTART WITH 1; INSERT INTO users (name, email, password) VALUES ('User1', 'user1@mail.ru', '{noop}password1'), ('User2', 'user2@mail.ru', '{noop}password2'), ('User3', 'us...
true
d41eefb61fae29cbb0421db0cac0b811ef61600d
SQL
tomihasa/citibike-nyc
/scripts/aggregate_trips.sql
UTF-8
1,049
3.796875
4
[]
no_license
-- create trips table create table trips ( "tripduration" numeric, "starttime" timestamp, "stoptime" timestamp, "start station id" varchar, "start station name" varchar, "start station latitude" numeric, "start station longitude" numeric, "end station id" varchar, "end station name" varchar, "end st...
true
dfea7a9710c4f2c50f291f6030c0074bbf76485e
SQL
jesterfs/easycal-api
/seeds/seed.easycal.sql
UTF-8
920
2.96875
3
[]
no_license
INSERT INTO members (name, email, password) VALUES ('Bob', 'bob@gmail.com', 'password1'), ('Fred', 'fred@gmail.com', 'password2'), ('Stan', 'stan@gmail.com', 'password3'), ('Sally', 'sally@gmail.com', 'password4'), ('Deb', 'deb@gmail.com', 'password5'), ('Mary', 'mary@gmail.com', 'password6'); INSERT INTO calendars (n...
true
e285850bea74930f35aadf7bd9cb98c2ccacdbad
SQL
kematuGit/yonglin
/one/yonglin.sql
UTF-8
3,563
3.515625
4
[]
no_license
/* Navicat MySQL Data Transfer Source Server : yonglin Source Server Version : 50162 Source Host : localhost:3306 Source Database : yonglin Target Server Type : MYSQL Target Server Version : 50162 File Encoding : 65001 Date: 2017-02-15 23:02:08 */ SET FOREIGN_KEY_CHECKS=0; -- ---...
true
9d0998d0e5452127795e4a6a2d0a9cb8878b8ecf
SQL
jxiaoyu/LeetCode-practice
/database/Second Highest Salary.sql
UTF-8
572
3.9375
4
[]
no_license
# 这题明明是 Nth Highest Salary 的特例,但不知道为什么 Nth 那道就不需要 if 判断 # Write your MySQL query statement below SELECT IF ( COUNT(Salary) >= 0, Salary, NULL ) FROM ( SELECT DISTINCT Salary FROM Employee ORDER BY Salary DESC LIMIT 1, 1 ) ...
true
77b579a1d476045e2d556c99053597c301c7831a
SQL
andrei-kolesnik/leetcode
/sql/175.Combine-Two-Tables.SQL
UTF-8
227
3.296875
3
[]
no_license
-- LeetCode # 175: Combine Two Tables -- https://leetcode.com/problems/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
true
d8e265387c91ab541c8f11288c97a5107013e39e
SQL
Irisss666/spaceX-database-system
/MYSQL-scripts/Rockets.sql
UTF-8
730
2.8125
3
[]
no_license
USE `SpaceX-DB`; CREATE TABLE Rockets (rocket_id VARCHAR(24) NOT NULL PRIMARY KEY,name VARCHAR(20),type VARCHAR(10),active VARCHAR(10),country VARCHAR(40), company VARCHAR(20), cost_per_launch INTEGER); INSERT INTO Rockets VALUES ('5e9d0d95eda69955f709d1eb','Falcon 1','rocket','False','Republic of the Marshall Isl...
true
752b3ea6e314ec36d76bb0adac261f65da7f25f5
SQL
RolandoAndrade/minerucab
/queries/entrega/PRUEBAS.SQL
UTF-8
108
3.3125
3
[]
no_license
SELECT R.*,A.* FROM ROL R, ROL_ACCI RA, ACCION A WHERE R.r_id_rol=RA.rol_id AND RA.accion_id = A.a_id_accion
true
efb030c85ec12cc1dd12c7837c69c5ce073cf42e
SQL
exequielarroyo/ReservationSystem
/MySQL database/reservationsystem.sql
UTF-8
2,521
3.3125
3
[]
no_license
/* SQLyog Community v13.1.7 (64 bit) MySQL - 8.0.21 : Database - reservationsystem ********************************************************************* */ /*!40101 SET NAMES utf8 */; /*!40101 SET SQL_MODE=''*/; /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; /*!40014 SET @OLD_FOREIGN_KEY_CHECKS...
true
ca7c355b471ce9cfa026ee0b05ec1cbd341c9741
SQL
sinsys/taskmon_server
/db/migrations/001.do.create-tasks-table.sql
UTF-8
314
2.984375
3
[]
no_license
CREATE TABLE tasks ( id INTEGER PRIMARY KEY GENERATED BY DEFAULT AS IDENTITY, title TEXT NOT NULL, content TEXT, date_modified TIMESTAMPTZ DEFAULT now() NOT NULL, date_created TIMESTAMPTZ DEFAULT now() NOT NULL, date_due TIMESTAMPTZ DEFAULT (now() + interval '1 day 2 hours 30 minutes') );
true
6cfc39d176876835bf9bd8db3c9aad05e41bb389
SQL
CUBRID/cubrid-testcases
/sql/_04_operator_function/_01_all_types/_002_arithmetic_op/cases/1046.sql
UTF-8
830
3.09375
3
[ "BSD-3-Clause" ]
permissive
--test numeric data type by '+','-','*','/' operators with smallint,int,numeric,float,monetary,double data type value create class func_02 ( a smallint, b int, c numeric(38,10), d float, e monetary, f double ); insert into func_02 values ( 0,0,0,0,0,0); insert into func_02(a) values ( null); insert into func_02 values...
true
81c589dfd07820ea6332657c4464aea153b2f3d0
SQL
jorgevalentin/docsis-provisioning
/sources/sql/database/500application/050subscriber.sql
UTF-8
1,089
2.71875
3
[]
no_license
-- $Id$ create table {:SCHEMA:}subscriber ( subscriberid integer not null unique, name varchar(256) not null, primarylocationid int8 REFERENCES {:SCHEMA:}objectids ON DELETE SET NULL ON UPDATE CASCADE NULL, postaladdress varchar(512) null, info text null, email varchar(128)[] null, telephone varchar...
true
399bcd0607129edfaaa8ddd4a5a9082553f419dd
SQL
Lexa-san/mvc-example
/db/asolovev_kplus.sql
UTF-8
3,693
3.875
4
[ "MIT" ]
permissive
DROP DATABASE IF EXISTS asolovev_kplus; CREATE DATABASE IF NOT EXISTS asolovev_kplus DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_general_ci; USE `asolovev_kplus` ; DROP TABLE IF EXISTS `chess_grid`; CREATE TABLE IF NOT EXISTS `chess_grid` ( `id` INT UNSIGNED NOT NULL AUTO_INCREMENT, `name` CHAR(2) NOT NUL...
true
72f2ac081b5ec99283ba4a6adffc5da0e46de095
SQL
azavea/pfb
/stress_residential.sql
UTF-8
1,678
3.40625
3
[ "Apache-2.0" ]
permissive
---------------------------------------- -- INPUTS -- location: neighborhood -- notes: residential streets with bike lanes of any type -- are scored as tertiary streets ---------------------------------------- UPDATE neighborhood_ways SET ft_seg_stress = NULL, tf_seg_stress = NULL WHERE functional_class = 're...
true
a4bfe26b519995a42b455be1e9bf0973df23c05d
SQL
Deptfortransport/SJP
/SJP/CodeBase/SJP/DataBases/PermanentPortal/Schema Objects/Schemas/dbo/Programmability/Stored Procedures/SelectGroupPropertiesWithPartnerId.proc.sql
UTF-8
401
2.703125
3
[]
no_license
 --------------------------------------------------------------------- -- Update to SelectGroupPropertiesWithPartnerId Proc --------------------------------------------------------------------- CREATE PROCEDURE SelectGroupPropertiesWithPartnerId ( @GID char(50) ) AS BEGIN SELECT (CAST(PartnerId AS varchar(10)) + '.'...
true
d6dc9b20812b87fb025a0bd274fcce8465c33662
SQL
mashikr/PDO-CRUD-app
/database.sql
UTF-8
1,802
3.1875
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 5.0.2 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Aug 09, 2020 at 12:22 PM -- Server version: 10.4.13-MariaDB -- PHP Version: 7.4.7 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIEN...
true
90d8f20672d7e24af79d4ce3df14c24874daa381
SQL
Vivovim/perljournals
/SQL CODE/myjournalsJournals.sql
UTF-8
1,019
2.609375
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 3.3.9 -- http://www.phpmyadmin.net -- -- Host: localhost -- Generation Time: Jun 17, 2018 at 06:51 PM -- Server version: 5.5.20 -- PHP Version: 5.3.10 SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_...
true
9550e098585770182a283dd13ba2153b409851f4
SQL
csaszarhunor/hr_db
/basic_select.sql
UTF-8
597
3.375
3
[]
no_license
SELECT DISTINCT DEPARTMENT_ID FROM employees; SELECT * FROM employees GROUP BY FIRST_NAME DESC; SELECT SUM(SALARY) FROM employees; SELECT MAX(SALARY), MIN(SALARY) FROM employees; SELECT AVG(SALARY), COUNT(EMPLOYEE_ID) FROM employees; SELECT COUNT(EMPLOYEE_ID) FROM employees; SELECT COUNT(JOB_ID) FROM employees; SELECT ...
true
f795fb954587e6e3f42022898d8b3f7eb919e885
SQL
Metro-state/ICS311-group-project
/sql/omdb_sql_queries.sql
UTF-8
2,667
4
4
[]
no_license
INSERT INTO movies VALUES (1002, 'Frozen', 'Frozen', 1995); INSERT INTO songs VALUES (2, 'Let it go', 'Let it Go', 'The snow glows white on the mountain tonight. Not a footprint to be seen'); INSERT INTO movie_song VALUES (1002, 2); INSERT INTO movie_trivia VALUES (1002, 1, 'Blob'); INSERT INTO movie_trivia VALUES (100...
true
7f494f3349dc594ce89b32cbad607906ad89d1bd
SQL
svetlimladenov/Databases-Basics---MS-SQL-Server
/03.Built-in functions/Exercises Built-in functions/Part IV – Date Functions Queries.sql
UTF-8
337
3.3125
3
[ "MIT" ]
permissive
USE Orders --Problem 16. Orders Table SELECT ProductName, OrderDate, DATEADD(DAY,3,OrderDate) AS [Pay Due], DATEADD(MONTH,1,OrderDate) AS [Deliver Due] FROM Orders --Problem 17. People Table CREATE TABLE People ( Id INT IDENTITY PRIMARY KEY, Name NVARCHAR NOT NULL, Birthdate DATETIME NOT NULL ) SELECT...
true
6e4aa78a11e59d97dcab348847dc83d8e09f5819
SQL
ashwinp94/StudentExercisesP4
/StudentExercises.sql
UTF-8
3,744
3.828125
4
[]
no_license
--Create new tables CREATE TABLE Cohort ( Id INTEGER NOT NULL PRIMARY KEY IDENTITY, CohortName VARCHAR(55) NOT NULL, ); CREATE TABLE Exercise ( Id INTEGER NOT NULL PRIMARY KEY IDENTITY, ExerciseName VARCHAR(55) NOT NULL, [Language] VARCHAR(55) NOT NULL, ); CREATE TABLE Student ( Id INTEGER NO...
true
e37e84d5850a2a56b699742de7d39ac9e6f4992e
SQL
slezhnev/Financial-ARM
/scripts/old/createRoles.sql
UTF-8
534
2.515625
3
[]
no_license
CREATE ROLE "armDirectors" NOSUPERUSER INHERIT NOCREATEDB CREATEROLE; CREATE ROLE "armUsers" NOSUPERUSER INHERIT NOCREATEDB NOCREATEROLE; ALTER DEFAULT PRIVILEGES GRANT INSERT, SELECT, UPDATE, DELETE, TRUNCATE, REFERENCES, TRIGGER ON TABLES TO postgres; ALTER DEFAULT PRIVILEGES GRANT INSERT, SE...
true
7371736ec9668c7f56da496939a3f1a2180d4fe6
SQL
zabir110/Online-Job-Portal
/ww.sql
UTF-8
453
2.609375
3
[]
no_license
set serveroutput on declare f utl_file.file_type; cursor c1 is select * from selection; begin f:=utl_file.fopen('DATABASE','ss.csv','w'); utl_file.put(f,'j'||','||'com'||','||'us'); utl_file.new_line(f); for record in c1 loop DBMS_OUTPUT.PUT_LINE (record.job_id || ',' || record.com_name || ',' || record....
true
d1b0983090e9a67cafab7c460b7ccefc3b74668c
SQL
hsson428/ssac-academy
/workspace/db/new-02.sql
UTF-8
2,894
4.53125
5
[]
no_license
USE sqldb; -- 1. 다음과 같은 속성을 가진 NewCustomer 테이블을 생성하시오. -- custid(고객번호) - INTEGER, 기본키 -- name(이름) – VARCHAR(40) -- address(주소) – VARCHAR(40) -- phone(전화번호) – VARCHAR(30) CREATE TABLE new_customer ( custid int primary key auto_increment, custname varchar(40) not null, address varchar(50) null, ...
true
db08e65351b2cb5c06506dae6aa90da69d00a769
SQL
erkn50/XoopsCore
/htdocs/modules/page/sql/mysql.sql
UTF-8
2,999
3.109375
3
[]
no_license
CREATE TABLE `page_content` ( `content_id` int(11) unsigned NOT NULL AUTO_INCREMENT, `content_title` varchar(255) NOT NULL DEFAULT '', `content_shorttext` text NOT NULL, `content_text` text NOT NULL, `content_create` int(10) NOT NULL DEFAULT '0', `content_author` int(11) NOT NULL DEFAULT '0', `cont...
true
01e80b294d585f2c971e0862661d3cdba97a76e3
SQL
silence-do-good/stress-test-Postgres-and-MySQL
/dump/high/day16/select1759.sql
UTF-8
178
2.65625
3
[]
no_license
SELECT timeStamp, temperature FROM ThermometerOBSERVATION o WHERE timestamp>'2017-11-15T17:59:00Z' AND timestamp<'2017-11-16T17:59:00Z' AND temperature>=35 AND temperature<=39
true
96fec98581ab806f046f37be164639d3cf95e6d3
SQL
cha63506/upload-162
/schema.sql
UTF-8
562
2.6875
3
[]
no_license
DROP TABLE IF EXISTS `upload_file`; CREATE TABLE `upload_file` ( `id` int(11) NOT NULL auto_increment, `token_upload` int(11) NOT NULL, `token_download` int(11) NOT NULL, `created` int(11) NOT NULL, `uploaded` int(11) NOT NULL, `file` varchar(255) NOT NULL, PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHAR...
true
384013811c857fdffc2a7d8a52573b08476ae49f
SQL
asv765/aConverter
/aConverterClassLibrary/Resources/StoredProcs/CNV/CNV_CNV_00910_ADDCHARS.sql
UTF-8
1,007
2.90625
3
[]
no_license
SET TERM ^ ; create or alter procedure CNV$CNV_00910_ADDCHARS ( NEEDDELETE smallint = 0) as BEGIN IF (needdelete = 1) THEN DELETE FROM abonentadditionalchars AD where AD.lshet IN (SELECT LSHET FROM cnv$aaddchar); merge into abonentadditionalchars ad using cnv$aaddchar ca on ca.lshet = ad.lshet and ca.add...
true
94ecea1a7057ec8fee8cfce32bd52f81028eae5a
SQL
vivekvppanneerselvam/DTInvoice
/src/resources/sql/db-ddl.sql
UTF-8
6,386
3.421875
3
[]
no_license
-- ============================ -- This file was created using Derby's dblook utility. -- Timestamp: 2016-09-23 12:17:00.024 -- Source database is: e:\learning\javafx\fxbilling\database\db -- Connection URL is: jdbc:derby:e:\learning\javafx\fxbilling\database\db -- appendLogs: false -- -------------------------------...
true
6b97e59ce83f73080776620d92b0ae6ec042b901
SQL
nehemiasblanco95/Appsiste
/bd/nldgobmx_beneficiariosdif.sql
UTF-8
71,492
2.734375
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.5.1 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: Nov 30, 2018 at 10:20 PM -- Server version: 10.1.16-MariaDB -- PHP Version: 5.6.24 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CL...
true
b8fefbae01c3e311fcc5e2c0ab48ce7baac318f3
SQL
garciandcruz/BurgerLog
/db/schema.sql
UTF-8
315
2.953125
3
[]
no_license
CREATE DATABASE burgers_db; USE burgers_db; CREATE TABLE burgers ( id int NOT NULL AUTO_INCREMENT, burger_name varchar (255) NOT NULL, eaten BOOLEAN DEFAULT false, PRIMARY KEY (id) ); INSERT INTO burgers (burger_name) VALUES ('Hamburger'), ('Cheeseburger'), ('Mookie'), ('Bacon Cheeseburger');
true
01ba86c869371e709351b43abff97262317babb9
SQL
BugIsComing/mybatisDemo
/src/main/resources/SQL/phone.sql
UTF-8
516
2.9375
3
[]
no_license
drop table phone_user; create table phone_user ( user_id integer , name varchar(20), PRIMARY KEY (user_id) ); INSERT INTO `phone_user` VALUES (1, 'LC'); INSERT INTO `phone_user` VALUES (2, 'LCLC'); drop table phone; create table phone ( phone_id integer , phone_number varchar(20), user_id integer, PRIMA...
true
9238356522027aac74c5047d2e63bd0932ccc5e3
SQL
radtek/abs3
/sql/mmfo/bars/Procedure/p_ff1_nn.sql
WINDOWS-1251
37,146
3
3
[]
no_license
PROMPT ===================================================================================== PROMPT *** Run *** ========== Scripts /Sql/BARS/Procedure/P_FF1_NN.sql =========*** Run *** PROMPT ===================================================================================== PROMPT *** Create procedure...
true
e618657f98d637f513e8fee037ed638a4a897a84
SQL
WebMobileDeveloper/codeigniter
/migrations/2015-06-07-new-auth-user-changes.sql
UTF-8
1,341
3.046875
3
[]
no_license
ALTER TABLE `users` ADD `uuid` VARCHAR( 200 ) NOT NULL AFTER `id`; ALTER TABLE `users` ADD `phone_number` VARCHAR( 30 ) NOT NULL AFTER `last_name`; ALTER TABLE `users` ADD `role_id` TINYINT NOT NULL AFTER `last_name`; ALTER TABLE `users` ADD `password` VARCHAR( 100 ) NOT NULL AFTER `email`; ALTER TABLE `users` ADD `sa...
true
230d2c9c36a81dd129723f5e584611481ec33096
SQL
DabAroundTheNeck/INFI
/sql/procedures.sql
UTF-8
1,478
4.25
4
[]
no_license
DROP PROCEDURE if exists `getSubjectsLessons`; CREATE PROCEDURE `getSubjectsLessons`() NOT DETERMINISTIC READS SQL DATA SQL SECURITY DEFINER SELECT subjects.id, subjects.lvnr, subjects.title, subjects.groups_required, teachers.short, lessons.hours, lessons.group FROM subjects INNER JOIN lessons ON subjects.id = l...
true
5679e09cf1b0a29cb6700b13e55ba467cc8c2fbe
SQL
davidpoza/summerproject
/mysql/wimc.sql
UTF-8
1,334
3.78125
4
[]
no_license
CREATE TABLE `users` ( `id` int(11) NOT NULL AUTO_INCREMENT, `user` varchar(20) COLLATE utf8_spanish_ci DEFAULT NULL, `password` varchar(200) COLLATE utf8_spanish_ci DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 COLLATE=utf8_spanish_ci; CREATE TABLE `sensors` ( `id` ...
true
72f647f439f27659ce926b71d7db96eec62aa83e
SQL
ndxt/centit-workflow
/centit-workflow-module/src/sqlScript/数据库初始化/oracle/createTablesOracle.sql
UTF-8
29,527
2.703125
3
[]
no_license
drop view F_V_LASTVERSIONFLOW; drop view V_INNER_USER_TASK_LIST; drop view V_USER_TASK_LIST; drop view v_node_instdetail; drop table WF_ACTION_LOG cascade constraints; drop table WF_ACTION_TASK cascade constraints; drop table WF_FLOW_DEFINE cascade constraints; drop table WF_FLOW_INSTANCE cascade constraints; d...
true
cc26ec1529c2613555eecbd0ddac4f18cdb49af8
SQL
matrix-org/synapse
/synapse/storage/schema/main/full_schemas/16/im.sql
UTF-8
3,631
3.6875
4
[ "Apache-2.0" ]
permissive
/* Copyright 2014-2016 OpenMarket Ltd * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed...
true
8565b5ffd87d343c839feb1a3fa6c6eeed06cf76
SQL
silence-do-good/stress-test-Postgres-and-MySQL
/dump/low/day16/select2018.sql
UTF-8
178
2.625
3
[]
no_license
SELECT timeStamp, temperature FROM ThermometerOBSERVATION o WHERE timestamp>'2017-11-15T20:18:00Z' AND timestamp<'2017-11-16T20:18:00Z' AND temperature>=22 AND temperature<=56
true
c4504fc72255b8cedbb23c5d78b2ee58fdd45e09
SQL
adamszpilewicz/job
/json_unnest_20200315.sql
UTF-8
1,229
3.390625
3
[]
no_license
with json as ( SELECT split(json_extract(json_data, '$.page_1_gbv_nonperf.gross_balance_value'), ',') as gross_balance_value, split(json_extract(json_data, '$.page_1_gbv_nonperf.performing_class'), ',') as performing_class, split(json_extract(json_data, '$.page_1_gbv_nonperf.pk_snapshot_date...
true
9385fc6b2e39d6d396ae9a0b3f72b29add132174
SQL
ffakenz/DAS
/project/workspace/concesionarias/db/src/main/resources/liquibase/procedures/scenarios/planes/update_plan.sql
UTF-8
310
2.625
3
[]
no_license
CREATE PROCEDURE update_plan ( @id BIGINT , @estado VARCHAR(100) , @fecha_ultima_actualizacion DATETIME ) AS UPDATE dbo.planes SET estado = @estado , fecha_ultima_actualizacion = @fecha_ultima_actualizacion WHERE id = @id
true
595cc8b6c75635ca4a5019eecdb0aa13f3c4ab63
SQL
string-maaz/Buy-Care
/boilerplate/transit_final_products.sql
UTF-8
2,746
3.21875
3
[ "MIT" ]
permissive
-- phpMyAdmin SQL Dump -- version 4.5.2 -- http://www.phpmyadmin.net -- -- Host: localhost -- Generation Time: Jan 07, 2016 at 05:05 AM -- Server version: 5.7.9-log -- PHP Version: 5.6.11 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT *...
true
7a23eb43918d95e285b177c5e4be9bff00387a84
SQL
gabrielkulp/community-garden
/sample_sql/ddq.sql
UTF-8
3,958
4.0625
4
[]
no_license
DROP TABLE IF EXISTS people_plots; DROP TABLE IF EXISTS plants; DROP TABLE IF EXISTS tools; DROP TABLE IF EXISTS people; DROP TABLE IF EXISTS plots; DROP TABLE IF EXISTS varieties; -- DDQs CREATE TABLE people ( person_id INTEGER PRIMARY KEY AUTOINCREMENT, first_name VARCHAR(100) NOT NULL, last_name VARCHAR(100) NOT...
true
963b884def973a69c30db09cdc02280d84d46b94
SQL
Lightwing-Ng/LeetCodeSQL-master
/620有趣的电影.sql
UTF-8
1,906
3.734375
4
[]
no_license
/* 某城市开了一家新的电影院,吸引了很多人过来看电影。该电影院特别注意用户体验,专门有个 LED显示板做电影推荐,上面公布着影评和相关电影描述。 作为该电影院的信息部主管,您需要编写一个 SQL查询,找出所有影片描述为非 boring (不无聊) 的并且 id 为奇数 的影片,结果请按等级 rating 排列。 例如,下表 Cinema: +---------+-----------+--------------+-----------+ | id | movie | description | rating | +---------+-----------+--------------+--...
true
dd0439bc9195604cd6659de45db847b93d1ea4f8
SQL
lzzzzzz/jianxun
/src/test/resources/db/schema.sql
UTF-8
4,762
3.578125
4
[]
no_license
SET NAMES utf8; SET FOREIGN_KEY_CHECKS = 0; DROP TABLE IF EXISTS `dictionary`; CREATE TABLE `dictionary` ( `dic_key` varchar(64) NOT NULL comment '词典名,词典值的拼音', `parent_key` varchar(64) DEFAULT NULL comment '词典父id', `name` varchar(32) NOT NULL comment '词典值最多8个汉字', `en_name` varchar(32) co...
true
396e073a07a7291bb3970c9c80c1f686ffc4bcc2
SQL
johnny9052/LoginMasterPageDAO
/Recursos/sql/script.sql
UTF-8
556
3.28125
3
[]
no_license
Create table Estudiante( id SERIAL, codigo varchar(20), nombre varchar(30), apellido varchar(50), cedula varchar(20), edad integer, semestre integer, CONSTRAINT estudiante_pkey PRIMARY KEY (id) ); CREATE TABLE usuario ( nickname varchar(15), nombre varchar(50), password varchar(50), primary key(nickname) ) ...
true
a5e51f64637c337f5bdbaf91213c2f0eb5b8d505
SQL
aizuon/Keeper
/db/db.sql
UTF-8
1,803
3.140625
3
[]
no_license
-- -------------------------------------------------------- -- Host: 127.0.0.1 -- Server version: 10.5.5-MariaDB - mariadb.org binary distribution -- Server OS: Win64 -- HeidiSQL Version: 11.0.0.5919 -- ------------------------------------------------...
true
0674d96fa695d85a8dc93fe7129c0684efecf2be
SQL
PandaPoPy/Wonder
/install.sql
UTF-8
1,238
2.984375
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.0.10deb1 -- http://www.phpmyadmin.net -- -- Client: localhost -- Généré le: Ven 07 Novembre 2014 à 14:49 -- Version du serveur: 5.5.37-0ubuntu0.14.04.1 -- Version de PHP: 5.5.9-1ubuntu4.1 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER...
true
50690ce0704897039b5582b5a5076942eefb3902
SQL
DGO911/Banco-de-Dados
/Filtro_horimetro.sql
UTF-8
287
3.40625
3
[]
no_license
Select a.has_data, a.vei_codigo, b.vei_identificacao_empresa,c.car_numero,a.has_horimetro from gtw_historico_abastecimento a join gtw_veiculo b on a.vei_codigo = b.vei_codigo join gtw_cartao c on a.CAR_CODIGO_ABASTECIDO = c.car_codigo where has_horimetro like '19304%' order by 1 desc;
true
732131e18e390ea2f82bfc8127c08673ad89fe96
SQL
LoonyPandora/VegRev
/database/schema.sql
UTF-8
12,773
3.171875
3
[ "MIT" ]
permissive
# ************************************************************ # Sequel Pro SQL dump # Version 4096 # # http://www.sequelpro.com/ # http://code.google.com/p/sequel-pro/ # # Host: 127.0.0.1 (MySQL 10.0.11-MariaDB-log) # Database: vegrev # Generation Time: 2014-06-06 17:34:16 +0000 # *************************************...
true
d7d828e5cff885b3ca58fec43b744209d149317c
SQL
wilsonjuniordev/algafood-api
/src/main/resources/db/migration/V005__cria-tabelas-pedido-item-pedido.sql
UTF-8
1,568
3.46875
3
[ "MIT" ]
permissive
create table pedido ( id bigserial not null, subtotal numeric(10, 2) not null, taxa_frete numeric(10, 2) not null, valor_total numeric(10, 2) not null, restaurante_id int8 not null, usuario_cliente_id int8 not null, forma_pagamento_id int8 not null, endereco_cidade_id int8 not ...
true
886a40f2785378f38cbc6824e3fd2ab74ceb0920
SQL
luisSolares98/grigingo
/sql/1.0.sql
UTF-8
3,717
3.375
3
[]
no_license
create database gringingo; use gringingo; create table usuarios( id int primary key auto_increment, nombre text, apellido text, nick text, password text, vida int, experiencia int ); create table premios( id int primary key auto_increment, nombre text, img text ); create table desafios( id int ...
true
9c6d49e4cfa6b7cff94a0be8df2fcbd946e1ea74
SQL
henriquesan14/sistemaphp
/clinicaphp.sql
UTF-8
4,063
3.203125
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.8.2 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: 04-Dez-2018 às 19:12 -- Versão do servidor: 10.1.34-MariaDB -- PHP Version: 7.2.8 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD...
true
2617f694a7accc5b0e7bab713df0a6b37ccc3cb7
SQL
ruanhq/Leetcode
/SQL/1173.sql
UTF-8
275
2.953125
3
[]
no_license
#1173.Immediate Food Delivery I SELECT ROUND(AVG(CASE WHEN order_date = customer_pref_delivery_date THEN 1 ELSE 0 END) * 100, 2) AS immediate_percentage FROM delivery; #It may not be the optimal solution in consideration of the potential ties.
true
e2b6def2c4ad4f289c827dc16f50e95484d55e37
SQL
chenchotshering/StdsMgt
/database/sms_information_schema_views.sql
UTF-8
190,029
2.890625
3
[]
no_license
INSERT INTO information_schema.views (table_catalog, table_schema, table_name, view_definition, check_option, is_updatable, is_insertable_into, is_trigger_updatable, is_trigger_deletable, is_trigger_insertable_into) VALUES ('sms', 'pg_catalog', 'pg_shadow', ' SELECT pg_authid.rolname AS usename, pg_authid.oid AS us...
true
dceed5312191c63bf9dfc84e8b1654b7004dde38
SQL
cuba-platform/cuba
/modules/core/db/update/postgres/01/01-210-updateTabNameInSysFolder.sql
UTF-8
228
2.6875
3
[ "Apache-2.0" ]
permissive
-- Description: update tab_name in sys_folder : for search folder, -- which haven't tab name,put to tab name name of folder + '.tabName' UPDATE sys_folder SET tab_name = name || '.tabName' WHERE tab_name IS NULL AND type='S';
true
4f54235bf99af5c28636acd74fa97367ca80a64a
SQL
kimhongsik33/plsql
/No11_10.sql
SHIFT_JIS
1,984
3.28125
3
[]
no_license
--No11-10.LIMITL[[hBSELECT SET SERVEROUTPUT ON DECLARE TYPE emp_rec IS TABLE OF emp%ROWTYPE; v_emp_arr emp_rec; c_size_limit CONSTANT PLS_INTEGER := 10; v_fetched PLS_INTEGER; CURSOR c IS SELECT * FROM emp; BEGIN v_fetched := 0; OPEN c; --CURSOR OPEN LOOP FE...
true
d490033173da80186ecabe91ab60dcb70bb160c1
SQL
mbougie/gibbs
/projects/usxp/stages/deliverables/x_to_crop/x_to_crops_counts.sql
UTF-8
975
2.71875
3
[]
no_license
SELECT 'wetland'::text as nc_group, sum(s35_ytc30_2008to2017_mmu5_bfc.acres) as acres FROM counts_cdl.s35_ytc30_2008to2017_mmu5_bfc WHERE value IN (83,87,190,195) UNION SELECT 'shrubland'::text as nc_group, sum(s35_ytc30_2008to2017_mmu5_bfc.acres) as acres FROM counts_cdl.s35_ytc30_2008to2017_mmu5_bf...
true
8ce562327c0eaf1595319a40ac82c66bef440c48
SQL
Manojkumarupm/ADO-Disconnect-Example
/ADO.sql
UTF-8
814
3.125
3
[]
no_license
use fse Create table ProductDetails (ProductId INT, ProductName VARCHAR(30),SupplierID VARCHAR(10)) Create table Supplierinfo (SupplierId VARCHAR(10),SupplierName VARCHAR(50),Address VARCHAR(255),City VARCHAR(30),ContactNumber VARCHAR(15),Email VARCHAR(30)) Create table ProductDetails (ProductId, ProductName,Suppli...
true
6a3b95bfe218d37fd0f5f459d26db24f908bbc86
SQL
medonagy45/node-test
/db/scheme.sql
UTF-8
572
3.453125
3
[]
no_license
SET sql_notes = 0; CREATE TABLE IF NOT EXISTS `author` ( `idAuthor` int NOT NULL AUTO_INCREMENT, `name` varchar(45) DEFAULT NULL, `jobTitle` varchar(45) DEFAULT NULL, PRIMARY KEY (`idAuthor`) ) ; CREATE TABLE IF NOT EXISTS `article` ( `idArticle` int NOT NULL AUTO_INCREMENT, `title` varchar(45) DEFAULT NUL...
true
29cf058e2c733d3b1fdc56c0e835ec1d58f6b3bd
SQL
zenithshrestha37/sqlbasics
/orders.sql
UTF-8
992
3.828125
4
[]
no_license
/* #1 */ CREATE TABLE orders ( order_id SERIAL PRIMARY KEY, person_id INT, product_name VARCHAR(20), product_price FLOAT, quantity INT ); /* #2 */ insert into orders (person_id, product_name, product_price,quantity) values (34, 'Soccer Ball', 24.5, 2); insert into orders (person_id, product_name, product_...
true
2dd5c807beba7fc351404abb630246e105c89bcd
SQL
hz2657/SQL-everyday
/HackerRank/Ollivander's Inventory.sql
UTF-8
301
3.75
4
[]
no_license
SELECT W.id, WP.age, W.coins_needed, W.power FROM Wands W, Wands_Property WP WHERE W.code = WP.code AND WP.is_evil = 0 AND W.coins_needed IN (SELECT MIN(coins_needed) FROM Wands W1 JOIN Wands_Property WP1 USING(code) WHERE W.power=W1.power AND WP.age = WP1.age ) ORDER BY W.power DESC, WP.age DESC
true
db4c951b7d8349946f483cc960b2657639b8d643
SQL
Najah-Shanableh/lead-public
/aux/assessor_summary.sql
UTF-8
1,061
3.59375
4
[]
no_license
drop table if exists aux.assessor_summary; create table aux.assessor_summary as ( select substring(house_num from 6)::int || ' ' || st_dir || ' ' || st_name || ' ' || st_suffix as address, max((CASE WHEN bldg_sq_ft::int != '0' THEN bldg_sq_ft ELSE null END)::int) bldg_sq_ft, max((CASE WHEN land_sq_ft::int != '0' TH...
true
5511f99b6440752ba42f60f86038477adc72bc89
SQL
dineshkummarc/cuyahoga-1
/Web/Install/Modules/Database/postgresql/1.5.0.sql
UTF-8
5,377
2.953125
3
[ "BSD-3-Clause" ]
permissive
-- first set sequence values, otherwise the inserts will fail due to violation of the pk_constraint SELECT setval('cuyahoga_moduletype_moduletypeid_seq', (SELECT max(moduletypeid) FROM cuyahoga_moduletype)); SELECT setval('cuyahoga_modulesetting_modulesettingid_seq', (SELECT max(modulesettingid) FROM cuyahoga_modules...
true
eddb28db11744f86f7a5fbe42c7048aee086026c
SQL
katherinevfry/Chinook
/line_item_track_artist.sql
UTF-8
225
3.5625
4
[]
no_license
SELECT InvoiceId, t.Name AS TrackName, ar.Name AS ArtistName FROM InvoiceLine il JOIN Track t ON il.TrackId = t.TrackId JOIN Album al ON al.AlbumId = t.AlbumId JOIN Artist ar ON ar.ArtistId = al.ArtistId ORDER BY InvoiceId
true
8094d593452125fb0642e18947d34a1deec0c3d3
SQL
cinnamong/dpool
/cosmos/colorsize.sql
UTF-8
1,023
2.8125
3
[]
no_license
-- MySQL dump 10.9 -- -- Host: localhost Database: yesusa -- ------------------------------------------------------ -- Server version 4.1.10 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!40101 SET @OLD_COLLATION_CONNECTION=@@...
true
22087aa6d4f3bdead63cebd5ea2ae0c7d171136b
SQL
ElderVivot/ConversorTron
/SQLs/fun_pessoal.sql
UTF-8
575
3.828125
4
[]
no_license
SELECT pessoa.*, (SELECT MAX(tel.numtel) FROM TBLTEL as tel WHERE tel.codpes = pessoa.codpes AND tel.tippes = pessoa.tippes) as telefone_pessoa, (SELECT MAX(cid.dddcid) FROM TBLCID as cid WHERE cid.codcid = (SELECT MAX(tel.codcid) FROM...
true
5983628088f9ac8b9f59fd2a7ce37a7c3798a212
SQL
pratikdp707/social-app-schema-mysql
/social-media-schema.sql
UTF-8
8,602
4.09375
4
[]
no_license
-- creation of schema for social media app create schema socialAppSchema; use socialAppSchema; -- creation of table for user details CREATE TABLE `socialappschema`.`user_profile` ( `user_id` INT NOT NULL AUTO_INCREMENT, `email` VARCHAR(45) NULL, `username` VARCHAR(45) NULL, `password` VARCHAR(45) NULL, `fi...
true
74cf6c2ec17646e353eebd50c4bac0cec33df7e2
SQL
romarioarruda/cod3r-cursos
/banco-relacional/consultaComJoins.sql
UTF-8
447
2.765625
3
[]
no_license
select * from cidades; select * from prefeitos; select * from cidades as c inner join prefeitos as p on c.id = p.cidade_id; select * from cidades as c left outer join prefeitos as p on c.id = p.cidade_id; select * from cidades as c right join prefeitos as p on c.id = p.cidade_id; select * from cidades as c left out...
true