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
4638ae2e999ec0462cf34ee16399bfb8d46e9749
SQL
CarlosAlbaLopez/ecommerce
/Dump20210421.sql
UTF-8
6,660
3.1875
3
[]
no_license
-- MySQL dump 10.13 Distrib 8.0.22, for Linux (x86_64) -- -- Host: localhost Database: ecommerce -- ------------------------------------------------------ -- Server version 8.0.23-0ubuntu0.20.04.1 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_...
true
53497e55e9f6dd347d348b4c34de029de0a23ca0
SQL
MateusCosta21/estoquecontrole
/wpensar.sql
UTF-8
2,965
3.015625
3
[]
no_license
CREATE DATABASE IF NOT EXISTS `wpensar` /*!40100 DEFAULT CHARACTER SET utf8mb4 */; USE `wpensar`; -- MariaDB dump 10.18 Distrib 10.4.17-MariaDB, for Win64 (AMD64) -- -- Host: localhost Database: wpensar -- ------------------------------------------------------ -- Server version 10.4.17-MariaDB /*!40101 SET @OLD_C...
true
5de99370ef9a2237905117bec35c85fdacc462d0
SQL
connorjsmith/csc343db
/a2/q6.sql
UTF-8
3,117
4.09375
4
[]
no_license
-- Steady work SET SEARCH_PATH TO markus; DROP TABLE IF EXISTS q6; -- You must not change this table definition. CREATE TABLE q6 ( group_id integer, first_file varchar(25), first_time timestamp, first_submitter varchar(25), last_file varchar(25), last_time timestamp, last_submitter varcha...
true
0efd9da34a744f87c1000d299e8ce3efd81d5838
SQL
bigning/database_project
/db/recipe_schema.sql
UTF-8
6,251
3.640625
4
[]
no_license
DROP TABLE MeetingReport; DROP TABLE MeetingRSVP; DROP TABLE GroupMeeting; DROP TABLE GroupMember; DROP TABLE Groups; DROP TABLE ReviewImage; DROP TABLE Review; DROP TABLE RecipeRelation; DROP TABLE RecipeTag; DROP TABLE RecipeIngredient; DROP TABLE RecipeStep; DROP TABLE Recipe; DROP TABLE Tag; DROP TABLE User; CREAT...
true
2f1caec2d665a96deba5a5d849d6c5293f338de4
SQL
defhacks/wca-ipy
/sql/create_senior_details_view.sql
UTF-8
1,617
4.15625
4
[]
no_license
/* Script: Create Senior Details View Created: 2019-05-28 Author: Michael George / 2015GEOR02 Purpose: Create view providing useful information about seniors */ DROP VIEW IF EXISTS wca_ipy.SeniorDetails; CREATE VIEW wca_ipy.SeniorDetails AS SELECT s.personId, s.name, s.countryId, ...
true
7918fda52152ecd08864f410803909af7c0427a5
SQL
ANicolleau/AutochessPython
/database/sql_script/init.sql
UTF-8
2,840
2.921875
3
[]
no_license
CREATE DATABASE IF NOT EXISTS autochess; CREATE TABLE IF NOT EXISTS autochess.board(id INT PRIMARY KEY NOT NULL AUTO_INCREMENT, name VARCHAR(255), spot INT, bonus INT); CREATE TABLE IF NOT EXISTS autochess.heroes(id INT PRIMARY KEY NOT NULL AUTO_INCREMENT, name VARCHAR(255), health INT, money INT, level INT); CREATE TA...
true
d686637b03e81a1ea3ec6e0fdca07e49ee960928
SQL
MNafisN/Spring_PBKK_D_Payment_Service
/Database(MySQL)/payment_service.sql
UTF-8
3,920
3.375
3
[]
no_license
/* SQLyog Ultimate v12.09 (32 bit) MySQL - 5.6.20 : Database - payment_service ********************************************************************* */ /*!40101 SET NAMES utf8 */; /*!40101 SET SQL_MODE=''*/; /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; /*!40014 SET @OLD_FOREIGN_K...
true
0eedb52d6256354893053060e32880b3c8d7fbd4
SQL
caiocv18/clinica-odontologica-mysql
/6-insert-tecnico.sql
UTF-8
2,035
2.609375
3
[]
no_license
USE CLINICA_ODONTOLOGICA; INSERT INTO TECNICO( TECNO,NOME,CPF,SALARIO,DATA_ADMISSAO,DATA_NASCIMENTO,DDD,TELEFONE,CRO_TSB) VALUES( '1','MARCELO','111111111',1200,'2000-11-28','1980-11-28','61','911111111','CRO/DF 111.111' ); INSERT INTO TECNICO( TECNO,NOME,CPF,SALARIO,DATA_ADMISSAO,DATA_NASCIMENTO,DDD,TELEFONE,CRO_TSB...
true
d34e4af8701d88bcf34fa6280e38fe3f939b1d5e
SQL
nitinkumar04/LiquorWarehouse
/LiquorWarehouseStage_1_0/GVW/Tables/CurrencyDim.sql
UTF-8
690
2.75
3
[]
no_license
CREATE TABLE [GVW].[CurrencyDim] ( [GVWCurrencySKey] int identity(1,1), [ID] VARCHAR (18) NOT NULL, [ISOCode] VARCHAR (20) NULL, [ConversionRate] VARCHAR (50) NULL, [DecimalPlaces] VARCHAR (50) NULL, [IsActive] VARCHAR (6) NULL, [IsCorporate] VA...
true
878e620a39d44a127e9ad6d7962ed4a8009b8c79
SQL
hvenugopalan/CS564-SP
/ddl_script.sql
UTF-8
2,587
4.21875
4
[]
no_license
CREATE DATABASE IF NOT EXISTS InvestmentPortfolio; USE InvestmentPortfolio; CREATE TABLE IF NOT EXISTS company( ticker VARCHAR(15) NOT NULL, year YEAR(4) NOT NULL, market_cap DOUBLE(32, 2), revenue DOUBLE(32, 4), operating_income DOUBLE(32,4), net_income DOUBLE(32,4), dividend_per_share DOUBLE...
true
8fd01f2549980c151125a547b5e75c80e12c68e9
SQL
Matheus-Campos/brazilian-ecommerce
/sql/Numero de Lojas por Cidade.sql
UTF-8
222
3.359375
3
[]
no_license
SELECT seller_state, seller_city, COUNT(*) as qtd, COUNT(*)/total.total * 100 AS percentage, total.total FROM sellers, ( SELECT COUNT(*) AS total FROM sellers ) AS total GROUP BY seller_state, seller_city ORDER BY qtd DESC
true
cff25fb793af1f406f173a23d2f8ca9d833d09a3
SQL
connormcd/misc-scripts
/office-hours/oh_exp1.sql
UTF-8
1,117
3.546875
4
[ "LicenseRef-scancode-warranty-disclaimer", "Apache-2.0" ]
permissive
REM REM Standard disclaimer - anything in here can be used at your own risk. REM REM It is very likely you'll need to edit the script for correct usernames/passwords etc. REM REM No warranty or liability etc etc etc. See the license file in the git repo root REM REM *** USE AT YOUR OWN RISK *** REM set termout off ...
true
28999eab3e3118240dd2d3ad9872e3288acff9f3
SQL
bryancha-ui/I308
/Build.sql
UTF-8
11,735
3.53125
4
[]
no_license
DROP TABLE IF EXISTS violation_payments CASCADE; DROP TABLE IF EXISTS violations CASCADE; DROP TABLE IF EXISTS receipt CASCADE; DROP TABLE IF EXISTS vehicle CASCADE; DROP TABLE IF EXISTS parking_users_phone CASCADE; DROP TABLE IF EXISTS parking_user CASCADE; DROP TABLE IF EXISTS employees CASCADE; DROP TABLE IF ...
true
7c146ab6fb6999dccd0c04ac71b45d415ce58402
SQL
cyb43/project-tp5-fastadmin181210
/info/data/p_tp5_fadmin181210_sd_20190725/p_tp5_fadmin181210_fa_user_rule.sql
UTF-8
3,576
2.953125
3
[ "Apache-2.0" ]
permissive
CREATE DATABASE IF NOT EXISTS `p_tp5_fadmin181210` /*!40100 DEFAULT CHARACTER SET utf8 */; USE `p_tp5_fadmin181210`; -- MySQL dump 10.13 Distrib 5.7.17, for macos10.12 (x86_64) -- -- Host: 127.0.0.1 Database: p_tp5_fadmin181210 -- ------------------------------------------------------ -- Server version 5.6.35 /*!...
true
9290bc1eead1290fdbdad29e07c8f34fb3d092dd
SQL
dhoss/artorias
/src/main/resources/db/migration/V2__create_post_table.sql
UTF-8
749
4.09375
4
[]
no_license
CREATE TABLE post ( post_id SERIAL PRIMARY KEY NOT NULL, title text NOT NULL, slug text NOT NULL, body text NOT NULL, author_id integer REFERENCES author(author_id), created_on timestamp with time zone DEFAULT now(), updated_on timestamp with time zone DEFAULT now(), published_on timesta...
true
ad4c77105eed54153f5d0056714e25a6cf550dd9
SQL
gollumiko/SportsShop
/db/schema.sql
UTF-8
1,053
3.171875
3
[]
no_license
BEGIN TRANSACTION; CREATE TABLE IF NOT EXISTS `category` ( `categoryid` INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, `description` TEXT, `image` TEXT ); INSERT INTO `category` VALUES (1,'Hiking','hiking.png'); INSERT INTO `category` VALUES (2,'Climbing','climbing.png'); CREATE TABLE IF NOT EXISTS `article` ( `articl...
true
fc4c8503a835adb2eb23c569495200c34f738204
SQL
sanei-dengyo-jyoho/SQL-Server
/部門_Q異動最新.sql
UTF-8
585
3.265625
3
[]
no_license
with v0 as ( select v00.新部門コード , v00.日付 , v00.年度 , v00.会社コード , v00.部門レベル , v00.部門コード , v00.上位コード , v00.所在地コード , v00.集計部門コード , v00.部門名 , v00.部門名カナ , v00.部門名略称 , v00.部門名省略 , v00.集計先 from 部門_T異動 as v00 inner join ( select max(s1.日付) as 日付 , s1.部門コード from 部門_T異動 as s1 group by s1.部門コード ) as v10 on v10.日付 =...
true
7572c668aed03daa27c022d4891e0750e486416c
SQL
lochmueller/calendarize
/Tests/Functional/Fixtures/Extensions/cal/ext_tables.sql
UTF-8
22,418
2.75
3
[]
no_license
# Source: https://gitlab.com/janhelke/cal/-/blob/0487d82241d5a214c720b582fa1d786f6419f10b/ext_tables.sql # License: GPL-2.0-or-later # # Table structure for table 'tx_cal_event' # CREATE TABLE tx_cal_event ( uid int(11) unsigned DEFAULT '0' NOT NULL auto_increment, pid int(11) DEFAULT '0' NOT NULL, tstamp int(11) u...
true
f9d0ab8ecdbc0039e73214a8acb8e89da59f4542
SQL
Chakkrit1997/Project-3
/Library_old/project/SQL/project-3.sql
UTF-8
2,150
3.046875
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.8.3 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Oct 07, 2018 at 01:12 PM -- 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
8186c10bbc4dc4df68f96f02aab1c1d0d94cab60
SQL
JavaScalaDeveloper/Java20190715
/JavaWeb/src/MySQL/Practice/5-子查询练习.sql
UTF-8
1,069
3.109375
3
[]
no_license
# 1.查询和Zlotkey相同部门的员工姓名和工资 # 2.查询工资比公司平均工资高的员工的员工号,姓名和工资。 #3*.查询各部门中工资比本部门平均工资高的员工的员工号, 姓名和工资 #4.查询和姓名中包含字母u的员工在相同部门的员工的员工号和姓名 # 5.查询在部门的location_id为1700的部门工作的员工的员工号 # 6.查询管理者是King的员工姓名和工资 7. 查询工资最低的员工信息: last_name, salary 8. 查询平均工资最低的部门信息 9*.查询平均工资最低的部门信息和该部门的平均工资 ...
true
4c87e59336030966d1b8709fc228b6887ed95a9f
SQL
caueguedes/uri_online_judge
/sql/2619_super_luxury.sql
UTF-8
270
3.4375
3
[]
no_license
SELECT products.name, providers.name, products.price FROM products JOIN categories ON products.id_categories = categories.id JOIN providers ON products.id_providers = providers.id WHERE categories.name = 'Super Luxury' AND products.price > 1000
true
0b1d1ed7eb2dcb5a249407c79666c95afbfe89be
SQL
danstoyanov/CSharp-Databases
/HackerRank - MS SQL SERVER Problems/P53_TopCompetitors.sql
UTF-8
423
4.25
4
[ "MIT" ]
permissive
SELECT h.Hacker_Id, h.Name FROM Hackers AS h, Challenges AS c, Difficulty AS d, Submissions AS s WHERE h.Hacker_Id = s.Hacker_Id AND c.Challenge_Id = s.Challenge_Id AND c.Difficulty_Level = d.Difficulty_Level AND s.Score = d.Score GROUP BY h.Hacker_Id, h.N...
true
8bd2b4bef850cc8ce12ea3c71ed9b71417630024
SQL
x-cpu/SQL
/FaxesInVersusOut_2day_backupcopy.sql
UTF-8
1,397
3.796875
4
[]
no_license
select distinct s.kbatch BatchName, count(distinct d.dcsid) TotalPackets, count(distinct a.dcsid) AutoCestPackets from stats s left join document d on s.kbatch = d.PBatch left join AutoCestRecon a on s.kbatch = a.pbatch where s.releasedate >= '2020-01-01' and s.releasedate < '2020-02-01' and s.kbatch like '...
true
c6aea0251940afa2d86201e13c79b5f4ea562719
SQL
r50206v/Leetcode-Practice
/2022/SQL-1075-ProjectEmployeesI.sql
UTF-8
187
3.96875
4
[]
no_license
SELECT b.project_id, ROUND(AVG(experience_years), 2) AS average_years FROM Employee AS a LEFT JOIN Project AS b ON a.employee_id = b.employee_id WHERE b.project_id IS NOT NULL GROUP BY 1;
true
380b38edf152d81465be0f6338d7e6552ff531cc
SQL
bellmit/SVNrepo
/DBScripts/DEV/Release_20161225.UOB/TEMPDB/tmp_sec_fixedmodel_subasset.sql
UTF-8
607
2.640625
3
[]
no_license
DROP TABLE IF EXISTS `invdb`.`tmp_sec_fixedmodel_subasset`; DROP TABLE IF EXISTS `temp`.`tmp_sec_fixedmodel_subasset`; CREATE TABLE `temp`.`tmp_sec_fixedmodel_subasset` ( `theme` varchar(20) NOT NULL, `level` varchar(20) NOT NULL, `asset` varchar(40) NOT NULL, `keyname` varchar(30) NOT NULL, `keydescription`...
true
a7349e42985721b0c541561c45bf4199390ed512
SQL
Silke-F/beat-match
/sql/users.sql
UTF-8
3,403
3.578125
4
[]
no_license
DROP TABLE IF EXISTS artists; DROP TABLE IF EXISTS chats; DROP TABLE IF EXISTS friend_requests; DROP TABLE IF EXISTS secret_code; DROP TABLE IF EXISTS users; CREATE TABLE users ( id SERIAL PRIMARY KEY, firstname VARCHAR(500) NOT NULL, lastname VARCHAR(500) NOT NULL, email VARCHAR(500) NOT NULL, pas...
true
8e877f7498d6d0ae8a52f9e0c267820a1ceda27b
SQL
robertocuyar/database-exercises
/albums_migration.sql
UTF-8
278
2.78125
3
[]
no_license
USE codeup_test_db; DROP TABLE IF EXISTS albums; CREATE TABLE albums( id INT UNSIGNED NOT NULL AUTO_INCREMENT, artist varchar(75) NOT NULL, name varchar(75) DEFAULT 'NONE', release_date INT UNSIGNED NOT NULL, sales FLOAT NOT NULL, genre varchar(75) NOT NULL, PRIMARY KEY (id) );
true
83dd2b6829e3697ec036c2d2bdf996903bb19c0c
SQL
radtek/scripts-oracle-named
/Indices/consultar_indices_estatisticas.sql
UTF-8
891
4
4
[ "MIT" ]
permissive
SELECT A.TABLESPACE_NAME, A.TABLE_NAME, A.INDEX_NAME, COUNT(B.COLUMN_POSITION) TOT_COLUMN_POSITION, SUM( DECODE( C.DATA_TYPE, 'NUMBER', DATA_PRECISION, DATA_LENGTH ) ) TAM_DADOS, MAX( A.NUM_ROWS) AS MAX_NUM_ROWS, MAX( D.BLOCKS) AS MAX_BL...
true
8b994daf79223e862cb693882f42586a88cf31f6
SQL
wi11san/Projeto_Interdisciplinar-l
/projeto_pi/banco_de_dados.sql
UTF-8
958
3.140625
3
[]
no_license
CREATE TABLE funcionarios ( ID INT(11) NOT NULL AUTO_INCREMENT, FUNCIONARIO VARCHAR(255) NOT NULL, SENHA VARCHAR(255) NOT NULL, PRIMARY KEY(ID) ); CREATE TABLE leitores ( id_leitor INT(11) NOT NULL AUTO_INCREMENT, nome_leitor VARCHAR(255) NOT NULL, rg_leitor INT(7) NOT NULL, endereco_leitor ...
true
25354d96aed47fa6946a34d586ebef35b8fd407b
SQL
xanthosgeorge/baseis_ergasia
/project_baseis/sqlfilesandpdf/vehicle_accountinginfo.sql
UTF-8
1,319
3.046875
3
[]
no_license
create table vehicle_accountinginfo( licence_number VARCHAR(50) not null, serial_number numeric not null, year numeric, primary key (licence_number), foreign key(serial_number) references vehicles_technical(serial_number) ); insert into vehicle_accountinginfo (licence_number, serial_number, year) values ('ΙΚΚ4125'...
true
cd21a074945417e3108214e185fbf78cae252538
SQL
Rodrigo-Aquino/SteamDataBase
/pergunta-6/online_offline_numero_jogos.sql
UTF-8
254
3.109375
3
[]
no_license
SELECT CASE WHEN INSTR(categories, "Online") > 0 THEN "Online" ELSE "Offline" END AS Categoria, COUNT(appid) AS "Número de jogos", AVG(average_playtime) AS "Tempo médio de jogo" FROM steam GROUP BY Categoria;
true
085beb675284c8e6c8b0215cfa77fac3769f1b94
SQL
microsoft/Azure_Synapse_Toolbox
/TSQL_Queries/Current_Activity/QueuedQueryTime.sql
UTF-8
867
3.3125
3
[ "LicenseRef-scancode-generic-cla", "MIT" ]
permissive
/* ======================= Queued Query Time ======================= The following query looks for queries that had the longest time between submit_time and start_time. These queries were blocked by resources being locked or waiting for a concurrentcy slot. Source: https://docs.microsoft.com/en-us/azure/sq...
true
43f2af68920caaf834d0bca243733610ec1feabd
SQL
MatheoSantana/ChatInstitucionalV2
/Base de datos/respaldoHatchat.sql
UTF-8
33,110
2.921875
3
[]
no_license
-- MySQL dump 10.13 Distrib 5.7.34, for Win64 (x86_64) -- -- Host: localhost Database: hatchat -- ------------------------------------------------------ -- Server version 5.7.34-log /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;...
true
ad1e231808ffc68f2083bcd99cd60f06f3ab7c69
SQL
BryceStPierre/ActivityAnalysis
/ActivityAnalysisStage/Stage/Stored Procedures/TransformFacebookLoginActivity.sql
UTF-8
454
2.921875
3
[ "MIT" ]
permissive
CREATE PROCEDURE [Stage].[TransformFacebookLoginActivity] AS TRUNCATE TABLE [Stage].[FacebookLoginActivity]; INSERT INTO [Stage].[FacebookLoginActivity] ( [Date], [Action], [Type], [IPAddress] ) SELECT [timestamp] AS Date, [action] AS Action, CASE LEFT([site], CHARINDEX('.', [site]) - 1) WHEN 'w...
true
af0594950a619e8d6d86fd0c38532498336da231
SQL
yesweican/leetcode
/sql/q0176/solution0176.sql
UTF-8
321
3.4375
3
[]
no_license
/*won't work for less than 2 records*/ select Salary as SecondHighestSalary from (select Salary from Employee order by Salary desc limit 2) as TopSalaries order by Salary limit 1; /*won't work if there are ties*/ select Max(Salary) as SecondHighestSalary from Employee where Salary< (select Max(Salary) from Employee);...
true
58a143d166dec0ec313a2f3b93c7343909b879d6
SQL
michalmytnik/liquibaseintro
/src/main/resources/liquibase/db-changelog-1.0.sql
UTF-8
496
2.796875
3
[]
no_license
--liquibase formatted sql --changeset michalmytnik:1.0-16122016-create-employee context:ddl-1.0 logicalFilePath:db-changelog-1.0.sql create table EMPLOYEE ( ID int not null primary key, BIRTH_DATE date, FIRST_NAME varchar(14)not null, LAST_NAME varchar(18) not null, GENDER varchar(2) not null, HIRE_DATE date ); --ch...
true
6b8cd45a32557901c0ab531f88088084ff514926
SQL
dmadams/cs121-2017
/final/make-radio.sql
UTF-8
4,353
4.1875
4
[]
no_license
-- [Problem 1.3] -- DROP TABLE commands: DROP TABLE IF EXISTS playlist; DROP TABLE IF EXISTS promotions; DROP TABLE IF EXISTS ads; DROP TABLE IF EXISTS emails; DROP TABLE IF EXISTS companies; DROP TABLE IF EXISTS artists; DROP TABLE IF EXISTS tags; DROP TABLE IF EXISTS songs; DROP TABLE IF EXISTS audio_files; -- CREA...
true
d93c148fb68d31fa62f7c348057f946d0dafd143
SQL
maxthink/cai
/cai.sql
UTF-8
17,644
3.21875
3
[]
no_license
/* Navicat MySQL Data Transfer Source Server : localhost Source Server Version : 50524 Source Host : 127.0.0.1:3306 Source Database : cai Target Server Type : MYSQL Target Server Version : 50524 File Encoding : 65001 Date: 2018-07-10 20:24:51 */ SET FOREIGN_KEY_CHEC...
true
60c87e8e592d58972d03c20dab306abf457b25e4
SQL
Clariel10/BDVentas
/VENTAS BD (TUTORIAL).sql
UTF-8
3,542
3.46875
3
[]
no_license
create database VENTAS; drop database VENTAS; use VENTAS; --Crear Tablas create table Productos( id_producto int identity(1,1) primary key not null, id_categoria int not null foreign key references Categorias(id_categoria), id_proveedor int not null foreign key references Proveedores(id_proveedor), nombre_producto va...
true
becbd2025336029192453fee6fad2afde89c05ef
SQL
chenguiwen/kewei
/ruoyi-system/src/main/powernumMenu.sql
UTF-8
1,582
2.5625
3
[ "MIT" ]
permissive
-- 菜单 SQL insert into sys_menu (menu_name, parent_id, order_num, url,menu_type, visible, perms, icon, create_by, create_time, update_by, update_time, remark) values('电力公司', '3', '1', '/system/powernum', 'C', '0', 'system:powernum:view', '#', 'admin', '2018-03-01', 'ry', '2018-03-01', '电力公司菜单'); -- 按钮父菜单ID SELECT @pare...
true
a05a8cc4831cf2accc3490010eeaaeefaa6b836d
SQL
gintire/login_server
/src_org/main/resources/db/hsqldb/schema.sql
UTF-8
810
4.15625
4
[]
no_license
DROP TABLE USER IF EXISTS; DROP TABLE USER_ID_UINDEX IF EXISTS; DROP TABLE SNS IF EXISTS; create table USER ( ID INTEGER default 1000 not null, NAME CHAR not null, ADDRESS CHAR, NICK_NAME CHAR, EMAIL CHAR, BIRTHDAY TIMESTAMP, ACTIVE BOOLEAN, CREATE_DATE TIMESTAMP, LEAVE_DATE TIMESTAMP, COLUMN_11 INTEGER, co...
true
9899bd802fbabfa4d69dc19234eccb1d36e0f0a1
SQL
NoraCarey/Leetcode-SQL
/SQL/1783. Grand Slam Titles/mysql_union_all_subquery.sql
UTF-8
448
3.609375
4
[]
no_license
SELECT a.player_id, player_name, COUNT(a.player_id) AS grand_slams_count FROM (SELECT Wimbledon AS player_id FROM Championships UNION ALL SELECT Fr_open AS player_id FROM Championships UNION ALL SELECT US_open AS player_id FROM Championships UNION ALL SELECT Au_...
true
4fb05e807390db138cc4c0528fee11e9701c8de9
SQL
eliben/code-for-blog
/2019/joins/joins-multicolumn.sql
UTF-8
890
3.90625
4
[ "Unlicense", "LicenseRef-scancode-public-domain" ]
permissive
-- Companion SQL for the blog post about SQL joins. -- Example like joins.sql but joining on multiple columns. -- -- Eli Bendersky [http://eli.thegreenplace.net] -- This code is in the public domain. drop table if exists t1; drop table if exists t2; create table t1 ( id int primary key, name text, ranking ...
true
268af3327d23a6d56e615c798e9e78bb712c004d
SQL
Ddsluke/Tourism-website
/Html/php/16098537d.sql
UTF-8
30,778
3.34375
3
[]
no_license
-- MySQL Script generated by MySQL Workbench -- Wed Nov 21 17:49:52 2018 -- Model: New Model Version: 1.0 -- MySQL Workbench Forward Engineering SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0; SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0; SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='ON...
true
96affae8f06764f54213ff2bbd3df4744395ed50
SQL
medy13/dbshell
/today_shell/SPECIAL_ENTRY_GPTMP_TODAY.sql
UTF-8
728
2.625
3
[]
no_license
\echo ------------------SPECIAL_ENTRY---------------- select now(); \timing delete from SPECIAL_ENTRY_GPTMP; insert into SPECIAL_ENTRY_GPTMP (CMD_TYPE,ENTRY_ID, OP_TIME) select CMD_TYPE,ENTRY_ID, OP_TIME from SPECIAL_ENTRY_INC_EXT; delete from SPECIAL_ENTRY_GPTMP_TODAY using SPECIAL_ENTRY_GPTMP where SPECIAL_ENTRY_GPTM...
true
861cb7f04878acb4dffb6a652f201e2265d5934c
SQL
pschuongvtt/API_LECTURE
/Employee - Copy.sql
UTF-8
869
3.328125
3
[]
no_license
CREATE DATABASE EmployeeAPI; Use EmployeeAPI; CREATE TABLE Employee( ID INT NOT NULL, FIRSTNAME VARCHAR (20) NOT NULL, LASTNAME VARCHAR (20) NOT NULL, GENDER VARCHAR (20) NOT NULL, SALARY INT NOT NULL, PRIMARY KEY (ID) ); use EmployeeAPI; INSERT INTO Employee VALUES (1, 'Mark', '...
true
9be9cdcec203ea331c2d631ad7830163feb0485e
SQL
UKseniya/MySQL_Exercises
/Chapter 6.sql
UTF-8
1,083
3.609375
4
[]
no_license
/*Заполните в следующем запросе пробелы, чтобы получить такие результаты*/ SELECT e.emp_id, e.fname, e.lname, b.name FROM employee e INNER JOIN branch b ON e.assigned_branch_id = b.branch_id; /*Напищите запрос, по которому для каждого клиента-физического лица (customer.cust_type_cd = 'I') возвращаются ID счета, федера...
true
13a59b5c3256ca8671b95540d330aaab37cb31ec
SQL
Vishnualuri/SQL
/Aluri_Venkata Vishnuvardhan_P3.sql
UTF-8
13,870
3.828125
4
[]
no_license
CREATE TABLE DEGREE (Deg_code VARCHAR(30) NOT NULL, Deg_name VARCHAR(50) NOT NULL, Description VARCHAR(200) NOT NULL, PRIMARY KEY (Deg_code), UNIQUE (Deg_name)); CREATE TABLE COURSE (Course_no VARCHAR(30) NOT NULL, Course_name VARCHAR(50) NOT NULL, Description VARCHAR(200) NOT NULL, PRIMARY KEY(Course_no), U...
true
1cb7282e425e46bf83326aa46c2df76193b2b925
SQL
clausherther/dbt-ml-preprocessing
/macros/normalizer.sql
UTF-8
841
3.296875
3
[ "MIT" ]
permissive
{% macro normalizer(source_table,source_columns, include_columns='*') %} {%- if include_columns=='*' -%} {%- set all_source_columns = adapter.get_columns_in_relation(source_table) | map(attribute='quoted') -%} {% set include_columns = all_source_columns | join(', ') %} {%- endif -%} with magnitude_calcs as ( sele...
true
87f53398adad9eed00af98b1f600373191fdc51e
SQL
Ditrim023/hospital
/src/main/resources/db/migration/V1__Create_Base.sql
UTF-8
1,420
3.234375
3
[]
no_license
CREATE TABLE activities ( id BIGINT NOT NULL AUTO_INCREMENT, date_active BIGINT NOT NULL, login VARCHAR(255), PRIMARY KEY (id) ); CREATE TABLE comments ( id BIGINT NOT NULL AUTO_INCREMENT, author VARCHAR(255) NOT NULL, author_id BIGINT NOT NULL, ...
true
6e2e821632d2341964ad1310718a5a0ed1b511f7
SQL
OpenGDSMobile/ApplicationServer_eGov
/src/main/resources/webmapping/db/pgqlCreateDBSQL.sql
UTF-8
440
2.578125
3
[]
no_license
CREATE DATABASE OPENGDSMOBILE_DB WITH OWNER = postgres ENCODING = 'UTF8' TABLESPACE = pg_default LC_COLLATE = 'en_US.UTF-8' LC_CTYPE = 'en_US.UTF-8' CONNECTION LIMIT = -1; CREATE EXTENSION postgis; CREATE TABLE "REALTIMEINFO" ( "SUBJECT" character varying(50), "USER_ID...
true
c0a27e7c8e1fad98e2aaedebd87fb8153c259cdd
SQL
vadimgelman12/Bamazon-CLI
/bamazon_seed.sql
UTF-8
1,538
3
3
[]
no_license
CREATE DATABASE bamazon_db; USE bamazon_db; CREATE TABLE products ( item_id INT NOT NULL AUTO_INCREMENT, product_name VARCHAR(100) NOT NULL, department_name VARCHAR(100), price DECIMAL(10,2) NOT NULL, stock_quantity INT NOT NULL, PRIMARY KEY (item_id) ); INSERT INTO products (product_name, dep...
true
ed3c4e94c977fd696fc34255ecb84d3e3dc4976b
SQL
mosfeck/gophp
/public/assets/Blog_tbl.sql
UTF-8
432
3.015625
3
[ "MIT" ]
permissive
DROP DATABASE IF EXISTS `test_db`; CREATE DATABASE `test_db`; USE `test_db`; DROP TABLE IF EXISTS `posts`; CREATE TABLE `posts` ( `post_id` int(11) NOT NULL AUTO_INCREMENT, `post_title` varchar(255) NULL, `post_content` text NULL, `post_created_at` datetime NULL, `post_updated_at` datetime NULL, ...
true
c0454f8343a41395fca8e8cf7f0cc2a6c67ae5e8
SQL
patilanup246/Merkle
/VTWC/ibm_sandbox/CRM/Views/vw_Journey.sql
UTF-8
1,712
3.15625
3
[]
no_license
CREATE VIEW [CRM].[vw_Journey] AS SELECT a.[JourneyID] ,a.[SalesDetailID] ,a.[SalesTransactionID] ,a.[CustomerID] ,a.[LocationIDOrigin] ,b.[CRSCode] AS [CRSCodeOrigin] ,a.[LocationIDDestination] ,c.[CRSCode] AS [CR...
true
7fd21dd46d7fa3d4a07fcfbf65df33b76a288e94
SQL
orenlivne/ober
/primal/src/code/annotate/bin/create-db.mysql
UTF-8
5,111
3.578125
4
[]
no_license
-- Hutterites CGI variant annotation database: -- A script to create database and account -- Run with cat create-db.mysql | mysql -uroot -p<root password> drop database if exists `hutt`; create database `hutt`; grant all on `hutt`.* to 'hutt'@'localhost' identified by 'hutt'; use hutt; -- Schema -- TODO: add indices ...
true
726acb214fd2c50c3f59ddfedd5a128a8e644e55
SQL
dherv/bjj_notes
/src/migrations/sqls/20190912130044-teachers-up.sql
UTF-8
421
3.46875
3
[]
no_license
CREATE TABLE teachers ( id INT AUTO_INCREMENT, name VARCHAR(255) NOT NULL, club_id INT, created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, updated_at TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, deleted_at TIMESTAMP DEFAULT NULL, PRIMARY KEY (id), FOREIGN KEY (club_id) REFERENCES clubs (id) ON UPDATE CASCADE ON ...
true
9036c1d43b52f7ae98fa3c06209b05a0176d5d10
SQL
didgewind/ejb3.1_empleados
/bd/empleadossimple.sql
UTF-8
598
2.875
3
[]
no_license
create database if not exists empleados_simple; use empleados_simple; create table if not exists emp (cif varchar(9) NOT NULL, nombre varchar(20), apellidos varchar(20), edad integer, primary key (cif)); insert into emp values ("34334789H", "Antonio", "Martín", 23); insert into emp values ("21094387T", "Juan", "G...
true
47c23088716d09ac834efd9f4cbff15f2e811800
SQL
jasonfish568/vpnadmin
/install/data/install.sql
UTF-8
5,008
3.1875
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 3.4.8 -- http://www.phpmyadmin.net -- -- 主机: localhost -- 生成日期: 2013 年 09 月 13 日 03:10 -- 服务器版本: 5.1.60 -- PHP 版本: 5.2.17p1 SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_S...
true
7b56407a65897b0809be23173065844286e4135e
SQL
edigonzales/afu_ipw_bauzonen
/gretl/create_bauzonengrenzen.sql
UTF-8
680
2.671875
3
[ "MIT" ]
permissive
INSERT INTO arp_bauzonengrenzen_pub.bauzonengrenzen_bauzonengrenze ( geometrie, bfsnr, zonentyp ) SELECT ST_Multi(ST_Union(ST_RemoveRepeatedPoints(ST_SnapToGrid(geometrie, 0.001)))), bfs_nr AS bfsnr, 'Bauzone' AS zonentyp FROM arp_npl_pub.nutzungsplanung_grundnutzung WHERE bfs_nr = ${bfsnr} AND ...
true
6ca1a8517a313788da9df1f933cd74db9bb18418
SQL
Jormungand18/thunder
/Tarea3 - Ramos/build/classes/evento.scripts/sp_evento.sql
UTF-8
855
3.71875
4
[]
no_license
--insercion de registro en tb_evento CREATE PROCEDURE sp_insertar_evento (in Id int(11), in Nombre varchar(50), in Fecha varchar(50), in Direccion varchar(50), in Capacidad int(11)) insert into event values(Id,Nombre,Fecha,Direccion,Capacidad); -- eliminacion en tb_evento CREATE PROCEDURE sp_eliminar_evento(...
true
bf92bca0a1089e6161cb672fae99b281baeda0ff
SQL
clausman/courier
/conf/evolutions/default/1.sql
UTF-8
1,853
3.28125
3
[ "MIT" ]
permissive
# --- Created by Ebean DDL # To stop Ebean DDL generation, remove this comment and start using Evolutions # --- !Ups create table copy_test ( id bigint not null, notification_id bigint, message_id bigint, test_id integer, send_limit ...
true
7794e81987e58b0371029fddfa2a55d421a9b6ad
SQL
ivanasen/fmi-databases
/exercises/exercise-1-mysql.sql
UTF-8
1,187
3.671875
4
[]
no_license
-- Problem 1 USE movies; SELECT ADDRESS FROM STUDIO WHERE NAME = 'MGM'; SELECT BIRTHDATE FROM MOVIESTAR WHERE NAME = 'Sandra Bullock'; SELECT NAME FROM MOVIESTAR WHERE NAME IN ( SELECT STARNAME FROM STARSIN WHERE MOVIEYEAR = 1980 AND MOVIETITLE LIKE '%Empire%' ); SELECT NAME FROM MOVIEEXEC WHERE N...
true
3292749d680cd5860c4035140eb6bd9199b1bcd6
SQL
bagada/Warehouse
/src/main/resources/db/db_create.sql
UTF-8
6,508
3.546875
4
[]
no_license
/* MySQL Backup Source Server Version: 5.5.8 Source Database: WAREHOUSE Date: 10/04/2012 15:33:49 */ SET FOREIGN_KEY_CHECKS=0; -- ---------------------------- -- Table structure for `WAREHOUSE_address` -- ---------------------------- DROP TABLE IF EXISTS `WAREHOUSE_ADDRESS`; CREATE TABLE `WAREHOUSE_ADDRESS` ( `ID_...
true
6d58a7b6f6b20501c9a0b378bd6fded96dd32e32
SQL
yohei1126/introduction_to_db
/06_SQL/SQL_Movie_Rating_Query_Exercises_Challenge_Level/q3.sql
UTF-8
427
4.28125
4
[]
no_license
-- Q3 Some directors directed more than one movie. For all such directors, -- return the titles of all movies directed by them, along with the director name. -- Sort by director name, then movie title. (As an extra challenge, try writing the query both with and without COUNT.) select title, director from Movie wher...
true
72406588a836bab242d74c25c1b7b212094a34ba
SQL
James-Rocker/JRocker-SQL-Portfolio
/Joins/Self Join.sql
UTF-8
170
3.140625
3
[ "MIT" ]
permissive
SELECT p1.country_code, p1.size AS size2010, p2.size AS size2015 FROM populations AS p1 inner JOIN populations AS p2 ON p1.country_code = p2.country_code;
true
ff36fe14da5892736a4f40b03ea60a44f4182829
SQL
Draegyn-Consulting/Article-scripts
/reading-sql-server-change-tracking-results/present_column_changes.sql
UTF-8
490
2.71875
3
[]
no_license
SELECT ChVer = SYS_CHANGE_VERSION, ChCrVer = SYS_CHANGE_CREATION_VERSION, ChOp = SYS_CHANGE_OPERATION, AddLine1_Changed = CHANGE_TRACKING_IS_COLUMN_IN_MASK (COLUMNPROPERTY(OBJECT_ID('Person.Address'), 'AddressLine1', 'ColumnId') ,ChTbl.sys_change_columns), AddLine2_Changed = CHANGE_TRACKING_IS_COLUMN_IN_MASK ...
true
b9d71d19bc5c4a22c5a46edd8af0ee10a988643d
SQL
kinyelo/portalteam-pack
/portalteam-portlet/docroot/WEB-INF/sql/tables.sql
UTF-8
1,268
2.515625
3
[]
no_license
create table PORTALTEAM_Form ( formId LONG not null primary key, createDate DATE null, modifiedDate DATE null, createUserId LONG, modUserId LONG, companyId LONG, title VARCHAR(75) null, name VARCHAR(75) null, email VARCHAR(75) null, letterSubject VARCHAR(75) null, letterTemplate TEXT null, sendButtonTitle ...
true
6ef76b125fc76bbde8ba9013184748ac15ee5721
SQL
DaniloArruda/sistema-academico
/artefatos do banco de dados/DML/quantidade_alunos_novos_menores_de_idade.sql
UTF-8
221
3.59375
4
[ "Apache-2.0" ]
permissive
select a.* from aluno a inner join matricula m on a.codigo = m.codigo_aluno left join historico_matricula hm on m.codigo = hm.codigo_matricula where hm.codigo_matricula is null and year(a.data_nascimento) > 2000;
true
cb06bb8e7be648ca803afe7ba321b8e792757d0f
SQL
vitalspirit/MySQL-homeworks-repo
/Итоговый проект/Setting_right_values_in_some_tables.sql
UTF-8
1,438
3.8125
4
[]
no_license
# Корректируем даты создания и обновления чтобы они следовали после дня рождения SELECT* FROM user_info UPDATE user_info SET created_at = birthday + interval 8 year WHERE created_at < birthday; UPDATE user_info SET updated_at = created_at + interval 8 day WHERE created_at > updated_at; #Корректируем даты в та...
true
0d973732dfee2c08dc69243b8d296a688b2d36ae
SQL
fossabot/oo4j
/oo4j-core/src/main/resources/queries/types.sql
UTF-8
374
3.921875
4
[ "MIT" ]
permissive
SELECT t.OWNER, t.TYPE_NAME, t.TYPECODE, ta.ATTR_NAME, ta.ATTR_TYPE_NAME, ct.ELEM_TYPE_NAME FROM ALL_TYPES t, ALL_TYPE_ATTRS ta, ALL_COLL_TYPES ct WHERE t.OWNER IN (:owners) AND t.OWNER = ta.OWNER(+) AND t.TYPE_NAME = ta.TYPE_NAME(+) AND t.OWNER = ct.OWNER(+) AND t.TYPE_NAME = ct.TYPE_NAME(+) ORDER BY ...
true
f0779cafa81be4ce268df5e87eed5944d415c9f0
SQL
isabella232/culper
/api/migrations/20171012163935_legal.sql
UTF-8
4,968
3.09375
3
[ "LicenseRef-scancode-public-domain", "CC0-1.0" ]
permissive
-- +goose Up -- SQL in section 'Up' is executed when this migration is applied -- +goose StatementBegin CREATE TABLE legal_associations_activities_to_overthrows ( id bigint REFERENCES accounts(id) NOT NULL PRIMARY KEY, has_activities_id bigint REFERENCES branches(id), list_id bigi...
true
374c083f8c4e2079c0f525e8b31681277789f487
SQL
maheshkrishnagopal/HackerRankSolutions
/SQL/SQL - Basic Select - Weather Observation Station 3.sql
UTF-8
140
2.859375
3
[]
no_license
/* https://www.hackerrank.com/challenges/weather-observation-station-3 */ select distinct(city) from station where mod(id,2)=0;
true
2b0d95195442fc6b92a04cd0a04a3dcbb0ed0416
SQL
pepelluyot/mysql-procedimientos
/10-ejemplo10_sp.sql
UTF-8
1,314
3.734375
4
[]
no_license
/*Crea un procedimiento (​ ejemplo10_sp.sql​ ) con dos parámetros de entrada (usuario y contraseña) y uno de salida (mensaje) Hacer uso de IF, ELSE para comprobar si un usuario pasado por parámetros existe en la base de datos con esa contraseña. Devolvemos en la variable de saida estos tres posibles valores: usuario no...
true
88305dc794a22b3e816a12fca8c7d1da11d1a484
SQL
willian1996/_Curso-PHP-do-Zero-ao-Profissional-B7WEB
/Modulo-08_Banco_de_Dados/Entrega 14 - Funções do MySQL.sql
UTF-8
1,547
4.15625
4
[]
no_license
select * from funcionario order by id; #1-Qual é o número médio de filhos por funcionário da empresa? select avg(filhos) from funcionario; #2-Qual é o valor de salários pagos aos funcionários do departamento 4? select salario from funcionario where departamento = 4; #3-3Quantos funcionários estão no departame...
true
571a8d26b92ecb42146c6518acfc7a4b7a4c0644
SQL
maycon205/Aulas
/Tecnologias em BD - 2º ano/Script/carros.txt
UTF-8
1,611
3.46875
3
[]
no_license
create database carros; use carros; -- cria a tabela de marcas create table cor ( id_cor int not null, cor varchar(20), primary key(id_cor) ); insert into cor values(1,"Branco"); insert into cor values(2,"Preto"); insert into cor values(3,"Vermelho"); insert into cor values(4,"Azul"); insert into cor values(5,...
true
e5faac7af250b820b342a5e8b7675a847c0d1dcf
SQL
sprokushev/Delphi
/MASTER/_DATABASE/Views/V_LUKREP_SF_AKCIZ.sql
WINDOWS-1251
3,086
2.515625
3
[]
no_license
-- -- V_LUKREP_SF_AKCIZ (View) -- CREATE OR REPLACE FORCE VIEW MASTER.V_LUKREP_SF_AKCIZ (NUM_5_DAY, IS_KORR, IS_AGENT, SOBSTV, PLAT_ID, PLAT_INN, PLAT_NAME, PLAT_ADDR, DOG_ID, DOG_NUMBER, DOG_DATE, NOM_DOK, NOM_SF, ORIG_NOM_SF, OLD_NOM_SF, NPO_SF, NOM_SCH, DATE_VYP_SF, NOM_AKT, DATE_AKT, PROD_ID_NPR, PROD_NAM...
true
62e96818369ca88b3d1df78c33fe37228457eae9
SQL
PaulinaMilewska/Games-Heroes
/src/main/resources/data.sql
UTF-8
581
2.5625
3
[]
no_license
INSERT INTO heroes(id, names, forces, gems) VALUES (1, 'Arthemon', 7, 'diamond'), (2, 'Medeo', 8, 'uncut'), (3, 'Xena', 5, 'ruby'); INSERT INTO vehicles(id, names, speeds, values, hero_id ) VALUES (1, 'Horse', 7, 11, 1), (2, 'Dragon', 10, 20, 2), (3, 'Carriage', 12, 32, 3); INSERT INTO wea...
true
bdef7f508f7cc9c2edf7e0f11a61483c3dc69e0c
SQL
paulomauri/GitScripts
/script_monitoring_tablespace_free_space_autoextend.sql
UTF-8
463
2.859375
3
[]
no_license
with ts_free as (select tablespace_name, round(sum(bytes)/1048576) free_mb from dba_free_space group by tablespace_name), ts_alloc as (select tablespace_name, round(sum(decode(autoextensible,'YES',maxbytes,bytes))/1048576) alloc_mb from dba_data_files group by tablespace_name) select tablespace_name, status, alloc_m...
true
a9d0e62d55a113d733b518e625201198c4ef57a3
SQL
Augusto-DF/ProjetoBd
/Povoamento do banco.sql
UTF-8
1,700
2.765625
3
[]
no_license
#Cpf de 1 digito so pra facilitar na hora de logar insert into pessoa (cpf, nome, datanasc, senha) values ("0", "Cliente M", "05/02/1995", "..."); insert into pessoa (cpf, nome, datanasc, senha) values ("1", "Gerente A", "05/02/1995", "..."); insert into pessoa (cpf, nome, datanasc, senha) values ("2", "Garçom Zé", "0...
true
6220c0958bd8ed7fca189d3d2c23ba2e6f22a264
SQL
santig19/DBT
/models/processing/tmp_f_call_user.sql
UTF-8
4,136
3.015625
3
[]
no_license
{{ config( post_hook="grant all privileges on {{ this }} to {{ var('snowflake_user_grant_privileges') }}") }} SELECT FC.Account_Plan_Id, FC.Call_Therapeutical_Area, FC.Call_Counter_And_Expenses_Id, FC.Account_Id, FC.Brick_Code, FC.Assignment_Id, FC.Call_Territory, FC.Country_Code, FC.Call_Attendee_Type,...
true
2bdf4337543bfacb1c91c407b29bd35564aada5e
SQL
tbondare/taxi_application
/src/main/resources/init_db.sql
UTF-8
3,456
3.875
4
[]
no_license
CREATE SCHEMA `taxi_schema` DEFAULT CHARACTER SET utf8 ; CREATE TABLE `taxi_schema`.`manufacturers` ( `id` BIGINT(11) NOT NULL AUTO_INCREMENT, `name` VARCHAR(225) NOT NULL, ...
true
83d64d901574cf0e786daede48a12beaabc8dadb
SQL
rubychilds/Intro_to_Databases
/week 6/triggersSocialNetworkChallenge.sql
UTF-8
1,703
4.5
4
[]
no_license
# Q1 # Write one or more triggers to maintain symmetry in friend relationships. Specifically, if (A,B) is deleted from Friend, then (B,A) should be deleted too. If (A,B) is inserted into Friend then (B,A) should be inserted too. Don't worry about updates to the Friend table. CREATE TRIGGER T1 AFTER DELETE ON Friend ...
true
7494efed680500fe117b56fcd6a84d79fa24fa24
SQL
tortoise4race/SQL
/labs/tn1/workshops/shared_mem.sql
UTF-8
224
3.203125
3
[]
no_license
select kept_mem, all_mem, (all_mem-kept_mem) reuse_mem from (select SUM(sharable_mem) kept_mem from v$db_object_cache where kept = 'YES') K, (Select SUM(SHARABLE_MEM) all_mem from v$db_object_cache) A /
true
36736e769a8b14719da24aa3c2d4dbdc8dc5690c
SQL
mohammed-merahi/travel-laravel-5.4
/supertravel.sql
UTF-8
5,993
3.0625
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.5.1 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: Jul 04, 2017 at 07:13 PM -- Server version: 10.1.13-MariaDB -- PHP Version: 5.6.21 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CL...
true
e8366f10e6629ee76985672fff3815c79b825f30
SQL
ian0371/Alfred-Timezone-Converter
/db/db.sql
UTF-8
1,022
3.734375
4
[ "MIT" ]
permissive
DROP TABLE `continent`; DROP TABLE `country`; DROP TABLE `timezone`; DROP TABLE `city`; CREATE TABLE IF NOT EXISTS `continent` ( `id` INTEGER PRIMARY KEY AUTOINCREMENT, `name` TEXT NOT NULL UNIQUE, `code` TEXT NOT NULL UNIQUE ); CREATE TABLE IF NOT EXISTS `country` ( `id` INTEGER PRIMARY KEY AUTOINCRE...
true
73e10c45e9a8562ee9aceb667c61cba480ac80b8
SQL
nascbiel/Banco-de-dados-SQL
/AtividadesBandoDeDados/atividade3.sql
UTF-8
937
3.046875
3
[]
no_license
create database db_escola; use db_escola; create table tb_alunos( id bigint(5) auto_increment, nome varchar(255) not null, sala int not null, notas int not null, registro int not null, primary key(id) ); insert into tb_alunos (nome,sala,notas,registro) values ("Gabriel",1,8,1); insert into tb_alunos (nome,sala,not...
true
59ca2be065f218aaab6f8a6c712db5027e378668
SQL
ghoneycutt/highrise
/ext/create_db.sql
UTF-8
649
3.34375
3
[ "Apache-2.0" ]
permissive
USE `mysql`; CREATE DATABASE IF NOT EXISTS `highrise` DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_general_ci; USE `highrise`; CREATE TABLE `highrise` ( `id` INT NOT NULL AUTO_INCREMENT, `name` VARCHAR( 255 ) NOT NULL, `puppetfile_repo` TEXT NOT NULL, `puppetfile_ref` TEXT NOT NULL, `hiera_repo` TEXT NO...
true
bd0112d3972e3153496a5b590a466657a7d61d1c
SQL
mattdennewitz/Baseball-PostgreSQL
/lahman/ddl/lahman_schema.sql
UTF-8
15,443
2.640625
3
[]
no_license
-- ---------------------------- -- Table structure for AllstarFull -- ---------------------------- DROP TABLE IF EXISTS "AllstarFull"; CREATE TABLE "AllstarFull" ( "playerID" varchar(9) NOT NULL, "yearID" int4 NOT NULL, "gameNum" int4 NOT NULL, "gameID" varchar(12), "teamID" varchar(3), "lgID" varchar(2), "GP" ...
true
dde5ae6b8cdd102d57f0052203caa06950e1872e
SQL
oradrs/tpt-oracle
/ast/03_index_supporting_sorts.sql
UTF-8
804
3.640625
4
[ "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. select owner, object_type, status, count(*) from indexed_objects o where owner = 'SYS' and object_type = 'JAVA CLASS' and c...
true
fc1cde54cb6253502662ae5becdd1007d6dcda72
SQL
SDIBTACM/Miscellaneous
/Database/create-sql.sql
UTF-8
27,556
3.484375
3
[]
no_license
-- MySQL Script generated by MySQL Workbench -- Thursday, May 09, 2019 AM11:18:00 CST -- 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,...
true
82c72d4bbf212fb6239dd829d58db61103c9d073
SQL
ursawd/springboardexercises
/Unit22/Unit22-2/sql-querying/queries_playstore.sql
UTF-8
2,825
4.59375
5
[]
no_license
-- Comments in SQL Start with dash-dash -- -- Find the app with an ID of 1880. SELECT * FROM analytics WHERE id=1880; -- Find the ID and app name for all apps that were last updated on August 01, 2018. SELECT id,app_name FROM analytics WHERE last_updated ='2018-08-01' -- Count the number of apps in each ca...
true
121c727d21d85554beca513bab1b4649438456d4
SQL
ElizabethKleynhans/clus
/SQL/checkingZoneConstraints.sql
UTF-8
1,803
3.203125
3
[ "Apache-2.0" ]
permissive
--UWR -- OK SELECT * FROM public.zone_uwr WHERE zoneid IN (SELECT g.zoneid FROM (SELECT * FROM public.zone_uwr FULL OUTER JOIN (SELECT (pvc).value as value, SUM((pvc).count) as count FROM (SELECT ST_ValueCount(rast,1,true) AS pvc FROM rast.zone_cond_uwr) AS f GROUP BY value ORDER BY value) as h ON zoneid = value...
true
adfddac6f406f6192f8408c2ae0dcc199845bc0e
SQL
Eslam138/-OnlineLibraryManagementSystem-master
/database/libsystem (1).sql
UTF-8
2,794
3.046875
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 5.0.2 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: May 29, 2020 at 02:16 AM -- Server version: 10.4.11-MariaDB -- PHP Version: 7.4.5 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIEN...
true
1c513790a1436a0438fec92eaf1ef76c95866754
SQL
fgr-17/dassopg
/6_sql/ej2_5.sql
UTF-8
138
2.9375
3
[]
no_license
select s.idSensor, s.name, s.unit, st.description from Sensors s inner join SensorsTypes st on s.idType = st.id where s.name like "%Temp%"
true
6bbf30c687f1c50bf91196252c9689e5a5257d84
SQL
bernhardmgruber/philosophywiki
/doc/scripts/LinksToPhilosophy.sql
ISO-8859-1
221
3.515625
4
[]
no_license
WITHtemp(id)AS( SELECTp.id FROMPagep WHEREp.title='Philosophie' UNIONALL SELECTfl.src FROMFirstLinkfl JOINtemptONfl.dst=t.id ) SELECTCOUNT(DISTINCT(t.id)) - 1 FROMtempt;
true
9ff4175697a975995f9085f3970463b45af04e92
SQL
jdbarajass/Ejercicios-y-Retos-MinTic
/Ciclo 2 Java MinTic/Base De Datos MySQL Workbench/Bases de datos/base_ficha_tecnica.sql
UTF-8
3,283
4.21875
4
[]
no_license
#Creadmos la base de datos CREATE DATABASE IF NOT EXISTS base_peliculas; # Selecionamos la base de datos que queremos programar o tambien podemos darle doble click a la base de datos USE base_peliculas; # Debemos siempre primero crear las tablas que no tienen relacion entre si #Creamos las tablas sin relacion CREAT...
true
6b921706250c1cf43da24c049e1ac25d4b960c06
SQL
ojInc/packages
/WmOAFIN107SC/dbscripts/wm_from_glbalance_vw.sql
UTF-8
4,001
2.875
3
[]
no_license
/* *************************************************************************** * $Date: 14 Aug 2001 10:56:36 $ * $Revision: 1.0 $ * $Author: * Copyright (c) 2002, webMethods Inc. All Rights Reserved * *******************************************************************...
true
f77fdab4e35d5bda712395ed736cca93ae457d73
SQL
AlexeySkridlevskiy/SENLA_Task
/src/main/resources/db/SQL.sql
UTF-8
420
3.078125
3
[]
no_license
CREATE TABLE orders( id int NOT NULL, user_id int NOT NULL, status varchar(50) NOT NULL, created_at varchar(50) NOT NULL ); CREATE TABLE order_items( order_id int NOT NULL, product_id int NOT NULL, quantity int NOT NULL ); CREATE TABLE products( id int NOT NULL, name varchar(50) NO...
true
3b4ae7301bea2daffbf734c6f75560339d898531
SQL
rutholliday/10-SQL
/10-SQL-Holliday.sql
UTF-8
8,035
4.53125
5
[]
no_license
USE sakila; -- 1a. Display the first and last names of all actors from the table actor. SELECT first_name, last_name FROM actor; -- 1b. Display the first and last name of each actor in a single column -- in upper case letters. Name the column Actor Name. SELECT UPPER(CONCAT(first_name, " ", last_name)) AS Actor_Nam...
true
fd37f8d3ee0284927e2bd9a556fe2bcf613329c7
SQL
dampyre/controlCalidad
/SQL Dump.sql
UTF-8
1,986
2.9375
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 2.10.3 -- http://www.phpmyadmin.net -- -- Servidor: localhost -- Tiempo de generación: 03-09-2012 a las 16:57:41 -- Versión del servidor: 5.0.51 -- Versión de PHP: 5.2.6 SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO"; -- -- Base de datos: `login` -- -- ----------------------...
true