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
fa784d9795cc4b278e3090705aa6b5af4f691fc0
SQL
Pra3t0r5/frro-soporte-2019-01
/practico_08/cerveceria/cerveweb.sql
UTF-8
10,032
3.09375
3
[ "MIT" ]
permissive
CREATE DATABASE IF NOT EXISTS `cerveweb` /*!40100 DEFAULT CHARACTER SET latin1 */; USE `cerveweb`; -- MySQL dump 10.13 Distrib 5.7.27, for Linux (x86_64) -- -- Host: 127.0.0.1 Database: cerveweb -- ------------------------------------------------------ -- Server version 5.7.27-0ubuntu0.18.04.1 /*!40101 SET @OLD_C...
true
08c528987500cd75a81500894576f3f032a8b34d
SQL
roland-valdez/database-exercises
/update_exercises.sql
UTF-8
853
3.5
4
[]
no_license
USE codeup_test_db; SELECT "These are all the albums in the database" AS "Message"; SELECT * FROM albums; UPDATE albums SET sales = sales * 10; SELECT "These are all the albums in the database with sales multiplied by 10" AS "Message"; SELECT * FROM albums; SELECT "These are all the albums released before 1980" AS "Me...
true
ba9992fcdc0a5d4892f9ea81321ddf25924ecaee
SQL
lulitao1997/database-midterm
/draft.sql
UTF-8
3,248
4.15625
4
[]
no_license
@tid-- 以下均不考虑重修情况 -- Student -- set @sid='15307100008'; -- 获得@sid已经选过的所有课程 select distinct cname, cno from performance natural join course where sno=@sid; -- 获得@sid的平均分,总学分 select AVG(grade), SUM(credit) from performance natural join course where sno=@sid and grade is not NULL group by sno; -- 获得全部学生的成绩表 @rank_table...
true
a2a0546ccd755b8a43904e5d8dc6c9b86ae5ab26
SQL
luzongming/tushuwan
/doc/listgood.sql
UTF-8
15,844
2.84375
3
[]
no_license
/* Navicat MySQL Data Transfer Source Server : 1809 Source Server Version : 50714 Source Host : localhost:3306 Source Database : bookschina Target Server Type : MYSQL Target Server Version : 50714 File Encoding : 65001 Date: 2018-12-01 18:41:33 */ SET FOREIGN_KEY_CHECKS=0; -- ---...
true
677e91420a247a0aec05f2acb017c9a8619c3f67
SQL
koreahong/bigquery
/ch08/76.sql
UTF-8
987
3.890625
4
[]
no_license
DECLARE columns ARRAY<STRUCT<column_name STRING, date DATE>>; SET columns = ( WITH all_date_columns AS ( SELECT column_name, parse_date('_%m_%d_%y', column_name) AS date FROM `bigquery-public-data`.covid19_jhu_csse.INFORMATION_SCHEMA.COLUMNS WHERE table_name = 'confirmed_cases' AND ST...
true
4278ec800fb10eaadc261dadeedc097c96c36553
SQL
dbmi-pitt/ddi-cds
/db/old-scripts/schema_alterations.sql
UTF-8
4,439
3.578125
4
[]
no_license
set search_path to public; -- measurement SELECT CAST(measurement.measurement_date AS TIMESTAMP) FROM measurement; SELECT measurement.measurement_time FROM measurement WHERE measurement_time is not null; -- time columns appear to be empty throughout this schema ALTER TABLE measurement ADD measurement_datetime TIMESTA...
true
ee8be3f312f6338b20ae608cb10686fc3060f443
SQL
ArturoAG/SQL-taller2
/300gym3.0.sql
UTF-8
8,084
3.46875
3
[]
no_license
create database 300gym; use 300gym; /*nota: no exportar el script, ya que el orden cambia y al momento de la creacion no existen llaves foraneas*/ /*Realizar cambios con este archivo, de ahi cambiar la version a continuación*/ DROP TABLE IF EXISTS socio; CREATE TABLE socio ( ID_Socio varchar(9) NOT NULL, ...
true
d303d38a8d1a021a98323c9018b49f9aac01f1ea
SQL
wenniannian/huili
/mall.sql
UTF-8
50,154
2.734375
3
[ "MIT" ]
permissive
-- phpMyAdmin SQL Dump -- version 4.7.4 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: 2018-07-22 10:39:55 -- 服务器版本: 10.1.28-MariaDB -- PHP Version: 5.6.32 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SE...
true
16856d5b8c523b0b77687013398f52079b6c8bf0
SQL
MCZbase/DDL
/TABLE/MEDIA_TECH_METADATA.sql
UTF-8
380
3.03125
3
[ "Apache-2.0" ]
permissive
CREATE TABLE "MEDIA_TECH_METADATA" ( "MEDIA_TECH_METADATA_ID" NUMBER, "MEDIA_ID" NUMBER, "METADATA_TYPE" VARCHAR2(100), "METADATA_VALUE" VARCHAR2(100), CONSTRAINT "PK_MEDIA_TECH_METADATA_ID" PRIMARY KEY ("MEDIA_TECH_METADATA_ID") USING INDEX ENABLE, CONSTRAINT "FK_MEDIA_TECH_MD_MEDIA" FOREIGN KEY ...
true
a65ecceb39a87ff48cf78a5064cda82e501668f3
SQL
ticmonares/taller_base_datos
/comandos básicos/Consultas 31 de Julio 2021.sql
UTF-8
1,960
3.59375
4
[]
no_license
USE tallerbd; SELECT * FROM tbl_usuario; SELECT * FROM tbl_usuario WHERE ciudad IS NOT NULL; UPDATE tbl_usuario SET ciudad = "NO ESPECIFICA" WHERE id = 28; SELECT nombre, correo AS correoElectronico, telefono AS celular FROM tbl_usuario; /*IS NULL -> VALOR VERDADERO SI EL VALOR DEL CAMPO ES NULL, SINO RETORNA UN VALOR ...
true
b31e579a5d6779adfb823779c315d0d3ec6b8cc1
SQL
zyz753467689/student_manage
/stu_info_manage(无数据).sql
UTF-8
3,715
3.390625
3
[]
no_license
/* SQLyog Ultimate v8.32 MySQL - 8.0.12 : Database - student_information_management ********************************************************************* */ /*!40101 SET NAMES utf8 */; /*!40101 SET SQL_MODE=''*/; /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; /*!40014 SET @OLD_FORE...
true
9a17cdbae3b6886bfd661cca8f373eafcb8924c5
SQL
shayankhorshidfard/online_api
/exp_apinews.sql
UTF-8
1,607
2.796875
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 5.1.1 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Aug 29, 2021 at 09:01 AM -- Server version: 10.4.20-MariaDB -- PHP Version: 8.0.9 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIEN...
true
0e85bf3719ea2df85002cd0bbc2b9ba2697d424b
SQL
BinAff/School
/Development/Source Code/Sparkle/Sparkle/Database/License/Stored Procedures/ComponentInsert.sql
UTF-8
406
2.875
3
[]
no_license
CREATE PROCEDURE [License].[ComponentInsert] ( @Name Varchar(50), @Code Varchar(50), @Description Varchar(50), @IsForm Bit, @IsReport Bit, @IsCatalogue Bit, @Id Numeric(10,0) OUTPUT ) As Begin INSERT INTO License.Component(Code, Name, [Description], IsForm, IsReport, IsCatalogue) VALUES(@Code, @...
true
fa014727793baf26af6a51112dca0597ce6f7937
SQL
xiazemin/canal_kafka
/init.sql
UTF-8
411
2.578125
3
[]
no_license
GRANT ALL PRIVILEGES ON *.* TO 'canal'@'%' ; FLUSH PRIVILEGES; create database test; use test; CREATE TABLE `xdual` ( -> `ID` int(11) NOT NULL AUTO_INCREMENT, -> `X` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, -> PRIMARY KEY (`ID`) -> ) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8; insert...
true
dcebbbc54fa348355f48f48a10fbf05a136fac37
SQL
Ensembl/ensembl-compara
/sql/patch_94_95_c.sql
UTF-8
19,267
2.734375
3
[ "Apache-2.0" ]
permissive
-- See the NOTICE file distributed with this work for additional information -- regarding copyright ownership. -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apac...
true
fcddbf2f3a0c2adc02ffeed382317d2476996b16
SQL
jagumiel/Sistemas-Web-2015
/Lab6/quiz.sql
UTF-8
3,711
3
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 3.5.2.2 -- http://www.phpmyadmin.net -- -- Servidor: localhost -- Tiempo de generación: 22-10-2015 a las 07:48:12 -- Versión del servidor: 10.0.20-MariaDB -- Versión de PHP: 5.2.17 SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIEN...
true
a7c9d4e65b01902433dd835dc5e108a10fe8785a
SQL
ProjectSidewalk/SidewalkWebpage
/conf/evolutions/default/98.sql
UTF-8
1,520
3.21875
3
[ "MIT" ]
permissive
# --- !Ups UPDATE label_point SET computation_method = 'approximation2', geom = ST_Project( ST_SetSRID(ST_Point(panorama_lng, panorama_lat), 4326), GREATEST(0.0, 20.8794248 + 0.0184087 * sv_image_y + 0.0022135 * canvas_y), CASE WHEN heading -27.5267447 + 0.0784357 * canvas_x < -3...
true
68b56ad45f05d30c88defdd96c9471c41b1fcfdd
SQL
Tangol/Osclass-Locations
/locations/ER-Eritrea.sql
UTF-8
2,792
2.828125
3
[]
no_license
REPLACE INTO /*TABLE_PREFIX*/t_country (pk_c_code, s_name, s_slug) VALUES ('ER', 'Eritrea', 'eritrea'); REPLACE INTO /*TABLE_PREFIX*/t_region (pk_i_id, fk_c_country_code, s_name, b_active, s_slug) VALUES (1003425, 'ER', 'Anseba Region', 1, 'anseba-region'); REPLACE INTO /*TABLE_PREFIX*/t_city (pk_i_id, fk_i_region_...
true
c2fc8b64b48aff052a84624a2709f4db2b279dc5
SQL
kkannappan4/UCSD_DS
/Databases_SQL/HW4/SalesCube/sales_precomputed_table.sql
UTF-8
1,319
4.09375
4
[]
no_license
CREATE VIEW t20_customers as select distinct customer_id from (select c.customer_id, sum(s.quantity) as quantity_sold, sum(s.quantity*s.price) as dollar_value from customer c left join sale s on c.customer_id = s.customer_id group by 1 order by 3 desc limit 20) a; CREATE VIEW t20_categories as select distin...
true
8358c1279ebd415a68293da79b10273ba22e8aab
SQL
Navneet78/Smart_Bin
/Smart_Bin/SQL File/smartdustbin.sql
UTF-8
4,494
3.09375
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.6.4 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Nov 15, 2018 at 08:21 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
ccf028b74744903cd11baae7f725b0adfa8ad8eb
SQL
kevinsagen47/librarianreport
/doc/01-databases/02-mysql/99-acad-statics.sql
UTF-8
2,528
3.359375
3
[]
no_license
-- acad sql -- select s1.stuid, s1.dpt_cod, d1.dpt_desc , case s1.section_cod when '0' then '' else c1.section_desc end as section_desc , g1.deg_desc, s1.cname, s1.sems, e1.syear, e1.p_postpone, e1.campus, e1.out_campus from `acad_data`.`stu_main` s1 , `acad_data`.`cod_deg` g1, `acad_data`.`cod_dpt` d...
true
d74c784cbfdb85cb1b7c16aa19ef905d4ec49cd7
SQL
evelinaEvlogieva/MySQL
/02. Basic-CRUD/Lab/basic crud - lab.sql
UTF-8
598
3.875
4
[]
no_license
SELECT `id`, `first_name`, `last_name`, `job_title` FROM `employees` ORDER BY `id`; SELECT `id`, concat(`first_name`, ' ', `last_name`) as `full_name`, `job_title`, `salary` from `employees` where `salary` > 1000.00; UPDATE `employees` SET `salary` = `salary` * 1.1 where `job_title` = 'Therapist'; SELECT `salary` FRO...
true
a24d0e772986627312c3e22b8a132c0c6535f34f
SQL
lluischess/proyecto-final-Eventcraft
/base de datos/eventcraft.sql
UTF-8
2,900
3.21875
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.7.7 -- https://www.phpmyadmin.net/ -- -- Servidor: 127.0.0.1 -- Tiempo de generación: 29-05-2018 a las 20:51:11 -- Versión del servidor: 10.1.30-MariaDB -- Versión de PHP: 7.2.2 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; ...
true
8458d7b396c81cfe6ddd90db2974385f1a109ced
SQL
SaKu2110/backend-summer-vacation
/db/sql/init.sql
UTF-8
298
2.84375
3
[]
no_license
DROP DATABASE IF EXISTS summer; CREATE DATABASE summer; USE summer; ---- drop ---- DROP TABLE IF EXISTS `users`; ---- create ---- CREATE TABLE IF NOT EXISTS `users` ( `id` VARCHAR(50) NOT NULL, `password` VARCHAR(64) NOT NULL, PRIMARY KEY (`id`) ) DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
true
8df2ff15bf8a9c182f8c97bcb61feb21f9edbe72
SQL
Daniel-Davies/Bristol-Surplus-Food
/conf/evolutions/default/6.sql
UTF-8
414
3.125
3
[]
no_license
# FoodItems schema # --- !Ups CREATE TABLE FoodItems ( id bigserial primary key, amount int NOT NULL CHECK (amount > 0), unit int NOT NULL, foodCategoryId bigserial NOT NULL REFERENCES FoodCategories, foodCollectionId bigserial NOT NULL, foodCollectionType varchar(255) NOT NULL CHECK(foodColle...
true
b54ddee48f35dd2c27c4d12b9fea5482d615f4ee
SQL
Phenanth/VueSite
/server/instructions.sql
UTF-8
1,155
3.5625
4
[ "MIT" ]
permissive
!! Instructions used in creating the database. create database test; grant update,select,insert on test.* to webAdmin@localhost identified by 'byxiaowu9'; use test; CREATE TABLE `users` ( `username` char(24) PRIMARY KEY, `password` char(16) NOT NULL ) DEFAULT CHARSET=gbk; --------------------------------------...
true
7e0a38a0a1d5b928393ed49de313a6dd8e31638d
SQL
chenxy11/jims-oa
/src/main/resource/db/migration/V4__add_oa_position_dict.sql
UTF-8
654
3.3125
3
[]
no_license
-- Create table create table OA_POSITION_DICT ( id VARCHAR2(64) not null, dept_id VARCHAR2(64), position_name VARCHAR2(64), position_desc VARCHAR2(512), del_flag VARCHAR2(8) ); -- Add comments to the columns comment on column OA_POSITION_DICT.dept_id is '部门Id'; comment on column OA_PO...
true
45b88a2e351b191915c37349da03c422d194ece9
SQL
tieuvu2601/ruoi-rs
/bin/real-estate.sql
UTF-8
4,910
3.90625
4
[]
no_license
CREATE DATABASE RealEstate DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_general_ci; USE RealEstate; DROP TABLE IF EXISTS UserGroup; CREATE TABLE UserGroup ( UserGroupID bigint(20) NOT NULL AUTO_INCREMENT, Code VARCHAR(255) NOT NULL, Name VARCHAR(255) NOT NULL, Description VARCHAR(255), CreatedDate TIMEST...
true
440703c80dd2812fa2680fb8a79a0070c3948b0b
SQL
GrzegorzM/SQL-Server-Database-Project
/SQL Server Database Project/Scripts/LessonScripts/108_OverClause.sql
UTF-8
1,588
4.96875
5
[]
no_license
select * from tblEmployee; SELECT Gender, COUNT(Id) AS GenderTotal, AVG(Salary) AS AVGSALARY, MIN(Salary) AS MINSALARY, MAX(Salary) AS MaxSalary FROM tblEmployee GROUP BY Gender; SELECT NAME, Salary, Gender, COUNT(Id) AS GenderTotal, AVG(Salary) AS AVGSALARY, MIN(Salary) AS MINSALARY, MAX(Salary) AS MaxSalary FROM t...
true
6bde59cad1324e4ad22bbfa7474fdd4b5d7395b3
SQL
AsenTanev/CodeIgniterRepo
/codeigniter.sql
UTF-8
1,040
2.5625
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.1.14 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: -- Версия на сървъра: 5.6.17 -- PHP Version: 5.5.12 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_CH...
true
445be3d6ac01d0eab49a50207aa10bee9a8bfa22
SQL
InterfaceTT/SQL250
/Module07/Demo/Mod07 Demo 03 - DeleteAndTruncate.sql
UTF-8
1,593
3.953125
4
[]
no_license
/* MODULE 7 DEMO 3: Delete and Truncate ==== START SETUP ==== */ USE tempdb IF EXISTS (SELECT * FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA = 'dbo' AND TABLE_NAME = 'Customer') DROP TABLE dbo.Customer CREATE TABLE dbo.Customer (CustomerID int IDENTITY(1,1) PRIMARY KEY ,CustomerName nvarchar(20) N...
true
f7cb53ce084f4fff2fe0e2185234250c32575e28
SQL
ThinvvGCD18359/TicketingCoach1.0
/server/prisma/migrations/20210831041032_create_users_and_coach/migration.sql
UTF-8
986
3.375
3
[]
no_license
/* Warnings: - You are about to drop the column `route` on the `Coach` table. All the data in the column will be lost. - A unique constraint covering the columns `[phonenumber]` on the table `Coach` will be added. If there are existing duplicate values, this will fail. - A unique constraint covering the column...
true
ec3adc0b17f3e208fe1072d97c7487b981e921ab
SQL
GZC986707252/library
/library.sql
UTF-8
14,234
3.375
3
[]
no_license
/* Navicat Premium Data Transfer Source Server : mysql_gzc Source Server Type : MySQL Source Server Version : 80019 Source Host : localhost:3306 Source Schema : library Target Server Type : MySQL Target Server Version : 80019 File Encoding : 65001 Date: 29/05/2020 22...
true
0180baed4772745c2bcbf8729461739e95266736
SQL
Tim-xiaofan/DB-Study
/6.9-SQL-Server的安全控制.sql
GB18030
1,562
3.578125
4
[]
no_license
-- 6.9 SQL Server İȫ Use School; -- 2. SQL Server ¼й --1¼:sp_addlogin ʹSQL Server֤ΪSQL ServerӶ¼ʻ /** sp_addlogin [ @loginame = ] 'login' [ , [ @passwd = ] 'password' ] [ , [ @defdb = ] 'database' ] [ , [ @deflanguage = ] 'language' ] [ , [ @sid = ] sid ] [ , [ @encryptopt = ] 'encryption_option' ] */ -- 6-2Ϊû Al...
true
54fce05cca4fef47f6953fabb0718a6bc65dd637
SQL
AntLucas/Csharp
/Cadastro de Empresa/query08102018.sql
ISO-8859-1
2,699
3.734375
4
[]
no_license
use master drop database dbEmpresa create database dbEmpresa use dbEmpresa create table Empresa( IdEmpresa int primary key identity(1,1), fk_IdEstados int, NmUsuario varchar(30), CnpjEmpresa varchar(30), DsEndereco varchar(255), NmEmpresa varchar(255), FoneEmpresa varchar(25), Razao varchar(50) ) create t...
true
395742403f91a82cdafa7c37223488ba5f167238
SQL
jackcaninhome/txt
/txt0329/user.sql
UTF-8
1,185
3
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.7.0 -- https://www.phpmyadmin.net/ -- -- 主機: 127.0.0.1 -- 產生時間: 2018-03-29 09:50:11 -- 伺服器版本: 10.1.25-MariaDB -- PHP 版本: 5.6.31 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACT...
true
ce6534faa9ffa4515a0c901baa8f335b7bc0b2b1
SQL
dboutten/HouseSharing
/HouseSharing.sql
UTF-8
3,182
3.796875
4
[]
no_license
SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0; SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0; SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='TRADITIONAL,ALLOW_INVALID_DATES'; CREATE SCHEMA IF NOT EXISTS `housesharing` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci ; USE `housesharing` ;...
true
26844fc016e2c60f17e992c02d035000e239a45e
SQL
BaldrLector/Leetcode-Personal-Record
/183. Customers Who Never Order/183.sql
UTF-8
111
3.5625
4
[]
no_license
SELECT c.Name as 'Customers' FROM Customers c LEFT JOIN Orders o ON(o.CustomerId = c.Id) WHERE o.Id IS NULL
true
5afcf9db1023db18b3f6d9273892620461abe562
SQL
ovh/cds
/engine/sql/api/090_unique_subnum.sql
UTF-8
1,020
3.890625
4
[ "BSD-3-Clause" ]
permissive
-- +migrate Up DELETE FROM workflow_node_run WHERE id IN (SELECT id FROM ( select id from ( select scount.*, wnr.id from ( select count(*) as nb, workflow_node_id,num,sub_num from workflow_node_run group by workflow_node_id,num,sub_num ) scount, workflow_node_run wnr where scount.nb > 1 and wnr.workflow_...
true
ebec6151a2715cc8deb5beb930936a212982809b
SQL
karolmikolajczuk/SQL
/SQL/SQLzad25.sql
UTF-8
318
3.125
3
[]
no_license
--25.2 UPDATE P SET P.dodatek += 10 FROM pracownik AS P JOIN wypozyczenie AS W ON P.id_pracownik = W.id_pracow_wyp WHERE MONTH(data_wyp) = 5; --25.3 UPDATE P SET P.pensja *= 0.95 FROM pracownik AS P JOIN wypozyczenie AS W ON P.id_pracownik = W.id_pracow_wyp WHERE data_wyp NOT BETWEEN '19990101' AND '19991231';
true
2828c4dc6c60d7c9c7bcdc89bce7469df4237d8e
SQL
BShoop33/Poki
/SQLQuery1.sql
UTF-8
2,540
4.0625
4
[]
no_license
--Exercise 1 /* SELECT gr.Name FROM Grade gr */ --Exercise 2 /* SELECT e.Name FROM PoemEmotion pe LEFT OUTER JOIN Emotion e ON e.Id = pe.Id WHERE e.Name != 'NULL' */ --Exercise 3 /* SELECT COUNT(DISTINCT p.Title) FROM Poem p */ --Exercise 4 /* SELECT TOP (76) a.Name FROM Author a ORDER BY a.Name */ --Exercise 5...
true
2266b2e1336c548efdd4072603d1a3b5095f86cd
SQL
PavithraPanjala/HackerRank
/Basic Select/Weather Observation Station 12.sql
UTF-8
135
2.578125
3
[]
no_license
/* Weather Observation Station 12 */ SELECT DISTINCT CITY FROM STATION WHERE CITY NOT LIKE '[AEIOU]%' AND CITY NOT LIKE '%[aeiou]';
true
bd56b9e415f46292706465d37ee2a5b5fe8e0dec
SQL
htmlacademy-nodejs/203950-typoteka-3
/query.sql
UTF-8
1,010
4.25
4
[]
no_license
SELECT articles.*, COUNT(comments.id) AS comments_count, STRING_AGG(DISTINCT categories.name, ', ') AS category_list, users.first_name, users.last_name, users.email FROM articles JOIN article_categories ON articles.id = article_categories.article_id JOIN categories ON article_categories.category_id = cate...
true
ce4728864e3bc73acf8be78e5be53214cf546366
SQL
neostreet/poker_session_data
/sng_bubble_detail.sql
UTF-8
234
2.640625
3
[]
no_license
use poker select poker_flavor,delta,buy_in,entry_fee,num_hands,num_entries,places_paid,place, concat(poker_session_date,tournament_letter) from poker_sessions where poker_style = 1 and place = places_paid + 1 order by id desc; quit
true
0bff2dccfe11131a06d1cba702829e411e47a9bf
SQL
ktj7336/dbSql
/20200213.sql
UHC
9,167
3.96875
4
[]
no_license
-- synonym : Ǿ -- 1. ü Ī ο -- ==≯ ϰ ǥ -- semڰ ڽ ̺ emp̺ ؼ v_emp view -- hr ڰ ְ ο -- v_emp : ΰ sal, comm view -- hr v_emp ϱ ۼ SELECT* FROM KTJ.v_emp; --synonym KTJ.v_emp ==> v_emp -- v_emp == sem.v_emp SELECT * FROM v_emp; -- 1. sem v_emp hr ȸ ֵ ȸ ο GRANT SELECT ON v_emp TO hr; -- 2. hr v_emp ȸϴ° ...
true
7b009a3d553eb88bd676e0d9fec4edd5399d1854
SQL
DevKaiqueSilva/prjLeal
/Leal.sql
ISO-8859-1
8,808
3.609375
4
[]
no_license
-- CRIANDO O BANCO DE DADOS. CREATE DATABASE Leal -- SELECIONANDO O BANCO DE DADOS PARA USO. USE Leal -- CRIAO DAS TABELAS. CREATE TABLE Cliente ( Cod_Cliente INT IDENTITY(1,1) PRIMARY KEY NOT NULL, Nome_Cliente VARCHAR(25) NOT NULL, Sobrenome_Cliente VARCHAR(80) NOT NULL, DataNascimento_Cliente DATE , Sexo_Clie...
true
03e5eb1f263a615f1c168bc082a96fb34edbbf69
SQL
prshnweli/SQLqueries
/TOSA Requests/ELLevation.sql
UTF-8
1,689
4.0625
4
[]
no_license
SELECT STU.ID AS 'Student ID', STU.LN + ', ' + STU.FN AS 'Name', STU.GR AS 'Grade', School = ( select LOC.NM from LOC where stu.SC = LOC.CD), STU.LF AS 'LangFluency', [F&P Spring 20] = ISNULL ((SELECT TOP (1) PL AS score FROM TST WHERE (DEL = 0) AND (PID = stu.ID) AND (ID = 'F&P') AND (PT = 0) AND (TA = '2T1920') ORDE...
true
cda26c5a02faf0ef10775c5e8adab3c13d09c5ff
SQL
PhanHoangLocAG/DoAnOpenSource_WebBanDienThoai
/websitedienthoaididong.sql
UTF-8
34,296
3.046875
3
[ "MIT" ]
permissive
-- phpMyAdmin SQL Dump -- version 5.0.2 -- https://www.phpmyadmin.net/ -- -- Máy chủ: 127.0.0.1 -- Thời gian đã tạo: Th12 24, 2020 lúc 04:49 PM -- Phiên bản máy phục vụ: 10.4.13-MariaDB -- Phiên bản PHP: 7.4.7 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHAR...
true
19cf79a624faa5259f0d5282d2e38beaa37ae992
SQL
jefflee/leetcode_mssql
/RankScores.sql
UTF-8
147
3.53125
4
[]
no_license
-- https://leetcode.com/problems/rank-scores/ select Score, DENSE_RANK() OVER (ORDER BY Score desc ) AS [Rank] from Scores WITH (NOLOCK)
true
09c2155c65f0d7f029d27159298d50a574fdac76
SQL
matiascoronados/labDistribuidos
/pythonScripts/databaseScript.sql
UTF-8
1,025
3.609375
4
[]
no_license
DROP DATABASE IF EXISTS reddit; CREATE DATABASE reddit; DROP TABLE IF EXISTS topics; DROP TABLE IF EXISTS posts; DROP TABLE IF EXISTS comments; CREATE TABLE topics( id_topic SERIAL PRIMARY KEY, topic_title VARCHAR(500) NOT NULL ); CREATE TABLE posts( id_post VARCHAR(20) NOT NULL PRIMARY KEY, id_topi...
true
0abb247182d6901c27f9709006915a160eb0d5cb
SQL
harshit1698/Event-Management-System
/ems/db/ems_new.sql
UTF-8
4,463
2.859375
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.2.11 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: Apr 05, 2019 at 08:26 PM -- Server version: 5.6.21 -- PHP Version: 5.5.19 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;...
true
ac81c22db9407b03e6ddc9bda1f161525bf04630
SQL
dennisfrey/bootcamp-dev
/bc_dev_selects.sql
UTF-8
224
2.625
3
[]
no_license
select * from developer; Select * from developer WHERE role = 'Developer 4'; select * from developer order by last_name; select * from developer order by salary desc; select * from developer where first_name like ('S%');
true
f872e5a28e0c98f9c571997582f50d929e153656
SQL
Jonas-Heuberger/Modul-105
/Cheatsheet.sql
UTF-8
7,176
3.71875
4
[]
no_license
Data Definition Language DDL Datenbank anlegen CREATE DATABASE [IF NOT EXISTS] db_name; Datenbank verwenden USE db_name; //Datenbank löschen DROP DATABASE [IF EXISTS] db_name; Bestehende Datenbanken anzeigen SHOW DATABASES; Tabelle anlegen CREATE TABLE [IF NOT EXISTS] tbl_name (create_definition,...) ; CREATE De...
true
d55b4e4c8f04c5b855852d582d5d4fe0a2c7b829
SQL
Art1-1/EgzaminasZP-20
/lenteliu_kurimas_u2.sql
UTF-8
4,339
2.78125
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 5.1.0 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Jun 22, 2021 at 12:38 PM -- Server version: 10.4.18-MariaDB -- PHP Version: 7.4.16 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIE...
true
58bbf30c2bc7f6fe4a97afcec5189aad140bdd92
SQL
liuzhengyi/gh
/docs/db/reset_table_adpage.sql
UTF-8
812
3.265625
3
[]
no_license
DROP TABLE IF EXISTS `imgad`; CREATE TABLE `imgad` ( -- 图片广告 imgad_id INT UNSIGNED AUTO_INCREMENT NOT NULL, -- 图片广告ID user_id INT NOT NULL, -- 操作者 imgad_title VARCHAR(300) NOT NULL, -- 图片广告名称 img_url VARCHAR(200) NOT NULL, -- 图片U...
true
3b02b3fc9fb6f86c0d91293759bf84e120e0ec4e
SQL
babergma/module3
/module-2/05_Database_Design/exercise-student/eventDB.sql
UTF-8
3,318
3.984375
4
[]
no_license
BEGIN TRANSACTION; DROP TABLE IF EXISTS member_info, interest_group, member_group, event, member_event CASCADE; CREATE TABLE member_info ( member_id serial, last_name varchar(64) not null, first_name varchar(64) not null, email varchar(200), phone_number varchar(12) null, ...
true
96287652061409bcb750d798a4bf0394652001b9
SQL
miderph/manage_system
/db/20151201/11_create.or.replace.proc_import_sales_delete_deal.sql
GB18030
2,599
3.265625
3
[]
no_license
create or replace procedure proc_import_sales_delete_deal( p_providerId in integer , p_prepareStatus in integer, p_doingStatus integer , updateCount out integer) is --v_sql varchar(1024); --v_url_field varchar(50); begin --ģֻ޸ʱupdate_status update zl_cont set update_status=-1 where status=10 and lo...
true
802f4691feba1ae4238748ec20089bc3d028edb6
SQL
SirSaunders/DataWarehousing-
/ETL_Group/ridwan_transation_to_inventory_fact.sql
UTF-8
1,917
3.8125
4
[]
no_license
drop procedure if exists load_foo_test_data; delimiter # create procedure load_foo_test_data() begin declare v_max int unsigned default (select count(*) from product_dimension); declare v_counter int unsigned default 1; declare price_multiplier float unsigned default 1.2; declare store_key int ...
true
05fdda917eeb2a958c5dfd01802f944afe221b61
SQL
rangpunzel/dbSql
/js_home19_12_04.sql
UTF-8
1,096
4.09375
4
[]
no_license
--sub1 --평균 급여보다 높은 급여를 받는 직원의 수를 조회하세요. SELECT count(*) FROM emp WHERE sal > (SELECT AVG(sal) FROM emp); --sub2 --평균 급여보다 높은 급여를 받는 직원의 정보를 조회하세요. SELECT * FROM emp WHERE sal > (SELECT AVG(sal) FROM emp); ...
true
547c18f55ab622daaa97a276db2f7e0b3fe61417
SQL
walkerka/MyImage
/doc.sql
UTF-8
350
2.734375
3
[]
no_license
CREATE TABLE book ( id integer primary key autoincrement, name text, keywords text, createDate datetime, homePageId integer ); CREATE TABLE image ( id integer primary key autoincrement, width integer, height integer, name text, imageData blob ); CREATE TABLE bookPage ( bookId integer not null, pageId integer not null...
true
6ada264bc01458004a165bfa3f9cd676837ec7f0
SQL
ahmedkhaeld/PostgreSQL
/Advanced SQL/RollUp.sql
UTF-8
2,707
4.5
4
[]
no_license
/* we have a select, and what we are selecting is extraction of the year, month, day, and sum of orderline quantity how much was sold on the year, month, and days available, but the interesting part is what if i wanted to know, how much did i sell on each day, and then how much did i sell on each month, and then how m...
true
2c15b752052e67a6d1add8d1d8b2761ee412f89f
SQL
rwynne/nlmlegacymeme
/MEME/src/sql/ems/rxnormqa-14.sql
UTF-8
1,497
3.65625
4
[]
no_license
# 14. Ingredient concepts participating in a split where the # 'ingredient_of' relationships were inserted before the # split took place. Editors should make sure that the # splits were correct and then edit the concepts in #4. (SELECT concept_id_2 as concept_id_1, target_id as concept_id_2 FROM molecula...
true
1054172f4e2029c26eeb6315315ef53788977c9d
SQL
ohmu/poni
/examples/db-cluster/tables.sql
UTF-8
424
2.859375
3
[ "Apache-2.0", "MIT" ]
permissive
-- id: $node.name -- this is db node $node.index and there are $system.sub_count nodes. -- the system has $system.shards shards, so... #set $start = $node.index * $system.shards / $system.sub_count #set $end = ($node.index + 1) * $system.shards / $system.sub_count -- I should be handling shards from $start to $end-1. ...
true
5c8f75298918a60b691ba86f11091c4d04f18d3b
SQL
anak10thn/bbm-forensic.ign
/sql/users.sql
UTF-8
1,067
3.890625
4
[]
no_license
select users.*,con.PersonalMessage from users left join Contacts as con on con.UserId = users.UserId; select TextMessages.*,owner.DisplayName as owner,participant.DisplayName as participant,recive.DisplayName as recivient, Conversations.OwnerId,Participants.UserId as username from TextMessages left join Participants o...
true
83ffaddc7dbb936c52aa4f4137385c4ec04bf76f
SQL
sawendel/ssascams
/sscams-docker/gophish/db/db_sqlite3/migrations/20180527213648_0.7.0_store_email_request.sql
UTF-8
530
2.625
3
[ "Apache-2.0", "AGPL-3.0-only", "AGPL-3.0-or-later", "LicenseRef-scancode-other-permissive", "MIT", "LicenseRef-scancode-free-unknown" ]
permissive
-- +goose Up -- SQL in section 'Up' is executed when this migration is applied CREATE TABLE IF NOT EXISTS "email_requests" ( "id" integer primary key autoincrement, "user_id" integer, "template_id" integer, "page_id" integer, "first_name" varchar(255), "last_name" varchar(255), "email" varc...
true
278f3c0deb6440f1404972f145f958035d903381
SQL
mejowers/sql-instruction
/MySQL/BMDB/bmdb-movies-queries-2.sql
UTF-8
168
2.796875
3
[]
no_license
-- using an alias select mov.title, mov.year, mov.rating from movie as mov; -- using an alias, no 'as' keyword select m.title, m.year, m.rating from movie m;
true
ec7c36bdac11006589a58621ece0e572e4045bc2
SQL
jason2918/MockServer
/sql/vip_mock.sql
GB18030
2,087
3.359375
3
[]
no_license
-- Ϣ create table department_info ( id bigint(20) not null AUTO_INCREMENT, depart_name varchar(32) not null default '' comment '', parent tinyint not null default 0 comment 'ID,Ϊ0', is_bottom tinyint not null default 0 comment 'Ƿײ㼶,ĬΪ', is_delete tinyint not null default 0 comment 'Ƿɾ', create_time datetime defa...
true
caef3c37bbb081c00f4019d9f5a96f191ff4370f
SQL
live0717/egg-nideshop
/sql/ads/create_ads.sql
UTF-8
752
2.734375
3
[]
no_license
DROP TABLE IF EXISTS `nideshop_ads`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `nideshop_ads` ( `id` smallint(5) unsigned NOT NULL AUTO_INCREMENT, `ad_position_id` smallint(5) unsigned NOT NULL DEFAULT '0', `media_type` tinyint(3) unsi...
true
0105e3e6f33d4ccea5d3f397673e02dc34262121
SQL
ahriley/gjoll-ngc3201
/data/gaia-queries/ngc3201.sql
UTF-8
209
2.59375
3
[ "MIT" ]
permissive
SELECT source_id, ra, dec, phot_g_mean_mag AS g, bp_rp FROM gaiadr2.gaia_source WHERE 1=CONTAINS( POINT('ICRS',ra,dec), CIRCLE('ICRS',154.403,-46.412, 1)) AND phot_g_mean_mag>=10.8 AND phot_g_mean_mag<=20
true
cc8f535896ccab29ea7f4b3c0e0b422b25dea84a
SQL
vitoriasilva98/Agro-Cane-BandTec
/Sprint1/BD/banco_de_Dados/bd_agro.sql
UTF-8
1,339
3.09375
3
[]
no_license
create database Agrocane; use Agrocane; create table produtor ( Pais varchar (40) primary key, ProduçaoTonelada float, AreaHA float, Produtividade float ); insert into produtor values ('Brasil',719.157, 9.081, 79.1), ('India', 277.750, 4200, 66.1), ('China',111.454, 1695, 657 ); create table ultimas_safras ( id...
true
fb6e5484dd4fe97dd58f35d26e367af2b63dd8ef
SQL
tyap/scripts
/host_highest_hits.sql
UTF-8
440
3.859375
4
[]
no_license
--Select app servers and times with the highest number of requests per minute in descenting order. -- select c.name, to_date ('1970-01-01' , 'YYYY-MM-DD') + numtodsinterval (a.clock,'SECOND' ) time, max(a.value_max) from trends_uint a, items b, hosts c where a.itemid=b.itemid and b.TEMPLATEID = 46489 and b.hostid =...
true
9cbd53caa451534491bcb338334ee3606294531a
SQL
ortegajohn/iStock
/database/create_table.sql
UTF-8
522
3.28125
3
[]
no_license
CREATE DATABASE IF NOT EXISTS users CHARACTER SET utf8 COLLATE utf8_unicode_ci; /* Using DB */ USE users /* Creating Table users with the encoding utf8 */ CREATE TABLE IF NOT EXISTS iStock_users( id INT(5) AUTO_INCREMENT NOT NULL, first_name VARCHAR(100) NOT NULL, last_name VARCHAR...
true
56f6dbb7da3dad7a656f80ef32908e13b49fe916
SQL
gabriel-hurtado/Video_Games
/mysql/table-order.sql
UTF-8
273
3.4375
3
[]
no_license
CREATE TABLE orders ( id INTEGER NOT NULL AUTO_INCREMENT, #pkey uuid date DATE, total FLOAT(10,2), # up to 2 decimal and total of 10 digits client INTEGER NOT NULL references client(id) , #fkey address INTEGER NOT NULL references address(id), #fkey PRIMARY KEY(id) );
true
957aa7033563d1b25ef0350e55f879b3b1d12d93
SQL
ProjetosDeBD-2018-2/tce-pe
/scripts/criarBase.sql
UTF-8
3,216
3.546875
4
[ "MIT" ]
permissive
-- MySQL Workbench Forward Engineering SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0; SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0; SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='TRADITIONAL,ALLOW_INVALID_DATES'; -- ----------------------------------------------------- -- Schema tce-razoa...
true
ed9b5a416039a15bf41faebfce46f19f4bada46d
SQL
sushreesmitad/TEST
/back.sql
UTF-8
3,171
3.15625
3
[]
no_license
-- -- PostgreSQL database dump -- 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; -- -- Name: myschema; Type: SCHEMA; Schema: -; Owner: postgres -- CREATE SCHEMA myschema; ALTE...
true
636028eddc249c0f0067fc15fc9b5706da910cd4
SQL
Zemental/AdminInventory
/models/backups/inventory (09.06.16).sql
UTF-8
10,268
3.765625
4
[]
no_license
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; CREATE DATABASE IF NOT EXISTS `inventory` DEFAULT CHARACTER SET latin1 COLLATE latin1_swedish_ci; USE `inventory`; DELIMITER $$ CREATE DEFINER=`root`@`localhost` PROCEDURE `sp_control_celular`(IN `opcion` VARCHAR(65), IN `codigo` INT, IN `imei` VARCHAR...
true
bc699d0c42d42708dbbd3eb2278676909af438bc
SQL
maxinhui/wechat
/wechat-db/wechat.sql
UTF-8
2,439
3.265625
3
[]
no_license
/* Navicat MySQL Data Transfer Source Server : localhost_3306 Source Server Version : 50611 Source Host : localhost:3306 Source Database : wechat Target Server Type : MYSQL Target Server Version : 50611 File Encoding : 65001 Date: 2016-12-28 15:59:38 */ SET FOREIGN_KEY_CHECKS=0; ...
true
c8c61e7f95af024a56fb61d4aa0ad2d028bb8f44
SQL
vadv/pg_gatherer
/plugins/activity/activity_10.sql
UTF-8
1,090
3.09375
3
[ "BSD-3-Clause" ]
permissive
select extract(epoch from now())::int - (extract(epoch from now())::int % $1), jsonb_build_object( 'sql_id', md5(query)::UUID, 'query_id', md5(query || query_start::text)::UUID, 'datname', datname::text, 'pid', pid, 'username', usename, 'application_name', applica...
true
bf51b15ac374f3614b76c2cf5b627afe4586fb77
SQL
boeserDunklerMann/DA.Health
/sql/0002_SP_Gewicht.sql
UTF-8
1,095
3.625
4
[]
no_license
use Health; delimiter // drop procedure if exists sp_GetGewichts// CREATE PROCEDURE sp_GetGewichts(in MandantID int) BEGIN select * from Gewicht where Gewicht.MandantID=MandantID; END// drop procedure if exists sp_GetGewicht// CREATE PROCEDURE sp_GetGewicht(in GewichtID int) BEGIN select * from Gewicht where ...
true
d7db893dcdccb8b53dac7a4179810c978c2ac251
SQL
859162000/cbms
/platform/order/persist/sql/versions/1.1/pro/db_init/20150927.sql
UTF-8
661
2.65625
3
[]
no_license
-- ---------------------------- -- Describe: 增加发票税率配置 -- Author: zhoukun -- Date: 2015-09-17 10:20:18 -- ---------------------------- INSERT INTO base_sys_setting (setting_type,setting_name,setting_value,default_value,description,display_name,sequence, created,created_by,last_updated,last_updated_by,modification_numbe...
true
3d52462f978f314e2a617f94a705ac9e74f56220
SQL
pmosoft/spark_scala
/eos/03.개발/2D분석/04. RSRP.sql
UHC
4,978
3.59375
4
[]
no_license
-------------------------------------------------------------------------------------------------------------------------- -- RSRP -- -- NOTE. ENB_ID, CELL_ID RU BIN RSRPPilot ջѰ RSRP. -- -- -------------------------------------------------------------------------------------------------------------------------...
true
5a56e5d74563bdc8a2a9c863031b61a35f2d9136
SQL
soon14/parking-cloud-dev
/parking-cloud-core/database/userAuthorization/create_yxy_role_permission.sql
UTF-8
322
2.859375
3
[]
no_license
/** 角色权限关系表 **/ drop table if exists yxy_role_permission; create table yxy_role_permission( id bigserial primary key, role_id bigint not null, permission_id bigint not null, created_at timestamp, updated_at timestamp, created_by bigint, updated_by bigint, unique(role_id, permission_id) );
true
59d5ae15d01a92ddc6860cd943b6aab6b4eb290c
SQL
oradrs/tpt-oracle
/ti.sql
UTF-8
1,257
2.65625
3
[ "Apache-2.0" ]
permissive
-- Copyright 2018 Tanel Poder. All rights reserved. More info at http://tanelpoder.com -- Licensed under the Apache License, Version 2.0. See LICENSE.txt for terms & conditions. @@saveset column _ti_sequence noprint new_value _ti_sequence set feedback off heading off select trim(to_char( &_ti_sequence + 1 , '0999' ...
true
56dc6e1bcc15af5fbf7168413c895f5b285d9245
SQL
chinyukill/servlet3
/src/city.sql
UTF-8
24,670
2.78125
3
[]
no_license
/* Navicat Premium Data Transfer Source Server : MySQL Source Server Type : MySQL Source Server Version : 50525 Source Host : localhost:3306 Source Schema : chenxue Target Server Type : MySQL Target Server Version : 50525 File Encoding : 65001 Date: 24/1...
true
7521e1a012fb6941a045c04efe44bd79ecacf369
SQL
taomee517/spring-boot-vertx
/spring-vertx-demo/src/main/resources/sql/demo.sql
UTF-8
830
2.984375
3
[]
no_license
/* Navicat MySQL Data Transfer Source Server : local Source Server Version : 50729 Source Host : localhost:3306 Source Database : demo Target Server Type : MYSQL Target Server Version : 50729 File Encoding : 65001 Date: 2020-04-12 15:26:57 */ SET FOREIGN_KEY_CHECKS=0; -- --------...
true
3c850e8a185b1b4a4d8024a9110b70dcd55ffaa9
SQL
dimitarminchev/ITCareer
/06. Бази данни/08. Exam Preparation/Buhtig Source Control/Query6.sql
UTF-8
741
3.875
4
[ "CC-BY-NC-4.0", "CC-BY-NC-SA-4.0" ]
permissive
/* 06. Хранилището с най-много участници Извличане от базата данни, най-доброто хранилище от гледна точка на броя на участниците в него. Ако две хранилища имат еднакъв брой участници, подрдете ги във възходящ ред по id на хранилището. */ SELECT r.id, r.`name`, ( SELECT COUNT(c.id) FROM commits AS c WHERE c...
true
9b15304845d45e456bf5bee0711b14ba449df20c
SQL
mohitbansal964/JavaFirstProject
/PJP1/Week2Assignment/PostgreSQL/EFSDDL.SQL
UTF-8
832
3.34375
3
[]
no_license
DROP DATABASE EFS_DB; CREATE DATABASE EFS_DB; USE EFS_DB; create table MODULES ( modulecode char(5) primary key, modulename varchar(50), duration int ); create table courses ( coursecode int primary key, title varchar(50), fees int); create table courseandmodules ( coursecode int , modulecode char(5) , ...
true
18bfec78769810df1601cda62aa6383faf4df1c2
SQL
az5527529/signupSystem
/sql/ddl.05.新增报名信息识别单表.sql
UTF-8
520
2.890625
3
[]
no_license
CREATE TABLE `identify_order` ( `identify_order_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键', `activity_id` bigint(20) NOT NULL default 0 COMMENT '活动id', `openid` varchar(64) NOT NULL DEFAULT '' COMMENT '微信id', `identify_no` varchar(32) NOT NULL DEFAULT '' COMMENT '识别号', PRIMARY KEY (`identify_order...
true
71eeac162b967c79e164a8b04eae94527863cca2
SQL
MarcSechet/good-smash
/goodsmash-persist/src/main/resources/db/migration/V1_4__modify_information.sql
UTF-8
292
2.609375
3
[ "Apache-2.0" ]
permissive
alter table information drop column target_id; alter table information add column target_id bigint; alter table information add constraint uk_1 unique (description, information_type, target_id); alter table information add constraint uk_2 unique (character_id,description, information_type);
true
82b57081cfd32cdf4d36f83d297ebda18417a4a4
SQL
zariuyengco/WebTek-Finals-2018
/Client/ClientReserveDBConnection/cargo_database.sql
UTF-8
10,846
3.234375
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.7.9 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1:3306 -- Generation Time: May 09, 2018 at 06:44 AM -- Server version: 5.7.21 -- PHP Version: 5.6.35 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CH...
true
a889e2b57320ddc5cdeb5a7c836995e913a8a880
SQL
vararucristian/microservices-CV
/create_employees_database/creare_baza_date.sql
UTF-8
1,591
3.8125
4
[]
no_license
create database if not exists employees; use employees; drop table if exists employees; create table employees ( CNP varchar(15) not null unique, firstName varchar(25) not null, lastName varchar(50) not null, gendre varchar(10) not null, adress varchar(100), ID int primary key, salary int...
true
4651b7dbf0de51968601dd9b550ac888fcbc5831
SQL
VasuGoel/transact-sql
/Labs/lab08.sql
UTF-8
2,481
4.34375
4
[ "MIT" ]
permissive
-- Challenge 1: Retrieve Regional Sales Totals -- 1. Retrieve totals for country/region and state/province SELECT a.CountryRegion, a.StateProvince, SUM(soh.TotalDue) AS Revenue FROM SalesLT.Address AS a JOIN SalesLT.CustomerAddress AS ca ON a.AddressID = ca.AddressID JOIN SalesLT.Customer AS c ON ca.CustomerID = c.Cus...
true
f5765ea5f7b37d938b93359b65e7da27ef388c00
SQL
bogo410/Ksql
/select.sql
UTF-8
317
2.921875
3
[]
no_license
//select.sql CREATE DATABASE Spy; CREATE TABLE Prova (Try SMALLINT , Pry VARCHAR(10), Cry VARCHAR); INSERT INTO Prova (Try) VALUES (5); INSERT INTO Prova (Try,Pry) VALUES (7,'"ciao"'); UPDATE Prova SET Try = null WHERE Cry = null AND Try = '7'; SELECT * FROM Prova; UPDATE Prova SET Try = '20' , Pry = '"miao"';
true
b87973290feccffe1f51e35bcfc159a14b511504
SQL
niuniu617418/yd
/上线SQL脚本/V1.0.5/DDL/wuxianhao_DDL.sql
UTF-8
424
2.71875
3
[]
no_license
CREATE TABLE sd_trade.`trd_autoaudittask` ( `projectId` BIGINT(20) NOT NULL COMMENT '项目编号', `userId` BIGINT(20) NOT NULL COMMENT '用户编号', `status` TINYINT(1) NOT NULL COMMENT '任务状态 , 0.待处理 1.处理完成', `createTime` DATETIME NOT NULL COMMENT '创建时间', `updateTime` DATETIME NOT NULL COMMENT '更新时间', PRIMARY KEY (`pr...
true
81793d2a2fb9c7f547f09a4973514a499f526dcc
SQL
MichaelGFagan/baseball
/baseball-dbt/models/staging/lahman/stg_lahman__team_split_seasons.sql
UTF-8
527
3.203125
3
[]
no_license
with source as ( select * from {{ source('lahman', 'teams_half') }} ), transformed as ( select teamid as team_id , divid as division_id , lgid as league_id , cast(yearid as int64) as year_id , half as season_half , rank as position_in_standings , g as games ...
true
7f6d6636bf73bf9b802989fe8380b1712adddfe3
SQL
Slon09/BD_Projekt
/warehouse.sql
ISO-8859-2
7,186
4.15625
4
[]
no_license
DROP TABLE "WH_Employees" CASCADE CONSTRAINTS; DROP TABLE "WH_Ordered_products" CASCADE CONSTRAINTS; DROP TABLE "WH_Orders" CASCADE CONSTRAINTS; DROP TABLE "WH_Products" CASCADE CONSTRAINTS; DROP TABLE "WH_Shops" CASCADE CONSTRAINTS; DROP VIEW WH_OrderView; DROP TABLE "WH_Logs"; create table "WH_Employees" ( ...
true
725a379b7debd14175a0f7e87829e65a91731476
SQL
cray992/alltheThings
/SQL/old_VersionControl_Stuff/Historical Migration Scripts/20120511_Release/Customer/4490_deleteDuplicatePolicies.sql
UTF-8
1,479
3.5625
4
[]
no_license
------------------------------------------------------ -- !! THIS SHOULD ONLY BE APPLIED TO CUSTOMER 9136 !! ------------------------------------------------------ IF dbo.fn_GetCustomerID() = 9136 BEGIN -- Use active insurance policy UPDATE BE SET BE.PayerInsurancePolicyID = IP2.InsurancePolicyID FROM d...
true
91d90595a64c63828eef8a793524cd441fe4623a
SQL
tanchyk/todots
/server/database.sql
UTF-8
339
3.390625
3
[]
no_license
CREATE DATABASE todo_database; CREATE TABLE users( user_id SERIAL, email VARCHAR(30) NOT NULL UNIQUE, password VARCHAR(100) NOT NULL, PRIMARY KEY(user_id) ); CREATE TABLE todo( todo_id SERIAL, user_id INTEGER, complete BOOL DEFAULT false, description VARCHAR(255), PRIMARY KEY(todo_id), FOREIGN KEY (user_id) REFERENCE...
true
3afee67ec6ed820115878cb797e5ce6ae502ad99
SQL
SnoWhite93/BankingApplication
/bapp/src/main/resources/tableQuerries.sql
UTF-8
1,263
3.625
4
[]
no_license
drop table if EXISTS bank_users create table bank_users ( user_id serial primary key, username varchar(50) not null, pass varchar(50) not null, first_name varchar(50) not null, last_name varchar(50) not null, phone_number varchar(20) not null, email varch...
true
08acab097019c6c3aed08d4864e53babf7fa54af
SQL
zzangu0215/classactivities
/Unit12/unit_12_day_1_activities/02-FavoriteDB-NoData/Unsolved/favorite_db_unsolved.sql
UTF-8
2,308
4.09375
4
[]
no_license
DROP DATABASE IF EXISTS favorite_db; -- Creates the "favorite_db" database -- CREATE DATABASE favorite_db; -- Make it so all of the following code will affect favorite_db -- use favorite_db; -- Creates the table "favorite_foods" within favorite_db -- CREATE TABLE favorite_foods ( -- Make a string column called "food"...
true