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
9e303d377eedfa8373fcf92462a29b77d5c9bb49
SQL
EthanLMartin/Bookish
/Scripts/BookishSchema.sql
UTF-8
523
3.265625
3
[]
no_license
DROP DATABASE IF EXISTS bookish; CREATE DATABASE bookish; USE bookish; CREATE TABLE Books ( ISBN CHAR(13) NOT NULL PRIMARY KEY, title VARCHAR(80), author VARCHAR(255) ); CREATE TABLE BookCopies ( barcode INT IDENTITY(1, 1) PRIMARY KEY, ISBN CHAR(13) NOT NULL FOREIGN KEY REFERENCES Books(ISBN), ...
true
776190fe44d0c89cd4feeeca7008466842299035
SQL
veyisTurgut/cmpe321-p1-sqlQueries
/q8.sql
UTF-8
1,369
4.1875
4
[]
no_license
SELECT T.team_id, T.short_name, T.full_name, ROUND(sumx,3) /*display up to three precision*/ as total_driven FROM (SELECT team, SUM(clim*total_laps*1.0/1000)/*convert length of the circut to km's*/ as sumx FROM Drivers, Tracks WHERE country_of_birth != 'England' ...
true
491659587863a2d56e1b59adbcf577e321de694b
SQL
AntonyGlim/gb_10_Database_Basic_course
/db/lesson1/Lesson1Dump20190602/geodata_languages.sql
UTF-8
3,217
2.984375
3
[]
no_license
-- MySQL dump 10.13 Distrib 5.7.26, for Linux (x86_64) -- -- Host: 192.168.0.41 Database: geodata -- ------------------------------------------------------ -- Server version 8.0.13 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; ...
true
8ee80e9edb25227888299977790d53b513e78e86
SQL
tiagoviniciuslopes/ES1-trab1
/documentacao/ScriptInicial.sql
UTF-8
10,167
3.140625
3
[]
no_license
-- MySQL Script generated by MySQL Workbench -- Wed May 8 00:01:07 2019 -- 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
75b88f0ffcb8495f328b797da5447ae01962194b
SQL
streamline-wkp/gcd-web-services
/mysql/database.sql
UTF-8
501
2.890625
3
[ "Apache-2.0" ]
permissive
CREATE DATABASE `GCD_TEST` /*!40100 DEFAULT CHARACTER SET utf8 */; CREATE TABLE `GCD_TEST`.`GCD_SOURCE` ( `ID` INT NOT NULL AUTO_INCREMENT, `NUMBER_1` INT NOT NULL, `NUMBER_2` INT NOT NULL, `ADDED_DATE` DATETIME NOT NULL, PRIMARY KEY (`ID`), UNIQUE INDEX `ID_GCD_SOURCE` (`ID` ASC)); CREATE TABLE `GCD_TE...
true
ea1eac88c7abd1f7617713bac61973774167bce6
SQL
fullarray/MySQL
/handcode/query1.sql
UTF-8
977
3.4375
3
[]
no_license
create database student; use student; create table student_signups( student_id INT(11) AUTO_INCREMENT PRIMARY KEY, student_name VARCHAR(50), student_age INT(11) ); create table course( course_id INT AUTO_INCREMENT PRIMARY KEY, course_name VARCHAR(50), enroll_id INT(11), FOREIGN KEY(enroll_...
true
f2b42e264cce4a8f92e7e98590fc75d936c8fe41
SQL
dwatson78/database
/updatescripts/from_36x/views/ipsitem.sql
UTF-8
2,298
3.515625
4
[]
no_license
SELECT dropIfExists('VIEW', 'ipsitem', 'public', true); CREATE OR REPLACE VIEW ipsitem AS SELECT ipsitem_id, ipsitem_ipshead_id, ipsitem_item_id, ipsitem_qtybreak, ipsitem_price, ipsitem_qty_uom_id, ipsitem_price_uom_id, ipsitem_discntprcnt, ...
true
7394766d10a1250131bc11e29ff016bd7fbe27ec
SQL
babak-kobari/hmtr
/sql/hm_exp_head.sql
UTF-8
1,881
2.9375
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 3.3.3 -- http://www.phpmyadmin.net -- -- Host: localhost -- Generation Time: Jan 28, 2013 at 01:35 AM -- Server version: 5.1.50 -- PHP Version: 5.3.14 SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_...
true
01b2c33e1d68e9d104cdfc34ce5731b2bd190de0
SQL
fredyw/leetcode
/src/main/sql/Problem175.sql
UTF-8
162
3.21875
3
[ "MIT" ]
permissive
-- https://leetcode.com/problems/combine-two-tables/ select p.FirstName, p.LastName, a.City, a.State from Person p left join Address a on p.PersonId = a.PersonId;
true
7206dbd9b53d0b1c3a87146da1286ee042d5d4bb
SQL
csyoong28/spring
/transaction_fromWeb/programmatic-transaction-example/src/main/resources/createOrderItemTable.sql
UTF-8
147
2.59375
3
[]
no_license
CREATE TABLE ORDER_ITEM( ID BIGINT PRIMARY KEY AUTO_INCREMENT, ITEM VARCHAR(255) NOT NULL, QTY INT(255) NOT NULL check (QTY > 0 and QTY <= 100), );
true
fbeb5a7601d220a02974f07befb498ad7c173680
SQL
imgrbs/PromptKai_Software_Process_I
/Database SQL/promptkai.sql
UTF-8
5,628
3.21875
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.8.3 -- https://www.phpmyadmin.net/ -- -- Host: db -- Generation Time: Nov 20, 2018 at 04:20 PM -- Server version: 10.2.18-MariaDB-1:10.2.18+maria~bionic -- PHP Version: 7.2.8 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /...
true
dffa20385bc0d6bd8e1217903385bf67f1aff054
SQL
Harmo80/CreationFormulaire
/form_bd.sql
UTF-8
2,588
3.5625
4
[]
no_license
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO"; CREATE TABLE IF NOT EXISTS `form` ( `ID` int(11) NOT NULL AUTO_INCREMENT, `HASH` varchar(255) NOT NULL, `NOM` varchar(255) NOT NULL, `TITRE` varchar(255) NOT NULL, `INC_FORM_VALIDATE` varchar(255) NOT NULL, `INC_MAIL` varchar(255) NOT NULL, `INC_PASS` varchar(255) NO...
true
164d3f30cef316bad77593d8be4d81e18dab4236
SQL
QuartetBaguette/PR-Duels
/duels_counter.sql
UTF-8
5,611
2.671875
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 5.0.2 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Apr 13, 2021 at 03:26 PM -- Server version: 10.4.11-MariaDB -- PHP Version: 7.4.6 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIEN...
true
9b57c59d8ee3fbf06b3b32815bf0fd7118a44e82
SQL
davidkzeng/pi-trading-lib
/python/pi_trading_lib/data/db/1_initialize.sql
UTF-8
563
3.6875
4
[]
no_license
CREATE TABLE contract ( id INTEGER PRIMARY KEY, name TEXT NOT NULL, market_id INTEGER NOT NULL, begin_date TEXT NOT NULL, last_update_date TEXT NOT NULL, end_date TEXT, FOREIGN KEY(market_id) REFERENCES market(id) ); CREATE TABLE market ( id INTEGER PRIMARY KEY, name TEXT NOT NULL )...
true
a38e98e43f4a575b46dc8ea3f74fabc391edbe15
SQL
AllWKA/NotificationsFullStack
/BaseDeDatos/db_notifications_inventia_devicetokens.sql
UTF-8
2,501
2.96875
3
[]
no_license
-- MySQL dump 10.13 Distrib 8.0.15, for Win64 (x86_64) -- -- Host: localhost Database: db_notifications_inventia -- ------------------------------------------------------ -- Server version 8.0.15 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_S...
true
45bbef54cc03a43ae0fc1eafd4081e5973ef4a1f
SQL
Fukada9905/pythagora
/sql/queries/tran/pyt_p_302000_update.sql
UTF-8
2,284
3.875
4
[]
no_license
DROP PROCEDURE IF EXISTS pyt_p_302000_update; delimiter // CREATE PROCEDURE pyt_p_302000_update( IN p_work_id int , IN p_update_row text , IN p_user_id varchar(20) ) BEGIN DECLARE _user_name varchar(20); -- EXIT HANDLE DECLARE EXIT HANDLER FOR SQLEXCEPTION BEGIN ROLLBACK; RESIGNAL; E...
true
75e0a33b350b28a5ce19c315a407258744ce4fed
SQL
tmanuszak/CMU-Intro-to-DBMS
/HW1/q6_dubbed_smash.sql
UTF-8
258
3.609375
4
[]
no_license
with dubs as ( select title_id, count(*) as num_dubs from akas group by title_id order by num_dubs desc limit 10 ) select titles.primary_title, dubs.num_dubs from dubs join titles on titles.title_id == dubs.title_id order by dubs.num_dubs desc;
true
63f227e5d19bcc9f0a808448211442d7ab1ee3af
SQL
prathyushavoleti/assignment1
/sql assignment.sql
UTF-8
2,035
4.09375
4
[]
no_license
create table categories( id int not null primary key identity(1,1), category_name varchar(64), tax decimal ) insert into categories values('category5',25000) select *from categories create table product( id int not null primary key identity(1,1), product_name varchar(64), open_stock decimal , cur_stock d...
true
8db1d98dafd1fab8d548b0085f53eadf697025e8
SQL
MeganCrane1/DatabaseManagement
/Lab5.sql
UTF-8
2,212
4.8125
5
[]
no_license
-- Megan Crane -- Lab 5 SQL Queries -- 2/20/14 -- I worked on this lab with Graham Harrison if some of our queries look similar and looked as stackoverflow charts for references -- 1. Get the cities of agents booking an order for customer "Basics" using joins. select agents.city from orders, agents, customers...
true
55a5d1fa90ee97e3fddf0af447d8ea25813f9785
SQL
mcg931501/RPMS
/includes/COT/rpms.sql
UTF-8
6,473
3.21875
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.9.0.1 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Aug 26, 2019 at 07:16 AM -- Server version: 10.3.16-MariaDB -- PHP Version: 7.3.7 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @O...
true
281130c3d131cb1066d77b6f5604b2750dd08627
SQL
alenhung/ybc-laravel
/sql/laravel_2017-11-16.sql
UTF-8
11,539
3.140625
3
[]
no_license
# ************************************************************ # Sequel Pro SQL dump # Version 4541 # # http://www.sequelpro.com/ # https://github.com/sequelpro/sequelpro # # Host: 127.0.0.1 (MySQL 5.6.31) # Database: laravel # Generation Time: 2017-11-15 16:52:51 +0000 # ***********************************************...
true
b3081092da1a53033155d5453d447f782dbd6038
SQL
pdvmoto/binsql
/cdbusers.sql
UTF-8
144
2.890625
3
[]
no_license
-- show users for cdb/pdb column username format a15 column con_id format 999 select username, con_id, common from cdb_users order by 1;
true
75185469275a5ca44837eb651947ddf7c7770b05
SQL
Sergey778/cts
/src/db-scripts/postgresql/create-table/course.sql
UTF-8
433
3.53125
4
[]
no_license
DROP TABLE IF EXISTS course; DROP SEQUENCE IF EXISTS course_seq; CREATE SEQUENCE course_seq START WITH 1; CREATE TABLE course ( course_id BIGINT NOT NULL DEFAULT nextval('course_seq'), course_name TEXT NOT NULL, course_description TEXT NOT NULL, course_creator_id BIGINT NOT NULL, CONSTRAINT course_pk PRIMA...
true
e962910d27258615bac88a5d67ddd564621e01c2
SQL
vicente-santacoloma/usb-lvbp-fantasy
/src/Bases de Datos/roster_equipo_manager.sql
UTF-8
1,191
2.875
3
[ "MIT" ]
permissive
/* Navicat MySQL Data Transfer Source Server : brainsoftbd Source Server Version : 50156 Source Host : localhost:3306 Source Database : brainsof_bd Target Server Type : MYSQL Target Server Version : 50156 File Encoding : 65001 Date: 2011-11-17 14:46:05 */ SET FOREIG...
true
8b9d12dbe420114b2331d8848e18fae5471cc332
SQL
darkTheknight/PSImedicalserver
/database/IlYy99NiBs.sql
UTF-8
5,126
3.15625
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.8.5 -- https://www.phpmyadmin.net/ -- -- Host: localhost -- Generation Time: May 11, 2020 at 02:49 PM -- Server version: 8.0.13-4 -- PHP Version: 7.2.24-0ubuntu0.18.04.4 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!401...
true
8accb25bedd97883f33da9b9b04210689f072917
SQL
TomasG07/CursoSQL
/Consultas Multitabla/Ejercicio 69.sql
UTF-8
210
3.59375
4
[]
no_license
Select a.first_name, a.last_name, sum(b.amount) as "Total amound" from sakila.staff a inner join sakila.payment b on a.staff_id=b.staff_id and b.payment_date Like '2005-08%' group by a.first_name,a.last_name
true
fe8a64898e699529bf93663d617fff5c2909feb4
SQL
EExuke/CProjectDevelop
/7_bookMangeSys/图书管理系统/mrbm.sql
UTF-8
14,526
2.59375
3
[]
no_license
-- MySQL dump 10.10 -- -- Host: localhost Database: db_mrbm -- ------------------------------------------------------ -- Server version 5.0.20a-nt /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!40101 SET @OLD_COLLATION...
true
1841b1d1dc3acc86367e06f54e5f11c2b25fd793
SQL
eduardohrmsnt/Reagentes
/reagentes.sql
UTF-8
2,217
3.09375
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.9.0.1 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Tempo de geração: 28-Set-2019 às 23:43 -- Versão do servidor: 10.4.6-MariaDB -- versão do PHP: 7.1.31 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET...
true
4313dee2f01f0ac014e07890a990fcf23d68ae2d
SQL
joseluiz123/locadora_alucars
/scripts/script_dim_data.sql
UTF-8
2,452
3.71875
4
[]
no_license
---script dim_tempo versão:20210930 ---prof. anderson nascimento create table dim_data ( sk_data integer not null, nk_data date not null, desc_data_completa varchar(60) not null, nr_ano integer not null, nm_trimestre varchar(20) not null, nr_ano_trimestre varchar(20) not null, nr_mes integer not null, nm_mes varchar(20...
true
56080818fc77558d7aa9bed65cf9a67b2f8a582f
SQL
zjcszzl/SQL_Refresh
/StoredProcedures.sql
UTF-8
3,820
4.15625
4
[]
no_license
-- Creating a Stored Procedure DELIMITER $$ CREATE PROCEDURE get_clients() BEGIN SELECT * FROM clients; END$$ DELIMITER ; CALL get_clients(); DELIMITER $$ CREATE PROCEDURE get_invoices_with_balance() BEGIN SELECT * FROM invoices WHERE invoice_total - payment_total > 0; END$$ DELIMITER ; CALL get_invoices_with_bal...
true
90ba07f275342fa5e4c1b9229548d7f8b9dc7250
SQL
seantanjs/project-2
/table.sql
UTF-8
435
3.03125
3
[]
no_license
CREATE TABLE IF NOT EXISTS users ( id SERIAL PRIMARY KEY, username TEXT, password TEXT, target_amount DECIMAL(10,2), time_horizon INTEGER, start_date DATE, end_date DATE ); CREATE TABLE IF NOT EXISTS finances ( id SERIAL PRIMARY KEY, transaction_date DATE, monthly_income_amount DECIMAL (10,2), monthly_expenses_amount...
true
38fb8ea7cbcb81561cedd8f175dfb5a85d8973a8
SQL
crazcalm/friends
/test.sql
UTF-8
425
3.234375
3
[ "MIT" ]
permissive
DROP TABLE IF EXISTS country; CREATE TABLE country ( `uid` integer primary key autoincrement, `name` varchar(260) not null, `abbr_name` varchar(10) null ); DROP TABLE IF EXISTS person; CREATE TABLE person ( `uid` integer primary key autoincrement, `name` varchar(64) not null, `created` date def...
true
67f602d81c529f2be0fec6c4141c9aec30324ece
SQL
andysitu/algo-problems
/leetcode/200/175_combine_two_tables.sql
UTF-8
165
3.328125
3
[]
no_license
# Write your MySQL query statement below SELECT p.FirstName, p.LastName, adr.City, adr.State from Person as p LEFT JOIN Address as adr ON p.PersonId = adr.PersonId;
true
06829c28d5d053f1d2a8e170b5bbb244cf23efd1
SQL
mfaisalshahid/DataSQL
/queries-quality-and-percentage.sql
UTF-8
408
3.296875
3
[]
no_license
SELECT query_name , ROUND(AVG(rating*100 / position), 0)/100 AS quality , ROUND(AVG(case when rating < 3 then 1 else 0 end )*100, 2) as poor_query_percentage FROM Queries GROUP BY query_nam SELECT query_name, ROUND(AVG(rating / position), 2) AS quality, RO...
true
41b1495ec379b33cc97eaa115ac8641b85d8b4d6
SQL
alrawi90/today-is-your-birthday-
/database/birthday.sql
UTF-8
3,368
3.25
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.6.5.2 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Sep 21, 2017 at 12:37 PM -- Server version: 10.1.21-MariaDB -- PHP Version: 5.6.30 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SE...
true
7858717163aa5852f57f7ed44424a73e803a9f47
SQL
guillez/ramas
/sql/ddl/60_FK/fk_mgi_institucion_arau_instituciones.sql
ISO-8859-2
719
3.046875
3
[]
no_license
-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -- SIU-Kolla 4 - Mdulo de Gestin de Encuestas -- Versin 4.3 -- Tabla: mgi_institucion -- FK: fk_mgi_institucion_arau_instituciones -- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -- DROP INDEX ifk_mgi_institucion_arau_in...
true
39f353b618e82818e24bbc0623d6396ff9ad6d96
SQL
BarJei/pupspc-stms
/db_pupspc_stms.sql
UTF-8
11,374
3.1875
3
[ "LicenseRef-scancode-unknown-license-reference", "MIT" ]
permissive
-- phpMyAdmin SQL Dump -- version 4.4.15.5 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: Oct 04, 2016 at 07:55 PM -- Server version: 5.6.30 -- PHP Version: 5.6.21 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT *...
true
cf78f67b3616a1d708e1d7b6dc97314c7c6fd6d9
SQL
NguyenDucHai1999/Baitapgiuaky
/Middle/Kiemtragiuaky-main/Middletearm/nguyenduchai.sql
UTF-8
3,618
3.125
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 5.0.2 -- https://www.phpmyadmin.net/ -- -- Máy chủ: 127.0.0.1 -- Thời gian đã tạo: Th8 23, 2021 lúc 01:25 PM -- Phiên bản máy phục vụ: 10.4.14-MariaDB -- Phiên bản PHP: 7.2.33 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHAR...
true
004e5057f5968d7e030ad6c4b3652052ba9fa946
SQL
axelsheva/experience
/SQL-Tuning/ifi.uzh.ch/vn/ThucHanhCoSoDuLieu/N0155351/VuDinhDieu_20090459_L0155351.sql
UTF-8
991
4.15625
4
[]
no_license
/* Cau 1 */ select ProductNumber, ListPrice, Name from Production.Product as p1, Sales.SalesOrderDetail as s1 where p1.ProductID in (select top 10 ProductID from Sales.SalesOrderDetail where p1.ProductID = s1.ProductID group by ProductID order by (p1.ListPrice) DESC) /* Cau 2 */ select year(OrderDate), FirstName...
true
8ee2ac8680296ba00185a6a73095f7869977dd32
SQL
tanuwaplk/postgres-netology
/доп.sql
UTF-8
6,980
4.1875
4
[]
no_license
В данной таблице хранят информацию по изменению "статуса" для каждого типа поля (field ). То есть, есть поле pin, на 21.07.2017 было изменено значение, соответственно новое (new_value ) стало '' (пустая строка) и старое (old_value), записалось как '300-L'. Далее 26.07.2017 изменили значение с '' (пустая строка) на '...
true
f1d20d35b13e432bd8c60b1df1abdeae787c7f66
SQL
AlphaSourceCode/PHP-PaChong
/pachong .sql
UTF-8
1,344
2.609375
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.1.14 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: 2021-09-02 10:07:47 -- 服务器版本: 5.6.17 -- PHP Version: 5.5.12 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET ...
true
0fee4e5f251a9ee0bda236f768693f2ce559ccfa
SQL
lycantropos/seek-well
/test_scripts/views/v_mtt_useful_games.sql
UTF-8
1,366
3.90625
4
[ "MIT" ]
permissive
CREATE OR REPLACE VIEW v_mtt_useful_games AS ( WITH games_without_bots AS ( SELECT f_name, 'without bots'::TEXT AS f_metric_name, SUM(f_games) AS f_games, SUM(f_rake) AS f_rake FROM mv_mtt_games_by_pools WHERE f_b...
true
23e4795263067089af7e609fbb914d3c772b0c49
SQL
VictorWestLarsen/SkoleOpgaver
/Database Øvelser/Ex26/Øvelse 5/EmployeesCreate.sql
UTF-8
226
2.921875
3
[]
no_license
CREATE TABLE Employees( Name NvarChar(100) NULL, Address NvarChar(100) NULL, Zipcode INT NULL, Department NvarChar(50) NULL, TelephoneNo NvarChar(50) NOT NULL, -- CONSTRAINT EMPLOYEES_PK PRIMARY KEY(TelephoneNo) )
true
66ce552f6e53191a1a080c8f98bb567976f6af00
SQL
wheatandcat/dotstamp_server
/db/migrations/20170307230520_log_questions.sql
UTF-8
640
3.296875
3
[ "MIT" ]
permissive
-- +goose Up -- SQL in section 'Up' is executed when this migration is applied CREATE TABLE IF NOT EXISTS `log_questions` ( `id` BIGINT NOT NULL AUTO_INCREMENT, `user_id` BIGINT NOT NULL COMMENT 'ユーザID', `email` VARCHAR(100) NOT NULL COMMENT 'メールアドレス', `body` TEXT COMMENT '本文', `created_at` DATETIM...
true
f231caf6ca5d037ba766498f7b786c3d29a48994
SQL
SauzeauYannis/BDD-Projet
/4_Coherence/contraintes_categories.sql
UTF-8
3,525
3.859375
4
[]
no_license
-- Dans notre base, lorsque l'on veut créer des données spécifiques à une catégorie de document -- (par exemple : ajouter un nombre de page à un livre) il faut ajouter les données dans la table -- qui porte le nom de la catégorie du document avec pour clef primaire une clef étrangère qui -- référence le document (par e...
true
0fbf7793c268bb2332de87cb523f077a4a98981b
SQL
msldiarra/geovel
/geovel-da/src/main/resources/db/migration/V2__geovel_data_init.sql
UTF-8
1,636
3.375
3
[]
no_license
-- Create owners INSERT INTO Owner (Name) VALUES ('Mamadou Lamine DIARRA'), ('Ange PETE'), ('Toupac Transport'); -- Create contact type INSERT INTO ContactType (Type) VALUES ('Manager'), ('Assistant'), ('Driver'); -- Contact info INSERT INTO ContactInfo (PhoneNumber) VALUES ('+22373034603'), ('+22373...
true
dfb610d915b31d3d02feda8e60ce2dd7613f6618
SQL
desc0n/timepoint
/assets/sql/migration2.sql
UTF-8
558
3.109375
3
[ "BSD-3-Clause" ]
permissive
-- -- Структура таблицы `content__contacts` -- CREATE TABLE IF NOT EXISTS `content__contacts` ( `id` int(11) NOT NULL AUTO_INCREMENT, `type` enum('address','phone','email') NOT NULL, `value` varchar(255) NOT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=6 ; -- -- Дамп данных т...
true
782200b2a0a80aa5c10fd9758f1fa0f82149ce65
SQL
ruviniruvi/Advanced-Database-Project-1
/Advanced Database Project 1/CSC 424 Project 1/table_students.sql
UTF-8
545
3.0625
3
[]
no_license
CREATE TABLE Students( student_id int NOT NULL, student_SSN varchar (11) NOT NULL, student_first_name varchar(50) NOT NULL, student_last_name varchar(50) NOT NULL, student_GPA float NOT NULL, student_graduation_date varchar (25) NOT NULL, student_phone_number varchar (10) NOT NULL, student_email varchar(50) NOT NULL, ...
true
85fa583268bb0a52db69c66aa95907ea6b3db495
SQL
LSFLK/Copper
/copper-server/service_images/groupoffice-6.3.66/groupoffice-6.3.66-php-70/modules/postfixadmin/install/install.sql
UTF-8
2,706
3.09375
3
[ "GPL-1.0-or-later", "LGPL-2.0-or-later", "LGPL-3.0-only", "LicenseRef-scancode-proprietary-license", "GPL-3.0-only", "AGPL-3.0-only", "BSD-3-Clause", "LicenseRef-scancode-free-unknown", "LGPL-2.0-only", "AGPL-3.0-or-later", "Apache-2.0" ]
permissive
-- phpMyAdmin SQL Dump -- version 2.6.0-pl2 -- http://www.phpmyadmin.net -- -- Host: localhost -- Generatie Tijd: 20 Aug 2008 om 15:59 -- Server versie: 5.0.32 -- PHP Versie: 5.2.0-8+etch11 -- -- Database: `servermanager` -- -- -------------------------------------------------------- -- -- Tabel structuur voor tab...
true
4defffe4446bf64cf8b2b95d2d5d89ace44a480c
SQL
Sureshkrishh/SQL-Hands-on
/Hands-on-1/Hands-on-1.sql
UTF-8
1,782
3.140625
3
[ "MIT" ]
permissive
-- # ASSIGNMENT-1 # -- --CREATE DATABASE DEMO; --USE DEMO; ---------------------------------- CREATE TABLE EMP (EID CHAR(5), NAME VARCHAR(20), ADDR VARCHAR(40), CITY VARCHAR(20), DOB DATE, PHONE CHAR(14), EMAIL VARCHAR(30)); ---------------------------------- INSERT INTO EMP VALUES('E0001',...
true
03321cad591116f06eaa56ddb01d2c6d5ca7479e
SQL
suetarazi/book-app
/schema.sql
UTF-8
1,236
3.0625
3
[]
no_license
DROP TABLE IF EXISTS books; CREATE TABLE books( id SERIAL PRIMARY KEY, title VARCHAR(255), author VARCHAR(255), isbn VARCHAR(255), image_url TEXT, description TEXT, bookshelf VARCHAR(255) ); INSERT INTO books (title, author, isbn, image_url, description, bookshelf) VALUES ('Eat, Pray, Love...
true
41d904898e15572a1796f3cc911ace524ed18100
SQL
mikestevenson86/SQL-Repository
/Mike S Queries/Archives/00 Archive 2017/01 January 2017/Clients - CQC Pro.sql
UTF-8
562
3.46875
3
[]
no_license
SELECT a.Id, Services_Taken_Long__c FROM Salesforce..Account a --inner join [database].CitationMain.dbo.citation_CompanyTable2 ct ON a.CitWeb_ID__c = ct.uid inner join [database].Shorthorn.dbo.cit_sh_clients cl ON a.Shorthorn_Id__c = cl.clientId inner join [database].Shorthorn.dbo.cit_sh_busType bt ON cl.busType = bt.b...
true
cd834c20ab3b8a99a3d62868ae9a3708db36b624
SQL
sherriff93/rt-ecommerce-site
/sql/create_database.sql
UTF-8
3,485
3.25
3
[]
no_license
connect 'jdbc:derby:C:\Users\Chris\Documents\webtech\databases\mydb;create=true'; create table users( uid INT NOT NULL GENERATED ALWAYS AS IDENTITY (START WITH 1, INCREMENT BY 1), email VARCHAR(35) NOT NULL, password VARCHAR(35) NOT NULL, forename VARCHAR(35) NOT NULL, surname VARCHAR(35) NOT NULL, dob DAT...
true
10b6d43b8ae4bce1ce12dfa78c8c0f4d1d8929ea
SQL
Bartek708/Game
/game.sql
UTF-8
6,777
3.375
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.8.3 -- https://www.phpmyadmin.net/ -- -- Host: localhost:3306 -- Generation Time: Mar 07, 2019 at 02:13 PM -- Server version: 5.7.24-log -- 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
8654689688118cc6268a2566e55d633095dba00f
SQL
alexmbennett2/mimic-iv-aline-study
/sql/icd.sql
UTF-8
2,645
3.625
4
[]
no_license
-- Extract data which is based on ICD-9 codes WITH dx AS ( SELECT hadm_id, TRIM(icd9_code) AS icd_code FROM `physionet-data.mimiciii_clinical.diagnoses_icd` ) , icd9 AS ( select hadm_id , max(case when icd_code in ( '03642','07422','09320','09321','09322','09323','09324','09884' ,'11281','11504','11514...
true
6c0bee926d6d23c148b0502311cb00b1aa0b7621
SQL
mattgwwalker/singt
/singt/server/database.sql
UTF-8
1,673
4.09375
4
[]
no_license
/* Enable Foreign Keys. This needs to be executed for each databse connection as it feaults to disabled. */ PRAGMA foreign_keys = ON; /* Create the Participants table. */ CREATE TABLE Participants ( id INTEGER PRIMARY KEY, participantName TEXT NOT NULL ); /* Create the BackingTracks table. */ CREA...
true
41c9c1a854b1945c8cd74b2dbe3d369c19394c35
SQL
josepitteloud/VESPA
/Vespa Projects/325 - TA Propensity Model Restructure/new code/001_Datamart accounts and stability flags/001_churn_history_datamart.sql
UTF-8
1,071
2.984375
3
[]
no_license
/* purpose: to develop code for TA, stripping SQL code out from spss supernode - churn_history, file 2014-03-12_TA Model Development - ETL v3.0.str */ create or replace variable @Reference integer; set @Reference=201308 ; create or replace variable @Sample_1_EndString varchar(4) ; set @Sample_1_EndString='27' ;...
true
2ef9091e05f0cd2394afa2f9191130a823b9d976
SQL
silence-do-good/stress-test-Postgres-and-MySQL
/dump/high/day11/select1629.sql
UTF-8
177
2.609375
3
[]
no_license
SELECT timeStamp, temperature FROM ThermometerOBSERVATION o WHERE timestamp>'2017-11-10T16:29:00Z' AND timestamp<'2017-11-11T16:29:00Z' AND temperature>=6 AND temperature<=11
true
6e0b78a7d04518826d35ec4724bbc02a7ac13c72
SQL
reemaamhaz/RESTful-service
/update-customer.sql
UTF-8
964
3.453125
3
[]
no_license
CREATE DEFINER=`root`@`localhost` PROCEDURE `add_editCustomer`( IN _id INT, IN _email varchar(255), IN _first_name varchar(30), IN _last_name varchar(50), IN _ip varchar(15), IN _latitude float(10,6), IN _longitude float(10,6), IN _created_at datetime, IN _updated_at datetime ) BEGIN IF _id = 0 THEN INSERT INTO cu...
true
fca44b3eeecd6d49867f44955a1fffcdd1584ace
SQL
Sai-Swarna/medical-erp
/src/main/resources/static/changes.sql
UTF-8
1,182
3.3125
3
[ "MIT" ]
permissive
ALTER TABLE `wards` ADD COLUMN `active` BIT(1) NOT NULL DEFAULT b'1' AFTER `covid_ward`; ALTER TABLE `wards_history` ADD COLUMN `active` BIT(1) NOT NULL DEFAULT b'1' AFTER `covid_ward`; ALTER TABLE `wards` DROP INDEX `facility_id_name_ward_number_floor_building_name`; ALTER TABLE `facilities` ADD COLUMN `reg...
true
83b22837d9afe263b0440d32669f12f2618e5cfe
SQL
RayPeiqingHe/SQLServerObjects
/QuantTrading/Tables/corporate_action.sql
UTF-8
865
3.484375
3
[]
no_license
CREATE TABLE IF NOT EXISTS corporate_action ( id int NOT NULL AUTO_INCREMENT, data_vendor_id int NOT NULL, symbol_id int NOT NULL, corporate_action_date datetime NOT NULL, -- created_date datetime NOT NULL CONSTRAINT df_corporate_action_created_date DEFAULT NOW(), created_date datetime NOT NULL DEFAULT NOW(), -- last_u...
true
a5968129856200fd65bbf486b358dbe1882cc5a8
SQL
OlafMd/MedCon1.0
/mm-docconnect-dataimporter/DataImporter/DataImporter/DBMethods/Case/Atomic/Retrieval/SQL/cls_Get_GPOS_where_Management_Fee_is_Waived_for_PatientID.sql
UTF-8
2,821
3.15625
3
[]
no_license
Select hec_bil_potentialcodes.BillingCode, hec_crt_insurancetobrokercontract_participatingpatients.Patient_RefID, hec_ctr_insurancetobrokercontracts_coveredpotentialbillcodes.InsuranceToBrokerContract_RefID From hec_crt_insurancetobrokercontracts Inner Join hec_ctr_insurancetobrok...
true
79ec06cf77976dd8c15f2d9819b846a7f48665fb
SQL
HKevinH/JadeCore-Fix-Scripst
/sql/fix_sql/1856_misc.sql
UTF-8
4,209
2.75
3
[]
no_license
UPDATE `creature_template` SET `lootid`=73349 WHERE `entry` IN (73349, 733494, 733495, 733496); DELETE FROM `creature_loot_template` WHERE `entry`=73349; INSERT INTO `creature_loot_template` (`entry`, `item`, `ChanceOrQuestChance`, `lootmode`, `groupid`, `mincountOrRef`, `maxcount`) VALUES (73349, 81414, 10, 1, 0, 1,...
true
abb70ba45ca6b8c6c4fa286a435430302ed3feba
SQL
cseidman/transaction_processor
/sql/transact.sql
UTF-8
785
3.421875
3
[]
no_license
drop table if exists client_account ; create table client_account ( client_id integer primary key, available float, total float, held float, locked boolean ); create index ix_account_client_id on client_account(client_id) ; drop table if exists dispute ; create table dispute ( client_id integer...
true
b9d2118cd026f23223999fc69f8a014ac17e567b
SQL
DBScourse/TheMeeseekss
/queries/add_to_last_playlist.sql
UTF-8
360
3.609375
4
[]
no_license
INSERT INTO PlaylistToTracks_tbl(playlist_id, track_id) SELECT playlist_id, {track_id} FROM Playlists_tbl AS pt JOIN Users_tbl AS ut ON pt.user_id = ut.user_id WHERE user_name = {username} AND playlist_timestamp = ( SELECT MAX(playlist_timestamp) FROM Playlists_tbl AS pt2 JOIN Users_tbl AS ut2 ON pt2.user_id = ut2...
true
71d6f111144f2f77cc17ee4b06dc6f3bcad6f80a
SQL
pdeguing/empire-and-foundation
/setup.sql
UTF-8
632
3.4375
3
[]
no_license
create table users ( id serial primary key, uuid varchar(64) not null unique, name varchar(255), email varchar(255) not null unique, password varchar(255) not null, created_at timestamp not null ); create table planets ( id serial primary key, uuid varchar(64) not null unique, metal_stock bigint not n...
true
b759fba5e1442e39137d48a9bb846cccf2ff74e2
SQL
fender101/SQLHomework
/SQL_HW_01.sql
UTF-8
9,316
4.40625
4
[]
no_license
-- SQL Homework use sakila; -- 1a. Display the first and last names of all actors from the table actor. select first_name, last_name from actor; -- 1b. Display the first and last name of each actor in a single column in upper case letters. Name the column Actor Name. SELECT CONCAT(first_name, ' ', last...
true
342f07d47dad401d0f3b0abd48abb7f3f54ce41d
SQL
aditya1819/dbmsproject
/dbinit.sql
UTF-8
1,067
3.765625
4
[]
no_license
drop database project; create database project; use project; create table customer ( cust_id int auto_increment primary key, c_name varchar(50), c_contact varchar(15) ); create table products ( p_id int primary key auto_increment, p_name varchar(30) not null unique, cost int unsigned not null, c...
true
64d0177022fd701221ffd63ece29b08aad7e6803
SQL
Minchuloh/SpringGroupware
/groupware/src/main/resources/DDL/edi_sett.sql
UTF-8
297
2.59375
3
[]
no_license
CREATE TABLE EDI_SETT( EDI_CODE VARCHAR2(20), EDI_SEQ NUMBER(6,0), SETT_EMP_CODE VARCHAR2(10), EDI_SETT_STATUS VARCHAR(1), EDI_COMMENTS VARCHAR2(100), INP_DATE DATE DEFAULT SYSDATE, UPDATE_DATE DATE, CONSTRAINT PK_EDI_SETT PRIMARY KEY (EDI_CODE, EDI_SEQ, SETT_EMP_CODE) );
true
24dc72c30e29db8f61b7c4cb567a9deacf5952e9
SQL
carollaurini/compliance
/banco_sql/query_expirados_contra.sql
UTF-8
1,699
3.421875
3
[]
no_license
CREATE ALGORITHM = UNDEFINED DEFINER = `armory`@`%` SQL SECURITY DEFINER VIEW `compliance`.`cantrapartes_expiradas` AS SELECT `compliance`.`autorizacao_contraparte`.`chave_autorizacao` AS `chave_autorizacao`, `compliance`.`autorizacao_contraparte`.`contraparte` AS `contraparte`, ...
true
f81080c5fb3f927c3364fef6354e89670cb21f6e
SQL
cosmin-ticu/homework_DE1SQL
/Term/Scripts/5-Views.sql
UTF-8
4,909
4.09375
4
[]
no_license
USE univrankings; -- Always call the final stored procedure to make sure you are working with the most up-to-date data CALL get_cosminranking_comp(); -- ------------------------------------------------------------------- -- self-updating VIEWS (data marts) - but these are slow because they rebuild the table from scra...
true
4aa697d9fc2b25cfb18e122351232d4ba9b3bdac
SQL
dave/dontstayin
/Bobs/Sql/Update Scripts/0294 - Add TwitterHeadline to Article.sql
UTF-8
452
3.234375
3
[]
no_license
IF NOT EXISTS( SELECT * FROM sys.tables [table] INNER JOIN sys.columns [column] ON [table].object_id = [column].object_id WHERE [table].name = 'Article' AND [column].name = 'TwitterHeadline' ) BEGIN ALTER TABLE dbo.Article ADD TwitterHeadline varchar(140) NULL EXECUTE sp_addextendedproperty N'MS_Description'...
true
9261d9fc70c52e72599712752eccd1486e3c89e2
SQL
abhirakshit/Nirvana
/database_queries/enrollView.sql
UTF-8
5,111
3.484375
3
[]
no_license
CREATE VIEW enrollview AS SELECT stu_pay_con_staff.name, stu_pay_con_staff."followUp", stu_pay_con_staff."phoneNumber", stu_pay_con_staff.student_id AS id, stu_pay_con_staff."createdAt", stu_pay_con_staff."updatedAt", stu_pay_con_staff."enquiryStatus", stu_pay_con_staff."enquiryDate", ...
true
b0830cbf51d26a7029436d5410a2a5dc25603921
SQL
Brayangranado/laravel-imw
/laravel8.sql
UTF-8
61,353
3.140625
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.9.5deb2 -- https://www.phpmyadmin.net/ -- -- Servidor: localhost -- Tiempo de generación: 20-01-2021 a las 14:48:32 -- Versión del servidor: 8.0.22 -- Versión de PHP: 7.4.3 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!...
true
90525e3ab6048d9d7d32faf65a61614b9720c74f
SQL
Shmyg/unix
/scripts/sql/full_segments.sql
UTF-8
284
3.140625
3
[]
no_license
SELECT a.SEGMENT_NAME, a.SEGMENT_TYPE, a.TABLESPACE_NAME, a.OWNER FROM DBA_SEGMENTS a WHERE a.NEXT_EXTENT >= (SELECT MAX(b.BYTES) FROM DBA_FREE_SPACE b WHERE b.TABLESPACE_NAME = a.TABLESPACE_NAME) OR a.EXTENTS = a.MAX_EXTENTS OR a.EXTENTS = '8192' ;
true
a92442f0d741772453c0999094cc85dd44e2ecb6
SQL
NGrant92/ca-oracle-database
/createTable.sql
UTF-8
27,483
3.59375
4
[]
no_license
CREATE TABLE gg_hero ( name VARCHAR2(15) CONSTRAINT hr_nm_pk PRIMARY KEY, role VARCHAR2(10) NOT NULL CONSTRAINT chk_rl CHECK(role = 'Tank' OR role = 'Offense' OR role = 'Defence' OR role = 'Support'), ability1 VARCHAR2(25) NOT NULL, ability2 VARCHAR2(25) NOT NULL, ability3 VARCHAR2(25) NOT NULL, ability4 VARCHAR2...
true
467375868e8f4707d0aba3b293eeed592f35b6bb
SQL
creynold/machineShop
/schema.sql
UTF-8
373
2.65625
3
[]
no_license
drop table if exists schedule; create table schedule ( id integer primary key autoincrement, username string not null, time string not null ); drop table if exists users; create table users ( id integer primary key autoincrement, username string not null, cell_number integer, cell_provider string, look...
true
6d9136326a743958806bcc17e42f95cc942b5d5d
SQL
empresas-weloze/weloze-reports
/BiView/Metas de Faturamento/MetaFaturamento_OMT.sql
UTF-8
1,647
4.09375
4
[]
no_license
-- ALTER VIEW [BiView].[MetaFaturamento_OMT] AS SELECT SG.YEAR AS "Ano", SGL.ECORESCATEGORYNAME AS "Item - Categoria", '' AS "Item", SGL.SEGMENTID AS "Cliente - Segmento", AVG(SGL.AMOUNT) / 1000 AS "Meta", CASE WHEN SUM(REAL.[Valor Rec. Líquida]) IS NULL THEN N...
true
7d6dee4a61b5d4eefc4df7e1b678941b3c783434
SQL
jaewookwak92/sql
/2021_03_19.sql
UTF-8
4,487
4.625
5
[]
no_license
[실습 grp4] 직원의 입사 년월별로 몇명의 직원이 입사했는지 조회하는 쿼리를 작성하세요. select TO_CHAR(hiredate, 'YYYYMM'), hire_yyyymm, COUNT(*)cnt from emp GROUP BY TO_CHAR(hiredate, 'YYYYMM') ORDER BY TO_CHAR(hiredate, 'YYYYMM'); [실습 grp5] 직원의 입사 년별로 몇명의 직원이 입사했는지 조회하는 쿼리를 작성하세요. select TO_CHAR(hiredate, 'YYYYMM'), hire_yyyy, COUNT(*)cnt from emp ...
true
e8d61e5b8687304a6d8215808ef228d38894178c
SQL
j7ng/CLFY_SA
/SA/Indexes/FLD_INFO_OBJINDEX.sql
UTF-8
69
2.5625
3
[]
no_license
CREATE UNIQUE INDEX sa.fld_info_objindex ON sa.table_fld_info(objid);
true
fe23261b334c8012c222bf6bf9f27d2aee403e1d
SQL
YeeeeahRight/rest-api-security
/persistence/src/test/resources/db_init.sql
UTF-8
542
2.75
3
[]
no_license
INSERT INTO certificates (name, description, price, create_date, last_update_date, duration) VALUES ('certificate 1', 'description 1', 1.1, '2020-01-01 01:11:11', '2021-01-01 01:22:11', 1), ('certificate 2', 'description 2', 2.2, '2020-02-02 02:22:22', '2021-02-02 02:33:22', 2), ('certificate 3', 'descrip...
true
fb7c28426d93aedd2ab23b6832bc13e436bc5902
SQL
slowcoder-fastsleeper/dune-snippets
/dune/gas/BackRunningBots_DailyGasUsage.sql
UTF-8
1,746
3.140625
3
[ "MIT" ]
permissive
SELECT DATE_TRUNC('day', t.block_time) AS dt, sum(t.gas_used / 12000000) / (60*60*24/14) as daily_gas_used_ratio FROM ethereum.transactions t WHERE t."to" = '\x860bd2dba9Cd475A61E6d1b45e16c365F6D78F66' OR t."to" = '\xb958a8f59ac6145851729f73c7a6968311d8b633' OR t."to" = '\x85c5c26dc2af5546341fc1988b9d17...
true
e700cbbe3421fd18ec42ee014db61e335fe8cc32
SQL
artem8449/forth_inter
/2d_step/colons.inc
UTF-8
11,862
2.8125
3
[]
no_license
section .rodata msg: .no_such_word: db "! No such word: ", 0 section .bss word_buf: resq 512 user_dict: resq 65536 section .data here: dq user_dict fd: dq 0 %define STATE_COMPILE 1 %define STATE_INTERPRET 0 state: dq STATE_INTERPRET const "forth-here", here const "forth-last-word", last_word co...
true
6728c03eef9c7a78d27e37dbfee2580b43104d3f
SQL
caioqazz/Dionisio
/Dionisio/Scripts/SQL_Script_Dionisio.sql
UTF-8
2,627
3.390625
3
[]
no_license
create schema Dionisio ; use Dionisio; create table Dionisio.propriedade ( nome varchar(40) primary key, adm varchar(40), endereço varchar(60) ); create table Dionisio.telefone( nome varchar(40) not null, num varchar(11) primary key, foreign key(nome) references propriedade(nome) on delete cascade on ...
true
7089e179c7f8eeb77c1d3d1cdfa6372f676be29b
SQL
vmogilev/evnt
/linux/mon/sys/install/event_based_reports.sql
UTF-8
8,804
3.359375
3
[]
no_license
set scan off -- COLL_SNAP -- X -- Collection data by snapshoot -- Displays all data from a single collection snapshoot -- SELECT * FROM COLL_PULL__&SNAPSHOOT_TABLE -- TBSP_GROWTH -- E -- Tablespace growth rate -- Reports tablespace growth rate over a time period -- SELECT /*+ ORDERED */ et_attribu...
true
60bbe03baaebcb0be7c36d7c2bbac91f2476ea15
SQL
mongmx/fiber-cms
/db-schema/postgres/20201230025318-create_users_table.sql
UTF-8
365
2.953125
3
[ "MIT" ]
permissive
-- +migrate Up CREATE TABLE users ( id BIGSERIAL PRIMARY KEY, uuid UUID DEFAULT uuid_generate_v4(), email VARCHAR NOT NULL DEFAULT '' UNIQUE, is_banned BOOLEAN NOT NULL DEFAULT FALSE, created_at TIMESTAMPTZ NOT NULL DEFAULT NOW(), updated_at TIMESTAMPTZ NOT NULL DEFAULT NOW(), deleted_at TIMESTAMPTZ...
true
ac27b3b634765ff3422ddb61d9491fdc87f7e7c3
SQL
george-sp/coding_bootcamp-preparatory
/my_sql_tutorial/exercises_2/ex4-participate_any.sql
UTF-8
263
3.25
3
[]
no_license
# Display those students that have participated in an (any) course. SELECT DISTINCT `bootcamp`.`students`.* FROM `bootcamp`.`students` INNER JOIN `bootcamp`.`students_has_courses` ON `bootcamp`.`students`.StID = `bootcamp`.`students_has_courses`.`students_StID`
true
c4d85d4457f6b6d16c8bf4189c181bcca0a9e903
SQL
BranislavLazic/gochan
/sql/preapril2020migration/oldDBMigration_master.sql
UTF-8
11,127
3.671875
4
[ "BSD-2-Clause" ]
permissive
/* Migrates the pre-refactor database of april 2020 to database verion 1 rename all tables to table_old run version 1 population script filter, copy change data A deactivated, unauthorized user with the name "unknown_staff" is created to attribute to unknown staff */ INSERT INTO DBPREFIXsections (id, name, abbreviat...
true
93a3c9b2a8c4ade7d4541b7ab191f9c90e9d6ec1
SQL
HLeek40/SQL-Homework
/MYSQL Homework HLEEK.sql
UTF-8
8,812
4.40625
4
[]
no_license
-- Sakila already exists since I am on PC, therefore I just need to use databse to do homework-- USE Sakila; -- Display the first and last names of all actors from the table actor-- SELECT first_name, last_name from actor; -- Display the first and last name of each actor in a single column in upper case letters. Name t...
true
6bdb90d1420143fbc416e7af20eed4955663d61c
SQL
achintayya/spring-samples
/blogosphere-spring-mybatis/src/main/resources/sql/blogosphere.sql
UTF-8
3,597
3.78125
4
[]
no_license
--CREATE DATABASE IF NOT EXISTS blogosphere; --USE blogosphere; DROP TABLE IF EXISTS comments; DROP TABLE IF EXISTS post_tags; DROP TABLE IF EXISTS tags; DROP TABLE IF EXISTS posts; DROP TABLE IF EXISTS blogs; DROP TABLE IF EXISTS users; CREATE TABLE users ( user_id int(11) NOT NULL AUTO_INCREMENT, username var...
true
dc88f775be12473380081a99a6469d9496c4643d
SQL
javi-ramirez/Presidencia-Ahuacatl-n-1
/bd/Procedimientos Almacenados/sp_insertarRoles.sql
UTF-8
327
3.140625
3
[]
no_license
#Procedimiento para insertar Rol DROP procedure IF EXISTS sp_insertarroles; DELIMITER // create procedure sp_insertarroles(nombreRol varchar(45)) begin set @id= (select idRol from rol ORDER BY idRol DESC limit 1) ; set @id = (select IFNULL(@id, 0)); set @id=@id+1; insert into rol values(@id,nombreRol); end // DELIM...
true
c0b5149099e7dd2e1335d6be815c446188e887bc
SQL
patelshani7112/DBS311-Assignments
/Assignments-01/Asgn1_Gr8.sql
UTF-8
5,988
4.21875
4
[]
no_license
-- DBS311NBB - Assignment 1 -- Group 8 -- Members: Eakampreet Singh (100828201) -- Shani Patel (152243192) -- Vishwa Inder Singh (129377206) -- Yash Padsala (150450195) ------------------------------------------ -- Question 1 SELECT employee_id "Emp#", (first_name || ' ' || last_name) "Full...
true
0cd25ae43ebdbaa247d6a0ffc8e5b8f660e7c4af
SQL
MarcceloSelv/DBA
/Análise DVM por Hash.sql
UTF-8
2,115
4.03125
4
[]
no_license
SELECT TOP 10 query_hash, query_plan_hash, cached_plan_object_count, execution_count, total_cpu_time_ms, total_elapsed_time_ms, total_logical_reads, total_logical_writes, total_physical_reads, sample_database_name, sample_object_name, sample_statement_text FROM ( SELECT ...
true
82ca30c0b75f61af2d25a932c9d7242f3f4063f1
SQL
griffy/cs1555
/myauction/queries/listOngoing.sql
UTF-8
150
3.171875
3
[]
no_license
select product.auction_id from customer join product on customer.login = product.seller where customer.login = ? and product.status = 'underauction'
true
3adee5a2830282c2367e34003ab1d04558dde6db
SQL
umbrielbellani/materiasipm.github.io
/bases/barrios.sql
UTF-8
5,833
2.6875
3
[]
no_license
USE examen; CREATE TABLE barrios ( id INT NOT NULL PRIMARY KEY, nombre VARCHAR(50) NOT NULL, nro_comuna INT NOT NULL, perimetro VARCHAR(50) NOT NULL, area VARCHAR(50) NOT NULL ); INSERT INTO barrios (id,nombre,nro_comuna,perimetro,area) VALUES (0,'CHACARITA',15,'7724.8529...
true
7776420098be2b4c163a13b1fde3381278069618
SQL
better/dbt
/test/integration/001_simple_copy_test/tests/get_relation_quoting.sql
UTF-8
414
2.984375
3
[ "Apache-2.0" ]
permissive
{%- set tgt = ref('seed') -%} {%- set got = adapter.get_relation(database=tgt.database, schema=tgt.schema, identifier=tgt.identifier) | string -%} {% set replaced = got.replace('"', '-') %} {% set expected = "-" + tgt.database.upper() + '-.-' + tgt.schema.upper() + '-.-' + tgt.identifier.upper() + '-' %} with cte as (...
true
999aa022d98328f7e7fd85e9b25fffaf55779792
SQL
GingerGabriela/Triggers
/ejertri8.sql
UTF-8
523
3.40625
3
[]
no_license
create or replace trigger borrarAlumnos before delete on alum for each row declare nue nuevos%rowtype; ant antiguos%rowtype; begin begin select * into nue from nuevos where nombre=:old.nombre; RAISE_APPLICATION_ERROR(-20199,'El alumno existe en la tabla nuevo'); EXCEPTION when no_data_found then null; e...
true
84d8241d9ca14cbe23da967499fc983ab140946c
SQL
Jblew/MedManual2
/medmanual2/src/Model/Table/tables2.sql
UTF-8
3,844
3.640625
4
[]
no_license
ALTER DATABASE medmanual2 CHARACTER SET utf8 COLLATE utf8_bin; CREATE TABLE users ( id INT UNSIGNED AUTO_INCREMENT PRIMARY KEY, username VARCHAR(50), password VARCHAR(255), role VARCHAR(20), created DATETIME DEFAULT NULL, modified DATETIME DEFAULT NULL, api_key VARCHAR(255), api_key_pl...
true
caff84a9db2515db5b1e8865c6ffeb5f4e82123f
SQL
demianbarry/web-db
/gerencia/DBScripts/OC no recibidas completas.sql
UTF-8
319
3.484375
3
[]
no_license
SELECT sum(t1.cantidad_recibida) as cantidad_recibida,t1.detalle_sc_id,t2.cantidad_pedida,t2.orden_compra_id FROM inventario.detalles_rc t1, inventario.detalle_sc t2 where t1.detalle_sc_id = t2.detalle_sc_id group by t1.detalle_sc_id,t2.cantidad_pedida,t2.orden_compra_id having cantidad_recibida < cantidad_pedida
true
6b97e00a42eb2fa27bb05824b852748ce111d4bb
SQL
maduhu/MARLO-CIAT
/marlo-ciat/marlo-ciat-web/src/main/resources/database/migrations/V1_0_0_20161123_0950__LocElementType.sql
UTF-8
3,566
2.875
3
[]
no_license
SET FOREIGN_KEY_CHECKS=0; -- ---------------------------- -- Table structure for loc_element_types -- ---------------------------- DROP TABLE IF EXISTS `loc_element_types`; CREATE TABLE `loc_element_types` ( `id` bigint(20) NOT NULL AUTO_INCREMENT, `name` varchar(245) DEFAULT NULL, `parent_id` bigint(20) DEFAULT...
true