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
f62467db83250394392673f877c073bb815913a3
SQL
keepthinker/dreamspace
/SQL/quanlingzhang_updated.sql
UTF-8
2,527
3.640625
4
[]
no_license
CREATE TABLE user ( id int(11) NOT NULL AUTO_INCREMENT, user_name varchar(35) DEFAULT NULL, password varchar(35) DEFAULT NULL, profile varchar(300) DEFAULT NULL, head_pic varchar(100) DEFAULT NULL, friendship_id int(11) DEFAULT NULL, PRIMARY KEY (id) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; CREATE TABLE fr...
true
688513b337025e4ef60a9e4edc3afc42e11e1065
SQL
Mutestock/mini-proj2
/soap/migration/migrations/school_class/up.sql
UTF-8
208
2.625
3
[]
no_license
CREATE TABLE "Classes" ( "Id" INTEGER NOT NULL, "Subject" TEXT, "CreatedAt" TEXT NOT NULL, "UpdatedAt" TEXT NOT NULL, CONSTRAINT "PK_Classes" PRIMARY KEY("Id" AUTOINCREMENT) );
true
7aa6a9400329fac37b9a34de334f758d6bd4cb1d
SQL
franciscolfraga/Information-Systems-and-Databases
/SQL Exercises/airport.sql
UTF-8
2,342
4.46875
4
[]
no_license
--1 SELECT name, city FROM airport WHERE country='Portugal' --2 SELECT name FROM plane, model WHERE plane.modelcod=model.modelcod AND model.version='DC-10' SELECT name FROM plane JOIN model ON plane.modelcod=model.modelcod AND model.version='DC-10' SELECT name FROM plane JOIN model USING(modelcod) WHERE model.version...
true
bf5dd131bc834b93cc5c1cca4f1249faf802c561
SQL
JKocher13/DE.SQL.BuildAndDestroy
/answers/exercise18.sql
UTF-8
1,067
3.3125
3
[]
no_license
mysql> ALTER TABLE students ADD ID INTEGER KEY NOT NULL AUTO_INCREMENT; Query OK, 0 rows affected (0.12 sec) Records: 0 Duplicates: 0 Warnings: 0 mysql> describe students; +-------------+--------------+------+-----+---------+----------------+ | Field | Type | Null | Key | Default | Extra | +-...
true
51c4982584854154ff631adbfb65e1342c42db64
SQL
houxiangr/yynews-RBAC
/yynews.sql
UTF-8
7,463
3.171875
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.7.0 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: 2018-05-30 18:40:02 -- 服务器版本: 10.1.26-MariaDB -- PHP Version: 7.1.8 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET...
true
781599fab6c958e5cc7548d3748cf676440275be
SQL
maxuebing/PocketUniversity-Web
/apps/event/Appinfo/survey.sql
UTF-8
2,293
3.59375
4
[ "MIT" ]
permissive
DROP TABLE IF EXISTS `ts_survey`; CREATE TABLE `ts_survey` ( `id` int(11) NOT NULL AUTO_INCREMENT , `uid` int(11) NOT NULL COMMENT '作者ID' , `sid` int(11) NOT NULL, `title` text CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '标题' , `explain` text CHARACTER SET utf8 COLLATE utf8_general_ci NOT NUL...
true
494dcb454e7b525ff4ab7dc03b120da676663394
SQL
mohankumart/convivasql
/conviva.sql
UTF-8
898
3.5
4
[]
no_license
CREATE DATABASE conviva; use conviva; CREATE TABLE Customer ( id int NOT NULL AUTO_INCREMENT, name varchar(255) NOT NULL, sex varchar(50), Age int, PRIMARY KEY (id) ); insert into customer (name, sex, age) values ('c1 ', 'male', 33), ('c2 ', 'male', 21), ('d1 ', 'female', 19), ('d3 ', 'female', 2...
true
bb4551059b24e55d60eb9afa218ad97f50d0b773
SQL
Lihaij/Erc-node
/ddl/20180123.sql
UTF-8
818
2.6875
3
[]
no_license
SET NAMES utf8; SET FOREIGN_KEY_CHECKS = 0; /* your backup sql */ /* ty */ INSERT INTO `seqmysql` VALUES ('applyIDSeq', '0', '1', '99999999'); INSERT INTO `seqmysql` VALUES ('otherIDSeq', '0', '1', '99999999'); INSERT INTO `tbl_erc_taskallot` VALUES ('10', '入库申请', '分配入库申请审核人员', '1', '0', '2017-12-06 09:40:21', '20...
true
be5d395968dfdba3ddeb8af85924d793e09e78b6
SQL
bw-block-club-calendar/be
/api/event/eventQuery.sql
UTF-8
646
4.09375
4
[ "MIT" ]
permissive
-- `find()` returns a list of all events with their locations select e.*, l.name, l.coordinates, l.street_address, l.street_address_2, l.city, l.zipcode, l.state from events as e join locations as l on e.location_id = l.id; order by e.start -- `findBy(filter)` returns a list of all users that match a JSON { key: value...
true
1d61fb69e6e946d267b0eac83ee288e2f5f6eff6
SQL
maxsad1/SQL
/undo/undo.sql
UTF-8
1,129
3.515625
4
[]
no_license
PROMPT ################# Undo Usage By Status and Size ################# col tablespace_name format a20 select tablespace_name, status,round(sum (bytes)/1024/1024,2) "UNDO in (MB)" from DBA_UNDO_EXTENTS group by tablespace_name,status order by status; PROMPT ################# Undo Usage By Object ################# ...
true
c197b8f59d77f288d18a068a686a60db0ff605bf
SQL
j7ng/CLFY_SA
/SA/Views/TABLE_FRTRGT_VIEW.sql
UTF-8
3,242
3.609375
4
[]
no_license
CREATE OR REPLACE FORCE VIEW sa.table_frtrgt_view (objid,"ID","NAME",s_name,start_date,end_date,product_family,product_line,amount,comments,terr_objid,terr_name,s_terr_name,terr_nodekey,curr_objid,currency_name,s_currency_name,currency_symbol,currency_rate,owner_objid,owner_name,s_owner_name,terr_terr_id,sub_scale) AS ...
true
976a99a7edc66722c40d33c9b104379074be04a1
SQL
Selapebriani/Tugas-Besar
/ujian.sql
UTF-8
5,219
2.890625
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.8.4 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Waktu pembuatan: 14 Bulan Mei 2019 pada 06.29 -- Versi server: 10.1.37-MariaDB -- Versi PHP: 7.3.1 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD...
true
f51b9f7ccdbb67513a56c8b51917a3ccd47e3b82
SQL
hector81/MySql
/ExamenMySql/ejercicio2.sql
UTF-8
509
3.46875
3
[]
no_license
DELIMITER $$ DROP FUNCTION IF EXISTS ejercicio2 $$ CREATE FUNCTION ejercicio2(fecha date, cat int) RETURNS int BEGIN DECLARE nhabitacion int; select h.NumHABITACION into nhabitacion from habitaciones h join reserva_habitac r on h.NumHABITACION=r.NumHABITACION where fecha not between r.FechaENTRADA and r.FechaSALIDA and...
true
9e74e79589fe17d6554bb916a1e3fbbc66653f17
SQL
PIH/openmrs-concept-scripts
/mysql/show-concept-table-without-users.sql
UTF-8
2,813
3.390625
3
[]
no_license
-- Show "users" who have created, changed, retired -- or voided concepts BUT are not in the users table. -- Works in OpenMRS 1.9 select creator from concept where creator not in (select user_id from users) UNION select changed_by from concept where changed_by NOT in (select user_id from users) UNION select retire...
true
955ab21ac903ec6f9a42a87cd723a89777a2c516
SQL
LegionDark/SQL_testbed
/sql/custom/blue_spell_list_custom.sql
UTF-8
1,996
2.84375
3
[]
no_license
-- --------------------------------------------------------------------------- -- This file adds onto or modifies contents of blue_spell_list.sql -- and must be imported/executed AFTER that file -- -- For new entries DarkStar does not have, use "INSERT INTO" -- For changing entries that already exist use "REPLACE INTO"...
true
ace277f855b5d73c884cd3429aac721faee9aa76
SQL
UCLALibrary/sql-scripts
/Voyager/Selectors/Geology Maps RR-390.sql
UTF-8
1,367
3.515625
4
[]
no_license
/* Geology Maps data RR-390 */ select l.location_code , l.location_name --, mm.normalized_call_no , mm.display_call_no as call_number , mi.item_enum , i.copy_number as copy_no , vger_support.get_all_item_status(mi.item_id) as item_status , bt.bib_id , bt.lccn , ( select replace(normal_heading, 'U...
true
1159fc9b1dd06e7c6d4a416a06a8dbda0698d374
SQL
StarYan/test
/数据库/school.sql
UTF-8
2,116
3.078125
3
[]
no_license
/* Navicat MySQL Data Transfer Source Server : localhost Source Server Version : 50617 Source Host : localhost:3306 Source Database : jiaxiao Target Server Type : MYSQL Target Server Version : 50617 File Encoding : 65001 Date: 2016-01-30 13:40:35 */ SET FOREIGN_KEY_CHECKS=0; -- -...
true
0be79827ee06b62777408be15db48dcf7d67f8f9
SQL
derris/djFrame
/dbsql/yard_updb_1_1.sql
UTF-8
829
3.53125
4
[]
no_license
CREATE TABLE django_session ( session_key character varying(40) NOT NULL, session_data text NOT NULL, expire_date timestamp with time zone NOT NULL, CONSTRAINT django_session_pkey PRIMARY KEY (session_key) ) WITH ( OIDS=FALSE );; ALTER TABLE django_session OWNER TO "yardAdmin";; -- Index: django_session_ex...
true
9bb1a96ac66204c21ab8cead03ea18292d5f3068
SQL
gauravk268/Placement-Preparation
/SQL Resources/Solutions/Weather Observation Station 5.Mysql
UTF-8
446
3.46875
3
[ "MIT" ]
permissive
SELECT CITY,LENGTH(CITY) /* select cities on length of cities name*/ FROM STATION ORDER BY LENGTH(CITY) ASC,CITY ASC /*we will sort names on the basis of length small comes first*/ /*then we will sort on the basis of alphabetical order*/ LIMIT 1; SELECT CITY,LENGTH(CITY) /* select cities on length of cities ...
true
b294684e8c7d1401e13e668b67567529771ca798
SQL
ipartek/java_2018_0507
/ejemplos_sql/alojamientos.sql
UTF-8
4,877
3.34375
3
[]
no_license
-- MySQL Script generated by MySQL Workbench -- Thu Oct 18 14:14:34 2018 -- Model: New Model Version: 1.0 -- MySQL Workbench Forward Engineering SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0; SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0; SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='TR...
true
c264c9bc77bb399c85cb0fe94e0735efcd7c7b6f
SQL
edwight/911falcon_master
/911falcon (1).sql
UTF-8
66,165
2.921875
3
[ "MIT" ]
permissive
-- phpMyAdmin SQL Dump -- version 4.5.1 -- http://www.phpmyadmin.net -- -- Servidor: 127.0.0.1 -- Tiempo de generación: 29-08-2016 a las 15:16:36 -- Versión del servidor: 10.1.13-MariaDB -- Versión de PHP: 5.6.23 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT...
true
a93f0610942577d8bd211cac7dbf0459722e2178
SQL
bonarizki/onlinestore
/transaksi (1).sql
UTF-8
1,666
3.28125
3
[ "LicenseRef-scancode-unknown-license-reference", "MIT" ]
permissive
-- phpMyAdmin SQL Dump -- version 4.8.5 -- https://www.phpmyadmin.net/ -- -- Host: localhost:3306 -- Generation Time: Feb 02, 2021 at 03:29 PM -- Server version: 5.7.24 -- 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_CHA...
true
d6792b7edac01c2fbbf8cce5fbe4981ebaf44dd8
SQL
apribot/entitynet
/bootstrap.sql
UTF-8
2,874
4.125
4
[]
no_license
create schema blue; create schema master; create table blue.company ( companyid bigserial primary key, companyname text, address text ); create table blue.companyinstance ( companyinstanceid bigserial primary key, companyname text, address text ); create table blue.companymap ( companyid bigint refere...
true
6d09781656ad8c82a589a5b2e1423a624ff1111b
SQL
evasquezus/MidtermProject
/DB/unha_db.sql
UTF-8
14,554
3.5625
4
[]
no_license
-- 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='ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTI...
true
966562f6fae84d2ecba736c753e5e873327f66e1
SQL
SergeyStrukov/CCore-3-xx
/tools/Volume/test1/test.style.ddl
UTF-8
1,271
2.890625
3
[ "FTL", "BSL-1.0" ]
permissive
/* test.style.ddl */ include <pretext:/Book1.ddl> scope Pages { text BookName = 'test' ; text PageName = 'Content' ; VColor Silver = 0C0C0C0h ; VColor Black = 0h ; VColor Blue = 0FFh ; VColor Green = 8000h ; VColor Wheat = 0F5DEB3h ; VColor Back = Wheat ; VColor Fore = Black ; Point DefaultInner...
true
e9518a947fd13350103ab60029bc76a9e1548dc9
SQL
QUANWEIRU/My-Work-In-OracleEBS
/FND/Concurrent_Program/Q_Resp_Assigned_to_Requestgroup.sql
UTF-8
337
3.140625
3
[]
no_license
SELECT responsibility_name, request_group_name, frg.description FROM fnd_request_groups frg, fnd_responsibility_vl frv WHERE frv.request_group_id = frg.request_group_id --AND request_group_name LIKE 'US SHRMS Reports % Processes' AND responsibility_name LIKE 'XX System Administrator' ORDER BY resp...
true
fbf5b3a279d8eef8fe2b0c36ed9bab6bdc8b9369
SQL
ValdeciPedroso/Miranda
/u879148054_ptrca.sql
UTF-8
3,684
3.15625
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.3.11 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: 25-Set-2015 às 12:52 -- Versão do servidor: 5.6.24 -- PHP Version: 5.6.8 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; ...
true
59e7c8d37205d3c7caeebbd8a6365035fa40057e
SQL
swapnilshetes/service-virtualization
/registration/ionic_db_api.sql
UTF-8
3,150
2.8125
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.7.4 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1:3306 -- Generation Time: Jun 13, 2019 at 11:53 AM -- Server version: 5.7.19 -- 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_CHA...
true
b08f236106edebfc0727da5c1509f9b990aee337
SQL
dblanchard13/bamazon-8
/products.sql
UTF-8
1,476
3.265625
3
[]
no_license
DROP DATABASE IF EXISTS bamazon_db; CREATE DATABASE bamazon_db; use bamazon_db; create table products( item_id INTEGER(30) AUTO_INCREMENT NOT NULL, product_name VARCHAR(30), department_name VARCHAR(30), price INTEGER(1300), stock_quantity INTEGER(100), PRIMARY KEY (item_id) ); insert into products (product_name, de...
true
b0b112d816a703ba0e3d0a8d66437fa0b0517fce
SQL
hetty1120/Database
/query2.sql
UTF-8
308
3.34375
3
[]
no_license
/* Query2 */ /* Count the number of Items (same as auctions) belonging to exactly four categories */ select count(*) from ( select itemID from Category group by itemID having count(*) = 4) as Result; /* Result: +----------+ | count(*) | +----------+ | 8365 | +----------+ 1 row in set (0.03 sec) */
true
c51784c1e81faf4f8b481b1714f9c0f637e4784f
SQL
orfiel004/Urlopy1
/DBurlopy.sql
UTF-8
3,992
3.5625
4
[]
no_license
-- phpMyAdmin SQL Dump -- version 5.0.2 -- https://www.phpmyadmin.net/ -- -- Host: localhost -- Czas generowania: 04 Mar 2021, 19:55 -- Wersja serwera: 10.4.13-MariaDB -- Wersja PHP: 7.4.7 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CH...
true
c0333016768017c146e9c5d2fc9806ecfe662034
SQL
burhansavci/HackerRankSQL
/Contest Leaderboard/Contest Leaderboard Query.sql
UTF-8
510
4.25
4
[]
no_license
SELECT h.hacker_id,h.name,SUM(s.max_score) FROM (SELECT m.max_score,s.hacker_id FROM (SELECT s.challenge_id,s.hacker_id,MAX(s.score) max_score FROM Submissions s GROUP BY s.hacker_id,s.challenge_id) m, Submissions s WHERE m.hacker_id=s.hacker_id AND m.challenge_id=s.challenge_id GRO...
true
28785259a5e201b4ccfc39efb6a7036eb4192e06
SQL
sidgwick/ilegong-web
/data/sql/02/017_update_index_name_for_new_opt_logs.sql
UTF-8
494
2.609375
3
[]
no_license
drop index idx_share_id on cake_new_opt_logs; drop index idx_proxy_id on cake_new_opt_logs; drop index idx_customer_id on cake_new_opt_logs; drop index idx_time on cake_new_opt_logs; alter table cake_new_opt_logs add index idx_new_opt_logs_share_id (share_id); alter table cake_new_opt_logs add index idx_new_opt_logs_p...
true
0434255baff51c337cfd2938f87c49d8744d2b5b
SQL
paan-123/skripsi
/DB/hidayatul_falah.sql
UTF-8
8,926
2.90625
3
[ "MIT", "LicenseRef-scancode-unknown-license-reference" ]
permissive
-- phpMyAdmin SQL Dump -- version 4.7.4 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Oct 04, 2020 at 11:55 PM -- Server version: 10.1.29-MariaDB -- PHP Version: 7.2.0 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD...
true
d6a2652ae9c9bef1e044abc71857a595845d8d1c
SQL
CompileRX8/auction-house
/conf/evolutions/h2/3.sql
UTF-8
270
3.03125
3
[ "Apache-2.0" ]
permissive
# Payment schema # --- !Ups CREATE TABLE PAYMENT ( ID BIGINT IDENTITY(1) PRIMARY KEY, BIDDER_ID BIGINT REFERENCES "BIDDER" (ID) ON DELETE RESTRICT, DESCRIPTION VARCHAR(255) NOT NULL, AMOUNT DECIMAL(20, 2) NOT NULL ); # --- !Downs DROP TABLE PAYMENT;
true
a7785824a157bcb3c9fd96d777185a994a218baa
SQL
Caroline1986/bio-database-exercises
/join_exercises.sql
UTF-8
3,336
4.5
4
[]
no_license
CREATE TABLE roles ( id INT UNSIGNED NOT NULL AUTO_INCREMENT, name VARCHAR(100) NOT NULL, PRIMARY KEY (id) ); CREATE TABLE users ( id INT UNSIGNED NOT NULL AUTO_INCREMENT, name VARCHAR(100) NOT NULL, email VARCHAR(100) NOT NULL, role_id INT UNSIGNED DEFAULT NULL, PRIMARY KEY...
true
1e8d6de28d44a9d8910d560b5cb5169073b4885c
SQL
y1my1/data-science-programming
/SQL/Average-and-rank-with-a-window.sql
UTF-8
2,296
4.09375
4
[]
no_license
/* Part 1: *Context*: Say we have a table salaries in the format: depname | empno | salary | -----------+-------+--------+ develop | 11 | 5200 | develop | 7 | 4200 | develop | 9 | 4500 | develop | 8 | 6000 | develop | 10 | 5200 | personnel | 5 | 3500 | p...
true
9e22e885773972679bb15ec16b18c3641ef012e6
SQL
davidemoraschi/APISA
/PANDAS_MALAGA/test traslados 3.sql
UTF-8
1,155
3.40625
3
[]
no_license
/* Formatted on 5/22/2014 10:06:45 (QP5 v5.163.1008.3004) */ SELECT CH.NATID_EPISODIO, LAST_REFRESH_DATE NATID_FECHA_ULTIMO_REFRESCO, CH.NATID_CAMA, CH.NATID_FECHA, ED.REFERENCIA_ID, TR.TRASLADO_ID, -- RANK () OVER (PARTITION BY TR.ADMISION ORDER BY TR.TRASL...
true
d6f98de2bef7cd9b03b008004ca6414c70f11caf
SQL
cesperanc/moinho
/moinho/src/db/moinho.sql
UTF-8
11,151
3.296875
3
[]
no_license
-- Table: pesos_tbl CREATE TABLE pesos_tbl ( pesoId INTEGER PRIMARY KEY AUTOINCREMENT, a1 NUMERIC DEFAULT ( 0 ), a2 NUMERIC DEFAULT ( 0 ), a3 NUMERIC DEFAULT ( 0 ), a4 NUMERIC ...
true
a31d6d0c4692aca3c96a94d78fc999057857688a
SQL
JaimeGSandoval/wicked-sales-js
/database/dump.sql
UTF-8
15,717
3.125
3
[]
no_license
-- -- PostgreSQL database dump -- -- Dumped from database version 10.12 (Ubuntu 10.12-0ubuntu0.18.04.1) -- Dumped by pg_dump version 10.12 (Ubuntu 10.12-0ubuntu0.18.04.1) SET statement_timeout = 0; SET lock_timeout = 0; SET idle_in_transaction_session_timeout = 0; SET client_encoding = 'UTF8'; SET standard_conforming...
true
8762dea4c325b2564d1ddd32898eec967cd18984
SQL
gfmcoding/ewave-favo-de-mel-pleno-um
/src/Infrastructure.Data/src/Migration/Scripts/V1_0_0__Create_ManageService_Initial_schema.sql
UTF-8
416
3.421875
3
[ "MIT" ]
permissive
CREATE TABLE "order_tab" ( id BIGINT NOT NULL PRIMARY KEY, table_number INT NOT NULL UNIQUE, is_closed BOOL NOT NULL ); CREATE TABLE "order" ( id BIGINT NOT NULL PRIMARY KEY, position INT NOT NULL UNIQUE, name VARCHAR(50) NOT NULL, description VARCHAR(150) NOT NULL, status INT NOT NULL,...
true
204fc09defa67faa786ba7ed896bd4e034cbbf2c
SQL
Prithpal-Sooriya/1st-Year-Object-Oriented-Systems-Development-Java-Exercises
/OOSD/build/classes/Exercises/chap34/examples/sql_scripts_used/search_column_alias_student.sql
UTF-8
121
2.5625
3
[]
no_license
use javabook; -- AS method to give column alias SELECT CONCAT(firstName, ' ', lastName) AS 'Name' FROM Student;
true
612596d4d3e4d25ddb41ce73a2efb38e468ce7bf
SQL
souravrrp/AKG-SCIL-SQL
/QUERY/Queries/From Nazmul/Cost Allowcation ChImrul Sir.sql
UTF-8
654
3.59375
4
[]
no_license
SELECT a.batch_no, a.batch_id,sum(nvl(COST_ALLOC,0)) FROM apps.gme_batch_header a, apps.gme_material_details b, apps.org_organization_definitions ood, apps.gmd_routings_b rt WHERE a.organization_id in(99,606) AND a.batch_id = b.batch_id AND a.organization_id = b...
true
2cef9bde9b1014a1cc7af4d511868a2ac5c27748
SQL
Acelhaka/SQL-SERVER
/acelhaka_single_table_queries.sql
UTF-8
1,089
3.578125
4
[]
no_license
/************************************************************ *Amarilda Celhaka * *Assignment #2 * *Chapter 3: How to retrieve data from a single table * *Due Date: 2/13/2019 * *************************************************************/ /**Problem #1**/ SELECT VendorCont...
true
7ca5ce08a5bb7c16ee71c1126c369af1a3ef3026
SQL
kb-ict/20210111_AI_BigData_class
/안재혁/AI1.sql
UHC
4,121
4.375
4
[]
no_license
--create table emp2 as --(select * from emp); -- --update emp2 set ename='ũ' where empno=7499; --commit; -- --update emp2 set ename='' --where empno=7499; -- --alter table emp2 rename column sal to money; -- --rollback; -- --update emp2 set ename='THISis' --where empno=7499; -- --commit; -- ----alter table emp2 rename ...
true
90fe6fa188117c7aeede21926b2bee3c4a94a1cf
SQL
RicardoBackEndPhp/lista
/lista.sql
UTF-8
3,358
3.328125
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.8.3 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: 01-Abr-2019 às 07:55 -- Versão do servidor: 10.1.37-MariaDB -- versão do PHP: 7.2.12 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @...
true
7a47d1ca4afb23607ff43c8b564c307cc6c8e187
SQL
NurCorezzi/ProjetoBD
/Trigger, Procedure and View/Trigger.sql
ISO-8859-1
573
3.453125
3
[]
no_license
CREATE DEFINER=`root`@`localhost` TRIGGER check_person_count BEFORE UPDATE ON ies FOR EACH ROW BEGIN if ((SELECT count(*) FROM information_schema.COLUMNS WHERE TABLE_SCHEMA = 'csv_bd' AND TABLE_NAME = 'ies' AND COLUMN_NAME = 'QT_DOCENTE_TOTAL') <> 0 ) then begin if (NEW.QT_DOCENTE_TOTAL <= 0 OR NEW....
true
80348609c8d6ee7611d52bf5a17b0b145e38d255
SQL
pradeepchakry/svuapp
/src/main/resources/db_schema.sql
UTF-8
5,245
2.71875
3
[]
no_license
CREATE TABLE `student` ( `student_id` int NOT NULL AUTO_INCREMENT, `name` varchar(255) NOT NULL, `study_centre_id` int DEFAULT NULL, `course_id` int DEFAULT NULL, `app_serial_no` int DE...
true
115f6607264ee6674d8e97098269f08e2c065e11
SQL
kimchangsi/java_web02_teamB
/Scripts/data.sql
UTF-8
7,559
2.90625
3
[]
no_license
insert into menu values(1, '주메뉴'),(2, '부메뉴'),(3, '음료'); load data local infile 'd://foodKind.csv' into table food.foodkind character set 'utf8' fields terminated by ','; load data local infile 'd://food.csv' into table food.food character set 'utf8' fields terminated by ','; insert into grade values ('vip'...
true
dd7574ff5111ac02f28fbcdcb33e7c8eea8fa865
SQL
future4code/Vivian-Costa
/semana16/aula45/movies_table.sql
UTF-8
4,144
4.125
4
[]
no_license
SELECT * FROM `epps-vivian-costa`.Movies; -- Exercício 1 /* A: O comando ALTER TABLE serve para fazer alteracao em uma tabela que ja existe. O DROP COLUMN remove uma coluna. ALTER TABLE Actor DROP COLUMN salary, esse comando ira apagar a coluna salario da tabela Actor. */ /*B: ALTER TABLE Actor CHANGE gender sex VARC...
true
2eaeb7f94eb53a209e9886669230f6e256be879d
SQL
isabella232/earthquake-design-ws
/src/lib/db/metadata/index.sql
UTF-8
314
2.984375
3
[ "LicenseRef-scancode-warranty-disclaimer", "LicenseRef-scancode-public-domain", "CC0-1.0" ]
permissive
CREATE INDEX IF NOT EXISTS region__bounds_idx ON region ( max_latitude, max_longitude, min_latitude, min_longitude ); CREATE INDEX IF NOT EXISTS metadata__documentid_key_idx ON metadata ( document_id, key ); CREATE INDEX IF NOT EXISTS document__regionid_name_idx ON document ( region_id, name );
true
866f97fb234448e34f2ed4593d0252519b698c6f
SQL
fstanchese/corporativo
/corporativo/sql/Matric/Matric_qPrevisaoBolsasIniciante.sql
UTF-8
911
3.515625
4
[]
no_license
select count(matric.id) as ALUNOS, curr.curso_id as Curso_Id, Curso_gsRetNome(curr.curso_id) as CursoNome, Periodo.Nome as Periodo, Periodo.Id as Periodo_Id, Campus_gsRecognize(currofe.campus_id) as Campu...
true
98abe292499d3d7ee4b132f8237c84cd63bf984a
SQL
yunkangmin/sql
/Effective-SQL-master/Oracle/Chapter 08/Listing 8.010.sql
UTF-8
1,028
3.703125
4
[]
no_license
-- Ensure you've run BowlingLeagueStructure.sql -- and BowlingLeagueData.sql in the Sample Databases folder -- in order to run this example. ALTER SESSION SET CURRENT_SCHEMA = BowlingLeagueSample; WITH TeamPairs AS (SELECT ROW_NUMBER() OVER (ORDER BY Teams1.TeamID, Teams2.TeamID) AS GameSeq, Teams...
true
94013ea63520db4fcde2d2e8dae16db8d9a2a5e2
SQL
DaniAngelov/SQL-
/Data Definition Language/Solutions/Summary/Ships.sql
UTF-8
1,818
3.9375
4
[]
no_license
-- github.com/DaniAngelov -- SHIPS: -- 8. -- a) create view Idx_bigger_Battles as select b.name from battles b join outcomes o on b.NAME = o.BATTLE join ships s on s.NAME = o.SHIP group by b.name having COUNT(s.Name) > (select COUNT(s.NAME) from OUTCOMES o join BATTLES b on b.NAME = o.BATTLE join ships s on s.NA...
true
694fff0b8237711483e9baba08658057d613cb5a
SQL
jdutama99/AttendanceRecorder
/attendance/attendance.sql
UTF-8
3,569
3.28125
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 5.0.2 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Mar 4, 2021 at 03:39 PM -- Server version: 10.4.14-MariaDB -- PHP Version: 7.4.9 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT...
true
00c3397056cfdaa1043878efe1158d212615232a
SQL
Lu-Lucifer/LiteCodeCore
/LuckyCore20170718.sql
UTF-8
34,937
3.140625
3
[]
no_license
/* Navicat MySQL Data Transfer Target Server Type : MYSQL Target Server Version : 50716 File Encoding : 65001 Date: 2017-07-18 09:11:23 */ SET FOREIGN_KEY_CHECKS=0; -- ---------------------------- -- Table structure for AspNetRoleClaims -- ---------------------------- DROP TABLE IF EXISTS `AspNetRoleCl...
true
aee7e6c07f3102ded40dded4ec99cb65a53ad679
SQL
PalmBeachPost/voterdata
/setup/history/sql/createtables.sql
UTF-8
1,627
3.4375
3
[]
no_license
SET CLIENT_ENCODING TO UTF8; SET STANDARD_CONFORMING_STRINGS TO ON; /*----------------------------RAW History table--------------------------*/ DROP TABLE IF EXISTS rawHistory CASCADE; CREATE TABLE rawHistory( county varchar, id int, poll_date date, election_type varchar, vote char ); /*-----...
true
c07190de818723d1a9142ae10294ffa7c0004191
SQL
dzungtran/hub-service
/db/init.sql
UTF-8
2,314
3.609375
4
[ "MIT" ]
permissive
GRANT ALL PRIVILEGES ON DATABASE simple_db TO demo; CREATE SEQUENCE IF NOT EXISTS hubs_id_seq; CREATE TABLE "hubs" ( "id" int4 NOT NULL DEFAULT nextval('hubs_id_seq'::regclass), "name" varchar(100) NOT NULL, "geo_location" point, PRIMARY KEY ("id") ); ALTER SEQUENCE hubs_id_se...
true
bc9cded3aefcca71782685fa6766cb2724ae29c0
SQL
radtek/oracle-administration-scripts
/scripts_from_MDBO/SESS_OPEN_CURSOR.sql
UTF-8
737
3.5625
4
[]
no_license
SELECT DISTINCT /*+ ORDERED */ /* This query retrieves all open SQL statements for a session when displaying, you need to join all SQL statements with the same address*/ RAWT...
true
00c64914fa0723ef9bf24a319f39467a18243801
SQL
xionkh1234/NASAprogram
/schema.sql
UTF-8
310
3.15625
3
[]
no_license
CREATE TABLE emails( ID INTEGER PRIMARY KEY AUTOINCREMENT, EMAIL TEXT NOT NULL, UNIQUE(EMAIL) ); CREATE TABLE planets( ID INTEGER PRIMARY KEY AUTOINCREMENT, PLANET_NAME TEXT NOT NULL, DISC_FACILITY TEXT NOT NULL, RELEASE_DATE TEXT NOT NULL, UNIQUE(PLANET_NAME, DISC_FACILITY, RELEASE_DATE) );
true
916ac3278c6d0e51f585734f4c503618a67c8302
SQL
DumeGeorgiana/SGBD
/Code/DCL17.sql
UTF-8
390
2.953125
3
[]
no_license
-- permisiunile la orice nivel SELECT class_desc, permission_name, covering_permission_name, parent_class_desc, parent_covering_permission_name FROM sys.fn_builtin_permissions(DEFAULT) ORDER BY class_desc, permission_name -- permisiuni la nivel de schema SELECT permission_name, covering_permission_name, parent_class_d...
true
5aed06f164a66bce34ee514894deb2dfd5cf8554
SQL
nitinv-optimus/SQL-INDUCTION
/question6.sql
UTF-8
372
4.0625
4
[]
no_license
select dept_name, number_of_employees from ( select dept_name, count(id) AS number_of_employees from employee e, department d where e.dept_id = d.dept_id group by dept_name )a where number_of_employees > 3 select dept_name, count(id) AS number_of_employees from employee e, department d where e.dept_id...
true
5e0615a32620262e52a35a048baf9cce762b09bc
SQL
lucky-luk3/Forense
/Windows/W8Logon.sql
UTF-8
484
3.390625
3
[]
no_license
SELECT COUNT(EventID) AS TotalLogonSuccessfull, TO_LOWERCASE(EXTRACT_TOKEN(Strings,11,'|')) AS SourceAddress, TO_LOWERCASE(EXTRACT_TOKEN(Strings,0,'|')) AS User, TO_LOWERCASE(EXTRACT_TOKEN(Strings,5,'|')) AS WorkStation, TO_LOWERCASE(EXTRACT_TOKEN(Strings,7,'|')) AS CallerDomain INTO SecEvtLogonCOunt.csv FROM se...
true
647eba42513c4d63ea5bc9ac303ebe2fe600ba8d
SQL
gudzek/data_bases
/proj1_ddl_guzek (1).sql
UTF-8
12,392
3.34375
3
[]
no_license
DROP DATABASE IF EXISTS zoo; CREATE DATABASE zoo; USE zoo; SET NAMES utf8; SET character_set_client = utf8mb4; -- Autor: Damian Guzek s167911 -- Instrukcje tworzące bazę danych CREATE TABLE karma ( id_karma INTEGER UNSIGNED NOT NULL AUTO_INCREMENT, nazwa VARCHAR(32) NOT NULL , stan INT NOT NULL DEFAULT...
true
b756c15cb37411088c245ff347ce984a3d20f32b
SQL
dariubs/commit
/sql/users.sql
UTF-8
259
2.734375
3
[]
no_license
CREATE TABLE users ( id serial primary key, fullname text, username text unique not null, token text, token_expire_date timestamp, last_login timestamp, created_at timestamp, updated_at timestamp, deleted_at timestamp );
true
a25e8972f7cd33cad693bc091257c4ba843f473b
SQL
Crislander94/pdo-mvc-mysql-productos
/dumps/test_productos.sql
UTF-8
2,376
3.1875
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 5.0.2 -- https://www.phpmyadmin.net/ -- -- Servidor: 127.0.0.1 -- Tiempo de generación: 04-09-2021 a las 03:09:16 -- Versión del servidor: 10.4.11-MariaDB -- Versión de PHP: 7.4.8 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_...
true
ea815de2b28fbe0e56a78d2385063f0f625bf832
SQL
AGranosik/WasherRev
/WasherRev.Database/Scripts/database schema.sql
UTF-8
4,473
4.53125
5
[]
no_license
-- create database IF (NOT EXISTS (SELECT name FROM dbo.sysdatabases WHERE ('[' + name + ']' = 'WasherRev' OR name = 'WasherRev'))) BEGIN CREATE DATABASE WasherRev; END USE WasherRev; -- building IF NOT EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 'Building') BEGIN CREATE...
true
d54a2ad9a99a055cf36b2a6a63f0ea0232185d7b
SQL
chrislu1207/databases
/server/schema.sql
UTF-8
902
3.734375
4
[]
no_license
CREATE DATABASE chat; USE chat; /* Create other tables and define schemas for them here! */ CREATE TABLE users ( userId int(20), name varchar(20), PRIMARY KEY (userId) ); CREATE TABLE rooms ( roomId int(20), name varchar(20), PRIMARY KEY (roomId) ); CREATE TABLE messages ( /* Describe your table here...
true
dcbe3575b57ce0e7f3c1e68d9e10301f1dc628f8
SQL
fstanchese/corporativo
/corporativo/sql/PostoBanc/PostoBanc_qPercentualTipo.sql
UTF-8
273
2.6875
3
[]
no_license
select to_number_def(replace(replace(substr(transacao,1,10),'_',' '),'.',',')) as VALORTITULO from postobanc where substr(Transacao,12,6) not in ( 'pag_DN', 'pag_CH', 'pag_VD', 'pag_VC' ) and ip = p_PostoBanc_IP and dtprocessamento = p_PostoBanc_DtProcessamento
true
464d1382e7e993c0295e88f0899e3d514791a8aa
SQL
ZavalichiR/Backup
/BD/Laboratoare/laborator 6.sql
UTF-8
6,052
4.28125
4
[]
no_license
/* CAPITOLUL 6 - Expresii aritmetice. Operatori */ -- operatori aritmetici SELECT last_name, salary, salary + 300 FROM employees; SELECT last_name, salary, 12 * salary + 100 FROM employees; SELECT last_name, salary, 12 * (salary + 100) FROM employees; -- definirea valorii nule SELECT last_name, job_id, salary, commi...
true
8459dcbc34629c729208b092b9917d75640859ec
SQL
antlr/grammars-v4
/sql/plsql/examples/merge01.sql
UTF-8
307
3.390625
3
[]
permissive
merge into bonuses d using (select employee_id.* from employees) s on (employee_id = a) when matched then update set d.bonus = bonus delete where (salary > 8000) when not matched then insert (d.employee_id, d.bonus) values (s.employee_id, s.salary) where (s.salary <= 8000)
true
5ac3dd2aba6d7c26d18a2407b1e112860bee95e0
SQL
hillerlab/CESAR2.0
/kent/src/hg/lib/sessionDb.sql
UTF-8
859
3.09375
3
[ "LicenseRef-scancode-other-permissive", "LicenseRef-scancode-proprietary-license", "MIT" ]
permissive
# sessionDb.sql was originally generated by the autoSql program, which also # generated sessionDb.c and sessionDb.h. This creates the database representation of # an object which can be loaded and saved from RAM in a fairly # automatic way. #Session Database CREATE TABLE sessionDb ( id int(10) unsigned not null...
true
7a36f7e994297ee40fa1c59c2df9c0782df9b029
SQL
dennesshen/JavaWebClass
/src/main/java/com/sql/CalcCost.sql
UTF-8
238
3.09375
3
[]
no_license
/*select b.bookName, b.PRICE, b.amount, (b.price * b.AMOUNT) as subtotal from book b order by b.Price asc; -- asc 升冪排列 desc 降冪排列 */ select b.bookName, sum(b.price * b.AMOUNT) as subtotal from book b group by b.BOOKNAME
true
32ad474e048bcb6ef2e6d546b50cf49a1ae1b62b
SQL
it2cgy/it2gradle
/src/main/resources/db/mysql/pvmts_task.sql
UTF-8
874
2.59375
3
[]
no_license
/* Navicat MySQL Data Transfer Source Server : 192.168.101.222 Source Server Version : 50624 Source Host : 192.168.101.222:3306 Source Database : longieb_db Target Server Type : MYSQL Target Server Version : 50624 File Encoding : 65001 Date: 2017-09-26 18:15:36 */ SET FOREIGN_KEY_...
true
c02efea63dd16aa1b902166e901040eb7a0b7df4
SQL
cuba-platform/yarg
/core/modules/core/test/integration/fixture/xlsx_integration_test.sql
UTF-8
1,069
3.8125
4
[ "Apache-2.0" ]
permissive
-- {^} - delimiter for transaction related sql batch -- {;} - delimiter for sql queries drop table if exists xlsx_integration_users; drop table if exists xlsx_integration_income_entry; create table xlsx_integration_users ( id uuid default random_uuid() not null primary key, name_order int not null, name varchar(...
true
abe555ce549fc09f77c7f1820bcf915d6520e8cc
SQL
santhoshkumar22/windmill
/src/main/resources/data.sql
UTF-8
915
2.53125
3
[]
no_license
INSERT INTO WINDMILL_DETAILS (id, uid, name, address, latitude, longitude) VALUES (1,'WINDMILL00000001', 'WINDMILL01', 'Chennai', '14.45666','12.342'), (2,'WINDMILL00000002', 'WINDMILL02', 'Coimbatore','34.3434','34.454555'), (3,'WINDMILL00000003', 'WINDMILL03', 'Madurai','23.34555','33.24324'); INSERT IN...
true
14d31837c6a3153c82f69583f501b462983cce59
SQL
sayyed228/Listing
/local_search_engine.sql
UTF-8
6,498
2.859375
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.2.11 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: Oct 15, 2015 at 07:44 PM -- Server version: 5.6.21 -- PHP Version: 5.5.19 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;...
true
aa7414b1aafb8ae35c675580ffe9e69250c7dfae
SQL
NigelThomas/testinsert
/teststream.sql
UTF-8
723
3.59375
4
[]
no_license
create or replace schema "testinsert"; set schema '"testinsert"'; create or replace stream "testinsert"."insertstream" ( thread integer , batch integer , rec integer , d1 double , d2 double , vc1 varchar(100) , vc2 varchar(100) ); create or replace view "testinsert"."monitorview1" AS select stream * , count(*) over (...
true
014fb959904e14dc8abb54efae0b6883c3e5ed55
SQL
ecuadrados/inscripcion
/database/inscripcion.sql
UTF-8
5,339
3.15625
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.9.0.1 -- https://www.phpmyadmin.net/ -- -- Servidor: 127.0.0.1 -- Tiempo de generación: 28-05-2021 a las 04:22:04 -- 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
98bd8f55f3779232ea0370575acf3925062e6fd4
SQL
gopib1980/EODStkMktData
/sql/DDL_queries.sql
UTF-8
2,725
4.09375
4
[]
no_license
-- create database create database if not exists stocks comment "This is a hive database for a POC project on stock price analysis application"; use stocks; -- create the landing table eod_stock_data_landing create external table if not exists eod_stock_data_landing ( symbol string, tdate ...
true
e84aedf72de5a6ea3afe8dc5d990bf04b2417403
SQL
FoxComm/highlander
/phoenix-scala/sql/V2.002__create_promotion_discount_links.sql
UTF-8
681
3.828125
4
[ "MIT" ]
permissive
create table promotion_discount_links( id serial primary key, left_id integer not null references promotions(id) on update restrict on delete restrict, right_id integer not null references discounts(id) on update restrict on delete restrict, created_at generic_timestamp, updated_at generic_timestam...
true
8fd8a19e840951573f2a427f0077f0c977be001a
SQL
trinalee/school_lms1
/src/main/resources/db/migration/V4__update_klasses_table_to_add_teacherId.sql
UTF-8
143
2.65625
3
[]
no_license
ALTER TABLE klasses ADD teacher_id INT NULL; ALTER TABLE klasses ADD CONSTRAINT fk_teacher_id FOREIGN KEY (teacher_id) REFERENCES teachers(id);
true
4e176970f8206ca43cb0e5f10f3299f1ec90ccd5
SQL
paultag/openFEC
/data/ddl/keys_processed.sql
UTF-8
8,169
3.203125
3
[ "CC0-1.0", "LicenseRef-scancode-public-domain" ]
permissive
-- Still experimental effort to set up indexes, including primary keys, -- on the PROCESSED schema after it is imported from CFDM. Most of -- the foreign keys must be set up as NOT VALID, however (not enforced -- because PROCESSED data quality is too low. -- ref_cand_ici: nothing -- ref_cand_status: nothing SET searc...
true
725188c68d992e6243fdc2bd97c4762055e8e199
SQL
legscars/m-domotique
/mdomotique-ws/domotiqueDB.sql
UTF-8
2,031
3.671875
4
[]
no_license
CREATE TABLE USERS ( ID INTEGER NOT NULL GENERATED ALWAYS AS IDENTITY CONSTRAINT user_pk PRIMARY KEY, NOM Varchar(30) NOT NULL , PRENOM Varchar(30) NOT NULL , LOGIN Varchar(30) NOT NULL , PASSWORD Varchar(30) NOT NULL ); CREATE TABLE TYPE_PIECE( ID Integer NOT NULL GENERATED ALWAYS AS IDEN...
true
a12c85a384ac74218d66dc364b5ce5598b1b17f1
SQL
gchacaltana/Taller_SQL_Oracle_Live
/Ejercicio_11.sql
UTF-8
248
4
4
[]
no_license
SELECT (e.first_name || ' ' || e.last_name) "Empleado", COUNT(jh.employee_id) "Rotaciones" FROM hr.job_history jh INNER JOIN hr.employees e ON jh.employee_id=e.employee_id GROUP BY (e.first_name || ' ' || e.last_name) HAVING COUNT(jh.employee_id)>1
true
ddaacf52a4761b58e8b1b8c87ff70b055e87c52f
SQL
opendcs/opendcs
/schema/cwms/roles.sql
UTF-8
4,463
3.03125
3
[ "Apache-2.0" ]
permissive
-------------------------------------------------------------------------- -- Create roles for CCP CWMS 3.0 -- Maintainer: Cove Software, LLC -------------------------------------------------------------------------- ----------------------------------------------------------------------------- -- This software was wri...
true
ec35bfca49c4773c8bde7e8e1c120b7a790d11d3
SQL
orosz-usgs/schema-wqp-core
/liquibase/changeLogs/wqp/schemaLoad/tables/resultSum/detachPartitions.sql
UTF-8
550
2.859375
3
[]
no_license
-- This script perform step one of changing a partition parent table to logged. -- Due to postgres bug, the partitions must be detached first, -- table dropped and recreated, then the partitions reattached. ALTER TABLE wqp.result_sum DETACH PARTITION wqp.result_sum_nwis; ALTER TABLE wqp.result_sum_nwis set logged; AL...
true
e5e8381ad1ceebd48c8c54a23f299140f41a0284
SQL
Protirus/Symantec-DLP-SQL
/scripts/TotalEstateScanned.sql
UTF-8
292
3.25
3
[ "MIT" ]
permissive
SELECT B.NAME ,SUM(A.NUMBERRETRIEVEDFILES) Files_Scanned ,SUM(A.ITEMSFILTERED) FILES_FILTERED ,SUM(A.ITEMSFILTERED + A.NUMBERRETRIEVEDFILES) TOTAL_FILES ,SUM (TRUNC(BYTESSCANNED*1e-9 ,2))as GB_SCANNED FROM WALK A LEFT OUTER JOIN SCANASSIGNMENT B ON B.COURSEID = A.COURSEID GROUP BY B.NAME;
true
80980bce0020eec428be99a35cafcbc26eb156b5
SQL
jgarzonext/paquetes
/PAC_MD_MAP.sql
UTF-8
9,956
2.734375
3
[]
no_license
-------------------------------------------------------- -- DDL for Package PAC_MD_MAP -------------------------------------------------------- CREATE OR REPLACE EDITIONABLE PACKAGE "AXIS"."PAC_MD_MAP" IS /****************************************************************************** NOMBRE: PAC_MD_MA...
true
584a1b6b3b7df5fd0a8803fc80f75218936b653c
SQL
wilkersoh/graphql-prisma
/prisma/migrations/20210711091403_add_card_model/migration.sql
UTF-8
452
2.578125
3
[]
no_license
-- CreateTable CREATE TABLE `card` ( `id` INTEGER NOT NULL AUTO_INCREMENT, `name` VARCHAR(191) NOT NULL, `email` VARCHAR(191) NOT NULL, `phone` VARCHAR(191) NOT NULL, `biography` VARCHAR(191) NOT NULL, `cardId` VARCHAR(191) NOT NULL, `twitter` VARCHAR(191) NOT NULL, `github` VARCHAR(191)...
true
29f31b881027ab16eb21d152b0f9d12503d8b571
SQL
lovepsone/WebClearFusion
/sql/wcf_r393_create_table.sql
UTF-8
6,408
3.34375
3
[]
no_license
DROP TABLE IF EXISTS `wcf_comments`; CREATE TABLE `wcf_comments` ( `comment_id` int(11) unsigned NOT NULL auto_increment, `comment_item_id` int(11) unsigned default '0', `comment_date` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, `comment_type` int(2) unsigned default '0', `user_...
true
f33241b9967155fa4ba32371d3bbd9e296ce5a02
SQL
evancekafando/application-interactive-console-gestion-d-une-base-de-donnees-de-programmation-cinematographique
/Version C++14/package_cinema.sql
UTF-8
11,948
3.78125
4
[]
no_license
-- PACKAGE de procédures stockés pour faire différentes requêtes -- CREATE OR REPLACE PACKAGE CINEMA AS -- Procédure pour faire l'insertion dans la table t_acteur PROCEDURE insert_acteur ( in_idAct IN t_acteur.idAct%TYPE, in_noma IN t_acteur.noma%TYPE, in_ddna IN t_acteur.ddna%TYPE, ...
true
2b0946c0667395c78ad6ceb2a4506ae4144b134b
SQL
mai0214cs/design
/managershop.sql
UTF-8
16,082
3.34375
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.5.1 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: May 13, 2016 at 09:07 AM -- Server version: 10.1.13-MariaDB -- PHP Version: 5.6.20 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CL...
true
aee5941da91434844f7b64645118ac0f972caa17
SQL
matiasb/fiveserver
/sql/alter_001_add_settings.sql
UTF-8
332
3.171875
3
[ "BSD-2-Clause", "BSD-3-Clause" ]
permissive
create table if not exists settings ( id bigint unsigned not null auto_increment, profile_id int unsigned not null, settings1 blob default null, settings2 blob default null, primary key(id), unique key(profile_id), foreign key(profile_id) references profiles (id) ) Engine=InnoDB default cha...
true
6d377a124cd6a393f53a9096c198151c8d3a6bd5
SQL
RodNick10/NewBurger
/Lunch/db/schema.sql
UTF-8
196
2.6875
3
[]
no_license
### Schema CREATE DATABASE lunch_db; USE lunch_db; CREATE TABLE burger ( id int NOT NULL AUTO_INCREMENT, name varchar (255) NOT NULL, TastyName BOOLEAN DEFAULT false, PRIMARY KEY (id) );
true
a5586a6107c6c05b17eb7a7d2a84d26cbaef5fe3
SQL
henriqueprj/spring-boot-tj
/src/main/resources/import.sql
UTF-8
2,162
2.734375
3
[]
no_license
-- -- Dataset de importação de dados para exemplo do sistema, carregados ao subir a aplicação em seu banco em memória -- -- ================================================================================================= -- Comarca Cuiabá insert into comarca (nome) values ('Cuiabá') -- ============================...
true
f43371bd44bb1ccc3c4b1ecb3ff3c7e648dc6da5
SQL
LynxDevelopment/SDMWeb
/SDMWeb/script_db/mysql/core/create/01_tables.sql
UTF-8
8,117
3.328125
3
[]
no_license
SET sql_mode='ANSI_QUOTES'; CREATE TABLE TB_EVENT_TYPE ( TYPE_ID INTEGER NOT NULL, DESCRIPTION VARCHAR(250) NULL, CONSTRAINT PK_TAB_ENV_EVENT_TYPE PRIMARY KEY (TYPE_ID) )ENGINE=INNODB; CREATE TABLE TB_EVENTS ( EVENT_TIME DATE NOT NULL, USER_ID ...
true
8b82455fcde6dcea361056afbc5602acc009f6b2
SQL
logicalclick/web
/sql/Tamara/ask_in_a_Google interview.sql
UTF-8
297
3.78125
4
[ "MIT" ]
permissive
SELECT distinct user.Name, user.phone_num, userhistory.date from user inner join userhistory on user.user_id = userhistory.user_id where date_sub(now(), INTERVAL 30 day)<userhistory.date; SELECT * From user WHERE user_id NOT IN (SELECT user_id FROM userhistory where action='logged_on');
true
d1c3297679c4f45aeddce9f1d54dcb2fb5bc6e44
SQL
feisishui/oracle-spatial-workshop
/Workshop_Files/labs/14-routing-server/router_memory.sql
UTF-8
1,339
3.140625
3
[]
no_license
create or replace function router_memory ( PartitionCacheSize number, AvgNodesPartition number := 26000, NodesPartition0 number := 15000000, NodesPerGigabyte number := 15000000 ) return number /* * PartitionCacheSize is the number of partitions you want to retain in memory (value of the partition_...
true
001a803c1978edd0f86b083f4d37b76b0af22e62
SQL
tequila99/fastify-farm
/db/dict/unit.sql
UTF-8
1,910
3.46875
3
[]
no_license
DROP TABLE IF EXISTS dict_unit CASCADE; CREATE TABLE dict_unit ( id char(3) PRIMARY KEY, name varchar(10) NOT NULL, eng_name varchar(10), full_name varchar(50), dict_type_unit_id bigint references dict_type_unit(id) ); COMMENT ON TABLE dict_unit IS 'Справочни...
true