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
1d5bb4ee62e8090284915c669a57cee6cb022780
SQL
samyan19/SQL-Scripts
/SAM - Memory/MEMORY - Buffer Pool by Database.sql
UTF-8
346
3.65625
4
[]
no_license
SELECT DB_NAME(database_id) AS [Database Name] ,CAST(COUNT(*) * 8/1024.0 AS DECIMAL (10,2)) AS [Cached Size (MB)] FROM sys.dm_os_buffer_descriptors WITH (NOLOCK) WHERE database_id not in (1,3,4) -- system databases AND database_id <> 32767 -- ResourceDB GROUP BY DB_NAME(database_id) ORDER BY [Cached Size (MB)...
true
bff2493365751edd9182599996417985239f9970
SQL
aserafin/postgresql_bb
/store_and_query_json.sql
UTF-8
1,202
4
4
[]
no_license
CREATE TABLE IF NOT EXISTS orders ( id integer, info jsonb ); insert into orders values(1, '{"price": 100, "tax": 10, "items": [{"sku_code": "A001", "quantity": 1}, {"sku_code": "A003", "quantity": 2}]}'); insert into orders values(2, '{"price": 200, "tax": 20, "items": [{"sku_code": "A002", "quantity": 5}]}'); -...
true
321f5c5dc9fbbaeab2b11457d6f618799796be70
SQL
geodatup/script-librairy
/SQL/ELYX/Restauration privilèges ROLES DPM DITTT 20110920/Restauration privileges-ROLES/DPM/11_roles/APIC_CONSULT.sql
ISO-8859-1
2,193
2.921875
3
[]
no_license
-- sauvegarde des utilisateurs associs au role DPM_APIC_CONSULT begin execute immediate 'call APICADM.OUTILS_APIC_ADMIN.SaveGrantee_role (''DPM_APIC_CONSULT'')'; exception when others then null; end; / begin execute immediate 'drop role DPM_APIC_CONSULT'; exception when others then null; end; ...
true
0da72eeb33b4a4dc06af507a1f461f27a611c55f
SQL
AlbertoGuzmanG/AudiSoft
/dashboard/sql_views/risk_information_tree.sql
UTF-8
992
3.671875
4
[]
no_license
-- select 0 into @v2; -- select 0 into @v1; -- select * from( -- select *, if(@v2 = indicator_id or @v2 = 0, @v1:= @v1 + 1, @v1:= 1) AS v1, @v2:= indicator_id from dashboard_indicatordata -- order by indicator_id, load_date DESC -- ) b where b.v1 <= 3; CREATE DEFINER=`root`@`localhost` PROCEDURE `risk_information_...
true
f4eac787594bb61f111f6e837e572dc0e786cdff
SQL
Austin-Whitley/database-exercises
/join_exercises.sql
UTF-8
3,309
4.84375
5
[]
no_license
USE join_test_db; #==============JOIN EXAMPLE DATABASE CREATION AND MANIPULATION=================== # first we must create the tables we want to join: # create a new table named roles that will hold an id and a name CREATE TABLE roles ( id INT UNSIGNED NOT NULL AUTO_INCREMENT, name VARCHAR(100) NOT NULL, ...
true
20c8ffbbad4481ed75be49fd413bce313a115293
SQL
seraf7/BDD
/Pruebas/Serie_Tema02_02.sql
UTF-8
1,741
3.671875
4
[]
no_license
-- @Autor: Humberto Serafín Castillo López -- @Fecha: 16/03/2021 -- @Descripción: Consultas correspondientes a los ejercicios de la serie 02 -- Tema 02 SELECT * FROM puesto WHERE SUBSTR(nombre, 0, 1) BETWEEN 'A' AND 'J'; SELECT * FROM puesto WHERE SUBSTR(nombre, 0, 1) BETWEEN 'K' AND 'R'...
true
308bf8900357af477537ad2a27c7eb6a55e5033b
SQL
cdprf/ip4r
/scripts/ip4r--2.2--2.4.sql
UTF-8
12,065
3.1875
3
[ "PostgreSQL", "LicenseRef-scancode-unknown-license-reference" ]
permissive
/* ip4r--2.2--2.4.sql */ -- complain if script is sourced in psql, rather than via ALTER EXTENSION \echo Use "ALTER EXTENSION ip4r UPDATE TO '2.4'" to load this file. \quit -- new funcs CREATE FUNCTION cidr_split(ip4r) RETURNS SETOF ip4r AS 'MODULE_PATHNAME','ip4r_cidr_split' LANGUAGE C IMMUTABLE STRICT ROWS 10; CREA...
true
4cd0237345dab3bd887579b39208cd2d7244b49e
SQL
LiuJiazhen1999/2021_pbds_reproducibility
/experiments/postgres/movies/q3/q3_64_use.sql
UTF-8
1,614
3.59375
4
[]
no_license
SELECT F0."title" AS "title", F0."movieid" AS "movieid", F0."total_cnt" AS "total_cnt" FROM ( SELECT F0."total_cnt" AS "total_cnt", F0."movieid1" AS "movieid1", F1."movieid" AS "movieid", F1."title" AS "title", F1."genres" AS "genres" FROM (( SELECT F0."total_cnt" AS "total_cnt", F0."movieid1" AS "movieid1" FROM ( SELE...
true
8b1fbeb680788f6ca96540e36bfbdf058ef153ce
SQL
Hauliu/yaying
/sql/version/running.sql
UTF-8
89,279
3.265625
3
[]
no_license
/* Navicat Premium Data Transfer Source Server : dev Source Server Type : MySQL Source Server Version : 80016 Source Host : localhost:3306 Source Schema : running Target Server Type : MySQL Target Server Version : 80016 File Encoding : 65001 Date: 27/08/2019 20:28:58...
true
5a693b0151c4e3393a530bfae8bc26b241611e28
SQL
RZID/dmt_project
/assets/from_sbadmin/img/dmt_hse (1).sql
UTF-8
3,075
2.953125
3
[ "MIT", "LicenseRef-scancode-unknown-license-reference" ]
permissive
-- phpMyAdmin SQL Dump -- version 4.9.1 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Waktu pembuatan: 06 Jun 2020 pada 11.57 -- Versi server: 10.4.8-MariaDB -- Versi PHP: 7.3.10 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARA...
true
8452e6f85034ab1a997b67c7417119a512611f11
SQL
rosebaby0426/goodhouse-maven
/flyway/src/main/resources/migration/V1_9__create_table_HousePhoto.sql
UTF-8
421
2.78125
3
[]
no_license
DROP TABLE IF EXISTS house_photo; -- 房屋照片 create table house_photo ( id int(10) unsigned PRIMARY KEY NOT NULL AUTO_INCREMENT, house_no varchar(10) NOT NULL COMMENT '房屋編號', `name` varchar(256) NOT NULL COMMENT '照片名稱', ...
true
921c9df5861602040f7d0f646df9f2b48f5f536e
SQL
hoangphung21/soccer-analyst-1
/SQL/DataCleaning/DataCleaning.sql
UTF-8
3,455
4.0625
4
[]
no_license
/* Cleaning Data in SQL */ Select * from PortfolioProjects..Housing -- Standardlize Date Format Select SaleDate2, CONVERT(Date,saledate) from PortfolioProjects..Housing update Housing Set SaleDate = CONVERT(Date,saledate) Alter Table Housing add Saledate2 Date; update Housing set Saledate2 = CONVERT(Date,saledate...
true
cc6f75ab96c08ab768534cd216b926c14cdf9e84
SQL
prashant-shahi/internlite
/backup.sql
UTF-8
5,541
3.25
3
[ "MIT" ]
permissive
-- MySQL dump 10.13 Distrib 5.7.22, for Linux (x86_64) -- -- Host: localhost Database: internlite -- ------------------------------------------------------ -- Server version 5.7.22-0ubuntu0.16.04.1 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER...
true
dd0bc66a351877f3cf1ff1e91fecc35635ee4f5f
SQL
carlosbpf/XCoLab
/sql/deployments/deployment-dateunknown-view-changes.sql
UTF-8
3,934
2.921875
3
[ "MIT" ]
permissive
-- portlet preferences INSERT INTO `xcolab_ConfigurationAttribute` (`name`, `additionalId`, `numericValue`, `stringValue`, `realValue`) VALUES ('PORTLET_CONTACT_FORM_PREFERENCES', '0', '0', ' {\"RECIPIENTS_PREF\": \"pdeboer@mit.edu,lfi@mit.edu,annalyn@mit.edu,jperron@mit.edu\",\"MESSAGE_SUBJECT_PREF\": \"[CoLab] USER_N...
true
a12c15972646b8f6665dfc46a1255cfb30d73a9e
SQL
TareqJudehGithub/data_science_udacity
/lesson3/GROUP_BY.sql
UTF-8
1,451
4.375
4
[]
no_license
SELECT account_id, SUM (standard_qty) AS standard_sum, SUM (gloss_qty) AS gloss_sum, SUM (poster_qty) AS poster_sum FROM orders WHERE account_id IS NOT NULL GROUP BY account_id ORDER BY account_id DESC LIMIT 10; -- Questions: GROUP BY -- Q1 SELECT accounts.name AS account_name, orders.occurred_at AS date_occured F...
true
0a09d564488168f193b47c4e6e04800482abf3db
SQL
NirmalVatsyayan/Data-Analyst-Nanodegree
/Term_1/Lesson-3-Introduction-to-Data-Analysis/Lessons/Sql-for-data-analysis/lab06-joins.sql
UTF-8
5,676
4.28125
4
[]
no_license
#SECTION 4 SELECT orders.*, accounts.* FROM accounts JOIN orders ON accounts.id = orders.account_id; SELECT accounts.website, accounts.primary_poc, orders.standard_qty, orders.gloss_qty, orders.poster_qty FROM accounts JOIN orders ON accounts.id = orders.account_id; #SECTION 11 SELECT accounts.pri...
true
af8361637e0183de29246da65b2b726c6d726924
SQL
AA19BD/DataBase
/lab6/Lab6.sql
UTF-8
3,988
3.90625
4
[]
no_license
CREATE DATABASE lab6; CREATE TABLE locations( location_id SERIAL PRIMARY KEY , street_address varchar(25), postal_code varchar(12), city varchar(30), state_province varchar(12) ); CREATE TABLE departments( department_id SERIAL PRIMARY KEY , department_name varchar(50) UNIQUE, budget INTE...
true
739d0dc67c02f7773d666fa3928ff5d22828d86f
SQL
Eppern/Apply
/Apply/Scripts/SqlScripts/20160415_CreateCompany.sql
UTF-8
439
3.390625
3
[]
no_license
/** * Create Company Table */ Create Table Company ( CompanyId int Primary Key Identity(1,1), CompanyName nvarchar(128) not null, UserName nvarchar(128) not null, ContactName nvarchar(128) null, EmailAddress nvarchar(128) not null, Telephone nvarchar(128) not null, Website nvarchar(128) not null, AspNetUserI...
true
d02d173eb21f3e22b98bd4319794152efaa77a35
SQL
unica-open/siacdbimpl
/src/sql/postgres/mif/invio_email_bonifici_18052017.sql
UTF-8
16,360
3.28125
3
[]
no_license
/* *SPDX-FileCopyrightText: Copyright 2020 | CSI Piemonte *SPDX-License-Identifier: EUPL-1.2 */ -- 18.05.2017 Sofia - rilascio invio email per bonifici sempre disattivo -- creazione struttura tabelle alter table siac_t_ente_oil add ente_oil_invio_email_cb boolean default false not null; select * from siac_t_ente_oil ...
true
47ba945d62fa86875204e1673453bec400bd478f
SQL
ksuboch/T-SQL_Fundamentals
/ch_05/q_0002.sql
UTF-8
473
3.609375
4
[]
no_license
USE TSQL2012; SELECT D.orderyear, COUNT(DISTINCT D.custid) AS numcusts FROM (SELECT YEAR(orderdate) AS orderyear, custid FROM Sales.Orders) AS D GROUP BY D.orderyear; SELECT YEAR(orderdate) AS orderyear, COUNT(DISTINCT custid) AS numcusts FROM Sales.Orders GROUP BY YEAR(orderdate); SELECT D.orderye...
true
17fa7b1d8d02a6b5cfe73413e3f88e3cd60a7fa2
SQL
Driw/tercom-php
/data/sql/updates/rev81.sql
UTF-8
406
3
3
[]
no_license
-- Novas tabelas CREATE TABLE IF NOT EXISTS addresses ( id INT AUTO_INCREMENT, state VARCHAR(2) NOT NULL, city VARCHAR(48) NOT NULL, cep CHAR(8) NOT NULL, neighborhood VARCHAR(32) NOT NULL, street VARCHAR(32) NOT NULL, number INT(5) NOT NULL, complement VARCHAR(24) NULL DEFAULT NULL, CONSTRAINT addresses_pk...
true
9de40a2125cde9328f373cbee685b5497b705f38
SQL
Lqd-990912/Java-Swing-JDBC-sqlserver
/数据查询.sql
UTF-8
7,806
4.71875
5
[]
no_license
/* 单表查询 */ --1.基本查询语句 --例1:查询Student表的部分属性:SN、SName SELECT SNo,SName FROM Student; --例2:查询Student表的全部属性 SELECT * FROM Student; --2.定义显示标题 --例 3:查询 Student 表的所有信息,SN 用“学号”,SName 用“姓名”,Sex 用“性别”, --Age 用“年龄”,Dept 用“系部”,Class 用“班级”来显示 SELECT SNo '学号',SName '姓名',Sex '性别',Age '年龄',Dept '系部',Class '班级' FROM S...
true
89f1af2c0941a72ecf789345d5825b2982e4832d
SQL
panstark/novel-cms
/web/db/dbmy/novel.sql
UTF-8
7,565
3.53125
4
[ "MIT" ]
permissive
-- 微信用户表 CREATE TABLE user_info_wx ( id varchar(64) NOT NULL COMMENT '主键', nick_name varchar(64) NOT NULL COMMENT '昵称', real_name varchar(64) NOT NULL COMMENT '真实名称', wx_id varchar(64) COMMENT '微信id', avatar_url varchar(600) COMMENT '头像路径', gender char(1) DEFAULT '0' COMMENT '状态(0男 1女)', province varchar(64) NO...
true
c029a02bdcd74e8acd81285c13ff52aa0d8af72f
SQL
padupe/desafio_softaliza-nodejs
/prisma/migrations/20210715190657_init/migration.sql
UTF-8
1,052
4.09375
4
[]
no_license
-- CreateTable CREATE TABLE "User" ( "id" TEXT NOT NULL, "username" VARCHAR(20) NOT NULL, "email" VARCHAR(48) NOT NULL, "password_hash" TEXT NOT NULL, "created_at" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, "updated_at" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY ("id...
true
4233ebc4a49188d5eb48f82e9dba27ae83b12746
SQL
zachcalvert/flickpick-project
/moviedb_2015-09-21.sql
UTF-8
614,206
3.171875
3
[]
no_license
# ************************************************************ # Sequel Pro SQL dump # Version 4096 # # http://www.sequelpro.com/ # http://code.google.com/p/sequel-pro/ # # Host: 127.0.0.1 (MySQL 5.6.26) # Database: moviedb # Generation Time: 2015-09-22 06:09:00 +0000 # *************************************************...
true
f3bfec07cb61e595f4d7de8e815207035722c10c
SQL
altamira/visualstudio
/Sistema de Informação Altamira/EGISSQL.Database/dbo/Stored Procedures/Procs1/pr_consulta_atraso_maquina.sql
UTF-8
4,110
3.609375
4
[]
no_license
 CREATE PROCEDURE pr_consulta_atraso_maquina ------------------------------------------------------------------------------------------------------ --pr_consulta_atraso_maquina ------------------------------------------------------------------------------------------------------ --GBS - Global Business Solution ...
true
f7139bb27920232def491d769b177d5fd86b995b
SQL
serj271/basic
/product/schema-mysql.sql
UTF-8
2,959
3.84375
4
[ "BSD-3-Clause" ]
permissive
use yii2basic; CREATE TABLE `product_categories` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `name` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `description` text COLLATE utf8_unicode_ci NOT NULL DEFAULT '', `order` int(10) unsigned NOT NULL, `parent_id` int(10) unsigned DEFAULT NULL, `image` varch...
true
762e28f8b9f7d2ddfd8fa1aa3a6f7de3f8829524
SQL
magicpwz/SSM-study
/dzshop.sql
UTF-8
13,188
3.40625
3
[]
no_license
/* Navicat Premium Data Transfer Source Server : libraryDBMS Source Server Type : MySQL Source Server Version : 50728 Source Host : localhost:3306 Source Schema : dzshop Target Server Type : MySQL Target Server Version : 50728 File Encoding : 65001 Date: 05/08/2020 2...
true
a400598bc1ea45d369b91724db00e5fb06cace8d
SQL
Logiccc/GymnasieArbete
/testing.sql
UTF-8
4,210
3.046875
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.6.6deb5 -- https://www.phpmyadmin.net/ -- -- Värd: localhost:3306 -- Tid vid skapande: 02 jun 2019 kl 23:07 -- Serverversion: 5.7.25-0ubuntu0.18.04.2 -- PHP-version: 7.2.15-0ubuntu0.18.04.1 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACT...
true
57313b2af7474e4e059c56efa46a61238edb17b0
SQL
Juliana0324/JulianaJang
/쌍용JavaSW_class/oracledb/homework0223.sql
UHC
2,674
4.40625
4
[]
no_license
-- 1. zipcode ̺ Ͽ cp_zipcode ̺ ϼ. create table cp_zipcode as (select * from zipcode); -- 2. zipcode ̺ seq÷ PK ϼ. alter table cp_zipcode add constraint pk_zipcode primary key(seq); --3. Ʒ Ͽ ̺ ϼ. -- : ̵, ̸, ּseq, ȭȣ, , , Է -- -- - ̵ null 鼭 մϴ. -- - ̸ ݵ ԷµǾ մϴ. -- - ּseq null cp_zipcode ̺ ϴ -- θ Է°մϴ. -- - ...
true
2cc982545c46a72f6661e0cb2d21c413b737ffaf
SQL
josepitteloud/VESPA
/ad_hoc/V135 - Capping Phase III/Phase I/1D - Dynamic threshold/Compile_Data_For_Capping.sql
UTF-8
21,330
4.03125
4
[]
no_license
/* 1. Compile viewing data for 5-11 Nov with variables required to create capping segments 2. Create a ntile curve for each segment 3. For each ntile curve calculate the first and second derivate */ ------------------------------------------------------------------------------------------------------------ -- Get...
true
50aa8ecd157597936fe9ec790974478fdc1093ac
SQL
greensure/WebAppDemo
/seckill/src/main/sql/procedure.sql
UTF-8
2,303
3.921875
4
[]
no_license
-- 秒杀存储执行过程 DELIMITER $$ --console换行符;转为$$ -- 定义存储过程 -- in输入参数-参数传递进来之后用于存储过程的使用, -- out输出参数-在存储过程中是不能使用的,但是可以给out参数赋值,赋值后在调用端可以拿到 --row_count():返回上亿条修改类型sql(delete,insert,update)影响行数 --row_count:0未修改数据, >0表示修改的行数,<0代表sql错误或者未修改sql CREATE PROCEDURE execute_seckill(IN v_seckill_id bigint, IN v_phone bigint, IN v_kill_ti...
true
71c6a40779a13c7d596514306bfd535a6a27e839
SQL
kevinau/pennyledger
/org.pennyledger.entitydb/sql/create-DividendVoucher.sql
UTF-8
788
2.96875
3
[]
no_license
drop table dividendVoucher; create table dividendVoucher ( id integer generated by default as identity not null primary key, version timestamp default current timestamp not null, eventDate date not null, distributionNo integer not null, companyYear integer not null, accountingYearEnd date not n...
true
b90db68d6518b6d997fc2984e03e91ea219fee08
SQL
praneeth91/BootcampX
/1_queries/non_gmail_students.sql
UTF-8
96
2.671875
3
[]
no_license
SELECT name, email, cohort_id FROM students WHERE phone is NULL AND email NOT LIKE 'gmail.com';
true
cdfb0f65b7d1f8e4b0b8e0dd570db3cf4a755b07
SQL
handfoot4work/dhdcsql
/sos/hdc_anc_5time_summary(ตรงเกณฑ์).sql
UTF-8
4,461
3.5
4
[]
no_license
set @start='2014-04-01'; set @end='2015-03-31'; select h.hoscode,h.hosname, (select count(distinct CID) as num from (select p.HOSPCODE,p.CID,p.PID,p.PRENAME,p.NAME,p.LNAME, la.LMP,la.BDATE,la.BTYPE, (select ga_date from (select a.HOSPCODE, a.PID, a.DATE_SERV, a.ANCNO, a.GA, l.LMP, datediff(a.DATE...
true
c44615c61cae9b03313bd7b2f8c7047710a70737
SQL
Matpif/BaseProject
/app/code/BaseProject/Admin/sql/install_20170922.sql
UTF-8
238
2.78125
3
[ "MIT" ]
permissive
CREATE TABLE admin_module ( id INT AUTO_INCREMENT PRIMARY KEY, module_name VARCHAR(50) NOT NULL, enable TINYINT(1) DEFAULT '1' NULL, CONSTRAINT admin_module_module_name_uindex UNIQUE (module_name) );
true
8d47057e9cd30ca6ccaae206cf8d413653361807
SQL
ocean66666/EasyDo
/v6.0/易行小组/02代码/03数据库/yixing.sql
UTF-8
7,837
3.59375
4
[]
no_license
/* Navicat MySQL Data Transfer Source Server : localhost_3306 Source Server Type : MySQL Source Server Version : 50643 Source Host : localhost:3306 Source Schema : yixing Target Server Type : MySQL Target Server Version : 50643 File Encoding : 65001 Date: 02/11/2020 ...
true
204ab361c6ae8e75a7504845b2af7d26e3459022
SQL
BenM13/Mintz_CS579_FinalProject
/CS579_FinalProject/Code/LiveDemo.sql
UTF-8
1,034
3.984375
4
[]
no_license
-- List customers who used a payment -- method that begins with "visa" SELECT customer_id, fname, lname, payment_method FROM customer WHERE payment_method LIKE 'visa%'; -- List the names of all customers who purchased a rental -- for 2 days or fewer SELECT fname, lname, agreement_id FROM customer JOIN agreement ON cu...
true
48c2f628890bdaa6381237251032f25d9594a69e
SQL
zbw322092/bw-tech-java
/src/main/resources/db/migration/V1.3__Create_Tags_Table.sql
UTF-8
458
2.703125
3
[]
no_license
DROP TABLE IF EXISTS `tags`; CREATE TABLE `tags` ( id VARCHAR(24) NOT NULL PRIMARY KEY, name VARCHAR(191) NOT NULL, slug VARCHAR(191) NOT NULL, description TEXT, feature_image VARCHAR(2000), parent_id VARCHAR(191), visibility VARCHAR(50) NOT NULL DEFAULT "public", meta_title VARCHAR(2000), meta_descri...
true
5ef95e971d1460cd32c1d8d0c55e558eb563df4f
SQL
vpaula90/WordGoal
/db/seeds-v1.sql
UTF-8
5,227
2.53125
3
[]
no_license
USE wordgoal_db; INSERT INTO students (last_name, first_name, homeroom_id, grade_level, word_goal, word_count, createdAt, updatedAt) VALUES ('Estevez', 'Christopher', 'LSU', 8, 100000, 1103711, "2019-07-09 16:21:19", "2019-07-09 16:21:19"); INSERT INTO students (last_name, first_name, homeroom_id, grade_level, word_...
true
1a2d92759ded4a43e3aed1b7989110f88e8d51ee
SQL
raymondmar61/sql
/w3joinssoccer.sql
UTF-8
41,895
4.40625
4
[]
no_license
#https://www.w3resource.com/sql/tutorials.php #https://www.w3resource.com/sql-exercises/index.php #https://www.w3resource.com/sql-exercises/soccer-database-exercise/joins-exercises-on-soccer-database.php #1. Write a query in SQL to find the name of the venue with city where the EURO cup 2016 final match was played. se...
true
720310af35b97bb0b999ca2ac6dc8269785512a7
SQL
appirio-tech/direct-app
/src/sql/direct_latest_activities.sql
UTF-8
2,307
4.125
4
[]
no_license
select cast('Contest Launched' as varchar(64)) as activity_type, p.tc_direct_project_id as tc_direct_project_id, tdp.name as tc_direct_project_name, pi.value as contest_name, p.project_id as contest_id, 0 as is_studio, p.create_user as user_id, u.handle as user, ph.actual_start_time as activity_time from project p,...
true
dafe646ce788d9389ccba7a1f2373c6084b9762b
SQL
CuboTecnologia/DnaFtpAtento
/DatabaseDna/TABLES/03 STATUS_CONTROLE_ARQ_ATENTO.sql
UTF-8
412
3.21875
3
[]
no_license
-- Create table CREATE TABLE DNAONLINE.STATUS_CONTROLE_ARQ_ATENTO ( CD_STATUS_CONTROLE_ARQUIVO NUMBER(2) NOT NULL, DS_STATUS_CONTROLE_ARQUIVO VARCHAR2(50) NOT NULL ) TABLESPACE TS_DNAONLINE; -- Create/Recreate primary, unique and foreign key constraints ALTER TABLE DNAONLINE.STATUS_CONTROLE_ARQ_ATENTO ...
true
2bdd317a3b36e0e58fb2be74ef980d08f2b4c2be
SQL
TFGTrainee/TFG.Trainee.IssueTracker
/Documents/Lessons/SQL/04.Merge/03.direct insert.sql
UTF-8
603
3.5
4
[]
no_license
SET STATISTICS IO ON DBCC DROPCLEANBUFFERS; DBCC FREEPROCCACHE WITH NO_INFOMSGS; begin transaction delete Staging.Client insert into Staging.Client select c.Id , c.Code, C.Name as Name, fcs.Name as Status, fect.Name as Type, c.CreatedOn as CreatedOn, c.UpdatedOn as UpdateOn from Flow.Client c inner join FlowEx...
true
54acd97017a39b6d845780d63f306735691e94f5
SQL
nik-web/stockfoto-nik
/db-migrations/user-modul/registration.sql
UTF-8
396
3.0625
3
[ "MIT" ]
permissive
-- -- Database table: `registration` -- DROP TABLE IF EXISTS `registration`; CREATE TABLE IF NOT EXISTS `registration` ( `id` int(11) NOT NULL AUTO_INCREMENT, `alias` varchar(128) NOT NULL, `email` varchar(128) NOT NULL, `created_on` datetime NOT NULL, `token` varchar(32) NOT NULL, PRIMARY KEY...
true
617a5a8081af45840459a2b8733adfa8f2fdca6d
SQL
seralf/mondial_sqlite
/sql/data/Citylocalname.sql
UTF-8
22,892
2.84375
3
[ "Apache-2.0" ]
permissive
/* Citylocalname */ DROP TABLE IF EXISTS Citylocalname ; CREATE TABLE IF NOT EXISTS Citylocalname( City VARCHAR2(50), Country VARCHAR2(4), Province VARCHAR2(50), localname VARCHAR2(120), CONSTRAINT CitylocalnameKey PRIMARY KEY (Country, Province, City) ) ; INSERT INTO Citylocalname(City,Country,Province,localn...
true
18c492297523f9f9dfb50284476ff368d6395f65
SQL
mschifer/mediawiki-hg-metrics
/cache/sql/mysql.sql
UTF-8
297
2.546875
3
[]
no_license
CREATE TABLE IF NOT EXISTS /*$wgDBprefix*/hgm_cache ( `id` integer(40) NOT NULL AUTO_INCREMENT, `key` varchar(255) NOT NULL DEFAULT '', `data` longtext, `expires` integer(11) NOT NULL DEFAULT 0, PRIMARY KEY (`id`), UNIQUE INDEX /*i*/uniq_hgm_cache_key (`key`) ) /*$wgDBTableOptions*/;
true
341d2bb26a85158e89e32c054a7da345dc81f73c
SQL
hkarthikraj01/tem
/database/trs.sql
UTF-8
3,325
3.09375
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.8.2 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Dec 30, 2019 at 09:10 PM -- Server version: 10.1.34-MariaDB -- PHP Version: 7.2.8 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD...
true
b7655418a169fa12450343c6258480a8ed3135e2
SQL
RatonBiswas/Datacamp-course
/Introduction to relational databases/Your first database/6.Migrate data with INSERT INTO SELECT DISTINCT.sql
UTF-8
713
3.359375
3
[]
no_license
--Instructions 1/2 Insert all DISTINCT professors from university_professors into professors. Print all the rows in professors. -- Insert unique professors into the new table insert into professors SELECT DISTINCT firstname, lastname, university_shortname FROM university_professors; -- Doublecheck the conten...
true
bd9d3016a49ed38eb3a5a583da6fc885df3909a3
SQL
sevdalin/Software-University-SoftUni
/CSharp-DB-Fundamentals/Databases Basics - MS SQL Server/02. Data Definition and Datatypes/Problem 18- Basic Insert.sql
UTF-8
442
2.546875
3
[ "MIT" ]
permissive
INSERT INTO Towns (Name) VALUES ('Sofia'), ('Plovdiv'), ('Varna'), ('Burgas') INSERT INTO Addresses (AddressText, TownId) VALUES ('asd', 1), ('asdd', 2), ('adsd', 3), ('awsd', 4) INSERT INTO Departments (Name) VALUES ('asd'), ('asdd'), ('adsd'), ('awsd') INSERT INTO Employees(FirstName, MiddleName, LastName, JobTitl...
true
713cbd8ac1f8bef72da0c60ac22e0a2e01f139ca
SQL
FernandoPerezRivadeiro/RestaurantDB
/demo2300.sql
UTF-8
8,747
3.1875
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.7.4 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1:3306 -- Generation Time: Dec 01, 2017 at 07:40 AM -- Server version: 5.7.19 -- PHP Version: 5.6.31 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CH...
true
a0e62c5a7046a3fde1d6b2016ab0ce4b68e27bc5
SQL
gcionut/FeedbackTest
/dbexport.sql
UTF-8
3,485
3.21875
3
[]
no_license
-- MySQL dump 10.13 Distrib 5.5.54, for debian-linux-gnu (armv7l) -- -- Host: localhost Database: test -- ------------------------------------------------------ -- Server version 5.5.54-0+deb7u1 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARAC...
true
4e784adf9df93ba5935c67c0feb2c90e8524e373
SQL
gorun8/easyfk
/src/baseapps/party/entitydef/mysql/contact.sql
UTF-8
10,344
3.21875
3
[ "Apache-2.0" ]
permissive
/* * Project:Easy Web Framework * Description: * EasyFK stands for Easy Web Framework.It's an open source product for E-Business / E-Commerce.It * was launched by a chinese Hezhiping(QQ:110476592) in 2015.The goal of EasyFK is to provide a * foundation and starting point for reliable, secure , simple-to-use ,cost...
true
08830279d0a34070d9ac243ee2e99d62012dbc67
SQL
shakhrayv/MIPT-PROGRAMMING
/DataBases/SQL-EX/026.SQL
UTF-8
289
3.53125
4
[]
no_license
with M as ( select PC.price, PC.model, PC.code from PC join Product on PC.model = Product.model where Product.maker = 'A' union select Laptop.price, Laptop.model, Laptop.code from Laptop join Product on Laptop.model = Product.model where Product.maker = 'A' ) select avg(price) from M
true
85a002402207581a709c05c0d5f93086262a6c33
SQL
Yiiman-cms/yiiman-basics
/src/modules/notification/db.sql
UTF-8
2,927
3.296875
3
[ "Apache-2.0" ]
permissive
/* Navicat Premium Data Transfer Source Server : loca Source Server Type : MySQL Source Server Version : 100417 Source Host : localhost:3306 Source Schema : medicard Target Server Type : MySQL Target Server Version : 100417 File Encoding : 65001 Date: 03/06/2021 12:5...
true
dd481a09548c3924a03bbe9117a5ce11b3066950
SQL
hemiSRT8/EmployeesManagement
/sql/deleteDepartment.sql
UTF-8
285
2.8125
3
[]
no_license
DELIMITER // CREATE DEFINER =`root`@`localhost` PROCEDURE `deleteDepartment`(IN departmentName VARCHAR(64)) BEGIN SET @s = CONCAT('DELETE FROM department WHERE name = ', departmentName, ';'); PREPARE stmt FROM @s; EXECUTE stmt; DEALLOCATE PREPARE stmt; END//
true
6a6ab3d5e5ba089a2a8d58237c80ae99254b6c87
SQL
Pater999/UNITN-database-assignments-2019
/Assignment 2/query_5.sql
UTF-8
119
2.578125
3
[]
no_license
select distinct beer from "Sells" where round(price::numeric,2) = (SELECT Max(round(price::numeric,2)) FROM "Sells");
true
279aa3989bf238d180ff140b6fa6b847ce06d621
SQL
yyanyi213/python
/secnews_scrapy/secnewsdb.sql
UTF-8
821
2.609375
3
[]
no_license
/* Navicat MySQL Data Transfer Source Server : secnews Source Server Version : 50553 Source Host : localhost:3306 Source Database : secnewsdb Target Server Type : MYSQL Target Server Version : 50553 File Encoding : 65001 Date: 2018-12-18 23:00:46 */ SET FOREIGN_KEY_CHECKS=0; -- -...
true
cae1456eef6102468f663d72dbbcb3c231521475
SQL
Prantho-das/lawfirm
/DB/larajaha_law.sql
UTF-8
30,314
3.09375
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.9.5 -- https://www.phpmyadmin.net/ -- -- Host: localhost:3306 -- Generation Time: Oct 18, 2020 at 08:09 AM -- Server version: 10.3.25-MariaDB -- PHP Version: 7.3.6 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET...
true
843b23f1373aedd1cfec32f04f7ea2e1fa2d5698
SQL
Andymendez100/Buger2
/db/schema.sql
UTF-8
260
2.96875
3
[]
no_license
-- Created the DB "Burgers_db" (only works on local connections) CREATE DATABASE burgers_db; USE burgers_db; -- Created the table "Burgers" CREATE TABLE burgers ( id int AUTO_INCREMENT PRIMARY KEY, burger_name varchar (50) NOT NULL, devoured BOOLEAN );
true
83e6af3485ed8c02f9a4718bd764b156103006ae
SQL
tarikargan/formulaire-de-candidature
/database/candidat.sql
UTF-8
3,503
3.234375
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 5.1.0 -- https://www.phpmyadmin.net/ -- -- Hôte : 127.0.0.1 -- Généré le : lun. 21 juin 2021 à 16:40 -- Version du serveur : 10.4.18-MariaDB -- Version de PHP : 8.0.3 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SE...
true
3b1389c626d774b5f44a85253b1d75292e735fde
SQL
a-kravets/SQL-Server-Data-BI
/010_SQLQuery.sql
UTF-8
4,749
3.828125
4
[]
no_license
/*ЗАДАНИЕ 1. Напишите SQL-запрос, который выбирает из таблицы phones столбец os. Используя операцию сравнения like отобрать только те строки, которые начинаются с «android v»*/ SELECT os FROM phones WHERE os LIKE 'android v%' /*ЗАДАНИЕ 2. Используя функцию charindex() добавьте в запрос из задачи 1 столбец...
true
6143303d7dcd8aaa7ea6b5ddd84e9694f24a5c43
SQL
DavidBenjaminRuiz/PracticasPriv
/SQL/1-OCT-2020.sql
UTF-8
567
3.390625
3
[]
no_license
CREATE USER david@'localhost' IDENTIFIED BY 'david'; FLUSH PRIVILEGES; CREATE USER david123@'localhost' IDENTIFIED BY 'david123'; FLUSH PRIVILEGES; CREATE DATABASE IF NOT EXISTS david CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci; USE david; CREATE TABLE clientes( id INT, nombre VARCHAR(50), fecha DA...
true
21f956e014581a070b2187751e7a1ffe96cc29d3
SQL
king54346/ktorTest
/_localhost-2021_03_31_12_26_24-dump2.sql
UTF-8
2,561
2.9375
3
[ "Apache-2.0" ]
permissive
-- MySQL dump 10.13 Distrib 8.0.15, for Win64 (x86_64) -- -- Host: 127.0.0.1 Database: kotlin_user -- ------------------------------------------------------ -- Server version 8.0.15 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;...
true
2c963f1f6c3af6e1aac19cee0e857cc1a8edb58e
SQL
janneys/Leetcode-database
/595-Big countries.sql
UTF-8
383
3.84375
4
[]
no_license
select name, population, area from world where area > 3000000 or population > 25000000 SELECT name, population, area FROM world WHERE area > 3000000 UNION SELECT name, population, area FROM world WHERE population > 25000000 ; -- UNION can be a bit faster because each select can use it's own index, while OR can us...
true
bdd2ac8b51158520b23744068118e580b2d32757
SQL
BarukhOr/Catalyst-Fiddlesticks-Backend
/docs/db_init/index.sql
UTF-8
3,127
3.9375
4
[ "MIT" ]
permissive
ALTER DATABASE catalyst_db SET TIMEZONE TO 'UTC'; DROP TABLE IF EXISTS role CASCADE; CREATE TABLE role ( bit SMALLINT PRIMARY KEY NOT NULL, name varchar(50) ); INSERT INTO role (bit, name) VALUES (2, 'Admin'), (4, 'Dev Team'), (8, 'Coach'), (16, 'Content Creator'), (32,...
true
ad95d23784ad8f7106706400122808125c1606b1
SQL
broertje-cloud/GOTCHA-
/SQLQuery_3 broertje.sql
UTF-8
1,606
2.828125
3
[]
no_license
create table gamemaster( gamemasterID int not null, first_name varchar (20) not null, last_name varchar (20) not null, email varchar (50) default '123abc@zuyd.com', password varchar (50) DEFAULT '***********', confirm_password varchar (50) DEFAULT '***********', PRIMARY KEY (gamemasterID), unique(email) ); create TAB...
true
168fd35e5925abff95c26a8048b3c5e7ec70d7d4
SQL
TeamAusDigital/apec-connect
/server/modules/db/src/main/resources/evolutions/default/1.sql
UTF-8
559
2.78125
3
[ "Apache-2.0" ]
permissive
# --- !Ups CREATE TABLE "participant" ( "id" BIGSERIAL PRIMARY KEY, "identifier" VARCHAR NOT NULL, "business_name" VARCHAR NOT NULL, "username" VARCHAR NOT NULL, "email" VARCHAR, "phone" VARCHAR, "auth_token" VARCHAR NOT NULL, "is_verified" BOOLEAN NOT NULL DEFAULT FALSE, "account_status" INT NOT NUL...
true
281d3730edaf17ecc5f89ae7881f9b2a3db802f3
SQL
Shadows100/afpa
/TB/BDD/SQL/Exercice/Exo 1 BDD.sql
UTF-8
1,338
3.609375
4
[]
no_license
DROP DATABASE if EXISTS vacance; CREATE DATABASE vacance; USE vacance; CREATE TABLE station ( num_station INT NOT NULL AUTO_INCREMENT PRIMARY KEY, nom_station VARCHAR (50) NOT NULL ); CREATE TABLE `client` ( adresse_client VARCHAR (50) NOT NULL, nom_client VARCHAR (50) NOT NULL, prenom_client VA...
true
71b05c2663bb483cdb4fbf9cf44803c0616a861d
SQL
Dog-Foot-Cat-Foot/HW_DFCF
/ShKIM/src/day0621/STUDY_0620.sql
UTF-8
269
2.96875
3
[]
no_license
-- 1 SELECT COUNT(DISTINCT name) FROM animal_ins -- 2 SELECT animal_id, name, TO_CHAR(datetime, 'YYYY-MM-DD') ³¯Â¥ FROM animal_ins ORDER BY animal_id -- 3 SELECT animal_type, NVL(name, 'No name'), sex_upon_intake FROM animal_ins ORDER BY animal_id
true
6c185a3855e8d50350eda79062b829bb21815ac0
SQL
thanhthuy1309/thuebannhadat
/backupdb/10112016/tbl_street.sql
UTF-8
925,792
2.859375
3
[]
no_license
/* Navicat MySQL Data Transfer Source Server : locahost Source Server Version : 50505 Source Host : localhost:3306 Source Database : realestate Target Server Type : MYSQL Target Server Version : 50505 File Encoding : 65001 Date: 2018-08-22 23:31:30 */ SET FOREIGN_KEY_CHECKS=0; --...
true
2cc4edd85369f591f5dfde5b79a48f54a4a7b0a5
SQL
MTheSestrim/MSSQL-January-2021
/ExamPrep2/EEE-Mails/SQLQuery1.sql
UTF-8
211
3.953125
4
[]
no_license
SELECT a.FirstName, a.LastName, FORMAT(a.BirthDate, 'MM-dd-yyyy') AS BirthDate, c.[Name] AS Hometown, a.Email FROM Accounts a JOIN Cities c ON c.Id = a.CityId WHERE LEFT(a.Email, 1) = 'e' ORDER BY Hometown
true
c40e7d2edabdfead22384d423e48b59abaef878d
SQL
KotTipTop/javaProjects
/employee-crud/src/main/resources/import.sql
UTF-8
1,527
2.671875
3
[]
no_license
insert into Employee(id,name,surname,position,salary,active) values(1,'Patryk','Cymerman','HD IT',3500,1); insert into Employee(id,name,surname,position,salary,active) values(2,'Jacek','Kowalski','kierownik',5500,1); insert into Employee(id,name,surname,position,salary,active) values(3,'Marek','Kowal','kierowca',2500...
true
175e7e9236e0486420dc48b69484c45f0b3e6bef
SQL
cmaguire85/SD-JTA
/Implementation/JTDDB_SchemaCreation.sql
UTF-8
403
2.796875
3
[]
no_license
USE [JTDDB] --Drop Schemas if they already exist within the database BEGIN IF EXISTS (SELECT name FROM sys.schemas WHERE name = 'ATC') DROP SCHEMA [ATC]; IF EXISTS (SELECT name FROM sys.schemas WHERE name = 'TechOps') DROP SCHEMA [TechOps]; END --Create ATC, TechOps, and JTADefinitionReport schemas BEGIN ...
true
a7c6c5b8168f5e5599241c060303d17b3a918259
SQL
DelightYang/springboot_crud_01
/sql/test_crud_items.sql
UTF-8
2,112
2.921875
3
[]
no_license
-- MySQL dump 10.13 Distrib 8.0.17, for macos10.14 (x86_64) -- -- Host: localhost Database: test_crud -- ------------------------------------------------------ -- Server version 8.0.17 /*!40101 SET @OLD_CHARACTER_SET_CLIENT = @@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS = @@CHARACTER_SET_RESU...
true
72a5e248fc973761abeed5ea3ebe5d6f10c72c73
SQL
NurCorezzi/ProjetoBD
/DDL.sql
UTF-8
16,089
3.09375
3
[]
no_license
CREATE DATABASE IF NOT EXISTS `csv_bd` /*!40100 DEFAULT CHARACTER SET utf8 */; USE `csv_bd`; -- MySQL dump 10.13 Distrib 5.7.17, for Win64 (x86_64) -- -- Host: localhost Database: csv_bd -- ------------------------------------------------------ -- Server version 5.7.20-log /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@...
true
0af0ad11bc4ecd3b07f9f5be4399fdcae4fe3b77
SQL
nbthales/Oracle-pl-sql-Forms-Reports
/aula1348.sql
UTF-8
948
3.90625
4
[]
no_license
select cli_sexo as Sexo, count(cli_sexo) as Quantos from clientes group by cli_sexo; select 'Do sexo ' || cli_sexo || ' tem ' as "Pessoas", count(cli_sexo) as "Estatisticas" from clientes group by cli_sexo; select avg(cli_salario) from clientes group by cli_sexo; select cli_sexo as sexo, sum...
true
49252b1e638573fd1600a884cf54477d73df659f
SQL
acexyf/MyHome
/sql/sql.sql
UTF-8
1,021
3.296875
3
[]
no_license
create table blog_user ( userid int primary key auto_increment, username nvarchar(32) not null unique, userpwd nvarchar(64) not null, age int, phone nvarchar(32), sex nvarchar(8), email nvarchar(64), head nvarchar(64), authority int not null ); select * from blog_user where username='ace...
true
e9ba458c239c0d2841ae7c9372e783b937187d7f
SQL
ArquitectoTIJelaf/SistemaComercialWeb-Procedures
/Procedures/scwsp_GrabarPasajero.sql
UTF-8
1,506
3.3125
3
[]
no_license
ALTER PROCEDURE scwsp_GrabarPasajero ( @Tipo_Doc_Id CHAR(1) ,@Numero_Doc VARCHAR(15) ,@Nombre_Clientes VARCHAR(100) ,@Apellido_P VARCHAR(50) ,@Apellido_M VARCHAR(50) ,@fec_nac SMALLDATETIME ,@edad TINYINT ,@Direccion VARCHAR(100) ,@telefono VARCHAR(15) ,@ruc_contacto VARCHAR(11) ,@Id_Clientes INT ...
true
365bdf54d47e0a1715ad66b2eef7c163a05215b0
SQL
maeeeeeeeeva/MEDAS-1_20-21
/Serine_Laassikri/script.sql
UTF-8
5,098
3.34375
3
[ "CC0-1.0" ]
permissive
-- MySQL Script generated by MySQL Workbench -- Tue Feb 23 08:27:21 2021 -- Model: New Model Version: 1.0 -- MySQL Workbench Forward Engineering SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0; SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0; SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='TR...
true
5188bb30a802f233cf9c161f9af94ae166b0b354
SQL
sujoe77/DataLab
/cs109/webScraping/job/Script-1.sql
UTF-8
2,055
3.40625
3
[]
no_license
create table jobs ( title text, company text, city text, pub_date text, link text, tags text ) select count(*) from jobs where 1=1 --and pub_date not like '202%' ; select tags, title, company, pub_date, link from jobs where company like '%BEC%' ; select --* tags, title, company, city, pub_date, link from jo...
true
73698204ba2a03268855b244ea5dcdc99436d2dd
SQL
caseyhyde/weekend-05
/database.sql
UTF-8
485
3.03125
3
[]
no_license
CREATE TABLE employees ( id SERIAL PRIMARY KEY, first_name VARCHAR(255), last_name VARCHAR(255), employee_id INTEGER, job_title VARCHAR(255), annual_salary INTEGER, active BOOLEAN DEFAULT TRUE ); INSERT INTO employees (first_name, last_name, employee_id, job_title, annual_salary) VALUES ('C...
true
0b8563de824077194be3273d94a5bea0c7e36de5
SQL
vaisham92/VaishamTools
/Brahmos/sqldump/brahmosdb.sql
UTF-8
4,183
4
4
[]
no_license
DROP DATABASE IF EXISTS `Brahmosdb`; CREATE DATABASE `Brahmosdb`; USE `Brahmosdb`; # CREATE USER 'brahmosadmin'@'localhost' IDENTIFIED BY 'brahmos@1234'; # Structure for table "projects" # GRANT ALL PRIVILEGES ON brahmos.* TO 'brahmosadmin'@'localhost'; #DROP TABLE IF EXISTS `projects`; CREATE TABLE `projects`( `id...
true
f00262e037627eda665479cd13eaaecc55739dfc
SQL
PIERRONMarc/HETIC_Image-Resizer
/database/init/init.sql
UTF-8
860
3.65625
4
[]
no_license
CREATE DATABASE IF NOT EXISTS `resizer` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci; USE `resizer`; DROP TABLE IF EXISTS `Avatar`; CREATE TABLE `Avatar` ( `Id` int UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY, `Name` varchar(50) NOT NULL, `Path` varchar(100) NOT NULL, `Created_at` date NOT NULL, `Upda...
true
d1d1653b6a1594eafdfda5486237faa4e0a96b05
SQL
pedroSoaresll/convenia-test
/database/structure_database_api.sql
UTF-8
1,861
3.421875
3
[]
no_license
-- MySQL Script generated by MySQL Workbench -- 04/30/17 14:20:40 -- 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
4fc24d4a411516eec344100e39eb918cdae8c1bc
SQL
gabrielkras/WebDiarioApp
/Scripts/web_diario.sql
UTF-8
10,633
3.25
3
[]
no_license
-- MySQL dump 10.13 Distrib 5.6.31, for Linux (x86_64) -- -- Host: localhost Database: web_diario -- ------------------------------------------------------ -- Server version 5.6.31 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; ...
true
3c1903d4bfbdbe76cf08199ffdf1aa6f76793607
SQL
Tarek-Hassan/laravel_project
/127_0_0_1.sql
UTF-8
16,970
2.890625
3
[ "MIT" ]
permissive
-- phpMyAdmin SQL Dump -- version 4.6.4 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: May 11, 2018 at 03:30 PM -- Server version: 5.7.14 -- PHP Version: 5.6.25 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */...
true
2795491b9f874c292ea98d999b9e00b750084889
SQL
konrad-kalinowski/AdvertismentCollector
/src/main/resources/skrypt.sql
UTF-8
501
3.296875
3
[]
no_license
-- database creation -- CREATE USER 'advertcollector'@'localhost' IDENTIFIED BY 'password'; -- CREATE DATABASE adverts; -- GRANT ALL PRIVILEGES ON adverts.* To 'advertcollector'@'localhost' IDENTIFIED BY 'password'; CREATE TABLE if not exists ADVERTS( ID int AUTO_INCREMENT NOT NULL, TITLE varchar(255), LINK varchar(20...
true
9eb6b1bf34f022382ac7039acf63db14020d49e3
SQL
coastlines/js_311_cp2
/initialize.sql
UTF-8
5,565
3.578125
4
[]
no_license
DROP TABLE IF EXISTS users, users_contact, users_location, users_credentials, plants, users_plants ,users_plant_actions_water, users_plant_actions_rotate, users_plant_actions_fertilized ,users_plant_actions_soil, users_plants_growth, users_plants_foliage, users_plant_flower_fruit ,users_plant_location; CREATE TABLE us...
true
5e322c1ebd6ed33238b9d9d32d95a65436486d54
SQL
ben-ying/backend
/sqls/dump_2018-01-01.sql
UTF-8
82,037
2.984375
3
[]
no_license
-- -- PostgreSQL database dump -- -- Dumped from database version 9.5.5 -- Dumped by pg_dump version 9.5.5 SET statement_timeout = 0; SET lock_timeout = 0; SET client_encoding = 'UTF8'; SET standard_conforming_strings = on; SET check_function_bodies = false; SET client_min_messages = warning; SET row_security = off; ...
true
d99a02344ca9a424746caadbd8e658307d04770a
SQL
josgaril/ejercicios_clase
/SQL_BD/Ejercicios_SQL/42. Hallar el salario más alto, el más bajo y la diferencia entre ellos..sql
UTF-8
209
2.921875
3
[]
no_license
-- 42. Hallar el salario más alto, el más bajo y la diferencia entre ellos. SELECT MAX(salEmp) AS "Salario Máximo", MIN(salEmp) AS "Salario Mínimo", (MAX(salEmp) - MIN(salEmp)) AS Diferencia FROM empleado;
true
60867dfb8536426d4898a36d72985a3a8724a200
SQL
Bigrig72/Book_App
/books.sql
UTF-8
437
3.0625
3
[ "MIT" ]
permissive
DROP DATABASE book_app; CREATE DATABASE book_app; DROP TABLE IF EXISTS books; CREATE TABLE books ( id SERIAL PRIMARY KEY, title TEXT, author VARCHAR(255), isbn VARCHAR(255), image VARCHAR(255), description TEXT ); -- INSERT INTO books (author, title, isbn, image_url, description, bookshelf)...
true
246e82b5456e12637d06e7a375743ea307604d79
SQL
annaoj/CoderDojo
/DB/testdb.sql
UTF-8
21,969
3.65625
4
[]
no_license
-- MySQL Workbench Forward Engineering SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0; SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0; SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTI...
true
5e4549c890d56258e7347065c3f3bc0f73be738e
SQL
international-school-of-curitiba/TOTVSRM
/Classis/Classis/Classis.COMPANY.LIST.sql
UTF-8
674
3.171875
3
[]
no_license
Select PPessoa.Empresa from PPessoa join Ealunos (NoLock) on Ealunos.Pai = PPessoa.codigo join UMatricPL (NoLock) on UMatricPl.MatAluno = Ealunos.Matricula where PPessoa.Empresa is not null and UMatricpl.Perletivo ='14/15' group by PPessoa.empresa union Select PPessoa.Empresa from PPessoa join Ealunos (NoLock...
true
bd9d9507b714676e41f6f68c18afae6ce94b7feb
SQL
nik709/MillShop
/SQL/MySql/globalScript.sql
UTF-8
5,084
3.234375
3
[]
no_license
DROP TABLE IF EXISTS `millshop`.`items_sizes`; DROP TABLE IF EXISTS `millshop`.`items`; DROP TABLE IF EXISTS `millshop`.`sizes`; DROP TABLE IF EXISTS `millshop`.`colors`; DROP TABLE IF EXISTS `millshop`.`subcategory`; DROP TABLE IF EXISTS `millshop`.`globcategory`; DROP TABLE IF EXISTS `millshop`.`users`; CREATE TABLE...
true
f52395cfb69dd3bda9096f9564341b4a1c1342db
SQL
Marklb/OnlineComputerStore
/sql/describe_tables.sql
UTF-8
812
2.515625
3
[]
no_license
USE OnlineComputerStore; SELECT 'SilverAndAbove' AS 'Table description'; DESCRIBE SilverAndAbove; SELECT 'Customer' AS 'Table description'; DESCRIBE Customer; SELECT 'StoredCard' AS 'Table description'; DESCRIBE StoredCard; SELECT 'CreditCard' AS 'Table description'; DESCRIBE CreditCard; SELECT 'ShippingAddr...
true
12dc661a784c1057165ab7e7bd5bf0276ef887ff
SQL
kongyew/gpdb
/src/test/tinc/tincrepo/mpp/gpdb/tests/storage/filerep_end_to_end/ct/sql/ct_vacuum_heap_table.sql
UTF-8
11,145
3.265625
3
[ "Apache-2.0", "LicenseRef-scancode-generic-cla", "PostgreSQL", "LicenseRef-scancode-other-copyleft", "metamail", "BSD-3-Clause", "LicenseRef-scancode-openssl", "LicenseRef-scancode-other-permissive", "ISC", "Python-2.0", "bzip2-1.0.6", "LicenseRef-scancode-ssleay-windows", "LicenseRef-scanco...
permissive
-- start_ignore SET gp_create_table_random_default_distribution=off; -- end_ignore CREATE TABLE ct_heap_vacuum1( text_col text, bigint_col bigint, char_vary_col character varying(30), numeric_col numeric, int_col int4, float_col float4, int_array_col int[], drop_col numeric, before_rename_col int4, change_datatype_col...
true
8f0c92248772b20a34113b356d0ff14f4c9be260
SQL
BeautyOfProgramming/tree-hole
/doc/tree_hole.sql
UTF-8
993
3.171875
3
[]
no_license
CREATE DATABASE treehole; CREATE TABLE message ( id BIGINT(11) UNSIGNED PRIMARY KEY NOT NULL AUTO_INCREMENT, status TINYINT(11) DEFAULT '0' NOT NULL COMMENT '状态:0 默认 1 删除', create_time DATETIME COMMENT '创建时间', update_time DATETIME COMMENT '更新时间', content VARCHAR(2000) COMM...
true
6c6eb684825b02714d48839542686002c527c7b1
SQL
dinhh23/my-sql-scripts
/rel-example1.sql
UTF-8
505
3.875
4
[]
no_license
/* display all the majors and the classes that are required. the majorclassrel table is needed */ select m.Description as 'Major', count(*) as 'Classes Required' from major m join majorclassrel mcr on mcr.majorid = m.id join class c on c.id = mcr.classid group by m.Description /* group by...
true
7826fa930fa93a93f79da2f69a8b73cd83e7d963
SQL
OSU-CS290-F18/final-project-cs290-group-7
/flaskr/schema.sql
UTF-8
796
3.328125
3
[]
no_license
DROP TABLE IF EXISTS user; DROP TABLE IF EXISTS post; DROP TABLE IF EXISTS token; CREATE TABLE user ( id INTEGER PRIMARY KEY AUTOINCREMENT, uname TEXT UNIQUE NOT NULL, pass TEXT NOT NULL, registered REAL NOT NULL, upvotes INTEGER default 0 ); CREATE TABLE post ( id INTEGER PRIMARY KEY AUTOINCR...
true