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
5218833fd0768a40bb50b2d5da330fdbc7593678
SQL
stpettersens/csql2mongo
/sample.sql
UTF-8
871
2.890625
3
[ "MIT" ]
permissive
-- SQL table dump from MongoDB collection: sample (sample.json -> sample.sql) -- Generated by: cmongo2sql 1.0.1 (https://github.com/stpettersens/cmongo2sql) -- Generated at: 2015-04-15 18:58:38.744000 DROP TABLE IF EXISTS `sample`; CREATE TABLE IF NOT EXISTS `sample` ( _id VARCHAR(30) NOT NULL, name VARCHAR(50) NOT NU...
true
79fc8c8a5557b86c4be11b12e94eedee8e089c91
SQL
MahfuzurRahmanMiah/SQL_drills
/Query3.sql
UTF-8
192
3.15625
3
[]
no_license
-- <<Assignment from SQL Basics>> -- -- The min temperatures of all the -- occurrences of rain in zip 94301 SELECT mintemperaturef FROM weather WHERE events = 'Rain' AND zip = 94107;
true
fd93b001b294e1ee1d13957f869147250c6a73e1
SQL
ROHITSARABU/online-shoping
/shopingbackend/databaseQueries.sql
UTF-8
4,281
3.625
4
[]
no_license
CREATE TABLE category( id IDENTITY, name VARCHAR(50), description VARCHAR(255), image_URL VARCHAR(50), is_active BOOLEAN, CONSTRAINT pk_category_id PRIMARY KEY(id) ); insert into category ( name , description , image_url , is_active ) values ( 'laptop ', 'this is description for laptop category',...
true
bf4b824335d6737afdfb0faf9b3bc2163c874267
SQL
dalejo3000/Generador-Certificados-V3
/carrito.sql
UTF-8
3,677
3.296875
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 5.0.2 -- https://www.phpmyadmin.net/ -- -- Servidor: 127.0.0.1 -- Tiempo de generación: 22-03-2021 a las 02:20:57 -- Versión del servidor: 10.1.33-MariaDB -- Versión de PHP: 7.4.8 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_...
true
18b7d02af226792311ebcabe9bcbf5c2c9935262
SQL
Gre3eN/Detective
/SQL_tables/detective_table_savestate.sql
UTF-8
354
2.515625
3
[]
no_license
-- -------------------------------------------------------- -- -- Tabellenstruktur für Tabelle `savestate` -- CREATE TABLE `savestate` ( `PlayerID` int(11) NOT NULL, `SceneID` int(11) NOT NULL, `DialogID` int(11) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='Speicherstand...
true
1ebb37a72bb83311d80c7f20291def208bcd7c0e
SQL
sdss/sdssdb
/schema/sdss5db/catalogdb/kic/v10/kepler_input_10_index.sql
UTF-8
1,459
3.03125
3
[ "BSD-3-Clause" ]
permissive
/* indices for catalogdb tables, to be run after bulk uploads psql -f gaia_dr2_index.sql -U sdss sdss5db drop index catalogdb.gaia_dr1_tgas_dec_index; */ -- kic_ra is in hours. Convert to degrees. ALTER TABLE catalogdb.kepler_input_10 ADD COLUMN kic_ra_deg DOUBLE PRECISION; UPDATE catalogdb.kepler_input_10 SET k...
true
ddfaa9ed5b0a19981bcacbc49896a6a8ca0eea2b
SQL
josepitteloud/VESPA
/Vespa Projects/276 - Adsmart New Attributes exploration/CR111 - Asia Package.sql
UTF-8
2,884
3.5
4
[]
no_license
/* ***************************** $$$ I$$$ I$$$ $$$$$$$$ I$$$ $$$$$ $$$ZDD DDDDDDD. ,$$$$$$$$ I$$$ $$$$$$$ $$$ ODD ODDDZ 7DDDD ?$$$, I$$$ $$$$. $$$$ $$$= ODD DDD NDD ...
true
1829d68c407206853dbbc2db0f73542ea0b24133
SQL
ttrace122/Deforestation-Exploration-Data-Analysis
/sql/regional_outlook.sql
UTF-8
4,255
4.4375
4
[ "LicenseRef-scancode-public-domain" ]
permissive
/* ------------- Part 2 - Regional Outlook ------------- */ /* Create a table that shows the regions and their percent forest areain 1990 and 2016. */ CREATE VIEW regional_outlook_ft AS SELECT year, region, ROUND(CAST(100.00*((sum_forest_area_sqkm)/(sum_total_area_sqkm)) AS NUMERIC), 2) AS percentage_forestati...
true
e37932952e153ff048b8145b9e7fc1ca97366e96
SQL
hoangtuananh97/musiconline
/musiconline.sql
UTF-8
17,107
3.015625
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.5.1 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: Jul 12, 2018 at 04:23 AM -- Server version: 10.1.13-MariaDB -- PHP Version: 5.6.23 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CL...
true
d0ff5b8ff9e237430b217be710d6f3714e0c5c4e
SQL
GEoURo/DBS_Lab1
/src/add_borrow.sql
UTF-8
3,118
2.6875
3
[]
no_license
insert into borrow values('00000001', '0002', to_date('2019-3-20', 'YYYY-MM-DD'),NULL); update borrow set return_date = to_date('2019-4-17', 'YYYY-MM-DD') where book_id = '00000001' and reader_id = '0002' and borrow_date = to_date('2019-3-20', 'YYYY-MM-DD'); insert into borrow values('00000001', '0001', to_date...
true
75d8396d76629a34b55d3695d2a97f77feef89c2
SQL
Tiago-Pujia/proyecto-turnos
/sql/triggers.sql
UTF-8
8,107
3.515625
4
[]
no_license
DELIMITER // CREATE TRIGGER after_cambios_usuarios AFTER UPDATE ON tbl_usuarios FOR EACH ROW BEGIN DECLARE tabla VARCHAR(100) DEFAULT 'tbl_usuarios'; DECLARE id_registro INT UNSIGNED; SET id_registro = (OLD.id_usuario); IF (NEW.nombre != OLD.nombre) THEN CALL insert_log(tabla,'nombre',id_...
true
082ea33f1ae0db3a995f4a19eea6d01399bd2f0b
SQL
stefanorosanelli/bedita4-design
/be4-schema.sql
UTF-8
14,875
3.671875
4
[]
no_license
-- max num characters -- TINYTEXT 256 -- TEXT 65536 -- MEDIUMTEXT 16777216 -- LONGTEXT 4294967296 -- unsigned max values -- TINYINT 255 -- SMALLINT 65535 -- MEDIUMINT 16777215 -- INT 4294967295 -- BIGINT 18446744073709551615 SET FOREIGN_KEY_CHECKS=0; -- -----------------...
true
e4c66b7c9cb144a81e4032f7288b534450bf9d4e
SQL
Liusyuanyu/Spirng2019CourseAssignments
/Web&Mobile Database Development CS-648/My SQL codes/Final capstone project script(Create db).sql
UTF-8
13,926
3.265625
3
[]
no_license
/* Hsuan Yu Liu 823327369 CS 648 Final Capstone Project script */ /******************************************************** * Create a database named rfid_store_db *********************************************************/ -- MySQL Script generated by MySQL Workbench -- Mon May 6 12:33:34 2019 -- Model: New Model ...
true
178fb065796b5d949ed4c5c38c04ec06658a09cd
SQL
mckenzma/pandemic-neo4j
/pandemic.cql
UTF-8
1,350
3.578125
4
[]
no_license
//Pandemic Game in Neo4j // Create Cities LOAD CSV WITH HEADERS FROM "https://docs.google.com/spreadsheets/u/0/d/1Z8R-lJ-cNGYeWDvMfjqhaj-a9wTVJwRIXCT8DacQvsc/export?format=csv&id=1Z8R-lJ-cNGYeWDvMfjqhaj-a9wTVJwRIXCT8DacQvsc&gid=0" AS row FIELDTERMINATOR ',' MERGE (city:City {name: row.City}) ON CREATE SET city.name =...
true
18a49066eb4627677d93c4c9803195bba11b7f55
SQL
imbok-pro/IManServer
/Scripts/SP/SP-BRCM#DUMP.sql
WINDOWS-1251
15,864
3.296875
3
[ "Apache-2.0" ]
permissive
-- BRCM#DUMP -- file: SP-BRCM#DUMP.sql -- by PF -- This file is distributed under Apache License 2.0 (01.2004). -- http://www.apache.org/licenses/ -- create 2019-09-16 -- update 2019-09-25 2019-10-31:2019-11-05 2021-04-20 CREATE GLOBAL TEMPORARY TABLE "SP"."BRCM_EQP" ( EQP_RID Number NOT NULL, ...
true
e694d84dace3c36a00f5c3018fba76de3526838a
SQL
ricgrisant/industria
/sql/SignUP.sql
UTF-8
1,968
3.5625
4
[]
no_license
DROP PROCEDURE IF EXISTS Funcion_SignUp_Cliente; DELIMITER $$ CREATE PROCEDURE Funcion_SignUp_Cliente( IN pc_userPassword VARCHAR(50), IN pc_nombre VARCHAR(50), IN pc_apellido VARCHAR(50), IN pc_telefono VARCHAR(50), IN pc_correo VARCHAR(50), OUT pcMensaje VARCHAR(2000), OUT pbOcurreError BOOLEA...
true
885319b6a611f5a0f925ccb59cae170d66f3dcab
SQL
zhanghqgit/Seven-Weeks-Series
/Seven-Web-Frameworks-In-Seven-Weeks/clojure/zap/day1/resources/data/schema.sql
UTF-8
717
3.375
3
[]
no_license
-- zap schema CREATE TABLE project ( id INTEGER PRIMARY KEY, name TEXT NOT NULL ); CREATE TABLE issue ( id INTEGER PRIMARY KEY, project_id INTEGER REFERENCES project(id) NOT NULL, title TEXT NOT NULL, description TEXT NOT NULL, status INTEGER REFERENCES status(id) NOT NULL ); CREATE TABLE status ( id...
true
a54601361888e74f652edbe37407c3fc02a0ca1b
SQL
hxmn/WIM
/WIM/WIM_GATEWAY/WIM_LOADER/MVs/well_node_versionprbstg_mv.sql
UTF-8
3,766
2.8125
3
[]
no_license
drop materialized view WELL_NODE_VERSIONPRBSTG_MV ; CREATE MATERIALIZED VIEW "WIM_LOADER"."WELL_NODE_VERSIONPRBSTG_MV" ("NODE_ID", "SOURCE", "NODE_OBS_NO", "ACQUISITION_ID", "ACTIVE_IND", "COUNTRY", "COUNTY", "EASTING", "EASTING_OUOM", "EFFECTIVE_DATE", "ELEV", "ELEV_OUOM", "EW_DIRECTION", "EXPIRY_DATE", "GEOG_...
true
76764f9eb63688fea24a9c6b84a6c8743fe95ec1
SQL
ATBMHTTT-2017/lab01-1212172-1412037-1412340
/policy_04_1212172.sql
UTF-8
659
3.09375
3
[ "Apache-2.0" ]
permissive
--Giam Doc duoc phep xem thong tin du an CREATE OR REPLACE VIEW View_GiamDoc_DuAn AS SELECT da.maDA, da.tenDA, da.kinhPhi, pb.tenPhong AS phongChuTri, cn.tenCN as ChiNhanh, nv.hoTen as truongDuAn FROM DuAn da, ChiNhanh cn, NhanVien nv, PhongBan pb ...
true
e449974e8a17322a6ef0dd8a413cce5a5ebe2448
SQL
r-n-i/blog
/resources/migrations/20170427195338-entries.up.sql
UTF-8
331
3.25
3
[]
no_license
CREATE TABLE IF NOT EXISTS entries( id int(11) NOT NULL AUTO_INCREMENT, user_id int(11) NOT NULL, title varchar(255) NOT NULL, body mediumtext NOT NULL, created_at timestamp DEFAULT 0, updated_at timestamp, PRIMARY KEY (id) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; --;; CREATE INDEX entries_user_id on entries...
true
11ecdb9ee38aaa8e4c85f553f9a06790a58b40bf
SQL
sd6364152/Wb_da_script
/Quinn/killer/留存下降分析/未游戏用户中未实名认证的用户数.sql
UTF-8
2,235
4.0625
4
[]
no_license
-- 在没有游戏的新注册用户中,有多少用户触发了实名认证策略,且没有进行实名认证 SELECT t20.date, count(t20.distinct_id)AS `未游戏用户数`, count(t10.distinct_id)AS `未游戏用户中未提交实名认证的用户数` FROM (SELECT t1.date, --触发了实名认证但是没有提交实名认证的用户数 t1.distinct_id FROM (SELECT date, regist_type, distinct_id FROM e...
true
de58bdb36f2d5fee94f2aed42b100da0b1356ed6
SQL
dsireusa/programs
/sql/schema.sql
UTF-8
28,780
3.109375
3
[]
no_license
-- MySQL dump 10.15 Distrib 10.0.21-MariaDB, for Linux (x86_64) -- -- Host: localhost Database: ncsolar -- ------------------------------------------------------ -- Server version 10.0.21-MariaDB /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_S...
true
330d0723746fcab21bad61da3295ef900ae7cad7
SQL
dmfabritius/fbla-conf-app
/SQL scripts/Perf Testing - Number of Judges per Event.sql
UTF-8
416
3.953125
4
[ "MIT" ]
permissive
select EventID, MaxJudges=MAX(NumJudges) from (select EventID, MemberID, NumJudges=COUNT(JudgeID) from (select JC.EventID, JC.JudgeID, JR.MemberID from JudgeCredentials JC inner join JudgeResponses JR on JC.JudgeID=JR.JudgeID where ConferenceID=2058 group by JC.EventID, JC.JudgeID, JR.MemberID having SUM(...
true
2ee2fd3983d56bb8fcb148f15cd16a314bc8ebe8
SQL
nacio1/Polla3x2
/polla3x2.sql
UTF-8
18,419
2.921875
3
[ "MIT" ]
permissive
-- phpMyAdmin SQL Dump -- version 4.8.5 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Jun 30, 2020 at 07:12 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
eb4229a29703d3fe1534dc9aa0d4aa434e570eee
SQL
esemi/ya-local-graph
/structure.sql
UTF-8
4,793
3.390625
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: plpgsql; Type: EXTENSION; Schema: -; Owner: -- CREATE EXTENSION IF NOT EXISTS plpgs...
true
e48b00ca395c7340e8699628606e7e85f04f18b3
SQL
Shtereva/CSharp-DB-Fundametals---MS-SQL-Basics
/Databases Basics - MS SQL Server/Exam Preparaton II/10. Customers without Feedback.sql
UTF-8
182
3.671875
4
[ "MIT" ]
permissive
SELECT CONCAT(c.FirstName , ' ', c.LastName) AS [CustomerName], c.PhoneNumber, c.Gender FROM Customers AS c WHERE c.Id NOT IN (SELECT CustomerId FROM Feedbacks) ORDER BY c.Id
true
eda69da33a4f6864097ebac7703dced8b639fd5f
SQL
rindratiana/test_saimltd
/SAIMLTD/SAIMLTD/App_Data/sql/script.sql
UTF-8
484
2.875
3
[]
no_license
CREATE DATABASE test_saimltd_bdd; USE test_saimltd_bdd; CREATE TABLE Client ( id int auto_increment primary key, denomination varchar(500) not null, adresse text, telephone varchar(15), mail varchar(200), siren varchar(15), activite text, capital double, forme_juridique varchar(10) ); CREATE TABLE Contact_...
true
a2b2861785f7a25370fb389bd4a1763334cfd1b4
SQL
ChrisJamesHassell/Software-Engineering
/PlatypusDatabase/Event/events.sql
UTF-8
1,352
2.96875
3
[]
no_license
-- -------------------------------------------------------- -- Host: 127.0.0.1 -- Server version: 10.3.10-MariaDB - mariadb.org binary distribution -- Server OS: Win64 -- HeidiSQL Version: 9.4.0.5125 -- -------------------------------------------...
true
cf3baa703f10f1c823c1266af49fb5d0a5b61457
SQL
Defendy-C/recorder
/service/file_sys/model/filesys.sql
UTF-8
461
3.109375
3
[]
no_license
CREATE DATABASE IF NOT EXISTS recorder DEFAULT CHARACTER SET utf8mb4; use recorder; create table file_sys ( id INT NOT NULL AUTO_INCREMENT, path VARCHAR(255) DEFAULT '' COMMENT '存放路径', created_at DATETIME DEFAULT 0 COMMENT '创建时间', finished_at DATETIME DEFAULT 0 COMMENT '完成时间',...
true
d5d2c01213ebd6c51e5e10def69c247f6324ef39
SQL
willianrefky/SI_Toko_Robby
/dbtoko (1).sql
UTF-8
8,415
3.125
3
[ "LicenseRef-scancode-unknown-license-reference", "MIT" ]
permissive
-- phpMyAdmin SQL Dump -- version 4.8.5 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Oct 15, 2019 at 05:32 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
918e8adb440272b406e1a6779bf1ad6d7039374d
SQL
Ruminat/PL-SQL-labs
/labs/4 lab/4-3.sql
UTF-8
535
3.140625
3
[]
no_license
VARIABLE dept_id NUMBER; DECLARE max_deptno NUMBER; dept_name Departments.Department_Name%TYPE := 'Education'; BEGIN SELECT MAX(Department_ID) INTO max_deptno FROM Departments; :dept_id := max_deptno + 10; INSERT INTO Departments (Department_ID, Department_Name, Location_ID) VALUES ...
true
fcadee69b4f3eae6d226704a4dd4d0d7b541afce
SQL
scieloorg/opac-airflow
/airflow/migrations/0001-add-execution-report-tables-202002041716.sql
UTF-8
2,323
3.5
4
[ "BSD-2-Clause", "BSD-3-Clause", "LicenseRef-scancode-unknown-license-reference" ]
permissive
/* * A tabela xml_documents guarda o registro de iterações dos xmls que estão dentro * de um pacote SPS. * * Para cada artigo registrado ou deletado durante a sincronização, nós adicionamos * uma entrada nesta tabela. */ CREATE TABLE IF NOT EXISTS xml_documents ( id SERIAL PRIMARY KEY, pid varchar(23) NULL, ...
true
f9bc357040b73332eed9482e074c1481576530ff
SQL
annazar123/PKL
/ci3/tb_siswa.sql
UTF-8
1,665
3.078125
3
[ "MIT", "LicenseRef-scancode-unknown-license-reference" ]
permissive
-- phpMyAdmin SQL Dump -- version 4.8.5 -- https://www.phpmyadmin.net/ -- -- Host: localhost:3306 -- Generation Time: Aug 03, 2020 at 09:22 AM -- Server version: 5.7.24 -- PHP Version: 7.2.19 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CH...
true
090781a32101c4db286be661503f63dbdd9675cd
SQL
KingAndrew/The-Social-Choring-Engine
/SocialChoringEngine/src/main/resources/sql/create_account.sql
UTF-8
898
3.375
3
[]
no_license
-- -------------------------------------------------------------------------------- -- Routine DDL -- Note: comments before and after the routine body will not be stored by the server -- -------------------------------------------------------------------------------- DELIMITER $$ CREATE DEFINER=`root`@`localhost...
true
dc116f99ceb79d61b0f254573f6d404fdf997d0c
SQL
shijaihui/Library-Management-System
/libsys.sql
UTF-8
15,209
3.28125
3
[]
no_license
/* Navicat MySQL Data Transfer Source Server : wamp Source Server Version : 50723 Source Host : localhost:3306 Source Database : libsys Target Server Type : MYSQL Target Server Version : 50723 File Encoding : 65001 Date: 2018-10-26 00:17:35 */ SET FOREIGN_KEY_CHECKS=0; -- -------...
true
fe56c10dcd738bab86adc9a75a0165fbdd3e9180
SQL
cadl272/civ6mods
/1681296547/Core/Anacaona_Leader.sql
UTF-8
2,218
2.765625
3
[]
no_license
/* Leader Authors: ChimpanG */ ----------------------------------------------- -- Types ----------------------------------------------- INSERT INTO Types (Type, Kind ) VALUES ('LEADER_CVS_ANACAONA', 'KIND_LEADER' ); ----------------------------------------------- -- CivilizationLeaders ------------------...
true
ae95b08f1edc628397680d92aa0b2adebc6df1ce
SQL
techgod/AirlineManagementSystem
/Phase-2/queries.sql
UTF-8
1,378
3.671875
4
[]
no_license
/*Find avg salary of captain in airline*/ select avg(salary) from employee where designation='CAPTAIN'; /*Find details of oldest aircraft*/ select serial_no, age from airplane where age = (select max(age) from airplane); /*Find fligths flying to bengaluru*/ select flight_no,destination,dep_time,arv_time from flights...
true
109c2f2c2379c1f785b743e52e2504a534d597a8
SQL
adisemicolon/pemrograman-desktop
/dbakademik.sql
UTF-8
4,892
2.609375
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.5.1 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: 29 Mei 2017 pada 14.54 -- Versi Server: 10.1.9-MariaDB -- PHP Version: 5.6.15 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT ...
true
b783af77faf9d78db6afcdff68c3c6d66a1a6deb
SQL
Adrish1999/SQL-Database-Management-System
/Day-02 Sales/Query_08.sql
UTF-8
259
3.453125
3
[]
no_license
/* Find products whose selling price is more than 1500. Calculate a new selling price as original selling price * .15. Rename the new column in the above query as new_price.*/ SELECT *, Sell_price*0.15 `New_price` FROM product_master WHERE Sell_price > 500;
true
29514a8bb2ef3b459afaa1da80a806f07efece89
SQL
raghavraman/RUC
/db.sql
UTF-8
1,916
3.40625
3
[]
no_license
CREATE TABLE IF NOT Exists `ruc_users` ( `user_id` int(11) NOT NULL, `email` varchar(50) NOT NULL UNIQUE, `first_name` varchar(50) DEFAULT NULL, `last_name` varchar(50) DEFAULT NULL, `age` int(3) DEFAULT NULL, `email` varchar(128) COLLATE utf8_unicode_ci NOT NULL, `name` varchar(128) COLLATE utf8_unicode_...
true
d57cda6a9267b8e698f38e33aef49e345e7b8ec6
SQL
hervekaffo/LaravelAjax
/db.sql
UTF-8
177,030
3.515625
4
[]
no_license
-- -------------------------------------------------------- -- Hôte : localhost -- Version du serveur: 5.7.19 - MySQL Community Server (GPL) -- SE du serveur: Win64 -- HeidiSQL Version: 9.4.0.5125 -- -------------------------------------------------------- /*...
true
0d83288472d1c08ea014bd732959bd2770c32335
SQL
dong-df/ovirt-engine
/packaging/dbscripts/upgrade/04_05_0290_change_default_display.sql
UTF-8
1,792
3.328125
3
[ "Apache-2.0" ]
permissive
-- Removing all graphics from blank template DELETE FROM vm_device WHERE type = 'graphics' AND vm_id = '00000000-0000-0000-0000-000000000000' AND EXISTS (select 1 from vm_static where vm_guid = '00000000-0000-0000-0000-000000000000' AND default_display_type = 1); -- Add VNC graphics to blank template INSERT IN...
true
7f8ecab96f97471e42be35db586dd4ba512b5081
SQL
saskiafebe/UAS-Object-Based-Programming
/ekspedisi.sql
UTF-8
16,557
2.90625
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.3.11 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: Jan 13, 2018 at 09:06 AM -- Server version: 5.6.24 -- PHP Version: 5.6.8 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; ...
true
bb0b356ff0a556f018a065a15d4b2f5a91d1aae4
SQL
msdickinson/DickinsonBros.Bus
/DickinsonBros.Bus.SQL/StoredProcedures/DeleteUser.sql
UTF-8
276
3.0625
3
[]
no_license
CREATE PROCEDURE [ServiceBus].[DeleteUser] @token UNIQUEIDENTIFIER AS IF (SELECT COUNT(*) FROM [ServiceBus].[User] WHERE [UserToken] = @token) = 0 THROW 51000, 'The User does not exist.', 1; ELSE DELETE FROM [ServiceBus].[User] WHERE [UserToken] = @token RETURN 0
true
2528d313bb6046de53b132441620ff1bdca601ef
SQL
Abhilash-Mandlekar/LeetCode
/M626_Exchange Seats.sql
UTF-8
430
4.09375
4
[]
no_license
/* Write your T-SQL query statement below */ with cte (Id1, Student1, Id2, Student2)as ((select * from seat s1 left join seat s2 on S1.ID = S2.ID - 1 and s2.Id % 2 = 0 WHERE S1.ID % 2 != 0 ) union all (select * from seat s1 left join seat s2 on S1.ID = S2.ID + 1 and s1.Id % 2 = 0 WHERE S2.ID IS NOT NULL)) select...
true
65f38adb5e7c5d2bd1cbe7f02c9eb14d52d7e2c0
SQL
murari-goswami/bi
/ETL/DataVirtuality/views/tableau/tableau.mgmt_sandbox_all_calls.sql
UTF-8
584
3.46875
3
[]
no_license
-- Name: tableau.mgmt_sandbox_all_calls -- Created: 2015-05-08 10:24:20 -- Updated: 2015-05-08 10:24:20 CREATE VIEW tableau.mgmt_sandbox_all_calls AS SELECT c.customer_id, c.phone_number, n.date_called, n.waiting_time, CAST(CASE WHEN n.call_duration > 90 THEN n.call_duration ELSE null END as float)/60 as call_d...
true
21db6174fd10c117434a254146a240ab9e6c45b5
SQL
harsha547/ClassicModels-Database-Queries
/challenges/OnetoMany_Relationship/query_04.sql
UTF-8
195
3.015625
3
[]
no_license
-- 4. Report the products that have not been sold. SELECT * from products where not exists ( SELECT * FROM orderdetails WHERE products.productCode = orderdetails.productCode )
true
68f532b4aaecb20adfb7c134093696b502ec83cd
SQL
DYankova/UsersFeatures
/src/database/20171209.sql
UTF-8
1,818
3.53125
4
[]
no_license
CREATE DATABASE USER_SETTINGS; USE USER_SETTINGS; CREATE TABLE users ( id int(11) NOT NULL AUTO_INCREMENT, username varchar(45) NOT NULL, email varchar(45) NOT NULL, PRIMARY KEY (id) ); CREATE TABLE features( id int(11) NOT NULL AUTO_INCREMENT, name varchar(45) NOT NULL, enabled boolean DEFAULT true, ...
true
4c17041b095f6a0a15eeba825bd780d7e51628b0
SQL
slagovskiy/psa
/Update/Update.1.5.9.1222/Import/before.18.sql
UTF-8
224
3.234375
3
[]
no_license
ALTER TABLE dbo.orderevent ADD CONSTRAINT PK_orderevent PRIMARY KEY CLUSTERED ( id_orderevent ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
true
f91a36ee2ed6129be7f1b29db2d8166ab041661d
SQL
rhuidean/python_april_2017
/Jason/sakila.sql
UTF-8
1,093
4
4
[]
no_license
/*Customers inside city_id=32*/ select first_name, last_name, email, address from customer as cu join address as ad on cu.address_id=ad.address_id where ad.city_id= 312; /*All comedy films*/ select f.title, f.description, f.release_year, f.special_features from film as f join film_category as fc on f.film_id = fc.film...
true
529bdf20a02788b7a0388cb56a25c6965740fd56
SQL
eprakars/Inventory
/createTable.sql
UTF-8
4,397
3.171875
3
[]
no_license
drop table Account; drop table ItemBeli; drop table ItemJual; drop table FakturBeli; drop table FakturJual; drop table Stock; drop table Pembayaran; drop table Customer; drop table Supplier; drop table salesperson; create table Account (_password varchar(100) primary key, _role int default 0) insert into Accoun...
true
7ec2449ad87698797ca27ab2591df07a87db3935
SQL
AneAniks/Encryption-and-Decryption-APP
/localhost.sql
UTF-8
4,740
3.03125
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.7.5 -- https://www.phpmyadmin.net/ -- -- Host: localhost -- Generation Time: Jun 05, 2019 at 09:58 PM -- Server version: 5.6.34 -- PHP Version: 7.1.11 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACT...
true
2c21380ea77ff44e11824542f3693ee1f2d86018
SQL
NiladriGoswami/Online-Voting-System
/Online-Voting-System/polling.sql
UTF-8
4,200
2.953125
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.7.9 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1:3306 -- Generation Time: Apr 27, 2018 at 03:09 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
b3422e0dd1b74f1c2a181f7d951ab18cb82b7ca7
SQL
Newwharf/habit
/init.sql
UTF-8
9,107
3.546875
4
[]
no_license
-- MySQL Script generated by MySQL Workbench -- Thu Jan 18 15:11:32 2018 -- Model: New Model Version: 1.0 -- MySQL Workbench Forward Engineering SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0; SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0; SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='TR...
true
ce36853f5ce1d68040deeb95c86bc1fa14880613
SQL
Ruidouk/git_pratice
/population_years.sql
UTF-8
157,043
2.671875
3
[]
no_license
BEGIN TRANSACTION; CREATE TABLE IF NOT EXISTS "population_years" ( "country" STRING NOT NULL, "population" NUMBER, "year" NUMBER ); INSERT INTO "population_years" VALUES ('Bermuda',0.06306,2000); INSERT INTO "population_years" VALUES ('Bermuda',0.06361,2001); INSERT INTO "population_years" VALUES ('Bermuda',0.06418,...
true
64c7e96af66b221be3b5f8ebedce80732c673c5a
SQL
sea-kg/ga-safa
/gasafa.sql
UTF-8
1,166
2.9375
3
[ "MIT" ]
permissive
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_RESULTS=@@CHARACTER_SET_RESULTS */; /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; /*!40101 SET NAMES utf8 */; CREATE TABLE IF NOT EXI...
true
2ccc5268e602257d9bbe45d6a4a49dc8af160635
SQL
Pajtak/Generation_MySQL
/CursoOnline - Exercício 6 - 25-10-2021.sql
UTF-8
3,602
3.96875
4
[ "Apache-2.0" ]
permissive
/*Crie um banco de dados para um serviço de um site de cursos onlines, o nome do banco deverá ter o seguinte nome db_cursoDaMinhaVida, onde o sistema trabalhará com as informações dos produtos desta empresa. O sistema trabalhará com 2 tabelas tb_curso e tb_categoria. siga exatamente esse passo a passo: Crie uma tabe...
true
47dd2a44cc1e4340cc2b3eaae7da6f1450ca6575
SQL
Lucyferius/youtube_telegram_bot
/src/main/resources/db/migration/V1__init.sql
UTF-8
1,132
3.640625
4
[]
no_license
create table bot_states ( id int not null primary key, description text not null ); insert into bot_states (id, description) values (0,'READY'); insert into bot_states (id, description) values (1,'BUSY'); create table bot_users ( id bigserial primary key, user_name text not n...
true
5abe10541a8ccb5b1d625fedb046fbdbd8152ec3
SQL
20143104/KMU
/2018-1/데이터 베이스/MySQL Report-2018/CompanyDB/companydb_department.sql
UTF-8
2,395
3.046875
3
[]
no_license
CREATE DATABASE IF NOT EXISTS `companydb` /*!40100 DEFAULT CHARACTER SET utf8 */; USE `companydb`; -- MySQL dump 10.13 Distrib 5.7.8-rc, for Win64 (x86_64) -- -- Host: localhost Database: companydb -- ------------------------------------------------------ -- Server version 5.7.8-rc-log /*!40101 SET @OLD_C...
true
503fc2cbbdba5e611fdb80af6ed1720ec8a1649c
SQL
RichezA/progHELHA
/2eme/Programmation/Labs/SQL/sql10-19.sql
UTF-8
3,870
3.78125
4
[]
no_license
--creation PRAGMA foreign_keys = ON; CREATE TABLE User ( userID INT NOT NULL, name varchar(255) DEFAULT NULL, surname varchar(255) DEFAULT NULL, PRIMARY KEY(userID) ); CREATE TABLE Poll ( pollID INT NOT NULL, name varchar(255) DEFAULT NULL, description TEXT DEFAULT NULL, createDate DAT...
true
20050e33037d7107ed84ea2db22be6ca2e6cc29d
SQL
algebrateam/phpdev2019
/pmrvic/mysql_vjezbe/zadaci 3.4.sql
UTF-8
3,482
4.40625
4
[ "MIT" ]
permissive
use fakultet; -- zadatak 3.2 -- ispisi maticne brojeve, a ime i prezime studenta u jednom polju SELECT stud.mbrStud, stud.imeStud, stud.prezStud FROM stud; -- zadatak 3.3 -- ispisi jedinstvena imena studenata SELECT DISTINCT stud.imeStud FROM stud ORDER BY stud.imeStud DESC; -- zadatak 3.3 -- drugi način sa group ...
true
938ef71ed53f5ecc9493e0d9e5fd4fdf9ec10a6d
SQL
momor666/Academic-LabWork
/Database Lab/Lab3/EMPLOYEE.SQL
UTF-8
2,770
3.40625
3
[]
no_license
drop table dependent; drop table employee; drop table department; CREATE TABLE DEPARTMENT (DNAME VARCHAR2(15), DNUMBER NUMBER(2) NOT NULL, MGRSSN NUMBER(12), MGRSTARTDATE DATE, PRIMARY KEY (dnumber) ); CREATE TABLE employee (FNAME VARCHAR2(15), MINIT V...
true
2de64bd165b341a43245b15716f905fffd4f26e3
SQL
AnikMuhib/Hospital_Management_System
/Create Index Statements.sql
UTF-8
2,511
3.203125
3
[]
no_license
--(1)----------------------------------------------------------------------------------------------------- Create Index idx_CareCenterName ON Care_Center(CareCenterName); Create Index idx_RPatientRoomNum ON Resident_Patient(RoomNumber); Create Index idx_BedRoomNum ON BED(RoomNumber); Create Index idx_BedCareCenter...
true
d38f74f65c6c376d1c39415886c7a66cbe504462
SQL
RohitJhander/Mentora
/Backend/startup/mysql/create_table.sql
UTF-8
720
3.4375
3
[]
no_license
create table personal_profile( id int not null auto_increment, name varchar(255), email varchar(255), phone varchar(255), gender varchar(255), city varchar(255), country varchar(255), fb text, pic text, primary key (id), index (email), index (phone) )engine=InnoDB; create table education_profile( educa...
true
4d0f752eb5d026a956b79a6799208de113446740
SQL
malughanshyam/MachineLearningFinalProject
/SQL/SelectQueries.sql
UTF-8
7,312
2.65625
3
[]
no_license
select count(*) from test_raw; --48707 select count(*) from training_raw; --72983 select count(*) from test_raw_with_mm_yyyy; --48707 select count(*) from training_raw_with_mm_yyyy; --72983 select count(*) from test_exluding_f5_f8_f9_f10_f11_f13_f27_f28_f30; --48707 select count(*) from training_exluding_f5_f8_f9_f10...
true
82083ec1bfc906197c17b63ae7f46e411da00f9e
SQL
aniskop/plsql-parser
/src/test/resources/type_definition.sql
UTF-8
669
2.703125
3
[]
no_license
declare type nested_table is table of number; type nested_table is table of varchar2(4000); type nested_table is table of number(11,2); type "Nested table 123" is table of "Customer type"; type associative_array is table of number index by varchar2(200); type associative_array is tab...
true
71803c3c096b332837fb3939cda828e396f2dfd6
SQL
cocktail-office/RGrhum
/_sql_dist/0.1.0.0/01_grhum_rgrhum-0.1.0.0.sql
UTF-8
2,488
3.765625
4
[]
no_license
-- -- Script SQL de GRHUM pour integration les tables de l'application RGrhum (Validation du référentiel) à executer depuis le user GRHUM -- -- **************************** -- ** ATTENTION ** -- **************************** -- Ceci n'est pas un patch GRhum, pour annuler les modifications apportées par ces ...
true
603e43536d2a6680c985995cd651a8a6f45ea5c5
SQL
ddRPB/platform
/core/resources/schemas/dbscripts/postgresql/obsolete/core-18.30-18.31.sql
UTF-8
1,389
2.9375
3
[]
no_license
/* * Copyright (c) 2018-2019 LabKey Corporation * * 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.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable l...
true
528b0ed2c495b5def9d547b7c19a3a7b0bd4d2ab
SQL
datenfruehstueck/replicate
/database.sql
UTF-8
1,748
3.328125
3
[ "MIT" ]
permissive
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; /*!40101 SET NAMES utf8mb4 */; CREATE TABLE `replication` ( `uid` int(11) UNSIGNED NOT NULL, `orig_doi` varchar(20...
true
6b611bd5d123e42d24cf819893bceda735002f0c
SQL
leroniris/MysqlNotes
/mysql基础/JoinSelect.sql
UTF-8
6,341
4.90625
5
[]
no_license
#进阶6:连接查询 /* 含义:又称多表查询,当查询的字段来自于多个表时,就会用到连接查询 笛卡尔乘积现象:表1 有m行,表2有n行,结果=m*n行 发生原因:没有有效的连接条件 如何避免:添加有效的连接条件 分类: 按年代分类: sql92标准:仅仅支持内连接 sql99标准:支持内连接+外连接(左外+右外)+交叉连接 按功能分类: 内连接: 等值连接 非等值连接 自连接 外连接: 左外连接 右外连接 全外连接 交叉连接: */ SELECT * FROM beauty; SELECT * FROM boys; SELECT `name`, boyNam...
true
dd394c4fa7efae1e4e4807e9d86ea0cc075bc8de
SQL
object1985/javastudy
/tonaise-javaee/tonaise-test/src/test/resources/jp/co/tonaise/test/CreateTableDBHelperTest.sql
UTF-8
3,431
3.515625
4
[]
no_license
--検証用コメント /* 検証用コメント */ /* ユーザーテーブル */ CREATE TABLE IF NOT EXISTS AP_USER ( USER_ID CHARACTER VARYING(20) NOT NULL, NAME CHARACTER VARYING(256) NOT NULL, BIRTHDAY DATE, AGE INT NOT NULL, ROLE_ID CHARACTER VARYING(1) NOT NULL, DELETE_FLG CHARACTER(1) NOT NULL DEFAULT '0', CREATED_AT TIMESTAMP, CREATE...
true
fd601880c4d4b718dccd2df034f1cd34f25bc166
SQL
hvescovi/sql2019
/aula10-SQLs/01-enviados/02.sql
UTF-8
3,331
4.0625
4
[]
no_license
drop database if exists exec_aeroporto; create database if not exists exec_aeroporto; use exec_aeroporto; create table if not exists passageiro( ds_nome varchar(100) not null, ds_cpf varchar(15), primary key(ds_cpf) ); create table if not exists aviao( ds_placa varchar(100) not null, ds_nome varchar(100) not ...
true
6567e71549656aa3f045b0b8b2ed4e63c8390bac
SQL
greenphantom/Heroku-Store
/store/src/scripts/createDBTables.sql
UTF-8
600
3.125
3
[]
no_license
SHOW TABLES; DROP TABLE IF EXISTS products, customers, carts, purchased; SHOW TABLES; CREATE TABLE customers(id SERIAL, fname VARCHAR(255), lname VARCHAR(255), username VARCHAR(255), email VARCHAR(255), UNIQUE(id, username)); CREATE TABLE products(itemId SERIAL, name VARCHAR(255), msrp DECIMAL(6,2), salePrice DECIMAL(8...
true
a8c621155415b797b04ec2420513df45d327c703
SQL
GTimur/keyarch
/sql/key_info.sql
UTF-8
7,257
2.71875
3
[]
no_license
 CREATE TABLE "XXI"."KEY_INFO" ( "IKEYNUM" NUMBER(12,0) NOT NULL ENABLE, "INPP" NUMBER(12,0) NOT NULL ENABLE, "DREGDATE" DATE, "CRGEVENT" VARCHAR2(500), "ICLICUSID" NUMBER(12,0) NOT NULL ENABLE, "CCLINAME" VARCHAR2(500), "CSGNID" VARCHAR2(500), "IFACECUSID" NUMBER(12,0), "CFACENAME1" VARCHAR2(50...
true
a8d0553023f6c8efad127c317ac6ac05d35d12be
SQL
ZakharovS/Testing
/Testing2.4.4/src/main/resources/testing.sql
UTF-8
17,165
3.171875
3
[]
no_license
-- -------------------------------------------------------- -- Сервер: 127.0.0.1 -- Версія сервера: 5.6.20 - MySQL Community Server (GPL) -- ОС сервера: Win64 -- HeidiSQL Версія: 9.1.0.4867 -- -------------------------------------------------------- /*...
true
03cf9595b6c554313a5f9e529d354aaa11796a9c
SQL
SSaipriya23/feedback-analysis
/feedback.sql
UTF-8
4,712
2.875
3
[]
no_license
-- MySQL dump 10.13 Distrib 5.7.22, for osx10.13 (x86_64) -- -- Host: 127.0.0.1 Database: feedback -- ------------------------------------------------------ -- Server version 5.7.21 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;...
true
3d32b2f197deacacb63f2574205f82c4c746c71f
SQL
RuslanYusupov1/DZ1
/20210512/Задание sql 29.sql
UTF-8
641
3.328125
3
[]
no_license
Задание: 29 (Serge I: 2003-02-14) В предположении, что приход и расход денег на каждом пункте приема фиксируется не чаще одного раза в день [т.е. первичный ключ (пункт, дата)], написать запрос с выходными данными (пункт, дата, приход, расход). Использовать таблицы Income_o и Outcome_o. select isnull(a.point, b....
true
2288d9471693845e8ef70268e0ef457d0fa4eba5
SQL
pedromlcosta/LBAW
/proto.sql
UTF-8
3,181
3.3125
3
[]
no_license
DROP SCHEMA IF EXISTS proto CASCADE; CREATE SCHEMA proto; SET SCHEMA 'proto'; CREATE TABLE users ( username varchar PRIMARY KEY, realname varchar NOT NULL, password varchar NOT NULL ); CREATE TABLE tweets ( id SERIAL PRIMARY KEY, time timestamp NOT NULL, username varchar REFERENCES users NOT NULL, tex...
true
9e96a74488a7a4b10284a137dda50621971792ae
SQL
rohan299p/GRIP-TSF_tsfBank
/sql/sparks_bank.sql
UTF-8
2,942
3.3125
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 5.0.4 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Jun 13, 2021 at 09:19 PM -- Server version: 10.4.16-MariaDB -- PHP Version: 7.4.12 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIE...
true
4d1cef4e8a5d42287782003a43d918f13a02ea8e
SQL
margoober/codeup_database_exercises
/update_exercises.sql
UTF-8
647
3.234375
3
[]
no_license
USE codeup_test_db; SELECT "1. All albums & sales in hundred thousands:" AS ""; UPDATE albums SET sales_in_millions = sales_in_millions * 10 WHERE id >= 0; SELECT name AS "", artist AS "", sales_in_millions AS "" FROM albums; SELECT "2. All albums pre-1880:" AS ""; UPDATE albums SET release_date = release_date - 10...
true
9fa4093694ad5805f5ff64160d32feffe812e4e5
SQL
DWhite1234/studyCodes
/mysql/day02/DQL.sql
UTF-8
678
3.546875
4
[]
no_license
-- DQL的关键字以及执行顺序,和聚合函数 SELECT # 5.查询结果 FROM # 1.确定表 WHERE # 2.过滤表数据 GROUP BY # 3.分组 HAVING # 4.过滤聚合函数 ORDER BY # 6.将结果排序 asc(升序,默认值)|desc(降序) LIMIT # 7.将结果分页,或截取 常用的五种聚合函数: MAX(字段):求最大值 MIN(字段):求最小值 COUNT(字段):满足条件的数据条数 AVG(字段):求平均值 SUM(字段):求和 注意点: 1. GROUP BY,SELECT: 当使用了GROUP BY之后,select 后面只能跟...
true
faa139fe98fdbb392e3af6911ebf30ad7dccb814
SQL
Asbaharoon/ERP_Garment_Ver-1
/ERP_Garment_Ver-1/MySqlDump/garmentsystem_salary_table.sql
UTF-8
2,624
3.125
3
[]
no_license
CREATE DATABASE IF NOT EXISTS `garmentsystem` /*!40100 DEFAULT CHARACTER SET latin1 */; USE `garmentsystem`; -- MySQL dump 10.13 Distrib 5.7.17, for Win64 (x86_64) -- -- Host: itp2016ver1fdgd.cht0bvbob1wj.us-west-2.rds.amazonaws.com Database: garmentsystem -- --------------------------------------------------...
true
4babfab7665448aac047cd9b48900c816d6da13c
SQL
andreysoares/mimic-code
/concepts/organfailure/kdigo-stages-7day.sql
UTF-8
4,012
3.890625
4
[ "MIT" ]
permissive
-- This query checks if the patient had AKI according to KDIGO on admission -- AKI can be defined either using data from the first 2 days, or first 7 days -- For urine output: the highest UO in hours 0-48 is used -- For creatinine: the creatinine value from days 0-2 or 0-7 is used. -- Baseline creatinine is defined as...
true
2b73c504a1a7e99f073456788b078aa157885635
SQL
AristovEV/SQL-ex
/homework9.sql
UTF-8
3,366
4.46875
4
[]
no_license
--task1 (lesson8) -- oracle: https://leetcode.com/problems/department-top-three-salaries/ select Department,Employee,salary from( select d.Name as Department,e.name as Employee ,salary, dense_rank() over (partition by departmentid order by salary desc) from employee e join department d on d.id=e.depa...
true
f41ad0557811b8bc457ffac5ee49c757c77c6fa4
SQL
iSC-Labs/Fittime
/PHP Files/fitness_test.sql
UTF-8
15,327
3
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.5.1 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: Mar 23, 2017 at 04:29 PM -- Server version: 10.1.19-MariaDB -- PHP Version: 5.6.28 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CL...
true
793263ff42766e90795fe0080c829e6e5d25f9dc
SQL
skilbjo/lambdas
/s3-logger/dev-resources/query1.sql
UTF-8
2,139
3.46875
3
[ "MIT" ]
permissive
with access_logs as ( select cast(date_parse(s3.datetime,'%d/%b/%Y:%H:%i:%S +%f') as date) date, s3.bucket, s3.requestor_id, s3.http_status, s3.error_code, s3.user_agent, s3.key, s3.request_uri_key, (case when s3.operation in ('REST.GET.OBJECT', 'R...
true
df450f5347a89004af545de799b720ebc1733ffe
SQL
guillez/ramas
/sql/ddl/20_Tablas/mgi_responsable_academica.sql
ISO-8859-2
1,121
3
3
[]
no_license
-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -- SIU-Kolla 4 - Mdulo de Gestin de Encuestas -- Versin 4.3 -- Tabla: mgi_responsable_academica -- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -- DROP TABLE IF EXISTS mgi_responsable_academica; CREAT...
true
666e84339ad1c3f53f70fd2ae12c0d494942f9af
SQL
yasinfaruk/BITM_Atomic_Project
/BITM.sql
UTF-8
7,048
2.765625
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.2.12deb2+deb8u1build0.15.04.1 -- http://www.phpmyadmin.net -- -- Host: localhost -- Generation Time: Jan 12, 2016 at 11:35 AM -- Server version: 5.6.27-0ubuntu0.15.04.1 -- PHP Version: 5.6.4-4ubuntu6.4 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET ...
true
1ed5097b27d74903b24d9b4b626bd1aa8f1bb0a2
SQL
MayowaShoyinka/Dufuna-CodeCamp20
/submissions/cynthiaNwakaeme/databases/init.sql
UTF-8
5,909
3.5625
4
[]
no_license
-- CREATED MY E-COMMERCE DATABASE CREATE DATABASE taries_empire; USE taries_empire; -- CREATED TABLES FOR E-COMMERCE DATABASE -- 1) ADMINISTRATORS -- A) Created the admins table CREATE TABLE admins ( admin_id INT NOT NULL AUTO_INCREMENT, name VARCHAR(50) NOT NULL, email VARCHAR(50) NOT NULL, password ...
true
4f65db736c8ccf974bd8fcdbe8f3844bca5be155
SQL
amataku/yayoifes_analyzer
/database/design/table.sql
UTF-8
213
2.65625
3
[]
no_license
CREATE TABLE customer( id MEDIUMINT NOT NULL AUTO_INCREMENT PRIMARY KEY, -- ID visit_date DATETIME NOT NULL, -- 来た時刻 sex ENUM('female', 'male', 'neither'), -- 性別 age INT NOT NULL -- 年齢 );
true
25bc850e68e53a9a8efd48ec0807e6b957540bc4
SQL
LuisPerez94/Punto_Venta
/src/export.sql
ISO-8859-10
83,056
2.8125
3
[]
no_license
-------------------------------------------------------- -- Archivo creado - viernes-junio-12-2015 -------------------------------------------------------- -------------------------------------------------------- -- DDL for Table ALMACEN -------------------------------------------------------- CREATE TABLE "...
true
3c58d7409bceba090dc812a74c524fa67a686ac5
SQL
ellelang/EAmosm
/de-target/conversion.sql
UTF-8
6,649
3.65625
4
[]
no_license
/*+ ETLM { depend:{ add:[ { name:"adw_metrics_glue.WRT_SEGMENTS_CONV", age:{days:3} } ] } } */ WITH filtered_ads as --ad meet criteria 2,3,6,7 ( SELECT dads.dim_ad_id as ad_id FROM adw_metrics_glue.dim_ads dads INNER JOIN adw_metrics_glue.dim_campaigns dcam...
true
9fe28fe3577c53bd49734d46eb515cd1ae3a8128
SQL
Deepesh-Tank/Online-Electronic-Store-Using-Spring-MVC-Hibernate
/sql-scripts/AutoPower.sql
UTF-8
540
2.703125
3
[]
no_license
#DROP DATABASE `AutoPower`; CREATE DATABASE IF NOT EXISTS `AutoPower` /*!40100 DEFAULT CHARACTER SET latin1 */; USE `AutoPower`; create table `customer` ( `id` varchar(100) , `first_name` varchar(100) , `last_name` varchar(100) , `local_address` varchar(100) , `city` varchar(100) , ...
true
a88104878455f821775f1c55f0de61f40035833b
SQL
MdJannatunNimeNishat/bloodbank
/blood_bank.sql
UTF-8
2,553
3.015625
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 5.0.2 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Aug 11, 2020 at 09:54 AM -- Server version: 10.4.11-MariaDB -- PHP Version: 7.2.29 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIE...
true
1e2e04b4037626c4793776fdb8ad916a1c6090e4
SQL
ConstantineUA/accountant.dev
/app/config/structure.sql
UTF-8
1,465
3.359375
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.0.10deb1 -- http://www.phpmyadmin.net -- -- Host: localhost -- Generation Time: Sep 24, 2015 at 12:08 AM -- Server version: 5.5.43-0ubuntu0.14.04.1 -- PHP Version: 5.5.9-1ubuntu4.9 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; -- -- Database: `accountant` -- --...
true
61ecb30b9385b1727c4cf3beeae1b2ef1f4692f6
SQL
Yuukio/Documentos_SIBCATIE
/Bases de Datos/BD_SIBCATIE.sql
UTF-8
15,494
3.109375
3
[]
no_license
-- MySQL Script generated by MySQL Workbench -- Wed Jun 13 01:59:03 2018 -- Model: New Model Version: 1.0 -- MySQL Workbench Forward Engineering SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0; SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0; SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='TR...
true
3b45261da98a20af35c160c54d1c852ab1cbe4ca
SQL
youngmeezz/sql
/select/집계.sql
UTF-8
3,761
4.8125
5
[]
no_license
SELECT AVG(salary), SUM(salary) FROM salaries WHERE emp_no = '10060'; -- 10060까지 가서 그 위에 까지 출력 SELECT emp_no, AVG(salary) AS avg_salary, SUM(salary) FROM salaries WHERE to_date = '9999-01-01' GROUP BY emp_no HAVING avg_salary > 40000 ORDER BY avg_salary ASC; -- 예제1 : 각 사원별로 평균연봉 출력 (~별 gro...
true
25f44ce7142ad4e1baa0c0fda8f60070c34def7e
SQL
Peyton-Woods/csc321_group2
/7-11 Queries.sql
UTF-8
550
4
4
[]
no_license
Select CustFName, CustLName, LEFT(CustFName, 1)+ LEFT(CustLName, 1) AS Initials From Orders; Select Distinct FoodID,SUM(FoodCount) from OrderLineItems group by FoodID order by FoodID; Select TOP 5 Price, FoodID From Product Order By Price DESC; Select FoodID, Price From Product Where Price...
true
ea69ebfa7aca17fddb4cedb9a6f67b7da3d8bb8c
SQL
OezcanEser/Expensee
/backend/db/db.sql
UTF-8
701
3.421875
3
[]
no_license
create table users( id Serial PRIMARY KEY, username VARCHAR(100) NOT NULL, password VARCHAR(100) NOT NULL, email VARCHAR(100) NOT NULL, ); create table wallets ( id Serial PRIMARY KEY, category VARCHAR(100) NOT NULL, description VARCHAR(200) NOT NULL, price real NOT NULL, created_at ...
true
8ff4fc2d1277b93b0323c305111964b0ff36c10a
SQL
hasnathm99/construction_management_system
/db/machines.sql
UTF-8
2,173
3.09375
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.7.4 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Sep 13, 2018 at 12:03 PM -- Server version: 10.1.29-MariaDB -- PHP Version: 7.2.0 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD...
true