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
92cbc015f63a3e6d013ed774f47840cd153db84d
SQL
fourbet/holbertonschool-higher_level_programming
/0x0E-SQL_more_queries/102-rating_shows.sql
UTF-8
251
3.671875
4
[]
no_license
-- lists all shows from hbtn_0d_tvshows_rate by their rating SELECT tv_shows.title AS "title", SUM(tv_show_ratings.rate) AS "rating" FROM tv_show_ratings JOIN tv_shows ON tv_shows.id = tv_show_ratings.show_id GROUP BY title ORDER BY rating DESC;
true
06ca11562b8fe2487ffec19492c10e3826351f92
SQL
Ritik2703/Developing-SQL-Server-Databases
/sql-server-fundamentals/cterankingandpartitioning-exercise-files/RowNumber.sql
UTF-8
1,460
4.25
4
[]
no_license
select * from employees -- just rank accoding to base rate select [first name], [last name], [base rate], row_number() over (order by [base rate] desc) from employees -- rank accoding to rounded base rate select [first name], [last name], round([base rate],0), row_number() over (order by round([base ra...
true
56463e704faae5b8c223e4042c889ccd6af7f75a
SQL
lbat/docker-operationtheater-demo
/db_backup/openmrs_idgen_log_entry.sql
UTF-8
2,780
3.171875
3
[]
no_license
CREATE DATABASE IF NOT EXISTS `openmrs` /*!40100 DEFAULT CHARACTER SET utf8 */; USE `openmrs`; -- MySQL dump 10.13 Distrib 5.5.38, for debian-linux-gnu (x86_64) -- -- Host: 127.0.0.1 Database: openmrs -- ------------------------------------------------------ -- Server version 5.5.38-0ubuntu0.14.04.1 /*!40101 SET ...
true
9011a1afdff7a980e564bb1d9d0ade8af20c9ebf
SQL
iQoderi/blog-jsp
/src/user.sql
UTF-8
607
2.765625
3
[]
no_license
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE */; /*!40101 SET SQL_MODE='STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION' */; /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES */; /*!40103 SET SQL_NOTES='ON' */; create database 'demo'; USE `demo`; DROP TABLE IF EXISTS `user`; CREATE TABLE `user` ( `id` int(11...
true
d24c41deeb75bc8106af0ff26b94df8f776993b7
SQL
JonathanRH07/Control-de-versiones
/DB ICAAVweb/Suite_mig_demo/Stored_Procedures/sp_rep_cxs_comparativa_vent_vs_cxs_c.sql
UTF-8
5,375
3.78125
4
[]
no_license
DELIMITER $$ CREATE DEFINER=`root`@`%` PROCEDURE `sp_rep_cxs_comparativa_vent_vs_cxs_c`( IN pr_id_grupo_empresa INT, -- IN pr_periodo ENUM('DIARIO', 'SEMANAL', 'MENSUAL', 'BIMESTRAL', 'TRIMESTRAL', 'SEMESTRAL', 'ANUAL'), IN pr_id_sucursal INT, IN pr_id_moneda INT, IN pr_fecha_ini ...
true
dff42d57883ff4097614ed794527bd359ff06e04
SQL
Usetelni/Policies
/src/main/resources/db/migration/V003__ALTER_TABLE_POLICY_CASCADE.sql
UTF-8
240
2.5625
3
[]
no_license
ALTER TABLE `policies`.`apolices` DROP FOREIGN KEY `cliente_id`; ALTER TABLE `policies`.`apolices` ADD CONSTRAINT `cliente_id` FOREIGN KEY (`cliente_id`) REFERENCES `policies`.`clientes` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;
true
ca213e18fbbae29ee6529fdd690ddf27b408a58a
SQL
TAKAHIRO-03/bulletin-board
/src/main/resources/db/migration/V1_0__create_table.sql
UTF-8
2,013
3.484375
3
[]
no_license
-- 簡易なマスタテーブル CREATE TABLE IF NOT EXISTS currency( id SERIAL NOT NULL PRIMARY KEY, name VARCHAR(64) NOT NULL, symbol VARCHAR(10) NOT NULL, amount DECIMAL(40, 20), created_date TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, updated_date TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ); CREATE TABLE IF NOT EXISTS br...
true
9d313705b02a42313e5d36b70f469faf2fba7166
SQL
mmorgan55/qod
/create.sql
UTF-8
544
3.671875
4
[]
no_license
create table quote ( id bigint generated by default as identity, created timestamp not null, text varchar(4096) not null, source_id bigint not null, primary key (id) ); create table source ( source_id bigint generated by default as identity, created timestamp not null, name varchar(1024) not null, prim...
true
5c3eaf464bdece29f5b2c81cf992a8a4e6f9ac31
SQL
zachfong96/DatabaseManagement
/Lab 3/Lab3v2.sql
UTF-8
574
3.421875
3
[]
no_license
-- 1 -- select ordno, dollars from orders; --2-- select name, city from agents where name in ('Smith'); --3-- select pid,name, priceUSD from products where quantity > 208000; --4-- select name, city from customers where city = 'Dallas'; --5-- select * from agents where city NOT IN ('Tokyo', 'New York'); --6-- sel...
true
5877efb58edd7b6355a7a8c3027e389a3d8ec052
SQL
rmeldan/JRoutes
/src/main/resources/db/sql/create-db.sql
UTF-8
2,067
3.984375
4
[]
no_license
CREATE TABLE IF NOT EXISTS user ( ID INTEGER IDENTITY PRIMARY KEY, EMAIL VARCHAR(45) NOT NULL, FIRST_NAME VARCHAR(45) NOT NULL, IS_BLOCKED BOOLEAN NOT NULL, LAST_NAME VARCHAR(45) NOT NULL, PASSWORD VARCHAR(100) NOT NULL); CREATE TABLE IF NOT EXISTS security_role ( ID INTEGER IDENTITY PRIMARY KEY, NAME ...
true
f0fc21d1ea370008932f013c50e87b88e5a320d9
SQL
pedrojsaba/UNMSM_BigData_PracticaDirigida
/script_bd.sql
UTF-8
13,118
3.15625
3
[]
no_license
CREATE TABLE profesor ( profesor VARCHAR2(3), nombre VARCHAR2(50), PRIMARY KEY (profesor)); CREATE TABLE curso ( curso VARCHAR2(6), nombre VARCHAR2(30), profesor VARCHAR2(3), PRIMARY KEY (curso), FOREIGN KEY (profesor) REFERENCES profesor (profesor)); CREATE TABLE alumno ( alumno VARCHAR2(8...
true
944af745b801be908c0bc8d147bc01a97b43a2e8
SQL
bpn2404/backupproject
/api/app/database.sql
UTF-8
11,109
3.265625
3
[]
no_license
-- -- PREPARE USERS -- DROP TABLE IF EXISTS `t_users`; CREATE TABLE `t_users` ( `id` int(11) NOT NULL AUTO_INCREMENT, `username` varchar(255) NOT NULL, `first_name` varchar(100) NOT NULL, `last_name` varchar(100) NOT NULL, `email` varchar(255) NOT NULL, `password` varchar(100) NOT NULL, PRIMARY KEY (`...
true
9eb6babd6f3e1cdedcb12a7ac2fe1dde4934c596
SQL
cit111byui/cit111byui.github.io
/sql_code/w09_joins_key.sql
UTF-8
2,604
4.53125
5
[]
no_license
USE v_art; /* 1. when you visit art.ceiwebdev.com and you search by Period/Style and choose Impressionism, you get two resulting images What query would allow the user to use the term Impressionism and bring up the images of 'Woman in the Garden' and 'Irises' no join needed */ SELECT artfile FROM artwork WHERE ...
true
918ff4064c56db6972ed07e152159fded588d7c1
SQL
pljson/pljson
/examples/ex13.sql
UTF-8
2,780
3.1875
3
[ "MIT" ]
permissive
/* This software has been released under the MIT license: Copyright (c) 2009 Jonas Krogsboell Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limita...
true
cfe58bc7ffbfc3d98c377fc9eb3225be8e91fc5e
SQL
Alippok/Ruby_Sinatra_project_1
/db/music_store.sql
UTF-8
369
2.890625
3
[]
no_license
DROP TABLE stocks; DROP TABLE albums; DROP TABLE artists; CREATE TABLE artists( id SERIAL4 PRIMARY KEY, name VARCHAR(255) ); CREATE TABLE albums( id SERIAL4 PRIMARY KEY, title VARCHAR(255), artist_id int4 REFERENCES artists(id), buy_price int4, sell_price int4 ); CREATE TABLE stocks( id SERIAL4 PRIMARY KEY, album_...
true
8a1ec0de72c50b9c842508c5f829ebd13740a693
SQL
Ariah-Group/Research
/db_scripts/main/KC-RELEASE-4_0-SCRIPT/mysql/tables/KC_TBL_PMC_PROTOCOL.sql
UTF-8
697
2.6875
3
[ "Apache-2.0", "ECL-2.0" ]
permissive
DELIMITER / CREATE TABLE PMC_PROTOCOL ( PMC_PROTOCOL_ID DECIMAL(12,0) NOT NULL, PERSON_MASS_CHANGE_ID DECIMAL(12,0) NOT NULL, INVESTIGATOR CHAR(1) DEFAULT 'N' NOT NULL, KEY_STUDY_PERSON CHAR(1) DEFAULT 'N' NOT NULL, CORRESPONDENTS CHAR(1) DEFAULT 'N' NOT NULL, REVIEWER ...
true
0efb0705c8b8e39cd1c50de91b440f089f1a731f
SQL
AndreeFigueroa/api-mantenedor
/migrations/db/postgres/migrations/db/migrations/20210604180606_doctor.sql
UTF-8
447
2.859375
3
[]
no_license
-- migrate:up create table doctor( id SERIAL PRIMARY KEY, firstname VARCHAR, lastname VARCHAR, email VARCHAR, address VARCHAR, gender varchar, specialty varchar, birthdate varchar, id_branch INT, password varchar, created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, updated_at...
true
1c8a70450258827082a6874e2ea2c7ea99f8439e
SQL
bernardonarcizo/CardAPPio
/Tables.sql
UTF-8
762
3.625
4
[]
no_license
CREATE TABLE category( cat_id serial PRIMARY KEY, cat_name VARCHAR(45) NOT NULL, cat_image VARCHAR(45) ); CREATE TABLE product( prod_id serial PRIMARY KEY, cat_id INT, prod_name VARCHAR(45) NOT NULL, prod_description TEXT, prod_image VARCHAR(45), prod_price FLOAT NOT NULL, FOREIGN KEY (cat_id) REFERENCES Cat...
true
97fc5b082a162d84f3b8af6d98ed260c12d3b811
SQL
sturdy-dev/sturdy
/api/pkg/db/migrate/schema/migrations/000125_suggestion_notification_create.up.sql
UTF-8
245
2.6875
3
[ "Apache-2.0", "LicenseRef-scancode-unknown-license-reference", "LicenseRef-scancode-warranty-disclaimer" ]
permissive
CREATE TABLE suggestion_notifications ( user_id TEXT NOT NULL, workspace_id TEXT NOT NULL ); CREATE UNIQUE INDEX suggestion_notifications_user_id_workspace_unique_ix ON suggestion_notifications(user_id, workspace_id);
true
43365b4347d48532cc5e1b5062110bbe5b3e3a82
SQL
SabuhiTapdigli/Python_Examples
/Oracle/Having.sql
UTF-8
664
3.671875
4
[]
no_license
select order_id, sum(unit_price*quantity) order_value from order_items group by order_id order by order_value desc; --To find the orders whose values are greater that 1 million you add having cluase: select order_id, sum(unit_price*quantity) order_value from order_items group by order_i...
true
94e9b6cdcd64f00023cb003a6a33c1549857c01c
SQL
XuefeiY/leetcode
/Database/184-Department Highest Salary.sql
UTF-8
381
4.0625
4
[]
no_license
SELECT d.NAME AS Department, e.NAME AS Employee, Salary FROM Employee e JOIN Department d ON e.DepartmentId = d.Id WHERE ( e.DepartmentId, Salary ) IN (SELECT DepartmentId, Max(Salary) FROM Employee ...
true
67112fead32d8e78b5f007b605cb229c98cdf34a
SQL
jbeaken/uprn
/Database/import/import-discovery-addresses.sql
UTF-8
661
3.046875
3
[]
no_license
-- "OrgPostcode","PersonPseudoId","AddressLine1","AddressLine2","AddressLine3","AddressLine4","County","Postcode" drop table uprn.address; create table uprn.address ( originalPostcode VARCHAR(35), id BIGINT, line1 VARCHAR(255), line2 VARCHAR(255), line3 VARCHAR(255), line4 VARCHAR(255), ...
true
9e2a25314dedc068b01f7483f56f1376fa338f60
SQL
BraydonD/WEBD2201
/sql/lab7_auto_records.sql
UTF-8
1,511
3.6875
4
[]
no_license
/* Braydon Duprey lab7_auto_records.sql WEBD2201 July 25, 2021 */ -- DROP'ping tables clear out any existing data DROP TABLE IF EXISTS automobiles; -- CREATE the table, note that id has to be unique, and you must have a owner CREATE TABLE automobiles( id INTEGER PRIMARY KEY, make VARCHAR(15) NOT NULL, model VA...
true
7d9e4e4cbe47403b54191c3f2a11eebed6a3cfab
SQL
iffatunnessa/Distributed-Database
/PROJECT/sites/Server/views/specificRecord.sql
UTF-8
1,053
3.15625
3
[]
no_license
--displaying specific record from each table using primary key. set serveroutput on; create or replace view Search_Store as select * from Store where Branch_No = &branch; select * from Search_Store ; create or replace view Search_Employee as select * from Employee where E_ID = &E_ID; select * from Search_Employee...
true
79377ce3648070d517d5df00c288ff9fae4e128c
SQL
Arjentix/CSA-development
/Лаб. 3/database/init.sql
UTF-8
949
3.34375
3
[]
no_license
CREATE DATABASE IF NOT EXISTS AnimalStoreDb; USE AnimalStoreDb; -- Animals tables CREATE TABLE IF NOT EXISTS cat( Id INT AUTO_INCREMENT NOT NULL, Type VARCHAR(32) NOT NULL, Name VARCHAR(32) NOT NULL, Age INT UNSIGNED NOT NULL, Price DOUBLE UNSIGNED NOT NULL, PRIMARY KEY(Id) ); CREATE TABLE IF NOT EXISTS dog( ...
true
f72b167e191688a0a14122dbcccade7db34dfbf8
SQL
ReneRanzinger/MeetingRegistration
/bin/src/main/resources/schema.sql
UTF-8
2,699
3.734375
4
[]
no_license
DROP SCHEMA IF EXISTS registration CASCADE; CREATE SCHEMA IF NOT EXISTS registration AUTHORIZATION registration; CREATE SEQUENCE IF NOT EXISTS conference_seq MINVALUE 1 START 1; CREATE SEQUENCE IF NOT EXISTS fee_seq MINVALUE 1 START 1; CREATE SEQUENCE IF NOT EXISTS participant_seq MINVALUE 1 START 1; CREATE SEQUENCE ...
true
2283aabf9f4a338eafdd6f47fc757cdf16ae6bf7
SQL
FawadJawaid/database-design-of-graphics-design-school
/DB_Final_Project/Project Schema Script.sql
UTF-8
5,595
4
4
[]
no_license
-- -- GROUP MEMBERS: 11k-2116, 11k-2282, 11k-2181 (Section B) -- -- SCHEMA NAME -- Nexus Graphics School.sql -- -- SCHEMA DESCRIPTION -- This script creates the SQL*Plus tables of our Project (Nexus Graphics School). -- Its a normalized schema script upto 3NF -- To remove the tables use the "DB Project Drop.sq...
true
0649cd97b46259651bc5af7d282edfdbb7df1925
SQL
Electron847/MasterFile
/DataBase_Technologies/SQLpractice/8_Triggers.sql
UTF-8
2,376
4
4
[]
no_license
DROP TABLE product_price_history; CREATE TABLE product_price_history ( product_id number(5), product_name varchar2(32), supplier_name varchar2(32), unit_price number(7,2) ); DROP TABLE product CASCADE CONSTRAINTS; CREATE TABLE product ( product_id number(5), product_name varchar2(3...
true
fce85b5612433ac94cdede6b90efc3d9d444f9ae
SQL
RamzittoRamzotti/rk3
/rk3.sql
UTF-8
849
3.59375
4
[]
no_license
#Task 1 CREATE TABLE `towns`( `city` varchar(30) NOT NULL, `country` varchar(30) NOT NULL, `population` int(30) unsigned NOT NULL, `year` int(4) unsigned NOT NULL); INSERT INTO `towns` (`city`, `country`, `population`, `year`) VALUES( 'Moskow', 'Russia', 1200000, 493), ('Sydney', 'Australia', 1000000, 1210), (...
true
24660c8e71555b78f4ef6bce0936a1a2db40e143
SQL
veltran/normal
/db/horario_normalv1.sql
UTF-8
31,663
2.796875
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 5.0.2 -- https://www.phpmyadmin.net/ -- -- Servidor: 127.0.0.1 -- Tiempo de generación: 18-09-2020 a las 19:11:20 -- Versión del servidor: 10.4.14-MariaDB -- Versión de PHP: 7.2.33 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD...
true
653f1ccb9ad27ee31e687872719ab3e666faea2f
SQL
MToncheff/MySQL-Basics
/Basic CRUD/09. Find Names of All Employees.sql
UTF-8
155
3.265625
3
[]
no_license
SELECT CONCAT(first_name, ' ', middle_name, ' ', last_name) AS 'Full Name' FROM employees WHERE salary IN(25000, 14000, 12500, 23600) ORDER BY employee_id;
true
f637688d93705bf1d0bf17b00443f1498bef9e45
SQL
radtek/abs3
/sql/mmfo/bars/Table/sb_dec_2011.sql
UTF-8
2,695
2.875
3
[]
no_license
PROMPT ===================================================================================== PROMPT *** Run *** ========== Scripts /Sql/BARS/Table/SB_DEC_2011.sql =========*** Run *** = PROMPT ===================================================================================== PROMPT *** ALTER_POLICY_INFO...
true
8f7884c09b91700d47a0051ab8dda65b15f20aff
SQL
ApplETS/JDGMobile-Web
/create.sql
UTF-8
1,832
3.65625
4
[]
no_license
/**************** * CREATE TABLES * ****************/ create table mobile_school( school_id int auto_increment primary key, school_name varchar(50), school_alias varchar(20)) ; create table mobile_event( event_id int auto_increment primary key, event_name varchar(50), event_has_description tinyint not null default 1, e...
true
a6bd07b548ad44c35435089f117874c168966150
SQL
alvimpaulo/Sistema-de-Competicao
/Script.sql
UTF-8
11,958
3.28125
3
[]
no_license
-- MySQL Script generated by MySQL Workbench -- qui 19 nov 2020 15:29:41 -- 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
b2fd6f45803208b157a7670f82a8dbe0af31411d
SQL
ManarOmar/dvdrentalstore
/DB_queries/query11.sql
UTF-8
240
3.390625
3
[]
no_license
SELECT s.staff_id, s.first_name, SUM(p.amount) AS rung_up ,DATE_PART('month',payment_date) AS rung_month FROM payment AS P JOIN staff AS s ON p.staff_id = s.staff_id WHERE payment_date BETWEEN '2007-01-01' AND '2007-02-01' GROUP BY 1,2,4
true
c0ee47571ee5be282d85a83ee2ae61c1ee049f51
SQL
MauroDataMapper/mc-to-mdm-migration
/migration/sql/1_core/edit.sql
UTF-8
6,620
3.078125
3
[ "Apache-2.0" ]
permissive
INSERT INTO maurodatamapper.core.edit(id, version, date_created, last_updated, resource_domain_type, resource_id, created_by, description, title) SELECT e.id, e.version, e.date_created, e.last_updated, 'Classifier' AS resource_domain_type, cls.classifier_id AS resource_id, ...
true
86b5b61d39a146b9aabff7093927ccfb480f7744
SQL
koupper/poskique
/BaseDatos/Query/complementos.sql
UTF-8
3,864
3.078125
3
[]
no_license
if OBJECT_ID('complementos') is not null drop table complementos; create table complementos( id_complemento int, descripcion varchar(30), id_producto int, numero_personas int, primary key(id_complemento)); --HOTDOG COMBO INDIVIDUAL insert into complementos(id_complemento, descripcion, id_producto, numero_pe...
true
f01119e43c660a1eb3035697e86bfa1cfd702cd9
SQL
YA7MO/Project-2
/db/seed.sql
UTF-8
1,348
3.421875
3
[]
no_license
DROP DATABASE IF EXISTS blog_db; CREATE DATABASE blog_db; \c blog_db CREATE TABLE Categories ( cat_id serial primary key, category_name varchar ); CREATE TABLE Articles ( id serial primary key, title varchar, img varchar, content text, category_id int not null, date_posted timestamp,...
true
f2797a606527b2ff050712560f240980a4b0808a
SQL
angel-aleksandrov06/SoftUni-Engineering-CSharp
/Databases Basics - MS SQL Server/Exams/Exam - 17 Feb 2019/09. SubjectsWithStudents.sql
UTF-8
371
4.375
4
[]
no_license
SELECT FirstName + ' ' + LastName AS [FullName], CONCAT(sb.[Name], '-', sb.Lessons) AS Subjects, COUNT(st.StudentId) AS Students FROM Teachers AS t JOIN Subjects AS sb ON sb.Id = t.SubjectId JOIN StudentsTeachers AS st ON st.TeacherId = t.Id GROUP BY t.FirstName, t.LastName, sb.Name, sb.Lessons ORDER BY C...
true
d99b5bd050bf4e35b1e48d4400c4ffd5e1a9575c
SQL
sahar-murrar/WebFundamentales
/MySql/Friendships/additional questions/additional_question_query3.sql
UTF-8
371
4.03125
4
[]
no_license
select concat(users.first_name , " ", users.last_name) as user_name, count(friendships.user_id) as fiends_count from friendships join users on users.id = friendships.user_id group by friendships.user_id order by count(friendships.user_id) desc -- to order them from the larger to the lowest limit 1 -- to return only ...
true
496adbce4967f7ae9c2da56435b052dc07e3b68b
SQL
liuendy/subdb
/src/main/resources/doc/order.sql
UTF-8
1,229
3.328125
3
[]
no_license
/* Navicat Premium Data Transfer Source Server : 本地mysql Source Server Type : MySQL Source Server Version : 50721 Source Host : localhost Source Database : test2 Target Server Type : MySQL Target Server Version : 50721 File Encoding : utf-8 Date: 05/21/2018 16:20:20 PM...
true
daa0d6c308cf118b5852e1b7766e4d73dc142aa2
SQL
rwolst/RS_Chad_SQLite3
/extras/baserunning_events_game_stats.sql
UTF-8
9,522
3.578125
4
[]
no_license
/*First do the runner table*/ /*Build the cumulative stats table */ Drop Table IF EXISTS baserunning_stats_runner; Create Table baserunning_stats_runner as SELECT *, (PA_1 + PA_2 + PA_3) as PA, (PO_1 + PO_2 + PO_3) as PO, (SB_1 + SB_2 + SB_3) as SB, (CS_1 + CS_2 + CS_3) as CS FROM ( SELEC...
true
89cf85d4995ef4e0d411d7253612e2b75e055d7a
SQL
icomefromthenet/mysqlfastintervallookup
/src/allens/before.mysql
UTF-8
4,325
4.34375
4
[]
no_license
-- ----------------------------------------------------------------------------- -- Example of the Before Allens Relation -- ----------------------------------------------------------------------------- -- Setup Queries ignore -------------------------------------------------------- SELECT open_slot_id, close_slo...
true
e8350fe61efaf36b5cfc3e939f84085a2d48c34b
SQL
Juanlacalle/lab-mysql-first-queries
/SQL first queries 1° LAB.sql
UTF-8
1,844
4.46875
4
[]
no_license
-- 1. Which are the different genres? select distinct prime_genre from APPLE; -- 2. Which is the genre with more apps rated? SELECT prime_genre, sum(rating_count_tot) FROM APPLE GROUP BY prime_genre ORDER BY sum(rating_count_tot) DESC LIMIT 1; -- 3. Which is the genre with more apps? SELECT prime_genre, COUNT(prime...
true
51cdbbbf9350596ac2d8cb54234aeeb8a50a8aa7
SQL
mglagolic/DBTimeLine
/MRSource/CodeGenerator/CodeGenerator.sql
UTF-8
2,211
4.25
4
[]
no_license
/* SELECT t.SCHEMA_NAME FROM [INFORMATION_SCHEMA].SCHEMATA t WHERE t.SCHEMA_NAME NOT LIKE 'db[_]%' AND t.SCHEMA_NAME NOT IN('guest', 'INFORMATION_SCHEMA', 'sys') */ IF OBJECT_ID('tempdb..#Schema') IS NOT NULL DROP TABLE #Schema SELECT DISTINCT SCHEMA_NAME = t.TABLE_SCHEMA INTO #Schema FROM [INFORMATION_SCHEMA]....
true
39df843142a3ce7576bccf9d4a6634514b374c82
SQL
695229637/Car2
/WebContent/datebase.sql
UTF-8
252
2.640625
3
[]
no_license
/* Drop Tables */ DROP TABLE CAR; CREATE database Cars charset=utf8; /* Create Tables */ CREATE TABLE CAR ( CARID INT NOT NULL AUTO_INCREMENT, PINGPAI VARCHAR(20), JIAGE INT, XILIE VARCHAR(20), PRIMARY KEY (CARID) );
true
ba8a22c14c3cdfc0a19f7b4aeef96e5f2d80de90
SQL
kevinmiles/instrumentation
/db/sp/sp_set_credit_limit.sql
UTF-8
400
3
3
[]
no_license
drop procedure if exists sp_set_credit_limit; /* */ DELIMITER // CREATE PROCEDURE sp_set_credit_limit ( IN member_id int, IN credit_limit int, OUT err varchar(100) ) SQL SECURITY DEFINER BEGIN main: begin set err = ''; update members m set m.credit_limit = credit_lim...
true
aa590b4ea7ba9384ffa750adcdb406b66e70d1c6
SQL
Premre/SmartConstractionSiteManagerSys
/sql/security_monitoring_sys.sql
UTF-8
28,251
3.171875
3
[]
no_license
/* Navicat Premium Data Transfer Source Server : 47.99.161.205 Source Server Type : MySQL Source Server Version : 80024 Source Host : 47.99.161.205:3306 Source Schema : security_monitoring_sys Target Server Type : MySQL Target Server Version : 80024 File Encoding : 650...
true
b493901e825f91535951e1fb87f5942f471230b7
SQL
HugoNeves/Airflow-Play
/dags/sql/dim_company_catalog.sql
UTF-8
592
3.34375
3
[]
no_license
insert into {{ params.dest_schema }}.{{ params.dest_table }} ( {% for item in params.columns %}{{ item }}{% if not loop.last %}, {% endif %}{% endfor %} ) select dc.id as company_id, dp.id as product_id, cc.price from {{ params.source_schema }}.{{ params.source_table }} cc join {{ params.dest_schema }}.di...
true
ba62600eec30c6e39ed5105e4251da0abbaaff32
SQL
Wimahel63/supports_poissy
/sql - Copie/hotel.sql
UTF-8
6,860
3.8125
4
[]
no_license
--depuis votre terminal shell vous créez une database nommée 'hotel'. --le modèle des tables est le suivant: --CREATE table chambres(id int(3) primary key auto_increment not null, num_chambre int(3), prix float, nb_lit int, nb-pers int(3), confort varchar(255),equipement varchar(255)); --CREATE TABLE clients(id int(3...
true
f785219e474d09c92c3f8a346e0e9a57b9166806
SQL
channelpartnersllc/ModTracking2
/ref/Extended Mods.sql
UTF-8
171
2.90625
3
[]
no_license
select distinct contract_id, Customer_Name, convert(datetime, post_date) as post_date from Report_Aspire_Contract_Modification as cm where reason like 'Extended Covid Mod'
true
620b64e933053d8e7395da4be99823245a46edb7
SQL
SavyParchman/Coinclude
/db/schema.sql
UTF-8
482
2.734375
3
[]
no_license
CREATE TABLE wallets ( walletid SERIAL PRIMARY KEY, walletname TEXT, walletreviews INTEGER, walletrating INTEGER, walletsecreviews INTEGER, walletsecrating INTEGER, walletanonreviews INTEGER, walletanonrating INTEGER, walleteasereviews INTEGER, walleteaserating INTEGER, walletesreviews INTEGER, ...
true
96fd04b12fbb7f0803ae19fca04f9f81cdbf5c50
SQL
Ranjith9014/Ranjithgit
/Release2.21/ECA.CST/customeca-common/scripts/procedures/Create_TMO_CCPC_VIEW.sql
UTF-8
501
2.90625
3
[]
no_license
DROP VIEW TMOBILE_CUSTOM.TMO_CCPC_VIEW; CREATE OR REPLACE FORCE VIEW TMOBILE_CUSTOM.TMO_CCPC_VIEW ( CCPC_CODE, COMPANY_CODE, CCPC_DESCRIPTION ) AS SELECT DISTINCT CCPC_CODE, COMPANY_CODE, CCPC_DESCRIPTION FROM TMOBILE_CUSTOM.TMO_CCPC WITH READ ONLY; CREATE OR REPLACE PUBLIC SYNONYM TMO_CCPC_VIEW ...
true
839b96b8805d18974174b4f36edab4d34c1baf83
SQL
swilsonau/Bounce
/bounceapp.sql
UTF-8
16,174
2.90625
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.1.14 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: Oct 28, 2014 at 01:39 AM -- Server version: 5.6.17 -- PHP Version: 5.5.12 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;...
true
3eef735b2c2f76161d45a6d38e74dfed91f23fbd
SQL
guycole/mellow-hound-aws
/src/main/mysql/mellow_hound_v1.sql
UTF-8
9,142
2.96875
3
[]
no_license
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'; CREATE SCHEMA IF NOT EXISTS `mellow_hound_v1` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci ; USE `mellow_hound...
true
0dd63c10bda7fb538b978349d81ec567cf5de388
SQL
chihongze/acolyte
/sql/flow_instance.sql
UTF-8
601
3.046875
3
[]
no_license
DROP TABLE IF EXISTS `flow_instance`; CREATE TABLE `flow_instance` ( id int primary key auto_increment comment "运行实例ID", flow_template_id int not null comment "隶属的flow_template", initiator int not null comment "flow发起人", current_step varchar(32) not null comment "当前执行到的step", status varchar(32) not null comme...
true
fa09bdf4da8c94e26ba76f14ac5f3a0cd1816127
SQL
rakesh315/SQL
/sql querry types/select/select individual.sql
UTF-8
80
2.625
3
[]
no_license
SELECT NAME,City FROM EMPLOYEE1 WHERE EMPID > 5 ORDER BY NAME ASC, City DESC;
true
146e5ea40465173b7af25c191f524cd93e1cad9e
SQL
shinexus/WorkScripts
/PLANB_门店差额款_2012-02-22.sql
GB18030
6,569
3.90625
4
[]
no_license
/** *sRptRPT10010000001373 **/ /* SELECT OrgCode, OrgName, SUM(HXTOTAL) AS HXTOTAL FROM tsalpludetail201202 --SELECT * FROM tsalpludetail201202 --WHERE OrgCode = '1001' --AND RptDate > '2012-01-01' WHERE OrgCode NOT IN ('0001') AND RptDate > '2012-02-01' AND RptDate < '2012-02-02' AND ETPCODE NOT IN ('00099...
true
7652b6599c60a2d48cee64243518881fb247f85b
SQL
apache/druid
/sql/src/test/resources/drill/window/queries/optimization/plan/pp_12.sql
UTF-8
147
2.625
3
[ "EPL-1.0", "Classpath-exception-2.0", "ISC", "GPL-2.0-only", "BSD-3-Clause", "Apache-2.0", "LicenseRef-scancode-public-domain", "LicenseRef-scancode-generic-cla", "0BSD", "LicenseRef-scancode-sun-no-high-risk-activities", "LicenseRef-scancode-free-unknown", "JSON", "LicenseRef-scancode-unico...
permissive
-- window function in case statement select case when c1 is not null then first_value(a1) over (partition by c1 order by b1) else 100 end from t1;
true
50046fd0574eda1694e831957f87258ce73fb909
SQL
radtek/abs3
/sql/mmfo/bars/Table/tmp_lici.sql
UTF-8
3,976
2.6875
3
[]
no_license
PROMPT ===================================================================================== PROMPT *** Run *** ========== Scripts /Sql/BARS/Table/TMP_LICI.sql =========*** Run *** ==== PROMPT ===================================================================================== PROMPT *** ALTER_POLICY_INFO...
true
30b58a993b27568b69f744710d59e0d8a51a9584
SQL
radtek/abs3
/sql/mmfo/bars/Table/cc_sob_update.sql
WINDOWS-1251
7,907
3.0625
3
[]
no_license
PROMPT ===================================================================================== PROMPT *** Run *** ========== Scripts /Sql/BARS/Table/CC_SOB_UPDATE.sql =========*** Run *** PROMPT ===================================================================================== PROMPT *** ALTER_POLICY_INFO...
true
4a78e4f8cb91f900afab22f6cf1f009004112351
SQL
hiamjosuwus/TonysKinal-DB
/DBTonysKinal2019398.sql
UTF-8
27,406
3.609375
4
[]
no_license
Drop database if exists DBTonysKinal2019398; create database DBTonysKinal2019398; ALTER USER 'root'@'localhost' identified WITH mysql_native_password BY ''; create table TipoEmpleado ( codigoTipoEmpleado int auto_increment not null, descripcion varchar(100) not null, primary key PK_codigoTipoEmpleado (codi...
true
ee9a46ae9f17399339068fe4011ebd135b2ad5b9
SQL
frncscdf/Progetto-Basi-Dati
/Database.sql
UTF-8
21,334
3.03125
3
[ "MIT" ]
permissive
SET FOREIGN_KEY_CHECKS=0; DROP TABLE IF EXISTS Profilo; DROP TABLE IF EXISTS Caratteristiche; DROP TABLE IF EXISTS PersonaggioUtente; DROP TABLE IF EXISTS IANemica; DROP TABLE IF EXISTS IANeutrale; DROP TABLE IF EXISTS Oggetto; DROP TABLE IF EXISTS Arma; DROP TABLE IF EXISTS Armatura; DROP TABLE IF EXISTS Co...
true
81203c0b3402cb5ecb8bbe4ce83dd8ea194480d6
SQL
tatstepprive/step
/notas/me/database/oracle/scripts/monitorSendMailViaDb.sql
UTF-8
34,367
3.625
4
[]
no_license
CREATE OR REPLACE PROCEDURE SYS.SEND_MSG_PROC (my_subj IN varchar2, my_msg IN varchar2) IS begin execute immediate 'alter session set smtp_out_server=''yourhost.yourdomain'''; utl_mail.send( sender => 'monitor@yourdoomain', recipients => 'person_a@yourdomain;person_b@yourdomain', subject =...
true
54ed283570df8e6d47a261cf384c51d8de94f394
SQL
racog3/sso-project
/IdentificationProvider/src/main/resources/schema.sql
UTF-8
2,625
4
4
[]
no_license
-- ----------------------------------------------------- -- Schema ssodb -- ----------------------------------------------------- DROP SCHEMA IF EXISTS `ssodb`; CREATE SCHEMA IF NOT EXISTS `ssodb` DEFAULT CHARACTER SET utf8 ; USE `ssodb` ; -- ----------------------------------------------------- -- Table `ssodb`.`user...
true
fd5dcc6ed01f9332679fb5e3ed6a35ee9c90e9e0
SQL
SuvaRastafarian/myhandyrestaurant
/core/myhandyrestaurant_common_struct.sql
UTF-8
30,343
2.96875
3
[]
no_license
-- MySQL dump 10.9 -- -- Host: localhost Database: myhandyrestaurant -- ------------------------------------------------------ -- Server version 4.1.14-Debian_6-log /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!40101 SET @OLD...
true
3e9eede6237f349147a1390a76d0e902bfa620e5
SQL
Freedom-Gundam-X10A/JZ-Industrial-Cloud-Platform
/src/main/resources/sql/mysql/mall_goodstype.sql
UTF-8
273
2.609375
3
[]
no_license
### 后台管理分页查询 #sql("paginateAdminList") select * from #(table) where 1=1 #if(keywords??) #setLocal(kw=SqlUtil.likeValue(keywords)) and ((name like '%#(kw)%') or (pinyin like '%#(kw)%') or (remark like '%#(kw)%')) #end order by sort_rank asc #end
true
23ac7d7a6cc953cf549447c42a0abd2045080e83
SQL
intCCP/CCP
/Application/Viste/t_mcrei_prova_join_stime.sql
UTF-8
1,237
3.15625
3
[]
no_license
/* Formatted on 21/07/2014 18:30:48 (QP5 v5.227.12220.39754) */ CREATE OR REPLACE FORCE VIEW MCRE_OWN.T_MCREI_PROVA_JOIN_STIME ( COD_ABI, COD_NDG, COD_SNDG, RAPP_PCR, RAPP_STIME, COD_STATO, VAL_CNT_DELIBERE, VAL_CNT_RAPPORTI, COD_PROTOCOLLO_DELIBERA ) AS SELECT PPCR.COD_ABI, PPCR...
true
54bf94486f6d5d203e92fd72aaea7dd189aa191d
SQL
SergeyStrukov/CCore-3-xx
/tools/DDLShow/files/inc/ptr.ddl
UTF-8
478
2.8125
3
[ "FTL", "BSL-1.0" ]
permissive
/* ptr.ddl */ struct R { int a; R *ptr; }; R[] list={ {1,list+1}, {2,list+4}, {3,list}, {4,list+5}, {5,list+6}, {6,list+2}, {7,list+3} }; int[] ind={ list[0].ptr->a, list[1].ptr->a, list[2].ptr->a, list[3].ptr->a, list[4].ptr->a, list[5].ptr->a, list[6].ptr->a }; int d1=list[0].ptr-list[1].ptr; R *ptr=list+9...
true
74e2e5938ce4458fbe5b66a379d9bb12b567924a
SQL
imouiche/MySQL-Beginner-to-Advanced
/session 1 -single table/courses.sql
UTF-8
621
3.84375
4
[]
no_license
USE sql_store; SELECT * from customers WHERE points BETWEEN 1000 and 2000; -- (points > 1000 and state = 'VA') -- ORDER BY first_name SELECT * from customers -- WHERE last_name LIKE 'b%'; -- lastname start with -- use % any number of charaters -- use _ single character -- Using REGEXP --> use ^ indicate the beg...
true
044d125717dfe35bb8cc46f378fab6c333c2526e
SQL
Fxztam/FormsMaterializedItem
/poc_account_final2.sql
UTF-8
27,051
2.8125
3
[]
no_license
--- [BO-FORM: {FORM-NAME:POC_ACCOUNT_FINAL2}] --- [BO showFormLevelTriggers] --- /* * Created by Friedhold.Matz@yahoo.com - Jan-2018 * This PoC Demo demonstrates the Oracle Forms power * of Forms Items modernizing as "Materialized Items": * * - Low Native PL/SQL Forms code * - using simple four Item...
true
cb74caa33e41b2988d37266f20a350daef894144
SQL
timhannifan/minml
/examples/donors/sample_results/results_exploration.sql
UTF-8
214
2.859375
3
[ "MIT" ]
permissive
select train_start, train_end, model_name, params as parameters, threshold as pct_threshold, round(metric_value,4) as precision from results where metric = 'precision' and threshold = 5 order by metric_value desc;
true
ef63a7572b3ddba484611eefa126088f25737c01
SQL
goJuly/SpringBootPractive
/actor/DB/create/actor.sql
UTF-8
635
3.34375
3
[]
no_license
CREATE TABLE `actor` ( `id` INT(11) NOT NULL AUTO_INCREMENT, `name` VARCHAR(30) NOT NULL, `height` SMALLINT(6) NULL DEFAULT NULL, `blood` VARCHAR(2) NULL DEFAULT NULL, `birthday` DATE NULL DEFAULT NULL, `birthplace_id` SMALLINT(6) NULL DEFAULT NULL, `sex` SMALLINT(1) NOT NULL DEFAULT 0, `update_at` TIMESTAMP(6)...
true
804bde9aa1846bcbe52f190ce1118c502448b0b6
SQL
Kwon-YoungSun/DataBase
/memberSQL.sql
UHC
3,991
3.078125
3
[]
no_license
CREATE TABLE member( mno NUMBER(4) CONSTRAINT MEMB_NO_PK PRIMARY KEY, id VARCHAR2(10 CHAR) CONSTRAINT MEMB_ID_UK UNIQUE CONSTRAINT MEMB_ID_NN NOT NULL, pw VARCHAR2(8 CHAR) CONSTRAINT MEMB_PW_NN NOT NULL, name VARCHAR2(10 CHAR) CONSTRAINT MEMB_NAME_NN NOT ...
true
dff94157b43928ad0c6007b32971bbd5ae709688
SQL
trippy64/sqlalchemy-challenge
/CreateTable.sql
UTF-8
331
2.6875
3
[]
no_license
create table hawaii_stations ( station varchar (12) primary key, name varchar (255), latitude decimal, longitude decimal, elevation decimal ); create table hawaii_measurements ( station varchar (12), sta_date date, prcp decimal, tobs decimal , foreign key (station) REFERENCES hawaii_stations(stati...
true
1ddabab851096f688028746eab3adcff8eed1430
SQL
4by4rus/node-sequelize-article
/Node-sequelize-article.sql
UTF-8
4,292
2.859375
3
[]
no_license
-- Elester Johnson(4by4rus) -- attributes for users model insert into users values (10001,'ronaldo','2018-06-21','2018-06-21'); insert into users values (10002,'pogba','2018-06-21','2018-06-21'); insert into users values (10003,'neymar','2018-06-21','2018-06-21'); insert into users values (10004,'Jesus...
true
c8f6b519374cc46589f9fd0d27491a1a157da5c4
SQL
guilherme033/OOP-Project-4
/src/main/resources/data.sql
UTF-8
3,151
2.671875
3
[]
no_license
INSERT INTO TABLE_EVENTS (name, description, startDate, endDate, startTime, endTime, emailContact, amountFreeTickets, amountPayedTickets, priceTicket, ADMIN_USER_ID) VALUES ('Concert', 'Piano concert', '2001-01-01', '2001-02-02', '02:02:02', '03:03:03', 'Pentecostpianorecital@outlook.com', 500,...
true
07a4e55ff01f5ca1103aef3a826692db1ddec2ac
SQL
windersan/room-reserver
/sql/create_tbl.sql
UTF-8
353
3.09375
3
[]
no_license
CREATE TABLE Employee ( ID int NOT NULL PRIMARY KEY, LastName varchar(50), FirstName varchar(50), Email varchar(50) ); CREATE TABLE Reservation ( ID int IDENTITY(1,1) PRIMARY KEY, [Start] DATETIME, Finish DATETIME, RoomID int, EmployeeID int FOREIGN KEY REFERENCES Employee(...
true
ccf876219133ccc4e742995ef43513f1777ca909
SQL
nazarioa/mta_bus_project
/Notes/MoreCool Quirers.sql
UTF-8
2,510
3.921875
4
[]
no_license
SELECT raw_id, latitude, longitude, time_received, vehicle_code, ROUND(distance_along_trip,5) as dist_along_trip, inferred_direction_code AS direction, inferred_phase, inferred_route_code AS route_code, inferred_trip_code, ROUND(next_scheduled_stop_distance,5) AS nxt_sch_stop_dist, next_scheduled_stop_code FROM raw_dat...
true
772f9acf6903cabb03f7e6104907393458a13737
SQL
SaraPro52/LppConsola
/Sara_Ubuntu/DATA/Antiguo/05_Procedure_Registrar_LIsta_09_Maria.sql
UTF-8
3,911
3.375
3
[]
no_license
USE SARA005; DROP PROCEDURE IF EXISTS RegistrarLista; DELIMITER ;; CREATE PROCEDURE RegistrarLista(IN ArrayLista VARCHAR(500)) BEGIN CALL EXECUTE_ARRAY( ArrayLista, "~", "CASE @i WHEN 0 THEN SET @Nom_Lista_Chequeo = @valor; WHEN 1 THEN SET @Des_Lista_Chequeo = @valor; WHEN 2 T...
true
11daac7322666ae6d380b7c86b285ea0d46a2af1
SQL
bellmit/dbSmellsData
/data/open-source/extracted_sql/agentgt_jirm.sql
UTF-8
918
3.03125
3
[ "MIT" ]
permissive
UPDATE stuff set a = 1 where b = 2 UPDATE lock_bean SET long_prop = ?, version = ? WHERE id = ? AND version = ? select string_prop from test_bean where string_prop = ? CREATE TABLE test_bean( string_prop text NOT NULL, long_prop bigint, timets timestamp without time zone, CONSTRAINT string_prop_key PRIMARY KEY (strin...
true
84424a7e0ad531dd294eee9fb04c55c727d26709
SQL
zwk1028/wms
/Script/init.sql
UTF-8
10,619
3.0625
3
[]
no_license
CREATE DATABASE xyy_erp; USE xyy_erp; /** * 测试脚本 CREATE TABLE `tb_sys_user` ( `id` bigint(16) NOT NULL auto_increment, `name` varchar(32) NULL, `sex` int(1) NULL, `age` int(1) NULL, `mobile` varchar(16) NULL, `address` varchar(128) NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET...
true
9a9a28a2d7a79afc427898b706a99a8dd9252743
SQL
dabarc/DabarcStrategyNewDesignMabe
/DabarcStrategyNewDesign/dabarc/Tables/t_IDM.sql
UTF-8
1,977
2.75
3
[]
no_license
CREATE TABLE [dabarc].[t_IDM] ( [report_id] INT IDENTITY (1, 1) NOT NULL, [name] NVARCHAR (128) NOT NULL, [description] NVARCHAR (256) NULL, [short_description] NVARCHAR (50) NULL, [active] BIT CONSTRAINT [DF_t_IDM_active] DEFAULT ((0)) N...
true
652d6c0e7a7134af095449c49ce5c9ffbc4e0555
SQL
fayaz55/Projects
/Capstone/BigQueryTrainModel.sql
UTF-8
685
3.203125
3
[]
no_license
--Reference From https://medium.com/@Sushil_Kumar/binary-logistic-regression-with-bigquery-ml-c9caa5920a71, and https://cloud.google.com/bigquery-ml/docs/logistic-regression-prediction CREATE OR REPLACE MODEL `leafy-environs-257822.PIR_TrainingSet2.model_Room1` OPTIONS ( model_type="logistic_reg", input_label_...
true
6a8ace920a608b0688d297f1e7c3ee188a6020fb
SQL
chaitali02/myGdProject
/framework-web/deploy/postgres/edw/transaction.sql
UTF-8
670
2.984375
3
[]
no_license
DROP TABLE IF EXISTS TRANSACTION; CREATE TABLE TRANSACTION ( TRANSACTION_ID VARCHAR(50) DEFAULT 0 NOT NULL, TRANSACTION_TYPE_ID VARCHAR(50), ACCOUNT_ID VARCHAR(50), TRANSACTION_DATE VARCHAR(10), FROM_ACCOUNT VARCHAR(50), TO_ACCOUNT VARCHAR(5...
true
27341b66591d7c30dc6994753f9533277858b132
SQL
dhelfer/webprog
/_dbdump/solcity.sql
UTF-8
15,602
3.1875
3
[ "BSD-3-Clause" ]
permissive
-- phpMyAdmin SQL Dump -- version 4.0.4.1 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Erstellungszeit: 17. Dez 2014 um 15:03 -- Server Version: 5.6.11 -- PHP-Version: 5.5.3 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*...
true
d10eb36bff29ab4ac6cba888fd594c4cb50c6c2c
SQL
Jwils21/UdemySqlPractice
/3.2 Simple Order By with Where Clause.sql
UTF-8
390
3.625
4
[]
no_license
--sort by multiple criteria SELECT FirstName as [Customer First Name], LastName FROM sales.vIndividualCustomer Order by LastName, [Customer First Name] desc --Use where and order by SELECT LastName, FirstName, SalesQuota as [Sales Quota] FROM sales.vSalesPerson where SalesQuota >= 250000 order by SalesQuota de...
true
cd635118703932ff0c747a414638a0f18b7002b2
SQL
CrowsFeet/SQL_Stuff
/MoveTempdb.sql
UTF-8
1,073
2.5625
3
[]
no_license
SELECT 'ALTER DATABASE tempdb MODIFY FILE (NAME = [' + f.name + '],' + ' FILENAME = ''D:\DATA\' + f.name + CASE WHEN f.type = 1 THEN '.ldf' ELSE '.mdf' END + ''');' FROM sys.master_files f WHERE f.database_id = DB_ID(N'tempdb'); --ALTER DATABASE tempdb MODIFY FILE (NAME = [tempdev], FILENAME = 'D:\DATA\tempd...
true
16196d8e2e6884ab2b5b0902d6d3444f948e618c
SQL
rohan-pulekar/big_data_analytics_course_material
/week-5-feb-26-2016/assignment/solution/assignment5_problem1.sql
UTF-8
400
2.953125
3
[]
no_license
create table KINGJAMES (freq INT, word STRING) ROW FORMAT DELIMITED FIELDS TERMINATED BY '\t' stored as textfile; LOAD DATA INPATH "/user/cloudera/hadoop-grep-bible-output/part-r-00000" INTO TABLE KINGJAMES; select * from KINGJAMES where lower(word) like 'w%' and length(word)>=4 and freq>250 order by freq; select count...
true
6942185f5bc9e2f44bee669a953aa7c1034d42da
SQL
Hongic/classroom_2
/public/data/db_classroom.sql
UTF-8
11,694
3.109375
3
[]
no_license
/* Navicat MySQL Data Transfer Source Server : Hong Source Server Version : 50528 Source Host : localhost:3306 Source Database : db_classroom Target Server Type : MYSQL Target Server Version : 50528 File Encoding : 65001 Date: 2012-12-29 21:05:16 */ SET FOREIGN_KEY_CHECKS=0; -- -...
true
9239906dd7f2bc77b0470edefcb5682af84c0fda
SQL
linhaishe/GXA-assignment
/stage3/0601/homework.sql
UTF-8
4,148
4.21875
4
[]
no_license
-- 商品类别表 -- CREATE TABLE category( cat_id INT PRIMARY KEY AUTO_INCREMENT,#类别编号 cat_name VARCHAR(30) NOT NULL#类别名称 ); -- 商品表 -- CREATE TABLE goods( goods_id INT PRIMARY KEY AUTO_INCREMENT,#商品编号 goods_name VARCHAR(30) NOT NULL,#商品名称 goods_price DOUBLE,#商品进价 shop_price DOUBLE,#商品卖价 market_price ...
true
7954bc8b22713f1163901c92a90da3dc5606415e
SQL
andrewbaldwin44/SQL_Zoo_Exercises
/Tutorial_4_Nested_Select.sql
UTF-8
1,881
4.28125
4
[]
no_license
--Question 1 SELECT name FROM world WHERE population > (SELECT population FROM world WHERE name = 'Russia'); --Question 2 SELECT name FROM world WHERE continent = 'Europe' AND (gdp/population) > (SELECT (gdp/population) FROM world WHERE name = 'United Kingdom'); --Question 3 SELECT name, cont...
true
837d9e49ce896207129acf283b1fe22e0ab43ee5
SQL
mohammedAbdurahman/onlien-blood-bank
/BLOOD.SQL
UTF-8
769
2.5625
3
[]
no_license
CREATE TABLE `bloodD` ( `id` int(11) NOT NULL, `fname` text NOT NULL, `Email ID` varchar(30) NOT NULL, `address` varchar(30) NOT NULL, `contact` varchar(20) NOT NULL, `gender` text NOT NULL, `blood_group` varchar(30) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `blood` --...
true
65958321b4e38227924c1334d8c9c4f8bec47f8f
SQL
xgh2012/web_api
/go/src/data/admin.sql
UTF-8
11,788
3.09375
3
[ "MIT" ]
permissive
/* Navicat MySQL Data Transfer Source Server : 127.0.0.1 Source Server Type : MySQL Source Server Version : 50553 Source Host : 127.0.0.1:3306 Source Schema : admin Target Server Type : MySQL Target Server Version : 50553 File Encoding : 65001 Date: 23/04/2021 15:05:...
true
a04507bfe7d9b000f83f17ebf22ecea7ed99ecf0
SQL
ivankg/ionstat
/strmln-ionstat-webapp/src/main/resources/createScript.sql
UTF-8
10,352
3.375
3
[]
no_license
SET FOREIGN_KEY_CHECKS=0; -- ---------------------------- -- Table structure for DEPARTMENT -- ---------------------------- DROP TABLE IF EXISTS `DEPARTMENT`; CREATE TABLE `DEPARTMENT` ( `DEPARTMENT_ID` bigint(20) NOT NULL AUTO_INCREMENT, `name` varchar(255) DEFAULT NULL, `FACILITY_ID` bigint(20) NOT NU...
true
b1630bf6c458bb421d4d11d5ab3baa7c7d880294
SQL
ALPause23/Data-Base
/request_release.sql
UTF-8
675
3.875
4
[]
no_license
START TRANSACTION; CREATE TABLE not_manufact_product ( id_product int, type char(50), size int )ENGINE=InnoDB default charset=cp1251; INSERT INTO not_manufact_product (size, id_product, type) SELECT count(manufacture.id_product)as size, t1.id_product as id_product, t1.type as type FROM manufacture, (SELECT p...
true
d832a2859af670ad3635da10ff8f3a07cf806131
SQL
hxu23/w205_2017_fall
/exercise_1/transforming/effective_care_scores.sql
UTF-8
348
3.390625
3
[]
no_license
DROP TABLE IF EXISTS effective_care_scores; CREATE TABLE effective_care_scores as SELECT provider_id, measure_id, measure_name, condition, measure_start_date, measure_end_date, cast(score as decimal(1,0)) score FROM effective_care WHERE measure_id not like 'EDV%' A...
true
726f12b40f7777db7f448e01f83cc90063d594e8
SQL
krelicj/SOU_Things
/public_html/CS360/demos/lab8/initStudentCourseSchedule.sql
UTF-8
1,001
3.546875
4
[]
no_license
/** * initializes the student, course, and schedule tables and adds * a trigger and stored procedure * @version 080305 * @author Pete Nordquist */ -- drop tables DROP TABLE IF EXISTS schedule; DROP TABLE IF EXISTS student; DROP TABLE IF EXISTS course; -- create tables CREATE TABLE student ( ID INT...
true
e5146477ae57d8c6f301e8122a34788bb24c6312
SQL
homedw/Ethereum-Analytics-and-Label-Prediction
/Analytics Data/0-SQLs/Inether features SQLs/icowallets/inether.sql
UTF-8
547
3.28125
3
[]
no_license
INSERT `ethereum-262008.ethersinfo.dex` (to_address, indegree, sum_inether, avg_inether, inether_max, inether_min, std_inether) (SELECT to_address as from_address, count(*) as indegree, sum(value/1000000000000000000) as sum_inether, avg(value/1000000000000000000) as avg_inether, max(value/1000000000000000000) as...
true
2f878aa597d08cbde027a73a4409c17746ce0af0
SQL
JoaoAugusto2020/ProvaFinalWEB005
/BD - EMPRESA (HISTÓRICO DE TENTATIVAS).sql
UTF-8
1,044
4.1875
4
[]
no_license
BANCO DE DADOS - EMPRESA HISTÓRICO DE TENTATIVAS: CREATE DATABASE empresa; USE empresa; CREATE TABLE departamento ( codigo INT NOT NULL PRIMARY KEY AUTO_INCREMENT, nome VARCHAR(100) NOT NULL ); CREATE TABLE funcionario ( codigo INT NOT NULL PRIMARY KEY AUTO_INCREMENT, nome VARCHAR(100) NOT NULL, salario DECIMA...
true