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
0537d983e4fedaadd8924e468d302d56a8b42cbe
SQL
muhammedmubashir/mindvalley
/url_shortener/sql/url.sql
UTF-8
1,052
3.140625
3
[]
no_license
/* SQLyog Ultimate v8.55 MySQL - 5.5.32 : Database - url_shortener ********************************************************************* */ /*!40101 SET NAMES utf8 */; /*!40101 SET SQL_MODE=''*/; /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; /*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_...
true
ac90ab59931a1a15aa39a4f38da2c49b8d3cf9ab
SQL
symkyn/what-game
/db/findgroupgamebytitle.sql
UTF-8
145
2.71875
3
[]
no_license
select * from "Games" as gm inner JOIN "GroupsUser" as gu ON gm.owner = gu.userid where gu.groupid = $2 and title Ilike '%' || $1 || '%'
true
37906519710eda18b4b46f9ef18b9d095babf46a
SQL
KnElisabeth/BEL
/ItProject.sql
UTF-8
2,410
3.390625
3
[]
no_license
CREATE database ItProject; use ItProject; #------------------------------------------------------------ # Script MySQL. #------------------------------------------------------------ #------------------------------------------------------------ # Table: User #---------------------------------------------------...
true
9eeafb4ea35960b08d66750dec6be083ac0d48b5
SQL
TheOldMan66/TelerikAcademy
/Databases/02.Data_Modeling_And_ER_Diagrams/Task3&4/MYSQL University.sql
UTF-8
6,571
3.375
3
[]
no_license
-- MySQL Script generated by MySQL Workbench -- 08/21/14 21:30:15 -- Model: New Model Version: 1.0 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='TRADITIONAL,ALLOW_INVALID_DATES'; -- -----------...
true
51df4734eee31b09b37bb12ee03df302e60aabb0
SQL
hidanscript/ron-backend
/db/db.sql
UTF-8
612
3.203125
3
[]
no_license
CREATE DATABASE remises_online; USE remises_online; CREATE TABLE User( UserID INT PRIMARY KEY NOT NULL AUTO_INCREMENT, Name VARCHAR(50) NOT NULL, Password VARCHAR(50) NOT NULL, Email VARCHAR(320) NOT NULL, Trips INT DEFAULT 0, Cellphone INT NOT NULL, Country VARCHAR(50) NOT NULL, Curre...
true
a5bf5fed2a1d59663dec3218c1f21a5d874cf89c
SQL
rasteiro11/MySql
/MySQL/aula5.sql
UTF-8
1,099
2.859375
3
[]
no_license
select * from gafanhotos; select * from cursos; insert into cursos values ('1','html','curso de html','40','37','2014'), ('2','algoritimos','logica de programacao','20','15','2014'), ('3','photoshop','dicas de photoshop','10','8','2010'), ('4','pgp','cursod e php para iniciantes','40','20','2010'), ('5','jarva','intr...
true
004d3e916cc2b57a74bf48e2899921c1298daef3
SQL
rufdev/tagabukid-service.jar
/sql/dts.sql
UTF-8
8,581
3.3125
3
[]
no_license
[getListForVerification] SELECT objid,docstate,title,description,tags,author FROM document WHERE title LIKE $P{title} ORDER BY title [getDocumentbyDIN] SELECT d.objid, d.docstate, d.din, dl.objid AS parentid, d.documenttypeid, d.title, d.description, d.tags, d.author, d.recordlog_datecreated, d.recordlog_createdbyuse...
true
d9f1135f2eb72ae3c42a1b726ea802eef39c9dc8
SQL
aixiaotangbao/ShopSystem_2_Server
/UserEurekaClient/src/main/resources/db.sql
UTF-8
4,721
3.90625
4
[]
no_license
create database shopSystem; --1.用户表users create table users( user_id int primary key auto_increment, user_name varchar(100), user_pwd varchar(100), user_tel varchar(100), user_email varchar(100), user_idcard varchar(100), user_level varchar(100), user_head varchar(50) ) --2.地址Address create table Address( ...
true
52fa82a6797267558b7a494929021760def01139
SQL
RizkyKhapidsyah/Pemilihan-Gubernur-Riau_v1.0__JVm
/Pemilihangubri/Projek1.sql
UTF-8
2,852
3
3
[ "Unlicense" ]
permissive
/* SQLyog Enterprise - MySQL GUI v8.2 RC2 MySQL - 5.5.27 : Database - projek1 ********************************************************************* */ /*!40101 SET NAMES utf8 */; /*!40101 SET SQL_MODE=''*/; /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; /*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@F...
true
2227d8c93de4e6fc4f9702940016b3838a2f7b21
SQL
MARCOSBLACKER7/ESCOM-TRAYECTORIA
/BASES DE DATOS/Apuntes clases/Oracle by example/Capitulo2/Scripts/Ejercicio 6.sql
UTF-8
325
2.578125
3
[]
no_license
set echo off; Column Nombre format A30; Column Apellido format A10; Column Telefono format 9999999999; set colsep ' * '; Spool "C:\Users\Acer\Desktop\Ejercicios\Oracle by example\Capitulo2\Salidas\Ejercicio 6.txt" Select First_name "Nombre", Last_name "Apellido", Phone "Telefono" From Instructor; Spool...
true
4890f7fdb35e6f14c5d43033eecef1f25c78b726
SQL
Sravanthi-Kuruva/SimplilearnProjects
/Phase 2/learnersacademy.sql
UTF-8
3,863
3.390625
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 5.0.3 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Dec 01, 2020 at 01:01 PM -- Server version: 10.4.14-MariaDB -- 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_CLIE...
true
66c42c56f62942d6d208e079e2950ff8d44cdd4b
SQL
hridoyict01/batch4
/SeventhClass/Database/MyScript.sql
UTF-8
339
3.171875
3
[]
no_license
CREATE DATABASE StudentDB use StudentDB CREATE TABLE Students ( ID INT IDENTITY(1,1), Name VARCHAR(100), Age INT ) INSERT INTO Students VALUES ('Hridoy',25) INSERT INTO Students VALUES ('Jamal',24) INSERT INTO Students VALUES ('Kamal',24) --DROP TABLE Students SELECT *FROM Students UPDATE Students SET Name = 'Ban...
true
8e1b2fa98e0fa3501dfc0f5a0ab58ad33bd5af9b
SQL
mleyvag/scripts-oracle
/cursor_with_parameters.sql
UTF-8
308
3.15625
3
[]
no_license
SET SERVEROUTPUT ON DECLARE CURSOR c_employees(code NUMBER, str VARCHAR2) IS SELECT * FROM employees WHERE employee_id < code AND first_name LIKE '%' || str || '%'; BEGIN FOR employee IN c_employees(105, 'a') LOOP DBMS_OUTPUT.PUT_LINE('Employee= ' || employee.first_name); END LOOP; END;
true
33f9168ef6f19aa209cb44fe7b7936ebf34eb00b
SQL
ByeongU/academy_sql
/sql_day03.sql
UTF-8
24,345
4.15625
4
[]
no_license
---- 3) 단일행 함수 CASE -- JOB별로 경조사비를 일정 비율로 지급하고 있다. -- 각 직원들의 경조사비 지원금을 구하자 /* CLERK : 5% SALESMAN : 4% MANAGER : 3.7% ANALYST : 3% PRESIDENT: 1.5% */ -- 1. Simple CASE 구문으로 구해보자 : DECODE 와 거의 유사, 동일 비교만 가능 -- 괄호가 없고, 콤마 대신 키워드 WHEN, THEN, ELSE 등을 사용 ...
true
51d2b42219b7e98bf164b7e243f2c83643667655
SQL
Femke-r0797855/Resourceplanner
/resourceplanner/target/run/resourceplanner/models/Facttable/trydates.sql
UTF-8
942
3.53125
4
[]
no_license
create or replace table `oef-stage`.`TestRecoursePlanner`.`trydates` OPTIONS() as ( /* Welcome to your first dbt model! Did you know that you can also configure models directly within SQL files? This will override configurations stated in dbt_project.yml Try changing "table" to "view"...
true
10ad704aaec06e424eb4170b96053ef43c669c6b
SQL
bimosyah/kuliah-aplikasi-kontrol-pangan
/database/aplikasi_pangan.sql
UTF-8
5,873
2.78125
3
[ "MIT" ]
permissive
-- phpMyAdmin SQL Dump -- version 4.8.3 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Waktu pembuatan: 21 Okt 2019 pada 03.24 -- Versi server: 10.1.35-MariaDB -- Versi PHP: 7.2.9 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARA...
true
636918e806e040f7ee90b76b852cbedf411f73ac
SQL
RustemYuzlibaev/Postegres-App
/backend/bin/sql/accountItem.sql
UTF-8
159
2.578125
3
[]
no_license
CREATE TABLE accountItem ( "accountId" INTEGER REFERENCES account(id), "itemId" INTEGER REFERENCES item(id), PRIMARY KEY ("accountId", "itemId") );
true
8a65cb05fd3d9193745deac15715367c78dce5c4
SQL
florian-apavou/MediathequeGLA
/sql/bddKLM.sql
UTF-8
9,929
3.515625
4
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.8.5 -- https://www.phpmyadmin.net/ -- -- Hôte : 127.0.0.1 -- Généré le : ven. 31 mai 2019 à 00:20 -- Version du serveur : 10.1.40-MariaDB -- Version de PHP : 7.3.5 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 ...
true
21fb860dac209491b5312fdf2aef1959d4b443b2
SQL
gunishj/ORT_spark_streaming
/sql/db.sql
UTF-8
1,660
3.46875
3
[]
no_license
-- -- PostgreSQL database dump -- SET statement_timeout = 0; SET lock_timeout = 0; SET idle_in_transaction_session_timeout = 0; SET client_encoding = 'UTF8'; SET standard_conforming_strings = on; SELECT pg_catalog.set_config('search_path', '', false); SET check_function_bodies = false; SET client_min_messag...
true
c0616aa9b432ce30b04a7c60ed7403a407972e61
SQL
abrahamrlvas/proyectofrontend
/proyectodb.sql
UTF-8
3,940
3.265625
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 5.1.1 -- https://www.phpmyadmin.net/ -- -- Servidor: localhost -- Tiempo de generación: 23-07-2021 a las 02:34:15 -- Versión del servidor: 10.4.20-MariaDB -- Versión de PHP: 8.0.8 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_...
true
c390aa8c4979cc7df797bd07b660e36f7281a0c8
SQL
finnishtransportagency/digiroad2
/digiroad2-oracle/src/main/resources/db/migration/V0_1__create_tables.sql
UTF-8
23,685
3.203125
3
[]
no_license
CREATE TABLE additional_panel ( id bigint, asset_id bigint NOT NULL, property_id bigint NOT NULL, additional_sign_type bigint, additional_sign_value varchar(128), additional_sign_info varchar(128), form_po...
true
1c504c23e771cf109d3d87eb481f1d29646fe2ea
SQL
PavithraPanjala/HackerRank
/Basic Join/Top Competitors.sql
UTF-8
352
3.90625
4
[]
no_license
/* Top Competitors */ SELECT h.hacker_id, h.name FROM Hackers h JOIN Submissions s ON s.hacker_id = h.hacker_id JOIN Challenges c ON s.challenge_id = c.challenge_id JOIN Difficulty d ON c.difficulty_level = d.difficulty_level WHERE s.score = d.score GROUP BY h.hacker_id, h.name HAVING COUNT(s.score) > 1 ORDER BY ...
true
0beec8fc1250648b455453e1414eaa4266c72f6f
SQL
jamiepenney/lunchtime
/database/getChoicesForRound.sql
UTF-8
334
4.21875
4
[ "MIT" ]
permissive
select c.id, c.name, r.winning_choice_id = c.id as winner, count(v.id) as votes from choice c join round r on r.id = $1 left outer join vote v on v.choice_id = c.id and v.round_id = $1 where (c.added_in is null or c.added_in <= $1) and (c.removed_in is null or c.removed_in >= $1) group by c.id, r.winning_choice_id orde...
true
68c89684ebab5f8f3ea68186107446a7aca6c7dd
SQL
ChristianBonomo/MySQL
/(HW) Chp5.sql
UTF-8
3,731
4.59375
5
[]
no_license
-- Chapter 5 Homework SELECT category_name, category_id FROM categories; SELECT product_id, category_id, product_code, product_name, 'description', list_price, discount_percent, date_added FROM products; /****************************************Question 1******************************************** * Write an INSERT ...
true
bda8473f1a97e75b17cfbcb38b0d007c0ba8a11f
SQL
okatechnology/webpro-mysql-practice
/sqlcommands.sql
UTF-8
1,334
4.09375
4
[]
no_license
-- make bookdb create database bookdb default charset utf8; use bookdb; -- make tables create table categories( id int auto_increment not null primary key, name varchar(255) not null ); create table authors( id int auto_increment not null primary key, name varchar(255) not null ); create table tags( id i...
true
a447d85ddf427614da90de873899140e6feacaf0
SQL
KuznecovSerge/course
/bin/migrator/modules/sql/courses.sql
UTF-8
653
3.953125
4
[]
no_license
select t.training_id as id, t.parent_id as parent, t.description, t.name as name, ta.good_id as productId, t.user_id as authorId, ( case when t.avatar <> '' then concat( 'https://www.monecle.com/upload/images/training/100/', t.avatar ) else '' end ) as image, t.`date` from trainings t inner join ( select...
true
0c289ce59e37e49c7f539b1460c5d8226eec2d47
SQL
sarikabanu/kitchenapp
/database/kitchen-schema.sql
UTF-8
11,117
3.484375
3
[]
no_license
-- MySQL Workbench Forward Engineering SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0; SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0; SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='TRADITIONAL,ALLOW_INVALID_DATES'; -- ----------------------------------------------------- -- Schema kitchen_s...
true
373979c11ce31cb9f17d218176db6d5b2b62dae0
SQL
Samiralili/Projet_eval2_debut
/Conversion dates et chargement nouveau fichier temperature.sql
UTF-8
276
2.84375
3
[]
no_license
LOAD DATA INFILE 'C:/ProgramData/MySQL/MySQL Server 8.0/Uploads/new_temperature.csv' INTO TABLE temperature FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n' ignore 1 rows (@date, mini, terrain, maxi, moyenne) SET date = STR_TO_DATE(@date,'%m/%y'); SELECT * FROM temperature;
true
593ceb27c3ce66ba70a2fd389202d823f85dbe2f
SQL
Emon-ProCoder7/sql-Command-Repository
/06. RPA_FRAUD_DETECTION.sql
UTF-8
464
3.234375
3
[]
no_license
SELECT * FROM transaction_data LIMIT 10; SELECT full_name, email FROM transaction_data WHERE zip = 20252; SELECT full_name, email FROM transaction_data WHERE full_name LIKE '% der %' OR full_name = 'Art Vandelay'; SELECT ip_address, email FROM transaction_data WHERE ip_address LIKE '10.%'; SELECT email FROM...
true
9a25829574bb5bb9b4d76299bdb7f2239c2ccc35
SQL
smnorris/mit_onetool_data
/Communities/src/create_communities_ply.sql
UTF-8
1,474
3.734375
4
[]
no_license
-- create a community table DROP TABLE if EXISTS mit.communities_ply; CREATE TABLE mit.communities_ply (community_id SERIAL, census_subdivision_id integer, clab_id text, community_name TEXT, community_type TEXT, geom geometry); -- insert incorporated CSDs INSERT INTO mit.communities_ply (census_subdi...
true
989e8fa79c9aba03c0ea0ecf438834cb2a193b51
SQL
halbstar/-Assignment-Baza-muzike
/bazamuzike0.sql
UTF-8
236,540
2.96875
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 3.5.2.2 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: Mar 24, 2014 at 11:09 PM -- Server version: 5.5.27 -- PHP Version: 5.4.7 SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;...
true
4331095b6926df52443fca9dec942f08c87aa50b
SQL
TDvirus/Book_Manager
/src/sql/BookManager.sql
UTF-8
2,372
3.40625
3
[]
no_license
/* SQLyog Ultimate v12.5.0 (64 bit) MySQL - 8.0.16 : Database - book ********************************************************************* */ /*!40101 SET NAMES utf8 */; /*!40101 SET SQL_MODE=''*/; /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; /*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY...
true
b6134b9cecc9a4ea456b442aa28082691231bcf0
SQL
Liang-Shan-Bo/APM
/src/main/resources/sql/APM_ALARM_LOG.sql
UTF-8
1,211
3.703125
4
[]
no_license
-- Create table create table APM_ALARM_LOG ( ID NUMBER not null, ALARM_VALUE NUMBER, ALARM_TIME DATE, ALARM_TYPE NUMBER(1), ALARM_SYSTEM_NAME VARCHAR2(50), ALARM_DESC VARCHAR2(100) ) tablespace SYSTEM pctfree 10 pctused 40 initrans 1 maxtrans 2...
true
7f169ceab573c164a0e3dc388fecea9e508ce235
SQL
LinlinYin/COMP4910
/Project1.sql
UTF-8
6,875
4.84375
5
[]
no_license
use employees; show tables; # part 1 # Problem 01: Retrieving Records: you have a table and want to see all of the data. SELECT * FROM employees; # Problem 02: View only selective columns of the table. SELECT TIMESTAMPDIFF(YEAR, birth_date, CURDATE()) AS age, gender AS sex FROM employees; #Problem 03: View only s...
true
29c83a33772dad5e3ef8dffe5d7ee45de984ebb3
SQL
SUE0311/DoranMall_MVC_jsp_oracle
/WebContent/sql/wishlist.sql
UHC
744
3.078125
3
[]
no_license
drop table wishlist; select * from wishlist order by wishlist_num desc; create table wishlist( wishlist_num int primary key, /*ȣ*/ wishlist_id varchar2(50) not null, /*۾(id)*/ wishlist_pass varchar2(50) not null, /* йȣ*/ wishlist_title varchar2(100) not null, /* */ wishlist_content varchar2(1000) not nul...
true
aaedbb87f70f73d8905c4e77f85043c925a8744f
SQL
18307612949/core-bash
/03_deploy/cleardb/clear_db.sql
UTF-8
1,107
2.96875
3
[ "Apache-2.0" ]
permissive
DELETE FROM t_apply WHERE id IN ( SELECT apply_id FROM t_apply_record WHERE public_user_id IN(40, 41, 42, 43) ); DELETE FROM t_hasten WHERE apply_record_id IN ( SELECT id FROM t_apply_record WHERE public_user_id IN(40, 41, 42, 43) ); DELETE FROM t_policy WHERE taxcode IN ( '440100000000001', '440100000000002', '44...
true
d5e7a588f6f9c99bc44149f479471e703acdbba8
SQL
SoftuniDarby/blog
/Docs/sql/Old Versions/darby_blog (0.0.1).sql
UTF-8
1,995
3.15625
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.5.1 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: 3 март 2017 в 15:33 -- Версия на сървъра: 10.1.19-MariaDB -- PHP Version: 7.0.13 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLI...
true
e2aecb75bbe03a3da354d46486bb457b76977132
SQL
rainlay/leetCode
/Database/176_Second_Highest_Salary/Second_Highest_Salary.sql
UTF-8
174
3.40625
3
[]
no_license
SELECT IFNULL(salary AS SecondHighestSalary) FROM Employee WHERE salary < (SELECT MAX(Salary) AS Salary FROM Employee) LIMIT 1 , 1
true
d95fe054d8e467865313385ca56ededfc487bd19
SQL
kongyew/gpdb
/src/test/tinc/tincrepo/mpp/gpdb/tests/storage/access_methods/storage_parameters/sql/mixed_prec.sql
UTF-8
936
3.015625
3
[ "Apache-2.0", "LicenseRef-scancode-generic-cla", "PostgreSQL", "LicenseRef-scancode-other-copyleft", "metamail", "BSD-3-Clause", "LicenseRef-scancode-openssl", "LicenseRef-scancode-other-permissive", "ISC", "Python-2.0", "bzip2-1.0.6", "LicenseRef-scancode-ssleay-windows", "LicenseRef-scanco...
permissive
-- start_ignore SET gp_create_table_random_default_distribution=off; -- end_ignore -- Database - Appendonly True, , blocksize=8192, Role checksum=true, Session=compresslevel=4, table compresstype=zlib \c dsp_db1 dsp_role1 SET gp_default_storage_options='compresslevel=4'; Create table dsp_ao_1 ( i int, j int) with(com...
true
5197609d113d3879453a2de8858382a7ba497fe4
SQL
alkorr37/alevel
/module3/module3.sql
UTF-8
2,484
3.421875
3
[]
no_license
-- -- Скрипт сгенерирован Devart dbForge Studio for MySQL, Версия 7.3.137.0 -- Домашняя страница продукта: http://www.devart.com/ru/dbforge/mysql/studio -- Дата скрипта: 18.03.2018 23:44:27 -- Версия сервера: 5.7.19 -- Версия клиента: 4.1 -- -- -- Отключение внешних ключей -- /*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@...
true
599ec507c72d635f410855633d44ecce5a76e191
SQL
quayshaunedwards/sql.
/student_by_course.sql
UTF-8
384
3.671875
4
[]
no_license
USE bottega_schema; SELECT sc.sc_course_id AS "COURSE", s.student_name AS "STUDENT NAME" FROM students_courses sc INNER JOIN students s ON s.student_id = sc_student_id ORDER BY sc.sc_course_id; SELECT sc.sc_course_id AS "COURSE", COUNT(s.student_id) AS "CLASS SIZE" FROM students_courses sc INNER JOIN studen...
true
f9b5c665fd68c5d525e70906d4340b77a47a66e0
SQL
Linkit123/guitar-shop
/guitarShopDB/f_demo.sql
UTF-8
2,994
3.390625
3
[]
no_license
-- MySQL Script generated by MySQL Workbench -- Wed Feb 5 14:11:14 2020 -- 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='ON...
true
f362ec07dbba8ab22196ee637c9756b5f36baac0
SQL
klphillips/CS3810
/HW3/HW3Load.sql
UTF-8
1,568
3.15625
3
[]
no_license
/* Author: Kyra Phillips Due Date: 10/8/2017 - resubmitting 12/3/2017 Help from/Worked with: Myself, Cooper Stevens Assignment: Homework Assignment #3 */ -- Copy SQL Statements, part two to HW3 COPY Airline (AIRLINE_ID, CARRIER, CARRIER_ENTITY, CARRIER_NAME, UNIQUE_CARRIER, UNIQUE_CARRIER_ENTITY, UNIQUE_CARR...
true
a4d0200875ee960abe6f7078041f25cf9f0ecf83
SQL
motherfather/sql
/select-basic/ansi join sql문.sql
UTF-8
947
4.28125
4
[]
no_license
-- ansi join sql문 (1999 syntax) -- natural join 테이블의 칼럼이름이 같은 경우에만.... select count(*) from employees a natural join departments b; select count(*) from employees a, departments b where a.DEPARTMENT_ID = b.DEPARTMENT_ID and a.MANAGER_ID = b.MANAGER_ID; select count(*) from employees a join departments ...
true
92012528ba72af779917f4929006280350b5d0c7
SQL
cartertrafton/restaurant_db
/DDL.sql
UTF-8
8,035
3.671875
4
[]
no_license
-- RESTAURANT DB -- TABLE CREATION DROP TABLE IF EXISTS ORDER_t; DROP TABLE IF EXISTS FOOD_t; DROP TABLE IF EXISTS PAYMENT_t; DROP TABLE IF EXISTS BILL_t; DROP TABLE IF EXISTS CUSTOMER_t; DROP TABLE IF EXISTS TABLE_t; DROP TABLE IF EXISTS HOST_t; DROP TABLE IF EXISTS CHEF_t; DROP TABLE IF EXISTS WAITER_t; DROP TABLE...
true
811a208d21cc2762247a61f9537d97b13c8e4a63
SQL
mikz/zelena_kuchyne
/db/sql/lost_items_view_up.postgresql.sql
UTF-8
554
3.859375
4
[]
no_license
CREATE VIEW lost_items_view AS SELECT COALESCE(meals.item_id, lost_items.item_id) AS item_id, SUM(COALESCE(bundles.amount, 1)*lost_items.amount) AS amount, lost_items.cost, SUM(COALESCE(bundles.amount, 1)*lost_items.cost*lost_items.amount) as total_cost, user_id, lost_at::date AS dat...
true
292c3c6df4d3172fbaa4d1d852f87ebed081f065
SQL
socrata-platform/balboa
/docker/cassandra/balboa_schema.cql
UTF-8
6,742
3.1875
3
[ "Apache-2.0" ]
permissive
CREATE KEYSPACE IF NOT EXISTS "Metrics2012" WITH replication = { 'class': 'SimpleStrategy', 'replication_factor': '1' }; USE "Metrics2012"; CREATE TABLE IF NOT EXISTS daily_absolute ( key text, column1 text, value bigint, PRIMARY KEY ((key), column1) ) WITH COMPACT STORAGE AND bloom_filter_fp_chance=0.0...
true
f3e19608239b07c842f7c61280d1bb3e4c89521a
SQL
tockata/Databases
/Databases-Retake-Exam-22-June-2015/SQLQuery-01-12-Problem.sql
UTF-8
3,558
4.5625
5
[]
no_license
-- Problem 01 SELECT TeamName FROM Teams ORDER BY TeamName -- Problem 02 SELECT TOP 50 CountryName, Population FROM Countries ORDER BY Population DESC, CountryName -- Problem 03 SELECT CountryName, CountryCode, CASE WHEN CurrencyCode = 'EUR' THEN 'Inside' ELSE 'Outside' END AS Eurozone FROM Countries ORDER BY C...
true
c50f7ce3e5c99dbb1c7d17657b7b171c0340032d
SQL
spectocr/PTO_Database
/db/seeds.sql
UTF-8
730
2.828125
3
[ "MIT" ]
permissive
INSERT INTO tbl_department (department_name) VALUES ('CI'), ('DCC'), ('Support') ; INSERT INTO tbl_role (title, salary, department_id) VALUES ('CI Business Analyst', 50000.00, 1), ('CI Manager', 100000.00, 1), ('DCC Business Analyst', 50000.00, 2), ('DCC Manager', 100000.00, 2), ('Support Business ...
true
805cc55d8af6affe6291c023ba509314963cd889
SQL
wormhole/blog-ssm
/src/main/resources/sql/user.sql
UTF-8
367
2.609375
3
[ "MIT" ]
permissive
create table blog.user ( id char(36) not null primary key, email varchar(100) not null, password char(32) not null, nickname varchar(100) not null, salt char(32) not null, deleteable int not null, constraint user_email_uindex unique (email), constraint...
true
ea04a6a363101e5d9d2569f1f23bbceba474f532
SQL
Evaldoes/Inova-hackaton-Mobilidade
/database/reportransito.sql
UTF-8
447
2.953125
3
[]
no_license
-- SCRIP PARA CRIAÇÃO DA BASE DE DADOS SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "-04:00"; CREATE DATABASE reportransito; USE reportransito; -- CLASSE USUARIOS CREATE TABLE Usuarios ( nome varchar(300) NOT NULL, senha varchar(300), email varchar(500) N...
true
4e020ef6283749ca4fb192d5ba0037b379bb02b6
SQL
songsqs/nongzi
/src/main/resources/sql/sale.sql
UTF-8
1,135
3.5
4
[]
no_license
SET FOREIGN_KEY_CHECKS=0; -- ---------------------------- -- Table structure for sale -- ---------------------------- DROP TABLE IF EXISTS `sale`; CREATE TABLE `sale` ( `sale_id` int(11) NOT NULL AUTO_INCREMENT COMMENT '销售主键id', `customer_id` int(11) DEFAULT NULL COMMENT '购买客户id', `customer_name` varchar(16) DEF...
true
cfb4c1de73b7c8e51b75efb6954632dd2f9e4e42
SQL
JonathanRH07/Control-de-versiones
/DB ICAAVweb/Suite_mig_demo/Tables/ic_glob_tr_cxp_adjuntos.sql
UTF-8
412
2.640625
3
[]
no_license
CREATE TABLE `ic_glob_tr_cxp_adjuntos` ( `id_cxp_adjunto` int(11) NOT NULL AUTO_INCREMENT, `id_cxp` int(11) DEFAULT NULL, `nombre` varchar(150) DEFAULT NULL, PRIMARY KEY (`id_cxp_adjunto`), KEY `id_cxp_idx` (`id_cxp`), CONSTRAINT `id_cxp` FOREIGN KEY (`id_cxp`) REFERENCES `ic_glob_tr_cxp` (`id_cxp`) ON DELE...
true
7741135ecf271941000290f95237659a124aa385
SQL
alexmititelu/IngineriaProgramarii-B3-Proiect
/utils/Teme/Tema3-PSGBD/Ex1/Apuscasitei_Silviu-Alexandru_B1_3_1.sql
UTF-8
1,590
3.34375
3
[ "MIT" ]
permissive
CREATE OR REPLACE PACKAGE manager_facultate IS PROCEDURE sterge_student (nr_matr studenti.nr_matricol%type); END manager_facultate; CREATE OR REPLACE PACKAGE BODY manager_facultate IS v_an NUMBER; FUNCTION calculeaza_varsta (p_nume studenti.nume%type, p_prenume studenti.prenume%type) RETURN INT AS v_...
true
284a1eb026713978a9b0d98289745c1fb0da6a07
SQL
goodhamgupta/aesop
/samples/sample-mysql-relay/src/main/resources/sample-db/create_animal.sql
UTF-8
530
2.546875
3
[ "Apache-2.0" ]
permissive
CREATE TABLE `animal` ( `id` bigint(20) NOT NULL AUTO_INCREMENT, `name` varchar(120) NOT NULL, `deleted` varchar(5) NOT NULL DEFAULT 'false', PRIMARY KEY (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=utf8; INSERT INTO `animal` (`id`, `name`, `deleted`) VALUES (1, 'rat', 'false'), (2, 'rabbit', 'f...
true
fc72109e1fc3f678897e51c0fa76d874493821ed
SQL
linzheda/webfood
/webfood/doc/db.sql
UTF-8
2,073
3.578125
4
[]
no_license
------------------------------------------------------- -- 创建库,表,约束,过程,用户,权限等脚本 ------------------------------------------------------- drop database webfood; create database webfood character set utf8; use webfood; --创建管理员 create table resadmin( raid int primary key auto_increment, raname varchar(5...
true
47e803dbafdf556bfd967fea016fc0a4e723d253
SQL
ProfDema/uam
/pam/examples/anon_data/group_0071/a2.sql
UTF-8
3,222
4.40625
4
[]
no_license
-- Add below your SQL statements. -- You can create intermediate views (as needed). Remember to drop these views after you have populated the result tables. -- You can use the "\i a2.sql" command in psql to execute the SQL commands in this file. SET search_path TO A2; -- Query 1 statements WORKS!!! INSERT INTO Query1 ...
true
b4ef8a3c169bf1bf73124ffdcd37f1fa77d8da9b
SQL
mundodron/arduino-bot-aurelio
/Querys/relacionamentoTabela.sql
UTF-8
1,005
4.25
4
[]
no_license
-- Mostra o relacionamento entre tabela filho e tabela pai SELECT c.owner owner_filho, c.table_name tab_filho, cc.column_name col_filho, cc.position, c.constraint_name constraint_name_filho, c.constraint_type tp_filho, cpai.owner owner_pai, cpai.table_name tab_pai, ccpai.column_name col_pai, cpai.constraint_na...
true
653c10356623292a542d94afe99a5a6f42b0ff86
SQL
ramsayleung/fcdeduction
/conf/create_data.sql
UTF-8
2,223
2.515625
3
[ "MIT" ]
permissive
use fcdeduction; # 通过保证插入成功. delete from de_user where tnt_inst_id = "FINC0001" and user_id in ("00000001","00000002"); insert into de_user(tnt_inst_id, user_id, user_name, user_type, gmt_create, gmt_modified) values("FINC0001","00000001","Ramsay","1",now(6),now(6)); insert into de_user(tnt_inst_id, user_id, user_na...
true
ee20ef5f10b1c51ac66259f2aa5a01e992c4e08e
SQL
noidfrx/proyectfeedbakh2020
/database/feedbakh_db.sql
UTF-8
16,371
3.1875
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 5.0.2 -- https://www.phpmyadmin.net/ -- -- Servidor: 127.0.0.1 -- Tiempo de generación: 10-12-2020 a las 16:59:04 -- Versión del servidor: 10.4.11-MariaDB -- Versión de PHP: 7.4.6 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_...
true
4202984c9a00b0d974cc09168688d54a3446ecc2
SQL
patmifsud/sei33-homework
/graham_herdman/week_04/19_Day_databases/hated_things.sql
UTF-8
278
2.546875
3
[]
no_license
CREATE TABLE hated_things( id INTEGER PRIMARY KEY, thing TEXT, why TEXT, image TEXT ); -- populate the database INSERT INTO hated_things (id, thing, why, image) VALUES (1, "Mark Zuckerberg", "Envy", "https://www.extremetech.com/wp-content/uploads/2014/03/thezuck-640x353.jpg");
true
ba328df821b52e1c5ec4a680b63f8c0c1b202933
SQL
chinarjoshi/meteorological-query-tool
/queries.sql
UTF-8
194
3.203125
3
[ "MIT" ]
permissive
name,command columns,PRAGMA table_info ("climate") stations,SELECT DISTINCT name FROM climate output,SELECT * FROM climate WHERE name LIKE "%?%" AND date LIKE "%?%" ORDER BY name DESC LIMIT 1
true
81f2e18436e4ca1e571c530500ca2c7db7ed3f12
SQL
sergio13v/ProyectoEncuesta
/proyecto.sql
UTF-8
7,385
3.0625
3
[]
no_license
-- MySQL dump 10.16 Distrib 10.1.38-MariaDB, for debian-linux-gnueabihf (armv7l) -- -- Host: localhost Database: proyecto -- ------------------------------------------------------ -- Server version 10.1.38-MariaDB-0+deb9u1 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTE...
true
fdf43d2bd61c77f7f9b59ee31f8f0120356a2abf
SQL
PurpleConsulting/APPDB
/Data/APPDB_Skills.sql
UTF-8
2,072
2.765625
3
[]
no_license
-- MySQL dump 10.13 Distrib 5.6.19, for osx10.7 (i386) -- -- Host: 91.121.193.238 Database: APPDB -- ------------------------------------------------------ -- Server version 5.7.6-m16 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS *...
true
adf044c2df77ff7a990c648d4baa5303c7d6e217
SQL
rogphill/cmps180
/lab2/query3.sql
UTF-8
211
3.203125
3
[]
no_license
SELECT DISTINCT s.exchangeID, s.stockName FROM Stocks s, Quotes q WHERE s.exchangeID = q.exchangeID AND s.symbol = q.symbol AND q.price < 314.15;
true
b90b809c91c7fcdc7d0964c233e216c433745dd3
SQL
ohmel/palittayo
/protected/migrations/m150915_170349_initialDatabase.sql
UTF-8
5,481
3.421875
3
[]
no_license
-- -------------------------------------------------------- -- -- Table structure for table `category` -- CREATE TABLE IF NOT EXISTS `category` ( `category_id` int(100) NOT NULL AUTO_INCREMENT, `category_name` varchar(50) NOT NULL, `category_desc` text NOT NULL, `status` int(3) NOT NULL COMMENT '1:active 2:in...
true
f47d1123defe48a27cd98cbff2784fd154b47684
SQL
willthames/playframework
/framework/test/integrationtest/conf/evolutions/mock/2.sql
UTF-8
315
2.53125
3
[ "Apache-2.0" ]
permissive
# # Copyright (C) 2009-2013 Typesafe Inc. <http://www.typesafe.com> # # Semicolon-escaping test. If we weren't escaping ";;" correctly then # executing this up would fail. # --- !Ups CREATE OR REPLACE VIEW SemicolonEscapeTest AS SELECT * FROM Mock WHERE value = ';;'; # --- !Downs DROP VIEW SemicolonEscapeTest;
true
2b85d7eb7b9d8716941bbc7074f49d8af497ef9b
SQL
divinerapier/chinchilla
/migrations/schema.sql
UTF-8
977
3.53125
4
[]
no_license
CREATE TABLE IF NOT EXISTS `post` ( `id` INT AUTO_INCREMENT, `uuid` CHAR(36) NOT NULL, `title` VARCHAR(127) NOT NULL, -- display at frontend `link_name` VARCHAR(127) NOT NULL, -- url link `created_at` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, `updated_at` TIMESTAMP...
true
538bce0512b419a7432f0c052a2371936e7e74a2
SQL
ChakSoft/tutoriel-nodejs-backend
/extra/initial.sql
UTF-8
586
3.625
4
[ "MIT" ]
permissive
-- DROP TABLE comments; -- DROP TABLE posts; CREATE TABLE posts ( id INTEGER PRIMARY KEY AUTO_INCREMENT, title VARCHAR(60) NOT NULL, content TEXT NOT NULL, created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, deleted TINYINT(1) DEFAULT 0 ); CREATE TABLE comments ( id INTEGER PRIMARY KEY AUTO_INCREMENT, post_...
true
f774e28716f3f1fe31d8695ee25513a55f9b3ad4
SQL
exitthebox/graphdb
/scripts/CQL/LoadADGroups.cql
UTF-8
323
2.96875
3
[]
no_license
using periodic commit 10000 load csv from 'file:///opt/neo4j/stage/DataSource/PK_Groups.csv' as line Fieldterminator '^' MERGE (g:Group {GroupAlias: line[0]}) ON MATCH set g :ADGroup, g.GroupName=line[2] ON CREATE set g :ADGroup, g.GroupAliasDisplayName=line[1], g.GroupName=line[2]; create index on :ADGroup(GroupAlias...
true
03b1e3759eb8df4aca90d1799907db077be08b32
SQL
jmcarp/nih-trends
/scripts/count_term.sql
UTF-8
543
3.375
3
[]
no_license
create extension if not exists pg_trgm; drop table if exists mti_count_term; create table mti_count_term as select cui, max(term) as term, count(cui) as count, count(cui) / (select sum(count) from mti_count_year)::numeric as prop from mti_term where cui != '' group by cui ; alter table mti_count_term add pri...
true
75cde0b6f973f1b64fbaf3294847ba1cbfefa2f8
SQL
noushadnipun/laracommerce
/database/laracommerce.sql
UTF-8
44,851
3.125
3
[ "MIT" ]
permissive
-- phpMyAdmin SQL Dump -- version 4.9.2 -- https://www.phpmyadmin.net/ -- -- Host: localhost:3306 -- Generation Time: Mar 06, 2021 at 04:50 PM -- Server version: 5.7.24 -- PHP Version: 7.3.2 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHA...
true
2c14ceca315c4affaf2de8954b05d03e7c86f664
SQL
TheGhostGroup/Bestcore
/sql/ashamane/characters/2019_01_15_01_characters_arena.sql
UTF-8
792
2.796875
3
[]
no_license
DROP TABLE IF EXISTS `character_arena_stats`; DROP TABLE IF EXISTS `character_arena_data`; CREATE TABLE `character_arena_data` ( `guid` BIGINT (20) UNSIGNED NOT NULL, `slot` TINYINT (3) UNSIGNED NOT NULL, `rating` INT (10) UNSIGNED NOT NULL DEFAULT 0, `bestRatingOfWeek` INT (10) UNSIGNED NOT NULL DEFAULT 0, ...
true
f1256d04b4f40755fcbc1fca54013d0efa8069d9
SQL
esharanalkar07/Project-V2_22-02
/project_signup.sql
UTF-8
4,225
2.921875
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.8.5 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Feb 21, 2019 at 06:23 PM -- Server version: 10.1.38-MariaDB -- PHP Version: 7.2.15 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OL...
true
e9d0f6d073432a262892e475ed49efcf8f5d2b53
SQL
albrecht-jun-zhang/admin
/127.0.0.1.sql
UTF-8
1,419
2.796875
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 3.5.2.2 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: Jan 29, 2013 at 01:48 PM -- Server version: 5.5.27 -- PHP Version: 5.4.7 SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /...
true
bdde194c032d16d77fa88b04c80667192ed2a6e1
SQL
AnaRitaTorres/BDAD
/TP2/scr/select.sql
UTF-8
2,287
3.6875
4
[]
no_license
.mode columns .headers on PRAGMA foreign_keys = ON; /*LISTAR CLIENTES POR ORDEM ALFABETICA*/ .width 8 20 SELECT DISTINCT PESSOA.nome FROM PESSOA INNER JOIN CLIENTE ON PESSOA.idPessoa=CLIENTE.idCliente ORDER BY PESSOA.nome ASC; /*LISTAR FUNCIONARIOS*/ SELECT DISTINCT PESSOA.nome FROM PESSOA I...
true
6a3ba3a28ae048a24cc780a2660758f36cb3a972
SQL
sh3lbsd/database-exercises
/where_exercises.sql
UTF-8
746
3.875
4
[]
no_license
USE employees; DESCRIBE employees; SELECT first_name, last_name FROM employees WHERE first_name IN ('Irena','Vidya','Maya'); SELECT first_name, last_name FROM employees WHERE last_name LIKE 'E%'; SElECT first_name, last_name FROM employees WHERE last_name LIKE '%q%'; SELECT first_name, last_name FROM employees WH...
true
7e9c71f5fb5eb9a77f296e317f09579b5ebdcdb5
SQL
manishmk9/assetment
/database/database.sql
UTF-8
5,284
3.15625
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.9.1 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Jul 25, 2020 at 01:56 AM -- Server version: 10.4.8-MariaDB -- PHP Version: 7.3.11 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD...
true
fd464016e658ae388a9bb74ae12b9c14cf05edba
SQL
SENA-CLASS/595885G1_TRIM3-4
/MySQL/ejemploClase1.sql
UTF-8
1,588
3.515625
4
[]
no_license
create database a; create table a.persona ( tipo_documento varchar(20), numero_documento varchar(20), primer_nombre varchar(40), segundo_nombre varchar(40), primer_apellido varchar(40), segundo_apellido varchar(40), primary key (tipo_documento , numero_documento) ); INSERT INTO `a`.`persona...
true
af397d105110bb745f1a020b676d976e050110dc
SQL
jgarzonext/plsql-testing
/script_plsql/bd_iaxis/script/indices/CODIOBJASEG_PK.sql
UTF-8
511
2.671875
3
[]
no_license
-------------------------------------------------------- -- DDL for Index CODIOBJASEG_PK -------------------------------------------------------- CREATE UNIQUE INDEX "AXIS"."CODIOBJASEG_PK" ON "AXIS"."CODIOBJASEG" ("COBJASEG") PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS NOLOGGING STORAGE(INITIAL 655...
true
3e64a089c4fe1dba25ea31a5d09fb0690f0689c6
SQL
lframosn/BC-MALLAS
/10-SAT BLOQUEOS-PPJDW03N/10-SAT BLOQUEOS-PPJDW03N-SAT_TBCODBLQ.sql
WINDOWS-1252
2,174
2.9375
3
[]
no_license
drop table IF EXISTS SAT.TBCODBLQ; CREATE TABLE IF NOT EXISTS SAT.TBCODBLQ ( IDENTIFICADOR_EJECUCION INTEGER --IDENTIFICADOR UNICO DE EJECUCION --MPDT060 - BLOQUEOS , CODENT_D VARCHAR (4) --CODIGO DE ENTIDAD , NSECFIC_D DECIMAL (10,0) --NUMERO DE SECUENCIA DE LA CINTA , TIPOCINTA_D DECIMAL (2,0) --TIPO DE LA ...
true
e2d6ba61c638b03df36ff7996c166baf2def52a1
SQL
ashishsalunkhe/Zensar-ESD
/sql_assignments/SQL/cursor.sql
UTF-8
339
2.71875
3
[]
no_license
DECLARE CURSOR c1 is SELECT ename FROM emp; mname emp.ename%type; cnt number; BEGIN SELECT count(*) into cnt from emp; OPEN c1; LOOP FETCH c1 into mname; dbms_output.put_line(mname); cnt:=cnt-1; EXIT WHEN cnt <= 0; END LOOP; CLO...
true
ea3b2012aac48471554b45dac0ebaf6747e5c93b
SQL
wentium/dw_sql
/service/minireport/angejia_scorecard_20151104.sql
UTF-8
36,126
4.09375
4
[]
no_license
drop table if exists dw_temp_angejia.jenny_report_broker_20150521; create table dw_temp_angejia.jenny_report_broker_20150521 as select '2' as num,'经纪人数' as zb ,count(case when p_dt = ${dealDate} then user_id end) as today ,count(case when p_dt = date_sub(${dealDate},1) then user_id end) as today_1 ...
true
f2e92aa94634a4bd9e0339bc0c9cf25e64657227
SQL
VelazqJ627/Market-Firm-Application
/AspNetRoles.sql
UTF-8
1,806
3.3125
3
[]
no_license
-------------------------------------------------------- -- File created - Thursday-December-07-2017 -------------------------------------------------------- -------------------------------------------------------- -- DDL for Table AspNetRoles -------------------------------------------------------- CREATE TABL...
true
aa2c726fa386d5aaa9bd6572a75bf90ce2f7ce88
SQL
oscarrda78/Experimentos_Java
/TB1/2.Db/EMotelDb/src/main/resources/sql/migrations/V003__Crear_Tabla_TipoHotel.sql
UTF-8
531
3.25
3
[]
no_license
-- Table: public.tipohotel CREATE SEQUENCE tipo_hotel_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; CREATE TABLE public.tipohotel ( id integer NOT NULL DEFAULT nextval('tipo_hotel_id_seq'::regclass), nombre character varying(50) COLLATE pg_catalog."default", desc...
true
380e33435b11491cbb8975b9564fa3fba33efef0
SQL
davidfetter/ASSERTIONs_PGCon_20180531
/tool_inventory_easy.sql
UTF-8
2,575
3.671875
4
[ "MIT" ]
permissive
\set ON_ERROR_STOP off \echo \echo 'CREATE TABLE IF NOT EXISTS available_tool (' \echo ' tool_id INTEGER GENERATED BY DEFAULT AS IDENTITY PRIMARY KEY,' \echo ' tool_type TEXT NOT NULL,' \echo ' available INTEGER DEFAULT 5 NOT NULL,' \echo ' CHECK(available >= 0)' \echo ');' \prompt c CREATE TABLE IF NOT E...
true
02a7f8e38731f6c29bc3be87c85f3248d865005f
SQL
miyasakakoki/devicemonit
/ui/schema.sql
UTF-8
522
3.28125
3
[]
no_license
PRAGMA foreign_keys = ON; drop table if exists User; create table User( uid integer primary key autoincrement, email text not null, name text not null, pass text not null ); insert into User( email, name, pass ) values( "asdf@asdf", "Test User", "password" ); drop table if exists devices; create table devices( ...
true
df39b306f018893fe11d567acc515c01358de7b0
SQL
CUBRID/cubrid-testcases
/sql/_17_sql_extension2/_02_full_test/_03_alter_table/_01_alter_change/cases/alter_change_033.sql
UTF-8
1,102
3.8125
4
[ "BSD-3-Clause" ]
permissive
--+ holdcas on; --partition related change (not supported), by range create table coo(col1 int, col2 date, col3 char(10)) partition by range (col2) (partition p1 values less than (date'1990-12-31'), partition p2 values less than(date'2000-12-31'), partition p3 values less than(date'2010-12-31')); insert into coo val...
true
f7eb38a5aeac4db6143cfa30cb54d9af60655634
SQL
zackzackzackzack/dappboard-etl
/schemas/tables/events.sql
UTF-8
630
3.9375
4
[ "MIT" ]
permissive
CREATE TABLE IF NOT EXISTS events ( block_hash TEXT, block_number BIGINT, data TEXT, log_index BIGINT, topic_0 TEXT, topic_1 TEXT, topic_2 TEXT, topic_3 TEXT, transaction_hash TEXT, transaction_index BIGINT, address TEXT, timestamp TIMESTAMP, CONSTRAINT unique_event U...
true
91df897f49b9159c2a8a2bc2e500dbce6900e523
SQL
csoriano2832/holbertonschool-higher_level_programming
/0x0E-SQL_more_queries/9-cities_by_state_join.sql
UTF-8
166
3.203125
3
[]
no_license
-- Lists all cities contained in the database hbtn_0d_usa SELECT cities.id, cities.name, states.name FROM cities INNER JOIN states ON cities.state_id = states.id;
true
8cf44b5907a48b4abb353d8d5b3df3240dc5e956
SQL
ryfarol/db-auto-website
/database_manipulation_queries.sql
UTF-8
5,256
4.03125
4
[]
no_license
-- Customers Page -- get all Customer info to populate from the Customers table SELECT * FROM customers; -- add a new customer with colon : character being used to -- denote the varibales that will have data from the backend programming langauge INSERT INTO customers (customer_first_name, customer_last_name,...
true
9fe346113223ef0ba2eafed0630215d2ee28e7b3
SQL
WalkerOstarliang/CPS
/数据库脚本/2014/2014-02/2014-02-15/2014-02-15-xmc.sql
UTF-8
373
2.53125
3
[]
no_license
-- Add/modify columns alter table T_LSGL_CZFW_JBXX add ZXHQSJ date; -- Add comments to the columns comment on column T_LSGL_CZFW_JBXX.ZXHQSJ is '最新核签时间'; -- Add/modify columns alter table T_LSGL_CZFW_JBXX modify ZXYY VARCHAR2(200); update t_common_dictionary set mc='承租人' where zdlb='ZDY_...
true
b5bd00ecb71bd692665410807e6b96a9121df73c
SQL
GeppettoTeam/Login_10008
/projects/db/tables_db_script.sql
UTF-8
2,201
2.984375
3
[]
no_license
/** * * @author Geppetto Generated Code</br> * Date Created: </br> * @since </br> build: </p> * * code was generated by the Geppetto System </br> * Gepppetto system Copyright - Geppetto LLC </br> * The generated code is free to use by anyone</p> * * * */ USE login; CREATE TABLE Login( id bigint(19) ...
true
7cad9320f788ba562bb8ff56825a495d69ef100a
SQL
santisagar/PL-SQL
/Chapter 7 Composite Data Types/022 - Storing Collections in Tables.sql
UTF-8
5,224
3.359375
3
[ "Apache-2.0" ]
permissive
-------------------------------------------------------------------------------------------------------------------- ---------------------------------------STORING COLLECTIONS IN TABLES------------------------------------------------ ------------------------------------------------------------------------------------...
true
553b86ccf95319c3aaf0467a02aea9586817f095
SQL
israelmarmar/contatosbd
/contato_contatos.sql
UTF-8
2,623
3.0625
3
[]
no_license
-- MySQL dump 10.13 Distrib 5.6.24, for Win64 (x86_64) -- -- Host: 127.0.0.1 Database: contato -- ------------------------------------------------------ -- Server version 5.5.5-10.0.21-MariaDB /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_...
true
0f251b468588947e6eab9bcec3d055dc121bd62d
SQL
laoLiangLoveProgram/MyTestDemo
/src/test/resources/data/data.sql
UTF-8
660
3.3125
3
[ "Apache-2.0" ]
permissive
create table if not exists test ( id int auto_increment primary key ); truncate table test; insert into test (id) values (1), (2), (3), (4), (5), (6), (7), (8), (9), (10); create table if not exists dto ( id bigint primary key , name varchar2(...
true
27945c0873f6583fdb53b8ae30a24a458a806292
SQL
kanjengsaifu/projects
/SwissVehicle/Database/Tables/6_master_item.sql
UTF-8
477
3.5
4
[]
no_license
DROP TABLE IF EXISTS master_item; CREATE TABLE master_item ( ItemID BIGINT PRIMARY KEY AUTO_INCREMENT, ItemCode VARCHAR(255), ItemName VARCHAR(255) NOT NULL, Price DOUBLE NOT NULL, Remarks TEXT, IsSecond BIT, CreatedDate DATETIME NOT NULL, CreatedBy VARCHAR(255) NOT NULL, ModifiedDa...
true
6f1a8820bb44ca2f108dc99ee86ba7819c8b8c91
SQL
rogeleebandioque/Spring
/activity-infra/activity-infra-buildtools/src/20150619_03.sql
UTF-8
289
3.375
3
[]
no_license
CREATE TABLE Contacts( id int not null, contact text not null, person_id int default null, type text not null CHECK (type='e-mail' or type ='cellphone' or type = 'telephone'), PRIMARY KEY (id), FOREIGN KEY(person_id) references person(id) on delete cascade );
true
83756be08b9d40adee4eb887e7d928db781c5542
SQL
freeCodeCamp/chapter
/server/prisma/migrations/20230328184907_add_tags/migration.sql
UTF-8
1,279
3.734375
4
[ "BSD-3-Clause" ]
permissive
-- CreateTable CREATE TABLE "chapter_tags" ( "created_at" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, "updated_at" TIMESTAMP(3) NOT NULL, "chapter_id" INTEGER NOT NULL, "tag_id" INTEGER NOT NULL, CONSTRAINT "chapter_tags_pkey" PRIMARY KEY ("chapter_id","tag_id") ); -- CreateTable CREATE TABLE...
true
b2b731c0688391671101846cb08dcf8fb99e2bb8
SQL
dilrubapalabiyik/Python-SQL-Practice-Codewars-HackerRank-LeetCode
/SQL/last30days.sql
UTF-8
167
3.125
3
[]
no_license
Select user_id sum(* case when ''' order amount for the last 30 days ''' Date between dateadd(day,-30,Date) and getDate() end as tr group by user_id from orders;
true