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
167db9296770743a926741a49a1e7e625a8c996c
SQL
Pituca89/KIOSCO
/Scripts/Tablas.sql
UTF-8
3,542
3.25
3
[]
no_license
CREATE TABLE SCH_KIOSCO.PRODUCT_CATEGORY( CATEGORY_ID BIGINT NOT NULL PRIMARY KEY AUTO_INCREMENT, IS_ACTIVE BIT, CATEGORY_NAME VARCHAR(255) NOT NULL, PHOTO VARCHAR(255), POSITION_ INTEGER NOT NULL, POSITIONINCASH INTEGER NOT NULL, PARENT_ID BIGINT, VAT_ID BIGINT, UNIQUE(CATEGORY_NAME), FOREIGN KEY(PARENT_ID) REFERENCES...
true
6bfd18f57030348524e0195892f48b17159d3d87
SQL
wdgreen/NSDent
/test/requete_cabinet_par_nom.sql
UTF-8
668
3.234375
3
[ "Apache-2.0" ]
permissive
SELECT cabinet.* jonction_cabinet_praticien.fk_id_cabinet , jonction_cabinet_praticien.fk_id_praticien , praticien.nom_praticien, contact.id_contact, contact.ville from cabinet INNER JOIN jonction_cabinet_praticien ON jonction_cabinet_praticien.fk_id_cabinet = cabinet.id_cabinet && nom_ca...
true
b4be70e3dbb7e1226fbfd9409f7e7515bcb6d8c2
SQL
happyzwh/bigtest
/src/test.sql
UTF-8
741
3
3
[]
no_license
CREATE DATABASE IF NOT EXISTS test; USE test; DROP TABLE IF EXISTS `test`; CREATE TABLE `test` ( `id` int(11) NOT NULL AUTO_INCREMENT, `name` varchar(30) DEFAULT NULL, `des` varchar(100) DEFAULT NULL, `age` int(11) DEFAULT NULL, `createtime` datetime DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB AUTO_...
true
b6920f81fd071064114fefe6e08b1325c4d15cb1
SQL
ramzy1996/library-management
/db/login_sample.sql
UTF-8
5,906
3.03125
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 5.1.1 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Oct 05, 2021 at 08:16 PM -- Server version: 10.4.19-MariaDB -- PHP Version: 8.0.7 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIEN...
true
8be98c869e60a2cda2e99cf2216b9cefca50aaff
SQL
BrenoNoccioli/MySQL
/aulas/10_chave_estrangeira_e_join.sql
UTF-8
1,048
3.875
4
[]
no_license
desc gafanhotos; alter table gafanhotos add column cursopreferido int; /*ADICIONA NOVA COLUNA (CAMPO)*/ alter table gafanhotos add foreign key (cursopreferido) references cursos(idcurso); /*DEFINE CHAVE ESTRANGEIRA*/ select * from gafanhotos; select * from cursos; update gafanhotos set cursopreferido = '6' where id ...
true
474cb50c2c3461b92c50fba279959f4db03a3131
SQL
Mickatronic/SarlTetra
/Script BDD SARLTETRA.sql
ISO-8859-1
5,208
3.125
3
[]
no_license
@@ -1,168 +0,0 @@ -- phpMyAdmin SQL Dump -- version 4.1.14 -- http://www.phpmyadmin.net -- -- Client : 127.0.0.1 -- Gnr le : Lun 16 Mars 2015 14:19 -- Version du serveur : 5.6.17 -- Version de PHP : 5.5.12 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@...
true
ef149a53c4ed916a267c3b8977891d5cd1394ae6
SQL
mtejas88/esh
/Projects/fewer_applicants/src/dropped_applicants_not_c1voice_not_receiving_1617.sql
UTF-8
3,529
4.03125
4
[]
no_license
with dropped_apps as ( select bi16.billed_entity_number, bi16.application_number, bi16.applicant_type, bi16.category_one_discount_rate, bi16.urban_rural_status from fy2016.basic_informations bi16 left join fy2017.basic_informations bi17 on bi16.billed_entity_number = bi17.billed_entity_number where bi...
true
2e07f26f2510ad761ad3bca23d5bf0aedd3d9bad
SQL
gdower/data-col-sectors
/scripts/export.sql
UTF-8
7,763
3.671875
4
[]
no_license
DELETE FROM Assembly_Global.families WHERE record_id = 20541; -- eliminate duplicate family_code UPDATE Assembly_Global.families SET kingdom=trim(kingdom); UPDATE Assembly_Global.families SET phylum=trim(phylum); UPDATE Assembly_Global.families SET class=trim(class); UPDATE Assembly_Global.families SET `order`=trim(`o...
true
cf74780753089259d707dd69e1b73da8579b0b66
SQL
kongmin123/textannotationforandroid
/src/main/resources/sql/base.sql
UTF-8
6,303
3.609375
4
[]
no_license
use textannotation; DROP TABLE IF EXISTS `document`; CREATE TABLE `document` ( `did` INT(11) NOT NULL AUTO_INCREMENT COMMENT '文件ID', `filename` varchar(255) DEFAULT NULL COMMENT '文件名', `filetype` varchar(255) DEFAULT NULL COMMENT '文件类型', `filesize` INT(11) DEFAULT NULL COMMENT '文件大小', `relativepath` va...
true
56c621f4a420b315f5da85d4b5a1caf20c8c1a8a
SQL
mervynjong96/dealloCraftHouse
/backups/transactions.sql
UTF-8
2,030
3.203125
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.7.4 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Nov 07, 2017 at 09:14 AM -- Server version: 10.1.26-MariaDB -- PHP Version: 7.1.9 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD...
true
5a5b9be7fbcc6af869345476a5a79d9ee79c5750
SQL
puturikky/praktikum-8
/perpustakaan.sql
UTF-8
3,352
3.09375
3
[ "LicenseRef-scancode-unknown-license-reference", "MIT" ]
permissive
-- phpMyAdmin SQL Dump -- version 4.8.2 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Apr 27, 2019 at 05:58 PM -- Server version: 10.1.34-MariaDB -- PHP Version: 5.6.37 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OL...
true
d4fb7f1ccfb4e316f50fe85f03c6656b0d05eb2a
SQL
VinayagamD/SQLTraining
/Clauses/aliases/iniailize.sql
UTF-8
238
2.625
3
[]
no_license
CREATE SCHEMA aliases_eg; USE aliases_eg; CREATE TABLE students( id INT AUTO_INCREMENT NOT NULL PRIMARY KEY, name VARCHAR(100) ); INSERT INTO students (name) VALUES ('Ram'), ('Ramesh'), ('Suresh'), ('Dinesh'), ('Sam'), ('Som');
true
448bdc1999ba81cfb9f9f67212023c6e8a76f946
SQL
lucky1603/demo_hoteli
/backup baze/mysql_hotel_final.sql
UTF-8
26,522
3.15625
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.5.1 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: Dec 28, 2015 at 05:50 PM -- Server version: 10.1.9-MariaDB -- PHP Version: 5.6.15 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLI...
true
96f1091eceb9a8ae8a9391c4feb793fdd2862b5d
SQL
swlkr/learning-clojure
/src/api/sql/users.sql
UTF-8
552
4
4
[]
no_license
-- name: get-users -- Gets a list of all users with limit/offset select * from users offset :offset limit :limit -- name: insert-user<! -- Creates a user insert into users ( email, password ) values ( :email, :password ) -- name: delete-user<! -- Deletes a user delete from users where id = :id -- name: updat...
true
7079a76e341f68167158b340b1aace35c1c99183
SQL
frankunderw00d/volumes
/mysql/privilege.sql
UTF-8
453
2.78125
3
[ "MIT" ]
permissive
# [!!!] 更换 root 密码 use mysql; # 同时修改远程登录和本地登录的秘密 alter user 'root'@'%' identified by 'frank123'; alter user 'root'@'localhost' identified by 'frank123'; # 刷入权限 flush privileges; # 创建用户 create user 'frank'@'%' identified by 'frank123'; # 给予用户对 jarvis 的全部权限 grant all privileges on `jarvis`.* to 'frank'@'%'; # 刷入权限 flus...
true
3cc370e065f14a77d17c38392d0e20c9d3eeba0e
SQL
vsanand27/Pewlett-Hackard-Analysis
/Queries/schema.sql
UTF-8
3,782
4.5
4
[]
no_license
CREATE TABLE departments ( dept_no VARCHAR(4) Not Null, dept_name VARCHAR(40) Not Null, Primary Key(dept_no), Unique (dept_name) ); CREATE TABLE employees( emp_no INT NOT NULL, birth_date DATE NOT NULL, first_name VARCHAR NOT NULL, last_name VARCHAR NOT NULL, gender VARCHAR NOT NULL, hire_da...
true
bd406d18432c6bd90890900bdc8fdf22806bf03a
SQL
Yuta2049/9_DB_SQL
/Queries.sql
UTF-8
874
3.890625
4
[]
no_license
-- Получить список товаров SELECT * FROM product; -- Получить список клиентов из черного списка SELECT * FROM onlinestore.client where InBlackList = 1; -- Получить список товаров для заказа с id = 1 SELECT RowNumber, name, price, quantity from orderproductlist join product on Product_idProduct = idProduct where Ord...
true
f0721359bf739d42008db6ca19e60309cda7dbe6
SQL
kilbiller/ThesaurusBDD
/sql/create.sql
UTF-8
1,486
2.875
3
[]
no_license
--Creation CREATE OR REPLACE TYPE utilisateur_t AS Object (email varchar(50), mdp varchar(20), prenom varchar(20), nom varchar(20), ...
true
5920c9e024d6e59907a45d0ec685f7bdc123a19d
SQL
attrib1/LabDataBaseAdvance
/Week10/sql.sql
UTF-8
431
3.046875
3
[]
no_license
select first_name, salary,12*salary+100 from employees; select region_name,length(region_name) from regions; select region_name , substr(region_name,3,3),substr(region_name,3) from regions; select round(67830.4557,3),round(67830.4557,2), round(67830.4557,-3) from dual; select trunc(67830.4557,3),trunc(67830.4557,2...
true
41bfb4e30724b15625701d9064cde0e7a2c3a2df
SQL
HansolKim-joy/Oracle_workspace
/6_PL_SQL/12_PL_SQL.sql
UTF-8
15,618
4
4
[]
no_license
-- PL / SQL (Procedural Language extension to SQL) -- 오라클 자체에 내장되어 있는 절차적 언어 -- SQL문장 내에서 변수의 정의, 조건처리(IF), 반복처리(LOOP, FOR, WHILE)등을 지원하여 SQL단점 보안 -- PL / SQL 구조 -- 선언부 : DECLARE로 시작 -- 변수나 상수 선언 -- 실행부 : BIGIN으로 시작 -- 로직 기술 -- 예외 처리부 : EXCEPTION -- 예외 상황 발생 시 해결하...
true
725295d8410887f92a55ae3c3efccec69efd023f
SQL
gcoronelc/SISTUNI-ORACLE-SQL-002
/Clase03/03-MELVIN VENTOCILLA-tabla derivada.sql
UTF-8
367
3.5625
4
[]
no_license
/* Ejemplo: Se requiere saber quienes son los que tienen el menor salario por departamento */ --convertir la consulta a tabla derivada select em.* from HR.employees em join (select department_id, min(salary) salary from HR.employees where department_id is not null group by department_id) t on em.departmen...
true
6d8bf2c1120168a1fbdeedd1a0caa86a9532fa69
SQL
b-dejonge/wistful_vista
/wistful_vista.sql
UTF-8
4,353
2.96875
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.5.1 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: Dec 11, 2017 at 01:55 AM -- Server version: 10.1.19-MariaDB -- PHP Version: 5.6.28 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CL...
true
34cce801a1e1968f2ab219e7afd33b3b7fa579db
SQL
jordysolis96/database-exercises
/subqueries_exercises.sql
UTF-8
532
3.84375
4
[]
no_license
USE employees; SELECT CONCAT(first_name, ' ', last_name) AS name FROM employees WHERE hire_date IN ( SELECT hire_date FROM employees WHERE emp_no = 101010 ); SELECT title, count(title) FROM titles WHERE emp_no IN ( SELECT emp_no, first_name FROM employees WHERE first_name = 'Aamond' ) ...
true
dc7cc742ebb5a3d57a0136bbbc26560092ab4c35
SQL
RobertoGuzman1/Prueba
/base.sql
UTF-8
3,686
3.34375
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 3.5.2.2 -- http://www.phpmyadmin.net -- -- Servidor: 127.0.0.1 -- Tiempo de generación: 26-08-2016 a las 01:09:35 -- Versión del servidor: 5.5.27 -- Versión de PHP: 5.4.7 SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACT...
true
4460671d262c6a2609dcd68c6cbc1eec72bde224
SQL
W3SS/controle_patrimonio
/Backup Banco Patrimonio user postgres.sql
UTF-8
10,585
2.859375
3
[]
no_license
-- -- PostgreSQL database dump -- -- Dumped from database version 10.0 -- Dumped by pg_dump version 10.0 -- Started on 2017-10-23 13:06:25 SET statement_timeout = 0; SET lock_timeout = 0; SET idle_in_transaction_session_timeout = 0; SET client_encoding = 'UTF8'; SET standard_conforming_strings = on; SET check_functi...
true
1d66ff3f534dd683175cc9177c2cff9d99cd5a82
SQL
bill-zhuang/goutte_crawler
/data/baidu_avatar.sql
UTF-8
897
2.890625
3
[ "Apache-2.0" ]
permissive
/* Navicat MySQL Data Transfer Source Server : localhost Source Server Version : 50522 Source Host : localhost:3306 Source Database : crawl Target Server Type : MYSQL Target Server Version : 50522 File Encoding : 65001 Date: 2015-04-26 10:11:44 */ SET FOREIGN_KEY_CHECKS=0; -- ---...
true
a631a8a169d08c5ef9b042a8da54e6bc0d1e63f7
SQL
shakermegahed/CoreCrud
/BB.WM.Database/Website/Tables/Trip.sql
UTF-8
956
3.171875
3
[]
no_license
CREATE TABLE [Website].[Trip] ( [TripId] UNIQUEIDENTIFIER NOT NULL, [WebSiteId] UNIQUEIDENTIFIER NULL, [TripTitle] NVARCHAR (150) NULL, [Duration] NVARCHAR (MAX) NULL, [Overview] NVARCHAR (MAX) NULL, [TripDestinations] NVARCHAR (MAX) NULL, [Tr...
true
239186ecde2f909f240f8b08f6ccd7928de1710a
SQL
demowoo/diancan
/sql/comment.sql
UTF-8
906
2.703125
3
[]
no_license
/* Navicat MySQL Data Transfer Source Server : localhost Source Server Version : 50148 Source Host : localhost:3306 Source Database : diancan Target Server Type : MYSQL Target Server Version : 50148 File Encoding : 65001 Date: 2012-08-23 14:55:49 */ SET FOREIGN_KEY_...
true
b2ebcf0ad7a0ea7eebbff4f23ac93f6a3327b5e0
SQL
filipefernands/DesafioSearch
/src/main/resources/db/migration/mysql/V3__database.sql
UTF-8
901
3.546875
4
[]
no_license
CREATE TABLE `search` ( `id` bigint(20) NOT NULL, `text` varchar(255) NOT NULL, `url` varchar(255) NOT NULL, `id_query` bigint(20) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8; CREATE TABLE `query_search` ( `id` bigint(20) NOT NULL, `query` varchar(255) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8; --...
true
99994d334f8a29c3d15cc38996bbe7f240ccb2af
SQL
fathurxzz/aleqx
/Shop/Shop/Models/Orders.edmx.sql
UTF-8
2,726
3.75
4
[]
no_license
-- ----------------------------------------------------------- -- Entity Designer DDL Script for MySQL Server 4.1 and higher -- ----------------------------------------------------------- -- Date Created: 03/02/2012 21:28:46 -- Generated from EDMX file: D:\projects\Shop\Shop\Models\Orders.edmx -- Target ve...
true
1c7bb97ebf075034ccefbbc594568ec11a955d2d
SQL
hongjie19970525/FlightTicketManager
/create_public_synonym.sql
UTF-8
351
2.6875
3
[]
no_license
declare cursor c_t is select table_name from user_tables; szSql varchar2(2048); username varchar2(1000); begin select user into username from dual; for rec in c_t loop szSql := 'create or replace public synonym '||rec.table_name||' for '||username||'.'||rec.table_name||';'; dbms_output.put_lin...
true
596d9321ed43794a79f5c0411428638a777915b7
SQL
kahija/videoflix-database
/sql/basic-level/5.sql
UTF-8
221
3.09375
3
[]
no_license
-- 5 - Écrire une requête qui retourne le nom de tous les utilisateurs -- qui ont commenté des films SELECT DISTINCT firstname, lastname FROM movie_review mc INNER JOIN user u ON u.id = mc.user_id;
true
ec237dcc7db6e2bdac27ab223a75b0a0d10b1a15
SQL
nullthefirst/sql_shelf
/3-aggregations/15.sql
UTF-8
249
3.25
3
[]
no_license
SELECT a.name account_name, AVG(o.standard_amt_usd) avg_standard_amt_usd, AVG(o.gloss_amt_usd) avg_gloss_amt_usd, AVG(o.poster_amt_usd) avg_poster_amt_usd FROM accounts a JOIN orders o ON a.id = o.account_id GROUP BY a.name ORDER BY a.name;
true
9923de19a9f6656f9b1dbe9624943848631bd379
SQL
soaraor/mybatis-sample
/w4j-mybatis-post/src/main/resourecs/wp_posts.sql
UTF-8
2,289
3.078125
3
[]
no_license
SET NAMES utf8mb4; SET FOREIGN_KEY_CHECKS = 0; DROP TABLE IF EXISTS `wp_posts`; CREATE TABLE `wp_posts` ( `ID` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, `post_author` bigint(20) UNSIGNED NOT NULL DEFAULT 0, `post_date` datetime(0) NULL, `post_content` longtext CHARACTER SET utf8 COLLATE utf8_general_ci NO...
true
6343bbc9c2d9c7509c3792b2380a607faa59757d
SQL
erinlhiggins/TermProject-CS1555
/projectschemadata.sql
UTF-8
68,499
3.9375
4
[]
no_license
---Project milestone 2 ---By: Elh76 & Leo10 DROP TABLE Profiles CASCADE CONSTRAINTS; DROP TABLE Friendships CASCADE CONSTRAINTS; DROP TABLE Groups CASCADE CONSTRAINTS; DROP TABLE Messages CASCADE CONSTRAINTS; ---Making the Profile table -- Users must be unique CREATE TABLE Profiles ( userID number...
true
d18b39c98f4f89da30be00d0c84d0c8f3d3570d4
SQL
sanogotech/BallerinaDataAccessforMicroservices
/ballerina/crud-cqrs/banking/banking.sql
UTF-8
1,589
3.890625
4
[]
no_license
CREATE DATABASE BANKING_DB; use BANKING_DB; CREATE TABLE BRANCH (branchId VARCHAR(50), name VARCHAR(1024), address VARCHAR(1024), PRIMARY KEY(branchId)); CREATE TABLE ACCOUNT (accountId VARCHAR(50), name VARCHAR(1024), address VARCHAR(1024), balance DECIMAL(15,4), state VARCHAR(10), branchId VA...
true
3fa0a08cc567c6f086e753cfa4d2ab5eb543df2c
SQL
magdalena70/MSSQL-DB-Basics
/SQL-Language-Basics/Homework_05-Data-Aggregation/Problem_06-DepositsSumForOllivanderFamily.sql
UTF-8
140
2.71875
3
[]
no_license
SELECT [DepositGroup], SUM([DepositAmount]) AS 'TotalSum' FROM [WizzardDeposits] WHERE [MagicWandCreator] = 'Ollivander family' GROUP BY [DepositGroup]
true
552604b02a530dda58b8ba5f17e643e44036073e
SQL
Saftladen/Dashboard
/db/initial/schemas/integrations.sql
UTF-8
307
2.890625
3
[]
no_license
create type integrationtype as enum ('slack_team', 'slack_user'); create table integrations ( id serial primary key, type integrationtype not null, user_id int references users(id), data jsonb not null, public_data jsonb not null, created_at timestamp with time zone not null default now() );
true
b1b2e523f053b481002005b2aa92c2d8eb9e655f
SQL
iOS-Lab/tracker-server
/ntsiot-system/sql/track/cyoubike_dict_detail.sql
UTF-8
5,886
3.109375
3
[ "Apache-2.0" ]
permissive
create table dict_detail ( id BIGINT(19) auto_increment primary key, label VARCHAR(255) not null comment '字典标签', value VARCHAR(255) not null comment '字典值', sort VARCHAR(255) null comment '排序', dict_id BIGINT(19) null comment '字典id' ); create index FK5tpkputc6d9nboxojdbgnpmyb ...
true
6245bebe3292f372acdd7e8edb4830b8c6dffe3b
SQL
361382300/SQL-procedures
/CBD.sql
UTF-8
391
3.390625
3
[]
no_license
select d.documentNumber from emd_document d,emd_coupon c,emd_transaction tr where d.documentid=c.documentid and d.documentid=tr.documentid and c.status in ('F', 'G', 'R', 'V', 'E', 'X') and tr.action in ('B', 'G', 'RF', 'X', 'E', 'V') and tr.transactiondate>=to_date(?,'...
true
34f0fea9af98e4e3eae6e3d81abcc33803af4d13
SQL
MiniGod/JsControl
/controller/Sql/mysql.sql
UTF-8
450
2.609375
3
[]
no_license
CREATE TABLE `maps` ( `id` int(11) NOT NULL AUTO_INCREMENT, `name` varchar(255) NOT NULL, `uid` varchar(255) NOT NULL, `author` varchar(255) NOT NULL, PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; CREATE TABLE `players` ( `id` int(11) NOT NULL AUTO_INCREMENT, `login` varchar...
true
ec6edcbb4d9947e3a31828cacc26e04f3b052521
SQL
ArthurMassaini/project-mysql-one-for-all
/desafio3.sql
UTF-8
270
3.265625
3
[]
no_license
CREATE VIEW historico_reproducao_usuarios AS( SELECT u.nome_usuario AS `usuario`, c.nome_cancao AS `nome` FROM usuario AS `u` INNER JOIN historico AS `h` ON u.usuario_id = h.usuario_id INNER JOIN cancao AS `c` ON h.cancao_id = c.cancao_id ORDER BY `usuario`, `nome` );
true
5428d2539fcac8c8da6e7410692fa9727b66d6c2
SQL
Shah56/rasa-ui
/resources/db-alters.sql
UTF-8
9,418
3.984375
4
[ "MIT" ]
permissive
/*Alters after release 2.1 version*/ CREATE SEQUENCE public.messages_messages_id_seq INCREMENT 1 START 1 MINVALUE 1 MAXVALUE 9223372036854775807 CACHE 1; CREATE TABLE public.messages ( messages_id integer NOT NULL DEFAULT nextval('messages_messages_id_seq'::regclass), "timestamp" timestamp without time zone DEFAUL...
true
665ec310856f57f0a2298394adf8ef3d45d1af11
SQL
Komitus/Databases
/L1/Script.sql
UTF-8
169
3.390625
3
[]
no_license
USE Chinook; SELECT tr.Name, mt.Name FROM Track tr INNER JOIN MediaType mt ON tr.GenreId = mt.MediaTypeId AND mt.Name LIKE "%audio file" WHERE tr.Milliseconds > 250000;
true
72111efb09585f204c2b8f11aa412f1803a60a69
SQL
AdiCheo/M3DB
/m3db_postgre.sql
UTF-8
31,088
3.140625
3
[]
no_license
-- -- PostgreSQL database dump -- SET statement_timeout = 0; SET lock_timeout = 0; SET client_encoding = 'UTF8'; SET standard_conforming_strings = off; SET check_function_bodies = false; SET client_min_messages = warning; SET escape_string_warning = off; -- -- Name: plpgsql; Type: EXTENSION; Schema: -; Owner: -- CR...
true
385ba25acf79c1d61c35420de10d30a4303c0b27
SQL
itsmin/itsmin.github.io
/portfolio/goldcartridge/datadrain/highscores/create_table.sql
UTF-8
450
3.078125
3
[]
no_license
CREATE TABLE `highscores` ( `id` INT( 4 ) NOT NULL AUTO_INCREMENT PRIMARY KEY FIRST , `game` VARCHAR( 256 ) NOT NULL , `score` INT( 4 ) NOT NULL , `name` VARCHAR( 256 ) NOT NULL , `ip` VARCHAR( 256 ) NOT NULL , `level` INT( 4 ) NOT NULL , `date` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ) TYPE = MYISAM COMMENT = 'Gl...
true
62b4bbf1142b35b9301474ec29a71e4dc8dc6910
SQL
masinew/database-replication
/sql/DB2/procedure.sql
UTF-8
905
3.453125
3
[]
no_license
CREATE OR REPLACE PROCEDURE INSERT_SYNC_INFORMATION(DESCRIPTION VARCHAR(100), SQL_MARKED_RECEIVED VARCHAR(100), SQL_STATEMENT VARCHAR(500)) LANGUAGE SQL BEGIN ATOMIC DECLARE NEW_SYNC_INFORMATION_ID INTEGER; FOR v AS cur1 CURSOR FOR SELECT DATABASE_INFORMATION_ID FROM SYNC_DATABASE_INFORMATIO...
true
02d7123efa9bda8fa8cdafcb7b20d90c08a7ebcd
SQL
uGoldy/Fotoboks_Nettverk
/Spørring- mattematiske/math.sql
UTF-8
748
3.21875
3
[]
no_license
create schema if not exists fotoboks_nettverk; use fotoboks_nettverk; ################################################## select * from produkt_innhold; -- dette er alt sammen select max(antall) from produkt_innhold; -- max = 44 select min(antall) from produkt_innhold; -- min = 2 select avg(antall) from produkt_in...
true
f00a6bded930b9dac8239fb40afa5b0b6801f888
SQL
AndrewKim0318/BootcampX
/4_queries/4_average_total_duration_on_assistance_request.sql
UTF-8
435
4.0625
4
[]
no_license
SELECT AVG(total_duration) as average_total_duration FROM ( SELECT cohorts.name AS cohort, SUM(assistance_requests.completed_at - assistance_requests.started_at) AS total_duration FROM assistance_requests JOIN students ON students.id = student_id JOIN cohorts ON cohorts.id = students.cohort_id GROUP BY co...
true
caeed6dec3626e2f55bdb85e0a6b636f907602c1
SQL
iemre/life-stripes-api
/resources/queries/stripe.sql
UTF-8
595
3.390625
3
[]
no_license
-- name: get-by-id SELECT * FROM stripes WHERE id=:id; -- name: get-by-user-id select * from stripes where user_id=:user_id; -- name: insert! insert into stripes (title, time_spent_in_minutes, user_id, relative_priority, colour_code, created_at) values (:title, 0, :user_id, :relative_priority, :colour_code, :created...
true
3a9184f6469f48abd36aec9c0474e810d4702e7d
SQL
LucianoFromTrelew/BD2-2018
/tp4/src/fragmentos_aviones/todos_pilotos.sql
UTF-8
756
2.953125
3
[]
no_license
/* Los siguientes fragmentos serían asignados al sitio que tiene todos los pilotos */ -- Descripción: Todas las localidades -- Nombre de fragmento: localidad_todos SELECT * FROM localidad; -- Descripción: Todos los pilotos -- Nombre de fragmento: piloto_todos SELECT * FROM piloto; -- Descripción: Todos los tra...
true
f042161052b057f6e3df0d03c5e1dd7fd1001f61
SQL
wait153/XiaoYu
/data/mysql data/xiaoyu.sql
UTF-8
14,091
3.359375
3
[]
no_license
/* Navicat Premium Data Transfer Source Server : yu Source Server Type : MySQL Source Server Version : 50647 Target Server Type : MySQL Target Server Version : 50647 File Encoding : 65001 Date: 02/11/2020 14:58:52 */ SET NAMES utf8mb4; SET FOREIGN_KEY_CHECKS = 0; -- ------------------...
true
4c861ca87efec35552ead5d37f1de42e8fdae71f
SQL
hrodriguezv/com.tecnoven.notify
/schema.sql
UTF-8
3,464
3.296875
3
[]
no_license
alter table notification drop constraint FK237A88EB1A4E20C8 ; alter table record drop constraint notification_fk1_record ; alter table record drop constraint FKC8466C51759B96B4 ; alter table tag drop constraint template_fk1_tag ; alter table template ...
true
17edbc7d2a7ea80c6e5ad67554a08dd7b1bc4e18
SQL
Mohsin7777/SQL_and_Python
/SQL_Snippets/HUP.sql
UTF-8
387
2.9375
3
[]
no_license
------------- ALL HUPS IN TIME PERIOD SELECT DISTINCT H.BAN, H.SUBSCRIBER_NO, H.DEALER_CODE, H.HUP_STATUS_DATE into #hup FROM STAGE.dbo.STG_HUP_UPGRADE_HISTORY H WHERE H.PRODUCT_TYPE = 'C' AND H.HUP_TYPE != 'S' AND H.HUP_TYPE != 'O' AND H.HUP_REQUEST_STATUS = 'A' AND H.NEW_EQ_TYPE != 'G' AND H.CANCEL_DATE I...
true
6449c3164ca3b2b46469a7a8a2bbac01207792db
SQL
wiltonlazary/snappydata
/examples/quickstart/scripts/twitter_streaming_query.sql
UTF-8
595
3.453125
3
[ "OFL-1.1", "MPL-1.1", "BSD-3-Clause", "LicenseRef-scancode-other-copyleft", "LicenseRef-scancode-unknown-license-reference", "LicenseRef-scancode-free-unknown", "LicenseRef-scancode-mx4j", "LGPL-2.0-or-later", "OpenSSL", "LGPL-2.1-only", "FSFAP", "LicenseRef-scancode-other-permissive", "LGPL...
permissive
------------------------------------------------------------ ---- Sql query in live twitter stream ----- ---- Get top 10 popular hashtags ------ ------------------------------------------------------------ SELECT hashtag, COUNT(*) AS tagcount FROM hashtagtable GROUP BY hashtag ORDER BY tagcount DESC LIMIT 10; --- Get...
true
f3385d1ec04a73b6e6c02e983159809aa5221dd4
SQL
lzsjinxin/All-databases-ofppt-tdi
/EFF_2012/db_file9_2.sql
UTF-8
2,407
3.8125
4
[]
no_license
create database EFF2012_TP_V1_1_DB --remarque ses question et le meme pour EFF2012_TP_V1_2 aussi pour EFF2012_TP_V1_3 --just la base de donne et different use EFF2012_TP_V1_1_DB create table region ( idr int primary key, nomr varchar(20) ) create table provinceprefecture( idprofpref int primary key, ...
true
2d178d73f480f2e2948e66ed5090405b42084a03
SQL
Mkelly0717/PSO_US
/U_90_REBALANCE.sql
UTF-8
880
3.078125
3
[]
no_license
-------------------------------------------------------- -- DDL for View U_90_REBALANCE -------------------------------------------------------- CREATE OR REPLACE VIEW "SCPOMGR"."U_90_REBALANCE" ("DEST", "DESCR", "COUNTRY", "POSTALCODE", "SRC_CAND", "SRC_DESCR", "SRC_COUNTRY", "SRC_POSTALCODE") AS SELECT a.loc d...
true
2235ea208699e0dbd97c00b811a9a55740c920b0
SQL
skanin/NTNU
/Informatikk/Bachelor/V2019/TDT4145/Eksamner/2014/SQL.sql
UTF-8
587
3.859375
4
[]
no_license
--Oppgave 2c SELECT PNumber FROM Subscriber JOIN PhoneNumber on ID = SubscriberID WHERE Address LIKE "Bluckhaugen %"; --Oppgave 2d SELECT city, COUNT(*) as "Antall Abonnenter" FROM Subscriber GROUP BY city ORDER BY COUNT(*) DESC; --Oppgave 2e UPDATE Subscriber SET Address = "Bluckhaugen 99", PostalCode = 7046, city =...
true
f9b90f5937efeb14323d1d8ce26efc2860ee40e9
SQL
gcoronelc/PLSQL-2019-06
/Modulo11/tr_test_emp.SQL
UTF-8
640
2.78125
3
[]
no_license
CREATE OR REPLACE TRIGGER SCOTT.tr_test_emp AFTER INSERT OR DELETE OR UPDATE ON SCOTT.emp BEGIN if inserting then dbms_output.put_line( 'nuevo empleado se ha insertado' ); Elsif updating then dbms_output.put_line( 'un empleado se ha modificado' ); Elsif deleting then dbms_output.put_line( 'un ...
true
85d91a471d26ddb8469719498ed1184169ad6989
SQL
dimasnugroho673/Nilaiku-CRUD-PHP
/akademik.sql
UTF-8
1,995
3
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.6.6deb5 -- https://www.phpmyadmin.net/ -- -- Host: localhost:3306 -- Generation Time: May 01, 2019 at 12:39 PM -- Server version: 5.7.25-0ubuntu0.18.04.2 -- PHP Version: 7.2.17-0ubuntu0.18.04.1 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHA...
true
2c4eed13148e0769405d513358f82f0c1f057547
SQL
DeCecco/gjs2
/ags2.sql
UTF-8
29,830
2.875
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.0.10.14 -- http://www.phpmyadmin.net -- -- Servidor: localhost:3306 -- Tiempo de generación: 07-12-2017 a las 17:04:35 -- Versión del servidor: 5.6.33 -- Versión de PHP: 5.4.31 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT...
true
c5fc2b0d127ac1f007aa12f68f696b83e1d0409e
SQL
sammeishi/InfinityUser
/db/infinityUser.sql
UTF-8
3,539
3.375
3
[]
no_license
/* Navicat Premium Data Transfer Source Server : DefDev Source Server Type : MySQL Source Server Version : 50728 Source Host : 192.168.40.133:3306 Source Schema : infinityUser Target Server Type : MySQL Target Server Version : 50728 File Encoding : 65001 Date: 29/11/...
true
9095359d810af3aad78c2f6d6c143271ca48348d
SQL
laure1102/dangjian
/dangjian All.sql
UTF-8
22,793
3.265625
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.5.1 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: 2018-04-26 19:49:38 -- 服务器版本: 10.1.19-MariaDB -- PHP Version: 5.6.28 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40...
true
33566989b20096e6e38ac1090934f8a09ff29d22
SQL
wenjun0721/ybz
/lm.sql
UTF-8
18,199
2.984375
3
[ "Apache-2.0" ]
permissive
/* Navicat MySQL Data Transfer Source Server : localhost Source Server Version : 50547 Source Host : localhost:3306 Source Database : lm Target Server Type : MYSQL Target Server Version : 50547 File Encoding : 65001 Date: 2019-05-27 18:27:18 */ SET FOREIGN_KEY_CHECKS=0; -- ------...
true
403915bd76e5e2afd535135fd7e4c467c4498e05
SQL
AfpaFred77/myownpizza
/t_commande.sql
UTF-8
396
3.140625
3
[]
no_license
USE `mydb`; DELIMITER $$ CREATE TRIGGER `Commande_BINS` BEFORE INSERT ON `Commande` FOR EACH ROW begin if date_commande >= localtimestamp then insert into Commande (id,no_commande,client_id,pizza_id,pizzeria_id,date_commande,heure_livraison,livraison) values (new.id,new.no_commande,new.Client_id,new.pizza_id,new.pizzer...
true
9e12853f9b155c00f16d35ddfac0cf34cc87912b
SQL
MithrandirD/common_schema
/routines/general/_is_select_query.sql
UTF-8
565
3.515625
4
[ "MIT", "BSD-3-Clause", "GPL-1.0-or-later" ]
permissive
-- -- Returns 1 when given input starts with SELECT, 0 otherwise -- -- This is heuristic only, and is used to diagnose input to various routines. -- -- Example: -- -- SELECT _is_select_query('SELECT 3 FROM DUAL'); -- Returns: 1 -- DELIMITER $$ DROP FUNCTION IF EXISTS _is_select_query $$ CREATE FUNCTION _is_select_...
true
aebbe82eb55452bbf98d567ca13efeb6879d126c
SQL
Wwwolfgang/Backend
/target/classes/import.sql
UTF-8
2,159
2.859375
3
[]
no_license
/* Popolate tables */ Insert into clientes (nombre,apellido,numero_doc,nacionalidad,telefono,email,create_at) values('Carlitos','Canete','5678678','paraguaya','0987654656','wwwolfgang469@fpuna.edu.py','2020-08-28'); Insert into clientes (nombre,apellido,numero_doc,nacionalidad,telefono,email,create_at) values('Estela',...
true
1025cd7e94088d03f9e5b917b8286c558001405d
SQL
Jugendhackt/comment-sense
/Server/createDB.sql
UTF-8
770
2.890625
3
[]
no_license
BEGIN TRANSACTION; CREATE TABLE IF NOT EXISTS "resources" ( "id" INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT UNIQUE, "url" TEXT NOT NULL, "hash" TEXT NOT NULL, "user" INTEGER NOT NULL, "size" INTEGER ); CREATE TABLE IF NOT EXISTS "comments" ( "id" INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT UNIQUE, "userId" INTEGE...
true
1bb23075ae975b3fdec9426a5c7a7d1708a4b755
SQL
ileri-seviye-mssql-oracle-sql-bootcamp/mssql-e-ticaret-veri-tabani-tasarimi-uckocaman
/E-commerce Database/Tables/alters.sql
UTF-8
1,162
3.25
3
[]
no_license
-- ALTERS ALTER TABLE customers ADD CONSTRAINT job_fk FOREIGN KEY(job_id) REFERENCES jobs(job_id); ALTER TABLE customer_address ADD CONSTRAINT customer_fk FOREIGN KEY(customer_id) REFERENCES customers(id), CONSTRAINT city_fk FOREIGN KEY(city_id) REFERENCES cities(city_id), CONSTRAINT district_fk FOREIGN KEY(d...
true
2d805feff65764151c52b3aa712cf4f1a44864b0
SQL
xornjseh1000/bob_prototype-clear
/socar/src/sql/booking.sql
UTF-8
385
3.328125
3
[]
no_license
create sequence book_seq start with 1 increment by 1 ; create table booking( book_seq int primary key, car_model varchar2(10) , rent_date varchar2(40), return_date varchar2(20), region varchar2(10), travel varchar2(10), socar_zone varchar2(20), id varchar2(20), constraint booking_member_fk foreign key (id) r...
true
bf1dde42038cb3873b146e89e06ab44b7212a14f
SQL
dzjchu/CodingDojo
/Python/day18_mySQLQueries/world-temp.sql
UTF-8
200
3.546875
4
[]
no_license
SELECT countries.name, languages.language, languages.percentage FROM countries JOIN languages ON countries.id = languages.country_id WHERE languages.percentage > 89 ORDER BY languages.percentage DESC;
true
2f1de84f9c764611a8c0f0a1c3f14837789d316a
SQL
manishbaruah/smartlead
/DB_Schema_Script.sql
UTF-8
7,512
3.671875
4
[]
no_license
CREATE TABLE tbl_role ( role_id INT NOT NULL, role_name VARCHAR NOT NULL, PRIMARY KEY (role_id) ); CREATE TABLE tbl_org ( org_id INT NOT NULL, org_name VARCHAR NOT NULL, parent_org_id INT NOT NULL, PRIMARY KEY (org_id) ); CREATE TABLE tbl_project_type ( project_type_id INT NOT NULL, project_type_nam...
true
5301811aea9985649bf1fae50aaf22ca4f55ad2c
SQL
acticloud/actimanager
/actidb/acticlouddb_create.sql
UTF-8
2,418
2.828125
3
[]
no_license
/** * **/ CREATE DATABASE acticloudDB; USE acticloudDB; CREATE TABLE hosts ( id int not null unique auto_increment, name varchar(50), nr_pcpus smallint unsigned, ram_gb int unsigned, is_lab tinyint unsigned ); CREATE TABLE vms ( id va...
true
338c8a833683224cc640c1a782e42e6e9a176e2e
SQL
ronaldo971/utils
/db/sql/Oracle/generate_xsd_from_database.sql
UTF-8
2,027
3.515625
4
[]
no_license
CREATE OR REPLACE PROCEDURE GEN_XML_SCHEMA_OUTPUT AS CURSOR C_TABLE_COLUMNS(C_TABLE_NAME VARCHAR2) IS SELECT COLUMN_NAME, DATA_TYPE, DATA_LENGTH, DATA_PRECISION, DATA_DEFAULT FROM USER_TAB_COLUMNS WHERE TABLE_NAME = C_TABLE_NAME; CURSOR C_TABLE IS SELECT...
true
590013a384a2545f7e4edc7a704a5e6f7a3d6b43
SQL
jullianamartins/ProjetoNami
/Projeto NAMI/ScriptBD - 17.12.15.sql
UTF-8
2,292
3.5625
4
[]
no_license
-- MySQL Script generated by MySQL Workbench -- 12/17/15 02:20:53 -- 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='TRADITION...
true
30de50dc880e69fef65d45b532b9c74535167f2d
SQL
glgildardo/Agenda-ObservableList
/src/org/gildardoalvarado/DB/Conexion.sql
UTF-8
663
3.234375
3
[]
no_license
-- Creador: Gildardo Leonel Alvarado del Cid -- Fecha de Creacion: 19/06/2019 -- Fecha de ultima modificaion: 19/06/2019 CREATE DATABASE Conexion; use Conexion; -- drop database conexion; CREATE TABLE Persona( nombre varchar(20) not null, apellido varchar(20) not null, telefono varchar(20) not null ) DELIMI...
true
67eb086fa0379f5fcc69647cea21ad9613b7e227
SQL
EhsanSedaghat/PortfolioProject
/Covid19_SQL_EDA.sql
UTF-8
4,594
4.40625
4
[]
no_license
--Covid 19 Data Exploration --Skills used: Joins, CTE's, Temp Tables, Windows Functions, Aggregate Functions, Creating Views, Converting Data Types Select * From Portfolio..covid_deaths Where continent is not null order by 3,4; -- Select Data that we are going to be starting with Select location, date, total_cases...
true
748e7f90010b3867bb10a3ec92a3e340312d127c
SQL
takayama23/recommend_items
/app/static/sql/output_sql/items.sql
UTF-8
381
3.3125
3
[]
no_license
select a.item_code ,a.item_name ,b.brand_name ,c.category1_name ,d.category2_name ,e.category3_name ,a.price from items a inner join brands b on a.brand_code = b.id inner join categories1 c on a.category1_code = c.id inner join categories2 d on a.category2_code = d.i...
true
8c5c0d2f95074edb8e94df86a3fbbeabb7cd4cb8
SQL
centricconsulting/corridor-platform
/Solution/Database/File Manager/dbo/Stored Procedures/get_attribute_detail.sql
UTF-8
438
3.046875
3
[]
no_license
 CREATE PROCEDURE dbo.get_attribute_detail @file_format_code VARCHAR(20) AS BEGIN SELECT ffa.attribute_name , ffa.column_index , ffa.extract_regex , ffa.required_ind , ffa.transform_default_ind , a.attribute_data_type , a.attribute_max_length FROM dbo.file_format_attribute ffa INNER JOIN d...
true
79546d30609385cf8e31ba25aabc144e8af9876d
SQL
sircanist/clipper
/clipper-cli/src/test/scripts/v_Employee.sql
UTF-8
4,506
2.578125
3
[ "Apache-2.0" ]
permissive
DROP VIEW v_Employee CASCADE; CREATE OR REPLACE VIEW v_Employee AS SELECT innerRel.x1 AS att1 FROM ( SELECT ca_0.individual AS x1 FROM concept_assertion ca_0 WHERE ca_0.concept=59 UNION SELECT ca_0.individual AS x1 FROM concept_assertion ca_0 WHERE ca_0.concept=39 UNION SELECT ca_0.individual AS x1 FROM concept_a...
true
59182f5963153d6b5a18b8f9978037de4a3373a4
SQL
jxxchallenger/spring-in-action-4-samples
/chapter_10/src/main/resources/schema.sql
UTF-8
409
2.6875
3
[]
no_license
CREATE TABLE spittle ( id BIGINT NOT NULL PRIMARY KEY AUTO_INCREMENT, message VARCHAR(140) NOT NULL, `time` TIMESTAMP NOT NULL, latitude DOUBLE, longitude DOUBLE ); CREATE TABLE spitter ( id IDENTITY, username VARCHAR(20) UNIQUE NOT NULL, password VARCHAR(20) NOT NULL, first_name VA...
true
ba2dcd1369b6031dfbdc73d4feb9d92889e9cc82
SQL
mengzhang6/hibernate-more2one-demo
/sql/hibernate_one2more.sql
UTF-8
1,790
3.546875
4
[]
no_license
/* Navicat MySQL Data Transfer Source Server : 127.0.0.1 Source Server Version : 50709 Source Host : localhost:3306 Source Database : hibernate_one2more Target Server Type : MYSQL Target Server Version : 50709 File Encoding : 65001 Date: 2017-02-22 21:44:48 */ SET FOREIGN_KEY_CHEC...
true
0a365a82a273aa5b2792e5fe070465f60e500404
SQL
raulmenezes/fruit-shop
/src/main/resources/scripts/config-mysql.sql
UTF-8
758
2.78125
3
[]
no_license
# Run local mysql, connect and run as root user # Create Database CREATE DATABASE fs_dev; CREATE DATABASE fs_prod; # Create database service accounts CREATE USER 'fs_dev_user'@'localhost' IDENTIFIED BY 'password'; CREATE USER 'fs_prod_user'@'localhost' IDENTIFIED BY 'password'; # Grant access to users GRANT SELECT O...
true
50b8427fda856f923e8745b2b5bad7f7db871d43
SQL
ericsonj/est4b1l1z4c1on
/fase3/LaiconDesktop_DERBY_TO_MYSQL/LaiconDesktop_Tables.sql
UTF-8
11,728
2.90625
3
[]
no_license
CREATE TABLE desktop_version ( version INT ); CREATE TABLE configuration( code VARCHAR(250), value VARCHAR(255), PRIMARY KEY(code) ); CREATE TABLE element( id INT, model VARCHAR(150), serial VARCHAR(250), quantity DOUBLE, millicom_code VARCHAR(250), ...
true
8f0af35871e69543b2c54f191b19fa38f9b88ca3
SQL
jakoballen/CS260
/Labs/lab03.sql
UTF-8
1,178
3.859375
4
[]
no_license
--a SELECT C_NAME, C_TYPE FROM Creature; --b SELECT C_NAME FROM Creature WHERE C_TYPE != 'Person'; --c SELECT * FROM TOWN WHERE T_ID BETWEEN 'b' AND 'g'; --d SELECT C_ID, S_DESC FROM ACHIEVEMENT JOIN SKILL ON (SKILL.S_CODE = ACHIEVEMENT.S_CODE); --e SELECT C_NAME, S_DESC, SCORE FROM ACHIEVEMENT JOIN SKILL...
true
e60a046713b83b164b1376d895f946de848ec193
SQL
ststeiger/Loggy
/Loggy/closure/multi_parent_example/ListRootNodes.sql
UTF-8
151
3.125
3
[]
no_license
SELECT COM_Id ,COM_Text FROM T_Comments WHERE COM_Id NOT IN ( SELECT descendant FROM T_Comments_Closure WHERE ancestor <> descendant )
true
73b726cbb4161072cc1547eb0d01d9a329fa4bb7
SQL
silence-do-good/stress-test-Postgres-and-MySQL
/dump/low/day12/select0553.sql
UTF-8
178
2.640625
3
[]
no_license
SELECT timeStamp, temperature FROM ThermometerOBSERVATION o WHERE timestamp>'2017-11-11T05:53:00Z' AND timestamp<'2017-11-12T05:53:00Z' AND temperature>=14 AND temperature<=36
true
729e0fb98dcacc45eaa77b3b1c4cffb0f43999bd
SQL
loloangela/rev-demo
/Week2/acdc.sql
UTF-8
496
3.25
3
[]
no_license
select name from track where trackid in (select trackid from playlisttrack where playlistid in (select playlistid from playlisttrack where trackid in (select trackid from track where albumid in (select albumid from album where artistid = (select artistid from artist where name = 'AC/DC') ) ) ...
true
d054b7d739bfb279b41f53d096c435b0d4b4b6c5
SQL
hoandang/todo-backbone
/backend/schema.sql
UTF-8
478
3.078125
3
[]
no_license
DROP DATABASE todo; CREATE DATABASE IF NOT EXISTS todo; USE todo; CREATE TABLE IF NOT EXISTS tasks ( id INTEGER NOT NULL AUTO_INCREMENT, title VARCHAR(255) NULL, priority INTEGER NULL, PRIMARY KEY (id) ); INSERT INTO tasks (title, priority) VALUES ('Go to the store', 1); INSERT INTO tasks (title, p...
true
dbfe49a52108880d7909b10ae6cc4e12896fe80a
SQL
cckmit/xinfu
/ccms/WebContent/WEB-INF/action/project/fitness/class/private/ptrestdelay/excel/query-base.sql
UTF-8
1,428
4.1875
4
[]
no_license
select concat('<input type="radio" name="ptrestradio" value="', pr.code,'" ') as ptrestradio, cust.name, cust.mobile, p.ptlevelname, (case when pr.pttype=1 then '新买课' when pr.pttype=2 then '场地开发' when pr.pttype=3 then '续课' when pr.pttype=4 then '转课' when pr.pttype=5 then '赠课' end) as pttype,--来源:1新买课、2...
true
6ecf693fb117b18e963c62e6030710a3cbb8e5ac
SQL
aashibhatia/sql-
/movierating.sql
UTF-8
4,389
3.640625
4
[]
no_license
# sql- stanford social-network sql command /* Delete the tables if they already exist */ drop table if exists Highschooler; drop table if exists Friend; drop table if exists Likes; /* Create the schema for our tables */ create table Highschooler(ID int, name text, grade int); create table Friend(ID1 int, ID2 int); cr...
true
ac1e02cd44a7e5314e2a72937d2b2b7825cedadf
SQL
greatschism/quizzy
/schema/R0.10/br-253.sql
UTF-8
1,302
3.171875
3
[]
no_license
-- -- Table structure for table `subscription` -- DROP TABLE IF EXISTS `subscription`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `subscription` ( `id` int(11) NOT NULL AUTO_INCREMENT, `name` varchar(128) CHARACTER SET utf8 DEFAULT NULL,...
true
b7bc907d801e5e036bc972ed046dc1ba6c2eb7da
SQL
nguyenhuuthinhvnpl/INFO_6210
/Project/Jobs_DB_Project/SQL/GB_Female_Players.sql
UTF-8
1,589
2.859375
3
[ "MIT" ]
permissive
-- phpMyAdmin SQL Dump -- version 4.0.3 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: Apr 07, 2015 at 09:42 PM -- Server version: 5.5.41-0ubuntu0.14.04.1 -- PHP Version: 5.5.9-1ubuntu4.6 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=...
true
d03a3f74c821685c2420f741af801b3206cf0fb5
SQL
silence-do-good/stress-test-Postgres-and-MySQL
/dump/low/day19/select1457.sql
UTF-8
264
2.796875
3
[]
no_license
SELECT sen.name FROM SENSOR sen, SENSOR_TYPE st, COVERAGE_INFRASTRUCTURE ci WHERE sen.SENSOR_TYPE_ID=st.id AND st.name='WiFiAP' AND sen.id=ci.SENSOR_ID AND ci.INFRASTRUCTURE_ID=ANY(array['4008','3068','3211','6028','3089','4100_7','2051','5224','4072','6132'])
true
ebc0595204dd7a0bf90f5f9eca4d1d101d86bdd5
SQL
iJasonCui/big_database
/MySQL/sproc/Accounting/wsp_getFirstPurchaseByUserId.mysql
UTF-8
894
3
3
[]
no_license
DELIMITER ;; DROP PROCEDURE IF EXISTS wsp_getFirstPurchaseByUserId; CREATE DEFINER='root'@'10.10.26.21' PROCEDURE wsp_getFirstPurchaseByUserId ( /****************************************************************************** ** ** CREATION: ** Author: Yan L ** Date: Oct 3 2008 ** Description: Get...
true
47f711a7e012d9fe7822953664a2d0ce2b498dc9
SQL
prateek-karanpuria/krish-training
/ref/m2-ee-to-ce-SQLs/cms/widget_instance_page.sql
UTF-8
2,060
2.90625
3
[]
no_license
SET GLOBAL FOREIGN_KEY_CHECKS=0; INSERT INTO m231_studentkare.widget_instance_page ( m231_studentkare.widget_instance_page.page_id, m231_studentkare.widget_instance_page.instance_id, m231_studentkare.widget_instance_page.page_group, m231_studentkare.widget_instance_page.layout_handle, m231_studentkare.widget_instance_...
true
037618111a55471b3514c9b6a4ddb84354347e72
SQL
nWidart/bdo-loot-tracker
/item/src/main/resources/liquibase/changelog-001-create-items-table.sql
UTF-8
322
2.828125
3
[]
no_license
--liquibase formatted sql --changeset admin:changelog-001-create-items-table logicalFilePath:changelog-001-create-items-table.sql failOnError:true CREATE TABLE IF NOT EXISTS items ( id INT PRIMARY KEY AUTO_INCREMENT, name VARCHAR(128) NOT NULL, is_taxable BOOLEAN NOT NULL DEFAULT FALSE ...
true
5bebeca8c5797b2485ac9912bd1876c3e7d78467
SQL
voidking/yii-basic
/basic.sql
UTF-8
829
2.734375
3
[ "BSD-3-Clause" ]
permissive
/* Navicat MySQL Data Transfer Source Server : 阿里云 Source Server Version : 50635 Source Host : 120.77.36.182:3306 Source Database : basic Target Server Type : MYSQL Target Server Version : 50635 File Encoding : 65001 Date: 2017-09-03 12:38:57 */ SET FOREIGN_KEY_CHECKS=0; -- -----...
true
5f9d2278ac6055d0a470c83d75675f0520665a48
SQL
spirithoula/12_employeetracker
/sql/seed.sql
UTF-8
1,434
3.03125
3
[]
no_license
USE employeesDB; INSERT INTO department (name) VALUES ("Sales"); INSERT INTO department (name) VALUES ("Engineering"); INSERT INTO department (name) VALUES ("Finance"); INSERT INTO department (name) VALUES ("Legal"); INSERT INTO role (title, salary, department_id) VALUES ("Sales Lead", 100000, 1); INSERT INTO role (t...
true
2b53ad0d3d49b9db5d910c33ca09578554d1902a
SQL
clumsy/Civ5-MP_MODSPACK
/Mods/Nation - Flemish/vanillaComp.sql
UTF-8
797
2.578125
3
[]
no_license
-- cross-compatibility for vanilla -- provided it did not crash, it's vanilla and we're good to go with everything! -- buildings UPDATE Buildings SET Culture = 1 WHERE TYPE = 'BUILDING_FLEMISH_PALACE'; UPDATE Buildings SET Culture = 2, Defense = 300 WHERE TYPE = 'BUILDING_BELFORT'; INSERT INTO Buildi...
true