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
c0d8676cd50978fb06db274d3255b5b82bf7ac94
SQL
Laegas/SEP4
/src/database/ETL/IGC/initial/l_init_igc.sql
UTF-8
605
2.796875
3
[]
no_license
BEGIN DROP_INDEX('INDEX_TO_D_TIME_HOUR'); END; / BEGIN DROP_INDEX('INDEX_TO_D_TIME_MINUTE'); END; / BEGIN DROP_INDEX('INDEX_TO_D_TIME_SECOND'); END; / CREATE INDEX INDEX_TO_D_TIME_HOUR on TRANSFORM_IGC_EMPTY_GLIDER_REGNO(to_char(TIME_OF_LOG, 'HH24')); CREATE INDEX INDEX_TO_D_TIME_MINUTE on TRANSFORM_IGC_EMPTY_GLIDER_...
true
460bd53c0dd9d7d25d0182667a72b8636821aa81
SQL
visualhuman01/FreeAPI
/doc/database/database.sql/freeapi_db_dbconfig_datatype.sql
UTF-8
2,399
2.875
3
[]
no_license
-- MySQL dump 10.13 Distrib 8.0.12, for Win64 (x86_64) -- -- Host: 127.0.0.1 Database: freeapi_db -- ------------------------------------------------------ -- Server version 8.0.12 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; ...
true
9c99ea1b3b9b4a35e41ff99be35b91ce274ab484
SQL
asha365/aims-all-project
/mvc_eshop_365_19_FEB/mvc_eshop_365/Database/db_mvc_eshop_365.sql
UTF-8
12,713
2.75
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.8.3 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Feb 19, 2019 at 02:53 PM -- Server version: 10.1.37-MariaDB -- PHP Version: 7.2.12 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OL...
true
eb36fbfda86a43125109e183f0b07f403f590a27
SQL
sharudee/Consignment
/data/sql/cosdb.sql
UTF-8
27,960
3.0625
3
[ "MIT" ]
permissive
-- phpMyAdmin SQL Dump -- version 4.4.14 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: Dec 15, 2015 at 03:19 AM -- Server version: 5.6.26 -- PHP Version: 5.6.12 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;...
true
cd4e0d0043226b7d107de30c3155b8c20446b28a
SQL
lihengl/dizu-api
/postal.sql
UTF-8
1,775,274
3.53125
4
[ "MIT" ]
permissive
# ************************************************************ # Sequel Pro SQL dump # Version 4096 # # http://www.sequelpro.com/ # http://code.google.com/p/sequel-pro/ # # Host: localhost (MySQL 5.6.22) # Database: postal # Generation Time: 2015-01-24 15:59:04 +0000 # **************************************************...
true
3efb51144afc3ac7c25bc4f84d8ad786ff98bb01
SQL
zhaoyangmushiyi/BookManager
/bookmis.sql
UTF-8
4,920
2.828125
3
[]
no_license
# Host: 127.0.0.1 (Version: 5.5.15) # Date: 2018-05-11 19:01:55 # Generator: MySQL-Front 5.3 (Build 4.269) /*!40101 SET NAMES gb2312 */; # # Structure for table "t_book" # DROP TABLE IF EXISTS `t_book`; CREATE TABLE `t_book` ( `bookId` int(11) NOT NULL, `bookName` varchar(30) DEFAULT NULL, `boo...
true
a1aca1b0dbb342baeff378078e0052e4944f1330
SQL
silence-do-good/stress-test-Postgres-and-MySQL
/dump/low/day16/select0155.sql
UTF-8
412
3.609375
4
[]
no_license
SELECT obs.sensor_id, avg(counts) FROM (SELECT sensor_id, date_trunc('day', timestamp), count(*) as counts FROM WiFiAPObservation WHERE timestamp>'2017-11-15T01:55:00Z' AND timestamp<'2017-11-16T01:55:00Z' AND SENSOR_ID = ANY(array['3141_clwe_1100','3142_clwa_2219','3143_clwa_3039','3144_clwa_4099','3145_clwa_...
true
433117b5a4ed22dac050f92b46ce939d31754156
SQL
DaniilD/bronevikTestTask
/bronevik.sql
UTF-8
4,266
3.296875
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.8.5 -- https://www.phpmyadmin.net/ -- -- Хост: 127.0.0.1:3306 -- Время создания: Июл 29 2020 г., 14:26 -- Версия сервера: 8.0.15 -- Версия PHP: 7.3.2 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTE...
true
fefaca87ea594a764f1cf179fae8754f8c3f93f1
SQL
lgcarrier/AFW
/5.2.3/Database/Constraints/AFW_21_PLUGN_ITEM_MENU_FK2.sql
UTF-8
210
2.703125
3
[ "MIT" ]
permissive
SET DEFINE OFF; ALTER TABLE AFW_21_PLUGN_ITEM_MENU ADD ( CONSTRAINT AFW_21_PLUGN_ITEM_MENU_FK2 FOREIGN KEY (REF_PLUGN_MENU) REFERENCES AFW_21_PLUGN_MENU (SEQNC) ON DELETE CASCADE ENABLE VALIDATE) /
true
edd6d54db9b633a5deb04cb10cbfd27de545245d
SQL
RafaelAbreu05/Situris
/SITURIS/WebContent/WEB-INF/classes/hirondelle/situris/pub/centrosInteresse/statements.sql
UTF-8
2,783
3.890625
4
[ "BSD-3-Clause" ]
permissive
VISITA_FETCH { SELECT v.idVisita, v.nome, v.descricao, v.link, v.imagem, gps.latitude, gps.longitude, ti.descricao, v.idUser, ROUND(AVG(a.estrelas)) FROM (((visita v LEFT JOIN avaliacao a ON v.idVisita = a.idVisita) LEFT JOIN coordenadasgps gps ON gps.idCoordenadasGPS = v.idCoordenadasGPS) LEFT JOIN tipointeresse...
true
57938f0193bcc9f57b5968bf39eb581d6a352212
SQL
abbakark2/projectrepository
/projectrepositorytobe submited.sql
UTF-8
5,890
3.140625
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.5.1 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: Nov 30, 2017 at 10:50 AM -- Server version: 5.7.9 -- PHP Version: 5.6.15 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /...
true
0d40ee272e59357328ad77d0aad74ff8fa2dc6e0
SQL
bradybyrd/dbm_demo
/hr_demo/versions/3.4.3.1/2018_12_12_44_27_0.sql
UTF-8
1,484
3.140625
3
[ "MIT" ]
permissive
--Source: HR_SANDBOX@TEAMWORK2012:1521/ORCL (latest repository revisions) --Target: HR_DEV@TEAMWORK2012:1521/ORCL --Script generated by \ on 12/12/2018 05:44 --Note: Please review this script prior to execution HOST if not exist "C:\Automation\MP\HumanResources\Spool" mkdir "C:\Automation\MP\HumanResources\Spool" SP...
true
0920d1ea5b37d5ba2587863f7b9c15fc6e4ad29c
SQL
nclgh/lakawei_device
/model/table.sql
UTF-8
2,743
3.421875
3
[]
no_license
CREATE TABLE `device` ( `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, `code` varchar(255) NOT NULL DEFAULT '', `name` varchar(255) NOT NULL DEFAULT '', `model` varchar(255) NOT NULL DEFAULT '', `brand` varchar(255) NOT NULL DEFAULT '', `tag_code` varchar(255) NOT NULL DEFAULT '', `department_code` var...
true
188a08d329594ac3bdbd028ea0858573d3934964
SQL
worgelabolg/notepad
/oracle/研究实验/Expert_Oracle test_data/book/ch03/demo1.sql
UTF-8
1,215
3
3
[]
no_license
set echo on connect / select value from v$parameter where name = 'db_block_size' / show parameter db_block_s connect scott/tiger select value from v$parameter where name = 'db_block_size' / show parameter db_block_s create or replace function get_param( p_name in varchar2 ) return varchar2 as l_para...
true
af3324ef5290bcc3065853e5553040d545020b31
SQL
Varguss/JavaRushTestTask
/src/main/resources/startup.sql
UTF-8
2,689
3.15625
3
[]
no_license
USE TEST; DROP TABLE IF EXISTS `computerpart`; CREATE TABLE computerpart ( id BIGINT(20) PRIMARY KEY, count BIGINT(20) NOT NULL, isImportant BIT(1) NOT NULL, name VARCHAR(255) NOT NULL UNIQUE ) ENGINE = InnoDB DEFAULT CHARACTER SET = utf8; DROP TABLE IF EXISTS `hibernate_sequence`; CREA...
true
966bcff2cef04580e06e6634f58bc5f614a99441
SQL
dulcrav/store-inventory-backend
/src/main/resources/db/scripts/0003_create_laptop_table.sql
UTF-8
1,329
2.546875
3
[]
no_license
CREATE TABLE LAPTOP ( id integer primary key, name varchar(255), producer varchar(255), display real, processor varchar(255), ram integer, graphics varchar(255), hdd integer, ssd integer, fingerprint_scanner boolean, os varchar(255), quantity integer ); INSERT INTO LAPTO...
true
4359ded22eccea54c5e7dcd975a4f80b2cad3f0d
SQL
apache/cloudstack
/engine/schema/src/main/resources/META-INF/db/schema-222to224.sql
UTF-8
14,946
2.96875
3
[ "GPL-2.0-only", "Apache-2.0", "BSD-3-Clause", "MIT", "GPL-1.0-or-later", "LicenseRef-scancode-public-domain", "BSD-2-Clause", "LicenseRef-scancode-unknown" ]
permissive
-- Licensed to the Apache Software Foundation (ASF) under one -- or more contributor license agreements. See the NOTICE file -- distributed with this work for additional information -- regarding copyright ownership. The ASF licenses this file -- to you under the Apache License, Version 2.0 (the -- "License"); you may...
true
2dc54ceeed2bb16bedf788ce0720ca90e96eed8a
SQL
tlhhup/springboot-tlh
/src/main/resources/schema_1.sql
UTF-8
1,420
4.09375
4
[ "Apache-2.0" ]
permissive
-- 用户表 create table sys_users( id int primary key auto_increment comment '主键', userName varchar(100) unique comment '用户名', password varchar(64) not null, salt varchar(100) not null comment '盐', realName varchar(100) not null, createTime timestamp, enabled tinyint comment '用户状态 1 启用 0 禁用' ); -- 角色表 create table sys_role...
true
e2e43b67fa3fa3baee9a938e87cee2dde5c1700e
SQL
joaocarlos95/Databases-Project
/Projecto 4/queries.sql
UTF-8
5,165
4.25
4
[]
no_license
/*SELECT morada FROM ( SELECT morada, COUNT(morada) m_count FROM oferta GROUP by morada, codigo) A WHERE m_count >1; SELECT r.numero, estado FROM reserva r NATURAL JOIN ( SELECT * FROM estado e NATURAL JOIN ( SELECT numero, MAX(time_stamp) max_time_stamp FROM estado GROUP BY numero) A WHERE e.numero = A.nu...
true
fdb21ee45aac45f6cade14390ad23cabc5580b06
SQL
akinuxback/spring5-mybatis-jsp-old_prj-std
/database/createTable_tbl_product_file.sql
UTF-8
391
2.640625
3
[]
no_license
create table tbl_product_file ( pno number(10,0), upload_path varchar(200) not null, uuid varchar(200) not null, file_name varchar(100) not null, image char(1) default 'I', main char(1) default 'M' ); alter table tbl_product_file add constraint pk_product_file primary key (uuid); alter table tbl_product_file a...
true
f6bb4083280a603baf8462494d746d9c44e7433d
SQL
taylorlast/School
/SQL/HW2.sql
UTF-8
986
3.875
4
[]
no_license
USE ClassicModels; SELECT city, country, COUNT(employeeNumber) FROM Offices JOIN Employees ON Offices.officeCode = Employees.officeCode GROUP BY city, country ORDER BY COUNT(employeeNumber) DESC; SELECT customerName, AVG(Payments.amount) AS customerAVG FROM Customers JOIN Payments ON Customers.customerNumber = Paymen...
true
37be559bb544a6a73fddfa18eb1400f66c4e047e
SQL
daxiousm/hyf-homework
/databases/week3/meal_sharing.schema.sql
UTF-8
2,562
4
4
[]
no_license
-- Schema meal_share CREATE SCHEMA IF NOT EXISTS `meal_share` DEFAULT CHARACTER SET utf8 ; USE `meal_share` ; -- Table `meal_share`.`Reservation` CREATE TABLE IF NOT EXISTS `meal_share`.`reservation` ( `id` INT NOT NULL, `number_of_guests` INT NULL, `meal_id` INT NULL, `created_date` DATE NULL, `contact_...
true
ba5a70ebe6758cca5981570d81888ac36a95b691
SQL
grantwforsythe/CS50x
/psets/pset7/fiftyville/log.sql
UTF-8
10,781
3.703125
4
[ "MIT" ]
permissive
-- Keep a log of any SQL queries you execute as you solve the mystery. /* TODO: Find who these people spoke to TODO: The THIEF is: TODO: The thief ESCAPED TO: TODO: The ACCOMPLICE is */ -- initially the schema was viewed to see the structure of the database /* view the the initial report of the c...
true
aef4455f4642e2835803c6c5c5f3b928efaad950
SQL
paulrd/memory-hole
/resources/migrations/postgresql/20171110130215-add-group-id-to-support-issues.up.sql
UTF-8
254
2.890625
3
[ "MIT" ]
permissive
alter table support_issues add column group_id text REFERENCES groups(group_id) DEFERRABLE; update support_issues set group_id = (select group_id from groups where group_name = 'Default'); alter table support_issues ALTER COLUMN group_id SET NOT NULL;
true
c0b9e6efa1b80a551471f4a53e1df6e3b9aa1e96
SQL
eclipsesystemsltd/ms-database
/DDL scripts/tables/topicentry.sql
UTF-8
561
2.984375
3
[]
no_license
CREATE TABLE IF NOT EXISTS `topicentry` ( `id` BIGINT UNSIGNED AUTO_INCREMENT PRIMARY KEY NOT NULL, `subject` VARCHAR(50), `body` VARCHAR(2000), `post_date` DATETIME, `category_id` BIGINT UNSIGNED, `sub_category_id` BIGINT UNSIGNED, `rating` INT, `created_by` VARCHAR(20), `created_date...
true
814d28cb1f8e8a1cc36b5fe4a11dbb6db9ddf9ff
SQL
arguiot/File-Upload
/membres.sql
UTF-8
1,232
2.796875
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 3.5.8.1 -- http://www.phpmyadmin.net -- -- Host: the-scientist.fr.mysql:3306 -- Generation Time: Jun 21, 2016 at 07:45 AM -- Server version: 5.5.47-MariaDB-1~wheezy -- PHP Version: 5.3.3-7+squeeze15 SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CH...
true
b5e51509a4c8b4aca28e39c41322c0473ba2e05f
SQL
Cougar/powerfeed-ventenable-coolenable
/devices.sql
UTF-8
1,250
2.84375
3
[]
no_license
-- devices attached to the modbusRTU or modbusTCP network. starman energy BEGIN TRANSACTION; -- count0..count3 are channel counts for do, do, ai an 1wire. CREATE TABLE 'devices'(num integer,rtuaddr integer,tcpaddr,mbi integer,status integer,name,location,descr,count0 integer,count1 integer,count2 integer,count3 i...
true
c413ee8831b443fe81efbb0f880879ebea9078c5
SQL
lzsjinxin/All-databases-ofppt-tdi
/EFF_2016/db_file5_2.sql
UTF-8
2,485
3.5
4
[]
no_license
create database EFF2016_TP_V1_1_DB --remarque ses question et le meme pour EFF2016_TP_V1_2 --just la base de donne et different use EFF2016_TP_V1_1_DB create table Categorie( idCategorie int primary key, nomCategorie varchar(30) ) create table Organisateur( idOrg int primary key, nomOrm varchar(30), ...
true
c448269c0b33a7747184662e5d50e744225a18fc
SQL
chiranjitengineer/learngit
/OfficeWorks/Hooghly DB/dbqry.sql
UTF-8
15,681
2.9375
3
[]
no_license
SELECT * FROM JUTEPURCHASEORDERMASTER CREATE TABLE JUTEARRIVALMAST_TEST AS SELECT * FROM JUTEARRIVALMAST WHERE ARRIVALNO='L/JAR/21/00287' CREATE TABLE JUTEARRIVALDETAILS_TEST AS SELECT * FROM JUTEARRIVALDETAILS WHERE ARRIVALNO='L/JAR/21/00287' SELECT * FROM SYS_TFMAP WHERE SYS_TABLENAME_ACTUAL='JUTEARRIVALDETAIL...
true
0ea78b1b63d9fc7f1383835af9a53d8a54e1b823
SQL
GordinV/buh70
/sql/eelarve/eelarve.kulu_taitmine.sql
UTF-8
4,505
3.921875
4
[]
no_license
DROP FUNCTION IF EXISTS eelarve.kulu_taitmine(DATE, DATE, INTEGER, INTEGER); CREATE OR REPLACE FUNCTION eelarve.kulu_taitmine(l_kpv1 DATE, l_kpv2 DATE, l_rekvid INTEGER, l_kond INTEGER) RETURNS TABLE ( rekv_id INTEGER, summa NUMERIC(14, 2), ...
true
0c1f29a12d6dea141264d90899f81912210ba1c7
SQL
sillsdev/WorldPad
/Src/Cellar/Firebird/spx_Create_Or_Alter_Exception.sql
UTF-8
1,279
3.265625
3
[]
no_license
/******************************************************************************* * spx_Create_Or_Alter_Exception * * Description: * Set up exception handling. * * Parameters: * in_Name: Exception name * in_Message: Exception message * * Dependencies: * None * * Revision History: * 19 March, 2006, Yves Bl...
true
8a7ed2c8ba3ffe98edca774484bc8d0062048afa
SQL
nqtinh-zz/go-gin-project
/db/schema.sql
UTF-8
4,718
3.453125
3
[ "MIT" ]
permissive
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 row...
true
ca66834d240359c1d8c5e62effcabf3759458bef
SQL
zyh704214825/Blog
/blog.sql
UTF-8
7,593
3.484375
3
[]
no_license
/* Navicat MySQL Data Transfer Source Server : zyh Source Server Version : 50540 Source Host : localhost:3306 Source Database : blog Target Server Type : MYSQL Target Server Version : 50540 File Encoding : 65001 Date: 2018-10-10 10:54:07 */ SET FOREIGN_KEY_CHECKS=0; -- ----------...
true
69384aa77194e85d3bcfdb7e29671f000bc1aa47
SQL
jeyabalaji/survey-application
/SurveyApplication_Root/SurveyHIK_final.sql
UTF-8
9,485
2.8125
3
[]
no_license
-- MySQL dump 10.13 Distrib 5.6.19, for osx10.7 (i386) -- -- Host: 127.0.0.1 Database: test2 -- ------------------------------------------------------ -- Server version 5.7.11 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!40...
true
40288956a85315638d58d26f38f2703c79566015
SQL
comeonbabye/study-php
/database/schema/test.sql
UTF-8
221
2.6875
3
[]
no_license
-- Table "test" DDL CREATE TABLE `test` ( `id` int(11) NOT NULL AUTO_INCREMENT, `name` varchar(50) NOT NULL, `sex` varchar(2) NOT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=utf8;
true
546d04e96d83cc88e1466d69e70d7889d0f94d95
SQL
zahra900/bugTracking
/src/main/resources/db/migration/postgres/V11__create_association_table.sql
UTF-8
254
3.25
3
[]
no_license
DROP TABLE IF EXISTS PROJECTS_USERS; CREATE TABLE PROJECTS_USERS ( PROJECT_ID int REFERENCES PROJECT(ID) ON UPDATE CASCADE , USER_ID int REFERENCES USERS(ID) ON UPDATE CASCADE , CONSTRAINT user_project_pkey PRIMARY KEY (PROJECT_ID, USER_ID) );
true
6760c780ca4c76e23ce44cd5087b77f1c823c2ed
SQL
JeffyMesquita/Curso-de-SQL-Completo-para-Iniciantes
/-- Aula 35 --.sql
UTF-8
363
3.140625
3
[ "MIT" ]
permissive
-- Aula 35 -- -- UNIQUE CONSTRAINT + DESAFIO /* Nessa Aula vamos aprender como ter colunas únicas, porém diferetnte de uma PRIMARY KEY, podem existir várias colunas com a restrição UNIQUE */ -- EXEMPLOS -- CREATE TABLE CarteiraMotorista( Id INT NOT NULL, Nome VARCHAR(255) NOT NULL, Idade INT CHECK(Idade >= 1...
true
273a3abdafdab4b709f7c9ebabb01fb520d5ba69
SQL
hirotoKirimaru/LeetCode
/src/main/java/com/example/leetCode/_176.sql
UTF-8
293
3.453125
3
[]
no_license
# mysql WITH tmp AS (SELECT Salary FROM Employee GROUP BY Salary ORDER BY Salary DESC LIMIT 1 OFFSET 1) SELECT IF ( (SELECT * FROM tmp) IS NULL, NULL, (SELECT * FROM tmp)) AS SecondHighestSalary;
true
40056f8f6f63c54119c0ae2ad59362c276474234
SQL
Jeanzw/LeetCode_Practice
/SQL/Easy/596. Classes More Than 5 Students.sql
UTF-8
707
3.640625
4
[]
no_license
select class from courses group by 1 having count(distinct student) >= 5 -- 这道题我原本的解法是: select class from courses group by 1 having count(*) >= 5 -- 这里出现的问题是: -- {"headers": {"courses": ["student", "class"]}, -- "rows": {"courses": [["A", "Math"], -- ["B", "English"], -- ...
true
f58256367b7f9a8ba41fb98080cc93acf144b923
SQL
AravindRajGit/WebApplication-For-Musinc-Bands-
/Database/db_damarufinal.sql
UTF-8
52,054
2.75
3
[]
no_license
# HeidiSQL Dump # # -------------------------------------------------------- # Host: 127.0.0.1 # Database: db_damaru # Server version: 5.0.51b-community-nt # Server OS: Win32 # Target compatibility: ANSI SQL # HeidiSQL version: ...
true
aef5afa48765a6615fd57709c5d8a2771fc61821
SQL
saefulmillah/hkdashboard
/application/sql/grafik_trend_pendapatan.sql
UTF-8
506
2.9375
3
[ "MIT", "LicenseRef-scancode-unknown-license-reference" ]
permissive
SELECT x1.* FROM ( SELECT tanggal, SUM(tunai + mandiri + bri + bni + bca ) traffic, SUM(tunai) cash_traffic, SUM(mandiri + bri + bni + bca ) non_cash_traffic, SUM(rptunai) cash_revenue, SUM(rpbri + rpbni + rpbca) non_cash_revenue FROM eoj WHERE 1 = 1 AND Tanggal >=...
true
a3f35fda3f99825d0524f8d8f68cfcd0a81f9164
SQL
guiiteixeira/ProcessoSeletivoEquals
/database/Modelagem-de-Dados/view_qteTransacoesPorExtrato.sql
UTF-8
206
2.953125
3
[]
no_license
CREATE VIEW `qteTransacoesPorExtrato` AS SELECT E.numArquivo, COUNT(*) transacoes FROM Extrato E, Transacao T WHERE E.numArquivo = T.Extrato_numArquivo GROUP BY E.numArquivo;
true
77a58145cd0b29b3687f788ffb7ea999589879ec
SQL
LashondaM/my-sql-notes
/Sept-20th-Lesson/Update-Major-MinSAT.sql
UTF-8
181
2.6875
3
[]
no_license
--Update all the majors increasing the minSAT by +10 /*UPDATE Major set MinSAT = MinSAT + 10 */ --can highlight code inside on comments and run those as well select * from major
true
8a1ed803237707924e0dca955d339be41aa652ab
SQL
judriverabu/Trabajo_AGD_2021-S1
/1 Trabajo Nociones de Arquitectura de la Información 2021-S1/T1.3.2.Creacion_Tablas.sql
UTF-8
872
2.8125
3
[]
no_license
CREATE TABLE `order_entity` ( `ORDER_ID` INTEGER NOT NULL, `APPLICATION_USER_ID` INTEGER, `STOREKEEPER_ID` INTEGER, `CREATED_AT` TEXT, `CLOSED_AT` TEXT, `PAYMENT_METHOD` INTEGER, `TOTAL_VALUE` NUMERIC, `TIP` NUMERIC, PRIMARY KEY(`ORDER_ID`) ); CREATE TABLE "rt_entity" ( "STOREKEEPER_ID" INTEGER NOT NULL UN...
true
85882c37639c149bf402ec7a6dc88ac9f84e93e4
SQL
awbush/coughphp
/tests/cough_generator/test_configs/db_setup2/db_setup.sql
UTF-8
1,240
3.953125
4
[]
no_license
-- foreign keys: yes -- multi-key primary key: yes -- "retire/delete" colums: no -- one-to-one relationships: yes -- one-to-many relationships: yes -- many-to-many relationships: yes (customer has many ordered products and a product has many customers) DROP TABLE IF EXISTS `customer`; CREATE TABLE `customer` ( `id`...
true
10f2aa798a28372d54e6e25926fe46da1b2c8c07
SQL
marcelogrion/ecomercePanaderia
/sql/crear_tabla_modificable.sql
UTF-8
863
2.890625
3
[]
no_license
CREATE TABLE modificable( id int NOT NULL AUTO_INCREMENT PRIMARY KEY ); ALTER TABLE modificable RENAME TO modif; ALTER TABLE modif ADD nombre varchar(255) NOT NULL; ALTER TABLE modif ADD edad int NOT NULL, ADD barrio varchar(255) NOT NULL; ALTER TABLE modif RENAME TO clientes; ALTER TABLE clientes DROP barrio; ALTER T...
true
5c249354d1f89ebabb11989351d4c74a87ae6bcb
SQL
andresSaldanaAguilar/BDD
/practica3_tt.sql
UTF-8
3,435
3.796875
4
[]
no_license
1. Dar de alta tu tt insert into tt values ("2019B19001", "Sistema de monitoreo de sistemas fotovoltaicos."); select * from tt where noTT="2019B19001"; 2. Asignar tus 3 sinodales correspondientes insert into sinodalia (idsinodalia,nott,s1,s2,s3) values (5010,"2019B19001", (select idProf from profesor where nombre l...
true
20339aa7e5e5fbfe9c7c50988a2863ae5d53f018
SQL
Katzerpa/MySQLIntrodutorioEducacionIT
/LABORATORIO MODIFICACIÓN DE ESTRUCTURA.sql
UTF-8
1,015
3.671875
4
[]
no_license
#use laboratorio; # 1-Agregar la relación(FK) entre la tabla Facturas y la tabla a la tabla Clientes. /* DESC facturas; DESC clientes; ALTER TABLE facturas ADD FOREIGN KEY (clienteID) REFERENCES clientes(clienteID) ON DELETE CASCADE ON UPDATE CASCADE; */ # 2-Agregar la relación(FK) entre la tabla Facturas y la tabla a ...
true
ba7153b5cdd3661b5768d73d43d31196f8d89b86
SQL
Dertgzgz/BBDDrback
/liquibase/changelog/data-001.sql
UTF-8
991
2.875
3
[]
no_license
--liquibase formatted sql --changeset versia:update splitStatements:true endDelimiter:; INSERT INTO modules ("name") VALUES('m1'),('m2'),('m3'),('m4'); INSERT INTO users ("login","activated") VALUES('u1',true),('u2',true),('u3',true),('u4',true); INSERT INTO roles ("name") VALUES('r1'),('r2'),('r3'); INSER...
true
2422a7433698f30f2d92d05311e45d48f146b356
SQL
RicardoMarinho/Moodle-application
/moodle (1).sql
UTF-8
20,667
3.25
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.9.0.1 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Tempo de geração: 24-Jun-2019 às 22:00 -- Versão do servidor: 10.3.15-MariaDB -- versão do PHP: 7.3.6 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET...
true
eaa536165d70ee1478c0ce4ed567c373b421e607
SQL
SHRINKHALA06015/IPL-MATCH-BIDDING-APP
/Mini_Project_ipl.sql final.sql
UTF-8
3,768
4.625
5
[]
no_license
/*1. Show the percentage of wins of each bidder in the order of highest to lowest percentage.*/ use ipl; select BID_STATUS from IPL_BIDDING_DETAILS; select * from ipl_bidding_details select * from ipl_bidder_points select * from ipl_bidder_details SELECT IPL_BIDDING_DETAILS.BIDDER_ID, COUNT(IPL_BIDDING_DETAILS.BID_S...
true
94cc792ad605c67cf71d3c6b0d44825769c8eb43
SQL
mbidaluc/annonces-crystals
/docs/c2w_categorie.sql
UTF-8
4,432
3.078125
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 3.2.0.1 -- http://www.phpmyadmin.net -- -- Serveur: localhost -- Généré le : Jeu 25 Avril 2013 à 12:07 -- Version du serveur: 5.1.37 -- Version de PHP: 5.3.0 SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHA...
true
ed374a0997579808f381e19fab54c05c40b5486c
SQL
Jetictors/spring-boot-learn
/mybatis-druid/cluster.sql
UTF-8
1,643
3.21875
3
[ "Apache-2.0" ]
permissive
/* SQLyog Enterprise v12.09 (64 bit) MySQL - 8.0.17 : Database - cluster ********************************************************************* */ /*!40101 SET NAMES utf8 */; /*!40101 SET SQL_MODE=''*/; /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; /*!40014 SET @OLD_FOREIGN_KEY_CHEC...
true
30ee132b9398c882ba9746e869290be39f6009c1
SQL
CarterZ1997/Advanced-Financial-Modeling-Fordham
/Advanced Financial Modeling/Class 3/Class3.sql
UTF-8
682
3.1875
3
[]
no_license
select * from my_table; insert into my_table values('abc', '2011-01-13','40'); select * from stock_aapl; select * from stock_aapl where Date = '2018-11-08'; select * from my_table; delete from my_table where trade_dt = '2011-01-12'; delete from my_table where trade_dt = '2011-01-10'; update my_table set price =...
true
0a250760f566a388e99539d7e743be2d6742ef4c
SQL
popmusicfan1992/SQL
/NHANVIEN.sql
UTF-8
15,612
3.25
3
[]
no_license
CREATE DATABASE NHANVIEN USE NHANVIEN CREATE TABLE NHANVIEN ( MaNV VARCHAR(20) NOT NULL PRIMARY KEY, TenNV VARCHAR(50), HoNV VARCHAR(50), NgaySinh DATE, DiaChi VARCHAR(100), Phai VARCHAR(20), Luong BIGINT, MaNQL VARCHAR(20), MaPHG VARCHAR(20) ) CREATE TABLE PHONGBAN ( MaPHG VARCHAR(20) NOT NULL PRIMARY KE...
true
af67a566c13b6e84670976a98ca6342f7eae1ae0
SQL
Forvisk/BANII
/Exercicios/Ex_04_Advanced Queryes 1/Ex_04_Adriano.sql
UTF-8
3,206
4.40625
4
[]
no_license
-- 1) Recupere o CPF e o nome dos mecânicos que trabalham nos setores número 1 e 2 (faça a consulta utilizado a cláusula IN). select mec.cpf, mec.nome from mecanico mec where cods in (1,2); -- 2) Recupere o CPF e o nome dos mecânicos que trabalham nos setores 'Funilaria' e 'Pintura' (faça a consulta u...
true
bc23ad782514fd30972dc6b8e63ccf053ac5c230
SQL
pakhavan23/bookstore-back
/db/bookstore.sql
UTF-8
5,779
3.828125
4
[]
no_license
DROP DATABASE IF EXISTS bookstore; CREATE DATABASE bookstore; USE bookstore; DROP TABLE IF EXISTS customer; DROP TABLE IF EXISTS bookstore_admin; DROP TABLE IF EXISTS book; DROP TABLE IF EXISTS sale; DROP TABLE IF EXISTS author; DROP TABLE IF EXISTS translator; DROP TABLE IF EXISTS make_sale; DROP TABLE IF EXISTS mana...
true
c95b400651902987800ec70ea47d8ac0d787d7dd
SQL
wsLima/aging-api
/src/main/resources/db/migration/V004__create_tbl_saque.sql
UTF-8
462
3.671875
4
[]
no_license
-- create table withdraw create table financa.saque ( id_saque bigserial not null, protocolo bigint not null, valor numeric(10,2) not null, data_saque date not null, descricao varchar, id_beneficiario bigint not null constraint saque_beneficiario_id_beneficiario_fk references financa.beneficiario ); create ...
true
22fcfa86706f5579dec32a2b11d5d391847e9865
SQL
Matias-lr/portafolio_de_titulo_modelo
/Procedimientos/Procedimientos/Edificio/SELECT EDIFICIO.sql
UTF-8
3,484
3.71875
4
[]
no_license
set serveroutput on; CREATE OR REPLACE PROCEDURE edificio_select is BEGIN DECLARE v_id_edificio NUMBER; v_nombre VARCHAR2(255); v_direccion VARCHAR2(255); v_telefono NUMBER(15); v_comuna VARCHAR2(255); v_region VARCHAR2(255); v_foto varchar2(2000); v_activo CHAR; CURSOR edifici...
true
16f4558bcd4fdb761f19cc95186bab060ec10cda
SQL
nathanlim45/IS607
/week5/W5test.sql
UTF-8
355
3.375
3
[]
no_license
SELECT f.year, f.month, f.day, f.origin, f.carrier, w.temp, f.dep_delay, f.arr_delay, f.air_time, p.seats FROM flights f LEFT JOIN planes p ON f.tailnum=p.tailnum LEFT JOIN weather w ON f.origin=w.origin AND f.year=w.year AND f.month=w.month AND f.day=w.day WHERE f.dest='LAX' AND f.year=2013 AND ((f.month=2 AND f.da...
true
0c531952b72dd8d0ebcebcb5c56033652ad10ba6
SQL
airesdj/ArenaFifa2.0.WEB.API.NET
/ArenaFifa2.0.API.NET/database scripts/proc/arenafifadb/SummaryDashBoards.sql
UTF-8
37,465
2.90625
3
[]
no_license
USE `arenafifadb`; DELIMITER $$ DROP PROCEDURE IF EXISTS `spGetSummaryHallOfFame` $$ CREATE PROCEDURE `spGetSummaryHallOfFame`() begin DECLARE _psnIDSerieAH2H VARCHAR(50) DEFAULT ""; DECLARE _teamNameSerieAH2H VARCHAR(50) DEFAULT ""; DECLARE _psnIDSerieAFUT VARCHAR(50) DEFAULT ""; DECLARE _teamNameSerieAFU...
true
309689dc59658b72b4651b67ad75e35f2cda92a4
SQL
Shadowmaple/Assignments
/database_course/4-6.sql
UTF-8
719
3.34375
3
[]
no_license
-- 建表 create table `student` ( `sid` int comment '学号', `name` varchar(20), `sex` tinyint(1), `addr` varchar(50), `class_no` varchar(20), primary key (`sid`) ); create table `class` ( `no` int comment '班级号', `name` varchar(20), `headmaster` varchar(20) comment '班主任', `monitor` va...
true
8f10f508c618ffe4ab225702e5d0a88d7acac07f
SQL
kalintsenkov/SoftUni-Software-Engineering
/CSharp-DB/Databases-Basics/Homeworks/04DataAggregation/15EmployeesAverageSalaries.sql
UTF-8
338
3.1875
3
[ "MIT" ]
permissive
SELECT * INTO EmployeesAverageSalaries FROM Employees WHERE Salary > 30000 DELETE FROM EmployeesAverageSalaries WHERE ManagerID = 42 UPDATE EmployeesAverageSalaries SET Salary += 5000 WHERE DepartmentID = 1 SELECT DepartmentID, AVG(Salary) AS [AverageSalary] FROM EmployeesAverageSalaries GRO...
true
61a5b45bc600ddceb1d048fa08d3b18e36bb746a
SQL
jampaniuday/sql_source
/sql/prompt2.sql
UTF-8
360
2.984375
3
[]
no_license
--column last_name hea 'LAST NAME' --column salary hea 'MONTHLY SALARY' format $99,999 --column commission_pct hea 'COMMISSION %' format 90.90 --input clear buffer prompt Enter a valid Employee ID prompt For example 145, 206 accept enumber number prompt 'Employee ID: ' select first_name, last_name, salary from emp_...
true
4ff179fa35fb9d5f57cb1b553f9c65634f2a1ee2
SQL
viktordanov/uni-imse-2021
/initdb/init.sql
UTF-8
2,901
3.890625
4
[]
no_license
create database if not exists imse; use imse; grant all privileges on imse.* to 'imse'@'%'; create table if not exists Account ( AccountID int not null auto_increment, Name varchar(255) not null, EMail varchar(255) not null, Password_hash varchar(255) not null, Date_registered datetime no...
true
89b72f3557eaed58b60959a2281214bcc1dceb20
SQL
empal030110/php
/learningPHP/6/dbtable_limit.sql
UTF-8
187
2.78125
3
[]
no_license
SELECT 컬럼1, 컬럼2, 컬럼3, ... FROM 테이블이름 LIMIT 개수; SELECT * FROM dishes ORDER BY dish_id LIMIT 1; SELECT dish_name, price FROM dishes ORDER BY dish_id LIMIT 10
true
00f62cbee28f5040abc20bb96651ebcec72a148a
SQL
firstcrazydeveloper/Temprory
/PACE/Database/Scripts/MasterData/TrefActionType_tbl.sql
UTF-8
1,572
3.328125
3
[ "MIT" ]
permissive
SET IDENTITY_INSERT dbo.TrefActionType ON IF NOT EXISTS (SELECT 1 FROM TrefActionType WHERE Id = 1) BEGIN INSERT TrefActionType ( Id, DisplayOrder, Description, Code, StartDate, EndDate, CreatedBy, ModifiedBy) VALUES ( 1, 1, 'Manage Teams', 'MT', GETDATE(), NULL, 'TrefActionType_tbl.sql', 'TrefActionT...
true
59d77c9571a3746ed03a3c7a08814d9b3a4c2769
SQL
didokafe/parser
/tools/migration.sql
UTF-8
419
2.609375
3
[]
no_license
drop database if exists parser; create database parser; create table parser.log_entry ( id bigint auto_increment primary key, date datetime(3) null, ip varchar(255) null, request varchar(255) null, status varchar(255) null, user_agent varchar(255) null ) engine=InnoDB; create table parser.blocked ( id bigint ...
true
1aa3c29c83cf76e2fab869561e6e70cdae6111a2
SQL
fightx/bianzhongming.github.io
/MYSQL/知识库/KeyPoint&&Sample/Mysql主从复制心跳(heartbeat).sql
GB18030
1,781
3.140625
3
[]
no_license
(heartbeat) 1.壺masterûдbinlogʱheartbeatԱslave֪masterǷ 2.ȡֵΧλ룬0 4294967롣ȷȿԴﵽ룬Сķ0ֵ0.001롣 3.masterbinlog־ļ趨ļʱûյµ¼ʱ 4.鿴 --salve env select heartbeat from mysql.slave_master_info; --30 SHOW VARIABLES like '%slave_net_timeout%'; --60 ֵĬΪslave_net_timeoutֵ2Ϊ0ʾȫĽ (master_heartbeat_period) 1.λ롣ȣ1 롣MySQL5.5ʼṩIJ 2.salveƼã mysql>...
true
e0dea33bc218484f440bd44de57809a76421c01c
SQL
Deicard/Dotnetuploads
/Dotnetemergency/DotnetExercises/Oauth/de-mol/dumps/postgress/players.sql
UTF-8
2,175
2.84375
3
[]
no_license
CREATE TABLE public.app_players ( id bigint NOT NULL GENERATED ALWAYS AS IDENTITY ( INCREMENT 1 START 1 MINVALUE 1 MAXVALUE 9223372036854775807 CACHE 1 ), name character varying(100) COLLATE pg_catalog."default", age integer, gender character varying(1) COLLATE pg_catalog."default", profession characte...
true
fb35a1025849b6713f85d03ab9dd5fe3ed8cea83
SQL
vilatico/SQL-SERVER-COMANDOS-B-SICOS
/FILTRANDO POR DATASQLQuery20.sql
UTF-8
704
2.8125
3
[]
no_license
SELECT * FROM [TABELA DE CLIENTES] SELECT * FROM [TABELA DE CLIENTES] WHERE [DATA DE NASCIMENTO]='1995-09-11' SELECT * FROM [TABELA DE CLIENTES] WHERE [DATA DE NASCIMENTO]>'1995-09-11' SELECT * FROM [TABELA DE CLIENTES] WHERE [DATA DE NASCIMENTO]>='1995-09-11' SELECT * FROM [TABELA DE CLIENTES] WHERE [DATA DE NASCI...
true
1cbc724ac40b72c325ca212013ad4253c4ca57f1
SQL
boyddensmore/Maximo-Oracle-SQL-Public
/CIs/Collections.sql
UTF-8
770
3.53125
4
[]
no_license
/******************************************************************************* * Collection details, including all asset, CI, and location members *******************************************************************************/ select COLLECTION.COLLECTIONNUM, COLLECTION.DESCRIPTION, COLLECTION.ISACTIVE, COLLECTD...
true
5ea6baf12647c389727612a6c5ccfe1f72ece9d6
SQL
HuangChenning/oracle_dba_scripts
/oracle脚本/wait_event.sql
GB18030
2,465
3.890625
4
[]
no_license
/*v$session:ݿ⵱ǰӵsessionϢ v$session_wait:ǰݿӵĻsessionڵȴԴ¼Ϣ v$session¼Ƕ̬Ϣsessionйأ¼ʷϢ oracleṩһͼv$system_event¼ݿеȴ¼ĻϢ ͨv$system_eventͼûѸٵػݿеſ*/ select * from v$session_wait where event not in (select event from perfstat.stats$idle_event) /*鿴library cache pin*/ select sid, substr(event, 1, 30), wait_time ...
true
c54bbc2c54e0ab8d719584e25d86855b0059c270
SQL
benj-moreau/TraceAnalyser
/requetes/req3.sql
UTF-8
216
2.921875
3
[]
no_license
-- nb de requetes envoyees vers chaque pays, regions et ville: SELECT pays, etat, ville, COUNT(*) AS nb_req_recu FROM Fait AS F JOIN DimSite AS S ON F.id_site_dest = S.id_site GROUP BY pays, etat, ville WITH ROLLUP
true
267462c65a7079faccc6a88b316599ec54f15bd2
SQL
amerelsayed2020/Learning
/Java/Intorduction_to_Java_Programming/Chapter32/script.sql
UTF-8
4,840
3.09375
3
[]
no_license
CREATE TABLE Course ( courseId char(5), subjectId char(4) not null, courseNumber integer, title varchar(50) not null, numOfCredits integer, primary key (courseId) ); CREATE TABLE Student ( ssn char(9), firstName varchar(25), mi char(1), lastName varchar(25), birthDate date, street varchar(25), phone char(11), zipCode ...
true
c60bef40899a58c80d051ee990e92d247b4e2f58
SQL
soupowertuning/SQLScripts
/Administração/Detach e Atach todas as bases.txt
UTF-8
1,002
4.0625
4
[]
no_license
--detach de todas as bases select 'if exists (select name from sys.databases where State_Desc = ''ONLINE'' and name = '''+A.Name+''' ) BEGIN ALTER DATABASE '+A.Name+' SET SINGLE_USER WITH ROLLBACK IMMEDIATE exec sp_detach_db '+A.Name+' END' from sys.sysdatabases A where A.Name not in ('tempdb','maste...
true
f37b23aac2afb5522001202d5af0410f6183dd1c
SQL
oliverw1/summerschool_capstone
/sql/02_daily_and_7_day_max.sql
UTF-8
513
3.8125
4
[]
no_license
-- Compare on a daily basis the maximum value of an air quality parameter to the maximum value that that parameter -- had over the last 7 days. with temp as ( select date(utc) as dt, parameter, max(value) as daily_max from AQ group by date(utc), parameter ) select dt, parameter, daily_max,...
true
e400efddcc02c3b7382e70310eab18b52bf04305
SQL
sarahtariqjilani1234/tawakkal.io
/projects (1).sql
UTF-8
17,643
3.1875
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.8.5 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Jun 06, 2021 at 10:44 PM -- 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
02f6c52e4f08eb42f1839efbb20dbd3c422d8eb8
SQL
aldoabieza/projectbootcamp
/arkademy.sql
UTF-8
1,818
3.109375
3
[ "MIT" ]
permissive
-- phpMyAdmin SQL Dump -- version 5.1.0 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Waktu pembuatan: 07 Jul 2021 pada 11.38 -- Versi server: 10.4.18-MariaDB -- Versi PHP: 7.3.27 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@C...
true
0f639dbd2b43c329f050c88e339a0aec5ff9b13c
SQL
wztan004/Practise-SQL
/Practice/23_UserRead/db.sql
UTF-8
1,811
3.265625
3
[ "MIT" ]
permissive
DROP SCHEMA IF EXISTS UserRead; CREATE SCHEMA UserRead; USE UserRead; DROP TABLE IF EXISTS `user_read`; CREATE TABLE `user_read` ( `date` date, `uid` int, `news_id` int, `topic` varchar(20) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; DROP TABLE IF EXISTS `user_info`; CREATE TABLE `user_info` ( `uid` in...
true
420c721051e2fe6dfa3cb90f372b4ae4515ca903
SQL
VasylPavuk/templates-sql
/QueryStats.sql
UTF-8
1,347
3.390625
3
[]
no_license
select top (20) total_worker_time/execution_count/1000000.0 as AvgCPU, total_worker_time/1000000.0 as TotalCPU, total_elapsed_time/execution_count/1000000.0 as AvgDuration, total_elapsed_time/1000000.0 as TotalDuration, max_elapsed_time/1000000.0 as MaxDuration, (total_l...
true
486294ff887ca107ec4d5270192ef93529d9a62f
SQL
segundogaldames/desarrollweb
/desarrolloweb.sql
UTF-8
10,169
2.859375
3
[]
no_license
-- MySQL dump 10.13 Distrib 8.0.25, for Linux (x86_64) -- -- Host: localhost Database: desarrolloweb -- ------------------------------------------------------ -- Server version 8.0.25-0ubuntu0.20.04.1 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARAC...
true
9e38cc1df8ca3db40e70ad78bdba8d2b9c0f58c7
SQL
PooneetThaper/CSC336_Group6_StockMarket
/Reverse_Momentum_Strategy.sql
UTF-8
4,379
4.125
4
[]
no_license
DELIMITER // DROP PROCEDURE IF EXISTS ReverseMomentum // CREATE PROCEDURE ReverseMomentum(IN loops int) BEGIN -- variables for DailyStockFeed table DECLARE this_trading_symbol varchar(15); DECLARE this_trade_time datetime; DECLARE this_trade_price decimal(18,4); DECLARE this_trade_size int(11); DECLARE sum_stocks int...
true
8221c6c586fc7fffaaf86aa5359420e38594e8f1
SQL
maszuari/web1
/tables.sql
UTF-8
196
3.046875
3
[]
no_license
CREATE TABLE IF NOT EXISTS organizations ( id SERIAL PRIMARY KEY, fullname VARCHAR(256) NOT NULL UNIQUE, shortname VARCHAR(50) NOT NULL UNIQUE, created TIMESTAMP NOT NULL DEFAULT NOW() );
true
22cc357e6c6d6725f9f68df939859b4b901b50ad
SQL
NaifousBS/user-management
/nag/create_table.sql
UTF-8
339
2.75
3
[ "MIT" ]
permissive
CREATE TABLE public."User" ( id serial NOT NULL, lastname character varying, firstname character varying, email character varying, age integer, active boolean, PRIMARY KEY (id), CONSTRAINT unique_email_constraint UNIQUE (email) ) WITH ( OIDS = FALSE ); ALTER TABLE public."User" ...
true
49fca4495e494fcf7152906b956b2b6a722a349a
SQL
g1st/hackathon-hackslash-2020
/frontend/src/exercise.sql
UTF-8
1,183
3.328125
3
[]
no_license
Update the postcode of the hotel named Elder Lake Hotel to L10XYZ update hotels set postcode='L10XYZ' where id=2; Update the number of rooms of Cozy Hotel to 25 For the customer named Nadia Sethuraman, update her address to , her city to Glasgow and her postcode to G11ABC in one query Update all the bookings of custom...
true
f1e66b0734658a353a2ace2e713114f67b651166
SQL
luhanlin/bigdata
/resources/src/main/resources/sql/tz_rule.sql
UTF-8
866
2.953125
3
[]
no_license
SET FOREIGN_KEY_CHECKS=0; -- ---------------------------- -- Table structure for tz_rule -- ---------------------------- DROP TABLE IF EXISTS `tz_rule`; CREATE TABLE `tz_rule` ( `id` int(11) NOT NULL AUTO_INCREMENT, `warn_fieldname` varchar(20) DEFAULT NULL, `warn_fieldvalue` varchar(255) DEFAULT NULL, `publis...
true
945969a672e4dc5e9042ce3042627c55b0560929
SQL
drakodestalo/1z0-051
/Cap07/02.sql
UTF-8
813
4.03125
4
[]
no_license
-- Obtener los empleados que vivan en el mismo pais -- que Steven King (employee_id = 100) select distinct last_name || ', ' || first_name as employee, street_address, postal_code, city, country_name from countries c inner join locations l on (l.country_id = c.country_id) inner join departments d on (d.location...
true
6e263f9794dcd7ca1724d6b92dd8ef26839aa15a
SQL
Ashish-crypto-alt/World-Covid-19-Project-1-SQL-
/World_Covid-19_SQL_Query.sql
UTF-8
4,520
3.796875
4
[]
no_license
-----1. Select * From Database1..covid_deaths Where continent is not null Order By 3,4 --Select * --From Database1..covid_vaccinations --Order By 3,4 --Select Location, date, total_cases, total_deaths, new_cases, new_deaths --From Database1..covid_deaths --Order By 1,2 --Looking at total_cases vs total...
true
cb5cc4112aafd7755c0ff424d691839bbc948004
SQL
SteveWXT/Harvard-CS50
/week7/pset7/fiftyville/log.sql
UTF-8
4,420
3.953125
4
[]
no_license
-- Keep a log of any SQL queries you execute as you solve the mystery. -- Get corresponding description in crime_scene_reports SELECT description From crime_scene_reports WHERE year = 2020 AND month = 7 AND day = 28 AND street = "Chamberlin Street"; -- Theft of the CS50 duck took place at 10:15am at the Chamberlin Str...
true
074494cb89d0fba07f79a4a1dbe29beba32b31c7
SQL
alexjanosi/CS121
/cs121hw3/correlated.sql
UTF-8
1,391
4.46875
4
[]
no_license
-- [Problem a] -- This query computes the number of loans each customer has -- it organizes it in descending order SELECT customer_name, COUNT(loan_number) AS num_loans FROM customer NATURAL LEFT JOIN borrower GROUP BY customer_name ORDER by num_loans DESC; -- [Problem b] -- This query computes the nam...
true
4b0a93f714f3b4841ca6aa661e72877f02a213f9
SQL
crash-bandic00t/python_dev
/1_fourth/MySQL/lesson4/Script.sql
UTF-8
1,537
3.53125
4
[]
no_license
/* * Задание 1. * Применил скрипт *.sql для заполнения БД с сайта http://filldb.info/. Для выполнения 4 задания изменил * параметр даты созданного сообщения до максимально 2100 года. * * * Задание 2. * Написать скрипт, возвращающий список имен (только firstname) пользователей без повторений в алфавитном пор...
true
c339ea118e72ad57fefd005fea6e1a8fa4e633ba
SQL
jihyebaek123456/sql
/2021_03_24.sql
UTF-8
5,463
4.4375
4
[]
no_license
--SMITH가 속한 부서에 있는 직원들을 조회 --1. SMITH가 속한 부서 번호 알아내기 SELECT deptno FROM emp WHERE ename = 'SMITH'; --2. SMITH가 속한 부서에 있는 직원 조회하기 SELECT * FROM emp WHERE deptno = 20; --합체 : 서브쿼리 활용 > SMITH의 부서 번호가 바뀌면 결과도 달라짐 SELECT * --메인쿼리 FROM emp WHERE deptno = ( --서브쿼리 SELECT deptno FROM emp ...
true
09b13387bfaeccf212ae05b5c12b4e1488791028
SQL
thiagoaugustosilveirasilverio/SQL
/dio.sql
UTF-8
922
3.859375
4
[]
no_license
Create TABLE pessoas ( id INT NOT NULL PRIMARY KEY AUTOINCREMENTO, nome VARCHAR(30) NOT NULL, nascimento DATE ) INSERT INTO pessoas (nome, nascimento) VALUES ('Thiago', '1991 06 17') /*Insere na tabela pessoas o nome Thiago e a data de nascimento*/ INSERT INTO pessoas (nome, nascimento) VALUES ('Pedro', '...
true
828bf08477f9386107651cf5f032095409fe4ac7
SQL
yueshangduzhuo/ssm
/src/main/resources/sql/test.sql
UTF-8
2,390
3.484375
3
[]
no_license
/* Navicat Premium Data Transfer Source Server : localhost Source Server Type : MySQL Source Server Version : 50713 Source Host : localhost:3306 Source Schema : test Target Server Type : MySQL Target Server Version : 50713 File Encoding : 65001 Date: 29/06/2018 10:10...
true
50b9c283f7f4e4d8e9e629b6c7b104ba65cc9473
SQL
alexchernyavsky/healthiq
/db_scripts/populate_tables.sql
UTF-8
11,334
2.984375
3
[]
no_license
--exercise insert into exercise_index (id, exercise_name, exercise_index) values (1,'Crunches',20); insert into exercise_index (id, exercise_name, exercise_index) values (2,'Walking',15); insert into exercise_index (id, exercise_name, exercise_index) values (3,'Running',40); insert into exercise_index (id, exercise_na...
true
ae86eac49649aeab613221b094e32f4151b95f95
SQL
anblack14/Homework_Repo
/09_SQL/Part 3/HW_Foreign_Keys.sql
UTF-8
1,706
4.125
4
[]
no_license
drop table if exists table_one drop table if exists table_two create table table_one ( name varchar (30) not null, state varchar (30) not null, age int not null ); create table table_two ( name varchar (30) not null, occupation varchar (30) not null, gender varchar (30) not null ); insert into table_one (name...
true
795a5e429a2084d77024843eb774c7d6ba012272
SQL
pjuliano/glowing-waffle
/Procedures/KD_Data_Compare.sql
UTF-8
1,173
3.0625
3
[]
no_license
Create Or Replace Procedure KD_Compare_Data As Begin Execute Immediate 'Delete From Kd_Sales_Data_Compare_Table A Where Refresh_Date = Sysdate'; Execute Immediate 'Insert Into KD_Sales_Data_Compare_Table Select Extract(Year From Invoicedate) As Year, Corporate_Form, Sum(Allamo...
true
bbfbdeab2b18db255518031191a8997b3ee55e79
SQL
silence-do-good/stress-test-Postgres-and-MySQL
/dump/high/day21/select0533.sql
UTF-8
260
2.984375
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='WeMo' AND sen.id=ci.SENSOR_ID AND ci.INFRASTRUCTURE_ID=ANY(array['5058','4224','6028','4064','2011','4086','1412','3234','5234','6064'])
true
1648f1273ce66ea661f65c6b1a0f89cd77948339
SQL
coasterka/SoftUniBackEnd
/1-Databases/Data-Modeling-and-ER-Diagrams-HW/p4_mySQL_script.sql
UTF-8
8,207
3.5
4
[]
no_license
-- MySQL Script generated by MySQL Workbench -- 06/26/15 16:54:58 -- 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