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
7c7f5a69933d30dc89eb1927ea923055112a9248
SQL
mkamel44/my-Old-PHP-Sites
/مشروع المدرسة السنة الخامسة انور و شيراف و حمزة/المشروع/epiz_23558290_lolo.sql
UTF-8
7,182
3.046875
3
[]
no_license
-- Adminer 4.7.1 MySQL dump SET NAMES utf8; SET time_zone = '+00:00'; SET foreign_key_checks = 0; SET sql_mode = 'NO_AUTO_VALUE_ON_ZERO'; DROP TABLE IF EXISTS `admin`; CREATE TABLE `admin` ( `id` int(11) NOT NULL AUTO_INCREMENT, `name` text NOT NULL, `pass` text NOT NULL, PRIMARY KEY (`id`) ) ENGINE=MyISAM D...
true
9d8cec41651ac18542b8c3761a8239cc527c72fa
SQL
jsdelivrbot/MyEndeavours
/JDEV11G/SOAApp/ETH_Called_Bean/ETH_COMMON_COMPLIANCE_WRAA.sql
UTF-8
3,743
3.546875
4
[]
no_license
-- Declare the SQL type for the PL/SQL type ETH_COMMON_SERVICES_PKG.IDVAL_REC -- uncomment to overwrite existing types -- CREATE OR REPLACE TYPE ETH_COMMON_SERVICX111792X7X5 AS OBJECT ( -- ID NUMBER, -- VALUE VARCHAR2(60)-- -- ); -- / -- show errors -- uncomment to overwrite existing types -- CREATE OR REP...
true
b6da20626f7c6f435a9798cb675749498085a1d8
SQL
petermrecords/phase-0-tracks
/databases/solo_project/queries.sql
UTF-8
1,035
3.875
4
[]
no_license
--1 SELECT * FROM houses; 1|10|Frank Menniti|1 2|3|Bob Petersen|2 3|9|Mr. Brown|1 4|7|Mrs. Hall|1 --2 UPDATE houses SET residents_name = 'Mr. Brown Jr.' WHERE residents_name = 'Mr. Brown'; --3 SELECT houses.*, streets.* FROM houses INNER JOIN streets ON streets.id = houses.street_id; 1|10|Frank Menniti|1|1|Reyno...
true
1275b51ffeb18060d7717e0c7ad9db0df40b4ffb
SQL
MauroCortez/Senai_2S_2Dev
/Sprint1_BD/DDL/pclinics_03_DQL.sql
UTF-8
976
3.703125
4
[]
no_license
USE Pclinics; SELECT Funcionarios.Nome, Funcionarios.CRMV, Clinicas.Nome AS Clinica FROM Funcionarios INNER JOIN Clinicas ON Funcionarios.idClinica = Clinicas.idClinica SELECT Racas.Nome AS 'Ra�a' FROM Racas WHERE Nome LIKE 'S%' SELECT Tipos.Nome AS Tipo FROM Tipos WHERE Nome LIKE '%o' SELECT Pets.Nome AS Pet, Dono...
true
11de852027cca2f3ab0066da66a6f42507f90ecf
SQL
yacinekedidi/holbertonschool-higher_level_programming
/0x0E-SQL_more_queries/5-unique_id.sql
UTF-8
169
2.59375
3
[]
no_license
-- script that creates the table unique_id on your MySQL server. -- QUERY CREATE TABLE IF NOT EXISTS `unique_id` (id INT DEFAULT 1, name VARCHAR(256), PRIMARY KEY(id));
true
9b438e5db38786f2c4e662569fed5813195a34b2
SQL
carolinapatino/App-Oportunidades
/Ecuador/Config BD/Insert.sql
UTF-8
2,873
3.046875
3
[]
no_license
-- Estatus INSERT INTO Estatus (NombreEstatus,Descripcion) VALUES ('Abierta','Existen acciones en curso'); INSERT INTO Estatus (NombreEstatus,Descripcion) VALUES ('Fallida','No se concretó la venta'); INSERT INTO Estatus (NombreEstatus,Descripcion) VALUES ('Facturada','Se concretó la venta'); INSERT INTO Estatus (Nomb...
true
5df4a9228f7f0d203f1ec95bca80dcc77f30e3ee
SQL
chinhlk81/PL-SQL
/db/tables/ep_dm_period_type.sql
UTF-8
651
2.984375
3
[]
no_license
drop table ep_dm_period_type; create table ep_dm_period_type ( pety_period_type_id number(4), pety_period_type_name varchar2(128), pety_period_type_desc varchar2(128), pety_create_user varchar2(64), pety_update_user varchar2(64), pety_create_datetime timestamp(6), pety_update_datetime times...
true
05738fff744add4a8653a91af0bb04316e5d1647
SQL
KyleTrippK/News-API
/src/main/resources/db/create.sql
UTF-8
638
3.4375
3
[ "LicenseRef-scancode-other-permissive", "MIT" ]
permissive
SET MODE PostgreSQL; -- --CREATE DATABASE news; --CREATE DATABASE news_test WITH TEMPLATE news; --\c news CREATE TABLE IF NOT EXISTS users ( id int PRIMARY KEY auto_increment, name VARCHAR, userDeparment VARCHAR, userPosition VARCHAR, role VARCHAR ); CREATE TABLE IF NOT EXISTS departments ( id int PRIMARY KEY aut...
true
7d92c5b62c5dcc7e1f3f5f14ac9be2c64f0a286b
SQL
wlswhr160/cloud-computing
/02.DB/mysql/HR_demo3.sql
UTF-8
2,779
4.71875
5
[]
no_license
[1] HR 스키마에 있는 Employees, Departments 테이블의 구조를 파악한 후 사원수가 5명 이상인 부서의 부서명과 사원수를 출력하시오. 이때 사원수가 많은 순으로 정렬하시오. - employees, departments select e.department_id, d.department_name , count(e.department_id) from employees as e join departments d on e.department_id=d.department_id group by department_id having count(e.empl...
true
267491d2f2d2769e655296c6b1d9427ab6e0db6e
SQL
thisdotrob/wonkyTomato_blitzJS
/db/migrations/20211003192316_add_organization_and_membership_models/migration.sql
UTF-8
1,495
4.03125
4
[]
no_license
-- CreateEnum CREATE TYPE "MembershipRole" AS ENUM ('OWNER', 'ADMIN', 'USER'); -- DropForeignKey ALTER TABLE "Token" DROP CONSTRAINT "Token_userId_fkey"; -- CreateTable CREATE TABLE "Organization" ( "id" SERIAL NOT NULL, "name" TEXT NOT NULL, CONSTRAINT "Organization_pkey" PRIMARY KEY ("id") ); -- Creat...
true
72650da5836484d201d33c66c2f9c53c370c746e
SQL
charles-wangkai/leetcode
/drop-type-1-orders-for-customers-with-type-0-orders.sql
UTF-8
197
3.234375
3
[]
no_license
SELECT * FROM Orders o WHERE NOT EXISTS ( SELECT 1 FROM Orders o1 WHERE o1.customer_id = o.customer_id AND o.order_type = 1 AND o1.order_type = 0 )
true
e123b4aeb788c9091490138588fecf7ec8de74db
SQL
KyleRudolph1/Data-Analysis-Project
/Microsoft SQL (Covid-19 world data).sql
UTF-8
4,134
4.03125
4
[]
no_license
Select * From PortfolioProject..CovidDeaths Where continent is not null order by 3,4 --Select * --From PortfolioProject..CovidVaccinations --order by 3,4 Select Location, date, total_cases, new_cases, total_deaths, population From PortfolioProject..CovidDeaths order by 1,2 --total cases vs total deaths...
true
ea9944921f9399579d5dfdb48696fc13437f749b
SQL
rendy-ananda/php-mysql-pagination
/pagination_db.sql
UTF-8
1,166
3.390625
3
[]
no_license
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET NAMES utf8 */; /*!50503 SET NAMES utf8mb4 */; /*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; CREATE DATABASE IF NOT EXIST...
true
466f4ce98a3dffbb86cdd4f6549fe2d84a35b659
SQL
rogeliomolina1/CMPS-180
/Lab3/queryview.sql
UTF-8
1,269
3.84375
4
[]
no_license
SELECT e.exchangeName, s.stockName, COUNT(q.symbol) AS numHighClosings FROM Exchanges e, Stocks s, QuotesSummary q WHERE q.closingPrice = q.highPrice AND e.exchangeID = q.exchangeID AND s.symbol = q.symbol AND s.exchangeID = q.exchangeID GROUP BY q.symbol, e.exchangeName, s.stockName HAVI...
true
d4e530e18e1e8d9464fce108f0e9d389bb51a948
SQL
Shaphen/a-A_Classwork
/Week_Five/D3/AA_QA/import_db.sql
UTF-8
1,180
4.09375
4
[]
no_license
-- PRAGMA foreign_keys = ON; DROP TABLE IF EXISTS user; DROP TABLE IF EXISTS questions; DROP TABLE IF EXISTS question_follows; DROP TABLE IF EXISTS question_likes; DROP TABLE IF EXISTS replies; CREATE TABLE user ( id INTEGER PRIMARY KEY, fname text, lname text ); CREATE TABLE questions ( id INTEGER PRIMARY KE...
true
50d199221cea189cbee3b8f4e03c88c1956aaf79
SQL
WeiWill0605/sql
/dev/techjobDEV.sql
UTF-8
1,106
3
3
[]
no_license
SELECT * FROM eventlogs.event_techjobsaction ORDER BY 1 DESC; SELECT * FROM eventlogs.event_techjobsaction WHERE runid = '14076' AND SeverityId > 2 ORDER BY 1 DESC; SELECT * FROM pri_zwei.tech_company_list ; ## update pri_zwei.tech_company_list set processed = 1 SELECT * FROM eventlogs.event_TechJobsHKAction ORDER BY...
true
f3b0ed79b2f8afa6de3ee8b72fed83ef621dccf6
SQL
finalsatan/PersonalBlog
/backup/add_push_option_table.sql
UTF-8
447
2.734375
3
[]
no_license
-- schema.sql use personalblog; create table push_options ( `id` varchar(50) not null, `user_id` varchar(50) not null, `user_email` varchar(50) not null, `need_push` bool not null, `posts_type` varchar(50) not null, `keywords` varchar(500), `created_at` real not null, unique key `id...
true
ff6f7c58dd6e79a0140d9b47659bafe6467f7bf5
SQL
neurotech/edumate-extensions
/sql/staff/staff-wwc-info.sql
UTF-8
677
3.96875
4
[]
no_license
SELECT COALESCE(contact.preferred_name, contact.firstname) || ' ' || contact.surname AS "STAFF_NAME", contact.email_address, COALESCE(contact.wwc_number, '') AS "WWC_NUMBER", COALESCE(TO_CHAR(contact.wwc_expiry_date, 'DD Month YYYY'), '') AS "WWC_EXPIRY_DATE" FROM group_membership gm INNER JOIN staff ON staff...
true
d4b24c2ba8a3d99b08d15e9716ed03c40aafc4ce
SQL
ArmanMikayelovich/java-jta-jpa-logback
/src/main/resources/DDL.sql
UTF-8
382
2.9375
3
[]
no_license
create table if not exists web.users ( username varchar(25) not null primary key , password varchar(25) not null, birthday date not null, email varchar(255) not null, country varchar(50) not null, isAdmin tinyint(1) default 0 not null, ...
true
ec17a6266f6639897ebb28e6abdc95d1ce4a1133
SQL
bbixby1764/CcCodesample
/childcare/childcare.sql
UTF-8
613
2.71875
3
[]
no_license
CREATE childcaredb; SELECT childcaredb; CREATE Table Employees(empID INTEGER PRIMARY KEY, employee_last_name VARCHAR(100),employee_first_name VARCHAR(100)); INSERT INTO Employees VALUES(1,'Doe','John'); INSERT INTO Employees VALUES(2,'Smill', 'Bill'); INSERT INTO Employees VALUES(3,'McDonald', 'Trisha'); INSERT INTO Em...
true
6bddaee8f3e7f250d09f9141a7a9196be98a0546
SQL
toanht15/moni
/apps/plugins/db_sql/getUserAnswerList.sql
UTF-8
945
3.796875
4
[]
no_license
SELECT bur.id bur_id, bur.no, u.name, u.profile_image_url, cuas.created_at, qua.approval_status FROM cp_user_action_statuses cuas LEFT JOIN cp_users cu ON cu.id = cuas.cp_user_id AND cu.del_flg = 0 LEFT JOIN brands_users_relations bur ON bur.user_id = cu.user_id AND bur.del_flg = 0 LEFT JOIN...
true
23421d941f6501678e4b759fde135326675ddbba
SQL
KazumasaYasui/docker-lesson
/chapter2/lesson2/db/sql.d/setup.sql
UTF-8
1,048
3.3125
3
[]
no_license
CREATE USER 'sampleapp'@'%' IDENTIFIED BY 'sampleapp_pw'; GRANT ALL PRIVILEGES ON sampleapp_development.* TO 'sampleapp'@'%'; FLUSH PRIVILEGES; DROP DATABASE IF EXISTS sampleapp_development; CREATE DATABASE sampleapp_development; USE sampleapp_development; SET CHARACTER_SET_CLIENT = utf8mb4; SET CHARACTER_SET_CONNEC...
true
680c7f226d258dce0ad08e953a65dc3177fed0bb
SQL
lhcaleo/CodingChallenges
/Leetcode_Database/177. Nth Highest Salary.sql
UTF-8
222
3.40625
3
[]
no_license
CREATE FUNCTION getNthHighestSalary(N INT) RETURNS INT BEGIN SET N = N - 1; -- index offset RETURN ( SELECT DISTINCT Salary FROM Employee ORDER BY Salary DESC LIMIT N, 1 ); END
true
e338e7797e223333370b4056504d7d2afb9e30c9
SQL
sriyabhat/BootcampX
/0_selects/3_group_by_having.sql
UTF-8
244
4.03125
4
[]
no_license
SELECT students.name, COUNT(assignment_submissions.id) as total_submissions FROM assignment_submissions JOIN students ON students.id = student_id WHERE students.end_date IS NULL GROUP BY students.id HAVING COUNT(assignment_submissions.id) < 100
true
47d6cd19e9e0cff8eca2373aa0dea5563d3c159c
SQL
tracynle/pokemon_mgmt
/models/db/schema.sql
UTF-8
756
3.640625
4
[]
no_license
-- Drops db if it currently exists -- DROP DATABASE IF EXISTS pokemon_db; CREATE DATABASE pokemon_db; USE pokemon_db; -- Trainer table -- CREATE TABLE Trainer ( name VARCHAR (50), pokemon_owned VARCHAR(50) ); -- Pokemon table -- CREATE TABLE Pokemon ( ID INTEGER(10), name VARCHAR (50), move VARCH...
true
3aa5de91ff79f2f590dd319b8419670ab6f25bc5
SQL
mbarbuscio/cronos
/CronosDB/Cronos/StaticData.PostDeployment.sql
UTF-8
902
2.96875
3
[]
no_license
/* Post-Deployment Script Template -------------------------------------------------------------------------------------- This file contains SQL statements that will be appended to the build script. Use SQLCMD syntax to include a file in the post-deployment script. Ex...
true
636950ca7aa9d5634f226378f5baf99665c16291
SQL
chirchirbitok/saccoDB.sql
/mydb.sql
UTF-8
26,710
3.375
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 5.0.3 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Oct 03, 2021 at 06:57 PM -- Server version: 8.0.22 -- PHP Version: 7.4.11 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHAR...
true
68fffe47b1b2cf7cbe7e738368b425b68ba05a4a
SQL
Soumyadipta007/EmployeePayroll
/PayrollService/uc7_UsingAggregateFunctions.sql
UTF-8
507
2.734375
3
[]
no_license
update employee_payroll set gender ='F' where name='Teresa' select sum(salary) from employee_payroll where gender='F' group by gender select avg(salary) from employee_payroll where gender='F' group by gender select min(salary) from employee_payroll where gender='M' group by gender select max(salary) from employee_payro...
true
34957f2dd8c9f0073181ea5f26e60dad0a633aa8
SQL
fjparedesb/transfers
/protected/data/tbl_zonas.sql
UTF-8
664
3.375
3
[]
no_license
CREATE TABLE IF NOT EXISTS `transfers`.`tbl_zonas` ( `idcia` BIGINT NOT NULL, `idzona` BIGINT NOT NULL AUTO_INCREMENT, `codigo` VARCHAR(10) NOT NULL, `desc` VARCHAR(120) NOT NULL, `estatus` VARCHAR(1) NOT NULL, `usralta` BIGINT NOT NULL, `fecha_alta` DATE NOT NULL, `hora_alta` VARCHAR(8) NOT NULL, `us...
true
f78c87c3229cad2a4105e4740b77bd5b619f7c1e
SQL
hqottsz/MXI
/am-query-test/src/main/resources/com/mxi/mx/core/query/user/FindAllUserAccountsTest.sql
UTF-8
1,777
2.734375
3
[]
no_license
-- add 4 users INSERT INTO UTL_USER (USER_ID, UTL_ID, USERNAME, FIRST_NAME, LAST_NAME, MIDDLE_NAME, EMAIL_ADDR, ALERT_EMAIL_ADDR) VALUES (999000,0,'user1','first1','last1','mid1','email1','alert1'); INSERT INTO UTL_USER (USER_ID, UTL_ID, USERNAME, FIRST_NAME, LAST_NAME, MIDDLE_NAME, EMAIL_ADDR, ALERT_EMAIL_ADDR) VALUES...
true
90f317e5f9705bdab64e58f451dd3e0b68ddb5f0
SQL
fcgll520/kore.io_websocket
/sql/session.sql
UTF-8
610
3.203125
3
[]
no_license
-- secure signed cookie https://www.meetspaceapp.com/2016/04/19/cookie-signing-postgresql.html create extension pgcrypto; create table session( id uuid not null default gen_random_uuid(), user_id uuid not null, key text not null default gen_salt('md5')); insert into session(user_id) values(gen_random_uuid()); select(...
true
385b5c4e604dd253cebafed9b2ebf1acf871c667
SQL
medy13/dbshell
/normal_shell/DST_DEDUCT.sql
UTF-8
859
2.546875
3
[]
no_license
\echo ------------------DST_DEDUCT---------------- select now(); \timing insert into DST_DEDUCT_GPTMP (CMD_TYPE,PRE_NO, G_NO, ORIGIN_COUNTRY, ENTRY_ID, ENTRY_G_NO) select CMD_TYPE,PRE_NO, G_NO, ORIGIN_COUNTRY, ENTRY_ID, ENTRY_G_NO from DST_DEDUCT_INC_EXT; delete from DST_DEDUCT using DST_DEDUCT_GPTMP where DST_DEDUCT_...
true
c0ee713f1132dc35afa86beffa7e016b6d1f5fcc
SQL
julbarg/CPYMESS
/src/main/webapp/resources/sql/008_CPyMES.sql
UTF-8
835
2.75
3
[]
no_license
-- ============================================= -- Author: Julian Barragan Verano -- Create date: 13-MAY-2015 -- Description: ROLLBACK TABLES Project CPyMES - IVR Seguridad -- Name SQL: 008_CPyMES.sql -- ============================================= DROP PROCEDURE KOU_ADM.TRUNCAR_ALARMA_SERVICIO_NIT; DROP PROCEDURE...
true
bf22fa987be8761f079953b3f85b4e0cd10a3b03
SQL
Joohan-Park/sql
/practice01/Worksheet 16.sql
UTF-8
876
4.375
4
[]
no_license
--문) 각 부서별로 최고 연봉을 받는 직원의 이름과 연봉을 출력 select max(salary) from employees group by department_id; --Multi row query select first_name,salary from employees where(department_id, salary) in(select department_id, max(salary) from employees group by department_id); select first_name,salary from employees where(depa...
true
db17f7a977d8063273fd27bb35a6e780add55640
SQL
KH-Helkanes/newOneChoSemi
/newOneChoSemi/src/sql/script/onecho(0608).sql
UTF-8
35,952
3.5625
4
[]
no_license
-- 테이블 삭제 DROP TABLE ITEMIMAGE CASCADE CONSTRAINTS; PROMPT DROPPING ITEMIMAGE... DROP TABLE NOTICE CASCADE CONSTRAINTS; PROMPT DROPPING NOTICE... DROP TABLE QNA CASCADE CONSTRAINTS; PROMPT DROPPING QNA... DROP TABLE REVIEW CASCADE CONSTRAINTS; PROMPT DROPPING REVIEW... DROP TABLE STATISTIC CASCADE CONSTRAINTS; PROMPT D...
true
328e74b6f13f20811830be5845c23ff7254011d3
SQL
gruter/tajo-elasticsearch
/tajo-core/src/test/resources/queries/TestWindowQuery/testLeadWithDefault.sql
UTF-8
1,133
2.96875
3
[ "Apache-2.0", "PostgreSQL", "BSD-3-Clause", "MIT" ]
permissive
SELECT lead(l_shipmode, 1, 'default') over (PARTITION BY L_ORDERKEY order by l_shipmode ) as shipmode_lead, lead(l_linenumber, 1, 100) over (PARTITION BY L_ORDERKEY order by l_shipmode ) as linenumber_lead, lead(l_suppkey_t, 1, 1000::int8) over (PARTITION BY L_ORDERKEY order by l_shipmode ) as suppkey_lead, lea...
true
ae919fd6d87e2ec920495002eb5c75f4e8a92e15
SQL
alexbartley/SOCO-Test
/104909/CONTENT_REPO/Views/V_INVOICE_STATEMENT.sql
UTF-8
1,032
3.28125
3
[]
no_license
CREATE OR REPLACE FORCE VIEW content_repo.v_invoice_statement (juris_tax_applicability_id,"ID",juris_tax_imposition_id,start_date,end_date,nkid,rid,entered_by,status,status_modified_date,entered_date,next_rid,jta_id,jta_nkid,juris_tax_imposition_nkid,ref_rule_order,tax_type,short_text) AS SELECT DISTINCT jta.id juris_t...
true
068b9085b91710b3e938cb51925f9c8a744f086a
SQL
gustawdaniel/pricing
/src/AppBundle/Resources/sql/00_Main.sql
UTF-8
491
2.65625
3
[ "MIT", "BSD-3-Clause" ]
permissive
-- Creating pure database DROP DATABASE IF EXISTS dp_operative; CREATE DATABASE IF NOT EXISTS dp_operative DEFAULT CHARACTER SET = 'utf8' DEFAULT COLLATE 'utf8_unicode_ci'; -- Efficiency -> utf8_general_ci -- Sort correction -> utf8_unicode_ci. USE dp_operative; -- Creating tables. SOURCE 01_Tax.s...
true
1f866039b7b7c9b85f1e51f0707dc410b394c946
SQL
beatrizodorcik/modulo-2
/Banco de Dados/Ex 01-12/ex7-locadora.sql
UTF-8
3,962
3.09375
3
[]
no_license
-- create database db_locadora; /* use db_locadora; create table tb_filmes ( id int (4) auto_increment, nome varchar (30) not null, anolanc int (4) not null, categoria varchar (40) not null, disponivel boolean, primary key (id) ); */ /* insert into tb_filmes (nome, anolanc, categoria, dispon...
true
b02174c4d2d7d84af2fd87511d369099a17ded44
SQL
diegobalde/ProyectoIntegrador
/sql/DDL/hogar_ddl_create_view.sql
UTF-8
1,144
3.78125
4
[]
no_license
CREATE VIEW poliza_coberturas AS ( SELECT id_poliza, id_cobertura, cobertura_descripcion FROM ( SELECT po.ID_POLIZA as id_poliza, co.ID_COBERTURA as id_cobertura, co.DESCRIPCION as cobertura_descripcion FROM POLIZA po INNER JOIN POLIZA_PLAN pp ON (po.ID_POLIZA = pp....
true
e39f465f7e2d3e953bd07736955c6dcbf085428a
SQL
atambek/i244yl
/i244_11yl/MySQL_queries.sql
UTF-8
937
3.515625
4
[]
no_license
--tabeli loomine CREATE TABLE atambek_loomaaed (ID INTEGER PRIMARY KEY NOT NULL auto_increment, nimi VARCHAR(50) NOT NULL, vanus INTEGER, liik VARCHAR(30), puur INTEGER); --tabeli täitmine INSERT INTO atambek_loomaaed (nimi, vanus, liik, puur) VALUES('Mats', 12, 'pruunkaru', 1), ('Valge-Mats', 8, 'jääkaru', 2), ('L...
true
abe82703b365214016a11ac54741c4941dacd7ef
SQL
liquibase/liquibase
/liquibase-integration-tests/setup/mysql/create_dbs_for_integration_tests.sql
UTF-8
614
2.96875
3
[ "LicenseRef-scancode-free-unknown", "Apache-2.0" ]
permissive
/* Create LBCAT database */ DROP DATABASE IF EXISTS lbcat; CREATE DATABASE lbcat DEFAULT CHARACTER SET utf8; /* Create LIQUIBASE database */ DROP DATABASE IF EXISTS liquibase; CREATE DATABASE liquibase DEFAULT CHARACTER SET utf8; /* Create LBCAT2 database */ DROP DATABASE IF EXISTS lbcat2; CREATE DATABASE lbcat2 ...
true
846aedfefce05576c365472c9f67d7f90ab826d8
SQL
CUBRID/cubrid-testcases
/sql/_12_mysql_compatibility/_09_table_related/cases/_007_rename_table.sql
UTF-8
858
2.6875
3
[ "BSD-3-Clause" ]
permissive
create table tree(id int not null, parentid int, text varchar(32)); insert into tree values(1,null,'A'); insert into tree values(2,null,'B'); insert into tree values(3,1,'AA'); insert into tree values(4,1,'AB'); insert into tree values(5,2,'BA'); insert into tree values(6,2,'BB'); insert into tree values(7,3,'AAB'); ...
true
9c9bceb94c0c9c5f1d945a2c144b4a54d90f2029
SQL
NYPL-Simplified/circulation
/core/migration/20180313-1-add-identifier-id-to-materialized-view.sql
UTF-8
275
3.40625
3
[ "Apache-2.0" ]
permissive
DO $$ BEGIN BEGIN create index mv_works_for_lanes_identifier_id on mv_works_for_lanes (identifier_id); EXCEPTION WHEN duplicate_table THEN RAISE NOTICE 'Warning: mv_works_for_lanes_identifier_id already exists.'; END; END $$;
true
86c92c55911fe653ab50050aead7c9f48b703e93
SQL
silence-do-good/stress-test-Postgres-and-MySQL
/dump/high/day26/select1109.sql
UTF-8
178
2.625
3
[]
no_license
SELECT timeStamp, temperature FROM ThermometerOBSERVATION o WHERE timestamp>'2017-11-25T11:09:00Z' AND timestamp<'2017-11-26T11:09:00Z' AND temperature>=30 AND temperature<=72
true
bcb7c2105174135a62ef247dca5f281c1dcbcd52
SQL
hsn1373/e_voting
/db.sql
UTF-8
734
2.890625
3
[]
no_license
CREATE TABLE IF NOT EXISTS `election` ( `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, `title` varchar(256) NOT NULL, `start_time` datetime NOT NULL, `end_time` datetime NOT NULL, `list_of_choices` TEXT NOT NULL, `number_of_votes` bigint UNSIGNED NOT NULL, PRIMARY KEY (`id`) ) CHARACTER SET utf8 COLLATE...
true
f7a57fd7259112af2eaab3d8a5b954f94516e9a2
SQL
zyyf/springboot-demo
/doc/mysql-starter.sql
UTF-8
3,782
3.59375
4
[]
no_license
DROP TABLE IF EXISTS user; CREATE TABLE user ( `USER_AutoID` int NOT NULL AUTO_INCREMENT, `USERNAME` varchar(16) DEFAULT NULL, `PASSWORD` varchar(16) DEFAULT NULL, `USER_CREATE_TIME` datetime DEFAULT NULL, `USER_REFRESH_TIME` datetime DEFAULT NULL COMMENT '同步时间', `...
true
8d111932f8446510ee9708ccda5046c5bce9b89d
SQL
whehdwns/CSE_111
/Lab_8/noindex/8.sql
UTF-8
214
2.5625
3
[]
no_license
SELECT s_name, s_acctbal FROM supplier_noindex, nation, region WHERE s_acctbal > '1000.0' AND s_nationkey=n_nationkey AND n_regionkey=r_regionkey AND r_name='ASIA' --[20:14:17] Query finished in 0.002 second(s).
true
fb6c3c222a8ffc5edab221a667501b26e586ba45
SQL
weirongxin/wrx
/se,数据库/数据库/day4-ddl、dcl、jdbc/昨晚作业.sql
GB18030
933
3.9375
4
[]
no_license
--1.empвempno,ename,salݣ111,'1',1000)(222,'2',2000) insert into emp(empno,ename,sal) values(111,'1',1000); insert into emp(empno,ename,sal) values(222,'2',2000); --2.empno=111Աcommij100 update emp set comm=100 where empno=111; --3.mydeptвdeptdeptno=10 insert into mydept select * from dept where deptno=10; --4.ɾempno=11...
true
59790926b6f2eae80a1021c871e2dfe7d5ddcb99
SQL
JoaoPauloAntunes/WEB
/_1_SQL/busca-case-sensitive.sql
UTF-8
530
3.703125
4
[]
no_license
/* BUSCA CASE-INSENSITIVE (padrão)*/ SELECT cid.id as id_cidade, cid.nome, est.id as id_estado, est.nome FROM tb_estado est JOIN tb_cidade cid ON cid.id_estado = est.id WHERE BINARY cid.nome = 'Rio ClAro' and est.uf = 'SP'; /* BUSCA CASE-SENSITIVE (usando palavra reservada BINARY)*/ SEL...
true
6a762add7a291b39ce4efc27ab3ffca6f7d111a4
SQL
nagendrajv/AMS
/scripts/mysql_db_setup.sql
UTF-8
18,122
3.359375
3
[]
no_license
CREATE DATABASE IF NOT EXISTS `smsdb` /*!40100 DEFAULT CHARACTER SET latin1 */; USE `smsdb`; -- MySQL dump 10.13 Distrib 5.5.16, for Win32 (x86) -- -- Host: localhost Database: smsdb -- ------------------------------------------------------ -- Server version 5.5.28 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACT...
true
1a158d38b5a57388dc9b06c4be6c7abbc7757ade
SQL
heelam/GuDao
/gudao.sql
UTF-8
44,122
2.796875
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.2.7.1 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: 2018-05-02 15:15:28 -- 服务器版本: 5.6.20 -- PHP Version: 5.5.15 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET...
true
35fd05efba8516246d4e266ab1a9cd26f2fa85ac
SQL
djoudi/Business-plan-Implementation
/GuideFinder.sql
UTF-8
6,779
3.1875
3
[]
no_license
CREATE DATABASE IF NOT EXISTS `findyourguide` /*!40100 DEFAULT CHARACTER SET utf8 */; USE `findyourguide`; -- MySQL dump 10.13 Distrib 5.6.17, for Win32 (x86) -- -- Host: localhost Database: findyourguide -- ------------------------------------------------------ -- Server version 5.6.19 /*!40101 SET @OLD_CHARACTE...
true
3194578d088fa167929ac7c1f9149bb97e4b2482
SQL
Mic4mi/SQL-learning-with-mysql
/02-books/gobal-excercise-stringfunctions.sql
UTF-8
1,348
4.15625
4
[]
no_license
-- Reverse "Why does my cat look at me with such hatred?" SELECT REVERSE(UPPER("Why does my cat look at me with such hatred?")); -- Replace ' ' with '->' on title SELECT REPLACE(title, ' ', '->') AS 'title' FROM books; -- Print palindrome last name SELECT author_lname as 'forwards', REVERSE(author_lname) ...
true
6d3b42c9d137e63ca9f5ee4fd2b24bf5d810efda
SQL
ibm-cloud-architecture/refarch-cognitive-analytics
/sql-ddl/customers/customer_product.sql
UTF-8
679
3.40625
3
[ "Apache-2.0" ]
permissive
--<ScriptOptions statementTerminator=";"/> CREATE TABLE "DB2INST1"."CUSTOMERS_PRODUCTS" ( "CUSTOMERID" BIGINT NOT NULL, "PRODUCTNAME" VARCHAR(20) NOT NULL, "PHONENUMBER" VARCHAR(20), "OWNEDPRODUCTS_NAME" VARCHAR(254), "CUSTOMER_ID" BIGINT ) DATA CAPTURE NONE; CREATE INDEX "DB2INST1"."I_CSTMCTS_CUSTOMER" ...
true
48cfb829dce2f1f6d32ea9ad0c4b8855f756375e
SQL
aalloum/atlas_project
/atlas-domaine/src/main/resources/db/postgresql/initDBPostgres.sql
UTF-8
2,155
3.265625
3
[]
no_license
CREATE TABLE IF NOT EXISTS cabinets ( id SERIAL, nom_cabinet VARCHAR(30), identifiant_fiscal VARCHAR(30), activite_principale VARCHAR(30), forme_juridique VARCHAR(30), regime VARCHAR(30), numero_registre_commerce VARCHAR(30), numero_cnss VARCHAR(30), numero_taxe_professionnelle VARCHAR(30), numero_i...
true
40872689981a062307ac965057bc207fd68c2c32
SQL
pranjalijambhule/GreyCampus-DS3
/SQL/Assignments/6. Final Project Questions.sql
UTF-8
3,336
4.75
5
[]
no_license
-- 1. Write a query to display the names (first_name, last_name) using alias name “First Name”, “Last Name” SELECT first_name || ' ' || last_name AS Names FROM employees; -- 2. Write a query to get unique department ID from employee table SELECT DISTINCT department_id FROM employees; -- 3. Write a query to ge...
true
a71a1742fa489adfdc721af5654e6e7346a46c78
SQL
ralisonniry/sql
/02 - agrégation.sql
ISO-8859-1
1,942
4.25
4
[]
no_license
-- nombre de lignes de commandes comportant le produit 5 select count(*) from Order_Details where ProductID = 5 -- nombre total d'exemplaires commands pour le produit 5 select sum(Quantity) from Order_Details where ProductID = 5 -- chiffre d'affaires gnr par le produit 5 select sum(Quantity * UnitPrice) from Order_...
true
f573149c1554f5711f0414a549fc736de8b06537
SQL
gunhokim-me/dbSql
/20200909.sql
UTF-8
3,350
3.90625
4
[]
no_license
--comm 컬럼이 NULL일때 0으로 변경하여 sal 컬럼과 합계를 구한다. SELECT empno, ename, sal, comm, sal + NVL(comm, 0) nvl_sum, sal + NVL2(comm, comm, 0) nvl2_sum, NVL2(comm, comm + sal, sal) nvl2_sum2, NULLIF(sal, sal) nullif, NULLIF(sal, 5000) nullif_sal, sal+ COALESCE(comm, 0) coalesce_sum, ...
true
b45abd37ca4f541195a2259ca3b4b23df4cfd752
SQL
wachino/codefights-arcade-databases
/16_newsSubscribers/solution.sql
UTF-8
257
3.265625
3
[ "MIT" ]
permissive
/*Please add ; after each select statement*/ CREATE PROCEDURE newsSubscribers() BEGIN SELECT DISTINCT u.subscriber FROM (SELECT * FROM full_year UNION SELECT * FROM half_year) as u WHERE u.newspaper LIKE '%Daily%' ORDER BY u.subscriber; END
true
88830fe288af13dde99e5ed506124fef64dc464a
SQL
mecarlen/demo
/jd-seed-domain/src/main/resources/db_script.sql
UTF-8
9,621
3.59375
4
[]
no_license
---------------------- 创建测试库demo ---------------------------------- CREATE DATABASE demo DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci; create user demo identified by 'demo'; grant select,insert,update,delete on demo.* to 'demo'@'%'; flush PRIVILEGES; ------字典-城市表------ CREATE TABLE dict_city( id BIGINT(10) UNSI...
true
c4627854290fbf403d4f02edb5e47a7d2405a4f8
SQL
CptnReef/sql-commands-practice
/songs_albums.sql
UTF-8
1,907
4.09375
4
[]
no_license
CREATE TABLE Albums ( id INTEGER PRIMARY KEY AUTOINCREMENT, name VARCHAR(70) NOT NULL, artist VARCHAR(70) NOT NULL, year_published INTEGER NOT NULL ); CREATE TABLE Songs ( id INTEGER PRIMARY KEY AUTOINCREMENT, name VARCHAR(70) NOT NULL, album_id INT NOT NULL, FOREIGN KEY (album_id) REFE...
true
93f4be98b0922c7131e58f7d6ace58417b9a1d64
SQL
yunkangmin/sql
/Effective-SQL-master/MySQL/Chapter 04/Listing 4.024.sql
UTF-8
351
3.515625
4
[]
no_license
-- Ensure you've run Listing 4.021.sql to create the ProgramLogs table USE Item27Example; -- Listing 4.24 Third attempt to list log messages for a specific day SELECT L.LogUserID, L.Logger, L.LogLevel, L.LogMessage FROM ProgramLogs AS L WHERE L.LogDate BETWEEN CONVERT('2016-07-04', datetime) AND CON...
true
a4bbd8a9082093a0382d2a16ecfcaff12a979750
SQL
chiragk156/EmployeeMS
/cs301_project_DB.sql
UTF-8
4,092
3.65625
4
[]
no_license
CREATE TABLE IF NOT EXISTS login ( username varchar(50) NOT NULL, password varchar(255) NOT NULL, PRIMARY KEY (username) ); CREATE TABLE IF NOT EXISTS facultydept ( name varchar(30) NOT NULL, address varchar(100) DEFAULT NULL, PRIMARY KEY(name) ); CREATE TABLE IF NOT EXISTS staffdept ( ...
true
ed53e43153a6610f621547489da4c2626b00b605
SQL
Denys209818/SQLHomeWork
/HWSQL1.sql
UTF-8
7,474
3.578125
4
[]
no_license
CREATE DATABASE Academy use Academy CREATE TABLE Departments ( Id int NOT NULL IDENTITY PRIMARY KEY, Financing money NOT NULL CHECK (Financing >= 0) DEFAULT 0, Name nvarchar(100) NOT NULL CHECK (LEN(Name) > 0) UNIQUE ) INSERT INTO Departments (Financing, Name) VALUES (100000, 'Matematyka') INSERT INTO Dep...
true
08966b6ad7dc73d3a1dfdc778db462c3379bb564
SQL
deekerno/tyto
/schema.sql
UTF-8
266
2.71875
3
[ "MIT" ]
permissive
CREATE TABLE IF NOT EXISTS torrents ( info_hash VARCHAR(50) NOT NULL UNIQUE, complete INT NOT NULL, downloaded INT NOT NULL, incomplete INT NOT NULL, balance BIGINT NOT NULL, PRIMARY KEY (info_hash) ) ENGINE = InnoDB;
true
54060f2214a31e3e9e02cdf73239d1641cc8f087
SQL
bimapriaaditya/webclub
/webclub_db.sql
UTF-8
14,110
2.875
3
[]
permissive
-- phpMyAdmin SQL Dump -- version 4.9.2 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Waktu pembuatan: 26 Feb 2020 pada 14.54 -- Versi server: 10.4.11-MariaDB -- Versi PHP: 7.2.26 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHAR...
true
483e312ca6f4094edae97be649e7b0d9fe17c09a
SQL
blackrui58/angular_tea
/angular,node最终大项目--韩长斌的/userlist.sql
UTF-8
8,316
2.796875
3
[]
no_license
/* Navicat MySQL Data Transfer Source Server : test Source Server Version : 50711 Source Host : localhost:3306 Source Database : hcb Target Server Type : MYSQL Target Server Version : 50711 File Encoding : 65001 Date: 2017-09-29 16:32:20 */ SET FOREIGN_KEY_CHECKS=0; -- ----------...
true
bc4da9cd075817a9cf22287cd2d1331f33749c24
SQL
geosconsulting/sql_bonanza
/pg_orcl/schemi_orcl_pgres_final_other_pwd.sql
UTF-8
585
2.734375
3
[]
no_license
DROP SERVER IF EXISTS esposito_orcl_rdaprd CASCADE; CREATE SERVER esposito_orcl_rdaprd FOREIGN DATA WRAPPER oracle_fdw OPTIONS(dbserver '//esposito.ies.jrc.it/esposito'); GRANT USAGE ON FOREIGN SERVER esposito_orcl_rdaprd TO postgres; CREATE USER MAPPING FOR postgres SERVER esposito_orcl_rdaprd OPTIONS (user 'R...
true
7b5c0233534e313801e54f83752f5e5df3687905
SQL
zhuoIC/BADA
/padron.sql
UTF-8
2,084
3.65625
4
[]
no_license
use padron; drop table if exists propiedad; drop table if exists habitante; drop table if exists vivienda; drop table if exists municipio; create table municipio( cp char(5), nombre varchar(50) not null, primary key (cp) ); insert into municipio (cp, nombre) values ("29016", "Málaga - El Limonar"); insert into mun...
true
ee4fdcb43c1247efa641ac2acf38077b25be87e2
SQL
dimas-adi-kris/bb
/aaa.sql
UTF-8
5,251
2.890625
3
[ "LicenseRef-scancode-unknown-license-reference", "MIT" ]
permissive
-- phpMyAdmin SQL Dump -- version 5.0.2 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Aug 30, 2020 at 06:22 PM -- Server version: 10.4.13-MariaDB -- PHP Version: 7.4.7 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIEN...
true
52a8b6bc7cf20f2f2c3ade91c288052b163a744d
SQL
DonHaul/SIBD-Projeto
/Parte II/81731-81138-81567/triggers.sql
UTF-8
2,102
3.6875
4
[]
no_license
-- Trigger 1 -- I) delimiter $$ create trigger prevent_insert before insert on Study for each row begin if exists(select * from Request where request_number = new.request_number and doctor_id = new.doctor_id) then call doctor_who_prescribes_an_exame_cannot_perform_the_same_exam(); end if; end$$ delimiter...
true
39f8b8aba2925b03cbf3940428d493e5326d0349
SQL
radtek/abs3
/sql/mmfo/bars/Script/fm_operlist_import_file.sql
WINDOWS-1251
1,630
2.640625
3
[]
no_license
prompt . . pep.org.ua declare l_codeoper number; l_application_code varchar2(10 char) := '$RM_W_FM'; l_application_id integer := user_menu_utl.get_arm_id(l_application_code); l_application_type_id integer := user_menu_utl.APPLICATION_TYPE_WEB; l_arm_resource_type_id integer := resource_utl.get_resource_t...
true
935533db91047fe7b94e0ee6f4cec5c9deaa9a7e
SQL
fnugrahendi/fn-list
/wp_fnlist.sql
UTF-8
1,343
2.796875
3
[ "MIT" ]
permissive
-- phpMyAdmin SQL Dump -- version 4.3.11 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: Nov 13, 2016 at 09:45 AM -- Server version: 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
5ee538d687ba6a9a9789af23eefef2343a29de02
SQL
BackupTheBerlios/xoops4-svn
/XoopsCore/branches/2.2.x/2.2.5/html/modules/system/sql/upgrade205.sql
UTF-8
523
2.53125
3
[]
no_license
CREATE TABLE `block_instance` ( `instanceid` int(12) unsigned NOT NULL auto_increment, `bid` int(12) unsigned NOT NULL, `options` text NOT NULL default '', `title` varchar(255) NOT NULL default '', `side` tinyint(1) unsigned NOT NULL default '0', `weight` smallint(5) unsigned NOT NULL default '0', ...
true
e50be0d9e23e54129d28f5f495e4a18eea1a6249
SQL
EDELAFUENTEMU/ASIR.SGBD
/Triggers/trigger.sql
UTF-8
1,867
3.84375
4
[ "MIT" ]
permissive
DELIMITER $$ DROP PROCEDURE IF EXISTS `PROCEDIMIENTO1` $$ CREATE DEFINER=`server`@`%` PROCEDURE `PROCEDIMIENTO1`(IN `parametro` BIGINT) BEGIN SET @contador = parametro; SET @resultado = 1; WHILE (@contador > 0) DO IF (@contador > 15 && (@contador%3 = 0 || @contador%5 = 0)) THEN ...
true
59d9e9c1338162db6ff256fc8e82656ae4bfc97f
SQL
tandasanyu/MyHondaMugenDevelopment
/RandomLogic_Mugen/ApproveListIzinbDetail_13-8-2019.sql
UTF-8
4,477
3.4375
3
[]
no_license
/* RULES : HANYA INPUT KE DETAIL KETIKA APPROVAL SAJA. SELAIN ITU DETAIL (STATUS = NULL) */ SELECT Details.IZIN_ID, b.IZIN_NIK AS NIK, h.IZIN_NAMA, CASE WHEN h.IZIN_NIK_APPVMNG = '--' THEN NULL WHEN h.IZIN_NIK_APPVMNG <> '--' THEN h.IZIN_NIK_APPVMNG END AS NIKMNG, h.IZIN_NIK_APPVSPV AS NIKSPV, ...
true
86c0afa586141b313cfed0a1247e37dc4f666d48
SQL
Shayeed/Software-project-for-bakery-Java-swing-and-MySql-
/MySql tables and data for import/rohankitchen_inventory.sql
UTF-8
2,494
2.96875
3
[]
no_license
-- MySQL dump 10.13 Distrib 5.7.17, for Win64 (x86_64) -- -- Host: localhost Database: rohankitchen -- ------------------------------------------------------ -- Server version 5.7.18-log /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET...
true
f89d694dc0e2f33f82f97c10b995fc01bb27e724
SQL
ramyani-ghosh/Wildlife-santuary
/project_create.sql
UTF-8
2,384
3.46875
3
[]
no_license
drop database wildlife; create database wildlife; \c wildlife create table employee( emp_id varchar(10) primary key, name varchar(20) NOT NULL, job_title varchar(15) NOT NULL, salary decimal(5,2) NOT NULL, yearsofexp int ); create table zone( name varchar(20), pin varchar(6) primary key ); ...
true
064ac4bf84c75f7f80efb31cca09bb12781f9fb8
SQL
pjamenaja/onixlegacy
/lib_wis_erp_framework/frameworks/patch/ONIX_1.5.16.20190926.sql
UTF-8
2,028
3.328125
3
[]
no_license
CREATE TABLE EMPLOYEE_LEAVE_DOC ( EMP_LEAVE_DOC_ID INTEGER NOT NULL PRIMARY KEY, EMPLOYEE_ID INTEGER NOT NULL, DOCUMENT_DATE CHAR(19) NOT NULL, LEAVE_YEAR INTEGER NOT NULL, LEAVE_MONTH INTEGER NOT NULL, ...
true
e71513d56b0f53cfd9f85e0013955fef6e9ce5fd
SQL
bdunams/Bamazon
/sql/bamazon_seed.sql
UTF-8
708
2.890625
3
[]
no_license
-- insert row into db table INSERT INTO products( -- column names product_name, department_name, price, stock_quantity ) VALUES ( 'Sports Coat', 'Clothing', 110, 110 ), ( 'Hat', 'Clothing', 49.99, 100 ), ( 'IPhone 7', 'Electronics', 700, 75 ), ( 'Bluetooth Headphones', 'Electronics', 80, 150 ), ( 'The Wo...
true
3b2d7b5ff28291434d207e77348bd386c7729ec9
SQL
joemooretv/GB-db
/lessons/07/07.sql
UTF-8
1,456
4.625
5
[]
no_license
/* 1. Составьте список пользователей users, которые осуществили хотя бы один заказ orders в интернет магазине. */ -- Списком уникальных пользователей SELECT `id` FROM `users` WHERE (SELECT `customer_id` FROM `orders` WHERE `users`.`id` = `orders`.`customer_id` GROUP BY `customer_id`) IS NOT NULL; -- Списком пользов...
true
01702a0e5fb8fb3bc2a3b080d5ee9fcbc388f582
SQL
iamtcby5188/work
/database/信用页包含ABS、NCD.sql
UTF-8
2,553
3.296875
3
[]
no_license
# 本sql中idb_bond.bond_goods_type,idb_bond.bond_type_selective中应已经包含ABS或NCD相关的记录 # select * from idb_bond.bond_goods_type where status='1' and product in ('ABS','NCD'); # select a.* from idb_bond.bond_type_selective a left join (select * from idb_bond_goods_type where status='1' and product in ('ABS','NCD')) b on a.type_...
true
81dfe75212315398cb4904ce3085a0b8519bdebe
SQL
OHDSI/Vocabulary-v5.0
/working/manual_changes/2018/manual_changes_06-Nov-2018.sql
UTF-8
2,843
4.1875
4
[ "Unlicense" ]
permissive
--Add 2 new 'Meas Type' concepts INSERT INTO concept VALUES (32488,'Urgent lab result','Type Concept','Meas Type','Meas Type','S','OMOP generated',to_date ('19700101', 'YYYYMMDD'),to_date('20991231', 'YYYYMMDD'),NULL); INSERT INTO concept VALUES (32489,'Accelerated lab result','Type Concept','Meas Type','Meas Type','S...
true
f24a874775c8b22cbc914fd2bf61237164e9c1eb
SQL
gdc24/TheaterDatabase-MVC
/TheaterDatabase/Content/sql/02-createTablesAndForeignKeys.sql
UTF-8
2,273
3.25
3
[]
no_license
CREATE TABLE "shows" ( "intShowID" SERIAL PRIMARY KEY, "strName" varchar NOT NULL, "strAuthor" varchar NOT NULL, "intBudget" int NOT NULL, "ysnIsMusical" boolean NOT NULL, "intClubID" int NOT NULL, "intDateID" int NOT NULL ); CREATE TABLE "clubs" ( "intClubID" SERIAL PRIMARY KEY, "strClubName" varcha...
true
2809282d9c771b106241aa31db6bf49e523a5ec0
SQL
LeopoldoZD/spring
/src/main/java/org/unitec/tablitas.sql
UTF-8
562
3.59375
4
[]
no_license
create table producto(id integer primary key auto_increment, nombre varchar(30), precio float); select * from producto; --creamos la tabla departamento que sin que existan empleados create table departamento(id integer primary key auto_increment, nombre varchar(40)); drop table departamento; drop table empleado; ...
true
57953c5234b0a5c5543b7b0291cb58d62376ea3a
SQL
sola1121/references_of_sql
/Oracle Database 课堂_1/代码片段/加密程序.sql
UTF-8
927
3.03125
3
[]
no_license
create or replace function f_encrypt_own(p_plain_msg varchar2, p_shift varchar2) return varchar2 as type type_array is table of varchar2(1000) index by binary_integer; var_array type_array; v_encrypt_msg varchar2(1000):=''; z varchar2(1000); x char(1); y char(1); BEGIN z := upper(p_shift); FO...
true
0b8decde7916b19e9c68501090e9ecfbe832deac
SQL
DONGVK/KODO_Mugiwara
/Jean/kodo (2)/tables.sql
UTF-8
1,758
3.390625
3
[ "MIT" ]
permissive
-- DROP SCHEMA public CASCADE; -- DELETE FROM Utilisateur; /* * Auditeur : 1 * Speaker : 2 * Speaker/Auditeur : 3 * Organisateur : 4 * Admin : 5 */ CREATE TABLE Signalement ( idUser int PRIMARY KEY, idPublication int , commentaire varchar(80) ); CREATE TABLE Groupe ( idUser int PRIMARY KEY, idGroupe int ); CRE...
true
7d4b599b0f9d027f73be8ceedc06525a7fbab2d3
SQL
romulovieira777/Formacao_Engenheiro_de_Dados
/Seção 02 - Modelos Relacionais/Scripts/8.Select.sql
UTF-8
604
2.953125
3
[]
no_license
Scripts de Consulta -- Querying customer table data SELECT * FROM relacional.clientes; SELECT clientes , sexo , status FROM relacional.clientes WHERE status = 'Silver'; SELECT clientes , sexo , status FROM relacional.clientes WHERE status = 'Silver' OR status = 'Platinum'; SELECT clientes , s...
true
0ce9470523de10285d570f8eb3b4d4e6605de396
SQL
jdetle/captable-backend
/db/postgres/migrations/00001_initial_schemas.up.sql
UTF-8
864
3.6875
4
[]
no_license
CREATE TABLE public.shareholders ( id serial NOT NULL, ownership_chunk_ids INTEGER[] NOT NULL, first_name text NOT NULL, last_name text NOT NULL, email text NOT NULL, PRIMARY KEY (id) ); CREATE TABLE public.cap_tables ( id serial NOT NULl, total_shares int NOT NULL, shareholder_id...
true
e6edaa8e0dd66654d8965236f9a194c69422e390
SQL
Dhliv/PFBD
/diseño_bd/creacion_bd.sql
UTF-8
4,627
3.46875
3
[]
no_license
select * from respuestas; select * from usuarios; select * from presupuestos; select * from estudios; select * from generos; select * from ocupaciones; select * from con_quien_sale_habitualmente; DROP TABLE IF EXISTS usuarios CASCADE; DROP TABLE IF EXISTS respuestas CASCADE; DROP TABLE IF EXISTS eventos CASCADE; D...
true
5afbb38d3ea53dcad2334c20307fb6b0989dd7d9
SQL
FELLSAT/Procedimientos
/Procedimientos/parte 5/H3i_SP_LIQUIDOS_ELIMINADOS_CON.sql
UTF-8
972
3.078125
3
[]
no_license
CREATE OR REPLACE PROCEDURE H3i_SP_LIQUIDOS_ELIMINADOS_CON -- ============================================= -- Author: FELIPE SATIZABAL -- ============================================= ( v_NumReg IN NUMBER, cv_1 OUT SYS_REFCURSOR ) AS BEGIN OPEN cv_1 FOR SELECT FE_FECHA_LIQELI , T...
true
64530bf77082a0b2ba0ecc2af403c049f09bfd32
SQL
CheetUnit/CheetUnit
/cheetunit-examples/college-example-eager/src/main/resources/import.sql
UTF-8
1,263
2.578125
3
[ "Apache-2.0" ]
permissive
-- Copyright 2020 Gepardec IT Services GmbH and the CheetUnit contributors -- SPDX-License-Identifier: Apache-2.0 INSERT INTO PERSON(ID, FIRSTNAME, LASTNAME, BIRTHDAY) VALUES (-1, 'Albus', 'Dumbledore', '1881-08-01'); INSERT INTO PERSON(ID, FIRSTNAME, LASTNAME, BIRTHDAY) VALUES (-2, 'Severus', 'Snape', '1960-01-09'); ...
true
4e2f6cd15c1534d056abafc96092623fd180a1f1
SQL
igoravila42/softexpert
/db/db_mercado.sql
UTF-8
7,103
2.84375
3
[]
no_license
-- -- PostgreSQL database dump -- SET statement_timeout = 0; SET lock_timeout = 0; SET client_encoding = 'UTF8'; SET standard_conforming_strings = on; SELECT pg_catalog.set_config('search_path', '', false); SET check_function_bodies = false; SET xmloption = content; SET client_min_messages = warning; -- -- Name: plpg...
true
4ef365c9c2b290b5be4bef7d2cd52b78f2957c5e
SQL
G0b1/library-service
/target/classes/db/migration/V1.0.0/V1.0.0_1__create_book_table.sql
UTF-8
302
2.609375
3
[]
no_license
CREATE TABLE IF NOT EXISTS `book` ( `id` bigint(20) NOT NULL AUTO_INCREMENT, `name` varchar(255) NOT NULL, `description` longtext, `author` varchar(255) NOT NULL, `code` varchar(255) NOT NULL, `price` varchar(255) DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
true
27377e7ca07e05e259608ac53fb7d2b1ac5d0234
SQL
arthad1995/project-fuse-2.0-server
/src/main/resources/db/migration/V14__notification.sql
UTF-8
373
2.859375
3
[ "MIT" ]
permissive
DROP TABLE IF EXISTS `notification`; CREATE TABLE `notification` ( `id` INT NOT NULL AUTO_INCREMENT, `receiver_id` INT NOT NULL, `message` TEXT, `time` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP, `hasRead` TINYINT(1) NOT NULL DEFAULT 0, `deleted` TINYINT(1) NOT NULL DEFAULT 0, PRIMARY KEY (`id`), INDE...
true
85e42baa7c19aac14b5357ce370f3c10164666e3
SQL
dhamotharang/SvnGit
/Custom/NDNW/Admission/Database/Scripts/InsertUpdateScript_GlobalCodes_Episode.sql
UTF-8
22,137
3.234375
3
[]
no_license
--Category = 'REFERRALTYPE' DELETE FROM GlobalCodes WHERE Category = 'REFERRALTYPE' AND Active = 'Y' and GlobalCodeId > 10000 IF NOT EXISTS(SELECT 1 FROM GlobalCodeCategories WHERE Category = 'REFERRALTYPE') BEG...
true
64c1549b191b7eb4b1161d734029e26aa8524146
SQL
sgrzys/docker-oracle-apex5-ords
/assets/apex/core/wwv_flow_session_context.sql
UTF-8
2,138
2.65625
3
[]
no_license
set define '^' verify off prompt ...wwv_flow_session_context.sql create or replace package wwv_flow_session_context as -------------------------------------------------------------------------------- -- -- Copyright (c) Oracle Corporation 1999 - 2013. All Rights Reserved. -- -- NAME -- wwv_flow_session_context...
true
c56e162114a2b71fe2c07abb1d82cdf9a794ca17
SQL
Schrank/fail-owasp-top10-20120
/database.sql
UTF-8
719
2.71875
3
[]
no_license
CREATE USER 'fail'@'localhost' IDENTIFIED BY '8GvK8BbH7eNydLwn'; GRANT USAGE ON * . * TO 'fail'@'localhost' IDENTIFIED BY '***' WITH MAX_QUERIES_PER_HOUR 0 MAX_CONNECTIONS_PER_HOUR 0 MAX_UPDATES_PER_HOUR 0 MAX_USER_CONNECTIONS 0 ; CREATE DATABASE IF NOT EXISTS `fail` ; GRANT ALL PRIVILEGES ON `fail` . * TO 'fail'@'l...
true
892b7b37eda2a4a4aad8d93564822c4eb2ab1ede
SQL
calixtotay/laravel-reservation
/database/reservation.sql
UTF-8
6,799
3.3125
3
[ "MIT" ]
permissive
-- MySQL Script generated by MySQL Workbench -- Fri Feb 24 16:26:51 2017 -- 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