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
65dfd220ead688b7400022a43a07860df4231dbf
SQL
greekbookhero/pl_sql_correct_move
/chess_correct.sql
UTF-8
7,561
3.625
4
[]
no_license
SET SERVEROUTPUT ON; CREATE OR REPLACE TYPE horizontal IS VARRAY(8) OF VARCHAR2(1); CREATE OR REPLACE TYPE GAME_TABLE_TYPE IS VARRAY(8) OF horizontal; CREATE OR REPLACE PROCEDURE PRINT_MATRIX (GAME_TABLE IN GAME_TABLE_TYPE) IS BEGIN DBMS_OUTPUT.PUT_LINE('A B C D E F G H'); for i in 1..8 loop ...
true
f08af8287ebb99f2299dc7f53e494cfd6d52595b
SQL
WackyChomp/DBMS-Social-Network
/Update.sql
UTF-8
446
2.53125
3
[]
no_license
/* 1 */ update account set bdate = null where userid ='ADMIN'; /* 2 */ update friend set fid = 'NotABot' where fid ='ADMIN'; /* 3 */ update category set categoryname = 'produce' where categoryid =1; /* 4 */ update post set title= 'Like this ' where postid= '1000000001'; /* 5 */ update advertisement set enddat...
true
f1eeefc94a510766cc53216a9cfd8f066b4e4b92
SQL
SilencedH/java
/project/youzule-service/src/main/resources/sql/blog/blog.sql
UTF-8
3,906
3.59375
4
[]
no_license
DROP DATABASE IF EXISTS `blog`; #数据库blog CREATE DATABASE `blog` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci; USE blog; #菜单表 DROP TABLE IF EXISTS menu; CREATE TABLE menu ( code INT(2) PRIMARY KEY AUTO_INCREMENT UNIQUE COMMENT '菜单编码', name VARCHAR(20) COMMENT '菜单名称', create_time DATETIME COMMENT '创建时间', crea...
true
f0efd93a03954332969cc17cde193b85259060da
SQL
MorozovAlexanderr/sql-course
/lab7/lab7.sql
UTF-8
5,961
4.125
4
[]
no_license
# 1. Вивести значення наступних колонок: назва книги, ціна, назва видавництва, формат. CREATE PROCEDURE select_books () SELECT b.Name, b.Price, p.PubName, b.Format FROM books AS b JOIN publishers AS p ON p.Id = b.PublisherId; CALL select_books() # 2. Вивести значе...
true
70071d9d7362543456cb7eb3c606b448a179b243
SQL
shmiko/MASTER_SQL
/Script 1.sql
UTF-8
3,697
4.1875
4
[]
no_license
PROCEDURE get_employee_info_by_employee_id ( p_employee_id NUMBER DEFAULT -1 ) AS -- You need to query the values you're showing into variables. The -- variables can have the same name as the column names. Oracle won't -- be confused by this, but I usually am - that's why I have the "v_" -- ...
true
0b5b304677d2ede334bb42c6837f0b9474a338c5
SQL
Dante9527-A/study
/month02/day09/t.sql
UTF-8
1,409
4.09375
4
[ "Apache-2.0" ]
permissive
select sname,caption,avg(number) from student left join class on class.cid = student.class_id left join score on student.sid = score.student_id group by sname,caption; delimiter $$ create function st() returns int begin return(select score from cls where id = 1); end $$ delimiter ; create function st2() return...
true
a09fd47c6c48eca0cba6f4094b245c311834eebb
SQL
limjun92/safe_food
/SafeFood_광주_3_선한빛_임준형_MySQL문.sql
UTF-8
1,463
3.375
3
[]
no_license
create database fooddb; use fooddb; create table food ( code int primary key, name varchar(30), maker varchar(30), material varchar(600), image varchar(50), supportpereat varchar(30), calory varchar(30), carbo varchar(30), protein varchar(30), fat varchar(30), sugar varchar(30), nat...
true
ff794ea6df70b0606f1bc6711f8f6107c87c4bb5
SQL
AmayaKavirathne/FrontendProjectProposal
/project_proposals.sql
UTF-8
2,608
3.203125
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 5.0.4 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: May 14, 2021 at 07:15 PM -- Server version: 10.4.17-MariaDB -- PHP Version: 8.0.2 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIEN...
true
3426f6c6467fdc391ab8de043b718ff1fb2d97f2
SQL
jenniwu/CoffeeShopDB
/src/cs_database.sql
UTF-8
6,184
3.640625
4
[]
no_license
-- create database CoffeshopDB_xxxx; -- go -- use CoffeshopDB_xxxx; -- go drop table track; -- cascade delete from Manager, Product and Supplier drop table upon; -- cascade delete from Transactions and Product drop table makes; -- has no dependencies drop table Transactions; --cascade delete from Customer and Employee...
true
353857c8f4802f78c2d3f003f105716939e201d1
SQL
poonamgillurkar/DallasCare
/SQL/view_REORDER_MEDS.sql
UTF-8
199
2.953125
3
[]
no_license
CREATE OR REPLACE VIEW ReorderMeds AS( SELECT medicene_code, medicene_name, quantity, date_of_expiry FROM PHARMACY WHERE Date_of_expiry <= DATE_ADD(CURDATE(), INTERVAL 1 month) OR Quantity < 1000 );
true
2bb8c08695c652712a5d86cf3a1ed2c369111c53
SQL
arthur-gamboa/database-exercises
/adlister_app.sql
UTF-8
1,517
4.75
5
[]
no_license
CREATE TABLE users ( id INT UNSIGNED NOT NULL AUTO_INCREMENT, username VARCHAR(250) NOT NULL, email VARCHAR(250) NOT NULL, password VARCHAR(250) NOT NULL, PRIMARY KEY (id) ); CREATE TABLE ads ( id INT UNSIGNED NOT NULL AUTO_INCREMENT, user_id INT UNSIGNED NOT NULL, title VARCHAR(250) NO...
true
18f34ff797fe454a5240f2dd4f5fd693915aa4b9
SQL
diegosantos17/php-banco
/scripts/queries/aula_2020_12_11_parte1.sql
UTF-8
4,053
4.0625
4
[]
no_license
SELECT -- PARTE 1: O que eu quero? veic.placa as 'Placa', veic.nome as 'Nome Veiculo', multa_tp.nome as 'Tipo da multa', multa_tp.pontos, multa_st.descricacao as 'Situação Multa', prop.nome as 'Proprietario', prop.documento as 'CPF do Proprietário', IFNULL(moto.nome, 'NDA') as 'Motorista' FROM -- PARTE 2: De ...
true
3e6fde5b30f90e734511717f8d25bbc9c2e2175b
SQL
EvasiveXkiller/notalmuni
/database/schema.sql
UTF-8
4,439
3.375
3
[ "MIT" ]
permissive
-- phpMyAdmin SQL Dump -- version 5.0.4 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1:10365 -- Generation Time: Mar 20, 2021 at 08:59 AM -- Server version: 10.4.17-MariaDB -- PHP Version: 8.0.2 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET...
true
13dece38d915c67b88b6e2f757ba1aca8b031de0
SQL
amanxp001/Protfolio
/SQL project.sql
UTF-8
2,283
4.40625
4
[]
no_license
-- delecting data that we are going to use select Location, date, total_cases, new_cases, total_deaths, population from protfolio..covid_deaths$ order by 1,2 --total cases vs total deaths select Location, date, total_cases, total_deaths, (total_deaths/total_cases)*100 as deathpercentage from protfolio..co...
true
7a21c91fb34e0bbfa26e0f20813928b6ccaa35b9
SQL
Pirgo/bazy
/31.sql
UTF-8
6,304
4.09375
4
[]
no_license
-- Dla każdego zamówienia podaj łączną liczbę zamówionych -- jednostek towaru oraz nazwę klienta. select OD.OrderID, SUM(Quantity), companyname from [Order Details] as OD inner join Orders O on OD.OrderID = O.OrderID inner join Customers C on O.CustomerID = C.CustomerID group by OD.OrderID, CompanyName -- Zmodyfikuj p...
true
e0b0536529ac3aac55259467359975b44209f375
SQL
PratibhaMastud/AddressBookDB
/RetriveAllFields.sql
UTF-8
683
3.296875
3
[]
no_license
select * from Contact select * from Address select * from ContactType SELECT contact_id,first_name,last_name,address,city,state,pincode FROM Contact INNER JOIN Address ON Contact.address_id = Address.address_id SELECT contact_id,first_name,last_name,address,city,state,pincode FROM Contact LEFT JOIN Address ON Contac...
true
46bdaf38943271e8e9625818769c3c8538620066
SQL
matheus-luiz00/Proway
/19-07-22 @ 19-07-26/ParteFinalLocadoraTSQL/SELECT LOCACAO ANO.sql
UTF-8
194
3.765625
4
[]
no_license
select YEAR(lo.DateInc) 'Ano', Count(lo.Id) 'Locacoes' from Locacao lo inner join Carros cr on lo.Carro = cr.Id where lo.Operacao = 2 group by YEAR(lo.DateInc) order by Locacoes desc
true
28bacb85ea07934b4c70dd8f036fb4e78f547091
SQL
AzarinSergey/otus_hw
/hw/indexes_11.sql
UTF-8
10,448
3.75
4
[]
no_license
--1.Создать индекс к какой-либо из таблиц вашей БД --Прислать текстом результат команды explain, в которой используется данный индекс --ЗАДАЧА: найти рейсы с максимально заполненным бизнесс классом и вывести --число занятых мест, номер рейса, города и названия аэропортов на английском from(dep)-to(arr) --ЗАПРОС: wit...
true
80bcf152ee6db8d9e9cf82d6ac528881a90e18be
SQL
vishwa-deep/php-website-
/login/database/login.sql
UTF-8
22,220
3.125
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 5.0.2 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Sep 07, 2020 at 02:02 PM -- Server version: 10.4.14-MariaDB -- PHP Version: 7.4.9 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIEN...
true
e722d482032c88ce147d790f2e00f92f45ac2958
SQL
Dagga78/Pourmiam-
/tests/db/test_db.sql
UTF-8
3,589
3.796875
4
[]
no_license
DROP TABLE IF EXISTS keyword ; CREATE TABLE keyword ( 'id' INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT UNIQUE, 'name' varchar (255) NOT NULL UNIQUE ); INSERT INTO keyword VALUES (1,'Success'); INSERT INTO keyword VALUES (2,'Technology'); DROP TABLE IF EXISTS users ; CREATE TABLE "users" ( "id" varchar PRIMARY ...
true
b7c1c257f7496721ad285be8f179247103877f0d
SQL
zzSAT2014/grammer
/grammer.sql
UTF-8
434
2.734375
3
[]
no_license
use test; drop table if exists grammer_bank; create table grammer_bank ( question_id varchar(30) not null, type1 int not null default 0, type2 int not null default 0, type3 int not null default 0, type4 int not null default 0, type5 int not null default 0, type6 int not null default 0, t...
true
ba23d80c622eb0b29b08b0e76ff8e1bfe348f829
SQL
k-mendza/pfinance
/src/main/resources/db/migration/V1.03__data.sql
UTF-8
11,525
3.171875
3
[]
no_license
-- USERS INSERT INTO app_user (first_name, last_name, email_address, creation_date) VALUES ('Developer','PFinance','devfinance@fin.com',current_date); -- TRANSACTION CATEGORY INSERT INTO transaction_category (name, description, creation_date) VALUES ('Jedzenie','Zakupy spożywcze', current_date); INSERT INTO transacti...
true
4591156bcc16ad1972bd3220d0dc426ef9b44034
SQL
pisuduo/Play-with-SQL
/Productrelated/Friend_Recommendation.sql
UTF-8
1,080
4.59375
5
[]
no_license
---Write an SQL query that makes recommendations using the pages that your friends liked. ---Assume you have two tables: a two-column table of users and their friends, ---and a two-column table of users and the pages they liked. It should not recommend pages you already like CREATE table likes ( userid int not n...
true
c6bcdf072e89d7bccfc590ecfa245b1f76e56ae0
SQL
emmanueletti/bootcampx
/4_queries/10_most-confusing-assignments.sql
UTF-8
411
4.09375
4
[]
no_license
-- List each assignment with the total number of assistance requests with it. -- Select the assignment's id, day, chapter, name and the total assistances. -- Order by total assistances in order of most to least. SELECT a.id, a.name, a.day, a.chapter, COUNT(*) AS total_requests FROM assistance_requests a_r J...
true
0352298147b934232e18e6f4c863a9a48f3a5663
SQL
ramonhentges/snmp-monitor
/backend/script-bd.sql
UTF-8
9,170
2.75
3
[]
no_license
CREATE SEQUENCE public.email_id_email_seq; CREATE TABLE public.email ( id_email INTEGER NOT NULL DEFAULT nextval('public.email_id_email_seq'), descricao VARCHAR NOT NULL, email_origem VARCHAR NOT NULL, email_destino VARCHAR NOT NULL, ...
true
4803b875e9a005d00eef0650d9a55f42b285873e
SQL
avifiqri/vermaks-pakazzam
/vermaks.sql
UTF-8
1,912
3.046875
3
[ "MIT", "LicenseRef-scancode-unknown-license-reference" ]
permissive
-- phpMyAdmin SQL Dump -- version 4.8.1 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Waktu pembuatan: 28 Bulan Mei 2020 pada 16.57 -- Versi server: 10.1.33-MariaDB -- Versi PHP: 7.2.6 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD...
true
26fd06cbe5ab3402379389494e6728d1c98137de
SQL
jephmann/worksearch
/_sql/profile.sql
UTF-8
1,950
3.3125
3
[]
no_license
DROP TABLE IF EXISTS `profile`; CREATE TABLE `profile` ( `id` int(11) NOT NULL AUTO_INCREMENT, `date_created` datetime NOT NULL, `date_updated` datetime NOT NULL, `remarks` varchar(255) COLLATE utf8_unicode_ci, `address_building` varchar(255) COLLATE utf8_unicode_ci, `address_city` varchar(255) ...
true
4245c212d7506b93f2716b643a470bec6ac98652
SQL
ReciPull/recipull.github.io
/Non-React Stuff/DatabaseTesting/getIngredientsFromRecipe.sql
UTF-8
365
3.0625
3
[ "MIT" ]
permissive
/* Rhianna So and Alexis Cole */ SELECT recipes.ingredient1, recipes.ingredient2, recipes.ingredient3, recipes.ingredient4, recipes.ingredient5, recipes.ingredient6, recipes.ingredient7, recipes.ingredient8, recipes.ingredient9, recipes.ingredient10 FROM recipes WHERE recipes.recipe_name = "recipeName"; /* where ...
true
9bdfd4cfa747f034f231401ebe2ef80a132d587d
SQL
cssat/sql_dev
/POCLabs Documentation/Query Example for Form Data.sql
UTF-8
3,996
4.28125
4
[]
no_license
/* This query finds all the Housing Survey forms for each Case and returns the County, Number of People in Household, Monthly Income, and Service Date question responses. */ /* The keys for forms and questions in this query do not correspond to actual data records. This query was written before the database existed and...
true
0e477df7676530f485ffade0b0fec02f1c8e4949
SQL
equivi/mailsy-application-controller
/target/classes/db/V1_1__create_app_registry.sql
UTF-8
470
2.546875
3
[]
no_license
DROP TABLE IF EXISTS `app_registry`; CREATE TABLE `app_registry` ( `id` bigint(20) NOT NULL AUTO_INCREMENT, `customer_name` varchar(255) DEFAULT NULL, `registry_key` varchar(255) DEFAULT NULL, `expiry_date` datetime DEFAULT NULL, `created_by` bigint(20) DEFAULT NULL, `created_datetime` datetime DEFAULT NUL...
true
d5f7a59e2a6bfacfc6188d0d9322737219295625
SQL
declan-1992/Data_Analysis_with_SQL
/calculate_churn.sql
UTF-8
849
4.25
4
[]
no_license
SELECT 1.0 * ( SELECT COUNT(*) --calculate number of customers that cancelled their subscription in January 2017 FROM subscriptions WHERE subscription_start < '2017-01-01' --ensure the customer had the subscription before January 2017 AND ( subscription_end --obtain customers who ended their subscri...
true
50968e2a3159949b71b26e0b968fc6b70fc169d6
SQL
vinhking/EmployeeDirectory
/Config/employee_directory (2).sql
UTF-8
6,545
3.21875
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.5.1 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: Jul 25, 2016 at 05:30 AM -- Server version: 10.1.13-MariaDB -- PHP Version: 7.0.6 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLI...
true
ac9862486d280c4566df0a04d3af22478db810bc
SQL
calebdenby/StoryBlend
/SQL TABLES/story_list.sql
UTF-8
1,697
2.984375
3
[ "MIT" ]
permissive
-- phpMyAdmin SQL Dump -- version 4.5.1 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: Feb 14, 2017 at 06:09 PM -- Server version: 10.1.19-MariaDB -- PHP Version: 5.5.38 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CL...
true
1b181d707085db1cf029025fc73872bdfedbf1b2
SQL
SimonJ92/ECE-Java-Project---Planning
/planning.sql
UTF-8
13,035
3.15625
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.9.2 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1:3306 -- Generation Time: Jun 06, 2020 at 08:50 PM -- Server version: 8.0.18 -- PHP Version: 7.3.12 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CH...
true
12d39c9210a60d0011f59e6dc3a2896e8a6e9ef7
SQL
TasosSisman/SQL_Exercises
/SQLQuery5.sql
UTF-8
2,731
4.375
4
[]
no_license
-- Exercise #1 select CategoryName, Description from Categories; -- Exercise #2 select ContactName, CustomerID, CompanyName from Customers where (City = 'London'); -- Exercise #3 select * from Suppliers where Fax is not null; -- Exercise #4 select CustomerID from Orders where OrderDate between '1997-1-1' a...
true
545d8f299042643446ef402b45454f72364bb6aa
SQL
TonyKartony/BI-Lab-2017
/_0. DWH/Projects/Mikita_Tur/dwso/bl_cl/cls_tables.sql
UTF-8
2,369
3.15625
3
[]
no_license
DROP TABLE CLS_COUNTRY; CREATE TABLE CLS_COUNTRY ( COUNTRY_SRCID NUMBER(8) , COUNTRY_NAME VARCHAR2 (100) NOT NULL, COUNTRY_CODE VARCHAR2 (100) NOT NULL ); CREATE TABLE CE_COUNTRY ( COUNTRY_SRCID NUMBER(8) NOT NULL primary key , COUNTRY_NAME VARCHAR2 (1...
true
9ea3130318405756e7d0794160ed31aaaadd384e
SQL
ahmdk/CS_304_LiquorStore
/insert_values.sql
UTF-8
12,914
2.703125
3
[]
no_license
-- This file will populate the tables with simple data. -- SHOULD NOT BE RUN UNTIL DROP AND CREATE HAVE BEEN RUN IN SUCCESSION insert into stores values (1,'123 Fake Street','Liquor Store 1','604-123-4567'); insert into stores values (2,'2395 Lower Avenue','Central Liquor Store','778-234-5679'); commit; insert into ...
true
1237044530479d43b55250074ce1e735371e7500
SQL
google-code/ace-armor
/dist/sql/address2012-09-09 20-29-05.sql
UTF-8
1,447
3.3125
3
[]
no_license
USE ims; CREATE TABLE `address` ( `AddressID` int(11) unsigned NOT NULL AUTO_INCREMENT, `DoorNo` varchar(45) DEFAULT NULL, `Street1` varchar(45) DEFAULT NULL, `Street2` varchar(45) DEFAULT NULL, `City` varchar(45) DEFAULT NULL, `State` varchar(45) DEFAULT NULL, `Country` varchar(45) DEFAULT NULL, `Pi...
true
c058caa0f3a81a50fedf0f790d094d3a5c128cd7
SQL
OlafMd/MedCon1.0
/mm-libs/dbaccess/Level 3/CL3_ProductCustomization/Atomic/Retrieval/SQL/cls_Get_Customizations_for_ProductID.sql
UTF-8
1,094
3.390625
3
[]
no_license
SELECT cmn_pro_cus_customizations.CMN_PRO_CUS_CustomizationID, cmn_pro_cus_customizations.InstantiatedFrom_CustomizationTemplate_RefID, cmn_pro_cus_customizations.Product_RefID, cmn_pro_cus_customizations.Customization_Name_DictID, cmn_pro_cus_customizations.Customization_Description_Dic...
true
90ed56ccebb8a54a3054f8914b8d23ac376bb164
SQL
gitter-badger/higgs
/higgs-data-meta/src/main/resources/sql/2.create_table.sql
UTF-8
2,164
3.5625
4
[ "Apache-2.0" ]
permissive
DROP TABLE IF EXISTS agent; DROP TABLE IF EXISTS agent_configuration; DROP TABLE IF EXISTS agent_threaddump; create table agent ( id bigint not null PRIMARY KEY, name varchar(80) not null, original_name VARCHAR(80) null description varchar(200) null, type tinyint null comment '1 Java, 3 Browser, 4 PHP', ap...
true
c35d90c5ab2a38fd44eff6e618f3e0575586c470
SQL
jusinche/JusFramework
/AppFramework/DataBasePackage/Framework/Administracion/pkg_adm_comun.sql
UTF-8
928
3.3125
3
[]
no_license
CREATE OR REPLACE PACKAGE PKG_ADM_COMUN AS /*Obiene la fecha del sistema*/ function fnc_obt_fecha_actual return date; /*Elimina un grupo de registro dado el nombre de la tabla y el nombre del padre id*/ procedure PRC_ELIMINAR(ec_tabla varchar2, ec_campo varchar2, en_id number ); END PKG...
true
07dda0e594f512d37fae7bfdec02f7346db01e6c
SQL
sprokushev/Delphi
/MASTER/_DATABASE/Constraints/KLS_RIGHTS_NonFK.sql
UTF-8
201
3.078125
3
[]
no_license
-- -- Non Foreign Key Constraints for Table KLS_RIGHTS -- ALTER TABLE MASTER.KLS_RIGHTS ADD ( CONSTRAINT PK_KLS_RIGHTS PRIMARY KEY (ID) USING INDEX MASTER.PK_KLS_RIGHTS ENABLE VALIDATE);
true
d2608ce07088d774600747d453d47ee04484b0ee
SQL
lupeordaz/csctoss
/tasks/7120/notes.sql
UTF-8
3,972
2.9375
3
[]
no_license
--Notes select * from radreply where attribute = 'Class' and value = '44361'; id | username | attribute | op | value | priority -------+----------------------+-----------+----+-------+---------- 77327 | 3472630942@vzw3g.com | Class | = | 44361 | 10 (1 row) select billing_entity_...
true
a09fc3f95af5b5bbb6d1fcae3739d1a7ac075075
SQL
radtek/abs3
/sql/mmfo/bars/Table/kf70.sql
WINDOWS-1251
3,770
2.953125
3
[]
no_license
PROMPT ===================================================================================== PROMPT *** Run *** ========== Scripts /Sql/BARS/Table/KF70.sql =========*** Run *** ======== PROMPT ===================================================================================== PROMPT *** ALTER_POLICY_INFO...
true
d87aabea9c8611148022f5998e4e6505e5601fee
SQL
FlarrowVerse/DBMS
/HospitalManagement/setScript.sql
UTF-8
6,680
2.9375
3
[]
no_license
-- set data for Doctor table insert into Doctor values ('D0001', 'Animesh', 'Shastri', 'Heart', 10, 9009009001); insert into Doctor values ('D0002', 'Suresh', 'Ghosh', 'ENT', 20, 9009009002); insert into Doctor values ('D0003', 'Jane', 'Doe', 'Brain', 5, 9009009003); insert into Doctor values ('D0004', 'John', 'Smith',...
true
6daed405b6fee3bccb6843951beab8f2a07db2db
SQL
princo19/sql-cursor
/cuu.sql
UTF-8
230
3.015625
3
[]
no_license
declare cursor c1 is select ename,sal from emp where deptno=&dno; begin for i in c1 loop dbms_output.put_line(i.ename || ' has salary ' || i.sal); end loop; dbms_output.put_line('total rows fetched' || c1%rowcount); end;
true
186fafb530fefadbace0dd04464c93645b289f26
SQL
BralexMtz/global-home-bd
/Scripts/s-11-tr-borrar-mensajes.sql
UTF-8
1,327
3.796875
4
[]
no_license
--@Autor: Parada Pérez Jesús Bryan, Brayan Alexis Martinez Vazquez --@Fecha creación: 3/02/2021 --@Descripción: Creacion de trigger para borrar más de un mensaje masivamente create or replace trigger tr_delete_mensajes for delete on mensaje compound trigger type mensaje_eliminar_type is record( mensaje_id mensaje.m...
true
f37d0295d19c6256128dbe559e2b0b42ed5c3e95
SQL
slowvodka/SQL---MySQL-for-Data-Analytics-and-Business-Intelligence
/procedures and functions.sql
UTF-8
1,953
4.625
5
[]
no_license
/* Create a procedure that will provide the average salary of all employees. Then, call the procedure. */ use employees; drop procedure if exists avr_salary; delimiter $$ create procedure avr_salary() begin select avg(salary) from salaries; end$$ delimiter ; call employees.avr_salary(); /* Create a procedure c...
true
6a23b0230b61accf1f8738017cbec7960b888b12
SQL
deflaux/bigquery-examples
/pgp/sql/schema-comparisons/record-sample-counts.sql
UTF-8
292
2.640625
3
[ "Apache-2.0" ]
permissive
# Confirm that we are correctly expanding reference-matching blocks into our variants. SELECT MAX(num_sample_ids) as max_samples_per_record, FROM ( SELECT COUNT(call.callset_name) WITHIN RECORD AS num_sample_ids, FROM [google.com:biggene:test.pgp_gvcf_variants_expanded2] )
true
62abaca8d49d38f4388e0ffd707e5ea5cda91207
SQL
priyadarsanmahendiran/BLOK
/Database/gblock (1).sql
UTF-8
10,808
3.046875
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 5.0.1 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Jun 05, 2020 at 11:00 AM -- Server version: 10.4.11-MariaDB -- PHP Version: 7.4.2 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD...
true
07a51bf87abc5098fcebb7cfe8596335dcd4c73a
SQL
bellmit/origin
/family_order/sql/TD_S_COMMPARA/SEL_SALEACTIVE_GOTGGCARD_NUM.sql
UTF-8
245
2.6875
3
[]
no_license
select nvl(sum(a.rsrv_str3),0) haved_num from tf_f_user_other a where a.partition_id=mod(:USER_ID,10000) and a.user_id=:USER_ID and a.rsrv_value_code='GET_GGCARD_NUM' and a.rsrv_Str1=:PRODUCT_ID and a.rsrv_Str2=:PACKAGE_ID and a.end_date>sysdate
true
3180729f67f46e4d36aed5b4ce316b12337c08ec
SQL
KPCE/lhl_midterm
/db/seeds/02_stories.sql
UTF-8
2,134
2.640625
3
[]
no_license
-- stories table seeds here INSERT INTO stories (cretor_id, story_title, story_beginning, is_complete, cover_photo_url) VALUES (1, 'This is the title of my first story', 'This is the beginning of my first story.', false, '#'); INSERT INTO stories (cretor_id, story_title, story_beginning, is_complete, cover_photo_url) V...
true
fdee0ba98f4349d9a10beabe503f33fb79783d37
SQL
Forthofferl/Jeu_de_persuasion
/schema_bdd.sql
UTF-8
5,140
3.484375
3
[]
no_license
-- -- Base de données : `persuasion_game` -- -- -------------------------------------------------------- -- -- Structure de la table `pp_arguments` -- CREATE TABLE IF NOT EXISTS `pp_arguments` ( `idArg` int(11) NOT NULL AUTO_INCREMENT, `message` varchar(255) NOT NULL, `idPartie` int(11) NOT NULL, `idJoueu...
true
22b1d2b238eb44dd524084619c1f7476aaada0f6
SQL
sqlfluff/sqlfluff
/test/fixtures/dialects/sqlite/create_index.sql
UTF-8
411
2.9375
3
[ "MIT" ]
permissive
CREATE INDEX li1 ON entries_data(id, LENGTH(chunk)); CREATE INDEX acctchng_magnitude ON account_change(acct_no, abs(amt)); CREATE INDEX t2xy ON t2(x+y); CREATE UNIQUE INDEX team_leader ON person(team_id) WHERE is_team_leader; CREATE INDEX ex1 ON tab1(a,b) WHERE a=5 OR b=6; CREATE INDEX po_parent ON purchaseorder(p...
true
997768ee5cbb280ca2df2d691f95f1c42f18c811
SQL
Ibarra11/codewars
/kata6/tableTotal.sql
UTF-8
434
3.71875
4
[]
no_license
-- Codewars LInk: https://www.codewars.com/kata/sql-basics-simple-table-totaling/sql -- Challenge: create a querty to display each unique clan with their total points and ranked by theri total points SELECT ROW_NUMBER() OVER() AS "rank", * FROM( SELECT CASE WHEN clan = '' THEN '[no clan specified]' else clan END, S...
true
26e5004f702f3c76a131a6cb56ab4ee4ab21b806
SQL
vkscorpio3/atg_training
/workspace/modules/ClothingStore/build/atgsql/DCS/Versioned/sql/db_components/oracle/versioned_promotion_ddl.sql
UTF-8
8,024
2.8125
3
[]
no_license
-- @version $Id: //product/DCS/version/11.2/templates/DCS/sql/promotion_ddl.xml#2 $$Change: 1179550 $ -- Add the DCS_PRM_FOLDER table, promotionFolder create table dcs_prm_folder ( asset_version number(19) not null, workspace_id varchar2(40) not null, branch_id varchar2(40) not null, is_head number(1) not null...
true
f55c9ddc07eb09af3a7c01fb514f2720b4180d23
SQL
sv9rxw/FreqMngr
/FreqMngr.WPF/TableGroupsTreeHierarchy.sql
UTF-8
1,346
3.96875
4
[]
no_license
UPDATE TableGroups SET depth = 0 WHERE parentId IS NULL; WHILE EXISTS (SELECT * FROM TableGroups WHERE Depth IS NULL) UPDATE T SET T.Depth = P.Depth + 1 FROM TableGroups AS T INNER JOIN TableGroups AS P ON (T.ParentId = P.Id) WHERE P.Depth >= 0 AND T.Depth IS NULL; UPDATE TableGroups SET Path...
true
22091afebf3025178279528a1a6fd022f967e1f4
SQL
Vershal-Igor/REST-task
/src/main/resources/schema.sql
UTF-8
2,993
3.109375
3
[]
no_license
-- MySQL Script generated by MySQL Workbench -- Tue Dec 22 00:37:08 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='TR...
true
c0764b113e84e88a1e74e77ca5d7f062a20e40e9
SQL
ilpython/oracle19c-labs
/solutions/Access_Paths/create_cust_year_of_birth_index.sql
UTF-8
118
2.59375
3
[]
no_license
set echo on CREATE INDEX cust_cust_year_of_birth_idx ON customers(cust_year_of_birth) NOLOGGING COMPUTE STATISTICS;
true
223d9cf1b147b79d2e52344c992dbd300345095a
SQL
miths1108/PiGen
/codd-data-gen/resources/cdgclient/postgresOld/sqlqueriesProj/q124.sql
UTF-8
302
2.90625
3
[]
no_license
select distinct(i_brand_id,i_class_id,i_category_id) from web_sales ,item ,date_dim where ws_item_sk = i_item_sk and ws_sold_date_sk = d_date_sk and d_year = 2000+2 and d_moy = 11 ; -- end query 69 in stream 0 using template query14.tpl
true
09fc0b2101bf8bcb74fdaf8b75aae5dad4e31e6a
SQL
green-fox-academy/gosireka
/week-09/day-2/todo.sql
UTF-8
557
3.5625
4
[]
no_license
CREATE DATABASE todo; CREATE TABLE todos( id INTEGER NOT NULL AUTO_INCREMENT PRIMARY KEY, title VARCHAR(200) NOT NULL, done BOOLEAN NULL ); ALTER TABLE todos MODIFY COLUMN done BOOLEAN DEFAULT 0; INSERT INTO todos VALUES (1, 'shopping', false); INSERT INTO todos (title, done) VALUES ('cooking', false); VALUES...
true
7d9debce3db43af9b99fd84567806a5922cbfe90
SQL
dpi209/CSB7.0
/csb/csb-installer/tables/1_sessions.sql
UTF-8
413
2.515625
3
[ "Apache-2.0", "LicenseRef-scancode-warranty-disclaimer" ]
permissive
CREATE TABLE `sessions` ( `id` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `user_id` int(11) DEFAULT NULL, `ip_address` varchar(45) COLLATE utf8_unicode_ci DEFAULT NULL, `user_agent` text COLLATE utf8_unicode_ci, `payload` text COLLATE utf8_unicode_ci NOT NULL, `last_activity` int(11) NOT NULL, UNIQUE ...
true
dfcf0155e8a90526b8f49df1e3d7976e415108ca
SQL
x2p/x2p_api
/api/resources/sql/get_ora_freespace.sql
UTF-8
789
3.734375
4
[]
no_license
-- Get space usage for each datafiles connect / as sysdba set serveroutput on set pagesize 1000 set linesize 255 set feedback off select substr(df.tablespace_name,1,20) "Tablespace Name", substr(df.file_name,1,40) "File Name", round(df.bytes/1024/1024,2) "Size (M)", round(e.used_bytes/1024/1024,2) "Used (M)", round(f...
true
e0118807d0a071b94bd5412960b2ad961707a297
SQL
robert-virtual/EbayApp
/EbayApp/DataAccess/dbscript.sql
UTF-8
2,150
3.65625
4
[]
no_license
-- dapper - mini orm - realiza las consultas create DATABASE ebaydb use ebaydb create table Categories( CategoryId int PRIMARY KEY IDENTITY, Name NVARCHAR(25) ) create table Products( ProductId int PRIMARY KEY IDENTITY, Name NVARCHAR(25), Price money, CategoryFk int FOREIGN KEY REFERENCES C...
true
7263ed8f28e4726efc4df52330e2d4db7c3b7fd5
SQL
apexcollege/dotnet2018
/ecommerce/ecommerce.data/db scripts/Student.sql
UTF-8
162
2.515625
3
[ "MIT" ]
permissive
 CREATE TABLE Student ( Id INT PRIMARY KEY IDENTITY(1,1) NOT NULL, Name NVARCHAR(MAX), RollNo INT, Grade NVARCHAR(50), EnrolDate DATE, Active BIT )
true
c3a92846af1b93f27a9178033ecdb16dfd25e51a
SQL
harabbi/MBK
/scripts/create_vm_merged_products.sql
UTF-8
1,784
2.625
3
[]
no_license
create database if not exists vm_merged; create table if not exists vm_merged_products ( `v_productprice` double, `v_listprice` double, `v_categoryid` bigint, `v_categoryids` text, `v_productcode` text, `v_productname` text, `v_saleprice` double, `v_productweight` double, `v_productmanufacturer` text, `v_...
true
54a36221dc98f30887bdceaf37894895df4ee71d
SQL
LilyAsk/LilyAsk
/LilyAsk/sys/db/comment_info.sql
UTF-8
899
2.71875
3
[]
no_license
/* Navicat MySQL Data Transfer Source Server : Hiki Source Server Version : 50633 Source Host : localhost:3306 Source Database : lilyask Target Server Type : MYSQL Target Server Version : 50633 File Encoding : 65001 Date: 2016-10-23 09:22:59 */ SET FOREIGN_KEY_CHECKS=0; -- ------...
true
13aa64ce74a761673ceaa2da3abb534c3d62acce
SQL
BillyHao/Azure_DataEngineer
/SQLQuery #Q13.sql
UTF-8
990
3.890625
4
[]
no_license
USE WideWorldImporters SELECT a.StockGroupName, total_purchase, total_sale, (total_purchase-total_sale) AS Remaining FROM (SELECT StockGroupName,sg.StockGroupID,SUM(ws.QuantityPerOuter * po.OrderedOuters) AS total_purchase FROM Warehouse.StockItems AS ws JOIN Purchasing.PurchaseOrderLines AS po ON ws.Sto...
true
3287c5605bae2efdc6cefaf5f39b88a209d14eb2
SQL
ayesh99747/SSWD-Codesprint
/codesprint.sql
UTF-8
6,446
3.203125
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.8.5 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Apr 10, 2020 at 09:18 AM -- Server version: 10.1.38-MariaDB -- 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...
true
cea202223925cc8dc475abd0fbe8c3e6c2d5658d
SQL
sarahneuburger/java_logica
/Banco de Dados/aula01_exercicio4.sql
UTF-8
3,051
4.25
4
[]
no_license
# 1 - Criar uma base de dados CREATE DATABASE exercicio04; # 2 - Selecionar a base de dados criada anteriormente USE exercicio04; # 3 - Cria uma tabela CREATE TABLE cursos( codigo INT PRIMARY KEY AUTO_INCREMENT, curso VARCHAR(30), valor DOUBLE, area VARCHAR(30), dificuldade INT ); # 4 - Cadastrar os...
true
30ce1ba8bc7c12f634e21dfc4a2896aa4c0645b4
SQL
prasanth260295/mysql
/coresoft-product-database/src/main/resources/oracle/4.3.0-13/Loans_Add_Collections_History_3.sql
UTF-8
1,511
3.28125
3
[]
no_license
--creating table display all transactions in collection history screen. CREATE TABLE COLLECTION_MASTER_HISTORY ( COLLECTION_MASTER_HISTORY_ID NUMBER(15,5) NOT NULL ENABLE, ACCOUNT_NO VARCHAR2(20), DATE_POSTED DATE, TIME_POSTED VARCHAR2(20), NAME VARCHAR2(20), HISTORY_TYPE NUMBER(5), ...
true
0580347b0e82858ac2ca245604a2e9ed57ba5167
SQL
barcern/cfg-sql
/project/spare.sql
UTF-8
1,313
3.953125
4
[]
no_license
# wrong SELECT COUNT(g.fk_goal_assist_player1), COUNT(g.fk_goal_assist_player2), #(SELECT COUNT(fk_goal_assist_player1) FROM goals GROUP BY fk_goal_assist_player1), #(SELECT COUNT(g.fk_goal_assist_player2) FROM goals g GROUP BY g.fk_goal_assist_player2), (SELECT COUNT(g.fk_goal_assist_player1) FROM g...
true
3eb692e824ee1a0383c9d22500f6ce0b6b0cd944
SQL
p-dim-popov/NVNA-Databases
/Database-Basics/KR1/1-TABLES-CREATION.sql
UTF-8
1,515
3.75
4
[]
no_license
-- DROP TABLES IF EXIST -- DROP TABLE ORDER_DETAILS; DROP TABLE ORDERS; DROP TABLE CLIENTS; DROP TABLE PRODUCTS; DROP TABLE PROD_CATEGORIES; -------------------------- CREATE TABLE PROD_CATEGORIES ( CAT_ID NUMBER, CAT_DESCR VARCHAR2(30) NOT NULL, CONSTRAINT PK_PRODCAT_CID PRIMARY KEY (CAT_ID) ); ...
true
ba1758d92d3cfe4196c599d30e31635f33d04661
SQL
Olave/bigdata
/hive/dw/dwd_log.sql
UTF-8
6,043
3.265625
3
[]
no_license
drop table if exists dwd_start_log; create external table dwd_start_log ( `area_code` string comment '地区编码', `brand` string comment '手机品牌', `channel` string comment '渠道', `model` string comment '手机型号', `mid_id` string comment '设备id', `os` s...
true
2e9f4ec073f6b699869f7c7be7b38ca4992e2529
SQL
200921-USF-ROCP1/Swovick_code
/SQLscripts/HackerRankProblems.sql
UTF-8
1,260
4.21875
4
[]
no_license
create table students ( id serial primary key, name varchar(20) ); create table friends( id serial primary key, friend_id integer ); create table packages( id serial primary key, salary numeric (7, 2) ); insert into students (name) values ('Ashley'), ('Samantha'), ('Julia'), ('Scarlet'); insert into friends ...
true
6b2ea0ba2cd5c2d57c59d2f826670510a242c437
SQL
Jasonc8901/Earnings-Bot
/flaskr/schema.sql
UTF-8
556
3.421875
3
[]
no_license
DROP TABLE IF EXISTS Company; DROP TABLE IF EXISTS EarningsDate; CREATE TABLE Company ( id INTEGER PRIMARY KEY AUTOINCREMENT, created TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, name TEXT NOT NULL, body TEXT NOT NULL, FOREIGN KEY (author_id) REFERENCES user (id) ); CREATE TABLE EarningsDate ( id INTEGER...
true
02958a5007406a1a702d6ebae7c07d4e8e4c02a7
SQL
kjhoon1994/kjh
/03.JDBC/20190408_jdbc/src/jdbc003/rlawogns.sql
UTF-8
530
2.96875
3
[]
no_license
-- id_, age, first_, last_ CREATE TABLE employees( id_ NUMBER ,age NUMBER ,first_ VARCHAR(20) ,last_ VARCHAR(20) ); INSERT INTO Employees(id_, age, first_, last_) VALUES (100, 18, 'Zara', 'Ali'); INSERT INTO Employees(id_, age, first_, last_) VALUES (101, 25, 'Mahnaz', 'Fatma'); INSERT INTO Employe...
true
997876d34571478ec0e6d7e4211a9b13f93a9ef2
SQL
shalimski/ClickHouseTools
/CH-Databases-Info/Секции таблиц.sql
UTF-8
988
2.625
3
[ "MIT" ]
permissive
-- https://clickhouse.tech/docs/en/operations/system-tables/parts/ select partition, name, part_type, active, marks, rows, bytes_on_disk, data_compressed_bytes, data_uncompressed_bytes, marks_bytes, modification_time, remove_time, ...
true
be0bf6b99b8ff29939925e3d2151db7c4d6cd44c
SQL
fabiomigliorini/MGdb
/SQLs/Estoque - Transferencia Circular.sql
UTF-8
1,539
3.671875
4
[]
no_license
select --distinct orig.codestoquemes , dest.codestoquemes , orig.saidaquantidade , dest.entradaquantidade , dest.codestoquemovimento , orig.codestoquemovimento , torig.sigla , tdest.sigla --'wget http://localhost/MGLara/estoque/calcula-custo-medio/' || cast(dest.codestoquemes as varchar) as comando --, ori...
true
40579989ceb60e35a61a99234dfb0b6416a33bb0
SQL
LakeLove/catch-em-all-sql-edition-LakeLove
/answers/part3question4.sql
UTF-8
167
3.609375
4
[]
no_license
# How many pokemon have a secondary type `Poison` SELECT COUNT(pokemons.id) FROM pokemons JOIN types ON pokemons.secondary_type = types.id WHERE types.name = "Poison";
true
3f63e2acc34c51862653e729500c625be2d068b1
SQL
WilliamRolim/SQL
/Banco de Dados Cruzeiro/11ExibindoDados_JOINS_EXERCICIOS.sql
UTF-8
10,861
4.03125
4
[]
no_license
CREATE DATABASE banco; USE banco; CREATE TABLE agencia (/*Terceira tabela a ser criada por ter FK porém a tabela estado já foi criada*/ id_banco INT, id_agencia INT, nm_agencia VARCHAR(10) NOT NULL, nr_digito_agencia INT NOT NULL, nr_endereco VARCHAR (15) NOT NULL, id_cep CHAR(8) NOT NULL, CONSTRAINT Agencia_idbanco_...
true
03e386ca5395b70dccce52f6c4315e9e47862fa3
SQL
lilith-schwarz/php11MP1
/sql/produkte.sql
UTF-8
7,045
3.171875
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.5.2 -- http://www.phpmyadmin.net -- -- Host: localhost -- Erstellungszeit: 05. Mrz 2017 um 16:38 -- Server-Version: 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_CLIEN...
true
2a53ad0c72f6d566461d48c9686ba463dc1aa072
SQL
pataga/SAS
/sql/updates/already_applied/2013_04_23_sas_user_permission.sql
UTF-8
1,359
2.765625
3
[ "Apache-2.0" ]
permissive
DROP TABLE IF EXISTS `sas_user_permission`; CREATE TABLE `sas_user_permission` ( `pid` int(11) unsigned NOT NULL, `sid` int(11) unsigned NOT NULL, `uid` int(11) unsigned NOT NULL, `bitmask` bigint(20) NOT NULL, PRIMARY KEY (`pid`,`sid`,`uid`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- KONFIGURATION ...
true
84a3c6b14c0d0918503e9b2c1c415e644e757a34
SQL
paragasa/GradAPP-Relational-Database
/SQLproj.sql
UTF-8
7,192
3.0625
3
[]
no_license
--Dropping all tables DROP TABLE IF EXISTS ETH_LINKING; DROP TABLE IF EXISTS ETHNICITY; DROP TABLE IF EXISTS PERSONAL_INFO; DROP TABLE IF EXISTS MILITARY_BRANCH; DROP TABLE IF EXISTS STATE; DROP TABLE IF EXISTS VET_STAT; DROP TABLE IF EXISTS GENDER; DROP TABLE IF EXISTS PERSONAL_INFO; DROP TABLE IF EXISTS BK_G...
true
bcc1d2766ad61dd4618c0c608f02466987c81c55
SQL
felipealvescosta/escola
/tb_livro.sql
UTF-8
1,532
2.96875
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.2.7.1 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: 24-Out-2014 às 02:42 -- Versão do servidor: 5.6.20 -- PHP Version: 5.5.15 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */...
true
05385851779af40c0ceee32a434079026e12bd9d
SQL
AimeeStudio/aimeewmt
/Full/Install/aimee.sql
UTF-8
7,303
2.796875
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 2.11.9.2 -- http://www.phpmyadmin.net -- -- 主机: 127.0.0.1:3306 -- 生成日期: 2012 年 07 月 04 日 02:24 -- 服务器版本: 5.1.28 -- PHP 版本: 5.2.6 SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTE...
true
794a6ef39f6a91f365e791ffc5f8e905b0ce90a6
SQL
groovytron/jee-todolist
/DB/DB.sql
UTF-8
6,613
2.765625
3
[]
no_license
-- MySQL dump 10.13 Distrib 5.7.12, for Win64 (x86_64) -- -- Host: 127.0.0.1 Database: todolist -- ------------------------------------------------------ -- Server version 5.7.16-log CREATE DATABASE IF NOT EXISTS todolist ; USE todolist; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 ...
true
ab33e006c2037849b30facb4f8917ccc94792874
SQL
svn2github/openbiz-cubi
/cubi/modules/sms/mod.install.sql
UTF-8
4,339
3.125
3
[ "BSD-3-Clause" ]
permissive
DROP TABLE IF EXISTS `sms_log`; CREATE TABLE IF NOT EXISTS `sms_log` ( `id` int(11) NOT NULL AUTO_INCREMENT, `provider_id` int(11) NOT NULL, `mobile` varchar(11) NOT NULL, `content` longtext NOT NULL, `schedule` datetime NOT NULL, `sent_time` datetime DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=MyISAM DEF...
true
a2475b0d5fc1bdfc69c5a542a7288d42bf51ca9c
SQL
MaximOkulin/EnergyTechAudit.PowerAccounting
/EnergyTechAudit.PowerAccounting.Database/Admin/Admin.User_InstedOfUpdate.sql
UTF-8
1,356
3.4375
3
[]
no_license
CREATE TRIGGER [Admin].[User_InstedOf_Update] ON [Admin].[User] INSTEAD OF UPDATE NOT FOR REPLICATION AS BEGIN IF NOT EXISTS (SELECT * FROM inserted) BEGIN RETURN; END OPEN SYMMETRIC KEY [EnergyTechAudit.PowerAccounting.Database.SymmetricKey] DECRYPTION BY CERTIFICATE [EnergyTechAudit.PowerAc...
true
af637c530311056140cd6d299a7a42e7ff35e01b
SQL
kamehamehaWangzi/zabbix
/Aphrodite/src/main/resources/conf/sql/create_tables.sql
UTF-8
4,988
3.65625
4
[ "Apache-2.0" ]
permissive
DROP TABLE IF EXISTS `monitordata`; CREATE TABLE `monitordata` ( `Id` int(11) NOT NULL AUTO_INCREMENT, `taskdataid` int(10) NOT NULL DEFAULT '0' COMMENT '外键,对应时间段任务的id', `hostid` varchar(20) NOT NULL DEFAULT '' COMMENT '对应主机ID', `monitorType` varchar(10) NOT NULL DEFAULT '0' COMMENT '1-cpu; 2-disk; 3-net; 4-mem...
true
cd840671e2316ba2eec8f34d7fd76b1099f79e30
SQL
kivitendo/kivitendo-erp
/sql/Pg-upgrade2-auth/password_hashing.sql
UTF-8
254
2.671875
3
[]
no_license
-- @tag: password_hashing -- @description: Explicitely set a password hashing algorithm -- @depends: UPDATE auth."user" SET password = '{CRYPT}' || password WHERE NOT (password IS NULL) AND (password <> '') AND NOT (password LIKE '{%}%');
true
c44faea765e6346bf8fdcb62aca5e8b6a33efb40
SQL
Bayuncat/product-star_Spring
/spring-jdbc/src/test/resources/contact.sql
UTF-8
423
2.5625
3
[]
no_license
DROP TABLE IF EXISTS CONTACT; CREATE TABLE CONTACT ( ID serial primary key , NAME varchar(255), SURNAME varchar(255), EMAIL varchar (255), PHONE_NUMBER varchar (255) ); INSERT INTO CONTACT(ID, NAME, SURNAME, EMAIL, PHONE_NUMBER) VALUES (1000, 'Ivan', 'Ivanov', 'iivanov@gmail.com', '1234567'); INS...
true
3d06ba34ef0f6ac21d2fe8701c2c924e3fc30b56
SQL
jakegold/software_project
/sql/insert.sql
UTF-8
1,020
3
3
[]
no_license
--Part B insert into person(uname, password, fname, lname) values ('AA', md5('AA'), 'Ann', 'Anderson'), ('BB', md5('BB'), 'Bob', 'Baker'), ('CC', md5('CC'), 'Cathy', 'Chang'), ('DD', md5('DD'), 'David', 'Davidson'), ('EE', md5('EE'), 'Ellen', 'Ellenberg'), ('FF', md5('FF'), 'Fred', 'Fox'), ('GG', md5('GG'), 'Gina', '...
true
5438555a244c93285aec4a135e82b43890e0c461
SQL
ml31k/compara
/lib/compara70/ensembl/modules/t/test-genome-DBs/homo_sapiens/core/unmapped_object.sql
UTF-8
2,162
3.125
3
[ "BSD-2-Clause" ]
permissive
-- MySQL dump 10.13 Distrib 5.1.61, for redhat-linux-gnu (x86_64) -- -- Host: mysql-eg-devel-1.ebi.ac.uk Database: homo_sapiens_core_test_db -- ------------------------------------------------------ -- Server version 5.1.49-log /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHA...
true
ec2ade10bb3feb1708970f1337fec2677c39a876
SQL
arthima/bank-project
/CONSTRAINTS.SQL
UTF-8
595
2.96875
3
[]
no_license
CONSTRAINTS --To assign a primary key to the BANK_CUST table ALTER TABLE BANK_CUST ADD CONSTRAINT PK_CUST_ID PRIMARY KEY (CUST_ID); --To assign a foreign key to the BANK_CUST_CONTACT table ALTER TABLE BANK_CUST_CONTACT ADD CONSTRAINT FK_CUST_ID FO...
true
053ab3165c5f1232be530ad8baad512523b1e478
SQL
silence-do-good/stress-test-Postgres-and-MySQL
/dump/high/day22/select0407.sql
UTF-8
177
2.59375
3
[]
no_license
SELECT timeStamp, temperature FROM ThermometerOBSERVATION o WHERE timestamp>'2017-11-21T04:07:00Z' AND timestamp<'2017-11-22T04:07:00Z' AND temperature>=9 AND temperature<=81
true
d2e0b9e1e3110d7157ba86163054385831f4938b
SQL
krsunyoung/sql
/select-basic/NVL.sql
UTF-8
834
3.640625
4
[]
no_license
--nvl (null 관련 함수) select nvl(null,0) from dual; select nvl(1,0) from dual; select employee_id, nvl(commission_pct, 0), nvl(commission_pct, 0)*salary from employees; select nvl2(null, 10, 0) from dual; select employee_id, nvl2(commission_pct,commission_pct*salary, 0) from employees; select employee_id,...
true
2092884771fc1c36b8e6433798c668ec7ddc49b5
SQL
jump8621/sql-data_engineering
/employeeSQL/q4.sql
UTF-8
358
3.953125
4
[]
no_license
-- List the department of each employee with the following information: employee number, last name, first name, and department name. --emp #, last_name, first_name, dept_name SELECT e.emp_no, e.last_name, e.first_name, d.dept_name FROM dept_emp AS de INNER JOIN departments AS d on d.dept_no = de.dept_no INNER JOIN em...
true
e92045fa801f29c03bcfd063edd5dd0d02dac6cd
SQL
mirko2020/STUP_002_IP_Materijali
/baza_podataka/001.studiranje.ip.projektni.korisnici.hronologije-test.001.sql
UTF-8
400
2.609375
3
[]
no_license
use studiranje; insert into st_user(st_username, st_firstname, st_secondname, st_email_address) values('marko', 'Marko', 'Markovic', 'marko@mtel.com'); update st_user set st_password_hash = 'PASSWORD' WHERE st_username = 'marko'; update st_user set st_username = 'janko' WHERE st_username = 'marko'; delete from...
true
91b09d0cebeed0494ee1a7b6b02db3d0b05e3ea0
SQL
yenny07/course_DBP
/WebContent/SQL/function.sql
UTF-8
576
3.234375
3
[]
no_license
CREATE OR REPLACE FUNCTION Date2EnrollSemester(dDate IN DATE) RETURN NUMBER IS month NUMBER := TO_NUMBER(TO_CHAR(dDate, 'MM')); semester NUMBER := 0; BEGIN IF month <= 2 THEN semester := 1; ELSIF month <=8 THEN semester := 2; ELSE semester := 1; END IF; RETURN semester; END; / CREATE OR REPLACE FUNCTION ...
true