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
1f9a900972903687fdffea27a867fc3da70c232a
SQL
Aisthetic/WakBox
/sql/wakbox_world.sql
UTF-8
1,840
2.890625
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 3.5.1 -- http://www.phpmyadmin.net -- -- Client: localhost -- Généré le: Lun 30 Décembre 2013 à 11:08 -- Version du serveur: 5.5.24-log -- Version de PHP: 5.4.3 SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLI...
true
8366ca1c2cee840343e1099ad7f131a9f02aaed6
SQL
ulaireatea/MySQL
/aula11.sql
UTF-8
654
3.25
3
[ "MIT" ]
permissive
select * from cursos order by nome desc; select nome, carga, ano from cursos order by ano, nome; select * from cursos where idcurso = '2'; select nome, descricao, ano from cursos where ano <= '2015' order by ano, nome; select * from cursos where ano <> '2016' order by ano, nome; select * from cursos where ano != '...
true
5aeaff2f9cf8dc31a0158d666770bacf780f0c06
SQL
Michida-Yusei/EmpManage
/sample_tables.sql
UTF-8
5,198
3.65625
4
[]
no_license
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; /*!40101 SET NAMES utf8 */; /*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; /*!40103 SET TIME_ZONE='+00:00' */; /*!400...
true
8c41d7efd8eabafde6cb9dfa7ab0129b2d360607
SQL
jemoliveira/pizza
/pizza/src/main/tomcat/conf/sql/item.sql
UTF-8
1,479
3.203125
3
[]
no_license
-- -- PostgreSQL database dump -- SET statement_timeout = 0; SET lock_timeout = 0; SET client_encoding = 'UTF8'; SET standard_conforming_strings = on; SET check_function_bodies = false; SET client_min_messages = warning; SET search_path = public, pg_catalog; SET default_tablespace = ''; SET default_w...
true
ddaffa0078968fee8489977c47adf858320942d3
SQL
edivancastro/zf3dashboard
/dump.sql
UTF-8
1,768
2.90625
3
[]
no_license
insert into recurso(id,nome) values(1,'Perfil de acesso'); insert into recurso(id,nome) values(2,'Usuario'); insert into recurso(id,nome) values(3,'Mensagem'); insert into recurso(id,nome) values(4,'Configuração'); insert into recurso(id,nome) values(5,'Conteúdo'); insert into role(id,descricao,excluido,root) v...
true
3f880b1b5c687d141c6ad47498ff2342ce1acf39
SQL
yahehe/Swag
/swag_db.sql
UTF-8
3,136
3.046875
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.4.15.8 -- https://www.phpmyadmin.net -- -- Host: sql462.your-server.de -- Erstellungszeit: 02. Feb 2017 um 10:34 -- Server-Version: 5.6.35-1 -- PHP-Version: 5.3.10-1ubuntu3.25 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=...
true
3e1ad69c25ee5ffc5c0d78c107de1e6314893e30
SQL
gitcup/dreamproject-university-2
/database/dreamproject.sql
UTF-8
21,926
2.734375
3
[ "MIT" ]
permissive
-- phpMyAdmin SQL Dump -- version 4.8.5 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Apr 17, 2019 at 03:49 PM -- Server version: 10.1.38-MariaDB -- PHP Version: 7.1.27 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OL...
true
57162124e2e31eee7db4340e78486572ca584d60
SQL
youngsinatra189/DatabaseAppDev
/Procedures.sql
UTF-8
19,778
3.53125
4
[]
no_license
/* File: checkOptionsProcedure.sql Author: Roshan Sahu Oracle Username: s6_sahuro Description: A procedure that used to compliement inquireCarProcedure and returns a cursor with a cars options*/ CREATE OR REPLACE PROCEDURE getOptions ( -- Passing in the car serial pl_carser...
true
13501e2558a43cf022b3a366424a28b5dd46316a
SQL
EzeBik2/SSN
/RSF/RSF/App_Data/dbrsf.sql
UTF-8
4,648
3.171875
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 3.5.1 -- http://www.phpmyadmin.net -- -- Servidor: localhost -- Tiempo de generación: 04-08-2017 a las 06:48:01 -- Versión del servidor: 5.5.24-log -- Versión de PHP: 5.4.3 SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARA...
true
099021e5f92754aa230fa1596d69976b0e8e8f87
SQL
RaisaGregor/tests
/8.sql
UTF-8
3,076
3.421875
3
[]
no_license
create table analytical_funcs_first_tbl( LINE_NUM number ,NUM1 number ,NUM2 number ,NUM3 number ,CONSTRAINT check_num1 CHECK (NUM1 BETWEEN 1 and 100) ,CONSTRAINT check_num2 CHECK (NUM1 BETWEEN 1 and 100) ,CONSTRAINT check_num3 CHECK (NUM1 BETWEEN 1 and 100) ); create or replace PACKAGE BODY analy...
true
093e8b702eecfac1900aada424bda3094922fb1e
SQL
linweili0615/new-activity
/deploy.sql
UTF-8
2,545
2.875
3
[]
no_license
/* Navicat MySQL Data Transfer Source Server : 10.100.99.164 Source Server Version : 50557 Source Host : 10.100.99.164:3306 Source Database : deploy Target Server Type : MYSQL Target Server Version : 50557 File Encoding : 65001 Date: 2019-02-14 18:15:32 */ SET FOREIGN_KEY_CHECKS=0...
true
0368dc3b8b910a7db6c9cd6ec14ea9c063fd7c11
SQL
omarjcm/ssp
/codigo/versiones/v4.7.1.1/procedures/ssp_insertar_descripcion.sql
UTF-8
231
2.546875
3
[]
no_license
DELIMITER $$ DROP PROCEDURE IF EXISTS `ssp`.`ssp_insertar_descripcion` $$ CREATE PROCEDURE `ssp`.`ssp_insertar_descripcion` (nombre VARCHAR(50)) BEGIN INSERT INTO descripcion(descripcion) VALUES(nombre); END $$ DELIMITER ;
true
3d3573fa2ecb994ceaf62171f3b4463a7f3797d7
SQL
salahaldin/bf93d755397838810dc5f9355c1d4657
/ch_09/get_table_without_primary_key.sql
UTF-8
367
4.09375
4
[]
no_license
SELECT table_catalog, table_schema, table_name FROM information_schema.tables WHERE table_schema NOT IN ('information_schema','pg_catalog') EXCEPT SELECT table_catalog, table_schema, table_name FROM information_schema.table_constraints WHERE constraint_type IN ('PRIMARY KEY', 'UNIQUE') AND table_sche...
true
8fd71b7b4e2e8df163c9970b2257c8ea3d0f0fe1
SQL
JessaMineCena/TaskToolWebApp
/Database/dbtask.sql
UTF-8
3,989
3.3125
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.5.1 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: Feb 18, 2020 at 10:09 AM -- Server version: 10.1.16-MariaDB -- PHP Version: 7.0.9 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLI...
true
2b235c2925c97fe4d43fad691064386d0d03bb8a
SQL
JoseGarPe/Lesa_Dev
/bdd/facturas.sql
UTF-8
2,744
3.765625
4
[]
no_license
SELECT enc.date_invoice as fecha, enc.number as factura, enc.company_id, enc.origin as pedido, enc.state, enc.doc_type, enc.vendor_display_name as nombre_clie, paci.name as paciente, vende.name as vendedor, alm.name as almacen, alm.id as id_almacen, ...
true
4d720777df0030442ddc2800540fd0e30b66206e
SQL
gasolano/Portafolio_titulo
/Scripts BD/Script_Creacion_Nomasac.sql
ISO-8859-10
12,785
3.0625
3
[]
no_license
CREATE TABLE accidente ( id_accidente INTEGER NOT NULL, id_servicio INTEGER NOT NULL, rut VARCHAR2(10) NOT NULL, rut_accidentado VARCHAR2(10) NOT NULL, nombre_accidentado VARCHAR2(50), apellidop_accidentado VARCHAR2(50) NOT NULL, ap...
true
ba6b1661dd0c951ef18c4272f80ff7f637baa00a
SQL
pbs-software/pbs-tools
/PBStools/inst/sql/gfc_fcatORF.sql
UTF-8
2,448
3.734375
4
[ "LicenseRef-scancode-warranty-disclaimer" ]
no_license
-- Query GFCatch landings for rockfish reconstruction. -- Last modified: 2014-10-15 SET NOCOUNT ON -- prevents timeout errors -- Create a temporary table with species catch and total catch SELECT CC.Trip, CC.Event, Sum(CASE WHEN CC.Species IN (@sppcode) AND CC.Utilization NOT IN (4,6) THE...
true
08d83938f395b95cf6f55fb047eaa8fdc6f87af3
SQL
pussbb/Kohana-my-base
/sql/languages.sql
UTF-8
438
3.15625
3
[]
no_license
CREATE TABLE IF NOT EXISTS `languages` ( `id` int(11) NOT NULL AUTO_INCREMENT, `code` varchar(3) CHARACTER SET latin1 NOT NULL, `locale` varchar(5) CHARACTER SET latin1 NOT NULL, `name` varchar(200) CHARACTER SET utf8 NOT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; INS...
true
80b67285ba7c97b3cfa9a11788c3f1ee67032f79
SQL
Muchen-W/cs61a-16fall
/lab/lab13/lab13.sql
UTF-8
2,193
4.34375
4
[]
no_license
.read data.sql -- Q1 create table flight_costs as with flight_cost(curr_day, curr_price, prev_price) as ( select 1, 20, 0 union select 2, 30, 20 union select 3, 40, 30 union select curr_day + 1, (prev_price + curr_price) / 2 + 5 * ((curr_day + 1) % 7), curr_price from flight_cost where curr_day > 2 ...
true
632a38359bbb989020c776133170cc5b6787203d
SQL
dan-goldberg/theDoc
/theDoc/database/sql/anal_pitcher counting stats only table create.sql
UTF-8
41,758
3.28125
3
[]
no_license
SET @analdate := '2016-07-07' ; DROP TABLE IF EXISTS anal_pitcher_counting_p; CREATE TABLE anal_pitcher_counting_p AS SELECT @analdate + interval '1' day as anal_game_date, a.pitcher, player.pname, ########### STD ############ -- COUNTING STATS @gp := COUNT(DISTINCT CASE WHEN @logic_std := (YEAR(@analdate) = Y...
true
82bbf8d826aaad258f52925d8dc02829e4bcc76f
SQL
freitmi/queries-vldb2020
/job/queries_nofilter/26.sql
UTF-8
877
3.1875
3
[]
no_license
SELECT count(*) AS cnt FROM complete_cast AS cc, comp_cast_type AS cct1, comp_cast_type AS cct2, char_name AS chn, cast_info AS ci, info_type AS it2, keyword AS k, kind_type AS kt, movie_info_idx AS mi_idx, movie_keyword AS mk, name ...
true
d3bc72d6f796096068fa8af297ecaec36be0433f
SQL
Erick-Rdz/proyectoHRAE
/db/script.sql
UTF-8
5,584
3.140625
3
[ "MIT" ]
permissive
-- phpMyAdmin SQL Dump -- version 4.9.0.1 -- https://www.phpmyadmin.net/ -- -- Servidor: 127.0.0.1 -- Tiempo de generación: 28-10-2020 a las 19:29:12 -- Versión del servidor: 10.4.6-MariaDB -- Versión de PHP: 7.3.9 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00";...
true
da6534a0527392545940660e616b27305c171f2f
SQL
ajloria/huskyhotel
/loria_andrew_Queries.sql
UTF-8
722
3.765625
4
[]
no_license
SELECT FirstName, LastName FROM Guest JOIN Reservation ON Guest.GuestID = Reservation.GuestID JOIN Room ON Reservation.RoomID = Room.RoomID WHERE Room.RoomType = 'Executive'; SELECT FirstName, LastName FROM Guest JOIN Reservation ON Guest.GuestID = Reservation.GuestID WHERE Reservation.RoomID IN (100, 104); SELECT ...
true
4946b410183aa33a0ab49627699b70e5d726c125
SQL
bj-/Scripts
/SQL/MS SQL/Systech/MGT Stat/Time_stat_of_user_sensor__.sql
WINDOWS-1251
2,641
3.578125
4
[]
no_license
set nocount on; --use Shturman_Metro SELECT REPLACE (MetroLines.Name, ' ', '') '' , SessionsTime.dt '', Persons.LastName+' '+SUBSTRING(Persons.FirstName, 1,1)+'. '+SUBSTRING(Persons.MiddleName, 1, 1) + '.' '', format(dateadd ( SECOND,SessionsTime.sec,''),'HH:mm:ss') ' , ', -- format(dateadd ( SEC...
true
a0d657b47004af93272b4dd8dfe988035dc5fec8
SQL
sanjeevkse/jet_mobile_app_front
/img/db_logistics.sql
UTF-8
5,708
3.203125
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.8.5 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Mar 25, 2020 at 02:35 PM -- Server version: 10.1.38-MariaDB -- PHP Version: 7.3.3 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD...
true
788246ea183ff72c7877821d2a4113943c3d741a
SQL
appleluong1905/php06
/php/sessions6/mvc/php06.sql
UTF-8
2,988
3.140625
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.0.10deb1 -- http://www.phpmyadmin.net -- -- Host: localhost -- Generation Time: Apr 25, 2017 at 10:16 AM -- Server version: 5.5.54-0ubuntu0.14.04.1 -- PHP Version: 5.6.30-10+deb.sury.org~trusty+2 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_C...
true
5d4f19b4f5a34654ea8e8ec4e1b3c8424d0eb74a
SQL
YmacStudio/IGRP-Framework
/IGRP/WebContent/WEB-INF/config/db/h2.sql
UTF-8
10,023
3.140625
3
[]
no_license
------------------------------------------------------------- -- DDL Igrp for H2 DataBase (Begin) ------------------------------------------------------------- CREATE TABLE IF NOT EXISTS `glb_t_user` ( `ID` int(11) NOT NULL AUTO_INCREMENT, `NAME` varchar(100) NOT NULL, `EMAIL` varchar(80) N...
true
68d9150e146a0c67b9a8418aa8e31187dc81a534
SQL
Shirleyxxy/lc-sql-database
/consecutive-numbers.SQL
UTF-8
176
3.40625
3
[]
no_license
-- Self Join SELECT DISTINCT l1.Num AS ConsecutiveNums FROM Logs l1, Logs l2, Logs l3 WHERE l1.Id = l2.Id - 1 AND l2.Id = l3.Id - 1 AND l1.Num = l2.Num AND l2.Num = l3.Num
true
1aea07d0d1035167ad8deb70e92e8af3218c9f12
SQL
matheussampaio/sig
/consultas/consulta05.sql
UTF-8
410
3.390625
3
[ "MIT" ]
permissive
/*5- Encontrar todos os municípios que estejam a menos de 50km de Campina Grande.*/ SELECT cidade FROM (SELECT cidade_b.nome_munic AS cidade, ST_Contains((ST_Buffer(ST_Transform(cidade_a.geom,29195), 50000)),(ST_Transform(ST_Centroid(cidade_b.geom),29195))) AS contains FROM sig.municipios cidade_a, sig.municipios cid...
true
81197c3c498d2269a55b87ffa4c2f29ed711db5a
SQL
sesp13/Bases-De-Datos-2-2021-1
/trabajo 4/inserts/punto1/caso3.sql
UTF-8
907
3.671875
4
[]
no_license
--70.000 clientes --100.000 facturas --150.000 detalles --- Crear clientes BEGIN FOR i IN 1..70000 LOOP INSERT INTO cliente VALUES ( i, DBMS_RANDOM.STRING('L',TRUNC(DBMS_RANDOM.VALUE(1,101))), TRUNC(DBMS_RANDOM.value(1,100000000000000000000)) ); END LOOP; commit; END; / --Crear facturas BEGIN FO...
true
bad50d0509fa73a95b5a16522e55d0b3e23a9eba
SQL
diogocapela/isep-bddad
/pl05/script.sql
UTF-8
8,690
3.5625
4
[ "MIT" ]
permissive
--eliminar tabelas (eventualmente) existentes DROP TABLE marinheiros CASCADE CONSTRAINTS PURGE; DROP TABLE barcos CASCADE CONSTRAINTS PURGE; DROP TABLE reservas CASCADE CONSTRAINTS PURGE; --criar tabelas CREATE TABLE marinheiros( id_marinheiro INTEGER CONSTRAINT pk_marinheiros_id_marinheiro PRIMARY K...
true
b9e06b81e557b838552c0d05e53af3929cb5526d
SQL
nishantjangid/portfolio
/portfolio.sql
UTF-8
3,210
3.3125
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.8.5 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Nov 12, 2019 at 02:37 PM -- Server version: 10.1.38-MariaDB -- PHP Version: 7.3.2 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD...
true
c8e429e90767fb577c89c34665ffe4affdee20ae
SQL
pgpartman/pg_partman
/test/test_native/test_nonsuperuser/test-nonsuperuser-part1.sql
UTF-8
930
2.8125
3
[ "PostgreSQL" ]
permissive
-- ########## TIME HOURLY TESTS ########## -- Additional tests: Testing nonsuperuser -- NOTE: THIS FILE MUST BE RUN AS A SUPERUSER \set ON_ERROR_ROLLBACK 1 \set ON_ERROR_STOP true SELECT set_config('search_path','partman, public',false); SELECT plan(1); CREATE SCHEMA partman_test; CREATE ROLE partman_basic WITH LO...
true
e02e850f4b87302c4a1ddcf57b07a7ce588ddbcb
SQL
wonbae/Algorithm
/Hackerrank/SQL/Top_Competitors.sql
UTF-8
361
3.75
4
[]
no_license
select h.hacker_id, h.name from submissions as s join hackers as h on h.hacker_id = s.hacker_id join challenges as c on c.challenge_id = s.challenge_id join difficulty as d on d.difficulty_level = c.difficulty_level where s.score = d.score group by h.hacker_id, h.name having count(*) > 1 order...
true
c0bc4646fc1a82c9d4ed7e203aeb7692f8b1470e
SQL
browserplus/borg
/data/sql/chat.sql
UTF-8
379
3.03125
3
[]
no_license
CREATE TABLE IF NOT EXISTS `chat` ( `id` int(11) NOT NULL AUTO_INCREMENT, `stamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, `utterance` text, `who` varchar(32) DEFAULT NULL, PRIMARY KEY (`id`), KEY `chat_stamp` (`stamp`), KEY `chat_who` (`who`), FULLTEXT KEY `chat_utteran...
true
c47248013fef2df0f1a320d06a2463a62993b6ef
SQL
CokeSebas/socimaWeb
/admin/base5builder_circloid_settings/update_circloid_settings.sql
UTF-8
442
2.875
3
[]
no_license
CREATE TABLE IF NOT EXISTS `oc_circloid_settings` ( `id` int(4) NOT NULL AUTO_INCREMENT, `name` varchar(70) NOT NULL, `value` varchar(255) NOT NULL, PRIMARY KEY (`id`), UNIQUE KEY `name` (`name`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1000 ; INSERT INTO `oc_circloid_settings` (`id`, `name`, `va...
true
428471ccaece43a3548639d1b7c97ceed3ebf681
SQL
ShrutiPatil-dev/ProjGroceryStore
/ProjGroceryStore/SQLQuery2.sql
UTF-8
506
2.9375
3
[]
no_license
insert into Login (Uid,Name,SurName,Address,City,Pincode,Mobile,Password,Email,Gender,EntryDate) values(@Uid,@Name,@SurName,@Address,@City,@Pincode,@Mobile,@Password,@Email,@Gender,GETDATE()) select * from Login; create TABLE AdminMst ( IID INT IDENTITY(1,1) PRIMARY KEY, Username nvarchar(50), Password nvarchar(50) ...
true
35a23e2bdf42ea7d1bab84ad55a5acbf9b4b647f
SQL
juhye963/arduino-1.0
/database.sql
UTF-8
505
2.96875
3
[]
no_license
drop database if exists arduino; create database arduino default character set= utf8 collate utf8_general_ci ; DROP USER IF EXISTS sample@localhost; create user sample@localhost identified by 'password'; grant all privileges on arduino.* to 'sample'@'localhost'; use arduino; create table data_tb( id int primary key...
true
2549afda665292360efa25ba9ced99af429f21d1
SQL
toomore/Pensieve
/MariaDB/db_toomoretest.sql
UTF-8
2,689
2.828125
3
[]
no_license
-- MySQL dump 10.15 Distrib 10.0.14-MariaDB, for debian-linux-gnu (x86_64) -- -- Host: localhost Database: toomoretest -- ------------------------------------------------------ -- Server version 10.0.14-MariaDB-1~precise-log /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARAC...
true
a22d8df5bd68928e907c66e11d6098e627e5333e
SQL
PnX-SI/Ressources-techniques
/GeoNature/PNX/process/pag/data/taxonomie.sql
UTF-8
1,972
3.75
4
[]
no_license
--IMPORT FOREIGN SCHEMA taxonomie FROM SERVER geonature1server INTO v1_compat; -- que faire des taxons -- 441839;"Évêque bleu-noir ";"Cyanocompsa cyanoides" -- 765714;"";"Combretum laxum" -- donnés par la commande: -- -- select DISTINCT t1.cd_nom FROM v1_compat.syntheseff s -- join v1_compat.taxref t1 -- ON t1.cd_nom ...
true
eb28fd237c09500ea58f075c987b41b6817edba8
SQL
KishanMaurya/Product-Gallery-for-Shopping-Cart
/tbl_products.sql
UTF-8
1,428
3.3125
3
[]
no_license
-- -- Table structure for table `tbl_products` -- CREATE TABLE `tbl_products` ( `id` int(8) NOT NULL, `name` varchar(255) NOT NULL, `price` double(10,2) NOT NULL, `category` varchar(255) NOT NULL, `product_image` text NOT NULL, `average_rating` float(3,1) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -...
true
5f2b81ce49155a4a7b205d804b4d7e8c1f3cfcfc
SQL
dtaipov/crm495
/db/sql/contractors/list.sql
UTF-8
513
4
4
[]
no_license
select c.id, c.name, c.creation, c.description, cg.name contractor_group_name, cc_address.value contact_address, cc_phone.value contact_phone from contractor_group cg, contractor c left join contractor_contact cc_address on c.id = cc_address.contractor_id and cc_address.contact_type = 'ADD...
true
fa1e500f7e7e658763b9186c1c0f09e6ea7034c0
SQL
PNNL-Comp-Mass-Spec/DBSchema_PgSQL_DMS
/dms/t_mts_cached_data_status.sql
UTF-8
1,126
3.109375
3
[ "Apache-2.0" ]
permissive
-- -- Name: t_mts_cached_data_status; Type: TABLE; Schema: public; Owner: d3l243 -- CREATE TABLE public.t_mts_cached_data_status ( table_name public.citext NOT NULL, refresh_count integer DEFAULT 0 NOT NULL, insert_count integer DEFAULT 0 NOT NULL, update_count integer DEFAULT 0 NOT NULL, ...
true
99893858aecf03c978fab6fe753982bfa00bdb61
SQL
AgentCyrusJr/CS143
/Project-1/Part-B/create.sql
UTF-8
2,627
4.0625
4
[]
no_license
# Create all the tables related CREATE TABLE Movie( id INT, title VARCHAR(100) Not NULL, year INT, rating VARCHAR(10), company VARCHAR(50), PRIMARY KEY(id), CHECK(year>0)) ENGINE=INNODB; # we set id as primary key and set a constraint that the movie year should la...
true
b0d45c1eba9214852750bd463e07c3f98a2fec51
SQL
edupalermo/camelApproach
/src/main/resources/db/database.sql
UTF-8
1,617
3.609375
4
[]
no_license
DROP TABLE PROPERTY; DROP TABLE GRADE; DROP TABLE CIRCUIT; DROP TABLE SUITE; DROP TABLE PROBLEM; CREATE TABLE PROBLEM ( PROBLEM_ID INTEGER NOT NULL GENERATED ALWAYS AS IDENTITY (START WITH 1, INCREMENT BY 1), NAME varchar(255) NOT NULL, USE_MEMORY INTEGER NOT NULL, CREATED TIMESTAMP NOT NULL, CONSTRAINT PROBLEM_P...
true
0639fe156dfdac32c99cf236222658670b50bc26
SQL
ramaardanaa/Test
/SQL/1.sql
UTF-8
245
3.5
4
[]
no_license
select date as day, COUNT(CASE WHEN score > 0 THEN score ELSE null END) as num_pos_scores, COUNT(CASE WHEN score < 0 THEN score ELSE null END) as num_neg_scores from assessments WHERE date BETWEEN '2011-03-01' AND '2011-04-30' group by date
true
8f1c9c966abc9bee1c54105ba5c2bb47a62f593b
SQL
JamesSolum/DatabaseProject5
/populatesmall.sql
UTF-8
2,053
3.46875
3
[]
no_license
/* Insert some tuples into our database. This data is not necessarily real, but it reflects data that is possible */ -- job -- INSERT INTO job (role, salary, industry) VALUES ('software engineer', '90000', 'technology'), ('professor', '70000', 'education'), ('intern', '30000', 'information technology'), ('videographe...
true
fb38190cfd00d3ed675e0ee22c9298a6fbd01794
SQL
ba-ace/ACDW_CLMS_OKC
/ACDW_CLMS_OKC/adw/Views/z_vw_Mbr_Assigned_TIN_NPI_1.sql
UTF-8
2,011
3.078125
3
[]
no_license
CREATE VIEW adw.[z_vw_Mbr_Assigned_TIN_NPI] AS --if pcp exist use it , if there are multiple pcp then use max npi --if pcp doesn't exist use blank, if multiple blank then use max npi --if pcp doesn't exist and blank doesn't exist then use specialist, if multiple specialist then use max npi SELEC...
true
da8e1a276af53d979a21a40657e725f360485306
SQL
festewart/quality-measure-and-cohort-service
/cohort-engine/src/test/resources/cql/fhir-measure/test-adult-males.cql
UTF-8
2,263
3.171875
3
[ "Apache-2.0" ]
permissive
library "TestAdultMales" version '1.0.0' using "FHIR" version '4.0.0' include "FHIRHelpers" version '4.0.0' include "TestAdultMales2" version '1.0.0' include "TestAdultMales3" version '1.0.0' codesystem "MaritalStatus": 'http://terminology.hl7.org/CodeSystem/v3-MaritalStatus' code "Married": 'M' from "MaritalStatus"...
true
7d712b43c39572110cfe8c7f90486207fdfa39ee
SQL
thiagofigcosta/databases
/bank/bank.sql
UTF-8
1,421
3.5
4
[]
no_license
CREATE TABLE Agencias( "codag" INT PRIMARY KEY, "nome" VARCHAR(30) NOT NULL ); CREATE TABLE Clientes( "oid" INT PRIMARY KEY, "nome" VARCHAR(30) NOT NULL, "endereco" VARCHAR(30), "cidade" VARCHAR(30) ); CREATE TABLE TelefoneClientes( "numero_telefone" VARCHAR(15) PRIMARY KEY, "id_cliente" INT NOT NULL ); CREA...
true
901167f42ebaaddb55ed56ab052d0b92d4603155
SQL
rusrus27rus/School-SQL-Pl-SQL
/210625_Проект Курсовой работы Гуенко РЛ (v1.0).sql
UTF-8
4,807
3
3
[]
no_license
------------- ------------- ------------- Гуенко Руслан Леонидович ------------- ------------- СБЕР Цифровой мониторинг РЦКМ «Санкт Петербург» ------------- ------------- +7 (918) 5201326 -------...
true
2b1dd930940943ae6a3cc307686a008dbed3d975
SQL
americajones/burger-app
/db/schema.sql
UTF-8
234
2.640625
3
[]
no_license
DROP DATABASE IF EXISTS burg_db; CREATE DATABASE burg_db; USE burg_db; CREATE TABLE burgers ( id int NOT NULL AUTO_INCREMENT, name varchar(40) NOT NULL, eaten boolean DEFAULT false NOT NULL, PRIMARY KEY (id) );
true
9b369b2364a2ae4511709b1df633d183524dafb3
SQL
smfayaz15/SQL-Lab
/P3.sql
UTF-8
837
4.03125
4
[]
no_license
create table employee ( empid int, name char(40), age int, sex char(10), foreign key(empid) references employeedetails(empid) ); create table employeedetails ( empid int primary key, dname varchar(20), place char(20) ); insert into employee values (1,"Dev",19,"Male"), (2,"Steffan",21,"Female"), (3,"...
true
02ef513f3d6dc1c1efe066e9fae69b3b384b84c0
SQL
akzholio/pgexercises
/Aggregation/members1.sql
UTF-8
141
2.90625
3
[]
no_license
/* Find the total number of members (including guests) who have made at least one booking. */ SELECT COUNT(DISTINCT memid) FROM cd.bookings;
true
8cca76379962ac8a7a0525510bbd6f170c64c1dd
SQL
kenneth-hao/autohome_bbs_buick
/db/mysql.sql
UTF-8
535
2.765625
3
[]
no_license
DROP TABLE IF EXISTS autohome_bbs_content; CREATE TABLE autohome_bbs_content ( id int(32) NOT NULL AUTO_INCREMENT, title varchar(50) DEFAULT NULL, content text, pub_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, author varchar(50) DEFAULT NULL, author_url varchar(100) DEFAUL...
true
f7d2613281bc8a5653154eb1597208a31cf24a1b
SQL
sab0065/ToolsForDataAnalyticsAndModeling
/database/join_samples.sql
UTF-8
4,367
4.625
5
[]
no_license
# 1. artist names and album names - artist table + album table DESCRIBE artist; DESCRIBE album; SELECT artist_name, album_name FROM artist INNER JOIN album USING (artist_id); # 2. artists and tracks SELECT artist_name, track_name FROM artist INNER JOIN track USING (artist_id); # 3. artists and the number of track...
true
19d8336acecae00920dc0049798747130c963b84
SQL
aiemelyanov/RedGate
/TEST3/APEX_030200/Tables/WWV_MIG_OLB_T_TP_GGGG_CPDTXT.sql
UTF-8
1,098
2.734375
3
[]
no_license
CREATE TABLE apex_030200.wwv_mig_olb_t_tp_gggg_cpdtxt ( "ID" NUMBER NOT NULL, graphics_id NUMBER NOT NULL, security_group_id NUMBER NOT NULL, "NAME" VARCHAR2(4000 BYTE), subclasssubobject VARCHAR2(4000 BYTE), dirtyinfo VARCHAR2(4000 BYTE), select_for_app VARCHAR2(1 BYTE) DEFAULT 'N' NOT NULL CONSTR...
true
39e5d20fd810b46ccb68de251f459ff7da5ba339
SQL
Kwon-YoungSun/DataBase
/day11.sql
UHC
23,474
4.03125
4
[]
no_license
-- day11 /* for 1 ] FOR ̸ IN (Ǹ) LOOP ó ... END LOOP; ǹ ] پ ϴ óϵ Ѵ. ] FOR ɿ ̸ ʾƵ ȴ. ...
true
3727240b3f056b7ca559ee1179384bd2085015cd
SQL
savelee/gcp-node
/twitterstream-bq-pubsub/twitterscraper/bq/query-strings.sql
UTF-8
186
2.78125
3
[ "Apache-2.0", "LicenseRef-scancode-unknown-license-reference" ]
permissive
SELECT * FROM mydataset.mytable WHERE text LIKE '%term1%' AND text LIKE '%term2%' /* SELECT mytable.from, text, score FROM mydataset.mytable WHERE text like "%Trump%" and score > 0 */
true
c598ead2bf559fc6ea1f1acc5d83ad4db650f74c
SQL
timowlmtn/bigdataplatforms
/src/hl7/sql/ddl/STAGE/tables/hl7_handler_function_analysis.sql
UTF-8
545
3.03125
3
[ "CC-BY-3.0" ]
permissive
select * from information_schema.packages where language = 'python'; select current_role(); insert into stage.STOCKS_TABLE(symbol, QUANTITY, PRICE) values ('MultiPlan', 1, 5.43); insert into stage.STOCKS_TABLE(symbol, QUANTITY, PRICE) values ('MultiPlan', 2, 5.00); insert into stage.STOCKS_TABLE(symbol, QUANTITY, P...
true
351a2e28e20c5b4abfb0748a3369a606694a0cc5
SQL
silence-do-good/stress-test-Postgres-and-MySQL
/dump/low/day18/select2134.sql
UTF-8
264
2.890625
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['5026','5100_4','3209','2051','5058','5228','6048','5204','3231','3204'])
true
faa94fd3a511f252d9122974d23cc7e588b4beef
SQL
xplain/netzke-basepack
/test/rails_app/db/development_structure.sql
UTF-8
3,704
3.484375
3
[ "MIT" ]
permissive
CREATE TABLE `authors` ( `id` int(11) NOT NULL AUTO_INCREMENT, `first_name` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `last_name` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `created_at` datetime DEFAULT NULL, `updated_at` datetime DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB AUTO_INCREM...
true
d8dbf907aabfb96eb59d70e0f0ef4a2321ac4f6e
SQL
TdP-prove-finali/ViscontiDavide
/db/prova_finale.sql
UTF-8
5,031
3.125
3
[ "Apache-2.0" ]
permissive
-- -------------------------------------------------------- -- Host: 127.0.0.1 -- Versione server: 10.1.40-MariaDB - mariadb.org binary distribution -- S.O. server: Win64 -- HeidiSQL Versione: 10.1.0.5464 -- ------------------------------------------...
true
d23d69cd8da1b39d2f522f0780c85d37caa2af8c
SQL
ThaierAlkhateeb/advanced
/newcms.sql
UTF-8
8,100
2.84375
3
[ "BSD-3-Clause" ]
permissive
-- phpMyAdmin SQL Dump -- version 4.5.1 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: Jan 22, 2017 at 07:36 PM -- Server version: 10.1.10-MariaDB -- PHP Version: 7.0.4 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLI...
true
6a6a59a1512ff7f0a1b0d622097b96a99ce30c2e
SQL
leandro-ss/script_misc
/oracle_db/script_ora11g/qry_sga_advisor.sql
UTF-8
890
3.296875
3
[]
no_license
spool sga_advisor.log select 'SGA_DATE;INSTANCE;MB_SIZE;FACTOR;MIN_PHYS_READ;MAX_PHYS_READ' extraction from dual; select * from ( select trunc(snap.end_interval_time,'hh24'),sga.instance_number, trunc(max(sga.sga_size),2), sga.sga_size_factor, min(sga.estd_physical_reads), max(sga.estd_phys...
true
67586c60644201ff679392105c42696f85aff8e8
SQL
yohannadiaz/proyecto-ep03
/j_trivia.sql
UTF-8
2,341
3.296875
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 3.1.1 -- http://www.phpmyadmin.net -- -- Servidor: localhost -- Tiempo de generación: 26-11-2015 a las 09:05:41 -- Versión del servidor: 5.1.30 -- Versión de PHP: 5.2.8 SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 S...
true
389f9c18f6636f5bc40cf641764c412bc14b85a7
SQL
pzoli/cars
/sql/structure.sql
UTF-8
2,974
3.453125
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.9.5deb2 -- https://www.phpmyadmin.net/ -- -- Gép: localhost:3306 -- Létrehozás ideje: 2021. Okt 16. 17:22 -- Kiszolgáló verziója: 8.0.26-0ubuntu0.20.04.3 -- PHP verzió: 7.4.3 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /...
true
a7fd214f02dcec1161b05ec88e999030593f1873
SQL
MDrapala/Streaming
/sql/immo.sql
UTF-8
6,400
3.140625
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.7.7 -- https://www.phpmyadmin.net/ -- -- Hôte : localhost -- Généré le : jeu. 05 avr. 2018 à 08:56 -- Version du serveur : 5.7.21 -- Version de PHP : 7.1.7 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD...
true
75e170a863c4df3e98ed0d4c8015a17be6f3c457
SQL
FredyKcrez/BBDD
/plSQL/20180919_SELECT...INTO.sql
UTF-8
281
3.015625
3
[ "Apache-2.0" ]
permissive
SET SERVEROUTPUT ON; DECLARE cantidad NUMBER; usuario NVARCHAR2(100); BEGIN SELECT USER, COUNT(1) INTO usuario, cantidad FROM DUAL GROUP BY USER; DBMS_OUTPUT.PUT_LINE('Usuario: '|| usuario); DBMS_OUTPUT.PUT_LINE('Cantidad: '|| cantidad); END;
true
4fa08a36a5a025fbf5eafabe691c420aa3df1c37
SQL
laia-abad/Between_Us
/Programari/resources/bbdd.sql
UTF-8
1,019
3.78125
4
[]
no_license
CREATE DATABASE IF NOT EXISTS BETWEEN_US; USE BETWEEN_US; DROP TABLE IF EXISTS Results CASCADE; DROP TABLE IF EXISTS Matches CASCADE; DROP TABLE IF EXISTS Users CASCADE; DROP TABLE IF EXISTS Game_Result CASCADE; DROP TABLE IF EXISTS Game_Match CASCADE; DROP TABLE IF EXISTS Game_User CASCADE; CREATE TABLE Users ( us...
true
65533b8bad141b584c7793d1374b2de9fe1d30ea
SQL
indratbg/code
/SPR_LIST_OF_BOND_TRX.sql
UTF-8
2,867
3.125
3
[]
no_license
CREATE OR REPLACE PROCEDURE SPR_LIST_OF_BOND_TRX( P_BGN_DATE DATE, P_END_DATE DATE, --P_TICKET_NO_FROM VARCHAR2, -- P_TICKET_NO_TO VARCHAR2, P_USER_ID VARCHAR2, P_GENERATE_DATE DATE, P_RANDOM_VALUE OUT NUMBER, P_ERROR_CD OUT NUMBER, P_ERROR_MSG OUT VARCHAR2 ) IS V_ER...
true
ddc90f086401f1bd5b0889a3a0f49e130234873b
SQL
heathermiller114/sql-library-lab-v-000
/lib/insert.sql
UTF-8
1,264
2.96875
3
[ "LicenseRef-scancode-unknown-license-reference", "LicenseRef-scancode-public-domain" ]
permissive
INSERT INTO series (title, author_id, subgenre_id) VALUES ('Harry Potter', 1, 1); INSERT INTO series (title, author_id, subgenre_id) VALUES ('Mistborn', 2, 2); INSERT INTO subgenres (name) VALUES ('grimdark'), ('ponies'); INSERT INTO authors (name) VALUES ('Brandon Sanderson'), ('JK Rowling'); INSERT INTO book...
true
1ca3980d068377418b5d6d5a5c03fb91543a2b85
SQL
NeverMoreShadowFiend/serv_source_sanguomobile2
/app/db_zhcn/create_static/Warfare_service_config.sql
UTF-8
430
2.609375
3
[]
no_license
-- -- Table structure for table `Warfare_service_config` -- DROP TABLE IF EXISTS `Warfare_service_config`; CREATE TABLE IF NOT EXISTS `Warfare_service_config` ( `id` int(11) NOT NULL , `name` varchar(512) COMMENT '作者: 配置项名称', `data` varchar(512) COMMENT '作者: 数值或公式', `text` varchar(512) COMMENT '作者: 文本说明', PRIMARY KEY (...
true
869ccb986b70bbf6f9de3f94135d68eead1cc1f2
SQL
akondasif/grivet
/core/repositories/src/main/resources/db/migration/V13__add_entityav_boolean_table.sql
UTF-8
318
2.625
3
[ "Apache-2.0" ]
permissive
CREATE TABLE entityav_boolean ( eid BIGINT NOT NULL, aid INT NOT NULL, val TINYINT NOT NULL, created_time TIMESTAMP NOT NULL, PRIMARY KEY (eid, aid, created_time), FOREIGN KEY (eid) REFERENCES entity(eid) ON DELETE CASCADE, FOREIGN KEY (aid) REFERENCES attribute(id) ) ${createTableSuffix};
true
74ef14eee15bff4af337e4b64feab08f70ed19bb
SQL
LinCount/order
/order.sql
UTF-8
5,519
3.484375
3
[]
no_license
/* SQLyog Ultimate v13.1.1 (32 bit) MySQL - 5.7.29-log : Database - order ********************************************************************* */ /*!40101 SET NAMES utf8 */; /*!40101 SET SQL_MODE=''*/; /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; /*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIG...
true
f95ef9e38c604d916c4843e5b0ee8ef871bc648a
SQL
altoid/deutsch_lernen
/sql/get_articles.sql
UTF-8
837
3.28125
3
[]
no_license
-- for quizzes. if the selected word is a noun, get the article select * from ( select pos.name, w.word, wa.value, q.id quiz_id, w.id word_id, wa.attribute_id, qscore.presentation_count, qscore.correct_count, 'too_few_attempts' component from quiz q inner join quiz_structure qstruct on q.id = qst...
true
f917f67546175b456630056ac2a69fbb8b19371d
SQL
PeevG/Java-DB
/MySQL/DataAggregation/DataAggregation-Exercise/16.3rdHighestSalary.sql
UTF-8
329
3.71875
4
[]
no_license
SELECT e1.`department_id`, ( SELECT DISTINCT e2.`salary` FROM `employees` AS `e2` WHERE e2.`department_id` = e1.`department_id` ORDER BY e2.`salary` DESC LIMIT 1 OFFSET 2 ) AS `third_max_salary` FROM `employees` AS `e1` GROUP BY e1.`department_id` HAVING `third_max_salary` IS NOT NULL ORDER BY e1.`depart...
true
260588ea0222b446915c933bd3eff3f0c719b768
SQL
lambda-bw-weight-lift/LW_BACKEND
/StartHere/src/test/resources/data.sql
UTF-8
561
2.90625
3
[]
no_license
DELETE FROM exercises; DELETE FROM userworkouts; DELETE FROM users; INSERT INTO users(userid, username, password) VALUES (1, 'adminn', 'password'), (2, 'fred', '123'); INSERT INTO userworkouts(workoutid, workoutname, date, workoutlength, user) VALUES (12 , '01/20/19', '', '1:20:00', 1), (13 , '10/21/19'...
true
2391bee2f07c3a779b356a7cee06ee647ae8c35b
SQL
DaJoInc/AppFut
/01_TABLA/US_TUSRI.sql
UTF-8
1,871
3.484375
3
[]
no_license
/* ---------------------------------------------------- */ /* Generated by Enterprise Architect Version 13.5 */ /* Created On : 24-abr.-2018 12:17:38 p.m. */ /* DBMS : Oracle */ /* ---------------------------------------------------- */ CREATE TABLE "FS_ADDEP_US"."US_USRI" ( "USRI_USRI" NUM...
true
7bf89a6bb0c9212ab7d6478459284a68ee21ee2a
SQL
Woozical/springboard-22.2
/queries_products.sql
UTF-8
867
3.0625
3
[]
no_license
-- Comments in SQL Start with dash-dash -- --1-- INSERT INTO products (name, price, can_be_returned) VALUES ('chair', 44.00, false); --2-- INSERT INTO products (name, price, can_be_returned) VALUES ('stool', 25.99, true); --3-- INSERT INTO products (name, price, can_be_returned) VALUES ('table', 124.00, false); --4-- S...
true
c5baa647c7083a2ac342ddbff701fc5c3e7b31bd
SQL
EHwooKim/TIL
/HelloDB/02_DDL.sql
UTF-8
639
3.765625
4
[]
no_license
-- DDL(데이터 정의 언어) -- 관계형데이터베이스 구조를 정의하기 위한 명령어 -- CREATE ALTER DROP -- 테이블 생성 CREATE TABLE classmates ( id INTEGER PRIMARY KEY, name TEXT ); -- 테이블 목록 조회 .tables -- 테이블 스키마 조회 .schema classmates -- 테이블 삭제 DROP TABLE classmates; -- 테이블 명 변경 ALTER TABLE articles RENAME TO news; -- 새로운 컬럼 추가 ALTER TABLE news ...
true
66a1462434cf080a0e308f57376ea84b019ea920
SQL
shymarrai/pset7
/movies/12.sql
UTF-8
220
3.546875
4
[]
no_license
SELECT movies.title FROM movies JOIN stars ON stars.movie_id = movies.id JOIN people ON people.id = stars.person_id WHERE (people.name = "Johnny Depp" OR people.name = "Helena Bonham Carter") GROUP BY movies.id HAVING COUNT(people.id) = 2;
true
13778e53fdb0f226389d95b42d96239b1ff6d64f
SQL
tasmiaamat01/rmc_project
/consrtuction2.sql
UTF-8
89,500
2.953125
3
[ "MIT" ]
permissive
-- phpMyAdmin SQL Dump -- version 4.9.0.1 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Aug 12, 2021 at 11:57 PM -- Server version: 10.4.6-MariaDB -- PHP Version: 7.3.9 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OL...
true
c06f9a843c0885dee60493f042803dc6b604bc01
SQL
manhhungtran/JavaAgent
/src/main/resources/cz/muni/fi/pv168/project/createTables.sql
UTF-8
538
3.109375
3
[]
no_license
CREATE TABLE Agent ( Id BIGINT NOT NULL PRIMARY KEY GENERATED ALWAYS AS IDENTITY, Alias VARCHAR(100), Experience VARCHAR(30) ); CREATE TABLE Mission ( Id BIGINT NOT NULL PRIMARY KEY GENERATED ALWAYS AS IDENTITY, Codename VARCHAR(100), Description VARCHAR(3000), Difficulty VARCHAR(30) ); CR...
true
0df61d2192c95dd444fd84591364b162b51c84de
SQL
mtikoian/Utilities
/BCP/bcp commands.sql
UTF-8
7,249
2.890625
3
[]
no_license
https://www.red-gate.com/simple-talk/sql/database-administration/working-with-the-bcp-command-line-utility/ --export data from table bcp AdventureWorks2008.HumanResources.Employee out C:\Data\EmployeeData_c.dat -c -t, -S localhost\SqlSrv2008 -T -h TABLOCK --with tablock -b 100 --batch size -E argument --override iden...
true
d0ec6ea711e180ca28ec1ed28cbe57b308c2e521
SQL
vsfsc/VAExtension
/ContestDB/dbo/Stored Procedures/la_GetLongestActionsByUserID.sql
UTF-8
833
4.0625
4
[]
no_license
-- ============================================= -- Author: <Author,,Name> -- Create date: <Create Date,,> -- Description: <Description,,> -- ============================================= CREATE PROCEDURE [la_GetLongestActionsByUserID] -- Add the parameters for the stored procedure here @uid bigint AS BEGIN -- SET...
true
fe2084d317211e7770d2903b85ae4f25040a4ed7
SQL
HKevinH/JadeCore-Fix-Scripst
/sql/fix_sql/3061_misc.sql
UTF-8
2,471
2.53125
3
[]
no_license
-- Kor'kron Dark Shaman -- Main loot UPDATE `creature_template` SET `lootid`=71859 WHERE `entry`=71859; UPDATE `creature_template` SET `lootid`=718594 WHERE `entry`=718594; UPDATE `creature_template` SET `lootid`=0 WHERE `entry`=718595; UPDATE `creature_template` SET `lootid`=0 WHERE `entry`=718596; DELETE FROM `cre...
true
ac4ce37f09fefc999f54fd03f1dbd67447ba1931
SQL
YMLIB/HoldLogs
/SQL/hotbibs.sql
UTF-8
333
3.53125
4
[]
no_license
select COUNT(bib_record_id), bib_record_id, bv.title, bv.record_num from sierra_view.bib_record_item_record_link as bi, sierra_view.hold as hold, sierra_view.bib_view as bv where record_id = item_record_id and bi.bib_record_id = bv.id group by bib_record_id,bv.title,bv.record_num order by COUNT(bib_reco...
true
676360b6d60f6edd426c0a279c73f1fdcee5bf15
SQL
KristiyanGergov/SQL
/Week03 - Complex Joins/Movies.sql
UTF-8
946
4.3125
4
[]
no_license
--TASK 1 select Title, Name from MOVIEEXEC join movie on movie.PRODUCERC# = MOVIEEXEC.CERT# where PRODUCERC# = (select m1.PRODUCERC# from MOVIE as m1 where title = 'Star Wars') --TASK 2 select distinct Name from MOVIEEXEC join movie on CERT# = PRODUCERC# join STARSIN on TITLE = MOVIETITLE where STA...
true
1cdef78f3bf806867ded1a490b8c75fbc8090dea
SQL
BrenPatF/oracle_plsql_api_demos
/install_prereq/lib/install_timer_set.sql
UTF-8
3,376
3.453125
3
[ "MIT" ]
permissive
WHENEVER SQLERROR CONTINUE DEFINE app=&1 @..\initspool install_timer_set /*************************************************************************************************** Name: install_timer_set.sql Author: Brendan Furey Date: 29-Jan-2019 Installation script for the timer_set_oracle...
true
18118ae509e17a058a0a20f551d1941567aa58af
SQL
pendelhaven3/magic
/alterscripts/alterscript-1.22.0.sql
UTF-8
2,376
3.453125
3
[]
no_license
insert into SEQUENCE (NAME) values ('PURCHASE_RETURN_NO_SEQ'); create table PURCHASE_RETURN ( ID integer auto_increment, PURCHASE_RETURN_NO integer not null, RECEIVING_RECEIPT_ID integer not null, POST_IND char(1) default 'N' not null, POST_DT date null, POST_BY integer null, REMARKS varchar(100...
true
bad10e254c091902cf08a1ff5932f1e798482aee
SQL
ststeiger/SchemaPorter
/SchemaPorter/SQL/Schema/List_Triggers.sql
UTF-8
3,656
4.125
4
[]
no_license
 SELECT sch.name AS trigger_table_schema ,systbl.name AS trigger_table_name ,systrg.name AS trigger_name ,sysm.definition AS trigger_definition ,systrg.is_instead_of_trigger -- https://stackoverflow.com/questions/5340638/difference-between-a-for-and-after-triggers -- Difference be...
true
d2d475663114024245e1553dcb410fcb170ea8c1
SQL
jjangga0214/hasura-schema-stitching-boilerplate
/backends/hasura/migrations/default/1629248163987_set_fk_public_task_group_user_uid/up.sql
UTF-8
220
2.859375
3
[ "MIT" ]
permissive
alter table "public"."task_group" drop constraint "task_group_uid_fkey", add constraint "task_group_user_uid_fkey" foreign key ("user_uid") references "public"."user" ("uid") on update cascade on delete cascade;
true
69f126e050c5e4ab49a6d2da72553e2f5bad657b
SQL
Qinyu-Allen-Zhao/mimic-iv
/concepts/comorbidities/charlson.sql
UTF-8
10,617
2.875
3
[ "MIT" ]
permissive
WITH diag AS ( SELECT hadm_id , CASE WHEN icd_version = 9 THEN icd_code ELSE NULL END AS icd9_code , CASE WHEN icd_version = 10 THEN icd_code ELSE NULL END AS icd10_code FROM mimic_hosp.diagnoses_icd diag ) , com AS ( SELECT ad.hadm_id , MAX(CASE WHEN SU...
true
0d88f5c28ede93d7be1b10a5bd1bf239f29d212a
SQL
magisystem0408/query_exer
/dml.sql
UTF-8
356
3.4375
3
[]
no_license
create temp function start_date() as (date(2010,1,1)); create temp function end_date() as (date(2020,8,31)); select date_trunc(date(creation_date), month) as q_month ,sum(view_count) as pv from `bigquery-public-data.stackoverflow.posts_questions` where date(creation_date) between start_date() and end_date() ...
true
2c1e4ff88a290ca65e818666cf50c2a2a4e08fab
SQL
average-bot/database_technique
/Dump20210218 (1).sql
UTF-8
4,576
3.109375
3
[]
no_license
-- MySQL dump 10.13 Distrib 8.0.23, for Win64 (x86_64) -- -- Host: localhost Database: retirement_home -- ------------------------------------------------------ -- Server version 8.0.23 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_...
true
39890e38627f67a9d0e20918e3a1f90d67ba2d9e
SQL
Caruso33/data_science_machine_learning
/_tutorials/3_sql/3_selections.sql
UTF-8
821
4.15625
4
[]
no_license
source 3_data.sql; -- -- -- unique SELECT DISTINCT author_lname FROM books; -- -- unique values, error: two different 'harris' now combined SELECT DISTINCT CONCAT(author_fname, ' ', author_lname) FROM books; -- unique full-name SELECT DISTINCT author_fname, author_lname FROM books; -- unique full-name for bot...
true
ae3241fc25bec5f86f081d39423ad188551dee46
SQL
douglascrp/peltas-community
/src/main/resources/io/peltas/executions/peltas_delete_node_dim/peltas_delete_node_dim.sql
UTF-8
256
3.21875
3
[]
no_license
WITH select_node AS ( SELECT * from peltas_node_dim where noderef = :nodeRef ), select_unknown AS ( SELECT * from peltas_node_dim where not exists (select * from select_node) and id = 0 ) select * from select_node UNION ALL select * from select_unknown
true
034bf6693be00bceb73e305a604279df138af5b7
SQL
wheelerjoshua/database_exercises
/subqueries_exercises.sql
UTF-8
2,692
4.46875
4
[]
no_license
USE employees; -- 1. SELECT first_name, last_name, hire_date FROM employees JOIN dept_emp USING(emp_no) WHERE hire_date IN ( SELECT hire_date FROM employees WHERE emp_no = 101010 ) AND to_date > CURDATE(); -- 55 -- 2. SELECT DISTINCT title FROM titles WHERE emp_no IN ( SELECT emp_no FROM employees JOIN de...
true
db189e79492131b98f69adec3969759af8a1a5cc
SQL
doquangphuoc9999/Module-3
/2. designAndCreateDatabase/BT/PrimakeyTable/createTable.sql
UTF-8
840
3.265625
3
[]
no_license
use manageBank; CREATE TABLE Customers( customer_code int not null primary key, fullName varchar(50), addresss varchar(150), email varchar(50), phone int ); CREATE TABLE accounts( account_number int not null primary key, account_type varchar(50), date_openAccount date, balence double )...
true