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
50339fb683f289d0c137fe5c7e82898d78b89076
SQL
eratel/hiynn-lee-examples
/1312313.sql
UTF-8
6,810
3.046875
3
[]
no_license
-- MySQL dump 10.13 Distrib 5.7.25, for Win64 (x86_64) -- -- Host: localhost Database: test -- ------------------------------------------------------ -- Server version 5.7.25 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!401...
true
7ecf14374e7a9bcf51e1b1efaaf6c12dff046023
SQL
JohnClaudio/SQL
/BD_ESCOLA/BANCO_ESCOLA.sql
UTF-8
2,278
4.125
4
[]
no_license
/*Atividade 3 Crie um banco de dados para um registro de uma escola, onde o sistema trabalhará com as informações dos estudantes deste registro dessa escola. Crie uma tabela estudantes e utilizando a habilidade de abstração e determine 5 atributos relevantes dos estudantes para se trabalhar com o serviço dessa escola. ...
true
b2dbfce2d5cd838299177bec7fb7b12b8e0129e2
SQL
chomars/chomars_resto
/api/db/posyandu.sql
UTF-8
4,593
3
3
[]
no_license
/* SQLyog Community v9.63 MySQL - 5.5.16-log : Database - posyandu ********************************************************************* */ /*!40101 SET NAMES utf8 */; /*!40101 SET SQL_MODE=''*/; /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; /*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_...
true
24692e4340e87363445edaf66ed1dd389f532d40
SQL
pimenhub/java_2021
/ConectorMVC2021/ScriptBDConector.sql
UTF-8
352
2.765625
3
[]
no_license
CREATE DATABASE bd_java_con1; USE bd_java_con1; CREATE TABLE tbl_pais( id_pais INT NOT NULL AUTO_INCREMENT PRIMARY KEY, nombre_pais VARCHAR(35) NOT NULL, capital_pais VARCHAR(35) NOT NULL, poblacion_pais BIGINT ); SELECT * FROM tbl_pais; INSERT INTO tbl_pais (nombre_pais, capital_pais, poblacion_pais) VALUES ('Gua...
true
c5d508f98ce2417a407370b07391433defdf6ef7
SQL
chucknorrismk/chucknorrismk
/mc2013.sql
UTF-8
1,491
3.109375
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 3.5.1 -- http://www.phpmyadmin.net -- -- Хост: localhost -- Время создания: Май 18 2013 г., 14:14 -- Версия сервера: 5.5.24-log -- Версия PHP: 5.3.13 SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!...
true
fe03c5f2f109f64ae464c84442753c3271f1c612
SQL
Dragonnerd132/560-project
/SQLStuff/setup.sql
UTF-8
2,338
3.65625
4
[]
no_license
DROP TABLE IF EXISTS websites; DROP TABLE IF EXISTS watchables; DROP TABLE IF EXISTS watchables_sites; DROP TABLE IF EXISTS organizations; DROP TABLE IF EXISTS contributors; DROP TABLE IF EXISTS projects; DROP TABLE IF EXISTS download_mirrors; DROP TABLE IF EXISTS org_members; DROP TABLE IF EXISTS project_contributors;...
true
f20c2701d17040295d54dd738f6e6e66c2969ed0
SQL
BerkayAydogmus/YazilimKampi
/SQLQuery2.sql
UTF-8
1,502
3.765625
4
[]
no_license
--Select //comment line Select ContactName Adi,CompanyName SirketAdi,City Sehir from Customers Select * from Customers where City = 'London' --case insensitive sElEcT * from Products where CategoryID=1 or CategoryID=3 sElEcT * from Products where CategoryID=1 and UnitPrice>10 select * from Products order by Unit...
true
07e84538f13b86633c76df1d9c84610efd85c381
SQL
oradrs/tpt-oracle
/exadata/nls_smart_scan.sql
UTF-8
1,069
3.125
3
[ "Apache-2.0" ]
permissive
-- Copyright 2018 Tanel Poder. All rights reserved. More info at http://tanelpoder.com -- Licensed under the Apache License, Version 2.0. See LICENSE.txt for terms & conditions. SET ECHO ON -- DROP TABLE t; -- CREATE TABLE t AS SELECT a.* FROM dba_objects a, dba_objects b WHERE rownum <= 10000000; -- EXEC DBMS_STATS....
true
e6216b000930e731d783d6853a82493cf520a488
SQL
qjijk/Drives
/database.sql
UTF-8
559
3.484375
3
[]
no_license
DROP TABLE IF EXISTS `user`; drop table if exists `file`; create table user ( userid int auto_increment primary key, email varchar(45) null, username varchar(45) null, password varchar(45) null, constraint user_username_uindex unique (username) ); create table file ( id ...
true
0eb08d56680c013132bd1b493008f52b1e71c291
SQL
ispyb/ISPyB
/ispyb-ejb/db/scripts/passed/2018/2018_06_28_ChangeForeignKeyBLSampleImage.sql
UTF-8
475
2.609375
3
[]
no_license
use pydb; INSERT INTO SchemaStatus (scriptName, schemaStatus) VALUES ('2018_06_28_ChangeForeignKeyBLSampleImage.sql', 'ONGOING'); ALTER TABLE `BLSampleImage` DROP FOREIGN KEY `BLSampleImage_fk1`; ALTER TABLE `BLSampleImage` ADD CONSTRAINT `BLSampleImage_fk1` FOREIGN KEY (`blSampleId`) REFERENCES `BLSample`(`blSampleI...
true
9509fde55b8a19a36f5c011831f30e5093e79e51
SQL
RodrigoChang/Proyecto-Progra-Avanzada-USS
/dump-db-202101101334.sql
UTF-8
9,500
3.09375
3
[ "MIT" ]
permissive
-- MySQL dump 10.13 Distrib 8.0.22, for macos10.15 (x86_64) -- -- Host: ec2-52-23-239-197.compute-1.amazonaws.com Database: db -- ------------------------------------------------------ -- Server version 8.0.22 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS...
true
ff7dd3ea27050dc7394cd6b57c9ea7b23a87b110
SQL
anshupandey/BootUP-DS-ML
/SQL Codes/SQL Basics.sql
UTF-8
3,440
4.46875
4
[]
no_license
/*Creating a new database */ CREATE database AUGUST; /*using the database august */ USE AUGUST; /*Create a table customers in the database august*/ CREATE TABLE CUSTOMERS ( ID INT(5), Name VARCHAR(20), Email VARCHAR(25), Age INT(3), Gender VARCHAR(8) ); /* Delete a table */ DROP TABLE CUSTOMERS; ...
true
4de93896f182c3999d60dd04c936a4939852d20b
SQL
gabriel-ito/backendSistemaAdestramento
/src/main/resources/db/migration/mysql/V1__init.sql
UTF-8
1,924
3.5
4
[]
no_license
CREATE TABLE `usuario` ( `id` INT NOT NULL AUTO_INCREMENT, `nome` VARCHAR(50) NOT NULL, `email` VARCHAR(50) NOT NULL, `senha` VARCHAR(10) NOT NULL, `endereco` VARCHAR(60) NOT NULL, `telefone` VARCHAR(20) NOT NULL, `data_Cadastro` DATETIME NOT NULL, `ativo` INT (1) NOT NULL, PRIMARY KEY (`id`)) ENGINE ...
true
bbd3104a6715b16565c6318735a933bb503604b1
SQL
pgressa/oraclecloud-cloudnative
/src/catalogue/src/main/resources/db/migration/V001__CreateTables.sql
UTF-8
820
3.375
3
[ "UPL-1.0" ]
permissive
CREATE TABLE PRODUCTS ( sku VARCHAR2(20) NOT NULL, brand VARCHAR2(20), title VARCHAR2(40), description VARCHAR2(500), weight VARCHAR2(10), product_size VARCHAR2(25), colors VARCHAR2(20), qty NUMBER(10, 0), price FLOAT, image_url_1 VARCHAR2(50), image_url_2 VARCHAR2(50), P...
true
ac1d98b828b1591d7b675fc7fb1665b60e5f86b1
SQL
bian1234/MySSMDemo
/src/main/resource/sql/user_info.sql
UTF-8
1,239
2.953125
3
[]
no_license
/* Navicat Premium Data Transfer Source Server : 本地 Source Server Type : MySQL Source Server Version : 50725 Source Host : localhost:3306 Source Schema : test Target Server Type : MySQL Target Server Version : 50725 File Encoding : 65001 Date: 14/05/2019 09:38:28 */ ...
true
36d56042128a81b2d358e06725f687ac9a2c6536
SQL
mpiotrowski97/wj-training-plan-service
/src/main/scripts/mysql-init.sql
UTF-8
552
2.921875
3
[]
no_license
DROP DATABASE IF EXISTS wj_training_plan_service; DROP USER IF EXISTS `training_plan_service`@`%`; CREATE DATABASE IF NOT EXISTS wj_training_plan_service CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; CREATE USER IF NOT EXISTS `training_plan_service`@`%` IDENTIFIED WITH mysql_native_password BY 'password'; GRANT SEL...
true
99a3d6037d3f2dce7d124fcfd4acc5bd19acaad1
SQL
joseromerogc/MathMaster
/tablas/roles.sql
UTF-8
1,239
2.609375
3
[ "MIT" ]
permissive
-- phpMyAdmin SQL Dump -- version 4.5.2 -- http://www.phpmyadmin.net -- -- Servidor: localhost -- Tiempo de generación: 14-04-2017 a las 04:27:54 -- Versión del servidor: 10.1.13-MariaDB -- Versión de PHP: 5.6.23 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT...
true
e6b184ce0051c0a9afcb5a640fe825f232f1b6c1
SQL
radtek/abs3
/sql/mmfo/bars/View/v_fm_dfm02_5020.sql
WINDOWS-1252
1,589
2.84375
3
[]
no_license
PROMPT ===================================================================================== PROMPT *** Run *** ========== Scripts /Sql/BARS/View/V_FM_DFM02_5020.sql =========*** Run ** PROMPT ===================================================================================== PROMPT *** Create view V_FM...
true
767960c81220a830b16235375a09a33710386d6f
SQL
inatel-codes/C207
/Aulas/aula_11/exercicio_proposto_sp.sql
UTF-8
527
3.390625
3
[]
no_license
DELIMITER $$ DROP PROCEDURE IF EXISTS confirma_pedido $$ CREATE PROCEDURE confirma_pedido(IN id_pedido BIGINT, IN status_pedido VARCHAR(45), IN valor_total REAL) BEGIN IF status_pedido = 'PENDENTE' THEN UPDATE pedido SET status_pedido = 'CONFIRMADO' WHERE id = id_pedido; UPDATE caixa SET dinheiro = d...
true
a38c4de32b7c298988c392a967dfce5b2d90e35e
SQL
talltechy/InsightVM-SQL-Queries-Reports
/Dev-ScratchPad/Junk-Old/2019_or_older/dev-test-aging_5.sql
UTF-8
565
3.90625
4
[ "BSD-3-Clause" ]
permissive
SELECT dss.site_id AS "Site ID", da.host_name, da.ip_address, dos.description AS "Operating System", fa.scan_started AS "Last Scan Date", ds.name AS "Software Name", ds.version AS "Software Version" FROM dim_asset da JOIN dim_operating_system dos ON dos.operating_system_id = da.operating_system_id JOIN fact_asset fa O...
true
7c7b646748016ce48931a8f1a4fd16cf8a8ce0f4
SQL
yisxa/php-node
/other/table.sql
UTF-8
653
2.859375
3
[]
no_license
CREATE TABLE `school`.`contacts` ( `id` INT(12) NOT NULL AUTO_INCREMENT , `first_name` VARCHAR(50) NOT NULL , `last_name` VARCHAR(50) NOT NULL , `cell_no` VARCHAR(50) NOT NULL , PRIMARY KEY (`id`)) ENGINE = InnoDB; $sql = "INSERT INTO `contacts` (`id`, `first_name`, `last_name`, `cell_no`) VALUES (NULL, \'abc\', \'bc...
true
99a76bb59ee66eb91e1bd797c3fa5c3645b581a6
SQL
AndreyE-lance/TestSQL
/requests/1ContractsListWithSubquery.sql
WINDOWS-1251
639
3.734375
4
[]
no_license
/****** 1) , , ( ) ******/ SELECT CONCAT(TRIM(Contracts.Name),' ', Contracts.Date) AS '', Employees.Name AS '', CONCAT((SELECT Form.Form FROM Form WHERE Form.ID_Form=Clients.Form),Clients.Name) AS '' FROM Contracts,Employees,Clients WHERE Contracts.Employe=Employees.ID_Emp AND Contra...
true
802fd96b11326c0ba59c086ea9b4bf6e7875d424
SQL
ivaneyvieira/separacaoRessuprimento
/src/main/resources/sqlSaci/findAbreviacoes.sql
UTF-8
159
2.796875
3
[]
no_license
SELECT MID(localizacao, 1, 4) AS abreviacoes FROM prdloc GROUP BY abreviacoes HAVING abreviacoes LIKE 'CD%' AND LENGTH(abreviacoes) = 4 ORDER BY abreviacoes
true
dc7aedd67c605738d2f869ee5d4d8733e52168f3
SQL
ljq199612/book
/IT/sql反模式/code/Random/soln/rand-1-to-max.sql
UTF-8
136
3.640625
4
[]
no_license
SELECT b1.* FROM Bugs AS b1 JOIN (SELECT CEIL(RAND() * (SELECT MAX(bug_id) FROM Bugs)) AS rand_id) AS b2 ON (b1.bug_id = b2.rand_id);
true
02288a118c260ef03ccc1fab9cfddf0d211d41c5
SQL
UKGANG/IST-659
/script/foreign_key/fk_reservation.sql
UTF-8
2,620
3.875
4
[ "MIT" ]
permissive
IF NOT EXISTS (SELECT TOP 1 1 FROM sys.foreign_key_columns fk WITH(NOLOCK) JOIN sys.tables t WITH(NOLOCK) ON fk.parent_object_id = t.object_id JOIN sys.columns c WITH(NOLOCK) ON fk.parent_object_id = c.object_id AND fk.parent_column_id = c.column_id JOIN sys.tables t2 WITH(NOLOCK) ON fk.referenced_object_id = t2.ob...
true
6b20db894407359512c506de013affcfd06222f9
SQL
vmahiwal/SSIS
/DBAdventureworksLTDW/DBAdventureworksLTDW/DBAdventureworksLTDW2012/SystemLog/Views/v_PackageSatistics.sql
UTF-8
581
3.296875
3
[]
no_license
CREATE VIEW [SystemLog].[v_PackageSatistics] AS SELECT StartLog.source AS PackageName, StartLog.sourceid AS PackageID, StartLog.executionid AS ExecutionID, StartLog.starttime AS PackageStartDate, EndLog.endtime AS PackageEndDate, StartLog.computer, StartLog.operator FROM dbo.sysssisl...
true
e203fb9a2790b63782bd8e345dcfeaa64723ba44
SQL
bronwen-cassidy/mhag-info
/mhag-web/db/createTables.sql
UTF-8
2,188
3.671875
4
[]
no_license
DROP TABLE IF EXISTS set_skills; DROP TABLE IF EXISTS user_votes CASCADE; DROP TABLE IF EXISTS saved_sets; DROP TABLE IF EXISTS users CASCADE; DROP TABLE IF EXISTS armour_skills; CREATE TABLE saved_sets ( ID BIGINT NOT NULL AUTO_INCREMENT PRIMARY KEY, USER_ID BIGINT, MH_VERSION INT NOT NULL,...
true
620bdfcc8da37588a71cf8a1d4563e3b211eb802
SQL
radtek/abs3
/sql/mmfo/bars/Function/getnewrnk.sql
WINDOWS-1251
937
2.53125
3
[]
no_license
PROMPT ===================================================================================== PROMPT *** Run *** ========== Scripts /Sql/BARS/function/getnewrnk.sql =========*** Run *** PROMPT ===================================================================================== CREATE OR REPLACE FUNCTION BA...
true
d1e4abfec54ad4b9ca01706119c1a04c7c3ac833
SQL
Zadid/-University-Management-system-website
/School/school.sql
UTF-8
7,283
3.28125
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.8.1 -- https://www.phpmyadmin.net/ -- -- Host: localhost -- Generation Time: Sep 22, 2018 at 11:12 PM -- Server version: 10.1.33-MariaDB -- PHP Version: 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
efcfcd90b3f85d99978afbdaf33095f788131c66
SQL
rwynne/nlmlegacymeme
/MEME/src/sql/ems/rxnormqa-51.sql
UTF-8
399
3.171875
3
[]
no_license
# 51. Concepts with merged SCUI, IN/IN or BN/BN atoms select distinct a.concept_id from classes a, classes b where a.source = (select current_name from source_version where source='RXNORM') and a.source=b.source and a.tty in ('IN','BN') and b.tty = a.tty and a.tobereleased in ('Y','y') and b.tobereleased in ...
true
f4547c22ca2b4bdf2a2e3de52f4d5608505a51d4
SQL
thluiz/sam-apinode
/database/Database/Database/Views/vw_AvgMostUsedLst30Days.sql
UTF-8
386
3.390625
3
[ "MIT" ]
permissive
 CREATE VIEW vw_AvgMostUsedLst30Days AS SELECT TOP 100 PERCENT 'Most used' AS Comment, dbName, objectName, indexName, partitionNumber, AVG(range_scan_count) AS Avg_range_scan_count FROM dbo.tbl_AdaptiveIndexDefrag_Working WHERE defragDate >= DATEADD(dd, DATEDIFF(dd, 0, getUTCdate()), -30) GROUP BY dbName, objectName,...
true
f6561ec6c8f3b4ed3bcdfd0527dbe885e2efbb22
SQL
umairsajid/my-random-cpp-libraries
/projects/undergraduate/cs238/hw_steelman.sql
UTF-8
7,615
3.65625
4
[]
no_license
/* @auth Gary Steelman @file steelman.sql @date 6 Apr 2010 @class CS238 - Dan Lin */ /*DROP TABLE DEPARTMENT CASCADE CONSTRAINTS; DROP TABLE EMPLOYEE CASCADE CONSTRAINTS; DROP TABLE DEPT_LOCATIONS CASCADE CONSTRAINTS; DROP TABLE PROJECT CASCADE CONSTRAINTS; DROP TABLE WORKS_ON CASCADE CONSTRAINTS; ...
true
523aa93502634fb000f5870f037b93256105870b
SQL
CaseyQWood/bootcampx
/3_queries_group_by.sql/assignments_per_day.sql
UTF-8
64
2.6875
3
[]
no_license
SELECT day, count(id) FROM assignments GROUP BY day ORDER BY day
true
a8e7c29dfaebc8af5dc882bc6bd9d5348e8c7f81
SQL
marcAndreTremblay/LOG660
/DBOracle/DBOracle/Scripts/table_Étoile.sql
UTF-8
2,100
3.640625
4
[]
no_license
-- This query will display the current date SELECT SYSDATE FROM DUAL; DROP TABLE LocationEtoile CASCADE CONSTRAINTS; DROP TABLE FilmEtoile; DROP TABLE ClientEtoile; DROP TABLE TempsEtoile; CREATE TABLE FilmEtoile (Film_ID INTEGER GENERATED ALWAYS as IDENTITY(START with 1 INCREMENT by 1), Titre VARCHAR(100), Annee ...
true
8ae79d4b6e73aed82e9b07a73372ff50c741b765
SQL
jimmyale3102/StockManage
/prueba.sql
UTF-8
13,525
3.046875
3
[]
no_license
-- MySQL dump 10.16 Distrib 10.1.38-MariaDB, for Win32 (AMD64) -- -- Host: localhost Database: ferreteriacolmex -- ------------------------------------------------------ -- Server version 10.1.38-MariaDB /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHA...
true
60ada11918375de11919c62bebd8fb5181e93923
SQL
zhangshity/aysos
/basic/src/main/java/com/zcy/spring/transaction/sql_script/student.sql
UTF-8
672
3.671875
4
[]
no_license
truncate table student; select * from student; CREATE TABLE student ( id int(11) NOT NULL AUTO_INCREMENT, name varchar(255) DEFAULT NULL, age int(11) DEFAULT NULL, create_time TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, version int(11) NOT NULL DEF...
true
96c0cc7c35a5f69077c3449afbd366d9456451b1
SQL
amasse-1/SQL_in_10_minutes
/Lesson10_Grouping_Data.sql
UTF-8
1,764
4.28125
4
[]
no_license
--Lesson 10: Grouping DATABASE --creating groups SELECT vend_id, count(*) AS num_prods FROM Products GROUP BY vend_id; --Filtering groups SELECT cust_id, count(*) AS orders FROM Orders GROUP BY cust_id HAVING count(*) >= 2; SELECT vend_id, count(*) AS num_prods FROM Products WHERE prod_price >=4 GROUP BY ven...
true
feec567647e8d17555d51173a53d35698187c4bf
SQL
hyelljs/jsp2
/scripts/freeboard.sql
UHC
5,346
3.859375
4
[]
no_license
-- Խ : ̺2 (α, ) create table freeboard( idx int not null auto_increment, name varchar(30) not null, -- ۼ password varchar(10) not null, -- ۺйȣ(ʿҶ ) subject varchar(40) not null, -- content varchar(2000) not null, -- readCount int default 0, -- ȸ wdate datetime default current_timestamp, -- 糯¥/ð ip va...
true
294d3f4d2381f86321118f8900dc7d993aeb4b60
SQL
claudio-scandura/kafka-to-postgres-projections
/src/main/resources/db/migration/V1__setup_schema.sql
UTF-8
1,169
3.921875
4
[]
no_license
-- The offset store as required and defined by Akka Projection JDBC CREATE TABLE IF NOT EXISTS akka_projection_offset_store ( projection_name VARCHAR(255) NOT NULL, projection_key VARCHAR(255) NOT NULL, current_offset VARCHAR(255) NOT NULL, manifest VARCHAR(4) NOT NULL, mergeable BOOLEAN NOT NULL, ...
true
402c44c5af3a2f83bf5640ce3472d52d9cef95dd
SQL
pi-controltime/controltime
/tools/data base/scripts/SCRIPT TRIGGERS.sql
UTF-8
9,915
3.28125
3
[ "MIT", "LicenseRef-scancode-unknown-license-reference" ]
permissive
-- Script que contiene los disparadores ( Triggers ) para las tablas de auditoria -- David Zambrano -- 01-11-2017 -- TRIGGER PARA LA TABLA AREAS -- INSERT CREATE OR REPLACE TRIGGER TR_INSERT_AREAS AFTER INSERT ON AREAS FOR EACH ROW BEGIN INSERT INTO AUD_AREAS( AREA_CODIGO, AREA_NOMBRE, AREA_FEC...
true
112a5904aeb70315158c47386c92fe4cf42626b6
SQL
danieldiamond/gitlab-analytics
/transform/snowflake-dbt/models/sources/sheetload/sheetload_procurement_cost_savings_source.sql
UTF-8
791
3.015625
3
[ "LicenseRef-scancode-unknown-license-reference", "MIT" ]
permissive
WITH source AS ( SELECT * FROM {{ source('sheetload', 'procurement_cost_savings') }} ), renamed AS ( SELECT calendar_month::DATE AS calendar_month, TRY_TO_DECIMAL(REPLACE(REPLACE(savings,'$'),','), 14, 2) ...
true
7fcd29c21f3e092e727c8dd0c55d5500054d6dc0
SQL
superStyle205/FFSE1801_1802_Java_core
/ftCafeProject/ftCafe.sql
UTF-8
11,598
3.40625
3
[]
no_license
-- -------------------------------------------------------- -- Host: 127.0.0.1 -- Server version: 8.0.13 - MySQL Community Server - GPL -- Server OS: Win64 -- HeidiSQL Version: 10.1.0.5464 -- -------------------------------------------------------- /...
true
652d441fc5af2cc15b173b302107b9cad9e7191f
SQL
adityapeen/pinjaman
/pinjaman.sql
UTF-8
1,670
3.125
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.8.5 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Apr 04, 2019 at 05:25 AM -- Server version: 10.1.38-MariaDB -- PHP Version: 7.3.3 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD...
true
fa7949ce6636f285e49ea4c18d8b059a3bbb56cd
SQL
opu-yokotalab/learn-mk-exam
/xml/question/pointer2/point1_2_79.sql
SHIFT_JIS
1,067
2.75
3
[]
no_license
insert into question values ('79','point1','2', '<?xml version="1.0" encoding="shift_JIS" ?> <program_set id="point1"> <item id="79" type="fill_in_the_blank"><question> int b[3][2][4];̑Svf̃AhX\vO쐬AsB<br/> ȉɃ\[XR[hƁAsʂ̈\B<br/> [ A ][ B ]ɓĂ͂܂͉̂ł傤B<br/><br/> <pre> #include&lt;stdio.h&gt; int main(void){ int i,j,k; int...
true
9541cdad94ffd15e9ecacf30fce1ad0c77c2b034
SQL
santosyssa/2-Sprint
/Livro/Banco de Dados - T_BookStore.sql
ISO-8859-1
1,155
3.703125
4
[]
no_license
CREATE DATABASE T_BookStore ; USE T_BookStore; CREATE TABLE Generos ( IdGenero INT PRIMARY KEY IDENTITY ,Descricao VARCHAR(200) NOT NULL UNIQUE ); CREATE TABLE Autores ( IdAutor INT PRIMARY KEY IDENTITY ,Nome VARCHAR(200) ,Email VARCHAR(255) UNIQUE ...
true
af805dda9470ecc64336457bf673dd4f14fa54fa
SQL
IgorPerikov/yapp
/yapp-messaging/src/main/resources/db/migration/V001__messages_table.sql
UTF-8
200
2.78125
3
[ "MIT" ]
permissive
CREATE TABLE messages ( id SERIAL PRIMARY KEY, text VARCHAR(1000) NOT NULL, "from" INTEGER NOT NULL, "to" INTEGER NOT NULL, date timestamp DEFAULT current_timestamp );
true
459f972bc5744062d6013ad77a234e0738dde740
SQL
rjongeneel/sql
/upd_tab_with_case.sql
UTF-8
787
3.5625
4
[]
no_license
/* upd_tab_with_case.sql */ /* Raymond Jongeneel */ /* 13 juli 2012 : created */ /* update example for updating a table with a case statement */ whenever sqlerror then continue; drop table rj_test01; prompt Creating rj_test01 and insert test data create table rj_test01 (a varchar2(10), b varcha...
true
87004906de130d25270d48b60093dd18f706bf93
SQL
monteiroluana/catalogo-django
/banco.sql
UTF-8
1,039
3.25
3
[]
no_license
create table artista( id serial NOT NULL, nome text NULL, img_url text NULL, nasc date NULL, CONSTRAINT usuario_pkey PRIMARY KEY (id) ); CREATE TABLE disco ( id serial NOT NULL, artista_id int NULL, titulo text NULL, youtube_url text NULL, lancamento text NULL, img_url text NULL, CONSTRAINT disco_pk PRIMA...
true
a19e7b4ccc505469433815e7044e5f459047dd78
SQL
preejer1/sellingbook
/sql/DBSCRIPT.sql
UTF-8
1,686
3.765625
4
[]
no_license
DROP TABLE REPLY_TB; DROP TABLE book_tb; DROP TABLE user_tb; drop sequence user_id_seq; --user create table user_tb( USER_ID INTEGER NOT NULL, USER_EMAIL VARCHAR(50) NOT NULL , USER_PASSWORD VARCHAR(25) NOT NULL, USER_NICKNAME VARCHAR(25) ); ALTER TABLE USER_TB ADD (CONSTRAINT user_tb_...
true
3d889c7e5efe6cb9bd3f227c3ce32b758a02af14
SQL
Taewii/database-fundamentals
/Database Basics/Closed Judge System - 24 Jun 2017/p02_data_insertion.sql
UTF-8
221
3.03125
3
[]
no_license
insert into submissions(passed_tests, problem_id, user_id) select ceil(sqrt(pow(length(name), 3)) - length(name)) as passed_tests, id as problem_id, ceil((id * 3) / 2) as user_id from problems where id between 1 and 10;
true
66b5274a27bdc0a234cd300d24b36aa311d263f0
SQL
folcotandiono/WebLanjutan
/web_lanjutan.sql
UTF-8
2,089
3.140625
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.8.0 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Jun 29, 2019 at 03:53 PM -- Server version: 10.1.31-MariaDB -- PHP Version: 5.6.35 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OL...
true
c25febe3aeef79789aa8e513f7f61a2f4960bee8
SQL
mck368/AD320_FinalProject
/iLoveMovies.sql
UTF-8
3,938
3.34375
3
[]
no_license
/*ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'password';*/ DROP DATABASE IF EXISTS iLoveMovies; CREATE DATABASE IF NOT EXISTS iLoveMovies; USE iLoveMovies; -- ----------------------------------------------------------------------------------------------------------------------------------...
true
2d6bf8a0a368dfffa0b71092f771d9a5b7f3a8eb
SQL
nahmed23/lifetime_DataOps.OnPrem
/lifetime_DataOps.OnPrem/dbo/Views/vMemberAccountBalance.sql
UTF-8
213
2.515625
3
[]
no_license
CREATE VIEW dbo.vMemberAccountBalance AS SELECT MemberAccountBalanceID,CreditCardUserID,CurrentBalance,EFTAmount,CommitedBalance,InsertedDateTime,UpdatedDateTime FROM MMS.dbo.MemberAccountBalance WITH(NOLOCK)
true
e82352a213186ab4b74c693c5329955af5d7a0b7
SQL
qhit2017/GR1702_01
/④SQLServer数据库/1702—作业—12.27/第一阶段/1702_王帅杰_12.27/SQLemps.sql
GB18030
3,830
4.125
4
[]
no_license
CREATE database tb_EMPs ---ԱϢ CREATE table tb_emp( emono nvarchar(32)primary key, ename nvarchar(32) not null, job nvarchar(16), mgr nvarchar(32), hiredate date, sal money, comm money, deptno nvarchar(32), foreign key(deptno) references tb_dept(deptno), foreign key(mgr) references tb_superior(mgr) ) ------ű CREATE tab...
true
374e66ec1e2f42c23989ef77ab512c078150fa99
SQL
yeon4032/STUDY
/GIT_NOTE/01_SQL_workplace/chap3_SELECT/select_exam04(완성).sql
UTF-8
2,219
4.4375
4
[]
no_license
-- <최종 연습문제> -- [문1] emp에서 30번 부서에 근무하는 사원의 이름, 급여, 사번 출력하기 -- 사용 칼럼명 : 이름(ename),급여(sal),사번(empno) 출력하기 select ename, sal, empno from emp where deptno = 30; -- [문2] student 테이블의 전체 학생들을 대상으로 다음 예)와 같이 출력하기 -- 예) 홍길동의 키는 175cm, 몸무게는 65kg입니다. -- 사용 컬럼명 : 키(height), 몸무게(weight) select name ||'의 키는'||height||'cm,'||'...
true
32c7eec11d1859507201ed4b555d7be5ba5a3a82
SQL
1701040016/1701040016_nguyenquocbao
/TUT_04_se2/sql.sql
UTF-8
8,268
3.359375
3
[]
no_license
/* Create new database */ CREATE DATABASE USERDB; /* Use this database */ USE USERDB; /* Create new table */ CREATE TABLE USER ( ID INT NOT NULL AUTO_INCREMENT, NAME VARCHAR(30) NOT NULL, ADDRESS VARCHAR(50) NOT NULL, MOBILE VARCHAR(10) NOT NULL, PRIMARY KEY(ID)); /* Insert data to this table */ INSERT INTO USER (NAME,...
true
c733c7f7d226f8737f4cacf3895522ac77f882e4
SQL
ahundiak/zayso2010
/osso2010/model/sql/views/reg_view.sql
UTF-8
1,600
3.5625
4
[]
no_license
-- ========================================= -- Grabs the info needed by the user object -- Really don't need phones/emails -- Get name and region from account information DROP VIEW IF EXISTS reg_view_user; CREATE VIEW reg_view_user AS SELECT reg_main.reg_type AS reg_typex, -- need for joins reg_mai...
true
fc7506f1ac91d0dc3afb35bdf841fc016f294cd0
SQL
ch3rrydrunk/PHP-Bootcamp
/D05/ex07/ex07.sql
UTF-8
118
2.625
3
[]
no_license
SELECT `title`, `summary` FROM film WHERE (`title` LIKE "%42%" OR `summary` LIKE "%42%") ORDER BY `duration`;
true
2de2f672583f58f3a418e2bc6f57b555c6106870
SQL
matthisServoz/Maison-Ecolo-PHP
/bdd/14_01_2021_19h47.sql
ISO-8859-1
14,357
3.203125
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 5.0.2 -- https://www.phpmyadmin.net/ -- -- Hte : 127.0.0.1:3306 -- Gnr le : jeu. 14 jan. 2021 18:47 -- Version du serveur : 5.7.31 -- Version de PHP : 7.3.21 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT...
true
ac2a10aa6e8e0557940a5ba75ab2cbfa0ea1aca1
SQL
KimJeongnam/Kim.Jeongnam.bookstore.java.ver2
/bin/src/db/newfile.sql
UTF-8
1,619
4.03125
4
[]
no_license
SET SESSION FOREIGN_KEY_CHECKS=0; /* Drop Tables */ DROP TABLE IF EXISTS CARTS; DROP TABLE IF EXISTS orders; DROP TABLE IF EXISTS BOOKS; DROP TABLE IF EXISTS USERS; DROP TABLE IF EXISTS PERMISSIONS; /* Create Tables */ CREATE TABLE BOOKS ( book_id int(4) NOT NULL, book_name varchar(30) NOT NULL, author varcha...
true
7c6314876ce47dec16554449d461918a7636faf6
SQL
jetsal/202103data_analytics_module_1
/labs/module_1/mySQL/Challenge output/create.sql
UTF-8
1,493
3.75
4
[]
no_license
USE lab_mysql; CREATE TABLE car( car_ID INT NOT NULL AUTO_INCREMENT, VIN VARCHAR(255) NOT NULL, manufacturer VARCHAR(255), model VARCHAR(255), builtyear YEAR, color VARCHAR(255), PRIMARY KEY(car_ID) ); CREATE TABLE customer( cust_ID INT NOT NULL AUTO_INCREMENT, cust_name VARCHAR(255), phone INT, email VARCHAR(255), a...
true
d4bb1329319e0c5a85c189528e4e3c64325e4b3c
SQL
Mtibay/WQMD_project
/wqmd.sql
UTF-8
5,366
2.984375
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.8.3 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Nov 03, 2018 at 01:56 AM -- Server version: 10.1.35-MariaDB -- PHP Version: 7.2.9 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD...
true
59a30b29c18cde8601a53eed8913b2072eaec9e3
SQL
Texas-poker-game/cpay-service
/sql/schema.sql
UTF-8
2,137
3.3125
3
[]
no_license
CREATE TABLE `eos_auth_tokens` ( `token` varchar(43) NOT NULL, `token_sha256` varchar(64) NOT NULL, `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, `eos_account` char(12) NOT NULL, `status` tinyint(...
true
a4b812e93a2f778cbba39d6d382e184ac98a269a
SQL
hakkbulutsereme/dynamic-commet
/sql/icerikler.sql
UTF-8
2,801
3.234375
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.6.5.2 -- https://www.phpmyadmin.net/ -- -- Anamakine: 127.0.0.1 -- Üretim Zamanı: 03 May 2019, 19:03:25 -- Sunucu sürümü: 10.1.21-MariaDB -- PHP Sürümü: 5.6.30 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_...
true
68a0d4c52d183b71e889f63f7c137cbdd0f41883
SQL
NavneelSinghal/DBMS-Assignments
/a2/queries/part-3.sql
UTF-8
196
3.125
3
[]
no_license
select airports.city as name from path, airports where path.originairportid = 10140 and path.destairportid = airports.airportid group by airports.city having count(*) = 1 order by airports.city;
true
894461977934fdf4adb84e300120fb7d1084950d
SQL
ATBMHTTT-2017/lab01-1412220-1
/policy_02_03_04_1412220.sql
UTF-8
1,397
3.71875
4
[ "Apache-2.0" ]
permissive
create role truongchinhanh; create role truongphong; create role truongduan; create role nhanvien; create role giamdoc; --2 GRANT SELECT on HR.CHINHANH to NHANVIEN; GRANT SELECT on HR.PHONGBAN to NHANVIEN; GRANT SELECT,update on HR.NHANVIEN to NHANVIEN; GRANT SELECT ON HR.DUAN TO NHANVIEN; GRANT SELECT ON H...
true
606d924f3062e35c7dae3136b27b6b59bef3eac8
SQL
dorucioclea/api-gateway
/t1g-distro/general/ddls/update_v0.10.5_to_v0.10.6.sql
UTF-8
6,378
2.90625
3
[]
no_license
UPDATE policydefs SET form = '{ "type": "object", "title": "CORS", "properties": { "methods": { "type": "array", "items": { "title": "Methods", "type": "string", "pattern": "^POST$|^GET$|^HEAD$|^PUT$|^PATCH$|^DELETE$", "validationMessage": "Should be one of: GET,HEA...
true
21bb0d3afee866485b90f4a52735fc8f1557a70a
SQL
albertomattos/SQL_gerais
/Medview - prescrição por data de digitação.sql
UTF-8
365
3.640625
4
[]
no_license
select t.cod_pac, v.nome_pac, t.leito, t.codigo, w.descricao, t.data_hora_ini from prescricao_pac t, fapaccad u, faprtcad v, faprdcad w where t.cod_pac = u.cod_pac and u.cod_prt = v.cod_prt and t.codigo = w.codigo and t.data_hora_ini between to_date('2013/03/26','YYYY/MM/DD HH24:MI') and to_date('2013/03/27','YYYY/MM/D...
true
f2d8e88fe065bf5ab3ec0e947b81126e6eab5f6d
SQL
lhpustc/Stduents-Academic-System
/procedures and func/proc_enroll.sql
UTF-8
1,213
3.5
4
[]
no_license
delimiter // create procedure enroll(IN sid char(4),IN cid char(8),IN next_q INT) begin declare c_code char(8); declare max_enroll int; declare enroll int; declare quarter char(2); declare cyear char(4); declare stat INT; set quarter=get_quarter(); set cyear=year(sysdate()); if next_q=1 then if quarter="Q1" then ...
true
cb48c89557de7bcb1678a7df31a2f1c8ba8a598b
SQL
realtymaps/map
/migrations/old/main/2016-08-01__data_combined_simplify.sql
UTF-8
639
3.390625
3
[]
no_license
-- .000002 -- number is from experimenting with the below commented queries -- they allow you to see what your potentially losing when simplifying the shapes -- SELECT avg(ST_NPoints(st_simplify(geometry_raw, .000002))) from data_combined; -- SELECT sum(ST_NPoints(geometry_raw)) from data_combined; update data_combine...
true
61278162dfe385e9b77ed7e8fd9d7dadd5802d34
SQL
mukaruernest/M-Kopa-mini-challenge
/MKopaSQLChallenge.sql
UTF-8
3,267
4.84375
5
[]
no_license
#1. Select all the male customers from outside Nairobi. SELECT * FROM assessmentcustomers WHERE Gender = 'Male' AND Town != 'Nairobi'; #2. Select all the customers with an extra column containing the age they were when they joined. Name this column AgeWhenJoining. SELECT *, YEAR(JoiningDate) - YEAR(DateofBirth) AS Age...
true
00d096ecdd632f34f8b5f017db198ebe2cbe167e
SQL
dylaanliu/Smith-Sustainability-Studies
/support/Clean/createConditionGroupPhaseTable.sql
UTF-8
1,385
3.5
4
[]
no_license
-- SQL script to initialize the study table. -- first, remove then create database -- DROP DATABASE `cisc498`; -- CREATE DATABASE `cisc498`; -- ALTER DATABASE `cisc498` CHARACTER SET utf8 COLLATE utf8_bin; -- use `cisc498`; -- create condition group phase table and fill it with values DROP TABLE IF EXISTS conditionGr...
true
70f51d9574c7d03b5c772910d33a1beb7fcada37
SQL
PabloOssola/M4Trader-M4Trader-V0.1
/MonedasDB/shared_owner/Tables/RuedasBySecurityList.sql
UTF-8
752
2.796875
3
[]
no_license
CREATE TABLE [shared_owner].[RuedasBySecurityList] ( [IdRuedaBySecurityList] TINYINT CONSTRAINT [DF__RuedasBySecurityList__IdRuedaBySecurityList] DEFAULT (NEXT VALUE FOR [shared_owner].[SQ_RuedasBySecurityList]) NOT NULL, [Codigo] VARCHAR (5) NOT NULL, [Descripcion] VARCHAR (50) NOT NULL, [...
true
48078199347211d7c0a176ab20009d932104c2db
SQL
arnekva/2019-DAT109-Modelldrevet-utvikling-22
/UMPLE/generertSQL.sql
UTF-8
4,606
2.96875
3
[]
no_license
//%% NEW FILE Stand BEGINS HERE %% -- PLEASE DO NOT EDIT THIS CODE -- This code was generated using the UMPLE 1.29.1.4448.81a70243a modeling language! CREATE TABLE IF NOT EXISTS `stand` ( /*------------------------*/ /* MEMBER VARIABLES */ /*------------------------*/ /*stand Attributes*/ standid I...
true
3d674217c6279f808257a7d7fd27232112d8e0cf
SQL
DalavanCloud/hawq
/src/test/regress/sql/co_nestloop_idxscan.sql
UTF-8
1,298
3.9375
4
[ "MIT", "BSD-4-Clause-UC", "BSD-3-Clause", "ISC", "bzip2-1.0.6", "Apache-2.0", "LicenseRef-scancode-unknown-license-reference", "BSD-4-Clause", "Artistic-2.0", "PostgreSQL", "LicenseRef-scancode-unknown" ]
permissive
-- -- Nested loop join with index scan on CO table, test for MPP-17658 -- create schema co_nestloop_idxscan; create table co_nestloop_idxscan.foo (id bigint, data text) with (appendonly=true, orientation=column) distributed by (id); create table co_nestloop_idxscan.bar (id bigint) distributed by (id); -- Changing th...
true
82a71dca3d052bb58d27e777345b07d50249b0b9
SQL
l11vdo/fanbase
/counties.sql
UTF-8
2,270
2.796875
3
[ "MIT" ]
permissive
-- -- Table structure for table `counties` -- CREATE TABLE IF NOT EXISTS `fb_counties` ( `countyID` smallint(5) unsigned NOT NULL auto_increment, `county` varchar(50) NOT NULL, PRIMARY KEY (`countyID`) ) ENGINE=InnoDB; -- -- Dumping data for table `counties` -- INSERT INTO `fb_counties` (`county...
true
ecb7578020dd443c0b34426f264855d945630d76
SQL
ivancekic/sql-data-analysis-part-two
/PLate/kreditori provera entera u polju.sql
UTF-8
586
2.9375
3
[ "MIT" ]
permissive
select instr(poziv_na_broj,chr(10)) en, substr(poziv_na_broj,1,17) ennn, instr(substr(poziv_na_broj,1,17),chr(10)) eee, k.* from kreditori k where -- instr(kreditor,chr(10)) > 0 or instr(kreditor,chr(13)) > 0 -- or --instr(NAZIV_KREDITORA,chr(10)) > 0 or instr(NAZIV_KREDITORA,chr(13)) > 0 -- ...
true
eddd053c762c530490a237ae95d307c64ef1b6d8
SQL
standardgalactic/learning-programming
/postgresql-basics/payment-routing/sql/payment_routing_data.sql
UTF-8
8,075
3
3
[]
no_license
-- IBAN structure SELECT payment.put_iban_structure( a_iban_country_code := 'BE', a_iban_country_code_position := 1, a_iban_country_code_length := 2, a_iban_check_digits_position := 3, a_iban_check_digits_length := 2, a_bank_identifier_position := 5, a_bank_identifier_length := 3, a_iba...
true
b15eadf1b3bb738732a929477c384d2279058446
SQL
markmo/insight
/database/schema.ddl
UTF-8
6,549
3.390625
3
[ "MIT" ]
permissive
CREATE TABLE public.bankers ( banker_id INTEGER NOT NULL, firstname VARCHAR(100) NOT NULL, lastname VARCHAR(100) NOT NULL, CONSTRAINT bankers_pk PRIMARY KEY (banker_id) ); CREATE TABLE public.sections ( section_id INTEGER NOT NULL, ...
true
eabc68a2d432586adf1303b9fa8f9f94dfa268e8
SQL
OHI-Science/ohiprep_v2018
/globalprep/res_cbd_habitat/archive/Resilience_Matrix/import.sql
UTF-8
398
2.875
3
[]
no_license
SET search_path TO global; CREATE OR REPLACE VIEW v_resilience_layers AS SELECT type, category, layer, l.value AS weight, id, d.value FROM resilience_layers l JOIN resilience_layer_data d USING (layer) WHERE d.value IS NOT NULL ORDER BY type, category, layer, id ; \o data/global_v_resilience_layers...
true
9dc7b7dbb0f1db4964806d81e7a62696918e168a
SQL
kawabata-neolis/KATO
/KATO/SQL/C0500_UrikakekinZandakaIchiranKakunin/C0500_UrikakekinZan_Print_SELECT.sql
UTF-8
7,820
2.96875
3
[]
no_license
SELECT コード, 得意先名, 年月, 前月売掛残, 入金現金, 入金小切手, 入金振込, 入金手形, 入金相殺, 入金手数料, 入金その他, 繰越残高, 当月売上高, 当月消費税, 当月残高, 税区, フリガナ FROM( SELECT T.取引先コード As コード , T.取引先名称 AS 得意先名 , CONVERT(CHAR(7),DATEADD(d,1,K.年月日),111) AS 年月, dbo.f_get売掛残高一覧表_繰越残高FROM取引先経理情報(T.取引先コード,DATEADD(d,1,K.年月日) )...
true
09250c60d2ab1de639aa0deea77f77ed25218e23
SQL
mahfuz-aftab/express-mysql-graphql-site-locator
/db-express-graphql-site-locator.sql
UTF-8
2,407
3.140625
3
[ "MIT" ]
permissive
-- phpMyAdmin SQL Dump -- version 5.0.2 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Jun 27, 2020 at 02:33 AM -- Server version: 10.4.11-MariaDB -- PHP Version: 7.4.6 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIEN...
true
024490fcf3cefefa85193527fa103e30ce40a390
SQL
MariusArhaug/Diiine
/db/middag-database.sql
UTF-8
5,787
3.5
4
[ "Apache-2.0" ]
permissive
-- 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 mydb -- -...
true
ece61e833136797c55e0a33c38559e8c5e8f9b6b
SQL
Orange-OpenSource/optisam-backend
/simulation-service/pkg/repository/v1/postgres/schema/1_initial_schema.sql
UTF-8
436
2.796875
3
[ "Apache-2.0" ]
permissive
-- +migrate Up -- SQL in section 'Up' is executed when this migration is applied Grant ALL ON ALL TABLES IN SCHEMA "public" TO optisam_app_user; Grant ALL ON ALL SEQUENCES IN SCHEMA "public" TO optisam_app_user; -- +migrate Down -- SQL in section 'Up' is executed when this migration is applied REVOKE ALL ON ALL SEQU...
true
d503a94f7f5c1d990f54e0f74c4d9ba46acb20ca
SQL
marianhtuyet/NhapMonCongNghePhanMem
/WIP/Document/ER/SQLQuery2.sql
UTF-8
1,108
2.9375
3
[]
no_license
create table NAMHOC { MaNamHoc char(8) primary key, TenNamHoc varchar(40) } create table HOCKY { MaHocKy char(6) primary key, TenHK varchar(20), HeSoHK int } create table KHOILOP { MaKhoi char(6) primary key, TenKhoi varchar(20) } create table LOPHOC { MaLop char(6) primary key, TenLop varchar(20), Ma...
true
e62f18f63ba0195051228a7f3a1b78e9fbdd7c78
SQL
EdmarAugusto35/Cliente
/banco da sa.sql
UTF-8
1,681
2.84375
3
[]
no_license
create database IDE; use IDE; create table cliente( id int auto_increment primary key, nome varchar(50), sexo char(1), cpf varchar(11), rg varchar (11), estadoCivil varchar(50), endereco varchar(50), bairro varchar(50), cidade varchar(50), estado varchar(50), cep varchar (50), datadeNac varchar(8), celula varchar (9), ...
true
62953b0159033932498cc70370fdd780fddd61e2
SQL
marshmallowdefender/zOMBIE-Survival
/db/schema.sql
UTF-8
842
3.484375
3
[]
no_license
--When setting up schema files, put tables with foreign constraints first -- DROP TABLE IF EXISTS bob; DROP TABLE IF EXISTS weapons; DROP TABLE IF EXISTS beverages; DROP TABLE IF EXISTS tips; CREATE TABLE weapons ( id SERIAL PRIMARY KEY, name VARCHAR(255) UNIQUE NOT NULL, description VARCHAR(255) NOT NU...
true
1dbaec5ce1cd79b05a94edde671e3057ab9a6740
SQL
fishman110/Docker-1
/xnhd_gm/install/web/sql/xnhd_base.sql
UTF-8
23,417
3.34375
3
[]
no_license
-- -------------------------------------------------------- -- 主机: 192.168.75.22 -- 服务器版本: 5.6.31 - MySQL Community Server (GPL) -- 服务器操作系统: Linux -- HeidiSQL 版本: 9.4.0.5130 -- ---------------------------------------------------...
true
0198767a705f540c72d221bd544acc0a8f66dea6
SQL
Heatao/myLeetCode
/src/sql/185.sql
UTF-8
1,051
4.59375
5
[]
no_license
-- 185 部门工资前三高的所有员工 -- 没做出来,参考评论区高斯恍惚同学 -- 对于这种分组内取前几名的问题,可以先group by然后用having count()来筛选 -- 比如这题,找每个部门的工资前三名,那么先在子查询中用Employee和自己做连接, -- 连接条件是【部门相同但是工资比我高】,那么接下来按照having count(Salary) <= 2来筛选的原理是: -- 如果【跟我一个部门而且工资比我高的人数】不超过2个,那么我一定是部门工资前三 select d.Name as Department,e.Name as Employee,e.Salary as Salary from Employee...
true
a92ec8de72f225196a3714b6dc2e8dc4c48bb2cd
SQL
papauschek/cointape
/conf/evolutions/default/1.sql
UTF-8
1,496
4.15625
4
[ "MIT" ]
permissive
# initial # --- !Ups CREATE TABLE block ( id serial NOT NULL, height int NOT NULL, hash char(64) NOT NULL, -- 256 bit hash parent_hash char(64) NOT NULL, -- 256 bit hash create_date timestamp NOT NULL, min_fee bigint NOT NULL, tx_count int NOT NULL, known_count int NOT NULL, size i...
true
1276bf3f561c937608e4ebf6d344174dcc783cb9
SQL
silence-do-good/stress-test-Postgres-and-MySQL
/dump/high/day26/select0907.sql
UTF-8
178
2.625
3
[]
no_license
SELECT timeStamp, temperature FROM ThermometerOBSERVATION o WHERE timestamp>'2017-11-25T09:07:00Z' AND timestamp<'2017-11-26T09:07:00Z' AND temperature>=30 AND temperature<=67
true
dab051b218416f155b5d44565e51348b35aa8674
SQL
qmwu2000/workshop
/app/app-bes-console/src/main/design/sp_fetch_events.sql
UTF-8
1,393
3.765625
4
[]
no_license
DELIMITER $$; DROP PROCEDURE IF EXISTS sp_fetch_events $$ CREATE PROCEDURE sp_fetch_events (p_event_type CHAR(32), p_consumer_type CHAR(32), p_consumer_id CHAR(32), OUT p_batch_id INT) MODIFIES SQL DATA BEGIN DECLARE v_last_fetched_id INT; DECLARE v_min_event_id INT; DECLARE v_max_event_id INT; SELE...
true
e4c270212787042d5b0d95588b764b21fa5fe32e
SQL
barekb/project_php_link
/Untitled.sql
UTF-8
323
3.1875
3
[]
no_license
CREATE TABLE `user` ( `id` int PRIMARY KEY AUTO_INCREMENT, `nickname` varchar(255), `password` varchar(255) ); CREATE TABLE `link` ( `id` int PRIMARY KEY, `name` varchar(255), `url` varchar(255), `desc` varchar(255), `userId` int ); ALTER TABLE `link` ADD FOREIGN KEY (`userId`) REFERENCES `user` (`id`...
true
c4baaf5d0f3aac9128d427ea40f30906392ed48d
SQL
ka10a/DIHT
/DataBases/SQL/073.SQL
UTF-8
377
4.28125
4
[]
no_license
WITH t AS (SELECT country, battle FROM Outcomes INNER JOIN Classes ON Classes.class=Outcomes.ship UNION SELECT country, battle FROM Outcomes INNER JOIN Ships ON Ships.name=Outcomes.ship INNER JOIN Classes ON Ships.class=Classes.class) SELECT DISTINCT country, name FROM Classes, Battles WHERE country NOT IN (SELECT t.c...
true
e1de7bbe1ce463ed6d01b457b4a253c25cbdc34d
SQL
Pivil/time_manager
/dump.sql
UTF-8
1,758
3.328125
3
[]
no_license
DROP TABLE IF EXISTS `clock`; CREATE TABLE `clock` ( `userId` int NOT NULL, `clock_in` datetime NOT NULL, `clock_out` datetime NOT NULL, `status` tinyint DEFAULT NULL, PRIMARY KEY (`userId`,`clock_in`,`clock_out`), CONSTRAINT `fk_userId` FOREIGN KEY (`userId`) REFERENCES `user` (`id`) ) ENGINE=InnoDB DEFAU...
true
b8bf0f69c75a7505e53bba78b6a785588211a144
SQL
63r0z4p/seratic-prueba
/login/usuario.sql
UTF-8
1,229
2.546875
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 5.1.1 -- https://www.phpmyadmin.net/ -- -- Servidor: 127.0.0.1 -- Tiempo de generación: 25-07-2021 a las 04:19:52 -- Versión del servidor: 10.4.20-MariaDB -- Versión de PHP: 7.3.29 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD...
true
c8d85bc47e9b89beb3c8d1b95c48d552b7ebded6
SQL
chidihn/sql
/TH/Tuan 2/test.sql
UTF-8
7,292
4.21875
4
[]
no_license
--11. Tìm các số hóa đơn đã mua sản phẩm có mã số “BB01” hoặc “BB02”. SELECT SOHD FROM CTHD WHERE MASP IN ('BB01', 'BB02') --12. Tìm các số hóa đơn đã mua sản phẩm có mã số “BB01” hoặc “BB02”, mỗi sản phẩm mua với số lượng từ 10 đến 20. SELECT SOHD FROM CTHD WHERE MASP IN ('BB01', 'BB02') AND SL BETWEEN 10 AND 20 --13...
true
1a2e7e77a0983057f529f21ccbcbb901b010bb18
SQL
CRSantiago/Code-Wars-Challanges
/SQL/7-KYU-sorting_hat.sql
UTF-8
870
3.59375
4
[]
no_license
-- There is truly no magic in the world; the Hogwarts Sorting Hat is SQL-based, its decision-making powers are common operators and prospectIve students are merely data - names, and two columns of qualities. -- students -- id -- name -- quality1 -- quality2 -- Slytherin are being quite strict this year and ...
true
6289b8cb8e088f504b0344d942ae9cd77988eb8c
SQL
pavel-v-masalov/fair
/patch/fair/patch-0-1/DB/01-DWH.SCHEDULES_FOR_FV.sql
WINDOWS-1251
631
3.3125
3
[]
no_license
create table DWH.SCHEDULES_FOR_FV ( CALCULATION_ID NUMBER not null, DATE_FROM DATE not null, DATE_TO DATE not null, LOAN_AMT NUMBER, constraint SHCEDULES_FOR_FV_UK01 unique (CALCULATION_ID, DATE_FROM) using index ); COMMENT ON table DWH.SCHEDULES_FOR_FV IS ' FTP'; COMMENT ON COLUMN DWH.SCHEDULES_FOR_FV.C...
true
b0e4f2e8d249076fc112da0ee5d447dd7573f5f1
SQL
rafanleme/workflow_dodevil
/db/workflow_dodevil.sql
UTF-8
12,264
3.15625
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 3.3.3 -- http://www.phpmyadmin.net -- -- Servidor: localhost -- Tempo de Geração: Mar 27, 2016 as 03:38 PM -- Versão do Servidor: 5.1.50 -- Versão do PHP: 5.3.9-ZS5.6.0 SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 S...
true