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
148cc50552349547814be44fd3faa0864c7ed5b8
SQL
winixt/apollo-server-example
/__test__/db.sql
UTF-8
4,019
3.40625
3
[]
no_license
#留言 CREATE TABLE `comment` ( `id` int(11) unsigned NOT NULL AUTO_INCREMENT, `uid` varchar(15) NOT NULL DEFAULT '', `sid` varchar(15) NOT NULL DEFAULT '', `message` varchar(400) NOT NULL, `ctime` bigint(15) DEFAULT NULL, PRIMARY KEY (`id`), KEY `uid` (`uid`), KEY `sid` (`sid`) ) ENGINE=InnoDB AUTO_INCREM...
true
0a23ef01e07d4f9bd1eefc645341b7e99a8a62d9
SQL
kkants/simpleOlxCRUD
/db.sql
UTF-8
527
3.5
4
[]
no_license
-- CREATE TABLE users -- ( -- id INT NOT NULL AUTO_INCREMENT, -- username VARCHAR(225) UNIQUE NOT NULL, -- password VARCHAR(255) NOT NULL, -- email VARCHAR(255) UNIQUE NOT NULL, -- PRIMARY KEY(id) -- ); -- CREATE TABLE items -- ( -- id INT NOT NULL AUTO_INCREMENT, -- created_at INT NOT NULL, ...
true
1ffc5602dd113284518b41cc5c86641f5916cc47
SQL
Tusnakis/ApiComunio
/comunio.sql
UTF-8
554
3.109375
3
[]
no_license
create table jugadores ( id int(10) not null, nombre varchar(30) not null, puntos int(3) not null, clubid int(10) not null, valor int(8) not null, situacion varchar(15) not null, situacion_info varchar(50), posicion varchar(15) not null, partidos_jugados int(2) not null, constraint pk_jugadores pr...
true
f15b84fb24c47d9979849fbf3f9a0fe9a2a31b54
SQL
lutece-platform/lutece-extends-module-extend-opengraph
/src/sql/plugins/extend/modules/opengraph/plugin/create_db_extend_opengraph.sql
UTF-8
516
2.765625
3
[]
no_license
DROP TABLE IF EXISTS extend_opengraph_socialhub; CREATE TABLE extend_opengraph_socialhub ( opengraph_socialhub_id INT NOT NULL, name VARCHAR(255) DEFAULT '' NOT NULL, content_header LONG VARCHAR NULL, content_body LONG VARCHAR NOT NULL, content_footer LONG VARCHAR NULL, PRIMARY KEY (opengraph_socialhub_id)...
true
1e2124a509a50be2072eae60dbde93e3c374afee
SQL
arunverma2098/5xProject
/TOTAL_STATS.sql
UTF-8
734
3.109375
3
[]
no_license
CREATE OR REPLACE VIEW TOTAL_STATS AS ( SELECT CAST(DATE AS date) AS DATE, YEAR(CAST(DATE AS date)) AS YEAR, MONTHNAME(CAST(DATE AS date)) AS MONTH, LOCATION_ISO_CODE, LOCATION, TOTAL_RECOVERED, TOTAL_CASES_PER_MILLION, TOTAL_RURAL_VILLAGES, TOTAL_REGENCIES, TOTAL_ACTIVE_CASES, TOTAL_CITIES, TOTAL_DISTRICT...
true
e70ad03705d10c957977f47348eb6b5dce089c49
SQL
rbkmoney/webhook-dispatcher
/src/main/resources/db/migration/V1__Create_scheme.sql
UTF-8
276
2.859375
3
[ "Apache-2.0" ]
permissive
create schema if not exists wb_dispatch; CREATE TABLE wb_dispatch.commit_log ( id character varying(64) NOT NULL, creation_time TIMESTAMP WITHOUT TIME ZONE NOT NULL DEFAULT (now() at time zone 'utc'), CONSTRAINT pk_commit_log PRIMARY KEY (id) );
true
1acc7afd1b9d041cbd68549ede990e09a219494c
SQL
DCWitchester/MentorBilling
/MentorBilling/Database/DatabaseStructure/MentorBilling.sql
UTF-8
79,879
3.375
3
[]
no_license
--Database Create Syntax CREATE DATABASE "MentorBilling" WITH TEMPLATE = template0 ENCODING = 'UTF8' LC_COLLATE = 'English_United States.1252' LC_CTYPE = 'English_United States.1252'; --Initial Database Presets SET statement_timeout = 0; SET lock_timeout = 0; SET idle_in_transaction_session_timeout = 0; SET client_enc...
true
da202021d1fc5f6562d57293c12435d95fcf9b1f
SQL
goryszewskig/pyTwitterCollector
/TwitterCollector.sql
UTF-8
2,012
3.765625
4
[]
no_license
CREATE TABLE users(user_id BIGINT(20) UNSIGNED, created_at DATETIME, PRIMARY KEY(user_id))ENGINE = InnoDB; CREATE TABLE user_info(user_id BIGINT(20) UNSIGNED, screen_name VARCHAR(25), name VARCHAR(200), followers int(10) unsigned, friends int(10) unsigned, description VARCHAR(350), image_u...
true
1d0c19314b8f7b79bee8a2d2f7e80346963276a7
SQL
CUBRID/cubrid-testcases
/medium/_01_fixed/cases/corr1.sql
UTF-8
621
3.1875
3
[ "BSD-3-Clause" ]
permissive
autocommit off; select shipment_id, y.product_code, to_location, original_loc from joe.shipment_c s, joe.product_c y where product= y and y.product_code in (select product.product_code from joe.inventory_c i1 where i1.location = s.original_loc ...
true
3bd8a776cc582f1832a07ff7bdeb5c3cbea23295
SQL
TomashenkoI/WebCamerasImagesSmsService
/src/main/resources/createTables.sql
UTF-8
266
3.453125
3
[]
no_license
create table cameras ( id serial primary key, address varchar(255) not null, ); create table images ( id serial primary key, camera_id int not null, path varchar(255) not null, date timestamp not null, foreign key (camera_id) references cameras(id) );
true
c7cde64c8ea7cb5bdac80f91c497094146b7359f
SQL
Majd20/Second-Task-Control-Panel-Web-Page-Summer-Internship
/motors_database.sql
UTF-8
4,356
3.0625
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.8.5 -- https://www.phpmyadmin.net/ -- -- Generation Time: Jun 26, 2021 at 05:45 PM -- Server version: 10.1.38-MariaDB -- PHP Version: 7.3.2 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIE...
true
db10e50aa93c73ddbeab6fab55a4b41be49403ee
SQL
pma-alpha-rho/pma-alpha-rho.github.io
/intranet/brotrak/common/authentication/setup.sql
UTF-8
2,292
3.015625
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 2.7.0-pl2 -- http://www.phpmyadmin.net -- -- Host: localhost -- Generation Time: Feb 23, 2010 at 01:30 PM -- Server version: 5.0.18 -- PHP Version: 5.1.2 -- -- Database: `brotrak` -- -- -------------------------------------------------------- -- -- Table structure for table `even...
true
6462b678a0aa097b19a68e70cf857e16a0cf7a83
SQL
rokhimatuszahro/pertemuan12
/db_perpus.sql
UTF-8
3,413
3.015625
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 5.0.4 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Waktu pembuatan: 22 Agu 2021 pada 17.35 -- Versi server: 10.4.17-MariaDB -- Versi PHP: 7.4.13 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@C...
true
b7d09ec5267623f8ebbb3322e5d4b114313c5422
SQL
flxw/dbs2
/4/pimpdb2.sql
UTF-8
5,048
3.390625
3
[]
no_license
-- optimize for query 1 RUNSTATS ON TABLE "DB2INST1"."LINEITEM" WITH DISTRIBUTION ON COLUMNS ( "L_SHIPDATE" NUM_FREQVALUES 15 NUM_QUANTILES 25 ) AND SAMPLED DETAILED INDEXES ALL ALLOW WRITE ACCESS; CREATE INDEX query1index ON LINEITEM(l_returnflag ASC,l_linestatus ASC); -- optimize for query 2 CREATE INDEX "DB2INST1"...
true
a18f67aef560ac46b046a965097349652defdb2c
SQL
vishalkaruparthi/healthsciences
/healthsciences_interships_2016-01-22.sql
UTF-8
5,307
3.71875
4
[]
no_license
# ************************************************************ # Sequel Pro SQL dump # Version 4499 # # http://www.sequelpro.com/ # https://github.com/sequelpro/sequelpro # # Host: 127.0.0.1 (MySQL 5.6.28) # Database: healthsciences_interships # Generation Time: 2016-01-22 04:59:35 +0000 # *****************************...
true
878b79e5a3d19adf4f7d584349daddccbc65cada
SQL
ashu23481785/Recommendation-System
/recommendations_imdb.sql
UTF-8
902
4.09375
4
[]
no_license
use movies_hive; create table good_imdb as select u.user as user_id,u.movie_id from user_rating_imdb u join ( select user,count(*) as cnt from user_rating_imdb group by user having count(*) > 5 ) gu on u.user = gu.user; use movies_hive; create table movies_recommendations_pre_imdb as select movie_id,pairMovieId,co...
true
18a4616c8c0accb689e14185bf00573874652e81
SQL
mattrivas/rentalcar
/archivosBD/sd2.sql
UTF-8
9,989
2.984375
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.6.6deb5 -- https://www.phpmyadmin.net/ -- -- Host: localhost:3306 -- Generation Time: Jun 01, 2018 at 11:29 AM -- Server version: 5.7.22-0ubuntu0.17.10.1-log -- PHP Version: 7.1.17-0ubuntu0.17.10.1 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD...
true
d0f68f1bc3a6186aa46c6b480c7aa3d84961015a
SQL
GSIL-Monitor/er
/db/sp/I_WMS_STOCKCHANGE_IN_HANDLE.sql
UTF-8
13,347
3.390625
3
[]
no_license
DROP PROCEDURE IF EXISTS `I_WMS_STOCKCHANGE_IN_HANDLE`; DELIMITER $$ CREATE PROCEDURE `I_WMS_STOCKCHANGE_IN_HANDLE`(IN `P_OrderNo` VARCHAR(50),INOUT `P_Code` INT, INOUT `P_ErrorMsg` VARCHAR(256)) SQL SECURITY INVOKER COMMENT '委外库存异动入库单回传处理' MAIN_LABEL:BEGIN DECLARE V_NOT_FOUND ,V_Count INT(4) DEFAUL...
true
c6c4edabd7ce7a71481247cf7d93093b651b4940
SQL
alesana-san/homework
/task2/task2.sql
UTF-8
511
2.671875
3
[]
no_license
declare l_commit_step constant number := 5; begin for i in 1 .. 23 loop savepoint step_start; begin update test set n = i-1 -- эквивалентно n-1 where n = i; insert into test_log values (i); exception when others...
true
448f2229c7b1b705c16e56ec9ab27658c5f86ab6
SQL
metabolism-of-cities/metabolism-of-cities-platform-v3
/load.sql
UTF-8
1,109
3.171875
3
[ "MIT" ]
permissive
UPDATE core_article SET introduction = '' WHERE id = 141; create sequence core_reference_tags_id_seq; SELECT setval('core_reference_tags_id_seq', (SELECT MAX(id) FROM core_reference_tags)+1); ALTER TABLE "core_reference_tags" ALTER "id" TYPE integer, ALTER "id" SET DEFAULT nextval('public.core_reference_tags_id_seq')...
true
eb5d9bab49839cc15840bc5ade4b9bff3af4d7a0
SQL
leoboyerbx/toodoo
/server/prisma/migrations/20210428141822_v2/migration.sql
UTF-8
208
2.609375
3
[]
no_license
-- AlterTable ALTER TABLE `Mission` ADD COLUMN `completeBy` INTEGER; -- AddForeignKey ALTER TABLE `Mission` ADD FOREIGN KEY (`completeBy`) REFERENCES `Player`(`id`) ON DELETE SET NULL ON UPDATE CASCADE;
true
6de4c847a80289d9c17077f13aaea2e8ae05c609
SQL
a-kelemen/alkfejl1
/src/main/resources/data.sql
UTF-8
1,379
2.828125
3
[]
no_license
/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ /** * Author: Mad * Created: Nov 4, 2018 */ insert into user (username, password, email_Address, enabled, role) values('user', '$...
true
04147115249befdeef752e34a0a1b09669ed83aa
SQL
FarhatJ/HackerRank
/SQL/TypeofTriangle.sql
UTF-8
708
4.28125
4
[]
no_license
-- Write a query identifying the type of each record in the TRIANGLES table using its three side lengths. Output one of the following statements for each record in the table: -- Not A Triangle: The given values of A, B, and C don't form a triangle. -- Equilateral: It's a triangle with sides of equal length. -- Isosce...
true
0e85324f3f8be844fd44e200056552aa3f1e7231
SQL
silence-do-good/stress-test-Postgres-and-MySQL
/dump/high/day11/select0452.sql
UTF-8
178
2.640625
3
[]
no_license
SELECT timeStamp, temperature FROM ThermometerOBSERVATION o WHERE timestamp>'2017-11-10T04:52:00Z' AND timestamp<'2017-11-11T04:52:00Z' AND temperature>=20 AND temperature<=80
true
e66779f77ff6dcadce00ce0ed6706bf3869d6a34
SQL
bitgittry/BaseCodeAnalysis
/trunk/dbv/stored_routines/PlayerUpdatePlayerStatus.sql
UTF-8
6,652
3.484375
3
[]
no_license
DROP procedure IF EXISTS `PlayerUpdatePlayerStatus`; DELIMITER $$ CREATE DEFINER=`bit8_admin`@`127.0.0.1` PROCEDURE `PlayerUpdatePlayerStatus`(clientID BIGINT) root: BEGIN DECLARE accountActivated TINYINT(1) DEFAULT 0; DECLARE isPlayAllowed TINYINT(1) DEFAULT 0; DECLARE isKYCChecked TINYINT(1) DEFAULT 0; DECLARE ...
true
858e4e4b7b460cfd65b7d2c9b1e06705da7c4654
SQL
Dongwook3/ChantryIslandWebsite
/db/db_chantryisland.sql
UTF-8
4,498
3.171875
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.5.5.1 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- 생성 시간: 17-03-04 00:20 -- 서버 버전: 5.7.11 -- PHP 버전: 5.6.19 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_...
true
1450b7005cebf3519fb6dd433beba8d4539d7b58
SQL
eduardoasdcosta/Database-Veterinary-Hospital
/Assignment 2/Code/Update4.sql
UTF-8
450
3.3125
3
[]
no_license
select code from diagnosis_code where name = 'kidney failure'; insert into diagnosis_code(code, name) values(6282, 'end-stage renal disease'); update consult_diagnosis as c set c.code = 6282 where exists( select * from produced_indicator as pi where pi.name = c.name and pi.VAT_owner = c.VAT_owner and pi.d...
true
b2e321bbbb2a028bfe55afb4f19d8ef5426f88f3
SQL
SamSirsikar/UserRegistration
/user_freecharge.sql
UTF-8
1,252
2.71875
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 3.4.5deb1 -- http://www.phpmyadmin.net -- -- Host: localhost -- Generation Time: Aug 18, 2013 at 05:40 PM -- Server version: 5.1.69 -- PHP Version: 5.3.6-13ubuntu3.10 SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_S...
true
e020c70d386a68870763cdf2256b4dd200d19d69
SQL
naggenius/BIP
/BIP_App-master/UX/source/plsql/cligcont.sql
ISO-8859-1
96,040
2.890625
3
[]
no_license
-- ************************************************************************* -- pack_LigCont PL/SQL -- ************************************************************************* -- equipe SOPRA -- -- cre le 18/11/1999 -- Gestion de lignes de contrat -- Procedures : -- 1. ctrl_RglGestion : Verifie les regles de gestio...
true
855c293a8fd59187e270ccd667336e6b22a87afb
SQL
200427-Revature-Training/Keith_Salzman_t1
/Tier3_ProblemSet_CandD_Scripts.sql
UTF-8
1,300
3.875
4
[]
no_license
CREATE TABLE app_user ( user_id INT GENERATED ALWAYS AS IDENTITY PRIMARY KEY, role_id INT REFERENCES user_role (role_id) NOT NULL, username VARCHAR UNIQUE NOT NULL, password VARCHAR NOT NULL, first_name VARCHAR NOT NULL, last_name VARCHAR NOT NULL ); CREATE TABLE user_role ( role_id INT GENERATED ALWAYS AS IDENTITY PR...
true
ac643f5dfc27f4d73d8109739bee3d04d345e015
SQL
victorzh999/Exercise4a
/assignment1_java.sql
UTF-8
11,684
4.03125
4
[]
no_license
drop database if exists sampledb; create database if not exists sampledb; use sampledb; create table user( userID int not null auto_increment, userName varchar(20) not null, password varchar(50) not null, firstName varchar(50) not null, lastName varchar(50) not null, email varchar(100) not null, gender varchar(20), a...
true
5368ad8c20244903cc0de8e6bd320acad9f06153
SQL
spingcode/spring-mybatis-study
/src/item.sql
UTF-8
386
2.78125
3
[]
no_license
CREATE TABLE `user` ( `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键' , `name` char(20) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '用户姓名' , `mobile` char(11) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '电话' , PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARACTER SET=utf8 COLLATE=utf...
true
8140ee0d0f3152ffe5191240bbe086b790d71134
SQL
youkefan18/is_jsonb_valid
/sql/ref.sql
UTF-8
2,269
3.09375
3
[ "MIT" ]
permissive
-- root pointer ref -- match SELECT is_jsonb_valid('{"properties":{"foo":{"$ref":"#"}},"additionalProperties":false}', '{"foo":false}'); -- recursive match SELECT is_jsonb_valid('{"properties":{"foo":{"$ref":"#"}},"additionalProperties":false}', '{"foo":{"foo":false}}'); -- mismatch SELECT is_jsonb_valid('{"properties"...
true
12b3bed1fa37195626a43ec06d83ce1bbc3df8ed
SQL
locationguru-solutions/modern-sql
/top-n.sql
UTF-8
1,768
4.46875
4
[]
no_license
-- Top 3 oldest employees using LIMIT SELECT * FROM users u ORDER BY u.joining_date LIMIT 3; -- Top 3 newest employees using LIMIT SELECT * FROM users u ORDER BY u.joining_date DESC LIMIT 3; -- Top oldest male and female employees using LIMIT SELECT * FROM users u JOIN (SELECT u2.gender, min(u2.joining_date) joi...
true
1b02e6e4c2c5901627029dbc7a3eaf12d468e738
SQL
runei/Agenda
/agenda.sql
UTF-8
1,328
2.875
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 3.4.5 -- http://www.phpmyadmin.net -- -- Servidor: localhost -- Tempo de Geração: 20/04/2015 às 05h46min -- Versão do Servidor: 5.5.16 -- Versão do PHP: 5.3.8 SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIEN...
true
6eb40579f9f1742cc7d172b0398077e80a9dcfc7
SQL
arthurAddamsSiebert/cartridges
/core/release/lib/resources/core/dbinit/scripts/oracle/sp_deleteRegSettingsByDomain.sql
UTF-8
1,020
2.609375
3
[]
no_license
CREATE OR REPLACE PROCEDURE sp_deleteRegSettingsByDomain (domainID IN VARCHAR2) ------------------------------------------------------------------------------------------ -- Name : sp_deleteRegSettingsByDomain -- History : user date - desc -- : ... -- : Thomas Kober...
true
4c306f8489fa2b31cc37de59259f308316f70f5b
SQL
xp137221357/sql_personal_business
/sunguangqiang/推荐市场数据20170511/表4-月报.sql
UTF-8
3,138
3.625
4
[]
no_license
set @param0='2016-12-19'; set @param1 = '2016-12-25 23:59:59'; select '购买服务人数-金额', count(distinct ai.USER_ID) value1, sum(ai.CHANGE_VALUE) value2 from forum.t_acct_items ai where ai.ITEM_EVENT in ('BUY_SERVICE', 'BUY_RECOM') and ai.ITEM_STATUS = 10 and ai.ADD_TIME >= @param0 and ai.ADD_TIME < @pa...
true
e09dec5b580cba3a952e3abf94b859a7568b50f6
SQL
giang123b/quanlyktx
/src/main/java/com/ptit/phong/Create_table.sql
UTF-8
5,788
3.359375
3
[]
no_license
CREATE DATABASE IF NOT EXISTS `contactdb` /*!40100 DEFAULT CHARACTER SET latin1 */; USE `contactdb`; -- MySQL dump 10.13 Distrib 5.6.19, for osx10.7 (i386) -- -- Host: localhost Database: contactdb -- ------------------------------------------------------ -- Server version 5.7.20 /*!40101 SET @OLD_CHARACTER_SET_C...
true
490b635c0d65332e533739b2985546db4c0f0584
SQL
DanAkmens/project_site
/arlington_test.sql
UTF-8
9,672
3.03125
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.8.4 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Dec 19, 2018 at 02:33 AM -- Server version: 10.1.37-MariaDB -- PHP Version: 7.3.0 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD...
true
c696f404b80808a90a57262dfff5143d00407f9f
SQL
olive-asterisk/olive
/db_scripts/create.sql
UTF-8
10,239
3.640625
4
[ "BSD-3-Clause" ]
permissive
-- campaign.sql -- Created on: Aug 15, 2014 -- Author: pchero drop table if exists campaign; create table campaign( -- identity seq int(10) unsigned auto_increment, uuid varchar(255) unique, -- information detail varchar(1023), -- des...
true
ed80caef465af8bd301f95672ea4a97072c00a1f
SQL
ssivak0909/PhotoAppConfiguration
/mysql.sql
UTF-8
1,596
2.984375
3
[]
no_license
https://github.com/talk2amareswaran https://github.com/krish zsh: corrupt history file /home/george/.zsh_history To fix it run the following commands cd ~ mv .zsh_history .zsh_history_bad strings .zsh_history_bad > .zsh_history fc -R .zsh_history sudo mysql SELECT user,authentication_string,plugin,host FROM mysql.use...
true
d077a95507253369451f8ea5fdb4c019e4f95c4d
SQL
squesadav/proyecto2bd
/scripts/app_ad/triggers/picture_triggers.sql
UTF-8
625
3.203125
3
[]
no_license
DROP TRIGGER IF EXISTS `app_ad`.`picture_BEFORE_INSERT`; DELIMITER $$ USE `app_ad`$$ CREATE DEFINER = CURRENT_USER TRIGGER `app_ad`.`picture_BEFORE_INSERT` BEFORE INSERT ON `picture` FOR EACH ROW BEGIN SET NEW.creation_user = current_user(); SET NEW.creation_date = current_timestamp(); END$$ DELIMITER ; DROP TRIGGER...
true
a4bb03a8f43ce57e1f4742dcd70b883613a409b9
SQL
Ca-moes/BDAD
/Exames/2016/18.sql
UTF-8
286
3.5
4
[]
no_license
DROP VIEW IF EXISTS numAmigos; CREATE VIEW numAmigos AS SELECT ID, count(ID2) as num FROM Estudante, Amizade WHERE ID=ID1 GROUP BY ID1 ORDER BY num DESC; SELECT nome, anoCurricular FROM Estudante NATURAL JOIN numAmigos WHERE num = (SELECT max(num) FROM numAmigos);
true
828e34dcb1b7585867a015e7a8d64cabc09724ca
SQL
michaelin1208/FinalProject
/MySQL/biomaterial_spreadsheet.sql
UTF-8
892
2.734375
3
[]
no_license
DROP TABLE IF EXISTS `Biomaterial_Spreadsheet`; CREATE TABLE `Biomaterial_Spreadsheet` ( `biomaterial_spreadsheet_id` int(11) NOT NULL AUTO_INCREMENT, `spreadsheet_id` bigint NOT NULL, `acc_biomaterial_location_id` int(11) NOT NULL, `acc_biomaterial_id` int(11) NOT NULL, `ensat_id` int(11) NOT NULL, `center...
true
4fb7e6754e4b24a6359e984d556ba059cc72b0cc
SQL
hungpham89/HankerRankSQL
/Medium/The Report.sql
UTF-8
252
3.703125
4
[]
no_license
#When Joining table, we can use condition with <>, beside just = SELECT CASE WHEN Grade > 7 THEN Name ELSE Null END, Grade, Marks FROM students s JOIN Grades g ON s.marks between g.Min_mark and max_mark ORDER BY Grade DESC, Name, Marks ASC
true
87026c440a21964d0960f0408759ccbf7c3a79e8
SQL
felipesv/holbertonschool-higher_level_programming
/0x0E-SQL_more_queries/10-genre_id_by_show.sql
UTF-8
354
3.75
4
[]
no_license
-- Write a script that lists all shows contained -- in hbtn_0d_tvshows that have at least one genre linked. SELECT tv_shows.title, tv_show_genres.genre_id FROM tv_show_genres INNER JOIN tv_shows ON tv_shows.id = tv_show_genres.show_id INNER JOIN tv_genres ON tv_genres.id = tv_show_genres.genre_id ORDER BY tv_shows.ti...
true
f451b32ba2d31ea9190143866d4e7a831575ccc0
SQL
UNAH-IS/IS501-I2019
/UnidadII/Ejercicio7/Scripts/User.sql
UTF-8
552
3.171875
3
[]
no_license
--Crear nuevo usuario(esquema) con el password "PASSWORD" CREATE USER FACEBOOK IDENTIFIED BY "oracle" DEFAULT TABLESPACE USERS TEMPORARY TABLESPACE TEMP; --asignar cuota ilimitada al tablespace por defecto ALTER USER FACEBOOK QUOTA UNLIMITED ON USERS; --Asignar privilegios basicos GRANT create sessio...
true
21a8c9884eaed97035c6425d9f35804d29493480
SQL
zholey/ourp-core
/src/main/java/org/gridsofts/ourp/model/init-tables.sql
UTF-8
1,091
2.828125
3
[]
no_license
CREATE TABLE IF NOT EXISTS OURP_ORGANIZATION ( ORG_ID VARCHAR(32) NOT NULL, PRNT_ID VARCHAR(32), ORG_NAME VARCHAR(128), SHORT_NAME VARCHAR(64), ORG_NATURE VARCHAR(32), INTRODUCTION VARCHAR(512), ADDRESS VARCHAR(256), POSTCODE VARCHAR(8), CNTCT_PERSON VARCHAR(32), CNTCT_PHONE VAR...
true
0c2c228876bfd971737faf53c723e7d56e3ce9a6
SQL
supadhyaya/IB
/extract/votingExtract.sql
UTF-8
2,487
3.484375
3
[]
no_license
use socialvoyce; -- delimiter $$ -- CREATE DATABASE `socialvoyce` /*!40100 DEFAULT CHARACTER SET utf8mb4 */$$ drop table if exists initialMetric; create table initialMetric (strng LONGTEXT); LOAD DATA infile '/opt/database-migration/sourcefiles/metrics.txt' INTO TABLE initialMetric LINES TERMINATED BY '\n'; ...
true
0f9e6c697d4b3162e7b6e65eec25aa269b596503
SQL
FaithMandela/QuestionThree
/projects/domains/database/tamshidomain.sql
UTF-8
18,473
2.78125
3
[]
no_license
---Project Database File CREATE VIEW vw_address AS SELECT address_types.address_type_id, address_types.address_type_name, orgs.org_id, orgs.org_name, sys_countrys.sys_country_id, sys_countrys.sys_country_name, address.address_id, address.address_name, address.table_name, address.table_id, address.post_office_box, ad...
true
8cddbe7f80f10757e02d15439276d4bf0c41855f
SQL
kangxi11/CMPUT-291-MiscAssignments
/6.sql
UTF-8
543
3.703125
4
[]
no_license
.print Question 6 - rkang1 SELECT m.fname, m.lname FROM (SELECT m1.regdate AS regdate, m1.p2_fname AS fname, m1.p2_lname AS lname FROM marriages m1 WHERE m1.p1_fname = 'Michael' AND m1.p1_lname = 'Fox' UNION --union all partners if MF is partner 1 and if MF is partner 2 SELECT m2.regdat...
true
1d1c3fc8d8c4a877709ea22de76d252e93fe9148
SQL
andytanoko/4.2.x_integration
/GTAS/GridTalk/run/sqlscripts/app/channel/setup/create-tables.sql
UTF-8
3,996
3.25
3
[]
no_license
SET client_encoding = 'UTF8'; SET check_function_bodies = false; SET client_min_messages = warning; SET search_path = userdb; --- --- Table structure for table 'channel_info' --- DROP TABLE IF EXISTS "channel_info"; CREATE TABLE "channel_info" ( "UID" BIGINT DEFAULT 0 NOT NULL , "Name" VARCHAR(30) NOT NULL , "...
true
1b9591fd4a24dc15ddd0f84de6e202ec01913b20
SQL
niemdinhtrong/thuctapsinh
/DucNA/DBMS-SQL/docs/de thi/de6.txt
UTF-8
3,510
3.09375
3
[]
no_license
create database thuvien1; use thuvien1; create table bandoc ( mabd int primary key, tenbd varchar(20) not null, lop varchar (10) null, ngaycap datetime null ) create table sach ( masach int primary key, tensach varchar(20) null, tacgia varchar(20) null, namxb int null, nhaxb varchar(20) null, )...
true
18eb666a7ce722df95ac0290a4e08ba9a3015abb
SQL
thomasdebelder/UpToSpace
/databankImport/messages.sql
UTF-8
1,036
3.046875
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.7.3 -- https://www.phpmyadmin.net/ -- -- Host: localhost:8889 -- Gegenereerd op: 14 mei 2018 om 17:26 -- Serverversie: 5.6.35 -- PHP-versie: 7.1.8 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; -- -- Database: `space` -- -- --------------------------------------...
true
51973c2d8f1f583e6b2849efa0354f6688133dd7
SQL
qhou/fly-away
/Airport.sql
UTF-8
26,370
3.71875
4
[]
no_license
-- drop database if exists Airport; create database Airport; use Airport; -- -- Now, add each table. -- CREATE TABLE Customer ( CusID integer, CusName varchar(45), PhoneNum varchar(45), Mileage integer, primary key (CusID) ); CREATE TABLE Airlines( Abbreviation varchar(45), AirlineName v...
true
a340a1be149d61c45cf783ea475e1bbf697fe5ad
SQL
AlekseyTroshin/mysql
/home_work/4-003.sql
UTF-8
98
2.734375
3
[]
no_license
SELECT * FROM album WHERE band_id IN ( SELECT band_id FROM band WHERE name = 'Led Zeppelin' )
true
92c9d73a0f2adb3078865db7f5dd07ba6092fe8b
SQL
bhagyashree-rao/periodTracker
/databaseConnection/SPOT.sql
UTF-8
4,670
3.21875
3
[]
no_license
CREATE DATABASE IF NOT EXISTS `spot` /*!40100 DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci */ /*!80016 DEFAULT ENCRYPTION='N' */; USE `spot`; -- MySQL dump 10.13 Distrib 8.0.18, for Win64 (x86_64) -- -- Host: localhost Database: spot -- ------------------------------------------------------ -- Se...
true
1c49027d6efb209abc4f9887c5c8fe7c8682ec58
SQL
Josevd83/sitrascar
/BD/sitrascar_old.sql
UTF-8
29,120
3.203125
3
[ "BSD-3-Clause" ]
permissive
-- phpMyAdmin SQL Dump -- version 4.5.1 -- http://www.phpmyadmin.net -- -- Servidor: 127.0.0.1 -- Tiempo de generación: 01-06-2017 a las 20:53:48 -- Versión del servidor: 10.1.13-MariaDB -- Versión de PHP: 5.6.20 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT...
true
909766666f7626f10a49ba4885830751f7791443
SQL
blackhawk1990/Blackhawks-house
/_slider_slides.sql
UTF-8
1,556
3.015625
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.1.9 -- http://www.phpmyadmin.net -- -- Host: mysql.webio.pl:3306 -- Generation Time: May 18, 2014 at 05:08 AM -- Server version: 5.5.27-log -- PHP Version: 5.5.11 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_S...
true
3b95749c0282987a5b703b71c2172861885f84b9
SQL
rakhigupta3/Inventory-Managment
/Database/MedicineOrderDetail.sql
UTF-8
734
3.0625
3
[]
no_license
CREATE TABLE IF NOT EXISTS MedicineOrderDetail( OrderId INT AUTO_INCREMENT NOT NULL, OrderPrice FLOAT NOT NULL, DiscountFactor FLOAT DEFAULT 0, OrderTotalPrice FLOAT NOT NULL, CustomerName NVARCHAR(100), CustomerMobile NVARCHAR(10), PaymentMode NVARCHAR(100), PaymentStatus BIT, OrderStatusTypeId INT, BalanceAmount FL...
true
40e91d397b770bc8e4d3045ea951d22a0b0fc764
SQL
smponneeswaran/taiho_dev
/ccdm/global/layer5/siteresource.sql
UTF-8
1,257
3.9375
4
[]
no_license
/* CCDM SiteResource mapping Notes: Standard mapping to CCDM SiteResource table */ WITH included_sites AS ( SELECT DISTINCT studyid, siteid FROM site), siteresource_data AS ( SELECT null::text AS studyid, null::text AS siteid, null:...
true
dc3904fff128be49359467b6fc65ebd780a2fdad
SQL
appirio-tech/direct-app
/components/topcoder_cockpit_project_metadata_services/test_files/sql/schema.sql
UTF-8
4,868
3.953125
4
[]
no_license
DROP TABLE audit_action_type_lu; DROP TABLE tc_direct_project; DROP TABLE direct_project_metadata; DROP TABLE direct_project_metadata_predefined_value; DROP TABLE direct_project_metadata_key; DROP TABLE direct_project_metadata_audit; DROP TABLE direct_project_metadata_predefined_value_audit; DROP TABLE direct_project_m...
true
a6f69f4f30700b1c4ad4f17c20cc49c78b4d041b
SQL
WangYi0220/ly
/ly.sql
UTF-8
8,528
3.546875
4
[]
no_license
/* SQLyog Ultimate v12.09 (64 bit) MySQL - 5.5.61 : Database - ly_db ********************************************************************* */ /*!40101 SET NAMES utf8 */; /*!40101 SET SQL_MODE=''*/; /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; /*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@...
true
88c6cde8e14a0cb167d6331126bc03586d51f2fd
SQL
AMTECH-dev/shkar-dev
/springlearning/Igor/pet_clinic_public_owner.sql
UTF-8
529
3.03125
3
[]
no_license
create table owner ( id serial not null constraint owner_pk primary key, name varchar(30) default NULL::character varying, age integer, phone bigint constraint owner_phone_key unique ); alter table owner owner to shkar; INSERT INTO public.owner (id, na...
true
476c5276d048dfcf7d4eb2594faafa2090797289
SQL
alei76/taofuch
/shensi/language-model/src/main/resources/data/init/常用SQL.sql
UTF-8
198
3.109375
3
[]
no_license
-- 查看计算出的tf/idf的所有信息。 select ti.document_title,i.word,ti.tf,i.idf,ti.tf_idf from WORD_TF_IDF ti left join WORD_IDF i on i.rec_id = ti.word_id order by ti.rec_id;
true
54d8f170b15349b8b3caa44477730ea14cff22be
SQL
marvelalam/Salah
/telkom19jan.sql
UTF-8
15,765
3.078125
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.9.2 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Waktu pembuatan: 18 Jan 2020 pada 04.01 -- Versi server: 10.4.11-MariaDB -- Versi PHP: 7.4.1 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARA...
true
db05534d9adb4f95bc93e5d2bf68a0ca94488dec
SQL
kaczifant/HackerRank-Problems-In-SQL
/Easy/weather_observation_station_1.sql
UTF-8
186
2.609375
3
[]
no_license
/* https://www.hackerrank.com/challenges/weather-observation-station-1/problem?h_r=profile Query a list of CITY and STATE from the STATION table.*/ SELECT city, state FROM station;
true
c1b7808688dc8ab715dca1234e779c641910891a
SQL
jeffc00/data-nov19
/Week 1/PostgreSQL-Select/solutions.sql
UTF-8
1,390
4.375
4
[]
no_license
--challenge 1 select a.au_id as "AUTHOR ID", a.au_lname as "LAST NAME", a.au_fname as "FIRST NAME", t.title as "TITLE", p.pub_name as "PUBLISHER" from authors as a inner join titleauthor as ta on a.au_id = ta.au_id inner join titles as t on ta.title_id = t.title_id inner join publishers as p on t.pub_id = p.pub_id...
true
2ce27cb809f0ef61492453a247a0c8c37ef0466c
SQL
jaimeambrosio/Biblioteca
/src/java/scrip/DBBIBLIOTECA.sql
UTF-8
8,388
2.59375
3
[]
no_license
CREATE DATABASE IF NOT EXISTS `bibliotecadb` /*!40100 DEFAULT CHARACTER SET utf8 */; USE `bibliotecadb`; -- MySQL dump 10.13 Distrib 5.7.9, for Win64 (x86_64) -- -- Host: localhost Database: bibliotecadb -- ------------------------------------------------------ -- Server version 5.7.12-log /*!40101 SET @O...
true
3c00a98a6719307605c2b88c65494c1a56bc8603
SQL
claudiosandoval/Tienda-Online
/database/database.sql
UTF-8
2,248
3.421875
3
[]
no_license
CREATE DATABASE proyecto_tienda; USE proyecto_tienda; CREATE TABLE usuarios( id INT(255) AUTO_INCREMENT NOT NULL, nombre VARCHAR(100) NOT NULL, apellidos VARCHAR(255), email VARCHAR(255) NOT NULL, password VARCHAR(255) NOT NULL, rol VARCHAR(20) NOT NULL, imagen VARCHAR(255), CONST...
true
46b7ce7704d5ed85f9f981293e93a753d0cf83de
SQL
pragmasolutions/siga-proyect
/Base de datos/Script Deploy/20150318/03 - ADD Procedure ModificarEstadoPedido.sql
UTF-8
468
3.015625
3
[]
no_license
DELIMITER $$ USE `apipe2909`$$ DROP PROCEDURE IF EXISTS `ModificarEstadoPedido`$$ CREATE DEFINER=`apipe`@`%` PROCEDURE `ModificarEstadoPedido`(IN pedido INT(10),IN idCQV INT(10),IN estado VARCHAR(40)) BEGIN /* FALTA LA BITACORA CALL BitacoraPedidoInsert(pedido); CALL BitacoraInsert(pedido,(SELECT domicilio_id FRO...
true
2001b71a16247d6fd920f56a13b694cca450a174
SQL
nynonet/Java
/JavaAndroid/src/javaandroid/DAO/extra/BancoDeDados.sql
UTF-8
615
3.28125
3
[]
no_license
/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ /** * Author: Andeson * Created: 14/06/2016 */ create database contato; use contato; create table contato.contato( id int not...
true
ecee5f0fa1c7419e2dd223c9a45db566b76bdfa9
SQL
ericsonj/est4b1l1z4c1on
/workspace/SHEET8.sql
UTF-8
6,419
2.6875
3
[]
no_license
select * from desktop_inventory_partial_inventory where id in (17193,17195,17197,17198,17199,17200,17201,17202,17203,17204,17205,17206,17207,17208,17209,17210,17211,17212,17213,17214,17215,17216,17217,17218,17219,17220,17221,17222,17223,17224,17225,17226,17227,17228,17229,17230,17231,17232,17233,17305,17311,17328,17335...
true
50086c5afedf47dde435715b6aa607e76d8cfbd4
SQL
bels/pantry
/migrations/recipe.sql
UTF-8
473
3.578125
4
[ "BSD-3-Clause" ]
permissive
-- 1 up CREATE TABLE recipe( id INTEGER PRIMARY KEY AUTOINCREMENT, genesis TEXT NOT NULL DEFAULT CURRENT_TIMESTAMP, modified TEXT NOT NULL DEFAULT CURRENT_TIMESTAMP, name TEXT NOT NULL, description TEXT, active BOOLEAN NOT NULL CHECK (active IN (0,1)) DEFAULT 1 ); CREATE TABLE recipe_items( item INTEGER, reci...
true
966e21630467a3ac92b242af87cca48d95b82e95
SQL
silberov/inu-backend
/prisma/migrations/20210115143253_init/migration.sql
UTF-8
3,273
3.484375
3
[]
no_license
-- CreateTable CREATE TABLE `Users` ( `id` INT NOT NULL AUTO_INCREMENT, `name` VARCHAR(191) NOT NULL, `email` VARCHAR(191) NOT NULL, `password` VARCHAR(191) NOT NULL, `created_date` DATETIME(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3), `updated_date` DATETIME(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3...
true
d98ebb8804e3800ca16dc7c731eee8d6bd8a4487
SQL
akula-srinu/Customization_Test
/custom/NVWB_PA_User_Projects_Vsat_Base.sql
UTF-8
25,360
2.703125
3
[]
no_license
-- ******************************************************************************* -- FileName: NVWB_PA_User_Projects_Vsat_Base.sql -- -- Date Created: 2019/Aug/28 06:12:39 -- Created By: nemuser -- -- Source: -- - Package: Package_2018_P11_B1_DEV_NEW -- - Environment: EB...
true
2744bcf5329c687b255b8c05c55450f9055e5dd3
SQL
ssohyunKim/TIL
/SQL/String,Date/6.sql
UTF-8
236
3.34375
3
[]
no_license
-- 각 동물의 아이디와 이름, 들어온 날짜를 조회 -- 결과는 아이디 순으로 조회해야 합니다. SELECT ANIMAL_ID, NAME, DATE_FORMAT(DATETIME, '%Y-%m-%d') AS 날짜 FROM ANIMAL_INS WHERE 1=1 ORDER BY ANIMAL_ID
true
4223260acb2c1eaeaa6a9312d78fa9f3120e5347
SQL
samisnotinsane/Student-Assessment
/QUERY/subWithCw.sql
UTF-8
201
3.484375
3
[]
no_license
/* Subjects which have courseworks. Listed in alphabetical order. */ SELECT Name FROM Subject s WHERE EXISTS (SELECT * FROM Coursework c WHERE s.Subject_Id = c.Subject_Id) ORDER BY s.Name;
true
e7879aab6be4638c6cff1e6b91e888ab716df50d
SQL
jgarzonext/plsql-testing
/script_plsql/bd_iaxis/script/tables/CFG_ROL.sql
ISO-8859-1
2,225
2.703125
3
[]
no_license
-------------------------------------------------------- -- DDL for Table CFG_ROL -------------------------------------------------------- CREATE TABLE "AXIS"."CFG_ROL" ( "CROL" VARCHAR2(50 BYTE), "CEMPRES" NUMBER(2,0), "CCFGWIZ" VARCHAR2(50 BYTE), "CCFGFORM" VARCHAR2(50 BYTE), "CCFGACC" VARCHAR2(50 BYT...
true
ef5769f767042872df4a7b4e821e57d7e6438c3f
SQL
allmp13/IWSSQL
/mssql/Licences par Utilisateur.sql
UTF-8
855
3.328125
3
[]
no_license
SELECT F.L_FAMOBJ, T.L_TYPOBJ, C.L_REF, O.C_BARRE, OP.C_BARRE, OP.D_INVENT, S.L_FULLNAMESITE, S.C_SITEBARRE, SVC.L_FULLNAMESERVICE, SVC.C_SERVICE, U.N_UTIL, U.I_UTI_MATRICULERH, U.D_SORTIEUTIL FROM suiteisilog.OBJPEREFILS L INNER JOIN suiteisilog.OBJET O ON O.C_O...
true
dd8765a589cf57081be93b4ec5f8e1ebdc9292ee
SQL
Linocent/P6
/database.sql
UTF-8
3,646
3.84375
4
[]
no_license
CREATE TABLE utilisateur( nom varchar(255) NOT NULL, prenom varchar(255) NOT NULL, identifiant serial PRIMARY KEY ); CREATE TABLE caissier( identifiant SERIAL PRIMARY KEY, CONSTRAINT fk_numero_utilisateur FOREIGN KEY (identifiant) REFERENCES utilisateur(identifiant) ); CREATE TABLE l...
true
7b1c8feae649472e769bf60f82b7f120f98cd54a
SQL
chuongphan97/mSQL_AnalysisAndDesignDatabase
/Dump20210513.sql
UTF-8
8,520
3.390625
3
[]
no_license
-- MySQL dump 10.13 Distrib 8.0.24, for Win64 (x86_64) -- -- Host: localhost Database: analysis_and_design_database -- ------------------------------------------------------ -- Server version 8.0.24 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTE...
true
bbbec83f60c2a444eaa910d0d18f013442ea93f1
SQL
kodeschreiber/ITIS4155
/db/insertdata.sql
UTF-8
17,832
3.078125
3
[]
no_license
/* Add INSERT Statments HERE INSERT INTO bikes (name, descript, avgprice, url) VALUES ('', '', '', '') INSERT INTO tools (name, descript, avgprice, url) VALUES ('', '', '', '') INSERT INTO parts (name, descript, avgprice, url) VALUES ('', '', '', '') INSERT INTO regions (name, descript, diags, url) VALUES ('', '', '',...
true
0fc19156922b32824ceec2f09bc696414667e812
SQL
cosmic-cowboy/sql_head_academy
/chapter02/list_03_update.sql
UTF-8
1,184
3.78125
4
[]
no_license
-- 第2回 更新なんてこわくない! (2)行から列への更新 -- 3つの相関サブクエリを実行しなければならず,パフォーマンスに問題あり -- とりあえず student_idだけ登録 INSERT INTO ScoreCols (student_id) ( SELECT student_id FROM ScoreRows GROUP BY student_id ); -- 更新 UPDATE ScoreCols SET score_en = (SELECT score FROM ScoreRows WHERE student_id = ScoreCols.student_id AND subject = '英語'),...
true
f83dfb3c9c942c71880f18258b130631bfc29caf
SQL
ShahakBH/jazzino-master
/bi/bi-dbdw/src/main/resources/deltas/122.sql
UTF-8
2,947
3.671875
4
[]
no_license
drop table if exists registration_by_date_platform_game_type_source# create table registration_by_date_platform_game_type_source( date date not null, platform varchar(32) not null, game_type varchar(255) not null, source varchar(255) not null, num_players int not null, primary key(date, platfor...
true
18965c076c9980c59cf4508d09d05911b610febb
SQL
NuwanChaminda/EventPlanner
/sql file/eventplanner (5).sql
UTF-8
20,389
2.96875
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.5.1 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: Apr 06, 2016 at 05:36 AM -- Server version: 10.1.10-MariaDB -- PHP Version: 5.6.19 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CL...
true
416b2b9f739235346b55ab6049dcf169ae6d195e
SQL
lukehuang/search
/ssm_search/doc/untitled.sql
UTF-8
1,789
2.984375
3
[]
no_license
/************************************************************分割线************************************************************/ /* todo search_test(搜索) */ CREATE TABLE `search_test` ( `id` int(11) NOT NULL AUTO_INCREMENT, `property1` varchar(255) CHARACTER SET utf8mb4 C...
true
7187daa712c13fe3e3f3b2bc3dd1b194156153fb
SQL
scharris/sqljson-query
/src/dbmd/generation/src/main/resources/pg-dbmd.sql
UTF-8
4,956
4.03125
4
[]
no_license
with ignoreSchemasQuery as ( select unnest(array['pg_catalog', 'information_schema']) schema_name ), relationMetadatasQuery as ( select coalesce(json_agg(json_build_object( 'relationId', json_build_object('schema', r.schemaname, 'name', r.name), 'relationType', r.type, 'fields', ( sele...
true
c83a28106c122e4acb8305a904d57cdc97bbc532
SQL
AlexWuDDD/SelfSQL
/MySQL/DQL语言/condition_query_test.sql
UTF-8
191
3.484375
3
[]
no_license
#2. 查询员工号为176的员工的姓名和部门号和年薪 SELECT last_name, department_id, salary*12*(1+ IFNULL(commission_pct, 0)) AS 年薪 FROM employees WHERE employee_id = 176;
true
8f6e5ba5aaacc2dc592cfdc5c5163c63ff78b98f
SQL
pepelluyot/mysql-procedimientos
/13-ejemplo13_sp.sql
UTF-8
2,279
4.125
4
[]
no_license
/*Hacer un procedimiento (​ ejemplo13_sp.sql​ ) de forma que cuando un usuario se autentifique (comprobar que el usuario existe), actualice la tabla datos_personales (aumente el número de acceso y almacene la fecha actual). Nota: Si el usuario existe y es la primera vez que se autentifica, hay que incluirlo en la tabla...
true
aec03235853bd8f6428209a953b8c5793bf5e153
SQL
hk1506/Unit1Lesson2
/Unit 1: Project 4 Drill 2.sql
UTF-8
200
3.6875
4
[]
no_license
select status.station_id, stations.name, count(case when docks_available = 0 then 1 end) empty from status join stations on stations.station_id = status.station_id group by 1 order by empty desc
true
a19c4c08132e1c09f036829c51ce146af428c295
SQL
lejarx/Oracle-PLSQL
/source_code/chapter 9/answers/answer9_3.sql
UTF-8
454
3.75
4
[]
no_license
select * from (select department, last_name||', '||first_name, sum(cost) eyeglass_cost, rank() over (partition by department order by sum(cost) asc nulls first) Lowest_eyeglass_cost_rank from department, employee, glasses where department = fk_department ...
true
24cd49ff0b0ad5667677fba3cf137332d83508d9
SQL
zq0319/project
/1602E/Project1/1602e.sql
UTF-8
7,677
3.375
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.8.2 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: 2018-09-18 10:39:35 -- 服务器版本: 10.1.34-MariaDB -- PHP Version: 7.2.7 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET...
true
518bbb5e77edd22139312b2a0e6751866a738294
SQL
jchiangMIDS/exercise_1
/investigations/hospital_variability/hospital_variability.sql
UTF-8
217
3.359375
3
[]
no_license
SELECT Measure_ID, ABS(AVG(Procedure_Score)-((MAX(Procedure_Score)-MIN(Procedure_Score))/2+MIN(Procedure_Score))) AS variability FROM hospitals_scores GROUP BY Measure_ID ORDER BY variability DESC LIMIT 10;
true
72ed946ef52e4df9e371332849a7f6ff2f043a23
SQL
miguelmontiel30/BD-GMG
/Procedimientos/Insert Procedures.sql
UTF-8
266
2.71875
3
[]
no_license
use sistema_gmg; /* PROCEDIMIENTOS INSERT */ DELIMITER $$ CREATE PROCEDURE insert_ciclos( in Ciclo varchar(15), in Fecha_ini date, in Fecha_ter date) BEGIN INSERT INTO ciclos(ciclo,fecha_inicio,fecha_termino) values (Ciclo, Fecha_ini, Fecha_ter); END$$
true
a0fef66b7c9d6b7c55cd7cfe08c10511bac04173
SQL
Girish027/MWB
/src/main/resources/db/migration/V62__create_preferences_and_vectorizer_update_models.sql
UTF-8
1,238
2.890625
3
[]
no_license
DROP TABLE IF EXISTS preferences; CREATE TABLE preferences ( `id` int(11) unsigned NOT NULL AUTO_INCREMENT, `client_id` int(11) NOT NULL, `level` varchar(100) NOT NULL DEFAULT '', `type` varchar(100) NOT NULL DEFAULT '', `key` varchar(200) NOT NULL DEFAULT '', `value` varchar(200) DEFAULT '', `status` varc...
true
8788ef0273d453c2c589fb86412477ae54d21e0c
SQL
client-scripts/SQL
/excluirJornadas.sql
UTF-8
1,106
2.90625
3
[]
no_license
do $$ declare id_empresa uuid[]; begin id_empresa = array['COLOCAR UUID DAS EMPRESAS AQUI - SELECT OBRA, ID FROM NS.EMPRESAS']::uuid[]; delete from persona.intervalosjornadas where jornada in ( select jornada from persona.jornadas where empresa = any(id_empresa) ); delete from persona.historicostrabalhadore...
true
eb1993add2023195a536e72f20d09a5af6ecbfe1
SQL
cdesmarais/WebDB-Test
/WebDB/StoredProcedures/Common/dbo.Admin_PartnerGet.PRC
UTF-8
997
2.953125
3
[]
no_license
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[Admin_PartnerGet]') and OBJECTPROPERTY(id, N'IsProcedure') = 1) drop procedure [dbo].[Admin_PartnerGet] GO create procedure dbo.Admin_PartnerGet( @partnerid int ) As set nocount on set transaction isolation level read uncommitted select ...
true
ae4fbbbf8b50965c6f52c0ae58bb63453931aeb9
SQL
h-4vok/uai-ssc-backend
/SSC.Database/Programmability/Stored Procedures/sp_ClientTestimonial_getLast5.sql
UTF-8
319
3.265625
3
[]
no_license
CREATE PROCEDURE sp_ClientTestimonial_getLast5 AS BEGIN SELECT ct.Id, ct.PersonFullName, ClientCompanyId = c.Id, ClientCompanyName = c.Name, ct.Text, ct.CreatedBy, ct.CreatedDate, ct.UpdatedBy, ct.UpdatedDate FROM ClientTestimonial CT LEFT JOIN ClientCompany C ON ct.ClientId = c.Id END
true
2cec9095a713056879719f803d88be9e803695d0
SQL
chenditc/pokemon-map
/db.sql
UTF-8
1,920
3.484375
3
[]
no_license
CREATE TABLE FORT_MAP( fortid VARCHAR(64) PRIMARY KEY, cellid VARCHAR(64) , enabled BOOLEAN, latitude DOUBLE PRECISION, longitude DOUBLE PRECISION, forttype INT, gymteam INT ); ALTER TABLE FORT_MAP ADD column lure_expire DOUBLE PRECISI...
true