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
d0c44f5a11d1811a54d2d0ffb24bd2966513bf4f
SQL
feng-0927/chat-node
/chat/backup/databases/chat.sql
UTF-8
15,743
3.453125
3
[]
no_license
/* Navicat Premium Data Transfer Source Server : h1902 Source Server Type : MySQL Source Server Version : 50553 Source Host : localhost:3306 Source Schema : chat Target Server Type : MySQL Target Server Version : 50553 File Encoding : 65001 Date: 11/09/2019 04:01:39 ...
true
768a6ede54a4c285bc5e3e2e4bbc3c484ae3b58d
SQL
Tommydreamer57/meiosis
/db/read_orders.sql
UTF-8
360
3.75
4
[]
no_license
SELECT order_id, product_id, timestamp, name, price, COUNT(*) AS quantity FROM meiosis_orders JOIN meiosis_order_products ON meiosis_order_products.order_id = meiosis_orders.id JOIN meiosis_products ON meiosis_products.id = meiosis_order_products.product_id WHERE meiosis_orders.user_id = ${user_id} GROUP BY name, order...
true
53a7c25813bed045fb70e9b22b1cca334048e5dc
SQL
kuillldan/JXIT
/08ServletAndJsp/src/数据库脚本.sql
UTF-8
2,862
3.359375
3
[]
no_license
DROP TABLE IF EXISTS EMP ; DROP TABLE IF EXISTS DEPT; CREATE TABLE DEPT (DEPTNO INT PRIMARY KEY, DNAME VARCHAR(14) , LOC VARCHAR(13) ) ; CREATE TABLE EMP (EMPNO INT(4) PRIMARY KEY, ENAME VARCHAR(10), JOB VARCHAR(9), MGR INT(4), HIREDATE DATE, SAL INT(7), COMM INT(7), DEPTNO INT(2), CONSTRAINT...
true
c695fe875eb14b990cca1696ef902f3989b7577c
SQL
duyaokun/upgrade-gitlab-note
/databases/sql-files/after-export.sql
UTF-8
1,764
3.046875
3
[]
no_license
-- ALTER TABLE `users` ADD `extern_uid` varchar(255) DEFAULT NULL; -- ALTER TABLE `users` ADD `provider` varchar(255) DEFAULT NULL; -- UPDATE users SET extern_uid=i.extern_uid provider=i.provider; ALTER TABLE `users` DROP COLUMN `public_email`; ALTER TABLE `users` DROP COLUMN `notification_email`; ALTER TABLE `users` C...
true
1039d7b15b002563913a819256f38c75eea3eb46
SQL
Jakadallah/FreelnacingSite
/DataBase_update/Final_INIESTA.sql
UTF-8
17,165
3.015625
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 5.0.2 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: May 24, 2020 at 03:09 PM -- Server version: 10.4.11-MariaDB -- PHP Version: 7.4.5 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIEN...
true
85dce94a3422bfc55ccfa8869e83ddc837503fa0
SQL
sunminghong/WBYL
/docs/createdb.sql
UTF-8
2,263
3.546875
4
[]
no_license
CREATE TABLE IF NOT EXISTS `employee` ( `id` int(11) NOT NULL AUTO_INCREMENT, `name` varchar(30) NOT NULL, `money` int(11) NOT NULL DEFAULT '0', `bangName` varchar(30) NOT NULL, `rights` tinyint(4) NOT NULL DEFAULT '0', `filishTask` int(11) NOT NULL DEFAULT '0', `receiveTask` int(11) NOT NULL DEFAULT '0'...
true
2035a9a57bad7588d11baaf2c4c5a57cd5c1c911
SQL
datapolitan/citibike_dock_bot
/summary_stats.sql
UTF-8
646
3.84375
4
[]
no_license
--A script to calculate summary statistics for the past 12 hours WITH hour_ex AS ( SELECT extract(hour from execution_time) as hour_ex, nyc_avail_bikes, mhtn_avail_bikes, brklyn_avail_bikes, qns_avail_bikes FROM citibikedock.cb_boro_stats --account for the 4 hours ...
true
e77debf04217570d85c3b7d2e371493297c0b19d
SQL
Julyday/test_mybatis
/target/classes/sql/Orders.sql
UTF-8
794
2.796875
3
[]
no_license
/* Navicat MySQL Data Transfer Source Server : localhost Source Server Version : 50711 Source Host : localhost:3306 Source Database : mybatis Target Server Type : MYSQL Target Server Version : 50711 File Encoding : 65001 Date: 2016-10-11 15:55:42 */ SET FOREIGN_KEY_CHECKS=0; -- -...
true
f100096be69bb2f835497bd95529a3c34bb11d17
SQL
kingzone/TSET_Java
/153.65.197.23_uschema2_ix_dbc/TSETInfoTables/CREATE.sql
UTF-8
59,652
3.40625
3
[]
no_license
CREATE MULTISET TABLE USCHEMA2_IX.BRAND_OWNER_ORG ,NO FALLBACK , NO BEFORE JOURNAL, NO AFTER JOURNAL, CHECKSUM = DEFAULT, DEFAULT MERGEBLOCKRATIO ( BRAND_PARTY_ID INTEGER TITLE 'BRAND_PARTY_ID' NOT NULL) NO PRIMARY INDEX UNIQUE INDEX BOO_USI_1 ( BRAND_PARTY_ID ); CREATE SET TABLE USCHEM...
true
b55f71d2125ce090a7624fd482819837c095f475
SQL
developeramarish/angkor
/kotlin/src/main/resources/db/migration/V3.0__CreateTableDish.sql
UTF-8
2,801
3.46875
3
[ "Apache-2.0" ]
permissive
-- { -- "origin": "gr", -- "lastServed": "2015-07-07T21:33:37.718Z", -- "authenticName": "ελληνική σαλάτα", -- "timesServed": 5, -- "rating": 9, -- "createdAt": "2015-08-09-09T22:22:22.222Z", -- "primaryUrl": "http://de.allrecipes.com/rezept/1268/authentischer-gri...
true
0b371d70b7b25f73d5fe2b898c57635b23a663f2
SQL
bedspace/related-listings
/server/db/Schema.sql
UTF-8
1,224
3.21875
3
[]
no_license
DROP DATABASE related_listings; CREATE DATABASE related_listings; USE related_listings; CREATE TABLE user_info( user_info_id int NOT NULL AUTO_INCREMENT PRIMARY KEY, first_name text NOT NULL, last_name text NOT NULL ); CREATE TABLE reviews( reviews_id int NOT NULL AUTO_INCREMENT PRIMARY KEY, username text ...
true
32d10df7ea73de38b586c2f04c8a700d20520543
SQL
ngoctranfire/typescript-knex-example
/psql_cheatsheet.sql
UTF-8
1,773
3.9375
4
[]
no_license
PostgreSQL Cheat Sheet CREATE DATABASE CREATE DATABASE dbName; CREATE TABLE (with auto numbering integer id) CREATE TABLE tableName ( id serial PRIMARY KEY, name varchar(50) UNIQUE NOT NULL, dateCreated timestamp DEFAULT current_timestamp ); Add a primary key ALTER TABLE tableName ADD PRIMARY KEY (id); Create an IN...
true
820167f621411e5e51e78774525eb30714bc1284
SQL
min-87/tasks-advanced
/SQL/DQL/6_distinct.sql
UTF-8
304
3.21875
3
[]
no_license
-- Выполните в psql запрос который выбирает из таблицы goods все уникальные названия товаров, у которых категория cars; -- BEGIN (write your solution here) SELECT DISTINCT name FROM goods WHERE category='cars'; -- END
true
aa5a5c3855661370ab41f3f3b6d5b696f785169a
SQL
seanrreid/class-topic-survey
/sql/seed.sql
UTF-8
589
3.3125
3
[]
no_license
create table class_status ( id serial primary key, status_title text not null, rank integer); insert into class_status (status_title, rank) values ('Awesome', 5), ('Great', 4), ('Good', 3), ('Okay', 2), ('Poor', 1), ('Unranked', 0); create table topics ( id serial...
true
235f6b4c778e2d562a637e7eeb2e29373e05be51
SQL
KaushikKPDARE/Smart_IoT_Infant_Incubator
/BACKUP_EVENT.sql
UTF-8
419
3.015625
3
[ "Apache-2.0" ]
permissive
START TRANSACTION; delimiter | CREATE EVENT Backup_Table1 ON SCHEDULE EVERY 30 day COMMENT 'Takes backup every day' DO BEGIN SET @sql_text = CONCAT ( "SELECT * FROM `INCUBATOR` INTO OUTFILE 'C:\Users\kpdar\Desktop\backup" , DATE_FORMAT( NOW(), '%Y%m%d') , "backup.csv'" )...
true
10a64c9547365cd1ee2992e51f8b783877b64650
SQL
tingley/globalsight
/main6/tools/install/data/ERs/8.0.0.0/GlobalSight_8.0.0.0.14.sql
UTF-8
815
3.296875
3
[]
no_license
# For export deadlock(this is from GlobalSight_8.0.0.0.1.sql) # On some installs, the foreign keys have already been dropped. # This awful technique for dropping foreign keys if they exist comes from # http://forums.mysql.com/read.php?97,218825,218955 DROP PROCEDURE IF EXISTS upgrade_corpus_map_drop_fks; DELIMITER...
true
b3ec479f9d841daf99b75ac7b76eb6bfc8e7af03
SQL
radtek/tensordev
/sql/archive_area_usage_01.sql
UTF-8
952
3.53125
4
[]
no_license
-- ----------------------------------------------------------------------------------- -- File Name : archive_area_usage_01.sql -- Description : It checks the space used in the Flash Recovery Area if the db is -- using Archive Destination = USE_DB_RECOVERY_FILE_DEST -- Requirements : Access to th...
true
3a6a815d6ab46b4325c5c8a90b5e4db7cadd3e6f
SQL
kPlusPlus/DatabaseCompare
/DatabaseCompare/bin/Debug/Triggers bankart_dtrigA.sql
UTF-8
348
3.09375
3
[]
no_license
create trigger [bankart_dtrig] on dbo.bankart for delete not for replication as set nocount on if (select count(*) from deleted, analitika where (deleted.id = analitika.vezaid and analitika.analitikavrsta = 3)) > 0 begin delete [analitika] from analitika, deleted where analitika.vezaid = deleted.id...
true
af6e8cee4b15cd47cb1943b9f82338a60a055df3
SQL
23jonathan23/aspect-oriented-programming-unipampa-2021
/Scripts/Database/Table/CustomerOrderGame.sql
UTF-8
205
2.890625
3
[]
no_license
CREATE TABLE CustomerOrderGame ( CustomerOrderId INTEGER NOT NULL REFERENCES CustomerOrder(CustomerOrderId), GameId INTEGER NOT NULL REFERENCES Game(GameId), PRIMARY KEY(CustomerOrderId, GameId) )
true
582be99a7bbba6e5eed4f627966b8a4a143d1758
SQL
ReaperClown/DIO_Bootcamps
/santander-bootcamp-fullstack-developer/projetos/conceitos-e-melhores-praticas-postgresql/financasDB_06.sql
UTF-8
1,003
3.71875
4
[]
no_license
CREATE TABLE IF NOT EXISTS funcionarios ( id SERIAL, nome VARCHAR(50), gerente INTEGER, PRIMARY KEY (id), FOREIGN KEY (gerente) REFERENCES funcionarios(id) ); INSERT INTO funcionarios (nome, gerente) VALUES ('Dorovaldo',NULL); INSERT INTO funcionarios (nome, gerente) VALUES ('Andressa',1); INSERT INTO funcionario...
true
028fe596b9878db5f796a76a8111b615f9f628b7
SQL
binitdatta/rollingstone-spring-boot-security-oauth2
/src/main/resources/sql-resources/seed_data.sql
UTF-8
2,105
2.859375
3
[]
no_license
INSERT INTO app_role (id, role_name, description) VALUES (1, 'GENERAL_USER', 'General User Without Admin Rights'); INSERT INTO app_role (id, role_name, description) VALUES (2, 'ADMIN_USER', 'Admin User'); -- USER -- non-encrypted password: jwtpass INSERT INTO app_user (id, first_name, last_name, password, username) VA...
true
2631f36fa784fdf56f07b24aea4ebaba0d16f41c
SQL
danikaze/taihaijapan
/backend/models/sql/schema.sql
UTF-8
2,585
4.1875
4
[]
no_license
-- Site config CREATE TABLE IF NOT EXISTS config ( name text NOT NULL, value text NOT NULL, updated text NOT NULL DEFAULT (datetime('now', 'utc')) ); -- Users CREATE TABLE IF NOT EXISTS users ( id integer NOT NULL PRIMARY KEY, created text NOT NULL DEFAULT (datetime('now', 'utc')), updated text NOT NULL DE...
true
135c9cad621fa50122bc1cabda766b03a058ff12
SQL
phili67/ecclesiacrm
/src/mysql/install/languages/th_TH.sql
UTF-8
10,726
2.578125
3
[ "MIT" ]
permissive
INSERT INTO `config_cfg` (`cfg_id`, `cfg_name`, `cfg_value`) VALUES (64, 'sDistanceUnit', 'wah'), (65, 'sTimeZone', 'Asia/Bangkok'), (100, 'sPhoneFormat', '99 9999 9999'), (101, 'sPhoneFormatWithExt', '999 9999 9999'), (102, 'sDateFormatLong', 'd/m/Y'), (103, 'sDateFormatNoYear', 'd/m'), (105, 'sDateTimeFormat', 'j/m/y...
true
781dc4a6eb4912e3bc6f808e3dadcca7c0545a81
SQL
aakaashsrt200/skill-matrix
/Database/CreateStoreProc/sp_edit_skill.sql
UTF-8
523
3.578125
4
[]
no_license
USE skill_matrix; DELIMITER ;; CREATE DEFINER=`root`@`localhost` PROCEDURE `sp_edit_skill`(IN in_skill_id int(11),in_domain varchar(50), in_skill varchar(50)) BEGIN DECLARE count INT DEFAULT 1; select count(*) INTO count from skill_matrix.skills a where a.skill= in_skill and a.domain = in_domain and skill_id != in_s...
true
69126538028b1839988213248e1767d1664199f6
SQL
torchbox/verdant-rca
/django-verdant/rca/separation_scripts/wagtailembeds.sql
UTF-8
521
2.53125
3
[]
no_license
-- Rename all verdantembeds tables to wagtailembeds ALTER TABLE verdantembeds_embed RENAME TO wagtailembeds_embed; -- Fix app_label of core content_types UPDATE django_content_type SET app_label = 'wagtailembeds' WHERE app_label = 'verdantembeds'; -- Update south migration history to look like we ran the new wagtaile...
true
f7f4a1bda41aeb12c27e11c2c8cb1857ef29f4a4
SQL
RamadhanAmizudin/malware
/Fuzzbunch/Resources/Ops/Data/database_plans/SQL Server/Sharepoint File List.sql
UTF-8
286
3.046875
3
[ "LicenseRef-scancode-warranty-disclaimer" ]
no_license
SELECT DirName, LeafName, ID, Size, TimeLastModified, TimeCreated from Docs where ( (TimeLastModified between '$START_DATE' AND '$END_DATE') or (TimeCreated between '$START_DATE' AND '$END_DATE') ) AND (IsCurrentVersion='True') AND (Size>0) order by TimeLastModified,TimeCreated
true
7a3dc5cea754b4073d503118c572221b2162c1a8
SQL
AndrewRLloyd88/LightBnB
/1_queries/02_average_length_of_reservation.sql
UTF-8
346
3.28125
3
[]
no_license
SELECT AVG(end_date - start_date) AS average_duration FROM reservations; -- Average Length Of Reservation -- Our product managers want a query to see the average duration of a reservation. -- Get the average duration of all reservations. -- Expected Result: -- average_duration -- --------------------- -- 14.6...
true
b73257c6b21ace86143421ef36c71744fb030878
SQL
DEV-ASHANAUR/Ajax_crud_operation
/sql/youtubecrudoperation.sql
UTF-8
1,606
2.828125
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.8.5 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: May 03, 2020 at 01:59 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...
true
85c83f5698e8cfecf9fbf78d2480cfbce3e03195
SQL
felipebernardes/bd_fatec
/atividade_lista_pratica.sql
UTF-8
3,013
2.609375
3
[ "MIT" ]
permissive
alter table funcionario add ecivil varchar(2); alter table funcionario add cdsuperv int; INSERT ALL INTO cargo (cdcargo, nmcargo, vrsalario) VALUES ('C3', 'AUX. ESCRITORIO', 450.00) INTO cargo (cdcargo, nmcargo, vrsalario) VALUES ('C4', 'ESCRITURARIO', 600.00) INTO cargo (cdcargo, nmcargo, vrsalario)...
true
222cd06103365deecb8d125ab18d2f106cfd5cd5
SQL
DandyForever/CryptoCurrencyTracker
/src/main/resources/schema.sql
UTF-8
2,531
4.34375
4
[]
no_license
/*DROP TABLE currencies CASCADE; DROP TABLE currencies_days CASCADE; DROP TABLE users CASCADE; DROP TABLE subscriptions CASCADE;*/ CREATE TABLE IF NOT EXISTS currencies( id BIGINT PRIMARY KEY, curr_val NUMERIC NOT NULL, last_change NUMERIC NOT NULL, name VARCHAR(100) NOT NULL ); COMMENT ON TABLE curr...
true
f27146fe85c23eadc90965ef761e54a5dc40847b
SQL
AMIRANDA9112/holbertonschool-higher_level_programming
/0x0E-SQL_more_queries/102-rating_shows.sql
UTF-8
237
3.703125
4
[]
no_license
-- list all shows -- sort by rating descend order SELECT tv_shows.title, SUM(tv_show_ratings.rate) AS rating FROM tv_shows INNER JOIN tv_show_ratings ON tv_shows.id = tv_show_ratings.show_id GROUP BY tv_shows.title ORDER BY rating DESC;
true
d5c8be7713ec599bba519580e98dda91af5cfad8
SQL
fabier/alertecoin
/scripts/2016-04-14 migration script.sql
UTF-8
238
2.78125
3
[]
no_license
ALTER TABLE classified_classified_extra RENAME classified_classified_extras_id TO classified_id; ALTER TABLE alert ALTER COLUMN description TYPE text; UPDATE alert SET url= replace(url, 'http://', 'https://') WHERE url like '%http://%';
true
00ec8887f58414c1f35ca68fc4e21f5e101acd7c
SQL
DieZZzz/money-transfer-api
/conf/init.sql
UTF-8
215
2.5625
3
[]
no_license
drop table if exists Account; create table Account(id int primary key, amount decimal(18, 4) not null, currency varchar(3)); insert into Account values (1, 100, 'USD'); insert into Account values (2, 100, 'EUR');
true
44fff89da0647607dda650f1f6c39348229488cf
SQL
enigmatikme/contact-list
/db/schema.sql
UTF-8
721
2.78125
3
[]
no_license
/* Execute this file from the command line by typing: * mysql -u root < schema.sql * to create the database and the tables.*/ create database contact_list; create table contacts ( firstName varchar(150), lastName varchar(150), email varchar(150), phone int, address varchar(150) ...
true
987c8c52c6b1a172522360298fe150a894cca9ac
SQL
SamGordonSG/server-datta
/resources/[SCRIPTS]/[SHOPS]/esx_narshop/esx_shops.sql
UTF-8
1,011
2.671875
3
[]
no_license
______________________________________________________ CREATE TABLE `shops2` ( `id` int(11) NOT NULL AUTO_INCREMENT, `store` varchar(100) NOT NULL, `item` varchar(100) NOT NULL, `price` int(11) NOT NULL, PRIMARY KEY (`id`) ); INSERT INTO `shops2` (store, item, price) VALUES ('narekshop','yusuf',3000), ('narek...
true
ec4a7a216dc91fb17eeac919f1fcf9f38dc6fdbb
SQL
nutv99/E-Auction-website
/Final database code.sql
UTF-8
9,779
3.328125
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.0.9 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: Mar 29, 2014 at 08:07 PM -- Server version: 5.6.14 -- PHP Version: 5.5.6 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /...
true
3cc34983cea45f0f34b70ecf8f4f7143491e3dc5
SQL
YashDDesai/php-realtime-notification-using-ajax
/noti.sql
UTF-8
1,530
3.046875
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.9.1 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Feb 18, 2020 at 12:46 PM -- Server version: 10.4.8-MariaDB -- PHP Version: 7.3.11 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD...
true
91b5b37a0cf524b0bcc88a365a2376c82d9befbe
SQL
denislrx/emp
/personnel_bdd.sql
UTF-8
10,701
3.125
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 5.0.4 -- https://www.phpmyadmin.net/ -- -- Hôte : 127.0.0.1 -- Généré le : jeu. 29 avr. 2021 à 14:33 -- Version du serveur : 10.4.17-MariaDB -- Version de PHP : 8.0.2 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SE...
true
61abd37aa2ffbbeab3b853f12eae1745b81a28df
SQL
elifdilara/garage
/database-sql/garage.sql
UTF-8
9,756
3.359375
3
[]
no_license
-- MySQL Workbench Forward Engineering SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0; SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0; SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTI...
true
de6d9025e7e52da2f72311735a14d2123183d336
SQL
charles-wangkai/leetcode
/report-contiguous-dates.sql
UTF-8
2,889
4.75
5
[]
no_license
SELECT * FROM ( SELECT 'failed' AS period_state, sd.fail_date AS start_date, min(ed.fail_date) AS end_date FROM ( SELECT * FROM Failed WHERE ...
true
2fbfd2e61aadd21759904d297f1a9f0f8ca78631
SQL
Anton-s20/mvc
/mvc.sql
UTF-8
1,516
2.75
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.0.10.6 -- http://www.phpmyadmin.net -- -- Хост: 127.0.0.1:3306 -- Время создания: Ноя 08 2017 г., 13:51 -- Версия сервера: 5.5.41-log -- Версия PHP: 5.3.29 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIE...
true
b6225077aa494ed2c40b2c7b62276cdd740c4384
SQL
Srdjan294/SQL
/sql_DDL_DML/kolokvij_vjezba_3.sql
UTF-8
4,931
3.625
4
[]
no_license
drop database if exists kolokvij_vjezba_3; create database kolokvij_vjezba_3; use kolokvij_vjezba_3; create table cura( sifra int not null primary key auto_increment, dukserica varchar(49), maraka decimal(13,7), drugiputa datetime, majica varchar(49), novcica decimal(15,8), ogrlica int not null ); create table svekar...
true
a3e494c0343eb10b794eec24afd1edf96dd7fd9b
SQL
dansancarp/tpfinal
/u335209860_estac.sql
UTF-8
8,039
3.34375
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.4.12 -- http://www.phpmyadmin.net -- -- Servidor: 127.0.0.1 -- Tiempo de generación: 14-10-2015 a las 20:31:55 -- Versión del servidor: 5.6.25 -- Versión de PHP: 5.6.11 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARA...
true
742464c98633d97fc61366968af1516d89525dee
SQL
zahitamin/drokal
/drokal.sql
UTF-8
36,810
3.015625
3
[ "MIT" ]
permissive
-- phpMyAdmin SQL Dump -- version 4.7.4 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Dec 10, 2018 at 12:01 PM -- Server version: 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 @OL...
true
e846af1bde16522553d358ad260e5133c1dcd0c0
SQL
KirillIvano/shitty_rostax_server
/prisma/migrations/20211113142928_init/migration.sql
UTF-8
210
2.578125
3
[]
no_license
-- CreateTable CREATE TABLE "session" ( "id" SERIAL NOT NULL, "timestamp" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, "hash" TEXT NOT NULL, CONSTRAINT "session_pkey" PRIMARY KEY ("id") );
true
284a2434d4bc4901fd07964ba389c009c97691ba
SQL
NHadjiraIA/BootcampX
/4_queries/Cohort-Average-Assistance-Duration.sql
UTF-8
367
3.921875
4
[]
no_license
SELECT AVG(total_durations) as average_total_duration FROM( SELECT sum (assistance_requests.completed_at - assistance_requests.started_at )as total_durations FROM assistance_requests JOIN students ON assistance_requests.student_id = students.id JOIN cohorts ON students.cohort_id = cohorts.id GROUP BY cohorts.name ORDER...
true
bcd9f6c8c5cb19d59018cd2d72c0d6aeec0311a9
SQL
NCIP/catissue-core
/software/caTissue/db/db-install/MySql/createnewtable.sql
UTF-8
2,322
2.90625
3
[ "BSD-3-Clause", "LicenseRef-scancode-unknown-license-reference" ]
permissive
SET storage_engine=InnoDB; create table DYEXTN_ABSTR_CONTAIN_CTR ( IDENTIFIER bigint not null, CONTAINER_ID bigint, primary key (IDENTIFIER) ); create table DYEXTN_ABSTRACT_ENTITY ( id bigint not null, primary key (id) ); create table DYEXTN_BASE_ABSTRACT_ATTRIBUTE ( IDENTIFIER bigint n...
true
6e835a8f2d1b81b5fd9229fca7c929ea854f61aa
SQL
calebjihe/video-laravel
/database.sql
UTF-8
1,196
3.5
4
[ "MIT" ]
permissive
CREATE DATABASE IF NOT EXISTS videoslaravel; USE videoslaravel; CREATE TABLE users( id int(255) auto_increment not null, role varchar(255), name varchar(255), surname varchar(255), email varchar(255), password varchar(255), created_at datetime, updated_at datetime, remember_token ...
true
e57fa2cfac4bcbf32fae07858ccf4f6df5c3eb84
SQL
schr1554/cp125_Database
/cp125_Database/scgDb.ddl
UTF-8
3,052
3.875
4
[]
no_license
CREATE TABLE clients ( id INTEGER NOT NULL GENERATED ALWAYS AS IDENTITY, name VARCHAR(30) NOT NULL, street VARCHAR(30) NOT NULL, city VARCHAR(30) NOT NULL, state CHAR(2) NOT NULL, postal_code VARCHAR(10), contact_last_...
true
8af83078e5082048f3e3f62372c659cca2d6ac10
SQL
amit-t1234/kh
/moderator/sql.sql
UTF-8
4,611
3.5625
4
[]
no_license
-- 1 = scored -- 2 = escalated -- 3 = accepted -- 4 = rejected -- 5 = scored and flagged -- 6 = reviewed and flagged CREATE TABLE `users` ( `userid` varchar(255), `type` char(50) DEFAULT 'entreprenuer', `first_name` char(50) NOT NULL, `last_name` char(50) NOT NULL, `dob` date NOT NULL, `gender` char(20) NOT NULL...
true
c41d3e9554a8fc6eb0856ccc67219ffd0a88adca
SQL
karenarakelyan/notes
/user-ms/src/main/resources/db/migration/V1__create_users_table.sql
UTF-8
251
2.625
3
[]
no_license
CREATE TABLE "users" ( id UUID NOT NULL CONSTRAINT notes_pkey PRIMARY KEY, email VARCHAR(50) NOT NULL, password VARCHAR(50) NOT NULL, created_on TIMESTAMP NOT NULL, updated_on TIMESTAMP NOT NULL );
true
6f9a4ce5cc14d89426fafc74c520467ad4cfe2cd
SQL
yanxuanshaozhu/sqlcodes
/SQL.sql
UTF-8
10,691
4.25
4
[]
no_license
-- Ch03 -- Use a specific database use DBName; -- Show all available databases show databases; -- Show all available tables show tables; -- Show columns of a specific table show columns from TblName; -- Show columns of a specific table desc TblName; -- Ch04 -- Show the creating SQ...
true
3210dbf36854d6ead4fdc7e18ade6e538fb0a5d5
SQL
kielhong/cafe
/src/main/resources/db/migration/V1__Create_cafe_table.sql
UTF-8
3,184
3.84375
4
[]
no_license
create table article ( id bigint not null auto_increment, comment_count integer not null, content longtext, created_at datetime, title varchar(1000), update_date_time datetime, board_id bigint, writer_id bigint, primary key (id) ); create table article_tag ( article_id bigint no...
true
1e92953bc353250ad4a6db6d18f2542d4ec1cee8
SQL
hghazzawi/AuntRosie
/sql/SQLCREATE - AUNT ROSIE.sql
UTF-8
4,059
3.640625
4
[]
no_license
DROP TABLE IF EXISTS VenueLocation CASCADE; CREATE TABLE VenueLocation ( VenueCode INT NOT NULL PRIMARY KEY, VenueLocation VARCHAR(40) NOT NULL, VenueDate DATE NOT NULL, VenueRentalFee MONEY NOT NULL, VenueFullTimeAsstCost MONEY NOT NULL, VenuePartTimeCost MONEY NOT NULL, VenueUtility...
true
c5e5b042f01422c4d1ff9d86c381aeed6b0a2b6e
SQL
gwrippee/SQL-SSRS
/Warehouse/Manager/KPI/Loc80/Details/KPIchart_InvAdj80_PriorDetails80.sql
UTF-8
194
2.71875
3
[]
no_license
CREATE PROC [KPIchart_InvAdj80_PriorDetails80] AS SELECT * FROM InventoryAdjustmentsWH_KPI WHERE CONVERT(date,[Date]) BETWEEN '01/01/2013' AND '01/31/2013' AND Loc IN (80,81,54)
true
0f438da57f83455739c104194cdfaa82271b7cc1
SQL
egovernments/DIGIT-OSS
/municipal-services/sw-services/src/main/resources/db/migration/ddl/V20230120151229__add_eg_sw_id_enc_audit.sql
UTF-8
382
3.203125
3
[ "MIT", "LicenseRef-scancode-generic-cla" ]
permissive
CREATE TABLE IF NOT EXISTS eg_sw_id_enc_audit ( tenantid CHARACTER VARYING (256) NOT NULL, id CHARACTER VARYING (128) NOT NULL, applicationno CHARACTER VARYING (256), connectionno CHARACTER VARYING (128), createdTime BIGINT NOT NULL, CONSTRAINT pk_eg_sw_id_enc_audit PRIMARY KEY (id), CONSTRAINT uk_eg_sw_...
true
38860dda29b7b9736217e242c57d24191736f6bf
SQL
thoff1331/sql2
/sqlafternoon.sql
UTF-8
3,686
4.03125
4
[]
no_license
SELECT * FROM invoice i JOIN invoice_line il ON il.invoice_id = i.invoice_id WHERE il.unit_price > 0.99 SELECT i.invoice_date, c.first_name, c.last_name, i.total FROM invoice i JOIN customer c ON i.customer_id = c.customer_id; SELECT c.first_name, c.last_name, e.first_name, e.last_name FROM customer c J...
true
2f3f15a2dd3656449dd1c8db3bb19ad62e865c4f
SQL
C1120G1-HoangLeQuang/C1120G1-HoangLeQuang
/module3/ngay_5/bai_tap/bai_tap.sql
UTF-8
2,288
3.859375
4
[]
no_license
create database demo; use demo; create table Products( Id int not null auto_increment primary key, productCode int not null, productName varchar(45) not null, productPrice int not null, productAmount int not null, productDescription varchar(45) not null, productStatus varchar(45) not null ); insert into Products(prod...
true
8d4d1daa7299acbc04a04e254b7c7fe4cb91963e
SQL
beumof/SQL-Server-Admin-scripts
/QEP_AlreadyRunningProcesses.sql
UTF-8
538
3.546875
4
[]
no_license
--SQL Server active processes (including query plan) SELECT r.session_id ,st.TEXT AS batch_text ,SUBSTRING(st.TEXT, statement_start_offset / 2 + 1, ( ( CASE WHEN r.statement_end_offset = - 1 THEN (LEN(CONVERT(NVARCHAR(max), st.TEXT)) * 2) ELSE r.statement_end_offset END ) - r.statement_start_offset ) / ...
true
0b8412ee2c9bc6b2e0d00130b62fc8f4f40647dc
SQL
kaylaluther/Database_Project
/CSCI6070_HW2.sql
UTF-8
947
4.1875
4
[]
no_license
SELECT department.dept_name, result1.total_amt, department.budget, (department.budget - result1.total_amt) AS remaining_budget FROM department, ( SELECT instructor.dept_name, SUM(instructor.salary) total_amt FROM instructor GROUP BY dept_name) result1 WHERE result1.dept_name = department.dept_name; SELECT depart...
true
bae00280d3c92c9436756182343d111a98ddf904
SQL
jay-caceres/AirlineSystem
/new_temp_db.sql
UTF-8
13,351
3.484375
3
[]
no_license
DROP TABLE IF EXISTS airport CASCADE; DROP TABLE IF EXISTS boarding_passes CASCADE; DROP TABLE IF EXISTS seats CASCADE; DROP TABLE IF EXISTS aircraft CASCADE; DROP TABLE IF EXISTS ticket CASCADE; DROP TABLE IF EXISTS ticket_flights CASCADE; DROP TABLE IF EXISTS bookings CASCADE; DROP TABLE IF EXISTS flights CASC...
true
deaab98e872216ba5d0dbee20141fca83a298ed8
SQL
jdcsma/projavawebapp
/ch24/advanced-mappings-one-to-many/database/create.sql
UTF-8
566
3.546875
4
[ "MIT" ]
permissive
CREATE DATABASE AdvancedMappingsOneToMany DEFAULT CHARACTER SET 'utf8' DEFAULT COLLATE 'utf8_unicode_ci'; USE AdvancedMappingsOneToMany; CREATE TABLE posts ( id BIGINT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY, name VARCHAR(128) NOT NULL ) ENGINE = InnoDB; CREATE TABLE post_comments ( id BIGINT UNSIGNED N...
true
842d65c7820db361c503937199c7feee082a13ed
SQL
nahmed23/git-github.com-Life-Time-Inc-database_udw
/ltdatabaseudw/marketing/Views/v_dim_crm_program_cycle.sql
UTF-8
3,963
2.515625
3
[]
no_license
CREATE VIEW [marketing].[v_dim_crm_program_cycle] AS select d_crmcloudsync_ltf_program_cycle.dim_crm_ltf_program_cycle_key dim_crm_ltf_program_cycle_key, d_crmcloudsync_ltf_program_cycle.ltf_program_cycle_id ltf_program_cycle_id, d_crmcloudsync_ltf_program_cycle.created_by_dim_crm_system_user_key created...
true
f344206af816514fa4223802b44e0b329175ba2e
SQL
ylscj/zup-boot
/src/main/resources/cn/zup/bi/dao/BIShowEngineDao_getReportDimInfo.sql
UTF-8
740
3.921875
4
[]
no_license
SELECT bd.BIZ_TABLE_NAME AS DIM_TABLE, bd.DRILL_TYPE, bd.DRILL_INFO, bd.ID_FIELD, bd.TEXT_FIELD, btf.FIELD_TITLE, btf.FIELD_TYPE, btf.FIELD_NAME, bt.BIZ_TABLE_NAME AS TOPIC_TABLE, bt.TOPIC_NAME, brf.FIELD_LOCATION, brf.DIM_ORDER FROM bi_topic_field btf JOIN bi_dim bd ON btf.DIM_ID = bd.DIM_ID JOIN bi_topic bt ON ...
true
fa76803a659e4ff500d9f2dac9fbb5532d1ec5d7
SQL
flexxu/smartlight
/doc/activemq.sql
UTF-8
2,333
3.078125
3
[]
no_license
/* Navicat MySQL Data Transfer Source Server : localhost Source Server Version : 40109 Source Host : localhost:3306 Source Database : activemq Target Server Type : MYSQL Target Server Version : 40109 File Encoding : 65001 Date: 2014-05-28 17:33:42 */ SET FOREIGN_KEY...
true
41853fa94fd4401484bb7ac6168840c4cc1fc362
SQL
shawnsp/clowdr
/hasura/migrations/1619909224830_update_public_schema/up.sql
UTF-8
871
2.703125
3
[ "BSD-3-Clause" ]
permissive
CREATE INDEX "public_Email_userId" ON "public"."Email" ("userId"); CREATE INDEX "public_Email_invitationId" ON "public"."Email" ("invitationId"); CREATE INDEX "public_Email_reason" ON "public"."Email" ("reason"); CREATE INDEX "public_PushNotificationSubscription_userId" ON "public"."PushNotificationSubscription" ("use...
true
8b6070893ce6629c531d8c875014d08b03093bf9
SQL
marcelosoliveira/trybe-exercises
/Modulo_3_Back-end/Bloco 22: Normalização e Modelagem de Banco de Dados/projeto-bloco_22_mysql-one-for-all/sd-07-mysql-one-for-all/desafio4.sql
UTF-8
273
3.859375
4
[]
no_license
CREATE VIEW top_3_artistas AS SELECT a.`name` AS 'artista', COUNT(f.fk_user_id) AS 'seguidores' FROM SpotifyClone.artists AS a INNER JOIN SpotifyClone.followers AS f ON f.fk_artist_id = a.artist_id GROUP BY a.`name` ORDER BY COUNT(f.fk_user_id) DESC, a.`name` ASC LIMIT 3;
true
58e611bbb21369a89126d411a0a1feaa44171538
SQL
Kanu99/LearnMySQL
/17.Outer_joins.sql
UTF-8
227
3.40625
3
[]
no_license
SELECT c.customer_id, first_name, order_id FROM customers c LEFT JOIN orders o ON c.customer_id= o.customer_id ORDER BY c.customer_id -- left join means all rows are taken from orders db -- right join the opposite
true
8119ebb9d800d48bd55681710a8049c076c769ba
SQL
araguaci/CodeTimebank
/db/schema.sql
UTF-8
340
2.84375
3
[]
no_license
CREATE DATABASE CodeTimeBank_db; USE CodeTimeBank_db; CREATE TABLE questions ( id INT NOT NULL AUTO_INCREMENT, theQuestion VARCHAR(250) NOT NULL, questions BOOLEAN DEFAULT false, PRIMARY KEY(id) ); CREATE TABLE users ( id INT NOT NULL AUTO_INCREMENT, login VARCHAR(250) NOT NULL, register BOOLEAN DEFAULT false,...
true
7253df1421a5cb087d0d2c2ad7d3e6a52e3b344a
SQL
lucioeduardo/competitive-codes
/2021/Eduardo/Daily Practice/August/15 - URI 2990.sql
UTF-8
241
3.53125
4
[]
no_license
SELECT empregados.cpf, empregados.enome, departamentos.dnome FROM empregados INNER JOIN departamentos ON empregados.dnumero=departamentos.dnumero WHERE (SELECT count(*) FROM trabalha WHERE cpf_emp=empregados.cpf)=0 ORDER BY empregados.cpf
true
eb7ee33ccbf95ed89c19b4208d1fcd62b2494d4b
SQL
santunioni/FC-Challenges
/pfa-docker-2/mysql/migration/seed.sql
UTF-8
1,217
2.84375
3
[]
no_license
SET NAMES 'utf8'; CREATE TABLE `ModulosFullCycle` ( `ID` INT NOT NULL AUTO_INCREMENT PRIMARY KEY, `ModuloNome` VARCHAR(80) NOT NULL ); INSERT INTO ModulosFullCycle (ModuloNome) VALUES ("Docker"); INSERT INTO ModulosFullCycle (ModuloNome) VALUES ("Fundamentos de arquitetura de software"); INSERT INTO ModulosFullCy...
true
02418a348b4ba93ceb3be5255efa9b97aa6f40fe
SQL
quiconohales/ItAcademy
/IT_Ex2/exercici.sql
UTF-8
10,120
3.328125
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 5.0.1 -- https://www.phpmyadmin.net/ -- -- Servidor: 127.0.0.1 -- Tiempo de generación: 13-02-2020 a las 23:46:35 -- Versión del servidor: 10.4.11-MariaDB -- Versión de PHP: 7.4.2 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; ...
true
f202398c5053fe7d1636aec4efe1be2358808ef7
SQL
krutikafating/CDAC-project
/SQL/create.sql
UTF-8
3,145
3.28125
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.5.1 -- http://www.phpmyadmin.net -- -- Host: localhost:3308 -- Generation Time: Jan 16, 2021 at 09:11 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_S...
true
0ca4abd479be2d67e6b7f63e40ba467d46b32349
SQL
alibaba/canal
/parse/src/test/resources/ddl/alter/test_73.sql
UTF-8
1,207
2.671875
3
[ "Apache-2.0" ]
permissive
CREATE TABLE `tb_upzbnfzylo` ( `col_dppomywdgn` tinyblob, `col_hybjpvnihc` mediumblob, `col_nvqsfunmve` set('enum_or_set_0','enum_or_set_1','enum_or_set_2') CHARACTER SET utf8 DEFAULT 'enum_or_set_0', `col_rvwyvmeidf` enum('enum_or_set_0','enum_or_set_1','enum_or_set_2') CHARACTER SET utf8 NOT NULL DEFAULT 'enu...
true
659cab580f47fe29c23e542d46489a5164057ea5
SQL
jonataspc/mysql-scripts
/Scripts/ProcessadorExtratoBancoInterCapturaAluguelB3ParaWebAppDlombello.sql
UTF-8
3,853
4.0625
4
[ "Apache-2.0" ]
permissive
/* *** Descrição *** Script SQL para processamento consolidado de dados de aluguel de ativos da B3 (BTC) no formato de extrato bancário do banco Inter (CSV) para que seja importado de maneira simplificada do app web Dlombello (https://app.dlombelloplanilhas.com) *** Detalhes *** O relatório irá ser extraído de manei...
true
17f4b0cfd5324808272b531c4be03f3f729155e4
SQL
bcsoft/bc-category
/docs/category_init_04_asset_02_resource.sql
UTF-8
7,333
3.703125
4
[]
no_license
-- 清除资源、角色、岗位配置数据 -- 物资分类 delete from BC_IDENTITY_ROLE_RESOURCE where sid in (select id from BC_IDENTITY_RESOURCE where ORDER_ like '800703'); delete from BC_IDENTITY_RESOURCE where ORDER_ like '800703'; -- 角色 delete from BC_IDENTITY_ROLE_ACTOR where rid in (select id from BC_IDENTITY_R...
true
1322152f756330952ad4b12bb6eef029448a71b2
SQL
JHS1790/holbertonschool-higher_level_programming
/0x0E-SQL_more_queries/1-create_user.sql
UTF-8
326
2.6875
3
[]
no_license
-- a script that creates the MySQL server user user_0d_1 -- Drop user if exists DROP USER IF EXISTS 'user_0d_1'@'localhost'; -- creates the user CREATE USER IF NOT EXISTS 'user_0d_1'@'localhost' IDENTIFIED BY 'user_0d_1_pwd'; -- grants privelages GRANT ALL PRIVILEGES ON *.* TO 'user_0d_1'@'localhost'; -- Flush FLUSH PR...
true
fb14215858190a45b390967357b0a01e5d62b121
SQL
NatashaStojanova/Advanced-Data-Bases
/Query Optimization/Query Plan/Query-4-Plan.sql
UTF-8
1,178
3.640625
4
[]
no_license
EXPLAIN SELECT r.* FROM doctor d JOIN check_up cu on d.id = cu.doctor_id JOIN referral r on r.id = cu.refferal_id WHERE d.id = 4733 AND cu.date = '2019-01-02' --QUERY PLAN --Nested Loop (cost=0.57..440.60 rows=6 width=36) -- -> Append (cost=0.29..24.91 rows=3 width=4) -- -> Index Only Scan using doc...
true
f65094da9bdea34017df72d5d919182844ac6786
SQL
bjavier9/tesis
/sp/nuevo-usuario.sql
UTF-8
2,507
3.75
4
[]
no_license
use asistencia; drop PROCEDURE `nuevo_usuario` DELIMITER ;; CREATE definer = `root` @`localhost` PROCEDURE `nuevo_usuario`( IN nombre VARCHAR(90), IN apellido VARCHAR(45), IN cedula VARCHAR(45), IN nacimiento date, ...
true
a3078f732bfef29688009a836c1e45737d941348
SQL
combat1964/exref
/postgres/sql/opr - in.sql
UTF-8
277
3.578125
4
[]
no_license
-- logical operators (like AND and OR) in a SELECT statement: SELECT lastname, firstname, state FROM author WHERE state = 'CA' or state = 'TX' or state = 'NY'; -- easier way with the IN operator: SELECT lastname, firstname, state FROM author WHERE state IN ('CA', 'TX', 'NY');
true
345ce914312025ee53fb70bfd6326c34c0b3b5ce
SQL
Magicoach/database
/procedures/magicoach/calculate_part_all4_dev.sql
UTF-8
6,607
3.515625
4
[]
no_license
DELIMITER $$ CREATE PROCEDURE `calculate_part_all4_dev`(IN new_part int) SQL SECURITY DEFINER CONTAINS SQL BEGIN SET @new_part = new_part; SET @lastTIME = '2015-01-19 03:14:07'; SET @lastPART = 0; SET @lastX = 0; SET @lastY = 0; REPLACE dev_positions (ID_Participation, time, latitude, longitude, altitu...
true
ad601484af88364b57921f903cdb0d557528df02
SQL
astolbin/job4j_design
/chapter_003/src/main/java/sql/support/insert.sql
UTF-8
1,793
2.796875
3
[]
no_license
insert into roles(name) values ('Client'); insert into roles(name) values ('Support'); insert into roles(name) values ('Admin'); insert into rights(name) values ('Add ticket'); insert into rights(name) values ('Answer in ticket'); insert into rights(name) values ('Close ticket'); insert into roles_rights(role_id, rig...
true
adc94314cce3e78f45fb42818ad6722382824683
SQL
Apranzo/php
/day05/ex08/ex08.sql
UTF-8
194
3.03125
3
[]
no_license
SELECT last_name, first_name, DATE_FORMAT(birthdate, '%Y-%m-%d') as 'birthday' FROM user_card WHERE birthdate >= '1989-01-01 00:00:00' AND birthdate < '1990-01-01 00:00:00' order by last_name;
true
06e92fcc6fd6e9335e6f816d9514f4c615551fe3
SQL
yangxuan-321/chestnut-flow
/doc/sql/chestnut_flow_node_instance.sql
UTF-8
1,317
3.28125
3
[]
no_license
CREATE TABLE chestnut_flow_node_instance( id bigserial NOT NULL, flow_instance_id bigint DEFAULT 0 NOT NULL, node_id bigint DEFAULT 0 NOT NULL, status smallint DEFAULT 0 NOT NULL, param_value text DEFAULT '' NOT NULL, version integer DEFAULT 0 NOT NULL, create_user bigint DEFAULT 0 NOT NULL,...
true
3e308cb145ce176d9f2fd6019d8e692f37e69c2a
SQL
rimbanuzululc/Dev-E-Warning-Letter
/foundation/foundationsomasiimpl/src/main/resources/com/sli/somasi/foundation/dao/KonsumenDAO.sql
UTF-8
1,033
3.015625
3
[]
no_license
--listKonsumen select k.* from backup_konsumen k limit 20; --seacrhNama select k.*, a.assigndate as assignDate from backup_konsumen k left join somasi_assign a on k.idkonsumen = a.idkonsumen where k."name" ilike '%[[param]]%' order by k.idkonsumen asc limit [[rowPerPage]] offset [[start]]; --seacrhRef select k.*, a.a...
true
03d02bdfa73b3de724324b2fca9b87ccb663327f
SQL
ninjaprodev/ethparser
/src/main/resources/sql/uni_price_view.sql
UTF-8
7,773
3.375
3
[]
no_license
drop view if exists uni_prices_view; create view uni_prices_view as select evt.id as id, log_address.address as address, block.number as block_number, block_hash.hash as block_hash, event_contract.name as source_name, c_tx.id ...
true
44bad179e3f23b00458523c200dd061b1fbc7ca9
SQL
mboghi/mysql_course
/select_grouping.sql
UTF-8
2,169
4.28125
4
[]
no_license
select customer.first_name, customer.last_name, sum(payment.amount) as payment from payment join customer on payment.customer_id = customer.customer_id group by customer.customer_id; -- explain select customer.first_name, customer.last_name, store.address, sum(payment.amount) as payment from ...
true
51d4dc07ddd624fc85df36b0e34acb9211c37da0
SQL
edoardo-mileto/HackerRank
/SQL/01. Basic Select/17. Weather Observation Station 12.sql
UTF-8
239
3.25
3
[]
no_license
-- https://www.hackerrank.com/challenges/weather-observation-station-12 SELECT DISTINCT CITY FROM STATION WHERE SUBSTRING(CITY,1,1) NOT IN ('a','e','i','o','u') AND SUBSTRING(CITY,CHAR_LENGTH(CITY),1) NOT IN ('a','e','i','o','u')
true
9bfd1a0d7c4898d8f45f0e472a6a153245a1eef7
SQL
TsvetomirAleksandrov/Software-University
/Databases Basics - MS SQL Server - May 2020/09.AdditionalExercises/09.AdditionalExercises/10.RiversByCountry.sql
UTF-8
505
4.1875
4
[]
no_license
SELECT c.CountryName, ct.ContinentName, COUNT(r.Id) AS [RiversCount], ISNULL(SUM(r.Length), 0) AS [TotalLength] FROM Countries c INNER JOIN Continents ct ON ct.ContinentCode = c.ContinentCode LEFT JOIN CountriesRivers cr ON cr.CountryCode = c.CountryCode LEF...
true
f7775663c6b77b965457b6843ae1e4630962357a
SQL
vervitK/Great-learning-assignments
/SQl 2 day_1 take_home.sql
UTF-8
4,123
4.4375
4
[]
no_license
# Datasets used: employee_details.csv and Department_Details.csv # Use subqueries to answer every question create database employee; CREATE SCHEMA IF NOT EXISTS Employee; USE Employee; # import csv files in Employee database. SELECT * FROM DEPARTMENT_DETAILS; SELECT * FROM EMPLOYEE_DETAILS; #Q1. Retrive employee_id ...
true
1593b777f0d46f8c76ddb13b1126239099f15f28
SQL
intCCP/CCP
/Application/Viste/v_mcre0_scheda_iris_00.sql
UTF-8
35,204
3.1875
3
[]
no_license
/* Formatted on 21/07/2014 18:37:36 (QP5 v5.227.12220.39754) */ CREATE OR REPLACE FORCE VIEW MCRE_OWN.V_MCRE0_SCHEDA_IRIS_00 ( COD_SNDG, ORDINE, GENERALE, MESE1, MESE2, MESE3, MESE4, MESE5, MESE6, MESE7 ) AS SELECT DISTINCT cod_sndg, ordine, g...
true
1a13955eb43a06f119e3666bb63d4e1660933f41
SQL
MarcinKap/Spark_Scala
/db_scripts/analysis_no_weather.sql
UTF-8
1,225
3.71875
4
[]
no_license
%sql select d_roads.road_category, sum(f_facts.vehicle_count), d_time.year from f_facts join d_vehicle on f_facts.vehicle_id = d_vehicle.id join d_time on f_facts.timestamp = d_time.timestamp join d_roads on f_facts.road_category = d_roads.id where d_vehicle.id = 2 group by d_time.year, d_roads.road_categ...
true
50e724ca39614725dfe09a840dad675f3707751e
SQL
AmolikaJalkote/CitiBridge
/citi.sql
UTF-8
4,812
2.8125
3
[]
no_license
-- MySQL dump 10.13 Distrib 5.7.21, for Win64 (x86_64) -- -- Host: 127.0.0.1 Database: citi -- ------------------------------------------------------ -- Server version 5.7.21 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;...
true
d16d44be9461ff5f960937efa75cd884914986b7
SQL
saidali/DatabaseObjects-DSS
/Tables/sec_user_form_access.sql
UTF-8
1,671
3.375
3
[]
no_license
ALTER TABLE DSS.SEC_USER_FORM_ACCESS DROP PRIMARY KEY CASCADE; DROP TABLE DSS.SEC_USER_FORM_ACCESS CASCADE CONSTRAINTS; CREATE TABLE DSS.SEC_USER_FORM_ACCESS ( USER_NAME VARCHAR2(100 BYTE), FORM_ID NUMBER, MODIFY_DATE DATE, EXPIRY_DATE DATE DEFAULT SYSDATE + 100, CREAT...
true
f7d349fa82ea457fc9951c1cdd1160c22036b13e
SQL
RodriguezL75/database-exercises
/tables-lesson.sql
UTF-8
405
3.109375
3
[]
no_license
SELECT user, host FROM mysql.user; SHOW DATABASES; CREATE DATABASE IF NOT EXISTS tables_lesson_db; CREATE TABLE flights( id INT UNSIGNED NOT NULL AUTO_INCREMENT, destination CHAR(3) NOT NULL, departs_from CHAR(3) NOT NULL, price DOUBLE NOT NULL, desccription TEXT departs_at DATETIME NOT NULL,--'2018-08-10 14:05:55'...
true
003cfb5c39c1241a9e3e4fb7ddd40494cb4bd403
SQL
gahvilan/delphi-gym
/Scripts Base de Datos/TablaArticulo.sql
UTF-8
194
2.6875
3
[]
no_license
CREATE TABLE ARTICULOS( ID_ARTICULO INTEGER NOT NULL, NOMBRE VARCHAR(50), PRECIO DECIMAL(8,3) ); ALTER TABLE ARTICULOS ADD CONSTRAINT PK_ARTICULOS PRIMARY KEY(ID_ARTICULO);
true
30de162a90f5b9c5a4251e6bb9d32e1d9b786c30
SQL
dakine1111/MySQL-AutoXtraBackup
/prepare_env_test_mode/innodb_online_alter_encryption_alters.sql
UTF-8
993
2.546875
3
[ "MIT" ]
permissive
use alter_enc_inc; ALTER TABLE t1 ADD COLUMN b INT DEFAULT 2; ALTER TABLE t2 ADD COLUMN b INT DEFAULT 2; ALTER TABLE t7 ADD COLUMN b INT DEFAULT 2; ALTER TABLE t1 ADD KEY a(a), ADD KEY b(b); ALTER TABLE t2 ADD KEY a(a), ADD KEY b(b); ALTER TABLE t3 ADD COLUMN c INT DEFAULT 5; ALTER TABLE t4 ADD COLUMN c INT DEFAULT 5;...
true
6db95c4d8bfc597072ccee1aff3341a14d0de496
SQL
Xuan555/bitekeji
/班级管理/60班/数据库/0708.sql
UTF-8
3,041
4.3125
4
[]
no_license
update students set score = 90 where name = "孙悟空"; update students set qq = 12345, score = 60 where name = "曹阿瞒"; update students set score = score * 2; delete from students where name = "孙悟空"; truncate students; CREATE TABLE egres ( id INT UNSIGNED PRIMARY KEY AUTO_INCREMENT, name VARCHAR(20) NOT NULL COMMENT ...
true
035afbf1c30d501d354b5b1c04797bea1717b921
SQL
kumokay/my_learning
/09_minikube/example/project/payment/setup.sql
UTF-8
1,266
3.859375
4
[ "Apache-2.0" ]
permissive
/* export MYSQLHOST=<cluster ip> mysql --host=$MYSQLHOST --port=3306 --user=root --password=mypassword < setup.sql */ /* setup payment_db */ DROP DATABASE payment_db ; CREATE DATABASE payment_db DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ; USE payment_db ; CREATE TABLE transactions ( PRIMARY KEY (id) , ...
true
fecb8f0db98356c26207d1e6513c3d7038073bad
SQL
jojoasd123/SpringBootDemo
/src/main/resources/db/migration/V1__init.sql
UTF-8
2,144
3.21875
3
[]
no_license
CREATE TABLE `comment` ( `id` bigint(20) NOT NULL AUTO_INCREMENT, `parent_id` bigint(20) NOT NULL COMMENT '父类ID', `type` int(11) NOT NULL COMMENT '父类类型', `commentator` bigint(20) NOT NULL, `gmt_create` bigint(20) NOT NULL, `gmt_modified` bigint(20)...
true