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
e5f20f0a8117f3326f0032cb115d2faa520eaec6
SQL
EricCote/20461-Query-Sql-Server
/Liste de villes avec province et pays.sql
UTF-8
335
3.703125
4
[]
no_license
SELECT DISTINCT [City] AS Ville, P.[Name] AS Province, C.[Name] AS Pays FROM [Person].[Address] AS A INNER JOIN [Person].[StateProvince] AS P ON A.[StateProvinceID] = P.StateProvinceID INNER JOIN [Person].[CountryRegion] AS C ON P.CountryRegionCode = C.CountryRegionCode --WHERE City is NULL; ...
true
581e1acdefcf9a50e84132a598d53207321197ae
SQL
mattmc96/helo
/db/search/search_my_posts.sql
UTF-8
161
2.890625
3
[]
no_license
select p.id as post_id, title, content, img, profile_pic, username as author_username from posts p join users u on u.id = p.author_id where lower(title) like $1;
true
686573ee2f5af4be90a4066eaf9290664c2558b1
SQL
nazagi/rocket_14
/SQL/assignment/Extra_Assignment_5/Extra_Assignment_5.sql
UTF-8
5,243
3.984375
4
[]
no_license
Question 1: Write a query that filters data and return the column “Name” from table Production.Product. The filtering of rows is achieved by a WHERE clause that compares a single value from a subquery. The inner subquery shall return a specific ProductSubcategoryID that the outer query uses as a filter of products to i...
true
09f2545466b9b0eb0a0584cf88ad571533e7d0f1
SQL
Angelina-Panteley/WebChat
/src/main/db/2.sql
UTF-8
101
2.71875
3
[]
no_license
use chat; select * from users, messages where users.name = 'Alice' and users.id = messages.user_id;
true
692c68ddc9029be05c87df34400b65fb38f6fbcf
SQL
openacs/assessment
/sql/postgresql/upgrade/upgrade-2.10.0d0-2.10.0d1.sql
UTF-8
968
2.6875
3
[]
no_license
DO $$ BEGIN update acs_attributes set datatype = 'timestamp' where object_type = 'as_assessments' and attribute_name in ('start_time', 'end_time'); update acs_attributes set datatype = 'timestamp' where object_type = 'as_item_data' and attribute_name in ('timestamp_answer'); ...
true
ce12f268e7b9c2a8e2d82c087f963bb08ceda0c3
SQL
eriklimamolykote/banco-relacional
/consultarComAgregacao.sql
UTF-8
302
2.6875
3
[]
no_license
-- Original author: Leonardo Moura Leitão & Cod3r Cursos -- (C) 2019, 2021 by Cod3r Cursos. All Rights Reserved -- Consulta com agregação SELECT regiao AS 'Região', sum(populacao) AS Total FROM estados GROUP BY regiao ORDER BY Total DESC SELECT avg(populacao) AS Total FROM estados
true
21bf2ab6eeed6f3e0f46e7333e7f5420fa36a1c9
SQL
danz50of/DZCommandLibrary
/SQL/UPSORDERS2.sql
UTF-8
400
4.0625
4
[]
no_license
select A.ORDER_NO, A.CUSTOMER_NO, B.CHARGE_TYPE, sum (B.CHARGE_AMOUNT) as Charge_Amount from customer_order a left join customer_order_charge b on a.order_no = b.order_no where a.DATE_ENTERED >= TO_DATE ('01012005', 'MMDDYYYY') and b.charge_type IN (SELECT h.CHARGE_TYPE FROM SALES_CHARGE_TYPE h WHERE h.CONTRACT = 'MP'...
true
2f7a22c52ed354a67a7dae1ec8dfbe2fd2293ee3
SQL
SergioDiaz99/UTNPhonesDiazFtMurrie
/src/databaseScripts/triggers/202005101517_provinces_before_update.sql
UTF-8
372
2.59375
3
[]
no_license
/* * Author: Murrie Battistoni Felipe * Created Date: 10/05/2020 * Description: create of trigger for the table provinces */ use utnphones; drop trigger if exists provinces_before_update; delimiter // create trigger if not exists provinces_before_update before update on provinces for each row begin set new.upda...
true
10754eb28a8cecaa8da6ba7e5a7b4854212841a9
SQL
sheetal-10/EmployeePayRoll-DB
/Employee-PayRoll-DB/EmpPayRoll-Service.sql
UTF-8
9,934
3.859375
4
[]
no_license
#################### Welcome to EmployeePayRoll Database #################### #UC1 #(CREATE payroll_service DB) mysql> show databases; +--------------------+ | Database | +--------------------+ | information_schema | | mysql | | performance_schema | | sys | +------------------...
true
69ad0b597776786aa622da5f99b791b8c60d97c8
SQL
wllmwng1/CMPUT291_Assignment2
/a2-queries.sql
UTF-8
3,898
4.59375
5
[]
no_license
.echo on --Question 1 SELECT DISTINCT name,email FROM members, cars c1, cars c2, rides WHERE members.email = c1.owner and members.email = c2.owner and c1.cno <> c2.cno and c1.cno = rides.cno; --Question 2 SELECT name,members.email FROM members, cars, bookings WHERE members.email = cars.owner and members.email ...
true
23edfefb68f0eda0b8a2aa00fdde7657e8964b40
SQL
mariojuniordev/BancosDeDados
/Bancos de Dados SQL e NoSQL do básico ao avançado/Práticas/PostgreSQL/09.sql
UTF-8
561
3.203125
3
[]
no_license
--SELECT * FROM tipos_produto; SELECT * FROM produtos; --INSERT INTO produtos(codigo, descricao, preco, codigo_tipo) --VALUES (4, 'Impr. Laser', '500', 2); --DELETE FROM produtos WHERE codigo >= 4; -- Update --UPDATE tipos_produto SET descricao = 'Nobreak' WHERE codigo = 2; -- UPDATE produtos set descricao = 'Not...
true
4f06d5e96af4df3cfe67b8efa61e6038184b279e
SQL
slowkow/bryozoa
/scripts/mysql/bryan_import.sql
UTF-8
1,663
3.578125
4
[]
no_license
SOURCE db.sql; DROP TABLE IF EXISTS `bryan_valid`; DROP TABLE IF EXISTS `bryan_invalid`; DROP TABLE IF EXISTS `bryan_rank`; /* we want to see a lot of errors if they exist */ SET max_error_count=1000; /* old-primary-id old-reference-id taxon taxon-rank authority-date new-primary-id new-reference-id Skip 1 line */ C...
true
da47625b614bc5090d538d7fb54a732cbdf2d215
SQL
1808Team/test
/Sql/tp_goods.sql
UTF-8
1,270
2.984375
3
[ "Apache-2.0" ]
permissive
/* Navicat Premium Data Transfer Source Server : ling Source Server Type : MySQL Source Server Version : 50726 Source Host : localhost:3306 Source Schema : milletdata Target Server Type : MySQL Target Server Version : 50726 File Encoding : 65001 Date: 11/09/2020 19:3...
true
b5f93351fc86cb608891c1f37abaf064f36ca978
SQL
anviup/Database-Management-Systems
/HW -1 - SQL query/Q2.sql
UTF-8
235
3.125
3
[ "MIT" ]
permissive
select max(amount), count(*) from Salaries where Amount = (select max(amount) from Salaries) ; WITH ALIAS - select max(amount) as max_salary, count(*) as count_salary from Salaries where Amount = (select max(amount) from Salaries) ;
true
454f6c1e9975f21928d79ceef42daa16a0892c9d
SQL
wxiaojia/happy_class
/happy_class.sql
UTF-8
1,552
3.09375
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.4.15 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: 2016-11-08 19:09:51 -- 服务器版本: 10.1.8-MariaDB -- PHP Version: 5.4.45 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40...
true
1d8cd35758234e190e308bd256c82b78f8d4ed7d
SQL
tanmay-kowlgi/UserMicroservice14MarchAfternoon
/UserScript.sql
UTF-8
1,439
3.359375
3
[]
no_license
drop schema userdb; CREATE DATABASE `userdb` ; USE `userdb`; CREATE TABLE `buyer` ( `BUYERID` int(11) NOT NULL auto_increment, `NAME` varchar(45) NOT NULL, `EMAIL` varchar(45) NOT NULL, `PHONENUMBER` varchar(45) NOT NULL , `PASSWORD` varchar(45) NOT NULL, `ISPRIVILEGED` tinyint(1) DEFAULT NULL, ...
true
6c9bf9340824426a2bf8c3b44f10c93a35549f1a
SQL
silence-do-good/stress-test-Postgres-and-MySQL
/dump/high/day21/select1637.sql
UTF-8
262
3.046875
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['6056','6082','4081','1431','1406','5212','2100_1','6210','5099','2099'])
true
c6ec78495476a59aacd8233d9d3f0c22948918bd
SQL
MizTacks/TpFinal_nu-ez
/base/DBPuzzles.sql
UTF-8
2,040
3.15625
3
[]
no_license
drop database DBPuzzles; create database DBPuzzles; use DBPuzzles; create table usuarios( ID int primary key auto_increment, usuario varchar (30), contraseña varchar (30) ); insert into usuarios values (1,"MizTacks","YungBlud"), ("","Martin","Bokitapapa"); create table cubos( id int primary key auto_inc...
true
341e8bbbde8a5513c7accdcaa975ecd06547bce0
SQL
batwood001/Left-Outer-Join-Demo
/schema.sql
UTF-8
438
3.109375
3
[]
no_license
CREATE TABLE IF NOT EXISTS users ( ID SERIAL PRIMARY KEY, First_Name VARCHAR(30), Last_Name VARCHAR(30), Email VARCHAR(30) ); CREATE TABLE IF NOT EXISTS shipping_addresses ( ID SERIAL PRIMARY KEY, USER_ID INT REFERENCES users, STREET_ADDRESS VARCHAR (50), CITY VARCHAR(40) ); CREATE TABLE IF NOT EXISTS billing...
true
d659509508ae3c9c6c799c7d73f9b585355c4efb
SQL
Theo07-git/HyperPlanning
/Création de la base HyperPlanning.sql
UTF-8
61,458
3.265625
3
[]
no_license
-- MySQL Script generated by MySQL Workbench -- Tue Dec 1 10:02:02 2020 -- 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
b28f39bc944d9c539485e1ad2513c0b7394d7bcd
SQL
wutongservice/virtualgoogdsman
/Server/src/main/resources/com/borqs/server/market/resources/sqls/testData.sql
UTF-8
5,441
2.78125
3
[ "Apache-2.0" ]
permissive
DELETE FROM orders; DELETE FROM product_versions; DELETE FROM products; DELETE FROM product_pricetags; DELETE FROM product_categories; DELETE FROM apps; -- DELETE FROM signin_tickets; DELETE FROM accounts; -- accounts INSERT INTO accounts SET id='u_abcdefg', created_at=1370229870145, updated_at=1370229870145, ...
true
a9e42756b21bda17853e16dd6ffbf57495d06aba
SQL
Vcharals/Node.js-MySQL
/bamazon.sql
UTF-8
1,682
3.296875
3
[]
no_license
DROP DATABASE IF EXISTS bamazon; CREATE DATABASE bamazon; USE bamazon; CREATE TABLE products( item_id INTEGER (11) AUTO_INCREMENT NOT NULL, product_name VARCHAR (75), department_name VARCHAR (50), price INTEGER (10), stock_quantity INTEGER (10), primary key (item_id) ); INSERT INTO products (product_name, department_...
true
fb9e94bb4a9efc9a13d37867943e1ed499cffe92
SQL
yaozd/DapperTemplateMultiDatabaseForMySql
/src/DapperTemplateV2/script160727.sql
GB18030
667
2.796875
3
[]
no_license
drop table if exists UrlInfo; /*==============================================================*/ /* Table: UrlInfo */ /*==============================================================*/ create table UrlInfo ( id bigint not null auto_increment, url ...
true
343e518a22c95bf0911e073dfc99d9d051b1d733
SQL
RajivRamaiah/CS61---Lab-2
/SQL Code/Setup.sql
UTF-8
26,651
3.609375
4
[]
no_license
-- RAJIV RAMAIAH -- DATABASES -- CREATE TABLES -- USED MYSQL WORKBENCH FORWARD ENGINEERING TO GENERATE TABLES WITH MODIFICATIONS OF MY OWN 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='TRADITIO...
true
df5a041187b22100f253c27e311c402356545890
SQL
RonaldoVindas/ITCR-Bases-de-Datos-1---Proyecto-1---2S-2020
/Scripts/Packages/country_package.sql
UTF-8
3,336
3.875
4
[]
no_license
create or replace package control_country is procedure insert_country (p_name in varchar2); procedure remove_country(p_id_country in number); procedure update_country(p_name in varchar, p_id_country number); function getCountryName(pId in number) return varchar2; function getIDCountry(pcountry in varchar2)return number...
true
5dda3e46e49ed3447a3419e054c8916d2337ece7
SQL
Schlagmt/CState-Database-SQL
/Employee1.sql
UTF-8
3,661
3.90625
4
[]
no_license
-- -------------------------------------------------------------------------------- -- Name: Matthew Schlager -- -------------------------------------------------------------------------------- -- -------------------------------------------------------------------------------- -- Options -- ---------------------...
true
e2272d2be8119ebbe17137bc0ba83a8613e960eb
SQL
hasura/graphql-engine
/server/src-rsr/migrations/31_to_32.sql
UTF-8
1,359
3.609375
4
[ "MIT", "Apache-2.0" ]
permissive
CREATE TABLE hdb_catalog.hdb_action ( action_name TEXT PRIMARY KEY, action_defn JSONB NOT NULL, comment TEXT NULL, is_system_defined boolean default false ); CREATE TABLE hdb_catalog.hdb_action_permission ( action_name TEXT NOT NULL, role_name TEXT NOT NULL, definition JSONB NOT NULL DEFAULT '{}'::jsonb,...
true
b93eba891617afbc67385289c1d877e0b880631e
SQL
jonatasdemello/SQL-Tools
/_sort/find-text-sproc.sql
UTF-8
455
3.25
3
[]
no_license
SELECT ROUTINE_NAME, ROUTINE_DEFINITION FROM INFORMATION_SCHEMA.ROUTINES WHERE ROUTINE_DEFINITION LIKE '%Foo%' AND ROUTINE_TYPE='PROCEDURE' SELECT OBJECT_NAME(id) FROM SYSCOMMENTS WHERE [text] LIKE '%Foo%' AND OBJECTPROPERTY(id, 'IsProcedure') = 1 GROUP BY OBJECT_NAME(id) SELECT OB...
true
ffb086ae94140881e9cdec9e5d335bef6b5e26df
SQL
Invenietis/CK-DB
/CK.DB.Acl/Res/Model/CK.AclConfigTable.Install.1.0.0.sql
UTF-8
2,404
3.5
4
[]
no_license
--[beginscript] create table CK.tAclConfig ( AclId int not null, ActorId int not null, GrantLevel tinyint not null, constraint PK_CK_tAclConfig primary key clustered ( AclId, ActorId ), constraint FK_CK_tAclConfig_AclId foreign key ( AclId ) references CK.tAcl ( AclId ), constraint FK_CK_tAclConfig_ActorId fore...
true
1b9b1376bdb30d6ebae495a3d764f243f22a887f
SQL
silence-do-good/stress-test-Postgres-and-MySQL
/dump/high/day28/select1938.sql
UTF-8
178
2.640625
3
[]
no_license
SELECT timeStamp, temperature FROM ThermometerOBSERVATION o WHERE timestamp>'2017-11-27T19:38:00Z' AND timestamp<'2017-11-28T19:38:00Z' AND temperature>=37 AND temperature<=66
true
2e538bc8246c12dc9f7af804e07556147e7e9e04
SQL
PabloT90/SQL
/Segundo Trimestre/Boletin 8.3.sql
WINDOWS-1252
2,491
4.375
4
[]
no_license
--1.Nombre del producto, cdigo y precio, ordenado de mayor a menor precio SELECT * FROM Production.Product SELECT name,ProductID,ListPrice FROM Production.Product ORDER BY ListPrice --2.Nmero de direcciones de cada Estado/Provincia SELECT * FROM Person.Address SELECT COUNT(*) as[Numero Direcciones], StateProvinceID F...
true
e6e7cb13ded43b5eb0bf77d3c5b60db8ec3dcedb
SQL
bobs24/ProgateSQL
/sql_dojo_1/page7/exercise2.sql
UTF-8
200
3.34375
3
[]
no_license
-- dapatkan total penjualan dan total laba untuk seluruh site select sum(price) as "total penjualan", sum(price-cost) as "total laba" from items join sales_records on items.id = sales_records.item_id;
true
b306834f2bf9e0edcedb4799247876263f557ea8
SQL
kisomose/dynamicWebPage
/profile/department.sql
UTF-8
1,501
3.203125
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 5.0.3 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Jan 25, 2021 at 09:06 PM -- Server version: 10.4.14-MariaDB -- PHP Version: 7.4.11 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIE...
true
2b628202370244563ce0b626a03f16b7b7d8bf47
SQL
omerom88/DB
/ex5/create.sql
UTF-8
518
3.28125
3
[]
no_license
create table Actors( aid int primery key, name varchar(50) not null, salary int default (3000)); create table Movie( mid int primery key, title varchar(50) not null, length int default (60) check (length >= 1 and length <= 200), rating int check(rating >= 1 and rating...
true
9a1506a91ec0d5dae616345f21cb4ab4d3a1d41a
SQL
diffeo/go-coordinate
/postgres/migrations/20151006-work-unit-type.sql
UTF-8
402
2.828125
3
[ "MIT" ]
permissive
-- -*- mode: sql; sql-product: postgres -*- -- This changes the work_unit.name type from VARCHAR to BYTEA. Any existing -- work units are assumed to be UTF-8 encoded. -- +migrate Up ALTER TABLE work_unit ALTER COLUMN name SET DATA TYPE BYTEA USING convert_to(name, 'UTF8'); -- +migrate Down ALTER TABLE work_uni...
true
2c293fbd59db470a56f3e522b1fec14e7ea0219a
SQL
ssssaaamm/crm
/populate_db.sql
UTF-8
1,609
2.90625
3
[ "Apache-2.0" ]
permissive
drop database crm; create database crm; grant all privileges on crm.* to 'crm'@'localhost' identified by 'crm'; insert into categoria (codigo,nombre,descripcion) values (1,'Tecnologia','Dispositivos electronicos, celulares, audifonos, etc'); insert into categoria (codigo,nombre,descripcion) values (2,'Arte','Libros, ob...
true
782d35b117c5315dd67c5d75a068c5b7e9df9bea
SQL
gouzi-back/ssm
/sql/ssm_crud.sql
UTF-8
1,409
3
3
[]
no_license
/* Navicat Premium Data Transfer Source Server : hyy Source Server Type : MySQL Source Server Version : 80022 Source Host : localhost:3306 Source Schema : ssm_crud Target Server Type : MySQL Target Server Version : 80022 File Encoding : 65001 Date: 18/08/2021 23:10:0...
true
70661a91faddd7d2e786e43aa19e81b528a2a371
SQL
magixsource/epdog
/WebRoot/sql/oracle/t_plan.sql
WINDOWS-1252
333
3.546875
4
[]
no_license
-- Create table create table T_PLAN ( id VARCHAR2(50) not null, name VARCHAR2(100), content CLOB ) -- Add comments to the table comment on table T_PLAN is 'ƻ'; -- Create/Recreate primary, unique and foreign key constraints alter table T_PLAN add constraint PK_T_PLAN primary key (ID) using index;
true
01a8f729248996d6aa3fd6c11ec7a00959b47b12
SQL
andylulu/mes
/src/sql/CreateTables.sql
UTF-8
3,781
3.265625
3
[]
no_license
#注释 *必须* 以分号结尾; # 删除表的时候注意顺序; use pelloz; DROP TABLE IF EXISTS `plan`; DROP TABLE IF EXISTS `orderform`; DROP TABLE IF EXISTS `bom`; DROP TABLE IF EXISTS `pdoc`; DROP TABLE IF EXISTS `tooling`; DROP TABLE IF EXISTS `userinfo`; # 表的结构 `orderform`; CREATE TABLE IF NOT EXISTS `orderform` ( `id` int(11) NOT NULL AUTO_...
true
1ea4727c149fd12a7a4dd01555c2fb53731677ac
SQL
dingjinhui821/julive_database
/schema/julive_fact/fact_zxs_adjust_cust_subscribe_dtl.sql
UTF-8
4,576
3.09375
3
[]
no_license
drop table if exists julive_fact.fact_zxs_adjust_cust_subscribe_base_dtl; CREATE TABLE julive_fact.fact_zxs_adjust_cust_subscribe_base_dtl( subscribe_id bigint COMMENT '认购ID', org_id int comment '公司id', org_type ...
true
5cf88227432435f744574252ab25f62e44114202
SQL
laubezque/ClinicaVeterinaria
/sql/ALTAS/ADD_ALTAS.sql
UTF-8
3,969
3.125
3
[]
no_license
create or replace PROCEDURE ALTA_CITA( OIDGestor IN CitaS.OIDGestor%TYPE, Dni IN CitaS.Dni%TYPE, FechaInicio IN CitaS.FechaInicio%TYPE, FechaFin IN CitaS.FechaFin%TYPE, DuracionMin IN CitaS.DuracionMin%TYPE, Coste IN CitaS.Coste%TYPE )IS BEGIN INSERT INTO Citas VALUES(0,Dni, OI...
true
21d968deef6312c029553e191ec7d9d7bab025ec
SQL
gitprojectjockey/DatabaseScripts
/SQL/StoredProcedures/prc_CWI_GetAction.PRC
UTF-8
1,295
3.421875
3
[]
no_license
IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[prc_CWI_GetAction]') AND type in (N'P', N'PC')) DROP PROCEDURE [dbo].[prc_CWI_GetAction] GO SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[prc_CWI_GetAction]') AN...
true
e8e48d010c63a5fee7bff6ef1a646006ab26eba6
SQL
ukiras123/SlackIntegration
/src/main/resources/sql_script.sql
UTF-8
973
2.859375
3
[ "MIT" ]
permissive
DROP DATABASE IF EXISTS users; CREATE DATABASE users DEFAULT CHARACTER SET utf8; USE users; CREATE TABLE user_log ( id bigint NOT NULL AUTO_INCREMENT PRIMARY KEY, user_name varchar(100) NOT NULL, time_stamp varchar(100) NOT NULL, info varchar(100) NOT NULL ); USE users; CREATE TABLE user_sign_up ( id big...
true
d3925dbf093e4fe7d071bc3205d0a513e211a508
SQL
abhisheksett/postgres_bookshelf_knex
/sql/user_task.sql
UTF-8
631
2.84375
3
[]
no_license
DROP TABLE IF EXISTS tasks; DROP TABLE IF EXISTS users; CREATE TABLE users ( id serial PRIMARY KEY, name VARCHAR(255) ); INSERT INTO users (name) VALUES('John Doe'); INSERT INTO users (name) VALUES('Lucia Smith'); CREATE TABLE tasks ( id serial PRIMARY KEY, user_id INT REFERENCES users (id), ...
true
fdf152ddb2aef3632a8e6b77b54be2c53184c20a
SQL
fdeblic/mywishlist
/src/mywishlist.sql
UTF-8
20,388
3.5625
4
[]
no_license
DROP PROCEDURE IF EXISTS reset; DELIMITER | CREATE PROCEDURE reset() BEGIN SET NAMES utf8; SET time_zone = '+00:00'; SET foreign_key_checks = 0; SET sql_mode = 'NO_AUTO_VALUE_ON_ZERO'; -- -- Structure de la table `account` -- DROP TABLE IF EXISTS `account`; CREATE TABLE `account` ( `id_account` int(11) NOT NULL AUT...
true
3f11964e6381d8b0906fdaa9e8cf384ada473463
SQL
dklinga/bamazon
/bamazon.sql
UTF-8
1,461
3.1875
3
[]
no_license
DROP DATABASE IF EXISTS bamazon; CREATE DATABASE bamazon; USE bamazon; CREATE TABLE products( id INT NOT NULL AUTO_INCREMENT, product_name VARCHAR(100), department_name VARCHAR(100), price INT, stock_quantity INT, PRIMARY KEY (id) ); INSERT INTO products (product_name, department_name, price, stock_quan...
true
d223a58c2fd23d66aba48a21c291cc371dd930ac
SQL
caodac/pharos
/modules/ncats/conf/evolutions/default/1.sql
UTF-8
60,625
3.25
3
[ "MIT" ]
permissive
# --- Created by Ebean DDL # To stop Ebean DDL generation, remove this comment and start using Evolutions # --- !Ups create table ix_core_acl ( id bigint not null, perm integer, constraint ck_ix_core_acl_perm check (perm in (0,1,2,3,4,5,6)), constraint pk_ix_co...
true
481636d9ea0d1b8f1ec77ac0642c5cff9fc0126b
SQL
pppsu/SAMSnOVs
/databaseEiei/regist (3).sql
UTF-8
20,367
3.046875
3
[ "MIT" ]
permissive
-- phpMyAdmin SQL Dump -- version 4.5.1 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: Jan 26, 2017 at 02:22 PM -- Server version: 10.1.16-MariaDB -- PHP Version: 7.0.9 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLI...
true
e9d3c65a99f1406cdbf3c9d21e45e08f43e3ce26
SQL
MirelaMileva/Databases-MSSQL-SoftUni-Homework
/DatabasesIntroductionExercise/23.DecreaseTaxRate.sql
UTF-8
302
2.671875
3
[ "MIT" ]
permissive
USE Hotel SELECT * FROM Payments UPDATE Payments SET TaxRate = 20 WHERE EmployeeId = 1 UPDATE Payments SET TaxRate = 20 WHERE EmployeeId = 2 UPDATE Payments SET TaxRate = 20 WHERE EmployeeId = 3 UPDATE Payments SET TaxRate = TaxRate * 0.97 WHERE TaxRate > 1 SELECT TaxRate FROM Payments
true
e50aa9041c5cb923c20bdd687b73d6e941490dc9
SQL
andergabrielsantos/Curso-SQL-SERVER
/SQL SERVER/PROJEÇOES COM FUÇOES TSQL.sql
ISO-8859-1
2,957
3.734375
4
[ "MIT" ]
permissive
--SELECIONAR TODOS OS CAMPOS COM A SIGLA (*) SELECT * FROM FUN_FUNCIONARIOS; --FUN_ID FUN_NOME FUN_SOBRENOME FUN_DATA_NASCIMENTO FUN_OBSERVACOES --1 ANDERSON GABRIEL 1983-07-20 OBSERVAO DO FUNCIONARIO --2 MARIA DE SOUSA 1990-07-03 NULL --3 JOO ALENCAR ...
true
eec138d9adce3d370d35bf1c4963a3b5fd7b4541
SQL
DuckLuckBreakout/GeekBrains_big-data-analytics
/practise_4/new_tables/messages_update.sql
UTF-8
343
3.109375
3
[]
no_license
ALTER TABLE messages ADD COLUMN header VARCHAR(255) AFTER to_user_id; -- Заполним UPDATE messages SET header = SUBSTRING(body, 1, 50); ALTER TABLE messages ADD column attached_media_id INT UNSIGNED AFTER body; -- Заполним UPDATE messages SET attached_media_id = ( SELECT id FROM media WHERE user_id = from_user_id LIM...
true
6038428c6c5a183c74dbb5d173f49e9c670cb935
SQL
volkantutkun/Haksle
/conf/haksledb.sql
UTF-8
1,381
3.3125
3
[]
no_license
Port: 3306 Root password: 123123 Haksle User: Username: haksledbadmin Host: All Hosts Role: Db Admin Authentication: Mysql Password: hak12345 CREATE SCHEMA `haksle` DEFAULT CHARACTER SET utf16 ; CREATE TABLE `haksle`.`customer` ( `email` VARCHAR(50) NOT NULL , `password` VARCHAR(10) NOT NULL , `firstname` VAR...
true
b7807cba3cfadf7070826e3f107b683588d5d36b
SQL
NASOKILA/SoftUni
/4.C# DB Fundamentals/1.Databases Basics - MS SQL Server/07.Basic Crud Excercises/AllExcercises2.sql
WINDOWS-1252
3,298
4.34375
4
[]
no_license
--2.Find All Information About Departments --USE SoftUni SELECT * FROM Departments --3.Find all Department Names SELECT Name FROM Departments --4.Find Salary of Each Employee SELECT FirstName, LastName, Salary FROM Employees --5. Find Full Name of Each Employee SELECT FirstName, MiddleName, LastName FROM Emp...
true
543421cfdc4423e213c55853f9c798ed998625a8
SQL
vaddya/hotel-booking
/lab4/sql/select-in.sql
UTF-8
105
2.5625
3
[]
no_license
SELECT * FROM reservation WHERE user_id IN (1, 2, 3) AND "from" < to_date('2017-01-31', 'YYYY-MM-DD');
true
cab82bff52ec5855c8dcd83e9a61c4459b6026b2
SQL
Shashwat4K/OnlineBankingPortal
/JARS and SQL file/kb_db.sql
UTF-8
5,826
3.046875
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.7.4 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Apr 16, 2018 at 03:51 PM -- Server version: 10.1.28-MariaDB -- PHP Version: 7.1.10 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OL...
true
3c15180027f24141670b8fb8c6fc345001d9be99
SQL
Lukas-Krickl/SETA-Application
/Implementierung/Database/szenarien/2_3_MC.sql
UTF-8
3,711
3.15625
3
[]
no_license
USE seta; INSERT Szenario (kapitelnummer, themanummer) VALUES (2, 3); INSERT MC_Frage (szenarioID, frage) VALUES ( LAST_INSERT_ID(), 'Wählen Sie VORTEILE eines Passwort-Managers aus!' ); INSERT MC_Antwort (szenarioID, text, korrekt) VALUES ( LAST_INSERT_ID(), 'Ein Passwort-Manager speichert meine Passwö...
true
9e910b05f0c26b84160740d66b69f9cb3627c26e
SQL
marianjerez/eccomerceimpresiones3d
/Sprint6/data.sql
UTF-8
2,332
2.75
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.9.3 -- https://www.phpmyadmin.net/ -- -- Servidor: localhost:8889 -- Tiempo de generación: 11-11-2020 a las 22:42:53 -- Versión del servidor: 5.7.26 -- Versión de PHP: 7.4.2 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /...
true
77fd77916219deeb273905b984203b7c383087b3
SQL
Maybe728/bank
/src/main/resources/sql/employee_relatives_info.sql
UTF-8
870
2.734375
3
[]
no_license
/* Navicat MySQL Data Transfer Source Server : localhost_3306 Source Server Version : 50723 Source Host : localhost:3306 Source Database : bank Target Server Type : MYSQL Target Server Version : 50723 File Encoding : 65001 Date: 2018-11-25 11:11:22 */ SET FOREIGN_KEY_CHECKS=0; --...
true
4dd858f6d250d4f5533e8edea5c59b8fe2f12fe4
SQL
JohnLionKing/FaceRecognition
/face_recognition.sql
UTF-8
1,488
3
3
[]
no_license
/* SQLyog Ultimate v12.09 (64 bit) MySQL - 5.6.37 : Database - face_recognition ********************************************************************* */ /*!40101 SET NAMES utf8 */; /*!40101 SET SQL_MODE=''*/; /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; /*!40014 SET @OLD_FOREIGN_K...
true
b2ad27e134f3d4e9d4d32dbd85c302a1814279dd
SQL
panying1990/south_dis_mobilephone_report
/手机系统相关函数.sql
UTF-8
2,286
3.609375
4
[]
no_license
-- 统一格式 CREATE DEFINER=`root`@`localhost` FUNCTION `get_same`(input_info int) RETURNS int(11) BEGIN DECLARE out_int integer DEFAULT 0; if input_info is null then set out_int = 0; elseif input_info = 0 then set out_int = 0; else set out_int = 1; end if; RETURN out_int; END -- 拆分销售区域全路径 CREATE DEFINE...
true
dad6147c22b1b893992c3bc3128054e8d4be6bd7
SQL
hqottsz/MXI
/assetmanagement-database/src/base/plsql/api/view/acor_rbl_pirepmarep_v1.sql
UTF-8
2,398
3.390625
3
[]
no_license
--liquibase formatted sql --changeSet acor_rbl_pirepmarep_v1:1 stripComments:false CREATE OR REPLACE FORCE VIEW acor_rbl_pirepmarep_v1 AS SELECT inv_acft.alt_id AS aircraft_id, inv_inv.alt_id AS inventory_id, eqp_assmbl_bom.alt_id AS config_slot_id, sd_fault.alt_id ...
true
98611fc085cbae523e0a3893c87580c5afda8ac3
SQL
JuJin1324/node-mvc-starter
/docker/mariadb/init1.sql
UTF-8
2,805
4.09375
4
[]
no_license
SET TIME_ZONE='Asia/Seoul'; -- START USER TABLE CREATE TABLE DEV_USER ( USER_KEY INT NOT NULL AUTO_INCREMENT COMMENT '사용자 키', USER_ID VARCHAR(256) NOT NULL COMMENT '사용자 아이디', NAME VARCHAR(30) NOT NULL COMMENT '사용자 이름', PHONE VARCHAR(20) COMMENT '연락처', EMAIL ...
true
86afb105342cdc9a28e71299ab6b7b8fa4ca89ed
SQL
narendratreddi/cscripts
/cs_sprf_implement_wf 2.sql
UTF-8
2,221
2.9375
3
[]
no_license
---------------------------------------------------------------------------------------- -- -- File name: cs_sprf_implement_wf.sql -- -- Purpose: Implements (imports) Execution Plans for some KIEV WF SQL in some PDBs, using SQL Profile(s) -- -- Author: Carlos Sierra -- -- Version: 2021/09/10 -- -- Usage:...
true
e56dad3c4549803cd3ac2653572c56d63f25c031
SQL
gicadmin/allo
/PHENIX/Tables/SPECIAL_ORDER_AUDITS.sql
UTF-8
1,749
3.484375
3
[]
no_license
CREATE TABLE phenix.special_order_audits ( soa_id NUMBER(15) NOT NULL, soa_date DATE NOT NULL, soa_cod_coh_id NUMBER(15) NOT NULL, soa_cod_line_number NUMBER(4) NOT NULL, soa_pod_poh_id NUMBER(15), soa_pod_line_number NUMBER(4), soa_use_code NUMBER(5) NOT NULL, soa_cancelled_quantity NUMBER(7), soa_ca...
true
4ba03b894cbff5ed00c2820b1a0db8da49de3ea9
SQL
sierra073/gsheet-service-layer
/scripts/2019/prework_queries/id2026_districts_meeting_cost_2018sots.sql
UTF-8
865
3.921875
4
[]
no_license
select case when bc.meeting_2018_goal_oversub = true then 'Meeting 1 Mbps/student' when bc.meeting_2014_goal_no_oversub = true then 'Meeting 100 kbps/student, not 1 Mbps' when bc.meeting_2014_goal_no_oversub = false then 'Not Meeting 100 kbps/student' end as meeting_goal_group, sum(bc.ia_monthly_...
true
f888d0862825f6ec64bc9afea23eef4db731762f
SQL
Namnetsy/smarthouse-server
/create_tables.sql
UTF-8
683
3.390625
3
[ "MIT" ]
permissive
CREATE TABLE IF NOT EXISTS user_account ( id VARCHAR (7) PRIMARY KEY, username VARCHAR (24), email VARCHAR (254) NOT NULL UNIQUE, pass_hash VARCHAR (64) NOT NULL, fcm_token VARCHAR (255) UNIQUE ); CREATE TABLE IF NOT EXISTS hub ( id VARCHAR (7) PRIMARY KEY, user_id VARCHAR (7) NOT NULL UNIQUE, pass_has...
true
0278c3e4b7d474b4a6080ac025dfab127410cec9
SQL
Nour95-omar/IV1351Project
/sql/queries.sql
UTF-8
12,396
4.59375
5
[]
no_license
-- TASK 1 -- The Number of instrument rented per month during a specified year CREATE VIEW rented_instru_per_month AS SELECT COUNT(*) AS rentals_per_month, EXTRACT(MONTH FROM renting_start_date) AS month FROM instrument_rental WHERE EXTRACT(YEAR FROM renting_start_date) = '2019' GROUP BY EXTRACT(MONTH FROM renting_star...
true
a663c659ae19b6634e00011bac5eae874bfca294
SQL
dariahauer/Homework25.2
/src/Homework25.1.sql
UTF-8
1,706
3.90625
4
[]
no_license
1. SELECT * from employees WHERE hire_date > '1990-01-01' order by hire_date ; 2. SELECT count(emp_no) FROM employees WHERE gender='F'; 3. SELECT e.first_name, e.last_name,de.dept_name FROM employees e JOIN dept_emp d ON e.emp_no=d.emp_no JOIN departments de ON d.dept_no = de.dept_no; 4. SELECT first_name, last_nam...
true
c2880f82de5213f79e0b63942d27f2bea3fc5a3a
SQL
r1github/-ratan
/quiz/users.sql
UTF-8
5,610
3.28125
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 5.1.1 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Sep 23, 2021 at 06:30 PM -- Server version: 10.4.20-MariaDB -- PHP Version: 7.4.22 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIE...
true
13133f1fc09f25a30bc09ab858ca464b04bea3b8
SQL
algorenator/OLIVER
/Tables/BCGEU_PENSIONERS.sql
UTF-8
1,063
2.75
3
[]
no_license
-- -- BCGEU_PENSIONERS (Table) -- CREATE TABLE OLIVER.BCGEU_PENSIONERS ( NAME VARCHAR2(26 BYTE), SIN VARCHAR2(12 BYTE), DATE_OF_BIRTH DATE, PENSION_TYPE VARCHAR2(11 BYTE), COMPONENT VARCHAR2(3 BYTE), SERVICE_END_DATE DATE, P...
true
75e314f944118fdcd5c1063da45877c2706945df
SQL
toyokazu/ieice-scripts2
/script/createtable_logs.sql
UTF-8
2,093
2.890625
3
[ "MIT" ]
permissive
/* PDFのアクセスログ */ drop table access_logs; create table access_logs ( /* 0: 項番 id int8 */ id integer, /* 1: 閲覧日時 log_date varchar 10 yyyymmdd hhmmss */ log_date datetime, /* 2: ログインユーザ user_id varchar 100 "環境変数 REMOTE_USER ID or メールアドレス" */ user_id varchar(100), /* 3: 会員ソサイエティ society varchar 5 */ ...
true
2b89c878b7ba597fa122b70165937435ae0d15d7
SQL
zhanght86/MachineManagementNew
/DatabaseScript/2015040410_login.sql
UTF-8
755
3.59375
4
[]
no_license
-- login delimiter // drop procedure if exists login; create procedure login(in email varchar(100),in passwd varchar(100),inout result varchar(100)) BEGIN declare tran_error int default 0; declare continue handler for SQLEXCEPTION begin set tran_error=@@error_count; end; start transaction; set result='';...
true
0f84f678a963fbee202247acc3e078c06bdd9805
SQL
sheezatariq70/phpfirstt_assignment
/project1.sql
UTF-8
2,432
3.21875
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.9.0.1 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Jul 16, 2019 at 09:01 AM -- Server version: 10.3.15-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 @O...
true
5503bc8dd3b076bbec03ee7d36c0b3708766705e
SQL
dfeusse/2018_practice
/dataScienceInterviewQs/08_august/10_erikQ14/01_warmerr.sql
UTF-8
176
3.5625
4
[]
no_license
SELECT user.user_id, user.timestamp, song.song_id, song.song_length FROM song_info as song JOIN user_song_log as user ON (song.song_id=user.song_id) /* GROUP BY 1 */ ORDER BY 1
true
e813be9658377051ba0f940d00836dd0af3e0200
SQL
psyomn/turntables
/spec/data/sql-seq-and-mono/mono/3.sql
UTF-8
434
2.609375
3
[ "MIT" ]
permissive
--$ the other files should be ignored, and this should be the only one that is --$ executed create table accounts ( id integer primary key autoincrement, balance float, name text ); create table users ( id integer primary key autoincrement, name text, email text, bio text ); create table randomness (...
true
838c9ed3640fcb3b9aca9492fc40b9ddade8a466
SQL
thanapol2/Temporal-Warhouse
/sql_2011.sql
UTF-8
1,073
4.03125
4
[]
no_license
--- Create Temporal Table CREATE TABLE LOT_LOC ( FDYD_ID VARCHAR2(20) , LOT_ID_NUM VARCHAR2(20) , PEN_ID VARCHAR2(20) , HD_CNT VARCHAR2(20) , START_DATE DATE , END_DATE DATE , PERIOD FOR lot_loc_valid_time (START_DATE, END_DATE) ); -- Select : Point of Time Case SELECT * FRO...
true
70225d80be7f954f41cfbff775f67be3cf8850d1
SQL
xavier-taylor/infinite-input
/db/schema/earlier thinking and notes/materialized_view.sql
UTF-8
3,203
3.828125
4
[]
no_license
/* CREATE MATERIALIZED VIEW [ IF NOT EXISTS ] table_name [ (column_name [, ...] ) ] [ USING method ] [ WITH ( storage_parameter [= value] [, ... ] ) ] [ TABLESPACE tablespace_name ] AS query [ WITH [ NO ] DATA ] */ /*CREATE MATERIALIZED VIEW mandarin.document_word (document_id, document_chine...
true
d0256a86dc827451cb9d3f90a65fc3f839e421d5
SQL
cdesmarais/WebDB-Test
/WebDB/StoredProcedures/Reports/dbo.JobGroupReportDailyExcelExport.PRC
UTF-8
3,985
3.75
4
[]
no_license
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[JobGroupReportDailyExcelExport]') and OBJECTPROPERTY(id, N'IsProcedure') = 1) drop procedure [dbo].[JobGroupReportDailyExcelExport] go create Procedure [dbo].[JobGroupReportDailyExcelExport] ( @GID int, @DateOffset int = 0, @NumDaysOffset int...
true
6a8d975e6112f9f459946932eb66a455b0848e10
SQL
vipulnaik/donations
/sql/donations/donations-schema.sql
UTF-8
3,485
2.953125
3
[ "CC0-1.0" ]
permissive
create table donations ( donation_id int not null auto_increment primary key, donor varchar(100), /* max observed length (as of 2022-12-25) 70 */ donee varchar(200), /* max observed length (as of 2022-12-25) 176 */ amount decimal(14,2), amount_original_currency decimal(24,2), original_currency e...
true
d42e24e69b4fa495c179217c3e73d36024b62e64
SQL
gasparpd/ADT
/PracticaJDBC/script/smartphones(datos-prueba).sql
UTF-8
1,710
2.9375
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.5.4.1 -- http://www.phpmyadmin.net -- -- Servidor: localhost -- Tiempo de generación: 17-01-2020 a las 11:12:25 -- Versión del servidor: 5.7.11 -- Versión de PHP: 5.6.18 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHAR...
true
fd3dc5268fa40b5580d0b59bea5212c6832fa38a
SQL
gwgundersen/databases
/4.5-views_and_authorization/views_exercises/ex10.sql
UTF-8
397
3.078125
3
[]
no_license
/* * Write an instead-of trigger that enables deletions from view NoRating. * * Policy: Deletions from view NoRating should add a new rating for the * deleted movie with rID = 201, stars = 1, and NULL ratingDate. */ CREATE TRIGGER NoRatingDelete INSTEAD OF DELETE ON NoRating FOR EACH ROW BEGIN INSERT INTO Ra...
true
5e384fd473de2edf6ef4588ec32d7b10a1bd7d9a
SQL
IPN-Mario-Aleman/buzzy_dp
/BD Exports/buzzy.sql
UTF-8
18,061
3.21875
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.8.3 -- https://www.phpmyadmin.net/ -- -- Servidor: localhost:3306 -- Tiempo de generación: 02-07-2020 a las 11:08:14 -- Versión del servidor: 5.7.24 -- Versión de PHP: 7.3.7 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*...
true
553d7fb36ce256e7068bb04d6d031917f167fdfc
SQL
Rivaldisamad/E-learning
/db_elearning.sql
UTF-8
21,447
2.96875
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.5.1 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: 20 Agu 2019 pada 20.19 -- Versi Server: 10.1.10-MariaDB -- PHP Version: 7.0.4 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT ...
true
c2c6f40e846ea7f524a0806ed86c41a9ece1878b
SQL
tanyinqing/MySQL_20170902
/明飞/day9/2_aggregate.sql
UTF-8
520
3.40625
3
[]
no_license
-- 聚合函数 最小 最大 平均值 总和 总的个数 SELECT min(sal),max(sal),avg(SAL),sum(SAL),count(SAL) FROM scott.emp; -- 先分组 在统计最小值 SELECT DEPTNO,min(sal) FROM scott.emp GROUP BY DEPTNO; -- 工作值相同的分为一组 先分组 在查询 where 行检索 havng 组检索 SELECT count(*),JOB FROM scott.emp GROUP BY JOB HAVING JOB='clerk'; -- 组中再进行分组 SELECT DEPTNO,JOB,count(*)...
true
9ba78cfd36c5ad8fc8ec35897d8344ddb0c8ed76
SQL
Gporttreasure/-
/education-api/src/main/resources/db/1.0.2/V1.0.2.6_language_points_info.sql
UTF-8
650
3.1875
3
[ "Apache-2.0" ]
permissive
DROP TABLE IF EXISTS `language_points_info`; CREATE TABLE `language_points_info` ( `id` int(11) NOT NULL AUTO_INCREMENT, `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL, `grade_info_id` int(11) NOT NULL, `subject_id` int(11) NOT NULL, `parent_id` int(11) NOT NULL DEFAULT 0, `c...
true
ed441bbac03cf9634bd893abf789f39cbdc59685
SQL
youngsamwei/DongmenDB
/doc/create.sql
UTF-8
3,451
3.140625
3
[ "Apache-2.0" ]
permissive
.open demodb create table student(sno char(10), sname char(20), sage integer, ssex char(10)); create table course(cno char(10), cname char(20), credit integer); create table sc(sno char(10), cno char(10), grade integer); .open demodb insert into student(sno, sname, sage, ssex) values("2012010101","tom simith",20,"ma...
true
0e0ac0efd8d373b85b34a0647c2a21be8e9b5177
SQL
hkhan70/Shopping-System
/shopping.sql
UTF-8
2,640
3.28125
3
[ "Apache-2.0" ]
permissive
-- phpMyAdmin SQL Dump -- version 4.8.5 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1:3308 -- Generation Time: Jul 17, 2019 at 02:32 PM -- Server version: 10.1.38-MariaDB -- PHP Version: 7.1.28 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SE...
true
509e09498e280dab26627c66f3d6f49c4bfc912d
SQL
NTXpro/NTXbases_de_datos
/DatabaseNTXpro/ERP/Stored Procedures/Procs2/Usp_Upd_Receta_Activar.sql
UTF-8
742
2.796875
3
[]
no_license
-- ========================================================================================== -- Entity Name: ERP.Usp_Upd_Receta_Activar -- Author: Omar Rodriguez -- Create date: 12/7/2018 2:50:47 p. m. -- Description: Activar una receta del sistema -- =====================================================...
true
dd0ceb943ddd799ffaee61d8465c6fbab9805638
SQL
maflorvega/Redash_queries
/queries_versioned/173_After redirect.sql
UTF-8
711
2.9375
3
[]
no_license
/* Name: After redirect Data source: 4 Created By: Admin Last Update At: 2016-02-05T13:09:31.992564+00:00 */ SELECT post_prop10, page_url, post_prop72,count(*) as clicks FROM (TABLE_QUERY(djomniture:cipomniture_djmansionglobal,'CONCAT(REPLACE(table_id,"_","-"),"-01") BETWEEN STRFTIME_UTC_USEC("{{startdate}}", "%Y-%m-0...
true
3fdc08588d33a9c658d2af056115a8bf99466051
SQL
dbsystel/ReservierungMicroserviceSetup
/infrastructure-installation/testdata/booking_init.cql
UTF-8
571
3.203125
3
[ "BSD-2-Clause" ]
permissive
create keyspace booking with replication = { 'class' : 'SimpleStrategy', 'replication_factor' : 3}; use booking; create table booking ( id text primary key, payment_method text, customer_id int) ; create table partial_booking ( id text primary key, booking_id text, seat_id int, train_connection_id int, start text, dest...
true
07588e1ffe207f8e9b9ef8419c89f652ac81a44c
SQL
kevineleven6677/DataManagementSystemDesign
/PART-2.sql
UTF-8
4,099
4.53125
5
[]
no_license
/*2-1 search document by title, id , publisher*/ /*Search by title*/ SELECT DOCID, TITLE, p.pubname FROM document d, publisher p WHERE d.publisherid = p.publisherid AND title LIKE '%internet%' ORDER BY docid ; /*Search by DOCID*/ SELECT DOCID, TITLE, p.pubname FROM document d, pub...
true
3cd19720173db2e2c51b57a8d51d6a31e6f25977
SQL
warner23/WICMS
/WIAdmin/WIPlugin/WIShop/Install/WI_Blog.sql
UTF-8
1,057
2.984375
3
[]
no_license
CREATE TABLE IF NOT EXISTS `WI_blog` ( `id` int(11) NOT NULL AUTO_INCREMENT, `type` enum('blog_slider','blog_video','blog_image','blog_audio','NoMedia','blog_youtube') NOT NULL, `day` varchar(255) NOT NULL, `month` varchar(255) NOT NULL, `image` varchar(255) NOT NULL, `image2` varchar(255) NOT NULL, ...
true
c411af2671c7b9417456c6ed1d2db798fb83ad0c
SQL
zckak/my-boot-app
/src/main/resources/db/migration/V1__Create_Users.sql
UTF-8
291
2.65625
3
[]
no_license
CREATE TABLE users ( id int(10) unsigned NOT NULL AUTO_INCREMENT, username varchar(255) NOT NULL, password varchar(255) NOT NULL, name varchar(255) NOT NULL, icon_uri text DEFAULT NULL, updated_at datetime DEFAULT NULL, created_at datetime DEFAULT NULL, PRIMARY KEY (`id`) );
true
fe5fb13e6f2c864f8a49db88751a59b680fd9063
SQL
baowei1003/OracleDatabase
/scripts/dba_scripts-master/sql/ash_hist_cpu.sql
UTF-8
1,178
3.40625
3
[]
no_license
col sample_time for a25 col sess for a9 set head on set feed on set pages 0 set colsep | select * from ( select ash.snap_id ,to_char(min(snap.BEGIN_INTERVAL_TIME),'YYYY-MON-DD HH24:MI') start_time, to_char(max(snap.END_INTERVAL_TIME),'YYYY-MON-DD HH24:MI') end_time --,QC_SESSION_ID qsid ,ash.session_id||','||ash.s...
true
d86bd5263780271f18cb0fff719aa1a218734aaf
SQL
coyle5280/pubg
/PubgServer/sql/map/kill_location_by_mode_map.sql
UTF-8
355
3.203125
3
[]
no_license
Select mad.vimtim_x as x, mad.victim_y as y, mad.damage_type_category, mad.damage_reason, mad.damage, mad.damage_causer_name from pubg.match_attack_damage mad JOIN pubg.match m ON m.match_id = mad.match_id where mad.victim_health = mad.damage And mad.attacker_account_id = $1 And mad.damage != 0 And m....
true
3047f61eb57fdf14de3255b6e29b46b6a574782c
SQL
YarHovor/ecommerce902
/ecom902-1.sql
UTF-8
11,504
2.875
3
[]
no_license
-- MySQL dump 10.13 Distrib 5.7.26, for Linux (x86_64) -- -- Host: 127.0.0.1 Database: ecom902 -- ------------------------------------------------------ -- Server version 5.7.26-0ubuntu0.16.04.1 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SE...
true
2281555df4c8acf88ce5a86a9ecdc12ba3dbc2ca
SQL
rin-nas/postgresql-patterns-library
/dba/pg_stat_user_tables_usage.sql
UTF-8
2,254
4.4375
4
[ "MIT" ]
permissive
--Как узнать, какие самые частые действия в таблице совершаются (чтение, добавление, обновление, удаление)? with s1 as ( select t.schemaname, t.relname, relid::regclass as table_name, --pg_size_pretty(pg_relation_size(relid)), --(select spcname from pg_tablespace where oid=(select...
true
e41b9443b7d478e7b2131decdd1c49f38194c689
SQL
Lintik/CodeFights-Arcade
/Databases/Exotic Dishes/findTable/CODE.sql
UTF-8
428
3.53125
4
[]
no_license
CREATE PROCEDURE findTable() BEGIN SELECT a.TABLE_NAME AS tab_name, a.COLUMN_NAME AS col_name, a.DATA_TYPE AS data_type FROM INFORMATION_SCHEMA.COLUMNS a JOIN( SELECT table_name FROM information_schema.tables where table_name LIKE BINARY 'e%s') b ON...
true
8f6c46797a2dc2faa23b0c259ebf37cd209f705c
SQL
wgharib/asap2_web
/db/asap.sql
UTF-8
11,064
3.359375
3
[]
no_license
create table users( ); create table delayed_jobs( ); create table sessions( ); create table tool_types( id serial, name text, primary key (id) ); create table steps( id serial, obj_name text, name text, label text, description text, rank int, primary key (id) ); create table tools( id serial, name text, label text...
true
d88901bd0d15fede9a947d00d81200cf1be248ce
SQL
GZC986707252/MybatisSelectDemo
/test.sql
UTF-8
1,096
3.796875
4
[]
no_license
create table idcard ( id int(10) not null auto_increment, code varchar(18) collate utf8_unicode_ci default null, primary key(id) ); create table user ( id int(10) not null, name varchar(20) collate utf8mb4_unicode_ci default null, age int(11) default null, idcard_id int(10) default null, ...
true