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
04616ea52d176b596da7b9ff6b974de3dce35320
SQL
Mediagroup5/BarrocIt
/portfolio.sql
UTF-8
1,069
2.859375
3
[]
no_license
/* Navicat MySQL Data Transfer Source Server : local Source Server Version : 50540 Source Host : localhost:3306 Source Database : barroc_it Target Server Type : MYSQL Target Server Version : 50540 File Encoding : 65001 Date: 2014-11-12 20:03:29 */ SET FOREIGN_KEY_CHECKS=0; -- ---...
true
fa75bb2b40145b0f21345ce64c87d9586a2dffd8
SQL
genoufox/sql-scripts
/神鬼传奇白金vip 充值登陆情况0224.sql
GB18030
3,373
3.875
4
[]
no_license
select a.userid as ˺id, a.passport as ˺, case a.rank when 1 then '' when 2 then '' when 3 then '׽' when 4 then '' else null end as VIPȼ, a.mobilephone as ֻ, a.tamount as ۼƳֵ, NVL(c.pa...
true
550ccdc2207f2e9fea93cc925c3a7be74649f30a
SQL
chidambaranadig/QueryEvaluator
/test/TPCH_Q10.SQL
UTF-8
1,445
3.875
4
[]
no_license
CREATE TABLE CUSTOMER ( custkey int, name string, address string, nationkey int, phone string, acctbal float, mktsegment string, comment string ) FROM FILE 'customer.tbl' USING TPCH('customer'); CREATE TABLE ORDERS ( orderkey int, custkey int, orderstatus string, totalprice float, orderdate i...
true
7b385549197bffacd158f25358f397e8e4745596
SQL
User2018610/reading-MySQL
/第十六章-创建高级联结.sql
UTF-8
1,560
4.125
4
[]
no_license
# 第16章-创建高级联结 # 使用表别名 SELECT cust_name, cust_contact FROM customers AS c, orders AS o, orderitems AS oi WHERE c.cust_id = o.cust_id AND oi.order_num = o.order_num AND prod_id = 'TNT2'; # 自联结 SELECT prod_id, prod_name FROM products WHERE vend_id = (SELECT vend_id FROM products WHERE prod_id...
true
653f132f8f29389a5d614de936358b15a6c38b9f
SQL
jjung219/BootcampX
/4_queries/7_average_assistance_request_wait_time.sql
UTF-8
178
2.671875
3
[]
no_license
-- average time that students wait for an assistance -- started_at - created_at = waiting time SELECT avg(started_at - created_at) as average_wait_time FROM assistance_requests;
true
f0f780e8fd93e3d11a87ed0822af7a35e139d843
SQL
ocean-wave/fep
/db_script/update/2012-12-19(实时任务表增加字段).sql
GB18030
449
2.9375
3
[]
no_license
ALTER TABLE R_REALTIME_TASK ADD TERMINAL_PROTOCOL VARCHAR2(2) DEFAULT '0'; ALTER TABLE R_REALTIME_TASK ADD METER_PROTOCOL VARCHAR2(2) DEFAULT '0'; -- Add comments to the columns comment on column R_REALTIME_TASK.TERMINAL_PROTOCOL is 'ն˹Լ03761棻'; comment on column R_REALTIME_TASK.METER_PROTOCOL is 'ƣԼ...
true
095d901663f1bbe06452b1b0fb0261497985a961
SQL
hzbarcea/cosmo
/archive/migration/src/main/resources/110-to-120-MySQL5-pre.sql
UTF-8
1,545
3.140625
3
[]
no_license
# 110-to-120-MySQL5-pre.sql # alter existing tables # subscription alter table subscription add column etag varchar(255); # users alter table users add column etag varchar(255); # user_preferences alter table user_preferences add column etag varchar(255); #item alter table item add column etag varchar(...
true
fd7d73e125314342101e99b33111642e5dece98a
SQL
rhelmer/graphs
/sql/schema.sql
UTF-8
2,992
3.453125
3
[]
no_license
CREATE TABLE IF NOT EXISTS machines ( id SMALLINT UNSIGNED NOT NULL AUTO_INCREMENT, os_id INT UNSIGNED NOT NULL, is_throttling TINYINT UNSIGNED NOT NULL DEFAULT '0', cpu_speed VARCHAR(255), name VARCHAR(255) NOT NULL, is_active TINYINT UNSIGNED NOT NULL DEFAULT '0', date_added INT UNSIGNED NOT NULL...
true
c5057c3772e85564202a035d6c2053cb2dfc01ff
SQL
bpasbuddies/buddies2
/MyProjects/eEMRT/EEMRT/Tables/SUB_TASKS.sql
UTF-8
666
2.75
3
[]
no_license
CREATE TABLE eemrt.sub_tasks ( sub_tasks_id NUMBER NOT NULL, work_orders_id NUMBER NOT NULL, sub_task_number VARCHAR2(20 BYTE) NOT NULL, sub_task_title VARCHAR2(1000 BYTE), start_date DATE, end_date DATE, description VARCHAR2(2000 BYTE), "ORGANIZATION" VARCHAR2(200 BYTE), faa_poc VARCHAR2(200...
true
ae8d340f560caa802aa77384696b7ae4cc868420
SQL
sumeyyekilic/CSharpCampProject
/MyNotes/SQLQuery2.sql
UTF-8
3,213
3.890625
4
[]
no_license
--YORUM SATIRI.. --çalıştırmak istediğimiz kodu seçip execute ederiz. --case insensitive SELECT * FROM Customers select ContactName, City, CompanyName from Customers --bunu çalıştırınca arka planda c# daki array gibi bir fake tablo oluşur. --alias --ANSII select ContactName Adi, City Sehir, CompanyName SirketAdi...
true
1f00e4ee03e4fbe97b05d44d390c13ba1b077a1d
SQL
radudilirici/FMI
/Year 2/Sem 2/BD/lab3-explicatii.sql
UTF-8
1,557
4.15625
4
[]
no_license
select e1.employee_id, e1.last_name, e2.employee_id, e2.last_name from employees e1, employees e2 where e1.manager_id = e2.employee_id(+); select * from employees natural join departments; select d.department_id, e.employee_id from employees e join departments d on (d.department_id <> e.department_id); -- fara where...
true
ada809d00913710dc263af75d48fdc03c03c7d28
SQL
FoodBusiness/Database
/CLIENT_FEATURES.tbl.sql
UTF-8
373
2.859375
3
[]
no_license
CREATE TABLE IF NOT EXISTS `food`.`CLIENT_FEATURES` ( `CLIENT_ID` INT NOT NULL, `FACEBOOK` VARCHAR(250) NULL, `FOURSQUARE` VARCHAR(250) NULL, `YELP` VARCHAR(250) NULL, PRIMARY KEY (`CLIENT_ID`), CONSTRAINT `CLIENT_FEATURES_FK` FOREIGN KEY (`CLIENT_ID`) REFERENCES `food`.`CLIENT` (`CLIENT_ID`...
true
136d3bba1cec2a745596ad67a83d52075faa775f
SQL
TimStOnge/CodingBootcamp_HW7_SQL
/SQL_HW_Part2.sql
UTF-8
1,182
3.9375
4
[]
no_license
-- PART 2 ----------------------------------------------------------- -- Using your gwsis database, develop a stored procedure that will drop an individual student's enrollment -- from a class. Be sure to refer to the existing stored procedures, enroll_student and -- terminate_all_class_enrollment in the gwsis databa...
true
8951aea53b77d69c903648f6f0bee6610e697edd
SQL
shohag-cse-knu/SRS-Code
/sql_geo_functions.sql
UTF-8
1,811
3.046875
3
[]
no_license
/* Function structure for function `district_name` */ /*!50003 DROP FUNCTION IF EXISTS `district_name` */; DELIMITER $$ /*!50003 CREATE DEFINER=`root`@`localhost` FUNCTION `district_name`(div_code INT, dis_code INT) RETURNS varchar(50) CHARSET latin1 BEGIN DECLARE `name` VARCHAR(50); SELECT district INTO `name` ...
true
f7be133a1d5aed43919078cf50c5374c68f9c0f8
SQL
weder96/weder96.github.io
/fullPageMaster/database/sqls/19_jsonEvents.sql
UTF-8
1,956
3.921875
4
[ "MIT" ]
permissive
--A real world example --OK, let’s give this a go with a real life use case. Let’s say we’re tracking analytics, so we have an events table: CREATE TABLE events ( name varchar(200), visitor_id varchar(200), properties json, browser json ); --We’re going to store events in this table, like pageviews. Each eve...
true
284333c03be8e817eb94bc530a5137b60d1cbca0
SQL
EdLuo/GIMS
/DB/gims_db.sql
UTF-8
8,124
3.4375
3
[]
no_license
/*==============================================================*/ /* DBMS name: MySQL 5.0 */ /* Created on: 2018/3/17 22:44:26 */ /*==============================================================*/ drop table if exists T_companyinfo; drop table if...
true
189b91b8b382b8f8e37ef824735a8594d3e30e5d
SQL
fairfield-university-is510-fall2017/movies-tonight-parts-1-4-Vincentrella
/MoviesTonightDDL.sql
UTF-8
1,488
4.15625
4
[]
no_license
CREATE DATABASE MoviesTonight; USE MoviesTonight; #Creating Table "Theater" CREATE TABLE THEATER ( TheaterID int(11) NOT NULL auto_increment, TNAME varchar(50) default NULL, Location varchar(50) default NULL, Phone int(11) default NULL, PRIMARY KEY (TheaterID) ); #Creating Table "Show" CREATE TABLE SHO...
true
6ce27ed547396f6586eedf6a309fb5be885e357c
SQL
Gasbuddel/Zeiterfassungsprojekt
/Zeiterfassung/SQL Skripte/install+daten aktuell.sql
UTF-8
9,352
3.171875
3
[]
no_license
-- DDL-Skript für das BONN-IT-Projekt <Zeiterfassung> -- Datenbank erstellen CREATE DATABASE /*!32312 IF NOT EXISTS*/ zeiterfassung /*!40100 DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci */; USE zeiterfassung; -- Vorhandene Datensätze löschen DROP TABLE IF EXISTS TZeiterfassung; DROP TABLE IF EXISTS TMita_Proj; ...
true
5d207990df66bd131c597e73856a6a34fd96e0d8
SQL
NikitaDeepaklal/people-management
/src/main/resources/__schema.sql
UTF-8
415
3.03125
3
[]
no_license
DROP TABLE IF EXISTS PERSON; CREATE TABLE "PERSON"( "ID" INTEGER NOT NULL, "FIRST_NAME" VARCHAR(255) NOT NULL, "LAST_NAME" VARCHAR(255) NOT NULL, "ADDRESS_ID" INTEGER DEFAULT NULL ); DROP TABLE IF EXISTS ADDRESS; CREATE TABLE "ADDRESS"( "ID" INTEGER NOT NULL, "CITY" VARCHAR(255),...
true
dadf24a9852df4e194c799b030979bfa965a0658
SQL
luutruonghailan/hoc-lap-trinh-online-zendvn
/khoa-hoc-lap-trinh-php/ch07/sql/15-insert-update-delete.sql
UTF-8
585
3.234375
3
[]
no_license
-- 01. INSERT -- 01. 1 - Insert đầy đủ thông tin INSERT INTO contractor VALUES ('7', 'Nguyen Van An', 123456, 'Sai Gon'); -- 01. 2 - Insert không đầy đủ thông tin INSERT INTO contractor(name, address, phone) VALUES ('Nguyen Van An 2', 'Ho CHi MInh', 987654); -- 01. 3 - Insert nhiều dòng INSERT INTO contractor ...
true
185c952d6063f65176944f826b8da786db9faf7c
SQL
kinwang6632/vb6
/App/CSMIS/EMC-Nick/整合模組/Scripts/二階代碼/複製 -AddTable.sql
BIG5
1,213
3.09375
3
[]
no_license
PROMPT *** CateCodeList1 NX *** DROP TABLE CateCodeList1 CASCADE CONSTRAINT; CREATE TABLE CateCodeList1 ( TableName VARCHAR2(30), TableDescription Varchar2(50), OPERATOR VARCHAR2(20), UPDTIME VARCHAR2(20), CONSTRAINT PK_CateCodeList1 PRIMARY KEY (TableName) ); DROP INDEX I_CateCodeList1_1; CREATE I...
true
ac862698af6328af879f857e71e5568620c6629a
SQL
Zxgg/svn-to-git
/source/dataserver/sql/0222/20210219增量.sql
UTF-8
8,007
2.9375
3
[]
no_license
CREATE TABLE `base_data_request_notification` ( `id` varchar(38) COLLATE utf8mb4_bin NOT NULL COMMENT '唯一标识', `create_by` varchar(32) COLLATE utf8mb4_bin DEFAULT NULL COMMENT '创建人', `create_time` datetime DEFAULT NULL COMMENT '创建时间', `update_by` varchar(32) COLLATE utf8mb4_bin DEFAULT NULL COMMENT '更新人', `upd...
true
8955e73bfa6526b0c406df80ce4de2ac70b2e4f7
SQL
PhilMurwin/SQLScripts
/DB_Lines_Of_Code.sql
UTF-8
1,626
4.625
5
[]
no_license
-- Find the total number of lines of user written code in the database as a whole select sum(t.lines_of_code) as lines_ofcode from ( select o.name as sp_name ,(len(c.text) - len(replace(c.text, char(10), ''))) as lines_of_code ,case when o.xtype = 'P' then 'Stored Procedure' when o.xtype in ('FN', 'IF', 'TF...
true
23b3e88e05ed7e701b4b98a60c4d3b8d2b46bd83
SQL
rhayeksads01/kampus-stmik-mj-bekasi
/semester-5-part-1/praktikum_5(php_mysql)-jum'at/uts/data_ekskul_per_tahun/import.sql
UTF-8
2,122
3.84375
4
[]
no_license
create database data_ekskul_per_tahun; use data_ekskul_per_tahun; -- tables create table ekskul( id_ekskul int not null auto_increment, tahun year not null, nama_ekskul varchar(45) not null, jumlah_peserta_ekskul int not null, primary key (id_ekskul, nama_ekskul) ); create table peserta_masuk( id_peserta_masuk i...
true
fcadf70a7c35a71cadc8108061416d938b698758
SQL
rowindatas25/Project2--Quotation-Station
/db/seed.sql
UTF-8
422
3.1875
3
[]
no_license
DROP DATABASE IF EXISTS quotes_db; CREATE DATABASE quotes_db; \c quotes_db DROP TABLE IF EXISTS quotes; DROP TABLE IF EXISTS users; CREATE TABLE users ( id SERIAL PRIMARY KEY, email VARCHAR NOT NULL UNIQUE, password_digest VARCHAR NOT NULL, thread_id VARCHAR NOT NULL ); CREATE TABLE quotes ( id SERIAL PRIMA...
true
03dd01484301781d9535db6d85c84ffb0f2d3c77
SQL
andresjjn/holbertonschool-higher_level_programming
/0x0E-SQL_more_queries/10-genre_id_by_show.sql
UTF-8
250
3.3125
3
[]
no_license
-- Script that lists all shows contained in hbtn_0d_tvshows that have at least one genre linked. SELECT title, genre_id FROM tv_shows, tv_show_genres WHERE tv_shows.id=tv_show_genres.show_id ORDER BY tv_shows.title ASC, tv_show_genres.genre_id ASC;
true
ff50c334d6df64fc8a5a04a5a4d2c953875c7fe4
SQL
killbill/killbill
/beatrix/src/main/resources/org/killbill/billing/beatrix/ddl.sql
UTF-8
1,844
3.78125
4
[ "Apache-2.0" ]
permissive
/*! SET default_storage_engine=INNODB */; DROP TABLE IF EXISTS bus_ext_events; CREATE TABLE bus_ext_events ( record_id serial unique, class_name varchar(128) NOT NULL, event_json text NOT NULL, user_token varchar(36), created_date datetime NOT NULL, creating_owner varchar(50) NOT NULL, proc...
true
b37d39c74620fbf201fb3a5e9630fba934388c1e
SQL
abcteams/abc_procurement
/procurement.sql
UTF-8
88,162
2.625
3
[ "MIT" ]
permissive
-- phpMyAdmin SQL Dump -- version 4.6.4 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Nov 04, 2018 at 06:26 AM -- Server version: 5.7.20 -- PHP Version: 5.6.25 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */...
true
4eaceb98fd570a0c82e7d1287c04b22f9c5204c6
SQL
JohnLizana/Google-Auth
/users.sql
UTF-8
1,705
2.859375
3
[ "MIT" ]
permissive
-- phpMyAdmin SQL Dump -- version 4.8.3 -- https://www.phpmyadmin.net/ -- -- Servidor: 127.0.0.1:3306 -- Tiempo de generación: 12-10-2018 a las 20:04:39 -- Versión del servidor: 5.7.23 -- Versión de PHP: 7.2.10 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /...
true
a5f980bebfa814ae4b7f13c91cf16f78eff6b2a8
SQL
jyotipixolo/Attendance-Management
/attendance_management.sql
UTF-8
8,361
2.953125
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.5.1 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: Sep 04, 2016 at 09:44 AM -- Server version: 10.1.10-MariaDB -- PHP Version: 7.0.4 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLI...
true
c55c4f93b96953057a04277d61e15fe82e16f6c9
SQL
jriverar2020/SABD
/e. original_schema.sql
UTF-8
13,192
2.890625
3
[]
no_license
-- -- PostgreSQL database dump -- -- Dumped from database version 11.7 -- Dumped by pg_dump version 12.2 -- Started on 2020-08-25 23:21:52 SET statement_timeout = 0; SET lock_timeout = 0; SET idle_in_transaction_session_timeout = 0; SET client_encoding = 'UTF8'; SET standard_conforming_strings = on; SELECT pg_catalo...
true
3782d5b3d20f55062237917c5133d190424e6231
SQL
mazayazyn/tugas1_sivaksin_1906399000
/sivaksin.sql
UTF-8
1,251
3.25
3
[]
no_license
CREATE TABLE faskes ( id int not null AUTO_INCREMENT, id_vaksin int not null, nama varchar(50), kuota int, jam_mulai varchar(5), jam_tutup varchar(5), provinsi varchar(50), kabupaten varchar(50), PRIMARY KEY (id), FOREIGN KEY (id_vaksin) REFERENCES vaksin(id) ); CREATE TABLE vak...
true
7c25035b38b564be576461c1120467738d223a9b
SQL
eras0r/example-app-rest-api-php
/sql/create-schema.sql
UTF-8
282
2.734375
3
[ "MIT" ]
permissive
-- -- Table structure for table `brand` -- CREATE TABLE IF NOT EXISTS `brand` ( `id` int(11) NOT NULL AUTO_INCREMENT, `name` varchar(255) CHARACTER SET NOT NULL, `country` varchar(255) CHARACTER SET NOT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
true
19953a66583e9e33963a8cbef56c93f4b5f658a2
SQL
askor2005/blagosfera
/Blagosfera/data-jpa/src/main/resources/mybatis_migrations/oldscripts/2015/09/20150910143607_add_for_custom_link.sql
UTF-8
1,366
3.078125
3
[]
no_license
-- // add for custom link -- Migration SQL that makes the change goes here. -- Создание группы полей настроек профиля do $$ begin insert into fields_groups (id, internal_name, name, position, object_type, list_editor_item_id) select nextval('seq_fields_groups'), 'SHARER_PROFILE_SETTINGS', 'Настройки профиля', 0, ...
true
55876079cc8176777fea9044a201870c751e40a6
SQL
docXU/PointBook
/pointbook-server/sql构建文件/pointbook.sql
UTF-8
4,887
2.90625
3
[ "Apache-2.0" ]
permissive
-- MySQL dump 10.13 Distrib 5.7.21, for Linux (x86_64) -- -- Host: localhost Database: pointbook -- ------------------------------------------------------ -- Server version 5.7.21-0ubuntu0.16.04.1 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_...
true
66c0a0c2399f5af95425a040ed9e109e072ab8a9
SQL
ollleg111/java-jdbc-grom
/src/main/sql/sql/CREATE_USERS_TABLE.sql
UTF-8
563
3.40625
3
[]
no_license
-- private long id; -- private String userName; -- private String password; -- private String country; -- private UserType userType; -- private List orders; CREATE TABLE USERS( USERS_ID NUMBER, CONSTRAINT USERS_PK PRIMARY KEY(USERS_ID), USER_NAME NVARCHAR2(50) NOT NULL, USER_PASS NVARCHAR2(50) NOT N...
true
cd7a4ce106452f846feaef5b3cd101ca1c05e269
SQL
rldutch1/sql_repo
/MySQL/alter_table.sql
UTF-8
2,802
4.03125
4
[]
no_license
-- Rename a table column named tasklist to entry. ALTER TABLE tablename CHANGE column1 column1newname MEDIUMTEXT NOT NULL -- ALTER THE COLUMN DEFINITION alter table tablename modify column1 timestamp not null default current_timestamp on update current_timestamp -- ALTER TABLE COMMENT ALTER TABLE `weapons` CHANGE `...
true
16e44614b6142bf4eb7702561920352f9ce61ca6
SQL
ehullander/PSQL
/SQL/social.sql
UTF-8
2,458
4.21875
4
[]
no_license
--1. SELECT CONCAT(DATE_PART('day', tmstmp), '-', DATE_PART('month', tmstmp), '-', DATE_PART('year', tmstmp)) AS date, COUNT(*) FROM registrations GROUP BY date -- DATE_PART('day', tmstmp), -- DATE_PART('month', tmstmp), -- DATE_PART('year', tmstmp); ORDER BY date; --ORDER BY tmstmp; ​ --2. SELECT DATE_PART('...
true
e75fd0fda990ab1c8b8fb96a56a51b1325e1964e
SQL
OlgaTal/popcorn
/src/test/resources/db-structure.sql
UTF-8
5,403
3.390625
3
[]
no_license
CREATE SCHEMA `Popcorn` DEFAULT CHARACTER SET utf8 ; -- ++++++++++++++++++++++ USE Popcorn; -- ++++++++++++++++++++++++ CREATE TABLE `studios` ( `id` INT NOT NULL AUTO_INCREMENT, `version` INT NOT NULL, `name` VARCHAR(45) NOT NULL, `est` DATE NULL, `created_at` DATETIME NOT NULL, `updated_at` DATETIME NO...
true
9804b9d647617e67fba019e7c9fdf3162c3cac1a
SQL
jampaniuday/oracle_ETL_Monitoring
/update_CTO_MAIN_monitoring_queries.sql
ISO-8859-7
6,956
2.96875
3
[]
no_license
/* 1. ETL_MONIOTR.sql CTO-check query --> OK 2. cto_wait.sql script --> OK 3. DWADMIN.CONC_STATS_COLLECTION.CTO_HAS_FINISHED --> OK 4. script . . milestones comments query Node milestone . script main flows (?) ( owb_pa.sql) d. q...
true
b8bf700511ed2d516aa61c3c0f0e2b51c18f14a1
SQL
happyguys8/Nutrition
/Nutrition Project/script/mysql/ORNMAPPING.sql
UTF-8
290
3.015625
3
[]
no_license
/* ********************** ORNMAPPING MASTER TABLE **************************/ DROP TABLE IF EXISTS ORNMAPPING; CREATE TABLE ORNMAPPING ( ITMNO VARCHAR(30), -- ITEM CODE OGNCD VARCHAR(01) NULL, -- ITEM ORGANS CODE CONSTRAINT PK_ORNMAPPING PRIMARY KEY NONCLUSTERED (ITMNO, OGNCD) )
true
11771e1adf6a7d948abeb74a0daace9224228fe9
SQL
nishanth1007/hackerrank-sql
/The Report.sql
UTF-8
176
3
3
[]
no_license
Select case when grade<8 then NULL else Name END as Name, grade, marks from students, grades where marks between min_mark and max_mark order by grade desc, name, marks
true
5d732152849db82885ec6af34a998d9e7a0ecef6
SQL
fkazirodek/springproject
/src/main/resources/data.sql
UTF-8
835
2.546875
3
[]
no_license
INSERT INTO category(category_name) VALUES ("Telefony i Akcesoria"); INSERT INTO category(category_name) VALUES ("Telewizory"); INSERT INTO category(category_name) VALUES ("Laptopy"); INSERT INTO category(category_name) VALUES ("Samochody osobowe"); INSERT INTO category(category_name) VALUES ("Motocykle"); INSERT...
true
194e00d9b5a4eead25d8dc69f3ceec617990105c
SQL
WPI-SGA-Financials/Financial-Database-SQL
/Functions/Fiscal Year Function.sql
UTF-8
396
3.1875
3
[]
no_license
Drop FUNCTION if EXISTS fnc_FiscalYear; Create Function fnc_FiscalYear( hearingDate DATE ) returns VARCHAR(5) DETERMINISTIC BEGIN DECLARE FiscalYear varchar(15); if Month(hearingDate) < 7 then Set FiscalYear = CONCAT('FY ', RIGHT(Year(hearingDate),2)); else Set FiscalYear = Concat('FY ...
true
ef00d33f9ccfa3637c9f18a47ff3fe7b551a7301
SQL
yuhexiu/mite8-com
/SQL_DATA/jx_gz_dn_edu_gk.sql
UTF-8
1,405
2.703125
3
[]
no_license
/* Navicat MySQL Data Transfer Source Server : 阿里云MySQL Source Server Version : 50714 Target Server Type : MYSQL Target Server Version : 50714 File Encoding : 65001 Date: 2017-03-01 16:56:59 */ SET FOREIGN_KEY_CHECKS=0; -- ---------------------------- -- Table structure for `jx_gz_dn_edu_gk` -- -...
true
f82f826cb354a323271cccffce56553a5da8970a
SQL
rachelf21/CISC_3140
/SQL Homework/tutorial_4_SELECT_within_SELECT.sql
UTF-8
2,454
4.40625
4
[]
no_license
/*TUTORIAL 4 SELECT within SELECT */ /*1. Countries with population larger than that of Russia */ SELECT name FROM world WHERE population > (SELECT population FROM world WHERE name='Russia'); /*2. Show the countries in Europe with a per capita GDP greater than 'United Kingdom*/ SELECT name FROM world ...
true
c24a18304755f32788506179f0d8263f7f200f39
SQL
warloc69/freelance
/app/db/test_data.sql
UTF-8
24,963
3.375
3
[]
no_license
INSERT INTO `mydb`.`project` (`name`, `description`, `cost`, `status`, `owner`,expected_rait,dedline) VALUES ('Software developer - User interface for real-life game enterprise', 'We are a Berlin-based non-tech start-up. We organise live escape games for groups of 2-6 people who need to solve puzzles in order to esc...
true
59cf586ecc0a37fbb08fcb5d83cc1e6628b23910
SQL
samasri/educo
/DatabaseSQL/DDL.sql
UTF-8
10,370
3.59375
4
[]
no_license
/*==============================================================*/ /* Database name: EducoDB */ /* DBMS name: MySQL 5.0 */ /* Created on: 4/21/2015 00:32:52 */ /*==================================================...
true
bbd6b13be825884c90411ef25b38ca4225d2891b
SQL
rbe/dmerce
/dmerce2/tmp/sql/oracle/stats/try_sql_trace_for_session.sql
UTF-8
1,163
3.09375
3
[]
no_license
-- ############################################################################################# -- -- %Purpose: Try to set SQL_TRACE ON for another Session / Program -- -- Use: SYS-User -- -- ############################################################################################# -- CREATE OR REPLACE...
true
1e6bdb19e66b25a9c2c623e1e66cead2d0324d47
SQL
ndleah/SQL-Hackerrank-Challenge-Solutions
/Aggregation/Weather Observation Station 13.sql
UTF-8
97
2.8125
3
[ "MIT", "LicenseRef-scancode-unknown-license-reference" ]
permissive
SELECT ROUND(SUM(LAT_N), 4) AS SUM_LAT FROM STATION WHERE LAT_N BETWEEN 38.7880 AND 137.2345;
true
c3e2e5f6f458bca03127c06d74958ec2d40a75aa
SQL
Kusayomi/PHP
/tpblogbis/table/blog_users.sql
UTF-8
1,710
3.125
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.1.14 -- http://www.phpmyadmin.net -- -- Client : 127.0.0.1 -- Généré le : Mar 22 Décembre 2015 à 15:59 -- Version du serveur : 5.6.17 -- Version de PHP : 5.5.12 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER...
true
b59f89c04e4568da0a27f9b39506c1df0468a36e
SQL
sxtoE/climacts
/db/estem.sql
UTF-8
2,271
2.8125
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.7.0 -- https://www.phpmyadmin.net/ -- -- Servidor: 127.0.0.1 -- Tiempo de generación: 21-08-2018 a las 15:03:14 -- Versión del servidor: 10.1.26-MariaDB -- Versión de PHP: 7.1.8 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; ...
true
fe16237f7c5dae1cad4e1a794a0a01eed4273824
SQL
KimGwon-su/WWD_00
/WebContent/ddl.sql
UTF-8
623
2.84375
3
[]
no_license
/* CREATE TABLE STUDENT_TBL_01 ( STUDENT_NO INT(11) NOT NULL AUTO_INCREMENT, STUDENT_NAME VARCHAR(20 ), STUDENT_ADDR VARCHAR(100 ), STUDENT_PHONE VARCHAR(14 ), STUDENT_BIRTH DATE, STUDENT_EMAIL VARCHAR(50 ), STUDENT_ID VARCHAR(12 ), STUDENT_PW VARCHAR(50 ), PRIMARY KEY (`STUDENT_NO`) ...
true
94ac5fe54d7fe8216614fe5320385cb8db68d5d7
SQL
langpp/kitangaji.com
/db_ngaji.sql
UTF-8
1,463
2.8125
3
[ "MIT", "LicenseRef-scancode-unknown-license-reference" ]
permissive
-- phpMyAdmin SQL Dump -- version 4.1.12 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: Jul 11, 2019 at 04:21 PM -- Server version: 5.6.16 -- PHP Version: 5.5.11 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;...
true
693493712ac95f03277ecab814e12108611dca1c
SQL
fandriyaninkov/plims
/scripts/002_init_data.sql
UTF-8
4,302
2.625
3
[]
no_license
insert into "Places" ("Name") values ('Место 1'), ('Место 2'), ('Место 3'), ('Место 4'), ('Место 5'), ('Место 6'), ('Место 7'); insert into "Points" ("Name", "PlaceId") values ('Точка 1', 1), ('Точка 2', 1), ('Точка 3', 2), ('Точка 4', 2), ('Точка 5', 3), ('Точка 6', 4), ('Точка 7', 4), ('Точка 8', 5), ('Точка 9', 5),...
true
89c5d5b9f39cfead60f1c249709d6b773dcc165d
SQL
Zahco/s7
/BDD/3/TP3_SPAUR.sql
UTF-8
1,327
3.5
4
[]
no_license
--2.1 ALTER TABLE gmedecin ADD salaire integer default 2000 not null; --Table altered. --2.2 set serveroutput on; create or replace procedure tp3_2_2 is begin delete from gmedecin where statut='PATTASS' and prof_serv='Florence ROUSSEAU'; if sql%rowcount = 0 then DBMS_OUTPUT.PUT_LINE('Aucune ligne aff...
true
7acb7f822969b591803e70fb807d6eda62a32276
SQL
AphelionSoftware/DataLoadFrameworks
/DBSchema/Aphelion.DB.DataLoadFramework/Aphelion.DB.Logging/SSIS/Views/vwLatestQueueExecutions.sql
UTF-8
1,117
3.953125
4
[]
no_license
CREATE VIEW [SSIS].[vwLatestQueueExecutions] AS /* This has a lower cost than the correspondingly simpler looking query in comments, due to use of filtered indexes on records with PackageStart and PackageEnd*/ SELECT StartLog.computer , StartLog.operator ,StartLog.executionid , StartLog.starttime , EndLog.endtim...
true
f587507aea0144ebe48a09a0a057fdd42f3eddaa
SQL
Bole8823/cst336
/database_project/teamproject.sql
UTF-8
4,172
2.8125
3
[]
no_license
-- MySQL dump 10.13 Distrib 5.5.57, for debian-linux-gnu (x86_64) -- -- Host: 0.0.0.0 Database: teamproject -- ------------------------------------------------------ -- Server version 5.5.57-0ubuntu0.14.04.1 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@...
true
a3d8998758df3a9c29a1080f7ce8eb9061bce6be
SQL
Dmit1995Kit/GitProjects
/itstep-crm/src/main/resources/db/migration/V4__user_roles.sql
UTF-8
590
3.484375
3
[]
no_license
CREATE TABLE `user_roles` ( `user_id` INT UNSIGNED NOT NULL, `role_id` INT UNSIGNED NOT NULL, PRIMARY KEY (`user_id`, `role_id`), CONSTRAINT `FK_user_id` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`), CONSTRAINT `FK_role_id` FOREIGN KEY (`role_id`) REFERENCES `roles` (`id`) ) ENGINE = InnoDB DEF...
true
abea79a3d153bb2c06f3744de7f9592b5ad4bb31
SQL
aarontjackson/Bamazon
/bamazon.sql
UTF-8
1,884
3.421875
3
[]
no_license
/* Removes any instance of DB in MySQL */ DROP DATABASE IF EXISTS bamazon; /* Creates DB in MySQL */ CREATE DATABASE bamazon; /* Sets DB to active */ USE bamazon; /* Makes a table in the active DB and adds column headings */ CREATE TABLE products( item_id INT NOT NULL AUTO_INCREMENT, product_name VARCHAR(255) NO...
true
8aced5ac385944ab3a7df616a71a6bde807af736
SQL
wook8170/WorkOutput
/[ATC] CASB/ATC_4th_DB.sql
UTF-8
12,208
3.15625
3
[]
no_license
-- config service_configCREATE DATABASE config DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci; USE config; CREATE TABLE service_config ( seq BIGINT NOT NULL AUTO_INCREMENT COMMENT '순서', limit_log SMALLINT DEFAULT 100 COMMENT '로그 임계치, 단위 (GB)', limit_doc SMALLINT DEFAULT 80 ...
true
cff592555ec0c9c11d892612c7b19f94c616df68
SQL
CircleOfHope/coh_musictable
/db/20131218_DROP_CREATE_PROCEDURE_SearchSongs_fix_duplicates.sql
UTF-8
971
4.09375
4
[]
no_license
DELIMITER ;; CREATE DEFINER=`music`@`localhost` PROCEDURE `SearchSongs`(IN `searchString` VARCHAR(200), IN `languages` TINYINT) SQL SECURITY INVOKER BEGIN SELECT distinct s.* FROM songs s LEFT JOIN languages_songs ls ON ls.song_id = s.id LEFT JOIN languages l ON l.id = ls.language_id LEFT JOIN songs_ta...
true
5176d5b8c9a58441721e6f4efe18e58fe4b83b9f
SQL
MatheusAraujoDev/Trybe-Exercises-BackEnd
/Exercicios-Bloco 21/exercises_21.3/exercise1.sql
UTF-8
381
2.984375
3
[]
no_license
USE BeeMovies; DELIMITER $$ CREATE TRIGGER trigger_movie_insert BEFORE INSERT ON movies FOR EACH ROW BEGIN SET NEW.release_year = YEAR(NOW()); END $$ CREATE TRIGGER trigger_movie_log_insert AFTER INSERT ON movies FOR EACH ROW BEGIN INSERT INTO movies_logs(movie_id, executed_action, log_date) ...
true
fcd51963f1818a26a37ad50b9370dea81ea69f76
SQL
quiphung/quanlykho
/kho/lib/db/kho.sql
UTF-8
10,510
3.046875
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.5.1 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: Oct 07, 2016 at 06:48 AM -- Server version: 10.1.9-MariaDB -- PHP Version: 5.6.15 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLI...
true
907e2e43c37ee152fd4a869d69d9c886fad9a1e3
SQL
friday-night-jp/friday-night
/sql/category_affiliate_map.sql
UTF-8
210
2.546875
3
[]
no_license
create table category_affiliate_map ( id INTEGER NOT NULL AUTO_INCREMENT, category_id INTEGER NOT NULL, affiliate_id INTEGER NOT NULL, PRIMARY KEY ( id ) ) ENGINE = InnoDB DEFAULT CHARSET=utf8;
true
a3796bde2ea19aacc51c55406bcc549b6eaecce5
SQL
silence-do-good/stress-test-Postgres-and-MySQL
/dump/high/day20/select1418.sql
UTF-8
267
3.109375
3
[]
no_license
SELECT sen.name FROM SENSOR sen, SENSOR_TYPE st, COVERAGE_INFRASTRUCTURE ci WHERE sen.SENSOR_TYPE_ID=st.id AND st.name='Thermometer' AND sen.id=ci.SENSOR_ID AND ci.INFRASTRUCTURE_ID=ANY(array['3226','6088','4062','1403','6052','6072','1427','2228','2082','3054'])
true
3709e4681c027fb2ee0c4131f2eeb73adca3c5fe
SQL
silence-do-good/stress-test-Postgres-and-MySQL
/dump/low/day14/select0535.sql
UTF-8
178
2.65625
3
[]
no_license
SELECT timeStamp, temperature FROM ThermometerOBSERVATION o WHERE timestamp>'2017-11-13T05:35:00Z' AND timestamp<'2017-11-14T05:35:00Z' AND temperature>=26 AND temperature<=73
true
7ba7f2a3efa9d30616494e6b02c8233410c0a5a2
SQL
hlkirkness/hlkemployeetracker
/db/seeds.sql
UTF-8
480
3.171875
3
[]
no_license
USE employee_tracker; INSERT INTO department (name) VALUES ("IT"), ("Marketing"), ("HR"), ("Sales"); INSERT INTO role (title, salary, department_id) VALUES ("Engineer",100000,1), ("Collaborator", 45000,2), ("Recruiter",60000,3), ("Sales Person",50000,4); INSERT INTO employee (first_name, last_name, role_id) VALUES...
true
f1f556a04177f0a64999e22942d8fc7e5e184bcf
SQL
surferstef/Challenge-12-SQL-Employee-Tracker
/db/schema.sql
UTF-8
452
3.03125
3
[]
no_license
DROP DATABASE IF EXISTS company; CREATE DATABASE company; USE company; CREATE TABLE employees ( id INTEGER AUTO_INCREMENT PRIMARY KEY, first_name VARCHAR(30) NOT NULL, last_name VARCHAR(30) NOT NULL, title VARCHAR(40) NOT NULL, department VARCHAR(30) NOT NULL, salary INTEGER, manager VARC...
true
63e4eafffa530e45b00a0627dc113a37e30d02a5
SQL
ELeonJohnson/MYSQL-command-challenges
/varchar_char.sql
UTF-8
792
3.5
4
[]
no_license
--Both VARCHAR and CHAR store texts --Differences:CHAR has a fixed length ex. CHAR(10) - string value only goes up to 10 --CHAR is faster for fixed length text --Examples: state abbreviations: CA, NY yes/no: Y/N sex:M/F --The string gets cut off by the fixed length if it's to long --The string gets spaces to the right...
true
dc4a1febce4a39ef4530a5b2e498b2aafd1eb8b4
SQL
jha359/Past-Work
/CSE 111/Lab4/jaeha-hwang/test/12.sql
UTF-8
100
3.140625
3
[]
no_license
SELECT n_name, AVG(s_acctbal) FROM nation, supplier WHERE s_nationkey = n_nationkey GROUP BY n_name
true
e71d9b155815a97f00eb04c24d7eafb49164005b
SQL
Infixo/Civ6-Mods
/REU/RealEurekas_0_Setup.sql
UTF-8
2,144
3.328125
3
[]
no_license
-------------------------------------------------------------- -- Real Eurekas -- Author: Infixo -- 2019-03-14: Created -------------------------------------------------------------- -- INSTRUCTIONS -- There are 3 lines with INSERT statement. It contains so called 'random seed' that determines what boosts will be se...
true
85f9e01e3c71d76a720370a4a8ea3e2485f3631f
SQL
bsujin/dbsql
/2020.10.06.pl.sql
UTF-8
7,732
4.03125
4
[]
no_license
헷갈리지 않게 유의하기 변수선언 java : 변수타입 변수이름; pl/sql : 변수이름 변수타입; 변수 : 스칼라변수(하나의 값만 담을 수 있는 변수) 복합변수 1. %row type 행 정보(컬럼이 복수)를 담을 수 있는 변수(rowtype) ==> java로 비유를 하면 vo (filed가 여러개) --vo : value 객체 컬럼타입 : 테이블명.컬럼명 *type row 타입 : 테이블명%ROWTYPE 2. record type : 행 정보, 개발자가 컬럼을 선택하여 타입 생성 3. table type : 행이 여러...
true
4ec37f0a9777f1611a2c7e49099834835b94ccb9
SQL
wujek-srujek/where-server
/src/main/resources/db/migration/V2__principal.sql
UTF-8
333
3.15625
3
[]
no_license
create table principal ( id bigserial primary key, username text unique not null, password text not null, permission text not null, enabled boolean not null, -- not using PostgreSQL enum types due to lack of native Hibernate support constraint valid_permission check (permission in ('READ', ...
true
3c3db0cc983c49bb57078b52a1aebbfc85ea779c
SQL
angelitomg/iGenda
/database.sql
UTF-8
10,894
3.3125
3
[ "MIT" ]
permissive
-- phpMyAdmin SQL Dump -- version 4.4.10 -- http://www.phpmyadmin.net -- -- Host: localhost:8889 -- Generation Time: 08-Jun-2016 às 20:23 -- Versão do servidor: 5.5.42 -- PHP Version: 5.6.10 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIEN...
true
ef32cc7f7338e75ab78b803f3e952e8d9f97811b
SQL
emirlej/Udemy-PostgreSQL-bootcamp
/challenge_1.sql
UTF-8
802
4
4
[]
no_license
/* Name: EMLE Date: 09.11.16 */ -- Number of payment transactions were greater than 5000 dollars? SELECT COUNT(amount) FROM payment WHERE amount > 5; -- How many actors have a first name starting with P? SELECT COUNT(first_name) -- Can also use COUNT(*) FROM actor WHERE first_name LIKE 'P%'; -- How many unique di...
true
9f8404fd86ca4025fbf4a0e3e28f2d014ba55cae
SQL
ccortes96/Proyecto-Bases-de-Datos-I
/BD/Procedimientos/SP_ELIMINAR_DESEO.sql
UTF-8
819
3.109375
3
[]
no_license
DROP PROCEDURE IF EXISTS SP_ELIMINAR_DESEO; DELIMITER $$ CREATE PROCEDURE SP_ELIMINAR_DESEO( IN pnidCuenta INT, IN pnidProducto INT, OUT pcMensaje VARCHAR(1000), OUT pbOcurrioError BOOLEAN ) SP:BEGIN DECLARE vnConteo INT DEFAULT 0; DECLARE vnIdProducto INT; DECLARE vnCantida...
true
be4f53c12040945800ec38dd7ec359c0d43a0512
SQL
jebc88/AlphaDesign
/PROYECTO_FINAL/MySQL/StoredProcedures/Pa_insertarNuevoUsuario.sql
UTF-8
1,819
3.890625
4
[]
no_license
DELIMITER // CREATE PROCEDURE insertarUsuarioNuevo ( p_id varchar(20), p_nombre varchar(50), p_apellido1 varchar(50), p_apellido2 varchar(50), p_fechaNacimiento date, p_genero char(1), p_telefono varchar(20), p_correo varchar(20), p_usuario varchar(20), p_pass varchar(50), p_tipo int ) BEG...
true
6f31bc96760b32b50a7ad71df14eee15654458ec
SQL
WelingtonMoraes/Gerenciador-de-tarefas
/BD.sql
UTF-8
1,751
3.34375
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.7.5 -- https://www.phpmyadmin.net/ -- -- Host: localhost -- Generation Time: 24-Mar-2020 às 03:28 -- Versão do servidor: 5.6.34 -- PHP Version: 7.1.11 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACT...
true
a2c660b8ddf515e22f761895230409fb12727947
SQL
Bioconductor/BioconductorAnnotationPipeline
/annosrc/go/script/term_synonym.sql
UTF-8
718
2.890625
3
[]
no_license
-- MySQL dump 10.9 -- -- Host: localhost Database: go -- ------------------------------------------------------ -- Server version 4.1.12 /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE=',MYSQL40' */; /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; -- -- Table structure for table term_synonym -- DROP TABLE...
true
65a56a892785ebd582c3851ea2a0061b90da7962
SQL
Lizaveta0302/insurance
/src/main/resources/db/migration/V1.4__create_vehicles_table.sql
UTF-8
457
3.125
3
[]
no_license
CREATE TABLE vehicles ( id serial NOT NULL, number integer, model varchar NOT NULL, policy_id integer, driver_id integer, PRIMARY KEY (id), CONSTRAINT "FK_policies" FOREIGN KEY (policy_id) REFERENCES policies (id) ON UPDATE CASCADE ON DELETE SET NULL, ...
true
c6c30fb04e2d4a059bc85f3be3159567fec35d21
SQL
medy13/dbshell
/today_shell/CTS_CHKRATE_LIMIT_GPTMP_TODAY.sql
UTF-8
810
2.703125
3
[]
no_license
\echo ------------------CTS_CHKRATE_LIMIT---------------- select now(); \timing delete from CTS_CHKRATE_LIMIT_GPTMP; insert into CTS_CHKRATE_LIMIT_GPTMP (CMD_TYPE,ID) select CMD_TYPE,ID from CTS_CHKRATE_LIMIT_INC_EXT; delete from CTS_CHKRATE_LIMIT_GPTMP_TODAY using CTS_CHKRATE_LIMIT_GPTMP where CTS_CHKRATE_LIMIT_GPTMP....
true
d98d5c13bbd74e37c932d91172a3046ba85119c3
SQL
sprokushev/Delphi
/MASTER/_DATABASE/Tables/MASTER_QUERY_TYPES_DESC.sql
WINDOWS-1251
826
3.34375
3
[]
no_license
-- -- MASTER_QUERY_TYPES_DESC (Table) -- CREATE TABLE MASTER.MASTER_QUERY_TYPES_DESC ( ID NUMBER(10) NOT NULL, STRUCTURE_ID VARCHAR2(50 BYTE), TYPE_ID NUMBER(10), IS_AUTO_LINK NUMBER(1) DEFAULT 0 ) TABLESPACE USERS2 NOCOMPRESS ; COMMENT ON TABLE M...
true
f0b5b03225eec7ca4417aae0b35173722099e34b
SQL
nmanich/eBird_to_postgreSQL
/HowToUpdateNewBreedingCodes/updatenewbreedingcodes.sql
UTF-8
1,039
3.34375
3
[]
no_license
/* This is how you overwrite old breeding codes with changed breeding codes. */ --make an update csv with 3 columns: the obsid you want to change, and the new breeding code and category --column names listed below --make a table structure for the new code data CREATE TABLE newcodes ( newcode_global_unique...
true
08a91f88330a0633218a06e40effdcf34b07efe7
SQL
bryancheng501/BookStore-Application
/SQL/queries.sql
UTF-8
1,531
4.09375
4
[]
no_license
--Creating new customer account insert into account(username, password) values('username', 'password', 'customer'); --Checking if a username already exists select * from account where uesrname = 'username'; --Verifying username and password select * from account where username = 'username' and password = 'passwo...
true
0932c5ffb771d3cc86a19264966bdf00fa509513
SQL
Mumier/requisicion
/requisicion.sql
UTF-8
25,643
3.34375
3
[]
no_license
/* Navicat MySQL Data Transfer Source Server : Local Source Server Version : 50524 Source Host : localhost:3306 Source Database : requisicion Target Server Type : MYSQL Target Server Version : 50524 File Encoding : 65001 Date: 2014-08-11 19:32:38 */ SET FOREIGN_KEY_CHECKS=0; -- -...
true
523c8d147a319d5a0545da7bde10e14051db0e4a
SQL
rekharokkam/t-sql
/Learning SQLForOracle/Joining Multiple Tables/DISTINCT_keyword.sql
UTF-8
1,075
4.65625
5
[]
no_license
--Distinct returns Unique rows of data. Applies to whole row not columns. Applies to everything in the select statement select count (distinct state) from author --When distinct is used with 2 or more columns then it is the combination of columns that do not repeat. select distinct Price, advance from book --Code a...
true
69f61b38c14d1dcbc5802da8e7177185ea3acc1f
SQL
DKLynch/LeetCode-Challenges
/Database/Big Countries/BigCountries.sql
UTF-8
171
2.875
3
[ "Unlicense" ]
permissive
/*Problem URL: https://leetcode.com/problems/big-countries/ */ SELECT NAME, POPULATION, AREA FROM World WHERE POPULATION > 25000000 OR AREA > 3000000
true
f46bf011384aeae607c2ed14bce46c254390af70
SQL
marcel099/sti-menus-vero-dellaudo
/Inserts_de_Menus.sql
UTF-8
8,740
2.859375
3
[]
no_license
-- -- Observações iniciais: -- ATENÇÃO Antes de alterar qualquer coisa neste script INTERPRETAR bem e REVISAR adequadamente para evitar ERROS e INCONSISTÊNCIAS -- Ao colar novos inserts neste arquivo manter em ORDEM CRESCENTE por CODCONTROLE -- -- Participantes: -- Lucas Gehlen ...
true
82e828878f45106afea1d513a13e5cee254c74d4
SQL
Ardis84/SaFast
/SaFast/SAProject/WebContent/sql/query1.sql
UTF-8
813
3.34375
3
[]
no_license
select sa.DATARICHIESTA, sa.DATASCADENZA, sa.DATACHIUSURA, (select c.DESCCLIENTE from ELENCOCLIENTI c where c.IDCLIENTE = sa.IDCLIENTE) as cliente, (select pr.PROCEDURA from PROCEDUR pr where pr.IDPROCEDURA = sa.IDPROCEDURA) as procedura, sa.NUMEROSCHEDA ||'/'||rc.NUMERORICHIESTA as scheda, sa.ANNULL...
true
56390e247e51edb5f5fd3e273b3d827cdc5e2f4d
SQL
gwgundersen/databases
/2.2-sql/rating_movies_modifications/ex3.sql
UTF-8
296
3.640625
4
[]
no_license
/* * Exercise 4: * For all movies that have an average rating of 4 stars or higher, add 25 to the release year. * (Update the existing tuples; don't insert new tuples.) */ UPDATE Movie SET year = year + 25 WHERE mID IN ( SELECT mID FROM Rating GROUP BY mID HAVING AVG(stars) >= 4 );
true
109ad6edc9c78cb86ec29fcf768f9682ad26429c
SQL
Ariah-Group/Research
/db_scripts/main/KC-RELEASE-3_1-SCRIPT/oracle/dml/KR_DML_99_SEQUENCE_RESET_00S0.sql
UTF-8
504
3.0625
3
[ "Apache-2.0", "ECL-2.0" ]
permissive
declare MaxTblVal INTEGER; begin select max(ID) + 1 into MaxTblVal from ((select max(DOC_HDR_ID) as ID from KREW_DOC_HDR_T) union (select max(DOC_TYP_ID) as ID from KREW_DOC_TYP_T) union (select max(APP_DOC_STAT_TRAN_ID) as ID from KREW_APP_DOC_STAT_TRAN_T)); execute immediate 'DRO...
true
0f63261a6f3a81e6dc3b5ba3053589014ae8ee58
SQL
QuaidQ/DatabaseProject
/AmzonGoSqlScripts/createtriggers.sql
UTF-8
1,961
4.1875
4
[]
no_license
# creates triggers for our database and create sub employees SET FOREIGN_KEY_CHECKS = 0; drop table if exists stocker; drop table if exists customerservice; drop table if exists shippingemp; SET FOREIGN_KEY_CHECKS = 1; create table Stocker( EmpID int(9) primary key, StockId int(9) unique key auto_increment, Fnam...
true
342e6679a740b776afc300ea38ad0ea971144456
SQL
unepwcmc/cites_dashboards
/db/scripts/export_taxon_concepts.sql
UTF-8
9,083
3.875
4
[]
no_license
COPY( WITH cites_eu_taxon_concepts AS ( SELECT taxon_concepts.id, taxon_concepts.full_name AS full_name, author_year, name_status, taxon_concepts.data->'rank_name' AS rank_name, SQUISH_NULL(taxon_concepts.data->'kingdom_name') AS kingdom_name FROM taxon_concepts JOIN ta...
true
a7592fade037ee7eeed0ed5433cd2fd4bf1bc4eb
SQL
pylrichard/db_study
/mysql/sql/check_table_primary_key.sql
UTF-8
389
3.953125
4
[]
no_license
-- 找出没有创建主键的表 SELECT * FROM information_schema.TABLES t LEFT JOIN information_schema.STATISTICS s ON t.table_schema = s.table_schema AND t.table_name = s.table_name AND s.index_name = 'PRIMARY' WHERE t.table_schema NOT IN ('mysql', 'performance_schema', 'information_schema', 'sys') AND table...
true
3013c1223b84341a7d36a13a9c905ca353e7edb5
SQL
brazvo/litepage
/app/db/lightpage_mysql.sql
UTF-8
20,867
3.140625
3
[]
no_license
DROP TABLE IF EXISTS `basic_fields`; CREATE TABLE `basic_fields` (`id` INTEGER PRIMARY KEY AUTO_INCREMENT NOT NULL UNIQUE , `type` VARCHAR(256), `label` VARCHAR(256), `attributes` VARCHAR(256), `db_type` VARCHAR(256), `machine_type` VARCHAR(256)); INSERT INTO `basic_fields` VALUES(1,'text','Text','size:60;maxlength:...
true
3b711ef5dc01186c876716b2ab1202c0e5e4db8b
SQL
indrabasak/postgres-examples
/postgres-spring-jsonb/postgres-spring-jsonb-service/src/main/resources/db/create-db.sql
UTF-8
867
3.546875
4
[]
no_license
DROP SCHEMA IF EXISTS example_jsonb CASCADE; DROP ROLE IF EXISTS owner_example_jsonb; CREATE ROLE owner_example_jsonb WITH NOLOGIN NOSUPERUSER INHERIT NOCREATEDB NOCREATEROLE NOREPLICATION; GRANT owner_example_jsonb TO postgres; CREATE SCHEMA example_jsonb AUTHORIZATION owner_example_jsonb; GRANT ALL ON SCHEMA exa...
true
45fe7ba178540594a3258871a25b2ae11daa09b7
SQL
iwasingh/auxilium-db
/Project/sqls/create/24 assistance.sql
UTF-8
324
3.453125
3
[ "Apache-2.0" ]
permissive
CREATE TABLE assistance ( maintainer_shift_id INTEGER, ticket SERIAL PRIMARY KEY, start_at TIMESTAMP(0) WITHOUT TIME ZONE NOT NULL, end_at TIMESTAMP(0) WITHOUT TIME ZONE, FOREIGN KEY(maintainer_shift_id) REFERENCES maintainer(shift_id) ON UPDATE CASCADE ON DELETE SET NULL, CHECK(end_at > start_at)...
true
6c5f738b5a81d81e1d917e140b502fe8ad984a8b
SQL
mgambini75/iuniv-db
/View/api_frw_utenti.sql
UTF-8
685
2.640625
3
[]
no_license
/* Formatted on 14/03/2016 11:45:35 (QP5 v5.287) */ CREATE OR REPLACE FORCE VIEW API_FRW_UTENTI ( MID, USER_ID, PROFILE, ANA_ID, CARRIERA_ID, CARRIERA, NOME, COGNOME, MATRICOLA, DESCRIZIONE, NOTE, DATA_INIZIO, DATA_FINE, URL_PHOTO, FLG_BLOCK ) AS SELECT a.MID, a...
true
37a959c001b1d58a359bc162965f649c0d524019
SQL
sellasaveup/GamificationAPI
/DB/gamification.sql
UTF-8
18,046
3.140625
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.4.3 -- http://www.phpmyadmin.net -- -- Host: localhost -- Generation Time: Aug 22, 2015 at 12:16 AM -- Server version: 5.6.24 -- PHP Version: 5.5.24 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; ...
true