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
2fbc31a222c71e1735773ede598318628fca4608
SQL
oimtrust/paykoos
/database/source.sql
UTF-8
4,757
3.65625
4
[ "MIT" ]
permissive
#untuk form renter SELECT renter.fullname, renter.gender, renter.father, renter.mother, renter.phone, renter.address, owner.id_owner, room.room_name FROM tbl_renter AS renter LEFT JOIN tbl_owner as owner ON renter.id_owner = owner.id_owner LEFT JOIN tbl_rooms AS room ON renter.id_room = room.id_room WHERE own...
true
6dac1fc1a53f81bba648c9c517ac682646fbd62b
SQL
joelk123/SuiviTR
/suivitr.sql
UTF-8
16,121
2.875
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.1.14 -- http://www.phpmyadmin.net -- -- Client : 127.0.0.1 -- Généré le : Dim 20 Décembre 2015 à 13:06 -- 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=@@CHARACTER...
true
5611c546fe91078382bb3346df533627b4136541
SQL
ruffen/Pixcel-CMS
/sql/trigger_insertfolder.sql
UTF-8
525
3.53125
4
[]
no_license
CREATE TRIGGER insertfolder BEFORE INSERT ON ink_folders FOR EACH ROW SET new.folderOrder = (SELECT count(*) FROM ink_folders WHERE parentId = new.parentId AND siteId = new.siteId) //not working in current versions of mysql! CREATE TRIGGER deletefolder AFTER DELETE ON ink_folders FOR EACH ROW UPDATE ink_folders SET...
true
47d30c57e131ae4c2723b99e468b64243f9adc1f
SQL
Shivanirudh/DBMS
/A5-PLSQL/plsql3.sql
UTF-8
1,440
3.953125
4
[]
no_license
REM ****** 3. Display the customer name along with the details of pizza type and its quantity ordered for the given order number. REM ****** Also find the total quantity ordered for the given order number as shown below: DECLARE no_of_orders NUMBER(3); order_id CHAR(5); c_name customer.cust_name % TYPE; ...
true
e4a7d3eb74c6afd08bdc7fdcbd724a861c38b84e
SQL
goosehub/football
/database.sql
UTF-8
10,779
3.125
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.1.14 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: Jun 04, 2019 at 06:33 AM -- Server version: 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 */;...
true
cf5bf1d013167f3624e7bbb371dcf78208a51c45
SQL
ViniciusAmbrosi/crescer-2016-1
/src/modulo-07-banco-parte2/loteriaddl.sql
UTF-8
2,158
3.84375
4
[ "MIT" ]
permissive
create table Aposta ( ID integer not null, Concurso_ID integer not null , Data date not null, QtdeNumeros number(2) not null, Valor number(12,2) not null, Numeros varchar2(200) not null, constraint Aposta_PK primary key (ID) ); ALTER TABLE Aposta MODIFY Data DEFAUL...
true
0c01e521b767340154f44f63a3bd70a6dc52f277
SQL
Arcelz/Sistema-Supermercado
/sistemaSupermecadoWeb/src/main/resources/db/migration/V06__criar_movimentacao.sql
UTF-8
347
2.796875
3
[]
no_license
CREATE TABLE movimentos ( pk_movimento bigint(20) NOT NULL AUTO_INCREMENT, fk_abertura bigint(20)DEFAULT NULL, tipo varchar(8) NOT NULL, valor decimal(19,2) DEFAULT NULL, PRIMARY KEY (pk_movimento), CONSTRAINT movimentos_aberturas FOREIGN KEY (fk_abertura) REFERENCES aberturas (pk_abertura) )ENGINE=I...
true
b148dc07e1707b7bb29ae1cb78d125e80a604e0a
SQL
ineeve/lbaw1713
/queries.sql
UTF-8
9,529
4.15625
4
[]
no_license
-- SELECT01 -- select user profile SELECT users.id,username,email,gender,Countries.name As country,picture,points,permission FROM users NATURAL JOIN countries WHERE users.username = $username; -- SELECT02 -- select news data to show on preview SELECT title,users.username As author,date,votes,image, substring(body, '(?...
true
de55645b6957f7cc5dd36c7dc3116e79043e3080
SQL
foodoon-guda/guda
/server-test/info/assembly/sql/info_img.sql
UTF-8
838
2.75
3
[]
no_license
/* Navicat MySQL Data Transfer Source Server : localhost Source Server Version : 50612 Source Host : localhost:3306 Source Database : info Target Server Type : MYSQL Target Server Version : 50612 File Encoding : 65001 Date: 2013-10-22 19:14:29 */ SET FOREIGN_KEY_CHECKS=0; -- ----...
true
73ad9c1e0f7fb755e044c9df8c1ed789630e0ba9
SQL
mhigh1/GT-DataAnalytics
/Homework/09-SQL/schema.sql
UTF-8
1,932
3.453125
3
[]
no_license
CREATE TABLE "department" ( "dept_no" varchar(4) NOT NULL, "dept_name" varchar(30) NOT NULL, CONSTRAINT "pk_department" PRIMARY KEY ( "dept_no" ) ); CREATE TABLE "employee" ( "emp_no" int NOT NULL, "emp_title_id" varchar(5) NOT NULL, "birth_date" date NOT NULL, "firs...
true
a4a24534935a220a168ea561c225edf08e9d0a57
SQL
NikolaBunis/LandlordCommunicationApp
/db/dataRecordsScript/landlordcommunication_usertoresidence.sql
UTF-8
2,709
3.125
3
[ "Apache-2.0" ]
permissive
-- MySQL dump 10.16 Distrib 10.3.9-MariaDB, for Win64 (AMD64) -- -- Host: 127.0.0.1 Database: landlordcommunication -- ------------------------------------------------------ -- Server version 10.3.9-MariaDB /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@...
true
18cc837edaf1d26d92e79f865b1e404a8db865c7
SQL
amtul-nazneen/library-management-system
/src/sqlDump/CreateTables.sql
UTF-8
1,998
3.703125
4
[]
no_license
create database library_mgmt2; use library_mgmt2; drop table if exists book_authors; drop table if exists fines; drop table if exists book_loans; drop table if exists borrower; drop table if exists book; drop table if exists authors; commit; CREATE TABLE book ( Isbn varchar(10) NOT NULL, Isbn13 varchar(...
true
c690cc3addd1e12ceb0ef6ddb6676c77ec422ca7
SQL
geeklearningio/Bouncer
/sql/SqlServer/Tables/Right.sql
UTF-8
734
2.890625
3
[ "MIT" ]
permissive
CREATE TABLE [Authorizations].[Right] ( [Id] UNIQUEIDENTIFIER CONSTRAINT [DF_Right_Id] DEFAULT (newid()) NOT NULL, [Name] NVARCHAR (150) NOT NULL, [IsDeletable] BIT CONSTRAINT [DF_Right_IsDeletable] DEFAULT ((1)) NOT NULL, [CreationDate] DATETIME2 (7) ...
true
dd1f2e20fe9ed34453940545014dd4347863a999
SQL
AllanCruzX/aleloFrota
/src/main/resources/db/testdata/afterMigrate.sql
UTF-8
706
2.734375
3
[]
no_license
set foreign_key_checks = 0; delete from fabricante; delete from modelo; delete from veiculo; set foreign_key_checks = 1; alter table fabricante auto_increment = 1; alter table modelo auto_increment = 1; alter table veiculo auto_increment = 1; insert into fabricante (id, nome) VALUES ('1', 'Mercedes-Benz'); insert...
true
1e26dcee31759b8da9c43282745a236fb269f6f7
SQL
rocketeerbkw/DNA
/Main/Source/Databases/The Guide/storedprocedures/gettermsbymodclassid.sql
UTF-8
700
4.375
4
[]
no_license
CREATE PROCEDURE gettermsbymodclassid @modclassid int AS select t.id as termId, t.term as term, tm.modclassid as modClassId, tm.actionid as actionId ,TERMDETAILS.Reason ,TERMDETAILS.UpdatedDate ,TERMDETAILS.UserID ,u.username from TermsLookup t inner join TermsByModClass tm on tm.termid = t....
true
c3ed885255cb93445e6159177afe16fc7b19af59
SQL
akula-srinu/Customization_Test
/custom/NVWB_PA_Project_Parameters_Vsat.sql
UTF-8
54,977
2.625
3
[]
no_license
-- ******************************************************************************* -- FileName: NVWB_PA_Project_Parameters_Vsat.sql -- -- Date Created: 2019/Aug/28 06:12:39 -- Created By: nemuser -- -- Source: -- - Package: Package_2018_P11_B1_DEV_NEW -- - Environment: EB...
true
19e31dda74d74ba011c6aa7c683583e7ff8e118d
SQL
ImBeginer/LowHope
/Document/ERD/v1.2/dgdn_script.sql
UTF-8
11,058
3.90625
4
[]
no_license
DROP DATABASE IF EXISTS lowhope_db; CREATE DATABASE lowhope_db; use lowhope_db; -- ROLE CREATE TABLE ROLE( ROLE_ID int(11) NOT NULL auto_increment, ROLE_NAME varchar(30) NOT NULL, primary key(ROLE_ID) ) ENGINE=InnoDB; INSERT INTO `ROLE` (`ROLE_ID`, `ROLE_NAME`) VALUES (1, 'Admin'), (2, 'Manager'), (3, 'User'...
true
c83dc0172fc53f6041398f84f77de81afe1d8b74
SQL
THEhighORLA/muestraApp
/DBbacckup/gdaMysql.sql
UTF-8
6,900
3
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.8.5 -- https://www.phpmyadmin.net/ -- -- Servidor: 127.0.0.1 -- Tiempo de generación: 29-04-2019 a las 17:01:19 -- Versión del servidor: 10.1.38-MariaDB -- Versión de PHP: 7.3.2 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; ...
true
dc36b15e1f51a31d7ffe35adb1f8eddb664047a4
SQL
brthiess/rockstat_final
/web-crawler/db/procedures/select/levenshtein_ratio.sql
UTF-8
445
3.890625
4
[]
no_license
DELIMITER // DROP FUNCTION IF EXISTS levenshtein_ratio ; CREATE FUNCTION levenshtein_ratio( s1 text, s2 text ) RETURNS int(11) DETERMINISTIC BEGIN DECLARE s1_len, s2_len, max_len INT; SET s1_len = LENGTH(s1), s2_len = LENGTH(s2); IF s1_len > s2_len THEN SET max_len = s1_len; ELSE ...
true
b838a101f7f8c7a48fd2468f9128c7ccbd4ec185
SQL
leoouyang/csc343
/A3/q2.sql
UTF-8
781
4.03125
4
[]
no_license
DROP VIEW IF EXISTS QuestionHint CASCADE; --The view containes ID and number of hints for all question with at least one hint create view QuestionWithHint AS select qID, count(multiHint.id) as hintNum from multiHint left join multiOptions on multiHint.oID = multiOptions.id group by qID UNION select qID, coun...
true
8c44e91585afa8501a5b110ba2fb2ec4e12ca953
SQL
Nasser39170/tchat
/SQL-CHAT.sql
UTF-8
1,899
3.046875
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.9.2 -- https://www.phpmyadmin.net/ -- -- Hôte : 127.0.0.1:3306 -- Généré le : lun. 01 fév. 2021 à 08:42 -- Version du serveur : 10.4.10-MariaDB -- Version de PHP : 7.3.12 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*...
true
136eeddc2261d82ccee411d3239a83208c9337a1
SQL
iskandarsholeh/kelasonline2
/coding.sql
UTF-8
6,885
3.34375
3
[]
no_license
-- -------------------------------------------------------- -- Host: localhost -- Server version: 5.7.24 - MySQL Community Server (GPL) -- Server OS: Win64 -- HeidiSQL Version: 10.2.0.5599 -- -------------------------------------------------------- /...
true
495326e2f0103bef2d63bead8887d95a98f462ee
SQL
akuelker/advanced_sql_class
/AmandaAdvSql.sql
UTF-8
7,723
4.3125
4
[]
no_license
select * from mydust select * from salesrep select * from sales select * from students select * from seminar select * from course select * from register --Indexes p 11 create index lastnameind on employee(lastname) create index qtyind on mydust(quantity desc) --marking primary key will keep a u...
true
7ba68a79d76f3cf707602086b421f69ef39d7b02
SQL
radicalgraphics/escriba_sunrise
/database/Dump_Qubaldb_01-08-2013.sql
UTF-8
35,188
2.609375
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 3.4.10.1deb1 -- http://www.phpmyadmin.net -- -- Host: localhost -- Generation Time: Aug 01, 2013 at 09:50 PM -- Server version: 5.5.32 -- PHP Version: 5.3.10-1ubuntu3.7 SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER...
true
a3f8c5c2bbfdcf3b216492e5d4951ce60be359b5
SQL
dspinellis/simple-rolap
/examples/ghtorrent-strat-sel/postgresql/pr_projects.sql
UTF-8
232
3.15625
3
[ "Apache-2.0" ]
permissive
-- Projects that have been forked and have a PR create table stratsel.pr_projects AS select distinct forked_projects.id from stratsel.forked_projects inner join pull_requests on pull_requests.base_repo_id = forked_projects.id;
true
33bfd6ea5cbed9a4415580f48c4bb8e1c83014b9
SQL
Next-DataEngineering/Covid-19
/Temporary_Test_Queries/TabelaTeste.sql
UTF-8
30,223
3.921875
4
[ "MIT" ]
permissive
#schema DROP DATABASE nextdataengineeringteste;#comentar esta linha se o database não ja tiver criada CREATE DATABASE nextdataengineeringteste; Use nextdataengineeringteste; #tabelas CREATE TABLE situacao ( ID int NOT NULL, DESCRICAO varchar(255) DEFAULT NULL, _created DATETIME...
true
412a95db96754c73c605e7c9c645451698f58109
SQL
JaleesMukarram/Sipra-Food-Enterprise
/includes/sql/check.sql
UTF-8
2,249
4.125
4
[ "LicenseRef-scancode-unknown-license-reference", "MIT" ]
permissive
CREATE TABLE IF NOT EXISTS `sipra_foods_schema`.`stock_out` ( `id` INT NOT NULL AUTO_INCREMENT, `amount` INT NOT NULL, `stock_id` INT NOT NULL, `detail` VARCHAR(455) NULL, `stock_after` INT NULL, `out_date` TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP, `created_date` TIMESTAMP NULL DEFAULT CURRE...
true
f6248ceece36a2b173058a88cf54ecb8d76268dc
SQL
student1043/holbertonschool-higher_level_programming
/0x0E-SQL_more_queries/11-genre_id_all_shows.sql
UTF-8
217
3.171875
3
[]
no_license
-- Task 11: all shows -- Second Line SELECT tv_shows.title, tv_show_genres.genre_id FROM tv_shows LEFT JOIN tv_show_genres ON tv_shows.id = tv_show_genres.show_id ORDER BY tv_shows.title, tv_show_genres.genre_id ASC;
true
fdaa2186fdd0631d397f1fd80aae0c11e645a3ad
SQL
JakeWymer/use
/db/build_schema.sql
UTF-8
973
3.5625
4
[]
no_license
CREATE TABLE IF NOT EXISTS users( user_id SERIAL PRIMARY KEY, auth_id VARCHAR(100), name VARCHAR(80), pic_url TEXT, bio TEXT ); CREATE TABLE IF NOT EXISTS friends( friend_id SERIAL PRIMARY KEY, to_user INTEGER REFERENCES users(user_id), from_user INTEGER REFERENCES users(user_id), s...
true
66c988ea9ed8e8d8d509aa08fb9e499bf31ea0d5
SQL
wladko0/sql-scripts-macola-wisys-epicor
/KrogerSalesReport.sql
UTF-8
747
3.171875
3
[]
no_license
-- SELECT IM.prod_cat, OH.entered_Dt, OH.ord_no, OH.inv_no, OH.oe_po_no, IM.item_no, IM.item_desc_1, IM.item_desc_2, unit_price, cus_alt_adr_cd, inv_dt, qty_to_ship FROM dbo.oehdrhst_sql OH JOIN dbo.oelinhst_sql OL ON OL.inv_no = OH.inv_no JOIN IMITMIDX_SQL IM ON IM.item_no = OL.item_no WHERE OH.ord_no IN (SE...
true
4653c6951f1c4dc17007a91c888ea8ab9f865071
SQL
joaquinSilva/database-exercises
/albums_migration.sql
UTF-8
336
2.734375
3
[]
no_license
DROP DATABASE IF EXISTS codeup_test_db; CREATE DATABASE codeup_test_db; USE codeup_test_db; DROP TABLE IF EXISTS albums; CREATE TABLE albums ( id INT UNSIGNED NOT NULL AUTO_INCREMENT, artist VARCHAR(240) NOT NULL, name VARCHAR(240) NOT NULL, release_date INT, sales DOUBLE, genre VARCHAR(240) NOT NULL, PR...
true
a8156bff1e5db4dd7177d8b66d470a8f517bbe01
SQL
lilyren8/Leetcode
/1327. List the Products Ordered in a Period.sql
UTF-8
272
4.09375
4
[]
no_license
SELECT p.product_name, SUM(o.unit) AS unit FROM Orders AS o JOIN Products AS p ON o.product_id = p.product_id WHERE LEFT(order_date, 7) = '2020-02' GROUP BY o.product_id HAVING SUM(o.unit) >= 100; -- don't have to specify table if the column is only present in one table
true
96c31411a75f62e4159f1d149713fe391b7b16d5
SQL
adonisventocilla/repOsorio
/BD.sql
UTF-8
16,489
3.328125
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.6.6 -- https://www.phpmyadmin.net/ -- -- Servidor: localhost -- Tiempo de generación: 19-06-2019 a las 14:52:50 -- Versión del servidor: 5.7.17-log -- Versión de PHP: 5.6.30 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@...
true
64edb0c06b870bb3a54c7e6fd1836aa4684220f5
SQL
brianchennn/Database_Team_Project
/pitcher_hit_per_year.sql
UTF-8
331
3.28125
3
[]
no_license
drop table if exists pitcher_hit_per_year; create table pitcher_hit_per_year( select years , id, first_name,last_name, sum(Single) as Single, sum(DDouble) as DDouble, sum(Triple) as Triple, sum(HR) as HR from pitcher_hit group by years , id ); alter table pitcher_hit_per_year add primary key...
true
73241747b7b132514069b97830bcd7b570e7ce02
SQL
brian-holsters/lulo
/sql_templates/_default/select/selected_fields.twig.sql
UTF-8
510
3.484375
3
[ "MIT" ]
permissive
{# Select fields in SELECT query #} {% macro selected_fields(query, prefix) %} {% if query.distinct %}DISTINCT{% endif %} {% if not query.selected_fields or query.selected_fields == null or query.selected_fields|length == 0 %} {{prefix}}.* {% else %} {% if not "id" in query.selected_fields %} ...
true
4b09d2b128060bac5179e719c3c67e9a02ef70b1
SQL
MPetta/Hadoop_Collections
/baseballPig.sql
UTF-8
12,322
3.90625
4
[]
no_license
/* Title: Baseball Stats */ /* Author: Marc Petta */ /* The birthMonth/birthState combination that produced the worst players by minimizing (number of hits (H) / number of at bats (AB))*/ batters = LOAD 'hdfs:/user/maria_dev/pigtest/Batting.csv' USING PigStorage(',') AS (playerID:chararray,yearID:int,teamID...
true
8b2a90e8b0c603a9c7c7e78fb7361582c2a79e9f
SQL
andysarbini/new_hris
/db/mdl_company.sql
UTF-8
1,831
3.078125
3
[ "MIT" ]
permissive
-- phpMyAdmin SQL Dump -- version 4.8.3 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Jul 22, 2019 at 03:27 AM -- Server version: 10.1.36-MariaDB -- PHP Version: 7.2.11 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OL...
true
c6d3c367ca099f90c6d878f6f79b82cbf141bc68
SQL
dandoran/mybatis-and-flyway-and-spring-boot2-
/src/main/resources/db/migration/V1.0__Create_station_table.sql
UTF-8
254
2.859375
3
[]
no_license
CREATE TABLE STATION ( station_id varchar(255), name VARCHAR(255), hd_enabled boolean, call_sign VARCHAR(255), PRIMARY KEY (station_id) ); CREATE INDEX NAMEINDEX on STATION (name); CREATE INDEX HDENABLEDINDEX on STATION (hd_enabled);
true
65c11e082a2cbaf4f647af00de079898aec2ac09
SQL
gordillo99/fixo
/create_tables.sql
UTF-8
4,153
2.890625
3
[]
no_license
create table areas (id int primary key, description varchar(255) not null); create table categories (id int primary key unique, description varchar(255) not null); create table users (id varchar(255) primary key unique, firstname varchar(255) not null, lastname varchar(255) not null, email varchar(255) not null, age in...
true
d8d0a411801379ece7b3b17f4e1499231e35c92c
SQL
mhuvais/employ
/employee (1).sql
UTF-8
3,036
3.140625
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 5.0.1 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Sep 26, 2021 at 11:59 PM -- Server version: 10.4.11-MariaDB -- PHP Version: 7.4.3 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD...
true
029bec1b5cd9e29c08cc584348149f895839f5bb
SQL
ElifKarakutukDinc/iowa-liquor-project
/sql/total_price_total_liters_and_total_bottles_count_of_categories_by_days.sql
UTF-8
699
3.78125
4
[]
no_license
--total price,total liters and total bottles count of category by days (above 100 bottles) Select case when date_part('dow', "date")= 1 then 'monday' when date_part('dow', "date")= 2 then 'tuesday' when date_part('dow', "date")= 3 then 'wednesday' when date_part('dow', "date")= 4 then 'thursday' when date_part...
true
550913a19dc3e8717336f72ee86fda2729768bb2
SQL
xuanqiz/mhdb-tables2api
/api/lisasql2_0324.sql
UTF-8
95,143
3.046875
3
[ "Apache-2.0" ]
permissive
-- -- PostgreSQL database dump -- -- Dumped from database version 13.2 -- Dumped by pg_dump version 13.2 SET statement_timeout = 0; SET lock_timeout = 0; SET idle_in_transaction_session_timeout = 0; SET client_encoding = 'UTF8'; SET standard_conforming_strings = on; SELECT pg_catalog.set_config('search_path', '', fal...
true
04ab284a14b26d93d5e8cf1e8a9821507ea416ea
SQL
hyojin38/SQL
/SQL/PG_JOIN_Level4_보호소에서 중성화한 동물.sql
UTF-8
447
3.390625
3
[]
no_license
-- INTACK:손대지 않은 -- SPAYED FEMALE 중성여성 -- NEUTERED MALE 중성 남성 SELECT ANIMAL_OUTS.ANIMAL_ID,ANIMAL_OUTS.ANIMAL_TYPE,ANIMAL_OUTS.NAME FROM ANIMAL_OUTS,ANIMAL_INS WHERE (ANIMAL_OUTS.ANIMAL_ID=ANIMAL_INS.ANIMAL_ID AND ANIMAL_INS.SEX_UPON_INTAKE LIKE '%Intact%' AND (ANIMAL_OUTS.SEX_UPON_OUTCOME LIKE '%Sp...
true
09c4737b8d06c117743683fda4ec6993a60183e3
SQL
Fareet/test_project
/db/lessons_message.sql
UTF-8
2,929
3
3
[]
no_license
-- MySQL dump 10.13 Distrib 8.0.25, for Win64 (x86_64) -- -- Host: 127.0.0.1 Database: lessons -- ------------------------------------------------------ -- Server version 8.0.25 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!...
true
c33474a389c19ab78c7499bd1e5dcc21344b26b5
SQL
RianaFerreira/wdi_sydney_2_hw
/w03/d03/blog2/views/comments.sql
UTF-8
199
3.1875
3
[]
no_license
CREATE TABLE comments ( id SERIAL4 PRIMARY KEY, post_id SERIAL4, comment_body TEXT, comment_title TEXT, author TEXT, created_at TIMESTAMP, FOREIGN KEY (post_id) references posts (id) );
true
b2c93d31eb37653edda06a52761c5772b95806be
SQL
sambadbidari/HospitalManagementSystem
/database/hms.sql
UTF-8
14,693
3.234375
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.8.0 -- https://www.phpmyadmin.net/ -- -- Host: localhost -- Generation Time: Jul 28, 2018 at 03:12 PM -- Server version: 10.1.31-MariaDB -- PHP Version: 7.2.4 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD...
true
20b089ce5b03f594d9fdc24854588c70c73c0a4e
SQL
anutaisland/dautian-www
/dautian.com/QRCODE/00713eccad0743cfa78e820b8fd6cc5b/new.sql
GB18030
4,522
3.34375
3
[]
no_license
SET FOREIGN_KEY_CHECKS=0; CREATE TABLE `activity_instance_fuli` ( `FULI_ID` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT 'ID' , `INSTANCE_ID` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT 'ʵID' , `GROUP_ID` varchar(50) CHARACTER SET utf8 COLLATE utf8_genera...
true
b9bf3f0a0decfe2bf64b8ea786455b9fd0ee58c4
SQL
robbinGithub/derby-source-analysis
/db-derby-10.1.1.0-src/java/testing/org/apache/derbyTesting/functionTests/tests/lang/aggbuiltin.sql
UTF-8
46,857
3.078125
3
[ "Apache-2.0", "LicenseRef-scancode-generic-cla" ]
permissive
-- Note that bug 5704 occurs throughout this test -- Decimal results may be outside the range of valid types in Cloudscape -- ** insert avg.sql -- create an all types tables create table t (i int, s smallint, l bigint, c char(10), v varchar(50), lvc long varchar, d double precision, r real, dt dat...
true
bc62583388d7059555170dec806ae205ba6b6705
SQL
todokku/streams-2
/sql/posts/chkPostParent.sql
UTF-8
657
4.8125
5
[ "MIT" ]
permissive
SELECT po.`id`, IFNULL(po.`thread_id`, po.`id`) as `thread_id`, IFNULL(po.`parent_id`, po.`id`) as `parent_id`, CONCAT(CASE WHEN si.`https` = 'Y' THEN 'https://' ELSE 'http://' END, su.`url`, po.`canonical_url`) as `post_url`, su.`updated_at` FROM `Post` po INNER JOIN `Channel` ch ON po.`channel_id` = ch.`id` ...
true
4a3c0c9006b09087b56a7ec1c856f3aa70bb8466
SQL
anweshatomar/SQL-Practice
/day31.sql
UTF-8
1,954
4.46875
4
[]
no_license
⛓ Link:https://leetcode.com/problems/number-of-calls-between-two-persons/ /** 💻 List of Companies: Facebook 🎯 Day 31: Table: Calls +-------------+---------+ | Column Name | Type | +-------------+---------+ | from_id | int | | to_id | int | | duration | int | +-------------+---------...
true
1fa346f935543c6c63f193c15181d2e2d9d13afe
SQL
Dcb18/ecommerce
/oauth/src/main/resources/db/migration/V201808221812__add_authority_table.sql
UTF-8
326
2.65625
3
[]
no_license
CREATE TABLE OAUTH_AUTHORITY ( ID BIGSERIAL NOT NULL PRIMARY KEY, AUTHORITY VARCHAR(100) NOT NULL, USER_ID BIGINT NOT NULL REFERENCES OAUTH_USER (id), CREATED_AT TIMESTAMP WITHOUT TIME ZONE NOT NULL, UPDATED_AT TIMESTAMP WITHOUT TIME ZONE NOT N...
true
1427102eca0e136bb2bb4779f871d32f4f8ac511
SQL
RodoxMan/PentahoCourse
/materiais/byacademy/Scripts/ddl_carga_full/ddl_leg_clientes.sql
UTF-8
689
2.78125
3
[]
no_license
--drop table leg_clientes; -- tabela exemplo legado CREATE TABLE leg_clientes ( -- ou create table nome_tabela cdcli int4 NOT NULL, nomecli varchar(100) NOT NULL, emailcli varchar(100) NOT NULL, CONSTRAINT leg_clientes_pk PRIMARY KEY (cdcli) ); -- insert dados ficticios no lagado INSERT INTO leg_clientes (c...
true
c6fd1a336b105aea23bc485239ae6e67ef3fff7f
SQL
quanganh97s2/Nguyen-MInh-Anh
/mydb.sql
UTF-8
7,240
3.046875
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 5.0.1 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Feb 26, 2020 at 10:56 AM -- Server version: 10.4.11-MariaDB -- PHP Version: 7.4.2 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD...
true
45d5f5617b925e12d122d2eefec042ca35cf7742
SQL
0xCM/Meta.Core
/src/MetaFlow.Schemas.Core.Storage/Registries/SystemComponent/SyncSytemComponents.sql
UTF-8
889
3.203125
3
[]
no_license
create procedure [PF].[SyncSystemComponents](@Components [T0].[SystemComponent] readonly) as merge into [PF].[SystemComponentRegistry] as Dst using @Components as Src on Src.ComponentId = Dst.ComponentId when not matched then insert ( ComponentId, SystemId, ComponentType, ComponentVersion, ComponentT...
true
06e4d960907c816cbbc6d9143ff92aa9339ff936
SQL
Moey1017/E-Commerce-Login-PHP-
/hadnett_glich.sql
UTF-8
13,963
3.09375
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.8.3 -- https://www.phpmyadmin.net/ -- -- Host: localhost:3306 -- Generation Time: May 07, 2020 at 03:20 PM -- Server version: 5.6.41-84.1 -- PHP Version: 7.2.7 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OL...
true
3829902c6384ade2a97265b23648a7b0f2993673
SQL
WilliamLP/AdventOfCode
/2018/day3.sql
UTF-8
1,107
4.1875
4
[]
no_license
-- Bash run time: 0m1.440s -- Parsing create temporary table parsed as with regex as ( select id, regexp_split_to_array(str, '[^0-9]+') as arr from day3 ) select arr[2]::INT as id, arr[3]::INT as x, arr[4]::INT as y, arr[5]::INT as sx, arr[6]::INT as sy from regex; -- Table with row for each x,y posit...
true
56212a42bbfb10ed396bd9b34c1a11ae3b5254f1
SQL
OUARED-A/DeepCM
/data/Server Configuration/Index Statistics That Havent Been Updated Recently.sql
UTF-8
832
4.46875
4
[]
no_license
/******************************************************************************** Title: Index Statistics That Haven't Been Updated Recently Created by: Mark S. Rasmussen <mark@improve.dk> License: CC BY 3.0 Usage: Running this returns a list of all statistics on indexes, including the last update dat...
true
cd43497197fddeeacd05be1b0799788e93ff32c6
SQL
pieces1994212/Spa-Server
/src/main/resources/database.sql
UTF-8
3,235
4
4
[]
no_license
create table pfp_role ( ID decimal(16) not null comment '唯一标识' primary key, NAME varchar(32) not null comment '名称', NO varchar(32) null comment '编号', constraint PFP_ROLE_UK_NO unique (NO) ) comment 'PFP_ROLE 角色'; create table pfp_user ( ID decimal(16) not null comment '唯一标志' ...
true
90596d51a641624a073b9d6f7675b6e15fc778c4
SQL
souphorn/graphql-jpa-query
/graphql-jpa-query-example-relay/src/main/resources/data.sql
UTF-8
2,183
3.25
3
[ "Apache-2.0" ]
permissive
-- Books insert into author (id, name, genre) values (1, 'Leo Tolstoy', 'NOVEL'); insert into book (id, title, author_id, genre, publication_date, description) values (2, 'War and Peace', 1, 'NOVEL', '1869-01-01', 'The novel chronicles the history of the French invasion of Russia and the impact of the Napoleonic era...
true
09b5d5ad4e6974c2d8a546c0ac5b157fc08d9376
SQL
jgarzonext/packages
/paquete body/PAC_IAX_MAP.sql
UTF-8
52,752
3.234375
3
[]
no_license
-------------------------------------------------------- -- DDL for Package Body PAC_IAX_MAP -------------------------------------------------------- CREATE OR REPLACE EDITIONABLE PACKAGE BODY "AXIS"."PAC_IAX_MAP" AS /****************************************************************************** NOMBRE: ...
true
f5162ea117fd46d61163dd267579ab7c413e5e99
SQL
PM-SH-PL-GO/FinalDB
/sql/강의상세정보 SELECET SQL.sql
UTF-8
763
3.359375
3
[]
no_license
SELECT le.lecture_id, le.lecture_img, le.lecture_title, le.lecture_category_id, lc.category_name, le.lecture_price, le.lecture_state , le.lecture_start_dt, le.lecture_end_dt, le.lecture_max, le.lecture_min, le.lecture_current , ld.lecture_introduce, ld.lecture_curriculum, ld.lecture_prepared, ld.lecture_caution, ld.lec...
true
782a56952259b5cd6172d152c2415d6a898348ab
SQL
ardiansoul/dumbways-k15.4
/4/mysql.sql
UTF-8
4,396
2.984375
3
[]
no_license
-- -------------------------------------------------------- -- Host: localhost -- Server version: 5.7.24 - MySQL Community Server (GPL) -- Server OS: Win64 -- HeidiSQL Version: 10.2.0.5599 -- ------------------------------------------------------...
true
e1a9acc18e3bf1c29b71e64ffb61b15b1c2c548f
SQL
leoking01/total_news_spiders
/allnewsproject/chinanewspro/chinanewspro/sqltools/distinct.sql
UTF-8
128
2.515625
3
[]
no_license
select *, count(distinct hash) from sinanews group by hash select id,hash, count(distinct hash) from sinanews group by hash
true
88df24221d227137f0830c6cff9cef8f872dc5d1
SQL
colsson0/chasingcravings
/databaseSetup.sql
UTF-8
1,444
3.375
3
[]
no_license
CREATE DATABASE chasingcravings; CREATE TABLE useraccounts( userID INT PRIMARY KEY AUTO_INCREMENT, username VARCHAR(20) NOT NULL UNIQUE, email VARCHAR(50) NOT NULL UNIQUE, pwd VARCHAR(50) NOT NULL, acctType VARCHAR(5) NOT NULL); CREATE TABLE trucks( truckID INT PRIMARY KEY AUTO_INCREMENT, truckName VARCHAR(50) N...
true
46d989c7d6c4282f219eea20a7982d6112512a9b
SQL
asawegelius/BachelorProject
/databases/access_db.sql
UTF-8
3,536
4.125
4
[]
no_license
DROP DATABASE IF EXISTS `access_db`; CREATE DATABASE `access_db` /*!40100 DEFAULT CHARACTER SET utf8 COLLATE utf8_danish_ci */; USE `access_db`; DROP TABLE IF EXISTS `user`; CREATE TABLE `user` ( `user_id` int(11) NOT NULL AUTO_INCREMENT, `user_name` varchar(60) DEFAULT NULL, PRIMARY KEY (`user_id`), UNIQUE KE...
true
b89ae531cfb78b0f71c24d7496b6d0d81df4621d
SQL
nonfiction/nterchange_backend
/test/fixtures/base_schema.sql
UTF-8
20,361
3.328125
3
[]
no_license
-- -- Table structure for table `action_track` -- CREATE TABLE `action_track` ( `id` int(11) NOT NULL auto_increment, `user_id` int(11) unsigned NOT NULL default '0', `asset_name` varchar(255) NOT NULL default '', `action` varchar(255) NOT NULL default '', `asset_id` int(11) unsigned NOT NULL default '0', ...
true
f93f86fd54eb87bdc99f38043e75644e3173c11d
SQL
radtek/abs3
/sql/mmfo/bars/Procedure/p_f92_nn.sql
WINDOWS-1251
2,058
2.609375
3
[]
no_license
PROMPT ===================================================================================== PROMPT *** Run *** ========== Scripts /Sql/BARS/Procedure/P_F92_NN.sql =========*** Run *** PROMPT ===================================================================================== PROMPT *** Create procedure...
true
c35264585e89e75ec821741d8fd0d6f48300e3be
SQL
uhef/oskari-server
/content-resources/src/main/resources/sql/PostgreSQL/example-wfslayer.sql
UTF-8
3,148
2.90625
3
[]
no_license
-- NOTE! Terms of use are listed in here; -- http://www.suomi.fi/suomifi/tyohuone/yhteiset_palvelut/palvelukartta/palvelukartan_rajapintakuvaus/palvelukartan_aineiston_kayttoehdot/index.html ; -- THIS IS AN EXAMPLE FOR ADDING WFS LAYER ; -- add map layer; INSERT INTO oskari_maplayer(type, name, groupId, ...
true
df360b82f6c5a7c8a57b07f77fca5b3567b62a67
SQL
zsolt2/plsql
/Graphics.sql
ISO-8859-2
6,687
3.6875
4
[]
no_license
--HTML fjl ltrehozsa CREATE OR REPLACE PROCEDURE printresultstofile AS --sszes termk lekrdezse CURSOR productnames IS SELECT * FROM product; outfile utl_file.file_type; BEGIN --Output fjl megnyitsa outfile := utl_file.fopen('OTPUTDIR', 'results.html' , 'W'); utl_file.put_line(outfile,'<htm...
true
ab241ccb7b908c644fcc0e4d7906b8713a200596
SQL
ParthibanB/Crackers
/Datamodel/universalCrackers.sql
UTF-8
6,644
3.125
3
[]
no_license
-- MySQL Administrator dump 1.4 -- -- ------------------------------------------------------ -- Server version 5.5.28 /*!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 */; ...
true
8d3a618788b5fea5c1edf4ecd8e868c37c432b89
SQL
radtek/Telecommunication
/SIM_TRADE/DataBase/FUNCTION/WWW_GET_PHONE_DETAIL_DB.sql
UTF-8
1,223
2.984375
3
[]
no_license
CREATE OR REPLACE FUNCTION WWW_GET_PHONE_DETAIL_DB( pPHONE_NUMBER_FEDERAL IN VARCHAR2, pYEAR_MONTH IN INTEGER ) RETURN DETAIL_LK_TAB IS --#Version=1 --vPHONE_NUMBER_FEDERAL VARCHAR2(20 CHAR); vDETAIL_LK_TAB DETAIL_LK_TAB; vSqlText VARCHAR2(500); BEGIN --SELECT CONTRACTS.PHONE_NUMBER_FEDERAL INTO vPHONE_NUMBE...
true
1bd7006133ef0acc97c626e8626f501225b8bb32
SQL
jlange91/Rush00
/private/articles.sql
UTF-8
2,671
2.953125
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.6.0 -- http://www.phpmyadmin.net -- -- Host: localhost -- Generation Time: Jun 18, 2017 at 02:42 PM -- Server version: 5.7.11 -- PHP Version: 7.0.0 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /...
true
b0b842c3ee3b87ac1d8fec2feac41b4c7156a9d2
SQL
vinnix/refrimon
/bd_refrimon.sql
UTF-8
10,152
2.984375
3
[ "BSD-2-Clause" ]
permissive
-- MySQL dump 10.13 Distrib 5.5.40, for Linux (x86_64) -- -- Host: localhost Database: bd_refrimon -- ------------------------------------------------------ -- Server version 5.5.40 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;...
true
64a7c377c4e285e0d300b3091563dba60fc6e478
SQL
KasiaMirowska/yoga-api
/migrations/003.do.create_flows.sql
UTF-8
206
2.859375
3
[]
no_license
DROP TABLE IF EXISTS flows; CREATE TABLE flows ( id INTEGER PRIMARY KEY GENERATED BY DEFAULT AS IDENTITY, title TEXT NOT NULL, author INTEGER REFERENCES users(id) ON DELETE CASCADE NOT NULL );
true
939af19b9412f9dc2b89ca1a6bbcd6d7c81d129e
SQL
Olczix/LecznicaVet
/inserts.sql
UTF-8
12,149
2.703125
3
[]
no_license
 /*DELETE FROM WIZYTY; DELETE FROM ZWIERZE; DELETE FROM WLASCICIEL; DELETE FROM ADRES; DELETE FROM DIAGNOZA; DELETE FROM ZABIEGI; DELETE FROM LEKARZ; DELETE FROM LEK; DELETE FROM GATUNEK; DELETE FROM BADANIA; DELETE FROM MATERIALY;*/ INSERT INTO ADRES VALUES ('A_1', 'Kopernika Mikołaja', 19, NULL, '1...
true
ae88e36ea2b69d383aa33d3b139c3a2639787007
SQL
blestonbandeiraUPSKILL/upskill_java1_labprg_grupo2
/BaseDados/CreateUtilizadorAdministrativo.sql
UTF-8
484
2.75
3
[]
no_license
CREATE OR REPLACE PROCEDURE createUtilizadorAdministrativo( p_email utilizador.email%type, p_nome utilizador.nome%type, p_password utilizador.password%type ) IS v_email utilizador.email%type; BEGIN INSERT INTO Utilizador (email, nome, password, rolename) VALUES (p_email...
true
59ba94db0a637946365247f74efba6003554b31d
SQL
akash-rupeek/digital_marketing_queries
/Other DM Queries/FB New-Repeat Leads.sql
UTF-8
4,426
3.984375
4
[]
no_license
with vars as ( select '2020-11-01' as start_date, '2021-02-15' as end_date ), dm_leads_raw as ( select distinct lower(city) as city , loan_amount , case when lower(otp_verified) in ('true', 'verified') then 1 else 0 end as otp_verified , case when scheme_name is not null then 1 else 0 end as scheme...
true
3aac852f01e34fd1c142c69cf8473d22054ea98c
SQL
medea-project/ipcc-acquire
/sql/acquire-cumulated-role-in-assessment-report-categories.sql
UTF-8
1,194
4.28125
4
[ "CC-BY-4.0" ]
permissive
-- export the sets of authors grouped by cumulated role -- in each assessment report -- Any author with multiple roles is assigned to the cumulated role -- category named 'Multiple Roles (MULTI)'. -- set limit for the size of a string concatenated with GROUP_CONCAT to a -- value larger than the number of authors (<10...
true
07402e9914f014df67da5da2660ec80d5f88595d
SQL
holynekk/Competitive-Programming
/Leet_Code/Employees_With_Missing_Information.sql
UTF-8
525
4.25
4
[]
no_license
# Write your MySQL query statement below # NOT IN solution # SELECT employee_id FROM Employees WHERE employee_id NOT IN (SELECT employee_id FROM Salaries) # UNION # SELECT employee_id FROM Salaries WHERE employee_id NOT IN (SELECT employee_id FROM Employees) # ORDER BY 1; SELECT e.employee_id FROM Employees e LEFT JO...
true
82dd334127543e96c9c22614438e016b48e7027b
SQL
kimhalyn/Sql
/02. 조건 검색과 비교 연산.sql
UHC
2,071
4.1875
4
[]
no_license
/* 2021/04/28 豳_ м SQL Թ_ ˻ Ȱϱ */ /* WHERE ϱ - SELECT Ư ־ پ ̺ ȸ - ǿ , ̸, ǥ, , */ /* - : =, >, <, >=, <=, <>(!=) - : +, -, *, /(а ϰ 켱 (), *, /, +, /) - : UNION, UNION ALL, MINUS, INTERSECT - : AND, OR, NOT - SQL : BETWEEN, IN, LIKE, IS NULL << ڴ ǥ('')ȿ Էϵ, /ҹ >> */ ...
true
acf1afa6983c04c95d6dfad857118162a33326fc
SQL
wsm1217395196/my-study
/java/wsm-demo/DB/wsm-work.sql
UTF-8
5,097
3.140625
3
[]
no_license
/* SQLyog Ultimate v12.08 (64 bit) MySQL - 5.7.22 : Database - wsm-work ********************************************************************* */ /*!40101 SET NAMES utf8 */; /*!40101 SET SQL_MODE=''*/; /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; /*!40014 SET @OLD_FOREIGN_KEY_CHECK...
true
9b81bfca04354b3024be6c25f08135c07779f01f
SQL
Mirageg4/Employee-Tracker
/seed.sql
UTF-8
1,561
3.25
3
[ "MIT" ]
permissive
USE employee_db; --Employee Seeds-- INSERT INTO employee (id, first_name, last_name, role_id, manager_id) VALUES (1, "Sherman", "Potter", 1, 1); INSERT INTO employee (id, first_name, last_name, role_id, manager_id) VALUES (2, "Ben", "Pierce", 2, 1); INSERT INTO employee (id, first_name, last_name, role_id, manager_...
true
ceede7bfbb86cb2a84ac3a10e65cdcf57fa51e0c
SQL
gbbiancardi/cursos-alura
/curso_oracle/oracle_02/SCRIPT_AULA03_FILTRANDO_AGREGACOES_HAVING.sql
ISO-8859-1
1,696
4.1875
4
[]
no_license
SELECT A.NOME, C.NOME, AVG(N.NOTA) FROM ALUNO A JOIN RESPOSTA R ON R.ID = N.RESPOSTA_ID JOIN EXERCICIO E ON E.ID = R.EXERCICIO_ID JOIN SECAO S ON S.ID = E.SECAO_ID JOIN CURSO C ON C.ID = S.CURSO_ID JOIN ALUNO A ON A.ID = C.ALUNO_ID WHERE AVG(N.NOTA) < 5 GROUP BY A.NOME, C.NOME; SELECT A.NOME, C.NOME, AVG(N.NOTA) ...
true
ee8fe8896f80106b4ad38fa85e3a59e5c422263c
SQL
mckennatim/sql
/sql.sql
UTF-8
4,904
4.0625
4
[]
no_license
SELECT * FROM `map_employee_hierarchy` as m JOIN (select * from `dim_employee`) as d SELECT `employee_id`, `manager_id` FROM `map_employee_hierarchy` as m JOIN (select * from `dim_employee`) as d ON m.employee_id = d.id SELECT * FROM `map_employee_hierarchy` as m JOIN (select * from `dim_employee`) as d ON m....
true
4aca79709d4a21318c9f8cea9ba3adb290e1c40e
SQL
prasanth-m/snowflake
/snow.SQL
UTF-8
2,104
4.0625
4
[]
no_license
CREATE STORAGE INTEGRATION stock_hist TYPE = EXTERNAL_STAGE STORAGE_PROVIDER = S3 ENABLED = TRUE STORAGE_AWS_ROLE_ARN = 'arn:aws:iam::<XXX>:role/snowflake' STORAGE_ALLOWED_LOCATIONS = ('s3://<XXX>/') ; create or replace stage hist_parquet storage_integration = stock_hist url = 's3://<XXX>/' ; select system$...
true
542fce3c1f59aa86ac10f9087e3ea7719df4d6cb
SQL
jeauxlb/grocy
/migrations/0001.sql
UTF-8
442
2.75
3
[ "MIT" ]
permissive
CREATE TABLE products ( id INTEGER NOT NULL AUTO_INCREMENT PRIMARY KEY, name varchar(30) NOT NULL UNIQUE, description TEXT, location_id INTEGER NOT NULL, qu_id_purchase INTEGER NOT NULL, qu_id_stock INTEGER NOT NULL, qu_factor_purchase_to_stock REAL NOT NULL, barcode TEXT, min_stock_amount INTEGER NOT NULL DEF...
true
834885a07282e099852957f6df40d2f318d06d1a
SQL
uhoogma/codecomparison
/src/main/resources/schema-old.sql
UTF-8
4,425
3.953125
4
[]
no_license
-- codecomparison CREATE TABLE TASK( id BIGINT NOT NULL PRIMARY KEY AUTO_INCREMENT, taskName VARCHAR(50) NULL, active boolean NULL, creationTime Timestamp NOT NULL, lastSyncTime Timestamp NULL, t int NOT NULL, k int NOT NULL ); CREATE TABLE ROUND( id BIGINT NOT NULL PRIMARY KEY AU...
true
6abe7d3c981d7885455b64a42ff2e71ad1221133
SQL
KChellis/glasslab
/out/production/resources/db/create.sql
UTF-8
632
3.125
3
[ "MIT" ]
permissive
SET MODE PostgreSQL; CREATE TABLE IF NOT EXISTS art ( id int PRIMARY KEY auto_increment, name VARCHAR, type VARCHAR, materials VARCHAR, price INTEGER, images VARCHAR, description VARCHAR, keywords VARCHAR, style VARCHAR ); CREATE TABLE IF NOT EXISTS orders ( id int PRIMARY KEY auto_increment, u...
true
cf83f7506de294c955aeb68573a43b20838cf582
SQL
treebee/realtime-client-elixir
/docker/db/00-init.sql
UTF-8
740
3.09375
3
[ "Apache-2.0" ]
permissive
ALTER SYSTEM SET wal_level='logical'; ALTER SYSTEM SET max_wal_senders='10'; ALTER SYSTEM SET max_replication_slots='10'; -- Tables for testing CREATE TYPE public.user_status AS ENUM ('ACTIVE', 'INACTIVE'); CREATE TABLE public.users ( id bigint GENERATED BY DEFAULT AS IDENTITY PRIMARY KEY, name text ); INSERT IN...
true
c5d6de6f9207172aab5371dbdb0ca127e1178219
SQL
vywei/csc365-pair
/lab3-2/AIRLINES/AIRLINES-setup.sql
UTF-8
636
3.375
3
[]
no_license
/* Victor Wei - vywei@calpoly.edu Eddie Kesicki - ekesicki@calpoly.edu */ CREATE TABLE airlines( Id INT, Airline VARCHAR(30), Abbreviation VARCHAR(30), Country VARCHAR(20), PRIMARY KEY (Id) ); CREATE TABLE airports100( City VARCHAR(20), AirportCode VARCHAR(3), AirportName VARCHAR(60), ...
true
a21f11696661f0f585c5834bffd6534df51d1c9a
SQL
vigneshj6/HistoryCard
/query/teacher/class_advisor/classadv_stu.sql
UTF-8
279
2.859375
3
[]
no_license
-------2ND QUERY FOR CLASS ADVISOR IN HISTORY DATABASE TO GET THE LIST OF STUDENTS------------------ SELECT "RRN" as "rrn","STUDENT_NAME" as "name" FROM "STUDENT" WHERE "CLASS_ADVISOR"=$1; -------AFTER GETTING THE LIST OF STUDENTS, RUN JOIN_QUERY.SQL----------------------------
true
b87f313ffc87fce3727ef3543652749d6db0aa89
SQL
crossdsection/irshaad-backend
/db/schema/wv_area_ratings.sql
UTF-8
1,773
3.078125
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.6.6deb5 -- https://www.phpmyadmin.net/ -- -- Host: localhost:3306 -- Generation Time: Aug 11, 2018 at 11:25 AM -- Server version: 10.1.29-MariaDB-6+b1 -- PHP Version: 7.2.4-1+b2 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIEN...
true
e02c0aca53066eca2ecbf12cb8c6dbff338040d1
SQL
DevartVasiliyK/MySQL_rep
/Tables/film.sql
UTF-8
1,333
3.671875
4
[]
no_license
CREATE TABLE `film` ( `film_id` SMALLINT UNSIGNED NOT NULL AUTO_INCREMENT, `title` VARCHAR(255) NOT NULL, `description` TEXT DEFAULT NULL, `release_year` YEAR DEFAULT NULL, `language_id` TINYINT UNSIGNED NOT NULL, `original_language_id` TINYINT UNSIGNED DEFAULT NULL, `rental_duration` TINYINT UNSIGNED NO...
true
acf2e3e5c15a3113cfb41610aa0e8a399ce37afe
SQL
JorgeMussato/algafood
/src/main/resources/db/migration/V003__cria-tabela-estado.sql
UTF-8
602
3.734375
4
[]
no_license
create table tb_estado ( id bigint not null auto_increment, nome varchar(80) not null, primary key (id) ) engine=InnoDB default charset=utf8; insert into tb_estado (nome) select distinct nome_estado from tb_cidade; alter table tb_cidade add column estado_id bigint not null; update tb_cidade c set c.estado_id = (...
true
e377c2e0999b0b5da01e9398c5ca73770cacc09f
SQL
termlex/release-assertion-toolkit
/release-assertion-resources/src/main/resources/scriptsRF1/file-centric/file-centric-concept-valid-SnomedId.sql
UTF-8
1,257
3.34375
3
[]
no_license
/******************************************************************************** file-centric-concept-valid-SnomedId Assertion: There is a valid SnomedID. ********************************************************************************/ /* view made by null SnomedID */ create or replace view v_cu...
true
510d2f6cd6d921bf1602120f73f94cdb2b707a6e
SQL
alexromanelli/ifes-programacao
/2016/script-criacao-tabelas-puxafrangos.sql
UTF-8
1,133
3.46875
3
[]
no_license
create table Lista_Comandos ( id serial primary key, nome varchar(100) not null ); create table Comando ( id serial primary key, lista integer not null, sequencial integer not null, tipo char(1) not null, angulo integer, coord_x integer, coord_y integer, coord_z integer, ...
true
655d92bda824baeecbd43621a66837dc34d07272
SQL
artofimagination/mysql-resources-db-go-service
/db/migrations/mysql/20210328132800_initial.up.sql
UTF-8
833
3.671875
4
[ "MIT" ]
permissive
-- +migrate Up CREATE TABLE IF NOT EXISTS categories( id smallint PRIMARY KEY AUTO_INCREMENT, name VARCHAR (50), description VARCHAR (300), created_at DATETIME NOT NULL DEFAULT NOW(), updated_at DATETIME NOT NULL DEFAULT NOW() ); -- +migrate Up CREATE TABLE IF NOT EXISTS resources( id binary(16) PRIM...
true
7b1acf77a7656179725c3b63b35628ce87e96b3c
SQL
mustafa-korkmaz/E_Market_Integration
/OpencartExportExtension/Design/productOptionsExport.sql
UTF-8
337
3.921875
4
[]
no_license
SELECT po.product_id AS ProductId, od.option_id AS OptionId, od.name AS OptionName, ovd.name AS OptionValue FROM product_option po JOIN option_description od ON (po.option_id = od.option_id) JOIN option_value_description ovd on(ovd.option_id=po.option_id) order by po.produc...
true
9d0ed3cdf55d0b0841d8b4f5b15454fe82fecc45
SQL
Jac0bDeal/pikamon
/migrations/sqlite/000001_schema_ini.up.sql
UTF-8
462
3.90625
4
[ "MIT" ]
permissive
create table if not exists trainers ( id string not null constraint trainers_pk primary key ); create table if not exists pokemon ( id integer not null constraint pokemon_pk primary key autoincrement, trainer string not null constraint "pokemon_train_trainers.id_fk" ...
true
dbd39e7335d056ea9efa0accd19096793a0652d2
SQL
dbadd/db-sample-schemas
/shipping/qs_ws.sql
UTF-8
4,903
2.765625
3
[ "MIT" ]
permissive
Rem Rem $Header: qs_ws.sql 29-aug-2002.11:59:53 hyeh Exp $ Rem Rem qs_ws.sql Rem Rem Copyright (c) 2001, 2015, Oracle Corporation. All rights reserved. Rem Rem Permission is hereby granted, free of charge, to any person obtaining Rem a copy of this software and associated documentation files (the Rem "Software"), t...
true