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
fcb4f7cec67a52b793995197c6324b1e9bace334
SQL
ci2backend/ci2backend
/database/base-database.sql
UTF-8
48,376
3.046875
3
[ "MIT" ]
permissive
-- phpMyAdmin SQL Dump -- version 4.5.2 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: Jun 13, 2017 at 08:17 AM -- Server version: 5.7.9 -- PHP Version: 5.6.16 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; SET FOREIGN_KEY_CHECKS = 0; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=...
true
e72da057c1d6248417c8ace1a4962a051ce70b79
SQL
vndn5419/fromnow
/target/classes/cryptokick.sql
UTF-8
6,447
3.265625
3
[]
no_license
/* Drop Tables */ DROP TABLE favorites CASCADE CONSTRAINTS; DROP TABLE coupon CASCADE CONSTRAINTS; DROP TABLE rereply CASCADE CONSTRAINTS; DROP TABLE reply CASCADE CONSTRAINTS; DROP TABLE sale CASCADE CONSTRAINTS; DROP TABLE shipping CASCADE CONSTRAINTS; DROP TABLE viewer CASCADE CONSTRAINTS; DROP TABLE project CASCA...
true
61367f36385ab8a8c97f91e9db81b56fc2ccb9a9
SQL
Kunalgoel123/projectgladiator
/FinalVehicleLoanQuery (1).sql
UTF-8
2,990
3
3
[]
no_license
create table ApplicantDetails(user_id int identity(1001,1) primary key,f_name varchar(20),m_name varchar(20),l_Name varchar(20), DOB Date,gender varchar(10),mob varchar(20), email varchar(40),applicant_address_line1 varchar(100),applicant_address_line2 varchar(100), res_state varchar(40), city varchar(40),pincode varc...
true
e0707d06233e42a14e1b29788971cdc021ffbbd7
SQL
SilviaNobrega/AdventureWorksTest
/AdventureWorksTest/HumanResources/Tables/EmployeePayHistory.sql
UTF-8
828
3.453125
3
[]
no_license
CREATE TABLE [HumanResources].[EmployeePayHistory] ( [BusinessEntityID] INT NOT NULL, [RateChangeDate] DATETIME NOT NULL, [Rate] MONEY NOT NULL, [PayFrequency] TINYINT NOT NULL, [ModifiedDate] DATETIME CONSTRAINT [DF_EmployeePayHistory_ModifiedDate] DEFAULT (getdate()...
true
c793d412edf7072c912df4d5c5bcb66b130af4fc
SQL
Creen/spring-example
/src/main/resources/init-ddl.sql
UTF-8
429
3.515625
4
[]
no_license
-- DDL CREATE TABLE IF NOT EXISTS stormtrooper ( stormtrooper_id BIGSERIAL PRIMARY KEY, stormtrooper_name VARCHAR(255), stormtrooper_age INT ); CREATE TABLE IF NOT EXISTS weapon ( weapon_id BIGSERIAL PRIMARY KEY, weapon_name VARCHAR (255), stormtrooper_id INT, CONSTRAINT fk_stormtrooper FOREIGN KEY (stormtroop...
true
0ff324b481970c78073eeec4113f3311584259eb
SQL
DemiFr/SD202
/SQL TP2/tpSQL2_2.sql
UTF-8
3,505
3.90625
4
[]
no_license
/* DECLARE x NUMBER := 1; BEGIN WHILE x < 100 LOOP DELETE FROM ACHATS WHERE nv=x; x := x + 2; END LOOP; END; / BEGIN FOR i IN 1..100 LOOP IF MOD(i,2) = 0 THEN -- i est pair UPDATE ACHATS SET QTE=QTE*2 WHERE nv=i; ELSE UPDATE ACHATS SET QTE=QTE/2 WHERE nv=i; ...
true
45b32886e385b1543c03bcdab4179107265aad55
SQL
stormning/wform
/src/main/resources/sql/wform-hsqldb.sql
UTF-8
4,426
3.125
3
[ "Apache-2.0" ]
permissive
CREATE TABLE T_FORM_FIELD ( FIELD_ID VARCHAR(32) PRIMARY KEY, MODULE_ID VARCHAR(32), NAME VARCHAR(64), DISPLAY VARCHAR(64), TYPE VARCHAR(63), SIZE INTEGER, LAST_UPDATE_DATE TIMESTAMP, CREATE_TIME TIMESTAMP DEFAULT NOW(), STATUS INTEGER ); CREATE TABLE T_FORM_FIELD_ATTRIBUTE ( PAGE_ID VARCHAR(32)...
true
e0e43b67ddcc8f9797b58a6ed0167d57a0facc27
SQL
firatcell/dataV3_Lesson_2.6_lab
/SQL_Queries_2.6.sql
UTF-8
1,846
4.625
5
[]
no_license
USE sakila; /* In the table actor, which are the actors whose last names are not repeated? For example if you would sort the data in the table actor by last_name, you would see that there is Christian Arkoyd, Kirsten Arkoyd, and Debbie Arkoyd. These three actors have the same last name. So we do not want to include t...
true
841efcfb811c7d4c6491f345e6d25a361efe632b
SQL
rs2247/pricing_fork
/src/pricing/operations/alternative_formulas/qap_subsidy.sql
UTF-8
422
2.53125
3
[]
no_license
case when university_id in ({fixed_99}) THEN 99.0 else case when level_id = 1 then case when {min_qap_1} > original_value*(1-{level_1_subsidy}) then {min_qap_1} else original_value*(1-{level_1_subsidy}) end else case when {min_qap_7_lowest} > (original_value - (0.4 * offered_price)) t...
true
358a2bbc9b0a31d3d936ac2ce0e18363c186146c
SQL
BrotherhoodCreed/sso
/sso-front/src/main/resources/create/tb_promotion_base_info.sql
UTF-8
2,407
3.234375
3
[]
no_license
/* Navicat Premium Data Transfer Source Server : 本地mysql Source Server Type : MySQL Source Server Version : 80022 Source Host : localhost:3306 Source Schema : test Target Server Type : MySQL Target Server Version : 80022 File Encoding : 65001 Date: 18/02/2021 17:40:0...
true
5f5e0d2752e947e6949a57f93ee69a0cd4a61562
SQL
LifestreamVII/ff7php
/ff7php.sql
UTF-8
4,118
3.375
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 5.0.3 -- https://www.phpmyadmin.net/ -- -- Hôte : 127.0.0.1 -- Généré le : jeu. 04 mars 2021 à 01:22 -- Version du serveur : 10.4.14-MariaDB -- Version de PHP : 7.4.11 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_S...
true
7ffb6c2e50c7e92a2c7e28bb4b900af5a155a8b5
SQL
zoltanec/optmgn
/dcms/sql/structure.sql
UTF-8
1,281
2.578125
3
[]
no_license
DROP TABLE IF EXISTS mmg_comments_meta; CREATE TABLE mmg_comments_meta (object_hash CHAR(32) NOT NULL DEFAULT '',/*идентификатор*/ object_id CHAR(60) NOT NULL DEFAULT '',/*путь к объекту*/ first INT UNSIGNED NOT NULL DEFAULT 0,/*первый комментарий*/ ...
true
a35c9927286f5e6a43ee800fb628ca5fa851d218
SQL
palladiumkenya/openmrs-module-kenyaemrupgradehelper
/api/src/main/resources/SQLQueries/fill_orderer_and_order_encounter.sql
UTF-8
4,051
3.703125
4
[]
no_license
DELIMITER $$ DROP PROCEDURE IF EXISTS sp_process_drug_orders$$ CREATE PROCEDURE sp_process_drug_orders(IN providerName VARCHAR(100)) BEGIN DECLARE no_more_rows BOOLEAN; DECLARE record_uuid VARCHAR(100); DECLARE v_row_count INT(11); DECLARE userID INT(11); DECLARE encounterTypeID INT(11); DECLARE formID INT...
true
a35a2ecd828d3cf03ee4c0cc056a51b85836eb07
SQL
silence-do-good/stress-test-Postgres-and-MySQL
/dump/high/day22/select0902.sql
UTF-8
266
2.828125
3
[]
no_license
SELECT sen.name FROM SENSOR sen, SENSOR_TYPE st, COVERAGE_INFRASTRUCTURE ci WHERE sen.SENSOR_TYPE_ID=st.id AND st.name='WiFiAP' AND sen.id=ci.SENSOR_ID AND ci.INFRASTRUCTURE_ID=ANY(array['4002','6028','5224','5214','2059','5086','5100_3','2100_1','1412','4088'])
true
693d376f9814a9000cd0c054b09efb2cc05e3a17
SQL
crst/kmeans-sql
/monitor.sql
UTF-8
378
3.75
4
[ "MIT" ]
permissive
SELECT cc.cluster_id, count(*) AS num_points, avg(sqrt(((p.x1 - cc.x1)^2 * (p.x2 - cc.x2)^2))) AS avg_distance_to_center FROM kmeans_demo.clusters c JOIN kmeans_demo.points p USING (point_id) JOIN kmeans_demo.cluster_centers cc USING (cluster_id) WHERE cc.iteration = (SELECT max(iteration) FROM kmeans_demo.cluste...
true
ab255586c3be02933ee2d7fe28117ca09c80c1a0
SQL
lucaskawasaki/spring-angular-algaworks-heroku
/src/main/resources/db/migration/V02__criar_e_registrar_pessoas.sql
UTF-8
2,006
3.265625
3
[]
no_license
CREATE TABLE pessoa( ID BIGINT(20) PRIMARY KEY AUTO_INCREMENT, nome VARCHAR(50) NOT NULL, ativo BOOLEAN NOT NULL, logradouro VARCHAR(100), numero VARCHAR(10), complemento VARCHAR(100), bairro VARCHAR(100), cep VARCHAR(10), cidade VARCHAR(100), estado VARCHAR(2) )ENGINE=InnoDB DEFAULT CHARSET=utf8; INSERT INT...
true
b3df05ce355436b49108e6715c69560eefb54f0b
SQL
lgcarrier/AFW
/5.2.3/Database/Constraints/AFW_13_RESRC_FK4.sql
UTF-8
190
2.65625
3
[ "MIT" ]
permissive
SET DEFINE OFF; ALTER TABLE AFW_13_RESRC ADD ( CONSTRAINT AFW_13_RESRC_FK4 FOREIGN KEY (REF_DOSR_VIRTL) REFERENCES AFW_13_DOSR_VIRTL (SEQNC) ON DELETE CASCADE ENABLE VALIDATE) /
true
fe2046813ed82c74b0dbc96b999c76a8c5e459f1
SQL
dosmanthus/leetcode
/001-200/181_EmployeesEarningMoreThanTheirManagers.sql
UTF-8
195
3.125
3
[]
no_license
# Write your MySQL query statement below # 413 ms SELECT e1.Name as Employee FROM Employee as e1, Employee as e2 WHERE e1.ManagerId IS NOT NULL AND e1.ManagerId = e2.Id AND e1.Salary > e2.Salary
true
e8de19e58d975189503138bd0a46151e43c169c8
SQL
skidipap/fastapi-lms
/migrations/models/0_20210706160612_init.sql
UTF-8
766
2.53125
3
[]
no_license
-- upgrade -- CREATE TABLE IF NOT EXISTS "basemodel" ( "id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" TIMESTAMP DEFAULT CURRENT_TIMESTAMP, "updated_at" TIMESTAMP DEFAULT CURRENT_TIMESTAMP ); CREATE TABLE IF NOT EXISTS "user" ( "id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "crea...
true
fd54ff45dc0eb7766bc2252ebf1d2acb17ac2284
SQL
MiyamotoTa/actix_web_sample
/migrations/2020-09-06-113404_create_users_table/up.sql
UTF-8
411
3.359375
3
[]
no_license
CREATE TABLE `users` ( `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, `name` varchar(255) NOT NULL, `email` varchar(255) NOT NULL, `created_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP, `updated_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (`id`) ) ENGINE=In...
true
d7709686bd3e8df1f95a1dd6ebaaec555bddcec3
SQL
MartinaAG/Web-Project
/db_export.sql
UTF-8
3,171
2.828125
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.8.5 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Jul 06, 2019 at 11:01 PM -- Server version: 10.1.38-MariaDB -- PHP Version: 7.3.4 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD...
true
43239b8fa0a3a1a753b06e141fa9e318ebe4d4ad
SQL
ccappetta/scratch
/taskr_proc_createtbl_task_comments.sql
UTF-8
507
3.265625
3
[]
no_license
DROP procedure if exists proc_createtbl_task_comments; create procedure proc_createtbl_task_comments(IN dbname varchar(128)) BEGIN SET @theSQL=CONCAT('CREATE TABLE if not exists ', dbname, '.task_comments ( comment_id int auto_increment primary key, comment_body varchar(9999) null, commenter ...
true
26b73d5e79eac4ee9b7f604b32a629e9c57aee2e
SQL
rtimbro185/syr_mads_ist659_database_admin_management
/final_project/sql/a4b_hierarchy_db_qa-selects.sql
UTF-8
1,132
3.40625
3
[]
no_license
/* IST 659 Data Admin Concepts &Db Mgmt Date: 9/30/2018 Project Deliverable 2: Select Statements to Answer Data Questions */ -- As a Department Supervisor, what Application KPIs do I Own? SELECT Department FROM DepartmentSupervisors WHERE Department_Supervisor = 'Ryan Timbrook' SELECT Team FROM DepartmentTeams WH...
true
f9f46321d91ef27595d151fa980e2e37eaca10ee
SQL
emr6050/template_forms
/interface/forms/redirect_questionnaire/table.sql
UTF-8
3,243
2.828125
3
[]
no_license
/* * create a custom table for the form * * This table NEEDS a UNIQUE name */ CREATE TABLE IF NOT EXISTS `form_redir_questionnaire` ( /* these fields are common to all forms and should remain intact */ id bigint(20) NOT NULL auto_increment, date datetime default NULL, pid bigint(20) default NULL, ...
true
f5db02c04ead65f56781a3511688d40ff83004dc
SQL
gjohnston9/humor-genome
/cleanup/get_category_names_for_specific_joke.sql
UTF-8
216
3.296875
3
[]
no_license
SELECT j.joke_text, c.jokecategory_name FROM JokesCleaned as j INNER JOIN Joke2Categories as j2c on j2c.joke_id=j.joke_id INNER JOIN JokeCategories as c on c.jokecategory_id=j2c.jokecategory_id WHERE j.joke_id=835;
true
056031cb3d2ca62099aef2bb4d2a918ac592a73d
SQL
andimiya/SELECT-todo-FROM-list
/todo_app.sql
UTF-8
1,750
3.90625
4
[]
no_license
\c Andrea; DROP USER IF EXISTS "michael"; CREATE USER "michael" WITH ENCRYPTED PASSWORD 'stonebreaker'; DROP DATABASE IF EXISTS "todo_app"; CREATE DATABASE "todo_app"; \c todo_app; CREATE TABLE "tasks" ( id SERIAL NOT NULL PRIMARY KEY, title varchar(255) NOT NULL, description text NULL, created_at TIMESTAMP ...
true
f84491244fa0dd476b95fceac4692d3a0251b842
SQL
obelisco99/practicas_gbd
/practica_37/practica37.sql
UTF-8
1,071
3.515625
4
[]
no_license
SELECT EQUIPO_CASA, EQUIPO_FUERA, (GOLES_CASA||'-'||GOLES_FUERA) AS goles, CASE WHEN GOLES_CASA>GOLES_FUERA THEN 'Victoria local' WHEN GOLES_FUERA>GOLES_CASA THEN 'Victoria visitante' WHEN GOLES_FUERA=GOLES_CASA THEN 'Empate' END AS resultado FROM PARTIDOS_COMPLETOS; ------------------------------------------...
true
4bfaa0f2dde809d7c68373f898bd6a038ba26b97
SQL
JDmajia/mone
/tesla/tesla-quota-server/src/main/resources/sql/init.sql
UTF-8
1,814
2.9375
3
[ "Apache-2.0" ]
permissive
/* * Copyright 2020 Xiaomi * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applica...
true
b5aa3b77c688ca7adf778c321de3cc726efe5d5f
SQL
ciarangreene84/assure_core
/Assure.Core.Database/CoreFacade/Stored Procedures/AddPolicyDocument.sql
UTF-8
328
2.8125
3
[]
no_license
 CREATE PROCEDURE [CoreFacade].[AddPolicyDocument] @PolicyId int, @DocumentId uniqueidentifier AS BEGIN -- SET NOCOUNT ON added to prevent extra result sets from -- interfering with SELECT statements. SET NOCOUNT ON; INSERT INTO CoreModel.PolicyDocuments (PolicyId, DocumentId) VALUES (@PolicyId, @DocumentId...
true
83e6fcc613daad91b140d997cb6f766e76c5de6b
SQL
arunbodd/gTRAP_Websearch-Tool
/Queries.sql
UTF-8
2,510
3.875
4
[]
no_license
##SQL Queries## ##Create query: ##Gene table Create table Gene (Gene_Id varchar(20) NOT NULL PRIMARY KEY, Gene_Symbol varchar(30), Chromosome_pos varchar(10), Gene_Name varchar(30), Family_Name varchar(50)); ##Transcription table Create table Transcription( Transciprion_Factor_ID varchar(20) NOT NULL PRIMARY KEY, ...
true
9f551ec886758a6d4109d4049e60dbfe86569158
SQL
dallahdev123/asteriskProjectCallCenter
/asterix.sql
UTF-8
3,673
3.421875
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.9.1 -- https://www.phpmyadmin.net/ -- -- Hôte : 127.0.0.1 -- Généré le : Dim 17 nov. 2019 à 08:39 -- Version du serveur : 10.4.8-MariaDB -- Version de PHP : 7.1.33 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 ...
true
38c52f0205dddd601f1569521b5bc8cb6850512b
SQL
532763233/CSMS
/选课管理系统/out/production/选课管理系统/sql.sql
UTF-8
5,542
3.09375
3
[]
no_license
DROP DATABASE IF EXISTS ccmsdb; CREATE DATABASE ccmsdb DEFAULT CHARACTER SET utf8; use ccmsdb; create table checkpeople ( id int not null primary key auto_increment, type varchar(20) not null, name varchar(20) not null, ...
true
68eb06c36e01e29173257f6733e8faf7e632d3f5
SQL
DomoniqueC/DatabaseProject
/Database System/Tables/Abrahan Ramirez/contactdetails.sql
UTF-8
359
3.109375
3
[]
no_license
/** *Created by Abrahan Ramirez *Contact Details Table *This relation has data about the contact deatails of passengers. **/ create table Contact_Details( CnID INT PRIMARY KEY, Email VARCHAR(16) NOT NULL, Cell VARCHAR(16) NOT NULL, Street VARCHAR(64), State VARCHAR(20) NOT NULL, CONSTRAINT fk_State...
true
8c3040020ae9a605955b2eb0d3b27e1c1840daf6
SQL
ashugandhi/Business-Analytics-Nanodegree
/2. Intro to SQL/Lesson 1- SQL basics/33-between-due-purchase.sql
UTF-8
921
4.21875
4
[]
no_license
/* Udacity's certified program > Business Analytics Nanodegree SQL practice > Lesson 1 : SQL Basics Imagine you are a 'Sales Manager' at 'Parch and Posey', you want to see which of your customers bought paper a while ago and might be due to make a purchase soon. Lets assume this is January 2017, you probably want to l...
true
6973fd9d5f8ae42c08f0c5f82fde5980ec9a7759
SQL
joaovperin/DallaHits
/web/META-INF/modelo/BD_Views.sql
UTF-8
345
3.6875
4
[]
no_license
CREATE OR REPLACE VIEW View_Comandas AS SELECT c.idComanda, c.idCliente, cl.Nome as 'Cliente', usu.Nome as 'Usuario', c.Data, c.ValorTotal FROM Comanda c LEFT JOIN Cliente cl ON c.idCliente = cl.idCliente LEFT JOIN Usuario usu ON usu...
true
6cf638ec87e4723c1be72ca99bc3eb635306dd01
SQL
cpaez-art/paginas
/AutosCUN/autoscun base de datos/autoscun_orden_articulos.sql
UTF-8
2,333
2.984375
3
[ "MIT" ]
permissive
-- MySQL dump 10.13 Distrib 5.7.12, for Win64 (x86_64) -- -- Host: localhost Database: autoscun -- ------------------------------------------------------ -- Server version 5.5.58-MariaDB /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET...
true
7e86d0f655f3dcc5fa57436aac37b33eccee0501
SQL
MJlexter/MedicalPlatform
/dbscript/medicalplatform_dr_tb_member_question.sql
UTF-8
2,432
2.859375
3
[]
no_license
CREATE DATABASE IF NOT EXISTS `medicalplatform` /*!40100 DEFAULT CHARACTER SET utf8 */; USE `medicalplatform`; -- MySQL dump 10.13 Distrib 5.6.19, for Win64 (x86_64) -- -- Host: localhost Database: medicalplatform -- ------------------------------------------------------ -- Server version 5.6.21-enterprise-c...
true
4dde548b90af72c792e98e4fc98673a7553c7149
SQL
lgcarrier/AFW
/5.2.3/Database/Constraints/AFW_12_GROUP_STAT_UK1.sql
UTF-8
145
2.609375
3
[ "MIT" ]
permissive
SET DEFINE OFF; ALTER TABLE AFW_12_GROUP_STAT ADD ( CONSTRAINT AFW_12_GROUP_STAT_UK1 UNIQUE (CODE, REF_PRODT, REF_DOMN) ENABLE VALIDATE) /
true
59d2b3872510819dfa0ee2d0cffbfc6350f85eef
SQL
yhtgrace/echo
/src/test_echofilter_echoannot2.sql
UTF-8
653
3.328125
3
[]
no_license
set search_path to mimiciii; ---- Run these first: -- -- echo_filter_vars_mx -- echo_filtered_mx DROP MATERIALIZED VIEW IF EXISTS test_echo_fluid2 CASCADE; CREATE MATERIALIZED VIEW test_echo_fluid2 AS SELECT ef.*, (fd.chartdate - cast(ef.ed_charttime as date)) as day_wrt_echo, fd.daily_input_ml, fd.daily_output_ml,...
true
1ed3d64c1163ebd32d30229589e97201651d1c39
SQL
BritoMatheus/task-node-api
/SQLQuery1.sql
UTF-8
466
3.640625
4
[]
no_license
CREATE TABLE Usuario ( Id int IDENTITY(1,1) PRIMARY KEY, Nome varchar(100), Email varchar(200), Password varchar(100) ) CREATE TABLE Task ( Id int IDENTITY(1,1) PRIMARY KEY, Descricao varchar(200), EstimateAt Date NULL, DoneAt Date null, UsuarioId int, Constraint Task_Usuario FOREIGN KEY (UsuarioId) REFERENC...
true
37bf29cf5d690cbd69effc5c32d9b72eb6107029
SQL
CUBRID/cubrid-testcases
/sql/_06_manipulation/_01_select/_021_null/cases/1007.sql
UTF-8
382
3.0625
3
[ "BSD-3-Clause" ]
permissive
--Test null with relational operator create class t1(c1 int, c2 varchar(20)); insert into t1 values(101, 'aaa'); insert into t1 values(null, 'aaa'); insert into t1 values(null, 'aaa'); insert into t1 values(null, 'aaa'); select * from t1 where c1 > null; select * from t1 where c1 < null; select * from t1 where c1...
true
d45b077f57ecbd5f3fc9e5d4453483a2cb05c072
SQL
risingBirdSong/IHPTutCatchall
/blogB/Application/Fixtures.sql
UTF-8
1,197
2.65625
3
[]
no_license
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 xmloption = content; SET client_min_messages = warning; SET r...
true
0889d452913ef4106769c58b47c935c321db0ddd
SQL
glennneiger/parcel-analysis
/RealtyTrac/sql/temp_foreclosures_tagged_with_2010_block_groups.sql
UTF-8
341
3.21875
3
[ "MIT" ]
permissive
-- Foreclosures summarized by year and 2010 block group SELECT bg.geoid10 AS FIPS, asm.use_code_std, fc.* INTO _temp_foreclosures_tagged_with_2010_block_groups_ FROM foreclosures_geocoded AS fc JOIN assessments AS asm ON asm.sa_property_id = fc.sa_property_id JOIN census2010_block_groups AS bg ON ST_Intersects...
true
902f800b286491d0760f3333dde821a43ca7349a
SQL
SeverinGabriel/gabrieltransport
/Auftragverwaltung/WebContent/WEB-INF/resources/schema.ddl
ISO-8859-1
11,576
3.484375
3
[]
no_license
create table `Resource` ( name varchar(255) not null, primary key (name) ) ENGINE=InnoDB; create table `Role` ( name varchar(255) not null, primary key (name) ) ENGINE=InnoDB; create table `User` ( username varchar(255) not null, password tinyblob n...
true
d480220155afa8e832bb3688a1c63facc582973a
SQL
amerkrlicbegovic/SQL-lab
/Fin/Funkcije_fin.sql
UTF-8
2,285
3.859375
4
[]
no_license
--5.5.1 ZADACI ZA VJEŽBU -- --ZADATAK ZA VJEŽBU 35. --Ispišite ime i prezime te mjesto rođenja studenata kojima ime počinje --slovom F SELECT stud.imeStud, stud.prezStud, mjesto.nazMjesto FROM stud INNER JOIN mjesto ON stud.pbrRod = mjesto.pbr WHERE Left(stud.imeStud,1)='F' --ZADATAK ZA VJEŽBU 36. --Ispiši...
true
862613f8939d3c183b36c5c5464b053a652b9f8b
SQL
mebelousov/antlr_psql
/src/test/resources/sql/select/3961e0be.sql
UTF-8
289
2.84375
3
[ "MIT" ]
permissive
-- file:opr_sanity.sql ln:1087 expect:true SELECT p1.oid::regprocedure, p2.oid::regprocedure FROM pg_proc AS p1, pg_proc AS p2 WHERE p1.oid < p2.oid AND p1.proname = p2.proname AND p1.proisagg AND p2.proisagg AND array_dims(p1.proargtypes) != array_dims(p2.proargtypes) ORDER BY 1
true
a3aa7838d0ffbab634fcd1d5e1ff88da04f52ce9
SQL
Symryvvin/mtg
/sql/lang.sql
UTF-8
1,029
3.09375
3
[]
no_license
CREATE TABLE `magic`.`lang_definition` ( `code` VARCHAR(2) NOT NULL, `name` VARCHAR(20) NOT NULL, PRIMARY KEY (`code`), UNIQUE INDEX `code_UNIQUE` (`code` ASC) VISIBLE, UNIQUE INDEX `name_UNIQUE` (`name` ASC) VISIBLE); START TRANSACTION; INSERT INTO lang_definition (code, name) VALUES ('en', 'English'); IN...
true
89175c0403cf43fc64f7d498e17f8bdc2d5bbad6
SQL
zhankster/seating
/.sql/Dine_Tables.sql
UTF-8
1,265
3.078125
3
[]
no_license
CREATE TABLE `table` ( `id` varchar(12) NOT NULL, `section` varchar(12) DEFAULT NULL, `seats` int(11) NOT NULL, `max_seats` int(11) NOT NULL, `location` varchar(20) DEFAULT NULL, `description` varchar(100) NOT NULL, `active` bit DEFAULT 1, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; CRE...
true
603356eb3081178b73d3817728c9c4d4fd60d582
SQL
ramjikanaujia/HackerRank-SQL-Challenges-Solutions
/Advanced Select/New Companies.sql
UTF-8
494
4.25
4
[]
permissive
# Author: Ramji Kanaujia SELECT c.company_code,c.founder, count(distinct lm.lead_manager_code), count(distinct sm.senior_manager_code), count(distinct m.manager_code), count(distinct e.employee_code) FROM Company c, Lead_Manager lm, Senior_Manager sm, Manager m, Employee e WHERE c.company_code=lm.company_code AND lm.l...
true
c816fbcdfa7c586c67414cd7ecf980f77648be33
SQL
radtek/white_szpt
/src/sql/souce建库语句/source_jcj.sql
UTF-8
6,037
3.15625
3
[]
no_license
/* Navicat MySQL Data Transfer Source Server : jwzh Source Server Version : 50538 Source Host : localhost:3306 Source Database : source_jcj Target Server Type : MYSQL Target Server Version : 50538 File Encoding : 65001 Date: 2017-03-24 16:35:08 */ SET FOREIGN_KEY_CHECKS=0; DROP Da...
true
6da010044c0a0398759adcda323fc900cb3b1d1f
SQL
sivakumar-g-liaison/alloy-conveyor-server
/service-implementation/src/main/db/migration/GATEWAY_DTDM/V2.4.1.20__mbox_DTDM_add_columns_to_processor.sql
UTF-8
1,233
3.21875
3
[ "Apache-2.0", "LicenseRef-scancode-commercial-license" ]
permissive
-- -- Copyright 2016 Liaison Technologies, Inc. -- This software is the confidential and proprietary information of -- Liaison Technologies, Inc. ("Confidential Information"). You shall -- not disclose such Confidential Information and shall use it only in -- accordance with the terms of the license agreement you ente...
true
9d7d36c75dc7f65330950d48901a443d5176e22e
SQL
chiranjitengineer/learngit
/OfficeWorks/Vijayshree/25022021/DBQUERY.sql
UTF-8
695
3.0625
3
[]
no_license
SELECT FN_ROUNDOFFRS(P_AMOUNT NUMBER, P_ROUNDOFTO NUMBER, P_ROUNDOFTYPE VARCHAR2 DEFAULT 'S') FROM DUAL SELECT FN_ROUNDOFFRS(310, 5, CASE WHEN MOD(310,10) >= 5 THEN 'H' ELSE 'L' END) FROM DUAL SELECT MOD(315,10) FROM DUAL WPSWAGESPROCESSTYPE_PHASE PROC_WPSDAILYPROCESS_TRANSFER SELECT TOKENNO,ACTUALPAYBLEAMOUNT,...
true
f5db692e6c91fa63a23e5f2ea0992bac1d599ee8
SQL
Jbladevr/HW3
/HW3Create.sql
UTF-8
1,319
3.15625
3
[]
no_license
CREATE TABLE Flight (FLIGHT_ID INT PRIMARY KEY, DEPARTURES_SCHEDULED INT,DEPARTURES_PERFORMED INT, PAYLOAD INT, SEATS INT, PASSENGERS INT, FREIGHT INT, MAIL INT, DISTANCE INT, DISTANCE_GROUP INT, RAMP_TO_RAMP INT, AIR_TIME INT); CREATE TABLE Timeframe (YEAR...
true
443adfc33fa315ebd3b458eaf6a853fb4e7bac11
SQL
59364202/test
/tools/installer/initdata/database/001_public/schema/3028_rainfall_daily.sql
UTF-8
3,989
3.984375
4
[]
no_license
-- Table: public.rainfall_daily -- DROP TABLE public.rainfall_daily; CREATE TABLE public.rainfall_daily ( id bigserial NOT NULL, -- รหัสข้อมูลปริมาณน้ำฝนจากสถานีโทรมาตรอัตโนมัติ rainfall's serial number tele_station_id bigint, -- รหัสสถานีโทรมาตร tele station number rainfall_datetime timestamp with time zone NO...
true
ec085378e41a5289cd6828957afbdfb1f2d96a77
SQL
zacharlie/WBR-SEMP
/survey/survey_queries.sql
UTF-8
2,243
3.921875
4
[]
no_license
set search_path to wbr_survey,public; /* attempt at replacing village geometry with voronoi polygons ABANDONED update survey_villages sv set geom = st_multi(st_intersection(st_buffer(st_centroid(sv.geom)::geography,500)::geometry,vp.geom)) from voronoipolys vp where st_within(st_centroid(sv.geom),vp.geom); */ --rep...
true
6c90a6a8cf346aee2b864b0baa40fba78d0878f6
SQL
USTC417/monitor
/web/src/main/resources/monitor.sql
UTF-8
2,606
3.34375
3
[]
no_license
/* Navicat MySQL Data Transfer Source Server : MySQL Source Server Version : 50537 Source Host : localhost:3306 Source Database : clustermonitor Target Server Type : MYSQL Target Server Version : 50537 File Encoding : 65001 Date: 2017-11-16 23:56:02 */ SET FOREIGN_KEY_CHECKS=0; -...
true
fb10026ef8eb4866b40d8d9694fe59d955d75395
SQL
Kyungpyo-Kang/study_sourceCode
/DBMS/workspace/day03.sql
UHC
4,839
4.28125
4
[]
no_license
--ɰ ȭ CREATE TABLE FLOWER( NAME VARCHAR2(20), COLOR VARCHAR2(10), PRICE NUMBER(6), CONSTRAINT FLOWER_PK PRIMARY KEY(NAME) ); SELECT * FROM FLOWER; CREATE TABLE POT( ID VARCHAR2(10), COLOR VARCHAR2(20), SHAPE VARCHAR2(20), NAME VARCHAR2(20), CONSTRAINT POT_PK PRIMARY KEY(ID), CONSTRAINT POT_...
true
023499f22175c19715653b6a9e2bbbcf6c0cebc4
SQL
jonatanklosko/competitor-base
/data/sql/relations/organized_in.sql
UTF-8
361
3.328125
3
[]
no_license
SELECT competition.id AS ':START_ID(Competition-ID)', country.iso2 AS ':END_ID(Country-ID)', competition.cityName AS 'city', CONCAT('{', 'latitude:', latitude / 1000000, ', longitude:', longitude / 1000000 , '}') AS 'location:point', 'ORGANIZED_IN' AS ':TYPE' FROM Competitions competition JOIN Countries count...
true
d13e286900de21772025410791b3bff9f659cac2
SQL
luke-jordan/pluto-alpha
/templates/rds/0007-create_audience_tables.sql
UTF-8
2,552
3.796875
4
[]
no_license
create schema if not exists audience_data; -- Note: condition instructions cannot change, if they change, it is a new audience, so this is immutable -- is_dynamic indicates if the audience should be refreshed each time it is gathered (e.g., for recurring boost/messages), or not create table if not exists audience_data...
true
a84bb38b453b8fcc34f17e477afc11a1cf1dd8db
SQL
zanozbot/questly
/install/database.sql
UTF-8
3,601
3.546875
4
[ "MIT" ]
permissive
-- MySQL Script generated by MySQL Workbench -- 01/03/17 19:34:32 -- 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='TRADITION...
true
73e8073a3b53c36d1c9f949ccf3cdfa6459e0516
SQL
sz1829/nmu
/dropped_trigger/Trigger_insertTourDetails.sql
UTF-8
2,628
3.796875
4
[]
no_license
CREATE TRIGGER addTourDetails AFTER INSERT ON TourDetails FOR EACH ROW BEGIN SELECT sale_price, sale_currency, exchange_rate, coupon, coupon_currency FROM IndividualTour WHERE indiv_tour_id = NEW.indiv_tour_id INTO @sale_price, @sale_currency, @exchange_rate, @it_coupon, ...
true
13515cd10d6079dfae0e4663f37972515f471856
SQL
silence-do-good/stress-test-Postgres-and-MySQL
/dump/low/day13/select0139.sql
UTF-8
191
2.8125
3
[]
no_license
SELECT timeStamp, temperature FROM ThermometerObservation WHERE timestamp>'2017-11-12T01:39:00Z' AND timestamp<'2017-11-13T01:39:00Z' AND SENSOR_ID='3cab109f_d355_4778_856d_2807b743c804'
true
06a1c2a6e9219c3e130d6b551930457a2537f3d7
SQL
daczarne/udemy_master_bigquery_internals
/12_materialized_views_in_bigquery/02_partitioned_mv.sql
UTF-8
315
3.5625
4
[]
no_license
/* Materialized views can use partitions too */ CREATE MATERIALIZED VIEW `bigquery-demo-285417.dataset1.names_mvd` PARTITION BY date AS SELECT name , SUM(count) AS total_count , _PARTITIONDATE AS date FROM `bigquery-demo-285417.dataset1.demo_part_ingestion` WHERE _PARTITIONDATE = "2020-02-19" GROUP BY 1, 3
true
6bec0e90662626dfcf2d8415c033abc54b0e78b2
SQL
san4ever/SQLmaterial
/Assignment day 1.sql
WINDOWS-1250
1,171
3.1875
3
[]
no_license
-- Inner join -- perform inner join on Country and region -- perform inner join on Employee and Job History. -- perform inner join on Employee , Department and Location. -- perform inner join on Loactions , Countries and regions. -- left outer join -- perform left join on employee and Department -- perform lef...
true
fc429743a515294c9c5cb58a6a97437ef3e0262c
SQL
Neslihan-KK/Airport-Project
/Airport_Project.sql
UTF-8
1,339
3.515625
4
[]
no_license
CREATE SCHEMA airport AUTHORIZATION postgres; drop table airport.airports cascade; CREATE TABLE airport.airports ( airport_id integer not null primary key, airport_name varchar(50), airport_location varchar(100) ); select * from airport.airports; drop table airport.airways cascade; CREATE...
true
c821a327961f97206fb6c6df6f81a5e100ec4074
SQL
ParkerNat/Zoo_Project
/SQLQuery3.sql
UTF-8
3,361
3.59375
4
[]
no_license
/**** DRILL 1 ****/ SELECT * FROM tbl_habitat; /**** DRILL 2 ****/ SELECT species_name FROM tbl_species WHERE species_order = '3'; /**** DRILL 3 ****/ SELECT nutrition_type FROM tbl_nutrition WHERE nutrition_cost <= 600; /**** DRILL 4 ****/ SELECT tbl_species.species_name, tbl_nutrition.nutrition_id FROM tbl_sp...
true
62e2e3f6f868e83bc5f70f8a8fac7ca6ffc7beb7
SQL
NYPL-Simplified/circulation
/core/migration/20170303-2-recreate-materialize-views.sql
UTF-8
14,172
3.890625
4
[ "Apache-2.0" ]
permissive
drop materialized view mv_works_editions_datasources_identifiers; create materialized view mv_works_editions_datasources_identifiers as SELECT distinct works.id AS works_id, editions.id AS editions_id, editions.data_source_id, editions.primary_identifier_id, editions.sort_title, editions.perma...
true
7930d589334492fe2dd352424bff9a33153db768
SQL
bennyrags/horacethedreamer
/database.sql
UTF-8
1,085
3.96875
4
[]
no_license
-- USER is a reserved keyword with Postgres -- You must use double quotes in every query that user is in: -- ex. SELECT * FROM "user"; -- Otherwise you will have errors! CREATE TABLE "user" ( "id" SERIAL PRIMARY KEY, "username" VARCHAR (80) UNIQUE NOT NULL, "email" VARCHAR (100) UNIQUE NOT NULL, "first...
true
f5c6d1db2763ff7a99e6ee7d6745cabade2ff664
SQL
morenite/melody
/db/sql/database_schema.sql
UTF-8
17,738
3.421875
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.0.6 -- http://www.phpmyadmin.net -- -- Host: localhost:3306 -- Generation Time: Feb 20, 2014 at 03:21 AM -- Server version: 5.5.32 -- PHP Version: 5.4.20 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT...
true
a6190981444e7173eee131c3bf78ae9739908bce
SQL
adzhenalieva/control-work-10
/api/post.sql
UTF-8
1,090
3.765625
4
[]
no_license
CREATE SCHEMA `post` DEFAULT CHARACTER SET utf8 ; USE `post`; CREATE TABLE `news` ( `id` INT NOT NULL AUTO_INCREMENT, `title` VARCHAR(255) NOT NULL, `description` TEXT NOT NULL, `image` VARCHAR(255) NULL, `date` VARCHAR(255) NOT NULL, PRIMARY KEY (`id`)); CREATE TABLE `comments` ( `id` INT NOT NULL AUT...
true
3d135f8a05418faef32400f54785beb196f20528
SQL
bellmit/ws
/0 项目文档/.svn/pristine/33/3314e9551631d015f93fe868fe059e65e9b52c82.svn-base
UTF-8
1,120
3.34375
3
[]
no_license
CREATE TABLE "LIFE".t_item_param_stock_record ( "ID" NUMBER(8) NOT NULL, stock_id NUMBER(8) NOT NULL, remark VARCHAR2(200 BYTE) NOT NULL, "TYPE" NUMBER(1), quantity NUMBER(8) DEFAULT 1, item_color VARCHAR2(50 BYTE), item_size VARCHAR2(50 BYTE), item_brand VARCHAR2(50 BYTE), create_time VARCHAR2(14 BYT...
true
f35fc14acce62c70a6d9aa620433ad66aaa8a9d3
SQL
galigaribaldi/CursoSQL
/SQL2/Viernes/tablespaces.sql
UTF-8
1,873
2.90625
3
[]
no_license
--@Autors: Cabrera Garibaldi Hernan Galileo --@Autors: Medel Sánchez Berenice --@Fecha: 02/Diciembre/2019 --@Descricpion: Script el cual crea los TableSpaces Necesarios para la base --Creación de TableSpaces --TableSpace para libro en PDF --Se recomienda el uso de adminsitración automatica prompt Creacion del tableSp...
true
064776735275a9a2a6464a54c2a6485740540925
SQL
radtek/LS
/Delphi/FDC Library/FDC Standard Applications/Standard VERO Application/Server/fdc_Task_Lst_By_Group.sql
UTF-8
184
2.859375
3
[]
no_license
create or replace view fdc_Task_Lst_By_Group as select /*ordered*/ T.*, UGT.User_Group_ID from fdc_User_Group_Task UGT, fdc_Task_Lst T where T.ID = UGT.Task_ID;
true
fa04ee16f609df91a9e0a3ba3a792cfc2a7dfc94
SQL
Marcus-V-Freitas/SQL_Utils
/Diversos/PesquisarPorNome.sql
ISO-8859-1
412
3.328125
3
[ "MIT" ]
permissive
SELECT A.NAME, A.XTYPE, B.TEXT FROM SYSOBJECTS A (nolock) JOIN SYSCOMMENTS B (nolock) ON A.ID = B.ID WHERE B.TEXT LIKE '%INSERT INTO MvNotaFiscalParcelas%' --Palavra a ser buscada AND A.XTYPE = 'P' -- Tipo onde quer ser pesquisado ORDER BY A.NAME --Tipos mais comuns a serem pesquisados --P - Procedures --TR - Triggers...
true
3395e57fe851c5823ee588e49fa132da87037882
SQL
Rickyvit/parcial1_programacion3
/api/config/forum.sql
UTF-8
991
3.96875
4
[]
no_license
DROP DATABASE IF EXISTS forum; CREATE DATABASE IF NOT EXISTS forum; USE forum; /*----------------------------*/ CREATE TABLE usuarios( id INT UNSIGNED UNIQUE AUTO_INCREMENT NOT NULL PRIMARY KEY, usuario VARCHAR(50) UNIQUE NOT NULL, correo VARCHAR(255) UNIQUE NOT NULL, clave VARCHAR(255) NOT NULL )ENGI...
true
a1261278093cb779ccab5fd1b10d890e6cc7b0a7
SQL
hyung000620/Study-DataBase
/[Computer-Science] Database Assignment/[Database] Lab #12/lab11-2015118527.sql
UTF-8
1,265
3.9375
4
[ "MIT" ]
permissive
-- 1) Display the output (in the TYPICAL format by default) of EXPLAIN PLAN for the following query -- Q: Which join algorithm is used for this query? 72 EXPLAIN PLAN FOR SELECT e1.Fname, e1.Lname FROM EMPLOYEE e1 WHERE e1.Salary = (SELECT MAX(Salary) FROM EMPLOYEE e2); SELECT * FROM TABLE(DBMS_XPLAN.DISPLAY); -- 2) D...
true
11ee117edcd4a7da4fd3ff43111ce984a36ef5b4
SQL
theguywhodoesthething/SD_Projects
/rest-lab/restLab.sql
UTF-8
3,168
3.75
4
[]
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 restlab -...
true
20331e81756d5f4ccbe254c51c91905dea9fd9f5
SQL
danbikle/stk_mkt_madlib_logregr
/qry_predictions12.sql
UTF-8
1,881
3.5625
4
[]
no_license
\set ECHO all -- -- ~/tv/qry_predictions12.sql -- -- Look at Bearish predictions: SELECT COUNT(tkr) ccount ,ROUND(AVG(ng3),4) avg_ng3 ,ROUND(SUM(ng3),4) sum_ng3 ,ROUND(AVG(ng3)/STDDEV(ng3),4) sharpe_r FROM predictions12 WHERE prob<0.45 ; -- Look at Bullish predictions: S...
true
2849742ebcceacc387d67d2f86e1c8dd9c1058c3
SQL
nihed/magnetism
/jive_messenger/vendor/jive_messenger_2_2_branch_r2910/src/database/upgrade/1.1_to_2.0/messenger_postgresql.sql
UTF-8
5,585
2.765625
3
[]
no_license
-- $RCSfile$ -- $Revision: 395 $ -- $Date: 2004-11-13 14:57:13 -0500 (Sat, 13 Nov 2004) $ -- upgrades from Messenger 1.1.x to 2.0.x -- jiveUser: Adds new column "username". Removes "nameVisible" & "emailVisible". Changes primary key ALTER TABLE jiveUser ADD COLUMN username VARCHAR(32) NOT NULL; ALTER TABLE jiveUser D...
true
8825c46bc740fcd1f6def03043dc764e3c7e58ab
SQL
joakimjocka/student-management-system
/Kong Jie SQL project/DATABASE FILES/student_management/Queries/Majors and its courses.sql
UTF-8
122
2.6875
3
[]
no_license
select majors_info.Major_name,course_info.Course_name from majors_info,course_info where course_info.MID=majors_info.MID
true
2cd2d3604c899e82420471d04d8df66f6177176d
SQL
KM-96/CSCI-585-Database-Systems-Homeworks
/Homework2/Q4_V1.sql
UTF-8
1,088
3.6875
4
[]
no_license
/* * Used live SQL to run the following commands * https://livesql.oracle.com/apex/f?p=590%3A1000%3A0 * Database: Oracle: Version 19.5.0.0.0 */ /* * I have written two different queries that do the same job of deleting the names that have 'NULL' for SameFam and another family member in the db. */ CREATE TABLE JU...
true
613725d79ac6a6c7ee0dafd2f48c14b4d12c9de3
SQL
marancibia/oracle-db-examples
/json-relational-duality/DualityViewTutorial.sql
UTF-8
24,321
3.328125
3
[ "Apache-2.0", "LicenseRef-scancode-warranty-disclaimer" ]
permissive
/* ** Copyright (c) 2023 Oracle and/or its affiliates ** The Universal Permissive License (UPL), Version 1.0 ** ** Subject to the condition set forth below, permission is hereby granted to any ** person obtaining a copy of this software, associated documentation and/or data ** (collectively the "Software"), free of cha...
true
346100d158b5f5c40a0819c38e43571beac9cf88
SQL
Bones02/workout-server
/migrations/002.do.create_workouts.sql
UTF-8
313
2.75
3
[]
no_license
CREATE TABLE workouts ( id INTEGER PRIMARY KEY GENERATED BY DEFAULT AS IDENTITY, typeId INTEGER REFERENCES types(id) ON DELETE CASCADE NOT NULL, name TEXT NOT NULL, modified TIMESTAMP NOT NULL DEFAULT now(), description TEXT NOT NULL, calories TEXT NOT NULL, minutes TEXT NOT NULL );
true
e849d9d123e4acacfa0db5e5b34120ca2f3438fd
SQL
nikwalia/schedule-generator
/db/top_class_frequency_procedure.sql
UTF-8
464
3.78125
4
[ "MIT" ]
permissive
CREATE PROCEDURE GetTopClassFrequency ( IN course_id VARCHAR(10), OUT best_semester INT ) BEGIN IF NOT EXISTS(SELECT c.course_id FROM student_info.courses c WHERE c.course_id = course_id) THEN SET best_semester = -1; ELSE SELECT e.semester_taken INTO best_semester FROM student_info.enrollment...
true
2ecbb403a9b37bd3e4326f77964e0aa65d95c02b
SQL
t3mp0ralflux/CSC455
/assignment 2/insert_data_assign2.sql
UTF-8
3,541
2.78125
3
[]
no_license
delete from odetails; delete from parts; delete from orders; delete from customers; delete from employees; delete from zipcodes; insert into zipcodes values ('67226', 'Wichita'); insert into zipcodes values ('60606', 'Fort Dodge'); insert into zipcodes values ('50302', 'Kansas City'); insert into zipcodes values ('544...
true
a52768e4502bc5f2388bd72654814389b2e69ef9
SQL
Hammam94/HRprogram
/src/com/company/Back_End/database/interviews.sql
UTF-8
166
2.578125
3
[]
no_license
CREATE TABLE IF NOT EXISTS interviews ( id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, name TEXT NOT NULL, date_time TIMESTAMP DEFAULT CURRENT_TIMESTAMP )
true
046f638aeacd5bbe59c285677a89f437b56e04e8
SQL
rashmivi001/Banking-Application-using-Springboot
/OnlineBankingAppDump.sql
UTF-8
4,526
3.125
3
[]
no_license
-- MySQL dump 10.13 Distrib 8.0.15, for Win64 (x86_64) -- -- Host: localhost Database: mydb -- ------------------------------------------------------ -- Server version 8.0.15 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;...
true
dbc59df5854c1d1c8d8ccdba8243a607d3eec689
SQL
woakes070048/Hefest
/scripts/database_create.sql
UTF-8
26,491
3.15625
3
[]
no_license
DROP SCHEMA IF EXISTS professionals CASCADE; CREATE SCHEMA professionals; CREATE EXTENSION IF NOT EXISTS postgis; CREATE EXTENSION IF NOT EXISTS plpython3u; CREATE TABLE professionals.PersistentTokens ( Series VARCHAR NOT NULL, Value VARCHAR NOT NULL, Email VARCHAR NO...
true
c89c69befd96fbc8c55abe41e76b14d2bec4ca12
SQL
rtashev/University-Projects
/library/create_tables_for_librarydb.sql
UTF-8
975
3.890625
4
[ "MIT" ]
permissive
CREATE TABLE users ( user_id int NOT NULL AUTO_INCREMENT, name varchar(30) NOT NULL, password varchar(100) NOT NULL, role varchar(30), enabled boolean, primary key (user_id) ); CREATE TABLE books ( book_id int NOT NULL AUTO_INCREMENT, name varchar(30) NOT NULL, isbn varchar(30) NOT NULL unique, author varchar(50) NOT ...
true
3135300364643c4d630bcfdcd3848ad4e61983cf
SQL
iFeddy/unla-oo2
/final-julio/lib/bdCooperativa.sql
UTF-8
7,783
3.28125
3
[]
no_license
CREATE DATABASE IF NOT EXISTS `bdCooperativa` /*!40100 DEFAULT CHARACTER SET utf8 */ /*!80016 DEFAULT ENCRYPTION='N' */; USE `bdCooperativa`; -- MySQL dump 10.13 Distrib 8.0.25, for Linux (x86_64) -- -- Host: localhost Database: bdCooperativa -- ------------------------------------------------------ -- Server vers...
true
8c1bb19c72b1bd59b8f1d0d8b3adf8ed3a81332b
SQL
PratikRaut15/speed-elixia-project
/databasescripts/604_nightDrive_travellingReport.sql
UTF-8
1,490
3.4375
3
[]
no_license
INSERT INTO `dbpatches` ( `patchid` , `patchdate` , `appliedby` , `patchdesc` , `isapplied` ) VALUES ('604', '2018-09-04 12:12:00', 'Manasvi Thakur', 'Night Drive Travellimng Report', '0'); DELIMITER $$ DROP PROCEDURE IF EXISTS `get_vehicle_number_by_vehicleid`$$ CREATE PROCEDURE `get_vehicle_number_by_vehicleid`( ...
true
029c8d677f784c1b036927373b0413952944e1cf
SQL
Towels/Graph-of-Content
/src/main/resources/sql/load.sql
UTF-8
1,503
2.765625
3
[]
no_license
INSERT INTO Token VALUES ("a7a263c0-c977-407f-a2eb-7e728cafd264", NOW()); INSERT INTO User VALUES (1, NOW(), "test@mail.xyz", NOW(), "TestUser", "angular", NOW(), "a7a263c0-c977-407f-a2eb-7e728cafd264"); INSERT INTO User VALUES (2, NOW(), "test", NOW(), "TestUser", "angular", NOW(), NULL); INSERT INTO GraphOfConten...
true
f9dae2431d60f811c13c339c2d5eda174e247447
SQL
PreranaChandru/SQL
/LeetCode/1142. User Activity for the Past 30 Days II.sql
UTF-8
493
4.03125
4
[]
no_license
#SOLUTION 1 SELECT IFNULL(ROUND(COUNT(DISTINCT session_id) / COUNT(DISTINCT user_id), 2), 0) AS average_sessions_per_user FROM Activity WHERE activity_date BETWEEN '2019-06-28' AND '2019-07-27'; #SOLUTION 2 SELECT IFNULL(ROUND(AVG(number_of_session), 2),0) AS average_sessions_per_user FROM (SELECT DISTINC...
true
188d4462638f4e205b345e4d93df9abb2d6107ef
SQL
maxenceroux/airbyte
/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/non_nested_stream_wi__lting_into_long_names_ab2.sql
UTF-8
480
2.609375
3
[ "MIT" ]
permissive
create view "postgres"._airbyte_test_normalization."non_nested_stream_wi__lting_into_long_names_ab2__dbt_tmp" as ( -- SQL model to cast each column to its adequate SQL type converted from the JSON schema type select cast("id" as varchar ) as "id", cast("date" as varchar ) as "date", _airby...
true
8b7a7bab4922044b675c532151bff10bebcf952b
SQL
agreenwalrus/Review-Assistant
/trtpo_system.sql
UTF-8
2,638
3.5625
4
[]
no_license
DROP DATABASE IF EXISTS trtpo_system; SET NAMES 'utf8'; SET SESSION collation_connection = 'utf8_general_ci'; CREATE DATABASE trtpo_system DEFAULT CHARACTER SET 'utf8'; USE trtpo_system; CREATE TABLE users( id_user INTEGER AUTO_INCREMENT, username VARCHAR(100), password VARCHAR(100), id_lecturer INTEGER, PRIMARY KEY...
true
4a53ab63d2eaed34f078224ee77549e8cc9985f7
SQL
TuMercado/TumercadoAdm
/bases/pruebaslocas.sql
UTF-8
6,202
2.875
3
[]
no_license
-- ------------------------ INSERT ----------------------------------------------- -- insert into persona (ci,nombre,apellido,email,pais,contrasena,calle,numero,tarjeta,calificacion) -- values (52185428,"ignacio","gallardo","ignaciogallardo@hotmail.com","Uruguay","pass","calera de las huerfanas",4345,1223423,""); ...
true
c0493227a1d6850e83421b1101bdfa8eaaf4029a
SQL
krzysztofkogut/Database_lab
/lab06/zad-6-5.sql
UTF-8
700
3.375
3
[]
no_license
/* baza danych: cukiernia Napisz instrukcje usuwające z bazy danych informacje o: */ /* 1. klientach o nazwisku Matusiak, */ select * from cukiernia.klienci where nazwa like '%Matusiak%'; delete from cukiernia.klienci where nazwa like '%Matusiak%'; /* 2. klientach o identyfikatorze większym niż 91, */ select * fro...
true
487dce3ea4556c35418636371a8b265e787c254e
SQL
gioferro96/SDM-AccessControl
/database/dumpFinal.sql
UTF-8
3,622
3.234375
3
[]
no_license
CREATE DATABASE IF NOT EXISTS `patient` /*!40100 DEFAULT CHARACTER SET latin1 */; USE `patient`; -- MySQL dump 10.13 Distrib 5.7.28, for Linux (x86_64) -- -- Host: localhost Database: patient -- ------------------------------------------------------ -- Server version 5.7.28-0ubuntu0.18.04.4 /*!40101 SET @OLD_CHAR...
true
433a8c405a991c5f2e31eebf3b7080e6213905aa
SQL
zvika77/zvika_env
/Redshift/Sql/show_wlm_status.sql
UTF-8
988
3.5
4
[]
no_license
SELECT config.service_class AS queue , TRIM (case when class.condition = '' then config.name else class.condition end ) AS description , state.num_executing_queries||'/'||config.num_query_tasks AS slots , state.num_queued_queries queued , config.query_working_mem as "MemPerSlo...
true
ff10bad18c852cd421b1315ec847dfefe8cd5a59
SQL
smartaid1980/STOutsource
/src/main/webapp/WEB-INF/sql/update/20190716_strongled_storage/V20190711_02_1.2__alter_a_storage_material_thing.sql
UTF-8
1,475
2.9375
3
[]
no_license
ALTER TABLE `a_storage_material_thing` ADD COLUMN `material_sub` VARCHAR(20) NOT NULL DEFAULT '0000' COMMENT '原料分項,無分項者預設0000=批號,同ERP.batchID批號' AFTER `material_id`, MODIFY COLUMN `remark` VARCHAR(1024) CHARACTER SET utf8 COLLATE utf8_general_ci COMMENT '產品名稱,等同於 ERP.prodName AKA material_name' AFTER `material_sub`,...
true