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
6f20d6f132316ad4d92133bac8fe1b6b4b41e127
SQL
nikitaschultz/library_project
/db/library.sql
UTF-8
2,043
3.453125
3
[]
no_license
DROP TABLE IF EXISTS books_tags; DROP TABLE IF EXISTS tags; DROP TABLE IF EXISTS reviews; DROP TABLE IF EXISTS books; DROP TABLE IF EXISTS genres; DROP TABLE IF EXISTS formats; DROP TABLE IF EXISTS read_statuses; DROP TABLE IF EXISTS ownership_statuses; DROP TABLE IF EXISTS authors; DROP TABLE IF EXISTS serieses; CREA...
true
6260d32f42d384601e191f9bc175bbda8ffc54eb
SQL
ZachNich/sql_chinook
/total_sales_2009_2011.sql
UTF-8
185
3.3125
3
[]
no_license
--What are the respective total sales for each of those years (2009, 2011)? SELECT ROUND(SUM(i.Total), 2) FROM Invoice i WHERE i.InvoiceDate LIKE '2009%' OR i.InvoiceDate LIKE '2011%';
true
53ca2a8b6c1fb2e99d5cb1899f48f178071ae004
SQL
samklr/amazon-redshift-utils
/src/BlogContent/AQUA-Evaluation/load_amazon_sentiments_data.sql
UTF-8
1,024
3.140625
3
[ "Apache-2.0" ]
permissive
/*creates table in default dev db and loaded data into the table*/ CREATE TABLE amazon_reviews( marketplace char(2), customer_id varchar(10), review_id varchar(20), product_id varchar(15), product_parent varchar(15), product_title varchar(500), product_category varchar(30), star_rating int, he...
true
9c7b38563e96947cbec1b40befc3bd11227d4d90
SQL
devallianceorg/newsan-npmpicker
/php_y_database/npmpicker.sql
UTF-8
3,031,426
2.578125
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 2.10.3 -- http://www.phpmyadmin.net -- -- Servidor: localhost -- Tiempo de generación: 13-03-2014 a las 20:13:25 -- Versión del servidor: 5.0.51 -- Versión de PHP: 5.2.6 SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO"; -- -- Base de datos: `npmpicker` -- -- ------------------...
true
80a18965e5b828afee464ab4a09b24a4b99745e2
SQL
msoczi/bd
/sql/insert.sql
UTF-8
9,224
2.9375
3
[]
no_license
-- Insert: Filmy INSERT INTO Filmy VALUES (1, 'Zaginiona dziewczyna', 2014, 'David Fincher', 'Thriller', 149, 'W rocznicę ślubu kobieta znika bez śladu, jej mąż staje się głównym podejrzanym.'); INSERT INTO Filmy VALUES (2, 'Joe Black', 1998, 'Martin Brest', 'Melodramat', 181, 'Śmierć pod pseudonimem Joe Black zjawia ...
true
b9a5df4e4fecc96cc16a0b66f0b20407a3bf36b2
SQL
eaespinoza0/sw-horizon-app
/application/shared_components/data_loading/tables/demo_customers.sql
UTF-8
1,362
2.578125
3
[]
no_license
prompt --application/shared_components/data_loading/tables/demo_customers begin -- Manifest -- DEMO_CUSTOMERS -- Manifest End wwv_flow_api.component_begin ( p_version_yyyy_mm_dd=>'2020.03.31' ,p_release=>'20.1.0.00.13' ,p_default_workspace_id=>20 ,p_default_application_id=>8950 ,p_default_id_offset=>3330924484...
true
b155217ca1b958a0c10f98e28caa3100c9bf602a
SQL
bellmit/origin
/family_order/sql/TF_F_USER_SCORE/SEL_USER_MONTH_SCORE.sql
UTF-8
358
3.59375
4
[]
no_license
SELECT :MONTH_BEGIN MONTH_BEGIN,:MONTH_END MONTH_END,INTEGRAL_TYPE_CODE,SUM(integral_fee) INTEGRAL_FEE FROM tf_ah_integralbill a,td_a_acycpara b WHERE user_id=TO_NUMBER(:USER_ID) and partition_id=MOD(TO_NUMBER(:USER_ID),10000) AND a.acyc_id=b.acyc_id AND b.BCYC_ID >= TO_NUMBER(:MONTH_BEGIN) AND b.BCYC_ID <= TO_NUMBER(:...
true
9b9432a4fd129bd9ee86992764a17766825baf1b
SQL
radtek/Telecommunication
/GSM/DataBase/SCRIPTS_FROM_DB/LONTANA/FUNCTION/HOT_BILLING_GET_CALL_TAB_TEST.SQL
UTF-8
10,238
3.078125
3
[]
no_license
CREATE OR REPLACE FUNCTION "LONTANA"."HOT_BILLING_GET_CALL_TAB_TEST" (pi_row IN sys_refcursor) return CALL_TAB PIPELINED AS pstart_time date; pSUBSCR_NO varchar2(11); poSUBSCR_NO varchar2(11); pCH_SEIZ_DT varchar2(16); pAT_FT_CODE varchar2(6); pAT_CHG_AMT ...
true
c8c0f567344f0f39dca2c8cab7787cc2a97e5f24
SQL
pascocai/cms-genarator
/res/cmsg.sql
UTF-8
5,221
3.21875
3
[]
no_license
-- -------------------------------------------------------- -- Host: 127.0.0.1 -- Server version: 5.1.35-community - MySQL Community Server (GPL) -- Server OS: Win32 -- HeidiSQL version: 7.0.0.4053 -- Date/time: 2014-06-27 10:35:19 ...
true
e4ac5bc307b0628f1f286362856f7549bb083f93
SQL
kbats183/LibraryApplicationGo
/postgresql/init.sql
UTF-8
1,417
3.53125
4
[]
no_license
DROP SEQUENCE IF EXISTS user_id_seq; DROP TABLE IF EXISTS users; CREATE SEQUENCE user_id_seq; CREATE TABLE users ( id integer NOT NULL DEFAULT nextval('user_id_seq'), login varchar, name varchar, password varchar, PRIMARY KEY (id) ); ALTER SEQUENCE user_id_seq OWNED BY users.id; DROP ...
true
b81402ca418c9a9de9b7987ab95470767ecd5025
SQL
DJMishler/Code-Scripts-Automation
/SQL Scripts/ActiveDatabaseConnections.sql
UTF-8
269
3
3
[]
no_license
SELECT db_name(dbid) as DatabaseName, count(dbid) as NoOfConnections, loginame as LoginName --,hostname FROM sys.sysprocesses WHERE dbid = 6 --Where dbid > 0 GROUP BY dbid, loginame --,hostname --Select * from sys.databases --Select * from sys.sysprocesses
true
74140e108b5636bc99484739ef7f39027a2e39cc
SQL
meetuparchive/jira-stats
/base/opt/issue_closed_times.sql
UTF-8
117
2.65625
3
[]
no_license
SELECT key, MAX(time) AS closed_time FROM `meetup-prod.team_eng_jira.transitions` WHERE `to` = 'Closed' GROUP BY key
true
946a91ede57efe5e3c109e4a30b9dbf88a7095ec
SQL
radtek/Telecommunication
/SIM_TRADE/DataBase/VIEW/V_HOT_BILLING_DELAY.sql
UTF-8
1,174
3.71875
4
[]
no_license
CREATE OR REPLACE FORCE VIEW "CORP_MOBILE"."V_HOT_BILLING_DELAY" ("ACCOUNT_ID", "FILE_NAME", "FILE_DATE", "LOAD_SDATE", "MIND", "MAXD") AS select PH_NEW.ACCOUNT_ID,hbf.file_name,to_date(substr(hbf.file_name,-19,15),'yyyymmdd-hh24miss') as file_date,hbf.load_sdate,min(round((to_date(substr(hbf.file_name,-19,15),'yy...
true
8a5b429a50cf81506bd949a17275433fefd99910
SQL
hackupc/hackfromhome-talks
/db/init/create_ddl_agenda_1_contact.sql
UTF-8
2,756
3.109375
3
[ "MIT" ]
permissive
-- Sequence CREATE SEQUENCE agenda_contact_id_seq INCREMENT 1 START 1 MINVALUE 1 MAXVALUE 9223372036854775807 CACHE 1; ALTER SEQUENCE agenda_contact_id_seq OWNER TO postgres; -- Table CREATE TABLE agenda_contact ( id integer NOT NULL DEFAULT nextval('agenda_contact_id_seq'::regclass), ...
true
92fc65082c9e1bd43b8f04624afcfbd38dc3af12
SQL
luzhin/analog
/query.sql
UTF-8
1,765
3.296875
3
[]
no_license
CREATE TABLE `analogs_source` ( `id` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT, `k` VARCHAR(100) NULL DEFAULT NULL, `trash` VARCHAR(100) NULL DEFAULT NULL, `brand` VARCHAR(200) NULL DEFAULT NULL, `detail` VARCHAR(200) NULL DEFAULT NULL, INDEX `Индекс 1` (`id`) ) COMMENT='Исходная таблица аналогов' COLLATE='utf8_ge...
true
9038aa821c28857fefb06e055b25700f1d95f8c2
SQL
miktim/IM_DBF
/im_dbf_50417.sql
UTF-8
15,753
3.34375
3
[ "MIT" ]
permissive
CREATE OR REPLACE PACKAGE "IM_DBF" as /* IMport DBF/MEMO table from BLOB 2015 miktim@mail.ru, Petrozavodsk State University: https://petrsu.ru/en 2015.04.17 memo support added 2015.04.10 conversion functions p_endian added 2015.04.09 tableCREATE 2015.04.08 */ -- ***Open/close dbf file default_charset const...
true
1e56d3943f95aae902df128349b7094f80035d4f
SQL
HHS/CDC-BizFlow
/era/CapHR_PAR.sql
UTF-8
7,808
3.359375
3
[]
no_license
---------------------------------------------------- -- SQL Queries for "CDC - CapHR - PAR" Event Response -- This is not a really source code but part of sql queries to make ERA service creation easier. -- SQL below can be changed afterward. Only use this file when to setup CDC HR solution for the first time on Produc...
true
0113b4e772a6efff00b16b401ffbd5ca9d75c309
SQL
elannert/pidx
/pidx.sql
UTF-8
2,595
4.0625
4
[]
no_license
Select users.id as pidxuid, users.dob, h.depth, w.breadth, r.duration, d.density, (h.depth* w.breadth*r.duration) as pvolume, badges.badge_count, (h.depth* w.breadth *r.duration * d.density) as pmass, ntile (100) over (order by h.depth* w.breadth *r.duration * d.density asc ) as ntile, h.depthcategoryname From ( Select...
true
7fe512f9345e4bd875868753af9b974d8f0677ab
SQL
khobatha/bahmni-reports
/reports/sql/ARVs.sql
UTF-8
3,444
4.40625
4
[]
no_license
SELECT distinct stock_move.name Product_Name,issue.name Unit_of_Issue,stock_on_hand,Expiry_Date,Quantity_expired_and_damaged,Quantity_Received,stock_at_last_reporting_period FROM stock_move LEFT OUTER JOIN ( -- PRODUCT NAME select sm.name Product_Name, so.product_packaging ,sm.product_id from stock_move sm inner...
true
7151f06ddeca60d6145a94844bbe94b9f91a6182
SQL
dnylpz/TPV_FCFM
/DB/tpv_fcfm_empresa.sql
UTF-8
2,290
2.953125
3
[]
no_license
CREATE DATABASE IF NOT EXISTS `tpv_fcfm` /*!40100 DEFAULT CHARACTER SET utf8 */; USE `tpv_fcfm`; -- MySQL dump 10.13 Distrib 5.6.24, for Win64 (x86_64) -- -- Host: 127.0.0.1 Database: tpv_fcfm -- ------------------------------------------------------ -- Server version 5.6.17 /*!40101 SET @OLD_CHARACTER_SET_CLIENT...
true
84f414bbeb97479930361d2a46930302904475c2
SQL
phoenix110/work-doc
/浙江省慢病监测系统/record/TRIGGER/ZJJK_INSERTXNXGBGK_TRIGGER.sql
UTF-8
357
2.546875
3
[]
no_license
CREATE OR REPLACE TRIGGER "ZJJK".zjjk_insertxnxgbgk_trigger AFTER INSERT ON zjjk_xnxg_bgk FOR EACH ROW BEGIN insert into middlexmldate(vc_bgkid,vc_id,table_name,dt_cjsj,dt_xgsj,createtime,vc_scbz,action) values(:New.vc_bgkid,:New.vc_id,'zjjk_xnxg_bgk',:New.dt_cjsj,:New.dt_xgsj,sysdate,:New.vc_scbz,'insert...
true
d27818855aae710b42632f0b1d9d3d13e2b13776
SQL
alexdougie/esd-assignment
/XYZ_Assoc_other.sql
UTF-8
6,510
3.234375
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.5.0.2 -- http://www.phpmyadmin.net -- -- Host: localhost -- Generation Time: Mar 07, 2016 at 03:50 PM -- Server version: 10.0.17-MariaDB -- PHP Version: 5.5.30 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_...
true
89de6592f8a1ccb2c2f0e54dc90a8422673cb335
SQL
radtek/abs3
/sql/mmfo/bars/Trigger/tu_vcentrkubm.sql
WINDOWS-1251
2,772
3.21875
3
[]
no_license
PROMPT ===================================================================================== PROMPT *** Run *** ========== Scripts /Sql/BARS/Trigger/TU_VCENTRKUBM.sql =========*** Run * PROMPT ===================================================================================== PROMPT *** Create trigger T...
true
4507fd971c996da1437950d473a88e7db16990e5
SQL
ClickHouse/ClickHouse
/tests/queries/0_stateless/02400_create_table_on_cluster_normalization.sql
UTF-8
1,104
3.296875
3
[ "BSL-1.0", "Apache-2.0" ]
permissive
-- Tags: no-replicated-database -- Tag no-replicated-database: ON CLUSTER is not allowed drop table if exists local_t_l5ydey; create table local_t_l5ydey on cluster test_shard_localhost ( c_qv5rv INTEGER , c_rutjs4 INTEGER , c_wmj INTEGER , c_m3 TEXT NOT NULL, primary key(c_qv5rv) ) engine=Replicat...
true
5971bb53df584a067d5454f5b0ee6f1124c51986
SQL
samdasil/controlavendas
/scripts/lenemodas.sql
UTF-8
12,739
3.15625
3
[ "MIT" ]
permissive
-- phpMyAdmin SQL Dump -- version 4.1.4 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: 13-Dez-2018 às 12:58 -- Versão do servidor: 5.6.15-log -- -------------------------------------------------------- -- -- Estrutura da tabela `categoria` -- CREATE TABLE IF NOT EXISTS `categoria` ( `id` in...
true
56b15355112959b1314fe71fdfefa5b3dd41e305
SQL
dfb-hgbi/dfb_dbstruct
/dfbch1_IVFB.sql
UTF-8
50,356
2.859375
3
[]
no_license
-- MySQL dump 10.19 Distrib 10.3.29-MariaDB, for FreeBSD12.2 (amd64) -- -- Host: localhost Database: dfbch1_IVFB -- ------------------------------------------------------ -- Server version 10.3.29-MariaDB-log /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=...
true
4bb487cc907bfc681af2cbe662e1a023a210875c
SQL
iNaman6M/MySql---Practice
/one_basics.sql
UTF-8
1,245
3.765625
4
[]
no_license
-- -- select databases is use to select the particular database from the databases -- SELECT DATABASE(); -- use keyword is used to choose and further go with the database from the databases -- USE photo_Store; -- after use the particular/Desired databases select database will select the choosed database to work on ...
true
5700a094e6462debcf7e9722557dfce7885f2fee
SQL
9553432712/sqlscriptscopy
/Script.sql
UTF-8
3,198
3.8125
4
[]
no_license
SELECT * FROM USER; SELECT * from college_master SELECT count(sno) FROM user where email='jhgfdcsxcgh@gmail.com' and email_verify='Y' select * from email_log order by created_date desc limit 1 update `USER` set PASSWORD='qwer' DELETE FROM `user` WHERE email='R131758@RGUKTRKV.AC.IN' drop TABLE email_log use voting; CR...
true
168aed795b791f5c4492b1c2c50e325e5d41ce5e
SQL
ameynaukri/beep
/user.sql
UTF-8
2,188
3.046875
3
[ "MIT" ]
permissive
-- phpMyAdmin SQL Dump -- version 4.7.4 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Dec 15, 2017 at 11:20 AM -- Server version: 10.1.26-MariaDB -- PHP Version: 7.0.22 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OL...
true
90c7fe2896c6f0d980c7b28569df01f55ebc1c31
SQL
MishaKhripko/sitedevel_testrpject
/dump_DB: test-first.sql
UTF-8
703
3.8125
4
[ "BSD-3-Clause" ]
permissive
CREATE DATABASE test CHARACTER SET utf32 COLLATE utf32_general_ci; use test; CREATE TABLE tvseries ( id INT NOT NULL AUTO_INCREMENT, description TEXT NULL, name VARCHAR(64) NOT NULL, PRIMARY KEY (id) ); CREATE TABLE season ( id INT NOT NULL AUTO_INCREMENT, name VARCHAR(64) NOT NULL, dateS...
true
3401bcef15928435eacb6da60f67b57744a5ebc3
SQL
egovernments/DIGIT-OSS
/finance/egov/egov-commons/src/main/resources/db/migration/main/V20150918162945__commons_core_DDL.sql
UTF-8
41,134
3.625
4
[ "GPL-1.0-or-later", "GPL-3.0-or-later", "LicenseRef-scancode-proprietary-license", "GPL-3.0-only", "MIT", "LicenseRef-scancode-generic-cla" ]
permissive
------------------START------------------ CREATE TABLE eg_authorization_rule ( id bigint NOT NULL, actionid bigint, object_type character varying(256), scriptid bigint ); ALTER TABLE ONLY eg_authorization_rule ADD CONSTRAINT eg_authorization_rule_pkey PRIMARY KEY (id); ALTER TABLE ONLY eg_authorization...
true
a0369a893483be52f0bfdc1a82bf54922a099a69
SQL
lsmith804/alinkbtwpixels
/schema.sql
UTF-8
322
3
3
[]
no_license
CREATE DATABASE entries_db; USE entries_db; CREATE TABLE entries ( id INT AUTO_INCREMENT NOT NULL, createdAt TIMESTAMP NOT NULL, subject varchar(50) NULL, username varchar(50) NULL, game varchar(100) NULL, entry varchar(1000) NULL, photo varchar(1000) NULL, PRIMARY KEY(id) ); SELECT * FROM entrie...
true
fc8eaf56320d0baf510d7dfdc81b4c3e0ddfb01d
SQL
shawsenk/IST-659
/Week 6/SQLQuery1.sql
UTF-8
4,026
3.65625
4
[]
no_license
--Adding a row to the vc_Status table INSERT INTO vc_Status(StatusText) VALUES ('Scheduled') -- The following line shows all the rows of vc_Status SELECT * FROM vc_Status --Adding three more values to the vc_Status table INSERT INTO vc_Status(StatusText) VALUES ('Started'), ('Finished'), ('On Time') INSERT IN...
true
16356fa46d0a3272ab5aaaff81887abbbf1b65f8
SQL
cantei/aroundtheworld
/02_epi_interval_doses.sql
UTF-8
648
3.71875
4
[]
no_license
SELECT t.HOSPCODE,t.CID,t.`NAME`,t.LNAME,t.BIRTH,t.DISCHARGE,t.TYPEAREA ,t.DHB1,t.DHB2,t.DHB3 ,DATEDIFF(t.DHB2,t.DHB1) AS INTERVAL1 ,DATEDIFF(t.DHB3,t.DHB2) AS INTERVAL2 FROM ( SELECT p.HOSPCODE,p.CID,p.`NAME`,p.LNAME,p.BIRTH,p.DISCHARGE,p.TYPEAREA ,MIN(IF(e.VACCINETYPE='091',e.DATE_SERV,NULL)) AS DHB1 ,MIN(IF(e.VA...
true
bf4def2fc433ea0eccdfb0cd84e5f8cc2d7fa6f9
SQL
tsvico/SSM-seckill
/src/main/sql/seckill.sql
UTF-8
1,824
3.921875
4
[]
no_license
-- 秒杀执行的存储过程 DELIMITER $$ -- 新的换行 由 ; 转换为 $$ -- 定义存储过程 in 输入参数 out 输出参数 -- row_count() 返回上一条修改类型sql 的影响函数 -- row_count() 0表示未修改数据 >0 表示修改的行数 <0表示sql错误/未执行 CREATE PROCEDURE `seckill`.`execute_seckill` ( IN v_seckill_id BIGINT, IN v_phone BIGINT,IN v_kill_time TIMESTAMP, OUT r_result INTEGER) BEGIN DECLARE insert...
true
c811d39bb7606cab03300cbf139d677d44776d18
SQL
juhidhingra/hr_database
/#hr_database_joins.sql
UTF-8
7,348
4.375
4
[]
no_license
#hr_database_joins #display the first and last name, department, city, and state province for each employee SELECT employees.first_name, employees.last_name, departments.department_name, locations.city, locations.state_province FROM employees JOIN departments ON employees.department_id = departments.department_id J...
true
55ab91620608512ef279b0a58d173c3bdcbb63e2
SQL
hajiratasneem/medical-necessity
/coverage_determinations/eye/OPT/cqls/OPTPrepopulation.cql
UTF-8
5,484
3.0625
3
[ "Apache-2.0" ]
permissive
library OPTPrepopulation version '1.0.0' using FHIR version '4.0.0' include FHIRHelpers version '4.0.0' called FHIRHelpers codesystem "ICD-10-CM": 'http://hl7.org/fhir/sid/icd-10-cm' codesystem "LOINC": 'http://loinc.org' codesystem "HCPCS": 'https://hcpcs.codes/' codesystem "SNOMED-CT": 'http://snomed.info/sct' cod...
true
6b1a0519a0cb9056ebb5efcbc2c56e7e568a55e1
SQL
YuTengChang/akam_mrqos
/local_other_script/pp_coverage_init.sql
UTF-8
1,205
2.96875
3
[]
no_license
.separator , drop table if exists pp_coverage; create table pp_coverage ( TOT_DEMANDS float, IN_COUNTRY_PCT float, IN_ASN_PCT float, HAS_PP_PCT float, AVG_DISTANCE float, DATESTAMP integer ); create index if not exists date_idx on pp_coverage (DATESTAMP ASC); .separator , drop table if exis...
true
621022cc2f8c0c1fea7361301542787d65d54022
SQL
fabfabrice/gymparmentier
/gym.sql
UTF-8
3,008
3.359375
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.9.3 -- https://www.phpmyadmin.net/ -- -- Hôte : localhost:8889 -- Généré le : mar. 01 sep. 2020 à 11:22 -- Version du serveur : 5.7.26 -- Version de PHP : 7.4.2 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; -- -- Base de données : `gym` -- -- --------------...
true
44cb5e81dd71bf326e1538cce1a7d3539ef14d39
SQL
roadpilot/sql-join-subquery-count
/main.sql
UTF-8
1,728
4.4375
4
[]
no_license
/* Julia just finished conducting a coding contest, and she needs your help assembling the leaderboard! Write a query to print the respective hacker_id and name of hackers who achieved full scores for more than one challenge. Order your output in descending order by the total number of challenges in which the hacker ea...
true
ad9cd43c15d3e061a07f4dcc4d3d7e44efd13e26
SQL
kidakarn1/project_KIDDEE_new
/my-app/backend/permission.sql
UTF-8
2,106
3.265625
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.8.5 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Jun 04, 2019 at 11:39 AM -- Server version: 10.1.40-MariaDB -- PHP Version: 7.1.29 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OL...
true
b651381ee32e17209309d8ee9dea4f94c9e830e9
SQL
wztan004/Practise-SQL
/Practice/Easy/22_Salary/solution.sql
UTF-8
328
3.875
4
[ "MIT" ]
permissive
-- Method 1 SELECT * FROM ( -- important to use dense rank because if 1st position is tied, there's no second place. SELECT *, DENSE_RANK() OVER(ORDER BY salary DESC) _rank FROM Employees) q WHERE _rank = 2; -- Method 2 SELECT * FROM Employees WHERE salary= (SELECT DISTINCT(salary) FROM Employees ORDER BY salary LIM...
true
be223187bb407d37992c9f1c15ddaf7f1052edf8
SQL
igoltz/flex-standalone-site
/src/resources/sql/migrations/0006_exercise_license.sql
UTF-8
669
2.921875
3
[ "CC-BY-4.0" ]
permissive
ALTER TABLE `exercise` ADD COLUMN `license` VARCHAR(60) NOT NULL DEFAULT 'cc-by' COMMENT 'The kind of license this exercise is attached to' AFTER `fk_transcription_id`, ADD COLUMN `reference` TEXT NOT NULL COMMENT 'The url or name of the entity that provided this resource (if any)' AFTER `license`; UPDATE exercis...
true
7e9bd8d7a04ca877647356f6d0d2381ea1ac26ec
SQL
ForLearningAtJob4J/job4j_hibernate
/db/init+.sql
UTF-8
1,059
3.359375
3
[]
no_license
create table accounts ( id integer generated by default as identity constraint accounts_pkey primary key, active boolean not null, username varchar(255) ); create table students ( id integer generated by default as identity constraint students_pkey ...
true
927030e67fd47d6348e9ef9987cb47026061d2fb
SQL
alonly123/ezcloudserver
/doc/datasql.sql
UTF-8
633,369
2.984375
3
[]
no_license
prompt PL/SQL Developer import file prompt Created on 2016年5月10日 by xxx set feedback off set define off prompt Dropping ACCOUNT... drop table ACCOUNT cascade constraints; prompt Dropping ADMINREGION... drop table ADMINREGION cascade constraints; prompt Dropping ALARM... drop table ALARM cascade constraints; ...
true
88a01a3040d2a5478c261d1c33dcfb2df4ed5a8a
SQL
Ariah-Group/Research
/db_scripts/current_mysql/5.0/tables/KC_TBL_PERSON_BIOSKETCH.sql
UTF-8
2,269
3.75
4
[ "Apache-2.0", "ECL-2.0" ]
permissive
DELIMITER / CREATE TABLE PERSON_BIOSKETCH ( PERSON_BIOSKETCH_ID DECIMAL(8) NOT NULL, PERSON_ID DECIMAL(22) NOT NULL, DESCRIPTION VARCHAR(4000), FILE_NAME VARCHAR(300), CONTENT_TYPE VARCHAR(255), ATTACHMENT_FILE BLOB, UPDATE_USER VA...
true
9fd94d826c11ab74b6d57e35fd41414a33e3df6e
SQL
F13Group/KnowHub
/db/sprint5/2_knowhub_db_test_data_8000_rows_for_1_Category.sql
WINDOWS-1251
280,883
2.78125
3
[]
no_license
SET datestyle = dmy; INSERT INTO categories (value, short_value) VALUES ('Java','Java'), ('.NET','.NET'), ('Functional Testing (FT)','FT'), ('Automatic Testing (AT)','AT'), ('Front End (FE)','FE'), ('Other Categories','Other'), ('DevOps','DevOps'), ('Business Intelligence (BI)','BI'); INSERT INTO tags (value) V...
true
f244db45e3d4e021ca666cda27e558e89373af48
SQL
liangjinyin/2018
/db/mysql/xieguofu.sql
UTF-8
2,505
3.390625
3
[]
no_license
ALTER TABLE b_project ADD COLUMN state VARCHAR(64) NOT NULL COMMENT '项目状态'; ALTER TABLE b_project ADD COLUMN quotation VARCHAR(64) DEFAULT NULL COMMENT '我方对外报价金额'; ALTER TABLE b_project ADD COLUMN cost VARCHAR(64) DEFAULT NULL COMMENT '我方成本金额'; ALTER TABLE `b_project` MODIFY COLUMN `sale_manager` varchar(64) CHARACT...
true
43c9eb0f8214fb174520c6457f1f7ef176b96e5b
SQL
tautvydascoding/2018-07
/uzduotys/diena_13/TEORIJA- MYSQL-SQL---js/mysql-sql/start-tutorial.sql
UTF-8
3,017
3.1875
3
[]
no_license
CREATE DATABASE `hospital9`; show databases; -- ` - db/tables pavadinimams -- ' - tekstui/reikmems/values -- "" - tekstui/reikmems/values CREATE DATABASE hospital10; use hospital10; // nurodome darbine duomenu base (DB) use hospital10; CREATE TABLE doctors ( id INT(6) AUTO_INCREMENT PRIMARY KEY, ...
true
98302ac451d4877073cedcd6bc7612187e10c7e5
SQL
sergei-doroshenko/it-spring
/src/main/resources/db/attachments.sql
UTF-8
529
3.578125
4
[]
no_license
SELECT ATTACHMENTS.ID AS attachment_id, ATTACHMENTS.CREATE_DATE AS attachment_create_date, ATTACHMENTS.CREATE_BY AS attachment_create_by, USERS.FIRST_NAME AS create_by_first_name, USERS.LAST_NAME AS create_by_last_name, ATTACHMENTS.FILE_NAME AS attachment_file_name FROM ATTACHMENTS LEFT JOIN USERS ON ATTACHMENTS.CREATE...
true
6c0f0e242983f36436d171598f53d1a249f41b66
SQL
armandoaepp/PHPeru-FrameWork
/v.0.8/clases/Procedure/Procedure_textos.sql
UTF-8
1,545
3.5625
4
[]
no_license
/* Procedures Generada desde Cix-PHP - by power @armandoaepp */ DELIMITER ;; CREATE PROCEDURE usp_set_textos( id int(11),identificador text,titulo text,descripcion text,orden int(11),estado int(1),fecha timestamp ) BEGIN INSERT INTO textos( textos.id, textos.identificador, textos.titulo, textos.descripcion, ...
true
30abd08695946fc40931b7da2bfc1f8148576319
SQL
sammyjava/neptune
/jcms/sql/20100226.sql
UTF-8
1,146
2.890625
3
[ "Apache-2.0" ]
permissive
-- -- add utility links to header, and associated stylesheet classes -- deprecate single header image stuff -- \connect - jcms INSERT INTO updatelog (name,value) VALUES ('db_version','20100226'); -- deprecate header_image settings DELETE FROM settings WHERE setting_id>=120 AND setting_id<=126; -- remove div#header...
true
f1b59a819b1c987e64c974311bab61e570c467ba
SQL
nahowley/Peerfit_DataAnalysis
/project/solution/Question4.sql
UTF-8
2,447
4.46875
4
[]
no_license
/*How many members completed at least 1 reservation and had no more than 1 cancelled reservation in January?*/ SELECT COUNT(distinct member_id) AS engaged_members FROM clubready_reservations Where reserved_for between '2018-01-01 00:00:00' and '2018-02-01 00:00:00' GROUP BY member_id HAVING COUNT(signed_in_at...
true
0b3514a55d40d558d477bd39aa59380b011b2903
SQL
medh/crm
/upgrade.sql
UTF-8
1,894
4.0625
4
[]
no_license
-- Sql - table addresses DROP TABLE IF EXISTS `addresses`; CREATE TABLE IF NOT EXISTS `addresses` ( `id` int(11) NOT NULL AUTO_INCREMENT, `number` int(4) NOT NULL, `street` varchar(225) NOT NULL, `postalCode` int(6) NOT NULL, `city` varchar(225) NOT NULL, ...
true
836130812ae7bdfd4e792b2bfa37ef4503387d48
SQL
Ankit-k-karan/SQL-Common
/SQL Script/RFP 2019/Allocation algo/04 Sept 2019-- No new Tp/district type2 insert.sql
UTF-8
15,864
3.203125
3
[]
no_license
--insert into nsdc_district_priority(StateName,DistrictName,DistrictCategory,SeqNo) select s.id stateId, d.Id districtid , case when distype ='type2' then 2 end districtcategory,cast(sno as bigint) sno --select * from (select 'Gujarat' state ,'type2' distype, 'Junagadh' district ,'1' sno union all select 'Uttar Prad...
true
ba71a54d3c12202b3a475e4df109d4d7847a9272
SQL
brimsol/BizStock
/sql/bistock_nov_22.sql
UTF-8
31,400
2.9375
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 3.5.2 -- http://www.phpmyadmin.net -- -- Host: localhost -- Generation Time: Nov 22, 2012 at 03:40 PM -- Server version: 5.5.25a -- PHP Version: 5.4.4 SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*...
true
7bfcc22e0f08517b2f00c9a592068c72d8fce158
SQL
abhinavks3112/MostBasicWebsite
/MostBasicWebsite/Database Scripts/1.3_Create_Procedure_CheckCredentials_Script.sql
UTF-8
189
2.859375
3
[]
no_license
CREATE PROCEDURE CHECKUSERCREDENTIALS( @USERNAME NVARCHAR(256), @PASSWORD NVARCHAR(256) ) AS BEGIN SELECT 1 FROM USERS U WHERE U.USERNAME = @USERNAME AND U.PASSWORDHASH = @PASSWORD; END
true
2c767135df60037a0d403f4ff1a6c35d61885b12
SQL
EssaifiAahmed/portfolio
/portfolio/portfolio.sql
UTF-8
9,530
3.125
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.8.3 -- https://www.phpmyadmin.net/ -- -- Hôte : 127.0.0.1 -- Généré le : lun. 06 mai 2019 à 13:58 -- Version du serveur : 10.1.36-MariaDB -- Version de PHP : 5.6.38 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101...
true
96ce84e965cfffc0e9a61a3001017ead0d438eaa
SQL
eduardo-mior/URI-Online-Judge-Solutions
/Sql/URI 2605.sql
UTF-8
116
3.359375
3
[]
no_license
SELECT p.name, f.name FROM products p INNER JOIN providers f ON p.id_providers = f.id WHERE p.id_categories = 6
true
a7305578ed075c73b5bd314d49af90f44fee0929
SQL
fdepaola/RateMyStudents
/rateMyStudents_DB.sql
UTF-8
3,812
3.375
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 3.2.4 -- http://www.phpmyadmin.net -- -- Host: localhost -- Generation Time: Apr 01, 2013 at 05:24 PM -- Server version: 5.1.44 -- PHP Version: 5.3.1 SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_S...
true
a22a27466a38569ee9ef8b47070f1eeb7f0c6a6c
SQL
MERegistro/meregistro
/meregistro/apps/reportes/queries/404_datos_basicos_anexos.sql
UTF-8
5,829
3.21875
3
[ "BSD-3-Clause" ]
permissive
select esax.nombre, j.nombre as jurisdiccion, tg.nombre as gestion, ax.cue, ax.nombre as anexo, ax.telefono, ax.email, df.nombre as dep_funcional, ---son los turno en horizontal (select case when et.turno_id is not null then 'TM' end from registro_anexo_turno et where et.anexo_id=ax.id and et.turno_id=1) as...
true
9d94f8d3635c940d6a7e6321b5d8d2bf395ca337
SQL
rnsdoodi/Programming-CookBook
/Back-End/Databases/PostgreSQL/Select/window_functions.sql
UTF-8
590
3.609375
4
[ "MIT" ]
permissive
SELECT depname, empno, salary, avg(salary) OVER (PARTITION BY depname) FROM empsalary; -- ========================= < OVER + ORDER BY > ========================= -- SELECT depname, empno, salary, rank() OVER (PARTITION BY depname ORDER BY salary DESC) FROM empsalary; -- ========================= < OVE...
true
b0c7a95ef15c0b8da040dcf51231347a552d495d
SQL
LUNG18/survey
/survey.sql
UTF-8
2,351
3.71875
4
[]
no_license
SET FOREIGN_KEY_CHECKS=0; -- ---------------------------- -- Table structure for survey_paper -- ---------------------------- DROP TABLE IF EXISTS `survey_paper`; CREATE TABLE `survey_paper` ( `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键id 问卷id', `title` varchar(128) DEFAULT NULL COMMENT '问卷名称', `description...
true
e090c37be5e13ce19b480b965f338bb22e6eb287
SQL
xiagit000/CMS_Syatem
/trunk/cms-web/src/sql/2.sql
UTF-8
682
2.640625
3
[]
no_license
/** **@version 1.1 **@date 2010/06/28 **@author junxue.rao */ /** *@func alter table Entry add column hits int. */ alter table Entry add hits int DEFAULT 0; commit; alter table FRIENDLYLINK add TYPE_ID int DEFAULT null; commit; alter table Entry add published NUMBER(1,0) DEFAULT 0 not null; alter table Entry add p...
true
8520b37389a307b16aebe1d9119c24fdbba58312
SQL
ndpdev/neststream
/include/setup.sql
UTF-8
628
3.078125
3
[]
no_license
create table Thermostat ( ThermostatID int not null auto_increment, DeviceID varchar(75) not null, FriendlyName varchar(50) not null, constraint PK_Thermostat primary key (ThermostatID) ); create table ThermostatData ( EntryTime datetime not null, ThermostatID int not null, Temperature smal...
true
bb4c17012ef3d48018ee9373d02c5a7a5244f839
SQL
TilluChauhan/event
/database sql/update database/loginuser.sql
UTF-8
1,829
3.125
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 5.1.0 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Nov 07, 2021 at 10:15 AM -- Server version: 10.4.19-MariaDB -- PHP Version: 7.3.28 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIE...
true
d18d7f4b8d82be500ae9f853f354e037ba68f3f0
SQL
guodongxiaren/ShiYan
/数据库/第03章 SQL/sample_ddl.sql
UTF-8
734
3.875
4
[]
no_license
-- 本SQL语句是MySQL数据库中的。对原书中的代码进行了修改。 CREATE DATABASE student; USE student; -- 这个是课本中的表,设计的比较差,不应该存储年龄而应该存储出生日期。 CREATE TABLE Student ( Sno CHAR(10) PRIMARY KEY, Sname VARCHAR(20) UNIQUE, Ssex CHAR(2), Sage SMALLINT, Sdept VARCHAR(20) ); CREATE TABLE Course ( Cno CHAR(4) PRIMARY KEY, Cname VARC...
true
79070b37d0507ef70b555c9d7fbc9e3db00a16ae
SQL
Romg2/SQL_Study
/SQL_Part2/040.SQL_Part2.sql
UTF-8
206
2.78125
3
[]
no_license
-- 040. 건수 출력하기 SELECT COUNT(EMPNO) AS OBS FROM EMP; SELECT COUNT(*) AS OBS FROM EMP; -- COUNT 등의 그룹함수는 NULL 값을 포함하지 않음 주의 SELECT COUNT(COMM) AS OBS FROM EMP;
true
7301ea239168b442bb32e6061f0584bf1cbbffaf
SQL
CS-6381/FinalProject
/Datastores & Distributed File Systems/MongoDB Community Server/performance_test_10reader.sql
UTF-8
1,432
3.03125
3
[]
no_license
# one reader #use database use general_db #create table db.createCollection('ten_reader') for (var i =0; i < 10000; i++) { db.ten_writer.insert({ _id: i, data: "DY3JRAYARCMTRA3FNR33XK9JD3DWSRHG1FRCFT66JERU3G9XSYPLUGEVZAV2RG99WNLK05IE4ML6M78PIN7UA7XCJ8SD1V1A9HHDK8JKMWB0XY0PFD666LRU9PR8MTL6", writer_id: 1, st...
true
d9f1ebc7b18097e33b01279b254e263ea7cd4cc8
SQL
jamaludinfikrii/hoteloka-backend
/date-type-mysql.sql
UTF-8
1,398
4.1875
4
[]
no_license
-- MYSQL DATE TYPE -- DATE = 03 - Nov -2020 -- DATETIME = 03 - Nov -2020 : 10 : 10 : 15 -- DATETIME VS TIMESTAMP -- date format mysql YYYY-MM-DD HH-MM-SS use date_type_tutorial; select * from datetime_vs_timestamp; -- DATE FUNCTIONS -- NOW() set @bebas = NOW(); select @bebas; -- CARA FILTER BY DATE select * from ...
true
47b240fcbf07b6645b803ea217f5fb4e9d4d1784
SQL
DotNetExample/Surging.Hero
/db/sql/auth.sql
UTF-8
16,197
3.484375
3
[ "MIT" ]
permissive
/*==============================================================*/ /* DBMS name: MySQL 5.0 */ /* Created on: 2019/7/16 22:43:28 */ /*==============================================================*/ SET NAMES utf8mb4; SET FOREIGN_KEY_CHECKS = 0; drop ...
true
868fded19e6c9c067977ffbb0197ae40959e5741
SQL
wspringe/SF-Data-Migration
/SQL/random sql.sql
UTF-8
3,429
2.984375
3
[]
no_license
USE [SF_Data_Migration] EXEC dbo.Insert_Users 'User' EXEC SF_REPLICATE 'SALESFORCE', 'Bronto_Required_Fields__c_Stage' SELECT * FROM Bronto_Required_Fields__c_Stage EXEC Insert_CustomSettings 'Bronto_Required_Fields__c' FIELD_INTEGRITY_EXCEPTION: field integrity exception: unknown (CreatedByID(005C0000003FpMN) is n...
true
d042f64ea1a2bf00b0d95670af9c67d0f847a535
SQL
NBDelpino1/sakila-db
/brainbuster8.sql
UTF-8
476
4.28125
4
[]
no_license
# Revenue for store 1 where film is rated R or PG-13 between 2005-06-08 and 2005-07-19 SELECT i.store_id AS Store, f.rating AS Movie_Rating, SUM(p.amount) AS Store_Revenue FROM payment p, rental r, inventory i, film f WHERE p.rental_id = r.rental_id AND r.inventory_id = i.inventory_id AND i.film_id = f.film...
true
b9c7b08c1875cdbec0cc7f97d844c29e9f945958
SQL
elias890420/Oracle-EBS-SQL
/DBA DBMS Profiler Data/DBA DBMS Profiler Data.sql
UTF-8
2,279
3.671875
4
[]
no_license
/*************************************************************************/ /* */ /* (c) 2010-2021 Enginatics GmbH */ /* www.enginatics.com */ /* ...
true
493ce5241948152a3d965c844747d547b3b9e58f
SQL
MarkMarkD/docker-compose-mywebapp-done
/docker-first-image/db/init/init.sql
UTF-8
798
2.9375
3
[]
no_license
CREATE USER dmitriy; CREATE DATABASE mytestdb; GRANT ALL PRIVILEGES ON DATABASE mytestdb TO dmitriy; \c mytestdb; CREATE TABLE public.listofparts(pnumber varchar, pname varchar, vendor varchar, qty int2, shipped date, received date); INSERT INTO listofparts (pnumber, pname, vendor, qty, shipped, received) VALUES (...
true
a8bc9a282da38c77e51705fa49903fc600a2a1e0
SQL
simeonelias/projet_avril
/elias_projet_nan/elias.sql
UTF-8
7,970
3.015625
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.8.0 -- https://www.phpmyadmin.net/ -- -- Hôte : 127.0.0.1 -- Généré le : ven. 26 avr. 2019 à 20:05 -- Version du serveur : 10.1.31-MariaDB -- Version de PHP : 7.2.4 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101...
true
e971e4adca7a8f65120205679e73a399f04fa067
SQL
YJHMIT/JavaStudy
/sacc-ComprehensiveSystem/sql/sys_user_role.sql
UTF-8
792
2.75
3
[ "MIT" ]
permissive
create table sacc_frontend.sys_user_role ( id bigint auto_increment comment 'UUID' primary key, role_id bigint not null comment '角色编号', user_id bigint not null comment '用户编号', remarks varchar(255) default '' ...
true
63a3de03fec7b765fb2d3d8420a085c6c6339fa3
SQL
DC-y/tianchi-mobile-2015
/season2/src/wz/features/user_item/ui_agg_1d.sql
UTF-8
84,954
3.46875
3
[]
no_license
-- ---------------------------------------------------------------------- -- -- 用户商品对特征(2014-12-04) -- -- 使用说明:运行即重新生成,所有表附带 2014-12-04 为后缀。 -- -- 包含特征: -- -- * 当天每小时的点击数 -- user_item_click_times_2015-12-16 (user_id, item_id, hour00, ...) -- * 当天时间窗口(2小时)点击数 -- user_item_click_times_win2_2014-12-04 (user_id, i...
true
eda6559147f118304e2816f31f6b7589684385fd
SQL
anthony12031/proyecto_maestria_base_datos
/baseDatos/Referencias/VistarRolesUsuarios.sql
UTF-8
3,782
3.703125
4
[]
no_license
--Kevin Camilo Díaz Monje, Código 20191495010 --Ejercicio de cuentas de usuarios y permisos de acceso a la información --Rol Estudiante create role estudiantes; --Creación de vista notaFinal_estudiantes create or replace view notaFinal_estudiantes as select cod_e, asignaturas.*, nom_e, n1, n2, n3,(coalesce(n1,0)*0....
true
160a054c08921871c7db5529a576776b5ddc276a
SQL
bpafoshizle/Small-Projects-and-Utils
/Perl_Utilities/SQL_To_VBString/NewCondensedVolumeDetailQuery.sql
UTF-8
6,392
3.59375
4
[]
no_license
SELECT IDS_MF.BUSINESS_DIVISION_CODE , INITCAP(IDS_MF.BUSINESS_DIVISION_DESCR)AS BusinessDivisionDescr , (IDS_MF.BUSINESS_DIVISION_CODE ||'--' ||INITCAP(IDS_MF.BUSINESS_DIVISION_DESCR))AS BusinessDivisionCodeDescr , IDS_MF.REGION_CODE ...
true
adacd5fbfa4fadadc88d9b499395f6b71bcbfbda
SQL
ekrasikov/cash
/SQL/create_db.sql
UTF-8
371
3.625
4
[]
no_license
create table users ( id INT PRIMARY KEY, name VARCHAR(80) UNIQUE NOT NULL ); create table categories ( id INT PRIMARY KEY, name VARCHAR(80) UNIQUE NOT NULL ); CREATE TABLE expenses ( id SERIAL PRIMARY KEY, date DATE NOT NULL, user_id INT REFERENCES users(id), category_id INT REFERENCES categories(id), amoun...
true
ce89e4a080916939f01befc18718e8708b2f9d58
SQL
agyaudiaisk/hotman1
/bencana.sql
UTF-8
5,691
2.953125
3
[ "MIT", "LicenseRef-scancode-unknown-license-reference" ]
permissive
-- phpMyAdmin SQL Dump -- version 4.7.0 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: 05 Des 2018 pada 14.50 -- Versi Server: 10.1.25-MariaDB -- PHP Version: 5.6.31 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CH...
true
e6fcd0d14c6e890a9cd6d2c1b6f8404d0682b71b
SQL
Jungeol/algorithm
/programmers/sql_kit/GROUP BY/dongho.sql
UHC
335
2.9375
3
[]
no_license
--https://programmers.co.kr/learn/courses/30/lessons/59040 -- ȣҿ ̿ ȸϴ SQL ۼּ. --̶ ̰ ȸּ. SELECT ANIMAL_TYPE, COUNT(*) AS count FROM ANIMAL_INS GROUP BY ANIMAL_TYPE
true
9c771a33f62f1c8aad771bb5038d525e82a6b181
SQL
tuesdayshaw/database-exercises
/limit_exercises.sql
UTF-8
252
3.578125
4
[]
no_license
SELECT DISTINCT last_name FROM employees GROUP BY last_name DESC LIMIT 10; SELECT emp_no, first_name, last_name FROM employees WHERE hire_date LIKE '199%' AND birth_date LIKE '%-12-25' ORDER BY birth_date ASC, hire_date DESC LIMIT 5 OFFSET 45;
true
8ca51413a77b5ab388eb386817441af9cf1a78bf
SQL
DouglasMacKrell/Pursuit-Core-Web-pg-promise-Lab
/server/seed.sql
UTF-8
1,652
4.09375
4
[]
no_license
DROP DATABASE IF EXISTS facebook_db; CREATE DATABASE facebook_db; \c facebook_db; CREATE TABLE users( id SERIAL PRIMARY KEY, first_name VARCHAR, last_name VARCHAR, age INT ); CREATE TABLE posts( id SERIAL PRIMARY KEY, poster_id INT REFERENCES users(id) ON DELETE CASCADE, body TEXT ); CR...
true
13c9d36a34b567c583dc226192353b22a718749e
SQL
bangil0/go-maps
/db_prim.sql
UTF-8
14,121
2.96875
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.9.2 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Mar 27, 2020 at 11:57 AM -- Server version: 10.4.10-MariaDB -- PHP Version: 7.3.12 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OL...
true
efea1bf2b3580c4c8757159525476fcf438043a6
SQL
JoeEO/sql-scratch-capstone-turn-in
/codecademy project joe adkison/code.sql
UTF-8
2,395
4.65625
5
[]
no_license
--Count campaigns SELECT COUNT (DISTINCT utm_campaign) AS 'Campaign Count' FROM page_visits; --Count sources SELECT COUNT (DISTINCT utm_source) AS 'Source Count' FROM page_visits; SELECT DISTINCT utm_campaign AS 'Campaigns', utm_source AS Sources FROM page_visits; --Find unique pages that are on the web...
true
dbee8a718e07d4331fccc87eaaad32ccd1892897
SQL
jlcchu/GITHUB
/常用SQL/回收数据文件大小.sql
UTF-8
1,120
3.46875
3
[]
no_license
SELECT 'alter database datafile ' || CHR (39) || file_name || CHR (39) || ' resize ' || CEIL (hwmsize * 1.2) || 'M;' FROM ( SELECT a.file_id, a.file_name, a.filesize, b.freesize, (a.filesize - b.freesize)...
true
8605a2632e6850337c7d77d43f2bd92125cc2bca
SQL
roberGzt/pp1-tp-inicial-mavn
/tp-inicial/sql/scriptAgenda.sql
UTF-8
1,938
3.359375
3
[]
no_license
DROP database if exists tpi_g2; create database tpi_g2 DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_general_ci; use tpi_g2; drop table if exists personas; drop table if exists tiposDeContacto; drop table if exists domicilios; drop table if exists localidades; CREATE TABLE if not exists tiposDeContacto ( idTi...
true
3dbc79826581fc6eee56d1bdab5999beca6d92d7
SQL
silence-do-good/stress-test-Postgres-and-MySQL
/dump/high/day16/select0723.sql
UTF-8
191
2.796875
3
[]
no_license
SELECT timeStamp, temperature FROM ThermometerObservation WHERE timestamp>'2017-11-15T07:23:00Z' AND timestamp<'2017-11-16T07:23:00Z' AND SENSOR_ID='ba7d9d30_4dd5_4e44_a863_39798c2f3ab0'
true
9b3f30c6b173de5109bc1612d77b95ad443e9629
SQL
mluick/Megan-Portfolio
/Minnesota_Mortality/sql/adaptive_filter_under5.sql
UTF-8
7,381
4.09375
4
[]
no_license
-- synthetic_population --WITH synthetic_population as --( --SELECT p.sp_hh_id, hh.geom as geom, p.sex, p.age, 1 as value, p.race --FROM synthetic_households hh INNER JOIN synthetic_people p ON hh.household_id = p.sp_hh_id --WHERE p.age <= 4 AND p.age >= 0 --#############################################################...
true
78e2922a48b285a369a8e9bdfbce7ab82ae05d6e
SQL
koreahong/bigquery
/ch07/32.sql
UTF-8
486
3.390625
3
[]
no_license
CREATE OR REPLACE TABLE ch07eu.cycle_hire AS SELECT start_station_name , end_station_name , ST_DISTANCE(ST_GeogPoint(s1.longitude, s1.latitude), ST_GeogPoint(s2.longitude, s2.latitude)) AS distance , duration FROM `bigquery-public-data`.london_bicycles.cycle_hire AS h JOIN `bigquery-public-d...
true
500cc802c9aca628822228aba4d9157db7daf055
SQL
HotelsByDay/Infinite
/modules/fleximigrations/migrations.sql
UTF-8
239
2.515625
3
[]
no_license
CREATE TABLE `migration` ( `migrationid` int(11) NOT NULL AUTO_INCREMENT, `hash` varchar(30) NOT NULL, `name` varchar(100) NOT NULL, `updated_at` datetime default NULL, `created_at` datetime default NULL, PRIMARY KEY (`id`) );
true
5c89c7e0557fa8e07ef061a6ff44d4b42d374f44
SQL
evrimulgen/Oracle-DBA-Life
/INFO/Books Codes/Oracle Database 10g PLSQL/Code/Chapter13/nds_sql_01.sql
UTF-8
1,033
3.140625
3
[ "MIT" ]
permissive
/* * nds_sql_01.sql * Chapter 13, Oracle10g PL/SQL Programming * by Ron Hardman, Michael McLaughlin and Scott Urman * * Purpose: * This is designed to test the Native Dynamic SQL package. */ -- Test block to create, increment and drop a sequence. DECLARE -- Define local variables. value_in VARCH...
true
885af88df85f2d995ca81dd304f20f846d7895c3
SQL
nibble-arts/database_xh
/queries/jury.sql
UTF-8
267
3.3125
3
[]
no_license
SELECT actor.titel, actor.name, actor.vorname, activity.event as event, activity.description as vorsitz FROM actor LEFT JOIN activity ON actor.id = activity.actor AND activity.role = 25 LEFT JOIN event ON activity.event = event.id
true
8c28fb9405fea8452b700c1663a6bacb6ef4ea76
SQL
pandawl/panda_blog_web
/db/panda_blog.sql
UTF-8
3,998
3.65625
4
[]
no_license
/* Navicat Premium Data Transfer Source Server : panda Source Server Type : MySQL Source Server Version : 50635 Source Host : 188.131.223.181:3306 Source Schema : panda_blog Target Server Type : MySQL Target Server Version : 50635 File Encoding : 65001 Date: 16/07/20...
true
eed18264de7e9067d72c6731da743670f7906e2c
SQL
FoxComm/highlander
/phoenix-scala/sql/V4.100__manual_customer_groups.sql
UTF-8
353
2.765625
3
[ "MIT" ]
permissive
alter table customer_dynamic_groups rename to customer_groups; create domain customer_group_type text check (value in ('manual', 'dynamic')); alter table customer_groups add column group_type customer_group_type not null default 'dynamic'; alter table customer_groups_search_view add column group_type customer_group_...
true
ec5db1c54584bd9ee70615fc2d4545b37324e642
SQL
amersulieman/database-project-app
/queries/query-14.sql
UTF-8
1,057
4.25
4
[]
no_license
/*14. Given a person’s identifier, find the job position with the highest pay rate for this person according to his/her skill possession. */ WITH qualified_positions as ( SELECT pos_code FROM ( /*requirements of all job positions*/ SELECT pos_code, count(ks_code) as reqs ...
true
7acc989b60ccab0426d7a790f5dba73c8082d58d
SQL
SezaDio/boloku_id
/asset/database/pepak.sql
UTF-8
1,742
2.9375
3
[ "LicenseRef-scancode-unknown-license-reference", "MIT" ]
permissive
-- phpMyAdmin SQL Dump -- version 4.6.5.2 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Jun 06, 2017 at 02:56 AM -- Server version: 10.1.21-MariaDB -- PHP Version: 5.6.30 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SE...
true
a08e8297b25f87ce24542806f5703e27f87ba52d
SQL
dkirol/SQL-PL-SQL
/Examples/Ex1.sql
UTF-8
1,255
3.78125
4
[]
no_license
--Ex.1 SELECT FROM profiles p INNER JOIN userprofile up ON p.id = up.id_profile INNER JOIN account a ON up.id_login = a.id_login WHERE p.id = 1018 AND a.login = '@zmienna_1'; --=================================================== CREATE OR REPLACE FUNCTION funkcja1 ( login_name IN VARCHAR) RETURN VARCHAR as count_u...
true