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
acef6c9081281c73470a99c78601bad1c21832fa
SQL
philfactor/tsql
/Get_NumberOfDBConnections.sql
UTF-8
359
3.328125
3
[]
no_license
-- http://stackoverflow.com/questions/216007/how-to-determine-total-number-of-open-active-connections-in-ms-sql-server-2005 -- number of connections per DB SELECT DB_NAME(dbid) as DBName, COUNT(dbid) as NumberOfConnections, loginame as LoginName FROM sys.sysprocesses WHERE dbid > 0 ...
true
ba8328265ccda4f094d9bc73e17fbf85c7345d01
SQL
WY362641643/AID1811
/个人笔记/MySQL笔记整理/子句(e)/group by子句.sql
UTF-8
1,063
4.125
4
[]
no_license
group by 子句 - 作用:对查询结果进行分组,通常和聚合函数配合使用 - 格式:group by 分组字段名称 - 示例: e.g. 统计各种状态账户数据量 select acct_type "账户类型", count(*) "数量" from acct group by acct_type; e.g. 统计各类账户余额的最大值 select acct_type "账户类型",max(balance) "最大余额" from acct group by acct_type; - SQL语句的执...
true
427882853f087b986fc357d8c69366b2e133fe75
SQL
ifrankwang/spring-boot-demo
/files/database/roles.sql
UTF-8
556
3.359375
3
[]
no_license
USE `test`; DROP TABLE IF EXISTS `roles`; CREATE TABLE `roles` ( `id` bigint(32) NOT NULL AUTO_INCREMENT, `name` varchar(32) COLLATE utf8_bin NOT NULL COMMENT '角色名称', `description` varchar(32) COLLATE utf8_bin NOT NULL COMMENT '角色描述', PRIMARY KEY (`id`) ) ENGINE = InnoD...
true
f8728da443debc343fd18e5024635c910883d2af
SQL
crisscience/cris
/cris-db/cris/scripts/20131101165200_add_term_table.sql
UTF-8
2,663
3.3125
3
[ "BSD-3-Clause", "Apache-2.0" ]
permissive
-- Migration SQL that makes the change goes here. CREATE TABLE "public"."term" ( "id" serial NOT NULL, "asset_type_id" int4 NULL, "vocabulary_uuid" uuid NULL, "vocabulary_id" int4 NULL, "is_template" boolean NULL, "uuid" uuid NOT NULL, "version_num...
true
48005cec01da48ce95783a3bf2cab1cf87cf3ee3
SQL
JuanPabloImperiale/TesisPHP
/slparking.sql
UTF-8
10,240
3.046875
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.7.0 -- https://www.phpmyadmin.net/ -- -- Servidor: localhost -- Tiempo de generación: 07-07-2017 a las 15:17:42 -- Versión del servidor: 10.1.22-MariaDB -- Versión de PHP: 7.1.4 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone ...
true
c86672072e982eb9b8149a417799068d49644bc4
SQL
geosconsulting/sql_bonanza
/stats_calc/stat_test_clc.sql
UTF-8
1,073
3.703125
4
[]
no_license
WITH -- feature of interest burnt_area AS(SELECT id As area_id, ST_Transform(geom,3035) as geom_proj FROM effis.burnt_area_spatial as b WHERE b.id= 168888), -- clip all bands to boundaries then get stats for these clipped regions values_area AS(SELECT (stats).*,...
true
8b775f03960b0c3463afe1eae381d975ff34244a
SQL
mdjukic/repos
/q_weworks/q_python_scripts/q_SQL_scripts/dim_date_fiscal_update_insert.sql
UTF-8
13,983
2.78125
3
[]
no_license
CREATE TABLE IF NOT EXISTS stage.fiscal_calendar_dim ( row_id integer NOT NULL , batch_id integer DEFAULT 1 NOT NULL , reporting_date date NOT NULL , reporting_date_period_type smallint NOT NULL , retailer_bkey varchar(20) NOT NULL , calendar_date date NOT NULL...
true
77bbeda1a81af5ae165f9f71616a45724a74d775
SQL
leosaglia/HeyBus
/HeyBus/BD/Stored Procedures/SPs_Passagem.sql
UTF-8
996
3.25
3
[]
no_license
Use HeyBus; /*<----------------Passagem-------------->*/ Delimiter $$ create procedure SP_Comprar_Passagem (in cliente int, in viagem int, in formPag int, in cpf char(14), in desconto decimal(4,2), in valor decimal(4,2), in data_Compra datetime) begin insert into Passagem(id_Cliente, id_Viagem, id_FormPag, cpf, desc...
true
1fb89ea69426dbb8442b934ab7f3e664ae3223b3
SQL
alexmv/scheduling
/doc/schema.sql
UTF-8
3,948
3.171875
3
[]
no_license
-- MySQL dump 10.11 -- -- Host: localhost Database: scheduling -- ------------------------------------------------------ -- Server version 5.0.70-log /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!40101 SET @OLD_COLLATION_CONN...
true
f70d4d2a13be7c3bfc7b1a2d868418465aec2478
SQL
Guilleminl/Projet_Guillemin_Jaber
/basededonneejava.sql
UTF-8
4,087
3.671875
4
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.8.5 -- https://www.phpmyadmin.net/ -- -- Hôte : 127.0.0.1 -- Généré le : sam. 27 avr. 2019 à 10:55 -- Version du serveur : 10.1.38-MariaDB -- Version de PHP : 7.3.2 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101...
true
8640da38c4b571108b146b881858249ed0ec437e
SQL
Kate-peretyatko/Firebird
/Триггеры/tr3.sql
UTF-8
405
3.28125
3
[]
no_license
create exception we_already_have_this_ex 'Error. We already have this excursion'; create trigger add_excursion for contracts_excursions before insert as declare variable ex integer; begin ex=-1; select excursions_id from contracts_excursions where(excursions_id=new.excursions_id)and(contract_id=new.contract...
true
7ceb0b00e736606bdc23d5a93dedd68bffefa31a
SQL
prjromy/ChannakyaBase
/ChaBase/fin/Tables/ANominee.sql
UTF-8
717
2.84375
3
[]
no_license
CREATE TABLE [fin].[ANominee] ( [NID] INT IDENTITY (1, 1) NOT NULL, [IAccno] INT NOT NULL, [NomNam] VARCHAR (100) NOT NULL, [NomRel] VARCHAR (100) NOT NULL, [CCertID] TINYINT NULL, [CCertno] VARCHAR (25) NULL, [Shar...
true
5631427f83815c4e6c9ce3ed445e51d9148dc5c0
SQL
italoxmns/TCC_UNICEUB
/BANCO_DE_DADOS/BACKUP_RESTORE/municipiostcc_routines.sql
UTF-8
3,341
2.984375
3
[]
no_license
CREATE DATABASE IF NOT EXISTS `municipiostcc` /*!40100 DEFAULT CHARACTER SET utf8 */; USE `municipiostcc`; -- MySQL dump 10.13 Distrib 5.7.17, for Win64 (x86_64) -- -- Host: 127.0.0.1 Database: municipiostcc -- ------------------------------------------------------ -- Server version 5.5.5-10.1.33-MariaDB /*!40101...
true
f4c60e80ef5b4f6efda13b156122c8ee1dfc1b38
SQL
Arvesh/platform
/dental/db.sql
UTF-8
1,841
3.140625
3
[]
no_license
/* Navicat MySQL Data Transfer Source Server : databases Source Server Version : 50141 Source Host : localhost:3306 Source Database : db_dental Target Server Type : MYSQL Target Server Version : 50141 File Encoding : 65001 Date: 2012-09-08 17:42:33 */ SET FOREIGN_KEY_CHECKS=0; --...
true
325c0965713ea1456aceca9c5c94c8de32cf955d
SQL
robmoore-i/LanguageLearning
/database/courses/german.cql
UTF-8
2,581
3.421875
3
[]
no_license
CREATE (german:Course {name: "German", image: "flagGermany.jpg"}) CREATE (german)-[:HAS_TOPIC_LESSON {index: 0}]->(clothes:TopicLesson {name: "Clothes"}) CREATE (german)-[:HAS_TOPIC_LESSON {index: 1}]->(colours:TopicLesson {name: "Colours"}) CREATE (german)-[:HAS_TOPIC_LESSON {index: 2}]->(meat:TopicLesson {name: "Food...
true
55d0ffd19355d2a5f9cb485a7656b4fcf133afc4
SQL
bitgittry/BaseCodeAnalysis
/trunk/dbv/stored_routines/PlayLimitCheckExceeded.sql
UTF-8
403
2.53125
3
[]
no_license
DROP function IF EXISTS `PlayLimitCheckExceeded`; DELIMITER $$ CREATE DEFINER=`bit8_admin`@`127.0.0.1` FUNCTION `PlayLimitCheckExceeded`(transactionAmount DECIMAL(18, 5), sessionID BIGINT, clientStatID BIGINT, licenseType VARCHAR(20)) RETURNS tinyint(1) DETERMINISTIC BEGIN RETURN PlayLimitCheckExceededWithGame(t...
true
eb1ad9bd04d61684515ca8dd62dd51b11a61d840
SQL
kissthink/siwei_naotu
/Mysql 综合.sql
UTF-8
2,698
4.125
4
[]
no_license
drop DATABASE testdb 删除数据库 create database ManagenmentDB; use ManagenmentDB; -----------------------------创建表----------------------- CREATE table if not EXISTS Student -- - 创建学生表 ( S_ID int auto_increment primary key, -- ID S_S char(12) not null unique, -- 学号 S_name varchar(5) not null, S_age tinyint UNSIGNED not ...
true
a34a76ec296ac967ca9b6e686510a37530321c3b
SQL
javiomoreno/Software-Planta-de-Produccion-V2
/MER/script3.sql
UTF-8
3,286
3.375
3
[]
no_license
CREATE TABLE ppr_estaciones ( estacons INTEGER UNSIGNED NOT NULL AUTO_INCREMENT, estanomb VARCHAR(50) NULL , PRIMARY KEY(estacons)); // ppr_estaciones = Tabla de estaciones // estacons = Consecutivo // estanomb = Nombre de la Estación CREATE TABLE ppr_usuarios ( usuacons INTEGER UNSIGNED NOT NULL AUTO...
true
4ec267378cb39c9e829ad7ebfa5a5891cda2e45d
SQL
JeonWookTae/feature_backoffice
/tabel_schema.sql
UTF-8
643
2.609375
3
[]
no_license
CREATE TABLE login_test.`accounts`( `user_no` int(11) unsigned NOT NULL AUTO_INCREMENT, `user_name` varchar(32) NOT NULL COMMENT '이름', `user_id` varchar(32) NOT NULL COMMENT '아이디', `user_password` varchar(300) NOT NULL COMMENT '패스워드', `user_email` varchar(32) NOT NULL COMMENT '이메일', `user_phone` varchar(32) NOT N...
true
814db9193d140e2a0f758032fd6cfac019af3c2e
SQL
vari-ang/Matawarga
/matawarga.sql
UTF-8
3,276
3.671875
4
[]
no_license
CREATE DATABASE IF NOT EXISTS `matawarga` DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; USE `matawarga`; CREATE TABLE `gambar_kejadian` ( `idgambar` int(11) NOT NULL, `idkejadian` int(11) NOT NULL, `extension` varchar(5) COLLATE utf8mb4_unicode_ci NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf...
true
d280d8b8ba69d27af74713a26dfad89d3774ee09
SQL
openit/Oracle_SQL_Scripts
/dba_owner_to_tablespace_segment.sql
UTF-8
1,214
3.53125
4
[]
no_license
-- | PURPOSE : Provide a summary report of owner to tablespace for all | -- | segments in the database. | -- | NOTE : As with any code, ensure to test this script in a development | -- | environment before attempting to run it in production. ...
true
bb7469ec939916906e29d8438843db15f498f843
SQL
ClickHouse/ClickHouse
/tests/queries/0_stateless/00642_cast.sql
UTF-8
925
3.234375
3
[ "Apache-2.0", "BSL-1.0" ]
permissive
SELECT CAST(1 AS Enum8('hello' = 1, 'world' = 2)); SELECT cast(1 AS Enum8('hello' = 1, 'world' = 2)); SELECT CAST(1, 'Enum8(\'hello\' = 1, \'world\' = 2)'); SELECT cast(1, 'Enum8(\'hello\' = 1, \'world\' = 2)'); SELECT CAST(1 AS Enum8( 'hello' = 1, 'world' = 2)); SELECT cast(1 AS Enum8( 'hello' = 1, ...
true
6c69b619930a75a7fc62e9717d50fc8a69320e89
SQL
ndhbr/databases
/cap-4/sheet-3/exercise14.sql
UTF-8
361
3.265625
3
[]
no_license
-- 14 -- Kreuzprodukt SELECT AT.BEZEICHNUNG, AT2.BEZEICHNUNG, T.ANZAHL, T.EINHEIT FROM TEILESTRUKTUR T, ARTIKEL AT, ARTIKEL AT2 WHERE AT.ANR = T.ARTNR AND AT2.ANR = T.EINZELTEILNR; -- Join SELECT AT.BEZEICHNUNG, AT2.BEZEICHNUNG, T.ANZAHL, T.EINHEIT FROM TEILESTRUKTUR T JOIN ARTIKEL AT ON T.ARTNR = AT.ANR JOIN...
true
70f11ba9be484b872731bed480a8f974e2c9ab7e
SQL
PhoenixPP7/Demo_DAO_MVC
/WebRoot/WEB-INF/classes/mvc/util/数据库创建脚本.sql
UTF-8
547
2.796875
3
[]
no_license
DROP TABLE admin PURGE ; CREATE TABLE admin( aid VARCHAR2(50), password VARCHAR2(32), CONSTRAINTS pk_aid PRIMARY KEY(aid) ) ; --'password' 通过MD5加密后的内容= '5d41402abc4b2a76b9719d911017c592' ; INSERT INTO admin(aid,password) VALUES('admin','5d41402abc4b2a76b9719d911017c592') ; --'java' 通过MD5加密后的内容= '93f725a07423...
true
231dd5f65c774c39ee9a9d30ccbcbf7530f17ee3
SQL
WagnerBragaBispo/SQL_Oracle
/PerfilDigitalByTome.sql
UTF-8
1,283
2.734375
3
[]
no_license
--================================================================================================================= -- TABELAS DIPOSNIBILIZADAS PELO TOME /*SELECT * FROM U92277452.TMP_SQD_AA_CLI_DIG_CTRL_CMV; SELECT * FROM U92277452.TMP_SQD_AA_CLI_POS_CMV; SELECT * FROM U92277452.TMP_SQD_A...
true
a821ea4f6e705edf25624a6096a7e3df6d804d8b
SQL
krobath/sql
/code/sql/tables_without_supplemental_logging.sql
UTF-8
1,530
2.953125
3
[]
no_license
SELECT owner, table_name FROM dba_tables a WHERE a.owner NOT IN ('DBSNMP','TRACESVR','AURORA$ORB$UNAUTHENTICATED','AURORA$JIS$UTILITY$','OLAPSYS', 'OSE$HTTP$ADMIN','MDSYS','ORDSYS','ORDPLUGINS','SI_INFORMTN_SCHEMA','CTXSYS','SYSMAN', 'WKSYS','WKUSER','WK_TEST','REPADMIN','LBACSYS','DVF','DVSYS','ODM','ODM_MTR','DMSY...
true
725c946ef57e34227b3fec7eef83c16dc3690f3e
SQL
cristiantela/authorization
/sql_cmd.sql
UTF-8
503
3.21875
3
[]
no_license
create database authorization character set utf8; create table user( id int not null auto_increment, username varchar (30) not null, password varchar (30) not null, primary key (id) )default character set=utf8; create table user_session( id int not null auto_increment, user int not null, token varchar(20) not ...
true
79ba2db5449bdba87d2639286400ff764c8bf8ad
SQL
josephmaxim/cloudestate
/sql/listings.sql
UTF-8
4,024
3.59375
4
[]
no_license
-- Group # : 15 -- Members : Joseph Dagunan, David Bond, Alex Waddell -- File name : listings.sql DROP TABLE IF EXISTS listings; DROP TABLE IF EXISTS status; DROP TABLE IF EXISTS property_options; DROP TABLE IF EXISTS bedrooms; DROP TABLE IF EXISTS bathrooms; DROP TABLE IF EXISTS listing_type; DROP TABLE ...
true
f3ed807ad5a3fccef28a8827e475035f4539c6c2
SQL
TORRE95/AmigosTorre
/BussApp/busapp.sql
UTF-8
4,610
3.109375
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.7.4 -- https://www.phpmyadmin.net/ -- -- Servidor: 127.0.0.1 -- Tiempo de generación: 04-04-2018 a las 19:14:25 -- Versión del servidor: 10.1.28-MariaDB -- Versión de PHP: 7.1.11 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00";...
true
057a71eac2861cd7c3de218f30af6c8272a23516
SQL
zhichao19930808/mysql
/sql/Day0404.sql
UTF-8
1,048
3.578125
4
[]
no_license
-- SQL AND & OR 练习---------------------------------------------------------------------- # 查询基本工资在3000元以上并且不是销售的员工 SELECT * FROM scott.emp WHERE SAL>=3000 AND JOB<>'salesman'; # 查询基本工资在1500以上,并且是销售的员工 SELECT * FROM scott.emp WHERE SAL>=1500 AND JOB='salesman'; -- SQL Order By 排序---------------------------------------...
true
0a1014cf727eb849f44ae68aafc65671839e233f
SQL
andrey7x7/sql_ex
/63.sql
UTF-8
305
3.078125
3
[]
no_license
Определить имена разных пассажиров, когда-либо летевших на одном и том же месте более одного раза. SELECT name FROM Passenger WHERE ID_psg IN ( SELECT ID_psg FROM Pass_in_trip GROUP BY place,ID_psg HAVING count(*) >1 )
true
087eea337a2dd1327dadadf4a7a277b545f4db24
SQL
ranilkhilaviev11/WinFormsApp
/WinFormsApp/dbo.Max_Points_Team.sql
UTF-8
153
3.203125
3
[]
no_license
CREATE PROCEDURE Max_Points_Team AS SELECT * FROM Players WHERE TeamId = (SELECT Id FROM Teams WHERE point = (SELECT MAX(point) AS point FROM Teams))
true
ee9515cd37ab07f0cfe25148a68554205d9dd98a
SQL
XingXing2019/LeetCode
/Database/LeetCode 1479 - SalesByDayOfTheWeek/SalesByDayOfTheWeek_SQLServer.sql
UTF-8
1,120
4.5
4
[]
no_license
WITH temp1 AS (SELECT CASE WHEN DATEPART(WEEKDAY, order_date) = 1 THEN 'Sunday' WHEN DATEPART(WEEKDAY, order_date) = 2 THEN 'Monday' WHEN DATEPART(WEEKDAY, order_date) = 3 THEN 'Tuesday' WHEN DATEPART(WEEKDAY, order_date) = 4 THEN 'Wednesday' WHEN DATEPART(WEEKDAY, order_date) = 5 THEN 'Thursday' WHEN DATEPART(WEEKDAY...
true
3bc28818604c66859e288f351bf06437a3641fe9
SQL
utwente/Groufty
/src/main/resources/named-query/review-expand.sql
UTF-8
1,432
4.34375
4
[]
no_license
-- Select all reviews an author has to do for a specific task id where the review deadline is in the future -- and the submission deadline in the past -- This includes reviews assigned to a group the student is part of -- returns -- review_id, reviewer_name, reviewer_type, submitter_name, submission_audience, submitted...
true
e3f40f4ce68726af72fde203524762a167fac2e9
SQL
DaisukeKikukawa/db
/db/db-challenge3/db-010/db-010.sql
UTF-8
570
4.3125
4
[]
no_license
SELECT users.display_name as ユーザー名,chat_contents.created_at as 投稿日時,chatrooms.chat_name as チャットルーム名 FROM chat_contents JOIN users ON chat_contents.post_user_id = users.id JOIN chatrooms ON chat_contents.chatroom_id = chatrooms.id WHERE users.is_deleted = 0 AND chat_contents.is_deleted = 0 AND chat_contents.crea...
true
f82124a4db56f43ed640cb24145f121b11f93d8a
SQL
jashmead/mapsndata
/sqls/controls.sql
UTF-8
1,402
3.71875
4
[]
no_license
drop table controls; CREATE SEQUENCE controls_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; ALTER TABLE public.controls_id_seq OWNER TO mapsndata; CREATE TABLE controls ( id integer DEFAULT nextval('controls_id_seq'::regclass) NOT NULL, control_type type_t DEFAULT ''...
true
769d83624c857a3a9a7f03db6a25669f9db4e93f
SQL
femiode01/The_winners
/Happiness.sql
UTF-8
850
3.1875
3
[]
no_license
-- Drops the Schools_db if it exists currently -- DROP DATABASE IF EXISTS Happiness; CREATE DATABASE Happiness; -- Makes it available for use USE Happiness; CREATE TABLE Country_lon_lng ( Country Varchar(25) Primary key , Lat double, Lng double ) select * from Country_lon_lng CREATE TABLE Country_Region...
true
e6384c4aa723a3d757f5537704ce8b36a4e564a7
SQL
crispykenil/linkalma_git
/src/db/ddls/sp_pwd_reset_link_insert.sql
UTF-8
2,154
3.75
4
[]
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
5706cd6da6cafa96ac63a615712955f75fd6e6d2
SQL
Ldtm-9804/Fundacit
/fundacite.sql
UTF-8
4,312
3.296875
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.6.6 -- https://www.phpmyadmin.net/ -- -- Servidor: localhost -- Tiempo de generación: 05-03-2020 a las 00:45:38 -- Versión del servidor: 5.7.17-log -- Versión de PHP: 5.6.30 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@...
true
4f31376e070144cf58a4f996306a83358bd111a6
SQL
dead-alchemy/sql-mastery
/1_retriving-data-from-single-table/lesson-4.sql
UTF-8
77
2.640625
3
[]
no_license
select * from order_items where (order_id = 6 and unit_price * quantity > 30)
true
721be2ec2b8f7c9bb1f6925e9e299bd818f95687
SQL
Cicadaes/td
/bestseller/wanalytics-etl-cloud/src/main/resources/hive_create_table.sql
UTF-8
7,108
2.859375
3
[]
no_license
-- Drop database wifianalytics; use wifianalytics; ---用户标签表 CREATE TABLE `tenant_tag_table_template`( `tenant_id` String, `offset` String, `mac` String, `tdid` String, `sex` String, `age` String, `profession` String, `marriage` String, `car` String, `child` String, `mobile_price` String, `mobi...
true
b09f84f9b19e13744088d33e6c775a97aa21514b
SQL
bugasmarcondes/sql
/introduction-jon-flanders/joins.sql
UTF-8
2,170
4.4375
4
[]
no_license
USE contacts; /* CROSS JOIN: Do not do this at home or work or anywhere */ SELECT p.person_first_name, p.person_last_name, e.email_address FROM person p, email_address e /* (INNER) JOIN: Returns records that have matching values in both tables */ SELECT p.person_first...
true
9b3361ff05ea1bc141770aa41ddcffc915e13647
SQL
solitaryreaper/MaizeWebApp
/scripts/maize_view_as_table_refresh_script.sql
UTF-8
5,564
3.9375
4
[]
no_license
/* Postgresql 8.* doesn't have the concept of materialized views. This is a simple attempt to update the persistent tables based on views in maize database. It is triggered once every day via a cron job and checks for the latest incremental changes to the view and pushes it to the corresponding tables. It assumes t...
true
f677e844f1b61c15442393655530ed43407dc84f
SQL
DiegoSilvaDev/Gerir_Backend
/Database - SQL/Gerir_DML.sql
ISO-8859-1
1,837
4.15625
4
[]
no_license
-- DML USE Gerir -- Insere um novo usurio na tabela Usuarios, passando os campos da tabela -- NEWID() - Gera um UNIQUEIDENTIFIER para o id INSERT INTO Usuarios( id,nome,email,senha,tipo) VALUES (NEWID(), ' Fernando Henrique', 'fhguerra@outlook.com','123456', 'Comun') -- Insere um novo usurio sem passsar os campos, ...
true
2cd3aabbafeb344a4ae4f70daf2fb6e78b281642
SQL
BaraSalameh/WebFundamentals
/WebFundamentals/MySql/friendships/7thQuery.sql
UTF-8
333
3.265625
3
[]
no_license
insert into friendships(id,user_id,friend_id) values(5,2,5); select users.first_name,users.last_name,friends.first_name,friends.last_name from users join friendships on users.id = friendships.user_id join users as friends on friends.id = friendships.friend_id where users.first_name like "Eli%" and friends.first_name l...
true
c92842b23ad5f084d653ea21e06c90259ed90fd2
SQL
sgammon/fatcatmap
/fatcatmap/analyzer/data/finance_categories/recipient_percentile.sql
UTF-8
1,074
3.640625
4
[]
no_license
select recipient_type, recipient_ext_id, committee_ext_id, contributor_category, amount, count, PERCENT_RANK() OVER (PARTITION BY contributor_category order by amount ASC) amount_category_rank, PERCENT_RANK() OVER (order by amount ASC) amount_rank, PERCENT_RANK() OVER (PARTITION BY c...
true
6fea8ea20dd1c5f57ae0ba3890edd99892ebb3e7
SQL
NishiokaKazuki/HEW2020
/mysql/initdb.d/999-dummy.sql
UTF-8
2,952
2.765625
3
[ "MIT" ]
permissive
DELETE FROM app_users; INSERT INTO app_users(name, sex, age, sign_id, sign_pw, disabled) VALUES ('じゅんじゅん', 1, 20, "junjun", "secret", false), ('えいぽん', 1, 19, "eipon", "secret", false), ('なっかー', 1, 20, "nakkar", "secret", true), ('ぶでぃ', 1, 24, "debu", "secret", true), ('おかぽん', 1, 20, "okapon", "secr...
true
45ab453c2ebcd3a40902950b992f86a14174bd24
SQL
rkeene/RivetCGI
/packages/session/session-create.sql
UTF-8
621
3.140625
3
[ "Apache-2.0" ]
permissive
-- -- Define SQL tables for session management code -- -- $Id: session-create.sql,v 1.1 2004/01/05 21:08:26 karl Exp $ -- -- create table rivet_session( ip_address inet, session_start_time timestamp, session_update_time timestamp, session_id varchar, UNIQUE( session_id ) ); create table rivet_s...
true
c148884cd42cd279216ef6c8fb9752fd4bfb2f63
SQL
sohelatbs23/scripts
/sql/script-for-top-10-query-by-cpu-time.sql
UTF-8
1,117
3.8125
4
[]
no_license
SELECT TOP 5000 SUBSTRING(qt.TEXT, (qs.statement_start_offset/2)+1, ((CASE qs.statement_end_offset WHEN -1 THEN DATALENGTH(qt.TEXT) ELSE qs.statement_end_offset END - qs.statement_start_offset)/2)+1),qs.execution_count, qs.total_worker_time/(qs.execution_count*1000) avg_worker_time_in_ms, qs.total_worker_time,qs.t...
true
63710def58ee9ef28d0020777f32ffc2ff34026b
SQL
vcampanholi/SimplesEstoque
/simples-ear/src/main/application/META-INF/CreateDB.sql
UTF-8
3,966
3.765625
4
[]
no_license
-- Table: public.usuarios CREATE TABLE public.usuarios ( id bigint NOT NULL, email character varying(255) COLLATE pg_catalog."default", nome character varying(255) COLLATE pg_catalog."default" NOT NULL, CONSTRAINT pk_usuarios PRIMARY KEY (id) ) TABLESPACE pg_default; ALTER TABLE public.usuarios OWNER ...
true
f1d6518cc4e1ee8450964542a1970978e716569e
SQL
xiachunjun/ggstudy
/ggstudy-spring-boot/doc/ggstudy_bak.sql
UTF-8
4,102
3.140625
3
[]
no_license
/* Navicat Premium Data Transfer Source Server : local Source Server Type : MySQL Source Server Version : 80012 Source Host : 127.0.0.1:3306 Source Schema : ggstudy_bak Target Server Type : MySQL Target Server Version : 80012 File Encoding : 65001 Date: 27/09/2018 11...
true
a6678dbc06793a86fb442dff5166e0b508dcfba3
SQL
shmehdi01/quote_api_ktor
/resources/db/migration/V1__initial_tables.sql
UTF-8
505
3.0625
3
[]
no_license
create TABLE Users ( id int auto_increment, name varchar(100) not null, email varchar(100) unique, password varchar(100), active tinyint, primary key(id) ); create TABLE Quotes ( id int auto_increment, quote varchar(100) not null, author varchar(100) , authorId varchar(100) , ...
true
d40bb3709855f2907be255e31a02ae666c3e80be
SQL
ChengshengDeng/Leetcode-SQL-Learning
/Medium/1355_Answer.sql
UTF-8
428
3.84375
4
[]
no_license
SELECT a.activity FROM( SELECT t.activity FROM (SELECT activity, COUNT(name) AS num, RANK() OVER(ORDER BY COUNT(name) DESC ) rnk FROM Friends GROUP BY activity )t WHERE t.rnk!=1 ) a JOIN (SELECT b.activity FROM (SELECT activity, COUNT(name) AS num, RANK() OVER(ORDER BY COUNT(name) ASC ) rn...
true
ecba1708ee5178faba9b966c66e4cac6e9736727
SQL
villdimova/SoftUni-MicrosoftSQLServer
/SubqueriesAndJoins/01.EmployeeAddress.sql
UTF-8
182
3.421875
3
[ "MIT" ]
permissive
SELECT TOP(5) e.EmployeeID, e.JobTitle, a.AddressID, a.AddressText FROM Employees AS e INNER JOIN Addresses AS a ON e.AddressID=a.AddressID ORDER BY a.AddressID
true
756095c173e2212abbcc1ac70a0f3ccd0b908067
SQL
RuxinLi/EDA-MYSQL
/SQL class.sql
UTF-8
4,142
4.1875
4
[]
no_license
# * all table select * from product; # 起一个新的列名 select productid,productprice*1.1 as "New Price" from product; # Retrieve the product ID, product name, vendor ID, and product price for each product whose price is above $100 select productid,productname,vendorid,productprice from product where productprice>100; # Ret...
true
0e96ddefd9b4948e0e4398b398f4ba76cc746396
SQL
RobBosman/cerios.PinguinRadio
/database/ext_graadmeter_stemmen_uniek.sql
UTF-8
662
3.078125
3
[]
no_license
'adminping_user'@'localhost' ext_graadmeter_stemmen_uniek SELECT s1.* FROM `ext_graadmeter_stemmen` s1 WHERE NOT EXISTS ( SELECT 1 FROM `ext_graadmeter_stemmen` s2 WHERE s2.`ip_adres` <> s1.`ip_adres` AND SUBSTRING_INDEX(s2.`ip_adres`, '.', 2) = SUBSTRING_INDEX(s1.`ip_adres`, '.', 2) AND DATE_FORMAT(s2....
true
bf9af07c1d17c497634a04a3904e0e202cffeb72
SQL
naveenkod22/MySQL
/Query/13-Indexing for High Perpfrmance/13.8 order of column in composite indexes.sql
UTF-8
430
3.375
3
[ "MIT" ]
permissive
-- 13.8 order of column in composite indexes -- most frequently used first -- columns with higher cardanality(unique values) first; its not a hard rule, take data and quirey speed into account -- try to understand how mysql executes quires select name from city use index (idx_name) -- explitly state index to be used...
true
be589cb1f627faeef52749df28cfb24493a9e8cf
SQL
vmilkovic/baze_podataka
/predavanje2/studenti.sql
UTF-8
1,907
3.65625
4
[]
no_license
create table studenti( jmbag number(8) not null, prezime varchar2(20) not null, ime varchar2(20) not null, redovni number(1) default 1 not null ); create table studenti( jmbag number(8) not null, prezime varchar2(20) not null, ime varchar2(20) not null, redovni number(1) default 1 not null, mobitel number(12)...
true
6309aaa581655fa03ed88327dc825321a7c5f797
SQL
vidya1783/Home-Work1
/module-2/03_Joins/exercise-student/postgres/Exercises/07_genres_christopher_lloyd.sql
UTF-8
429
3.84375
4
[]
no_license
-- 7. The genres of movies that Christopher Lloyd has appeared in (8 rows) -- Hint: DISTINCT will prevent duplicate values in your query results. SELECT DISTINCT genre_name FROM genre JOIN movie_genre ON genre.genre_id = movie_genre.genre_id JOIN movie ON movie_genre.movie_id = movie.movie_id JOIN movie_actor ON mov...
true
5b61e77b1b91b26d4acf96b17f0a9933d336be30
SQL
mkhmaduwantha/Automated-Attendace
/Automated_Attendance_System/Aattendance.sql
UTF-8
6,800
2.859375
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.8.5 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Nov 11, 2019 at 04:27 AM -- 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
9d2593dee6d72af334e21d0b5288c0787b96649f
SQL
ritacc/RitaccTest
/CSC/CSC.Database/Programmability/User/spForzenUser.sql
UTF-8
648
2.828125
3
[]
no_license
-- ============================================= -- Author: xh -- Create date: 2012-2-22 -- Description: -- ============================================= CREATE PROCEDURE spForzenUser ( @USER_ID BIGINT, @ResultType INT OUTPUT, @ResultMessage NVARCHAR(1000) OUTPUT ) AS BEGI...
true
f0b6aa668c8a480c8c426c4370003bc4c50e61f3
SQL
AnnamariaCiasca/AnnamariaCiasca_Week5
/GestoreImpegni/QueryGestoreTask.sql
UTF-8
711
3.515625
4
[]
no_license
--CREATE INSERT INTO Task VALUES('Studiare', 'Capitolo 4 di Analisi 2', '2021-09-30', 1, 0); --READ SELECT * FROM Task; --UPDATE UPDATE Task SET Descrizione = 'Capitolo 3 di Analisi 2' WHERE Id = 4; --DELETE DELETE FROM Task WHERE Id = 11; --Visualizzare gli impegni con data maggiore o uguale a que...
true
d9beba1f7ad727e1423fd2652a6940c65386e019
SQL
jayhirpara6/Pewlett-Hackard-Analysis
/Queries/Employee_Database_challenge.sql
UTF-8
995
4.25
4
[]
no_license
-- Retirement_titles select e.emp_no, e.first_name, e.last_name, ti.title, ti.from_date, ti.to_date -- INTO retirement_titles FROM employees as e LEFT JOIN titles as ti ON e.emp_no = ti.emp_no WHERE (e.birth_date BETWEEN '1952-01-01' AND '1955-12-31') ORDER BY emp_no ASC; -- Unique_Titles SELECT DISTINCT ON (rt...
true
e02d00620dde69b6e501df5d88fea9edb33b24a4
SQL
skensalacode/Hearnime
/Hearnime.sql
UTF-8
2,658
3.203125
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.9.4deb1 -- https://www.phpmyadmin.net/ -- -- Host: localhost:3306 -- Generation Time: Mar 17, 2020 at 08:44 PM -- Server version: 10.3.22-MariaDB-0ubuntu0.19.10.1 -- PHP Version: 7.3.11-0ubuntu0.19.10.3 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; S...
true
9482abdb9a1033efbc7d56e30e382eab98e4763d
SQL
mebelousov/antlr_psql
/src/test/resources/sql/select/62ed0c9c.sql
UTF-8
273
2.84375
3
[ "MIT" ]
permissive
-- file:opr_sanity.sql ln:628 expect:true SELECT p1.oid, p1.oprname FROM pg_operator AS p1 WHERE p1.oprcanmerge AND NOT EXISTS (SELECT 1 FROM pg_amop WHERE amopmethod = (SELECT oid FROM pg_am WHERE amname = 'btree') AND amopopr = p1.oid AND amopstrategy = 3)
true
0e90680cb797abc58763dccc8adf143670470b92
SQL
wajahata99/myrepo
/SQLScript/Bridge schmea DWH/Queries/indexing.sql
UTF-8
9,000
4.15625
4
[]
no_license
--Indexing CREATE INDEX fks_index ON second_fact (date_id,process_segment_id,reason_id,state_id,kpi_id); --Use case explain analyze --select x.process_segment_name, round(avg(x.availability),2) "availability", round(avg(x.effectiveness),2) "effectivness", round(avg(x.oee),2) "oee" select x.process_segment_...
true
acd51b47920c026b34ab7ead3ee841a9ea04c7b0
SQL
sunday458/myProject
/PhpHelper/datatables/etemsdb.sql
UTF-8
2,129
2.9375
3
[]
no_license
/* Navicat MySQL Data Transfer Source Server : localhost Source Server Version : 50617 Source Host : localhost:3306 Source Database : etemsdb Target Server Type : MYSQL Target Server Version : 50617 File Encoding : 65001 Date: 2016-12-15 11:19:00 */ SET FOREIGN_KEY_...
true
fbc6a386f8daaca9606dbea4b5a5b5eb27642789
SQL
soldiertt/imaging-alfresco
/src/main/amp/config/extra/img_audit_box.sql
UTF-8
656
2.96875
3
[]
no_license
-- POSTGRESQL create table img_audit_box ( audit_id serial primary key, uname varchar(50), indate timestamp not null, outdate timestamp, docuuid varchar(50) not null, doctype varchar(30), docsource varchar(30) not null, doclettertype varchar(4), boxname varchar(30) not null); create index audtbox_m1_uu...
true
e9a04be1df3cd84750aedaeb86d38a4c8bc05da8
SQL
zakkyzebra/Database_Exercises
/order_by_exercises.sql
UTF-8
954
3.515625
4
[]
no_license
SELECT * FROM employees WHERE (first_name = 'irena' OR first_name = 'vidya' OR first_name = 'maya') AND gender = 'M' ORDER BY first_name; SELECT * FROM employees WHERE (first_name = 'irena' OR first_name = 'vidya' OR first_name = 'maya') AND gender = 'M' ORDER BY last_name DESC; SELECT * F...
true
8e0045b3964386fd37b8ba4b3fa31fbaa3bac67e
SQL
xuxiaoqi-xxq/spring-boot-employee-2020-7-16-8-28-32-561
/src/test/resources/db/migration/V2.1__create_company_employee_table.sql
UTF-8
220
3.34375
3
[]
no_license
create table company_employee( company_id int, employee_id int, primary key(company_id, employee_id), foreign key(company_id) references company(id), foreign key(employee_id) references employee(id) )
true
29212217380e12cb5b977f60fb76baada4fbc0e0
SQL
drien/itunes-to-sql
/sample_queries/album_plays.sql
UTF-8
340
3.71875
4
[ "MIT" ]
permissive
-- Like the artist_plays query, gets the total number of plays per album select artist, album, sum(play_count) as total_plays, max(play_count) as most_played_count, round(avg(play_count)) as average_count, min(play_count) as least_played_count from tracks group by artist, album order by total_p...
true
c8886ad9b93f17e6bf09a4b3e4e84687ab111abf
SQL
iancarv/CIT-336
/SQL/queries.sql
UTF-8
552
3.859375
4
[]
no_license
-- Gets all students with grades A or A+ in the midterm, ordered by course CRN SELECT Students.Name FROM Students INNER JOIN Grades ON Students.ID=Grades.StudentID AND (Grades.Midterm = 'A' OR Grades.Midterm = 'A+') ORDER BY Grades.CourseCRN ASC -- Gets the ID of all students graded in some Course CRN = 21996 SELECT...
true
a03b988fa889ae120a17cf6b35b2385537c97376
SQL
RashmiWani/Group2-Docs
/ePES_22Oct18.sql
UTF-8
3,748
3.578125
4
[]
no_license
create schema Group2 ---------------------------- create table Group2.Admin ( adminID int primary key, loginID varchar(10), userType varchar(15) ) -------------------------- create table Group2.Customer ( customerID int primary key, loginID varchar(10), customerName varchar(30), customerAddress varchar(5...
true
b2ff45d14dc698b68ac2ea8cac6e96b7cd4b170d
SQL
mlapka/SprintOneTest
/com.WanderingTurtle/com.WanderingTurtle.EventDatabase/dbo/Stored Procedures/spInsertEventItem.sql
UTF-8
856
2.9375
3
[]
no_license
CREATE PROCEDURE spInsertEventItem ( @EventItemName varchar(255), @EventStartTime datetime2, @EventEndTime datetime2, @CurrentNumberOfGuests int, @MaxNumberOfGuests int, @MinNumberOfGuests int, @EventTypeID int, @PricePerPerson money, @EventOnsite bit, @Transportation bit, ...
true
aebbfce62769f6d119d21f36c998eb8ecc780386
SQL
hinaabidi/SQL-Challenge
/EmployeeSQL/employees_query.sql
UTF-8
1,877
4.40625
4
[]
no_license
-- Query employees table with salary from salaries table select a.emp_no, a.last_name, a.first_name, a.sex, b.salary from employees as a inner join salaries as b on a.emp_no = b.emp_no -- Query for employee details who were hired in 1986 select first_name, last_name, hire_date from employees where date_part('year'...
true
1fc6036ad9dbcb4ef90d562eeb5d8a811d2266a2
SQL
shravani1999/Virtual-labs
/tempfiles/sql/9a_sedesign.sql
UTF-8
1,857
2.78125
3
[]
no_license
insert into questions_se values ( 'sde1', 'Which is the first step in the software development life cycle ?','sde1c'); insert into questions_se values ( 'sde2', 'A step by step instruction used to solve a problem is known as', 'sde2d'); insert into questions_se values ( 'sde3', 'Actual programming of software code is d...
true
87b3ac581fadb7df60c91afbfbac72c57d90b168
SQL
OlafMd/MedCon1.0
/mm-libs/dbaccess/Level 3/CL3_DeveloperTasks/Atomic/Retrieval/SQL/cls_Get_FreeDeveloperTasksList_for_ActiveUser_and_ProjectList.sql
UTF-8
1,899
3.421875
3
[]
no_license
Select tms_pro_developertasks.TMS_PRO_DeveloperTaskID AS DeveloperTask_ID From tms_pro_developertasks Inner Join tms_pro_projects On tms_pro_developertasks.Project_RefID = tms_pro_projects.TMS_PRO_ProjectID Inner Join tms_pro_projectmembers On tms_pro_projects.TMS_PRO_ProjectID = tms_pro_projectmembers...
true
2205d7fe052973d87118be72cb2f18a1d6760e25
SQL
radtek/abs3
/sql/mmfo/msp/Table/msp_request_tracking.sql
WINDOWS-1251
3,377
3.578125
4
[]
no_license
PROMPT ===================================================================================== PROMPT *** Run *** ========== Scripts /sql/msp/table/msp_request_tracking.sql =========*** Run PROMPT ===================================================================================== PROMPT *** ALTER_POLICY_INFO t...
true
cb30f6b9120e6020085a32b5bc42f91bcc0e9385
SQL
chengwangjian/suy
/zigBeeDevice/sql脚本更新/sql20161220.sql
UTF-8
326
3.15625
3
[]
no_license
/*数据库自定义方法function()用来判断数据库表是否存在*/ DELIMITER $$ CREATE FUNCTION isTableExist(tablename VARCHAR(60)) RETURNS TINYINT BEGIN SELECT COUNT(*) into @result FROM INFORMATION_SCHEMA.TABLES WHERE 1=1 and TABLE_SCHEMA='zigbeedevice' and TABLE_NAME = tablename; RETURN @result; END $$
true
06b14f17a31190a7597c7bba56be0495bd2c4f38
SQL
amyusup/zwalletTeam-backend
/new_zwallet.sql
UTF-8
10,042
2.9375
3
[ "MIT" ]
permissive
-- phpMyAdmin SQL Dump -- version 5.0.4 -- https://www.phpmyadmin.net/ -- -- Host: mysql_container:3306 -- Waktu pembuatan: 03 Nov 2020 pada 06.46 -- Versi server: 8.0.22 -- Versi PHP: 7.4.11 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@...
true
65689d33d1422a3a360a2502647bd22a1f8a86b3
SQL
categolj/blog-api
/src/main/resources/am/ik/blog/entry/EntryMapper/count.sql
UTF-8
1,063
3.25
3
[ "Apache-2.0" ]
permissive
SELECT COUNT(e.entry_id) as count FROM entry AS e WHERE 1 = 1 /*[# th:if="${keywordsCount > 0}"]*/ /*[# th:each="i : ${#numbers.sequence(0, keywordsCount - 1)}"]*/ AND e.keywords @> ARRAY [ /*[# mb:p="keywords[${i}]"]*/ 'JAVA' /*[/]*/ ]::character varying[] /*[/]*/ /*[/]*/ /*[# th:if="${createdBy} != null"]*/ AND e...
true
cb0905657c42544a408a82e74963394e85922b54
SQL
vietduc030496/VTI-Java07-08
/Hieu.NguyenVan/SQL/assignment_4.sql
UTF-8
3,762
4.125
4
[]
no_license
-- question 1 select * from account inner join department on account.DepartmentID=department.DepartmentID; -- question 2 select * from account where CreateDate <'2010-12-20'; -- question 3 select * from account inner join position on account.PositionID=position.PositionID where PositionName= "Dev"; -- question ...
true
50286e9cb2c2eaba1f94ebef05655f5fb4d5864e
SQL
ams29/CS564
/P1/create.sql
UTF-8
1,114
4.125
4
[]
no_license
drop table if exists Items; drop table if exists Users; drop table if exists Bids; drop table if exists Category; --the correct create order should be users --> Items --> Bids --> Category since each of them are depended on each other create table Users( UserID VARCHAR, Rating INT, Location VARCHAR, Country VA...
true
647ef71db004c285cb83b46b24c571262b2a6e0c
SQL
silence-do-good/stress-test-Postgres-and-MySQL
/dump/low/day26/select1753.sql
UTF-8
264
2.984375
3
[]
no_license
SELECT sen.name FROM SENSOR sen, SENSOR_TYPE st, COVERAGE_INFRASTRUCTURE ci WHERE sen.SENSOR_TYPE_ID=st.id AND st.name='WeMo' AND sen.id=ci.SENSOR_ID AND ci.INFRASTRUCTURE_ID=ANY(array['4234','5058','6076','2008','3228','3048','4074','2100_9','4222','3100_8'])
true
56388ae80fcc28d6b09d43cc2302f00cc126af44
SQL
daniel7solis/coefproy
/basededatosEloi.sql
UTF-8
14,417
3.015625
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.0.4.1 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: Jan 21, 2014 at 08:46 PM -- Server version: 5.6.11 -- PHP Version: 5.4.19 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */...
true
33e36085f0b27b0cc842385c5af7f898fa20d76d
SQL
georgales/sql
/lesson1.9.num.string.functions/exercise02.sql
UTF-8
196
2.890625
3
[]
no_license
SELECT productName, quantityInStock, buyPrice, round(1.1*power(buyPrice, 1.1),2) AS sellPrice, round((round(1.1*power(buyPrice, 1.1),2)-buyPrice)*quantityInStock,2) AS profit FROM products;
true
918995cbeede4e36086b6002b6bc0794e4609916
SQL
sebastianrcnt/earglass
/query/StoredProcedure/create_Procedure_EditTask.sql
UTF-8
1,284
3.25
3
[]
no_license
create definer = team9@`%` procedure EditTask(IN currentTaskName varchar(45), IN newDescription text, IN newMinPeriod int, IN newMaxDuplicatedRowRatio float, IN newMaxNullRatioPerColumn float, IN newPassCriteria text) checkr...
true
f615656d9c8dc960937691553dc5efa0b99250ea
SQL
eodenyire/holbertonschool-higher_level_programming-33
/0x0E-SQL_more_queries/2-create_read_user.sql
UTF-8
270
2.734375
3
[]
no_license
-- Creates the DB hbtn_0d_2 and the user user_0d_2 -- user should have SELECT in DB hbtn_0d_2; password: user_0d_2_pwd -- if it exists it shouldn't fail CREATE DATABASE IF NOT EXISTS hbtn_0d_2; GRANT SELECT ON hbtn_0d_2.* TO user_0d_2@localhost IDENTIFIED BY 'user_0d_2_pwd';
true
f976c6a95778b8514b9492a281e07e61050466c1
SQL
ssnarkar/SQL
/HackerRank/Asian_Population.sql
UTF-8
306
4.375
4
[]
no_license
/* Q Given the CITY and COUNTRY tables, query the sum of the populations of all cities where the CONTINENT is 'Asia'. Note: CITY.CountryCode and COUNTRY.Code are matching key columns. */ select sum(city.population) from city left join country on city.countrycode = country.code where continent = 'Asia'
true
a13d3ddac763b02dc2af9874d1bdda4ae40a3542
SQL
Name4Me/payment-gateway
/config/table.sql
UTF-8
441
2.984375
3
[]
no_license
-- Don't change %tbName% CREATE TABLE IF NOT EXISTS %tbName% ( FullName varchar(25) COLLATE utf8_bin NOT NULL, PaymentID varchar(30) COLLATE utf8_bin NOT NULL, Details varchar(255) COLLATE utf8_bin, DateTime timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, ID int(11) NOT NU...
true
5bd360d0094fb357d10cd9eeb3039cb3a56e7bba
SQL
OvidiuEDSgrup/TET
/SESIZARI/121005/SQLQuery13.sql
UTF-8
510
2.765625
3
[]
no_license
select * from pozdoc p where p.Tip_miscare='E' and p.Cod_intrare='' order by p.Data desc select * from pozdoc p where p.Data='2012-10-03' and p.Numar like 1*10000 +2 and p.Cod like 'TR0072 ' select * from stocuri s where s.Stoc<=-0.001 and (s.Data_ultimei_iesiri>='2012-10-01' or s.Data>='2012-10-01') sele...
true
b1547bdbc9a565d0cc062c3d50b65d2ecb4d61a6
SQL
MrQubo/wwi-ctf
/tasks/cookie_sqli/task/init.sql
UTF-8
1,197
3.234375
3
[]
no_license
\set POSTGRES_APP_USER `echo $POSTGRES_APP_USER` \set POSTGRES_APP_PASSWORD `echo $POSTGRES_APP_PASSWORD` \set POSTGRES_DB `echo $POSTGRES_DB` \c :POSTGRES_DB; CREATE TABLE users ( id SERIAL NOT NULL PRIMARY KEY, username varchar(255) NOT NULL UNIQUE, password varchar(60) NOT NULL ); CREATE TABLE session...
true
cd12d7c129ddfca493c9fbd96d6732b584e01d82
SQL
NetFlexDevTeam/NetFlex
/deberar9_netflex.sql
UTF-8
9,542
3.109375
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.0.10.14 -- http://www.phpmyadmin.net -- -- Host: localhost:3306 -- Generation Time: Nov 29, 2016 at 06:23 PM -- Server version: 5.6.28-76.1-log -- PHP Version: 5.6.20 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACT...
true
09ba19478df9a68051954e056451ae6e2c67f376
SQL
RodLQ/JavaWListar
/bdhotellibertador.sql
UTF-8
9,003
3.5
4
[]
no_license
-- phpMyAdmin SQL Dump -- version 5.1.0 -- https://www.phpmyadmin.net/ -- -- Servidor: 127.0.0.1 -- Tiempo de generación: 10-06-2021 a las 15:12:01 -- Versión del servidor: 10.4.19-MariaDB -- Versión de PHP: 8.0.6 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_...
true
c389f9c8d576f7df9afd6d10d8ed3d53ad1db993
SQL
soDisaster/BI-TP2
/requetes.sql
UTF-8
1,426
4.125
4
[]
no_license
/* Saint-Omer Anne-Sophie Poux Delphine */ /* Requête 1 : Quel est le chiffre d'affaire par produit ? */ column designation Format a50 column CA Format 99999999 set pagesize 100 SELECT designation, SUM(qte*prix) as CA FROM v_vente v, v_produit p WHERE v.nump = p.nump GROUP BY designation ORDER BY designation; /* Req...
true
456d2a737b9bb96b9e73a74198d32203984b2e1a
SQL
zhaowei05/HRE
/tm/SQLQuery1.sql
GB18030
5,308
3.375
3
[]
no_license
create table UserInfo --û ( UserID Int primary key identity(1,1),-- () DepartmentID Int, --ű RoleID Int , --ɫţ1.ܾ 2.¾ 3. 4.ž 5.Ա UserNumber Varchar(50) , --û LoginName Varchar(50) , --½ LoginPwd Varchar(50) , -- UserName Varchar(50) , --ʵ UserAge Int ,-- UserSex Int ,--Ա 1. 0.Ů UserTel Varchar(11) ,--绰 User...
true
0560e89d66af99dc18a708ad3d09dd2ce7a85e37
SQL
ihasson/csu-data-munging
/database/views/hsdata2.sql
UTF-8
252
3.5625
4
[]
no_license
CREATE VIEW hsdata2 AS SELECT t.* FROM tmp_hsdata t, cohort c , (SELECT distinct sid from courses) cc WHERE c.sid = cc.sid and t.sid = cc.sid AND c.cohort = 'FTF' AND CAST(c.term as Integer) >= 2067 AND c.sid = cc.sid and t.sid = cc.sid
true
561cfd155b2f1fb88593a0a17c2d7b06f545bdeb
SQL
pavelstackoverflow/collateral_test_task
/src/main/resources/schema.sql
UTF-8
657
3.1875
3
[]
no_license
create table CAR ( id IDENTITY primary key, brand VARCHAR2(150), model VARCHAR2(200), power DOUBLE, year_of_issue YEAR ); create table AIRPLANE ( id IDENTITY primary key, brand VARCHAR2(150), model VARCHAR2(200), manufacturer VARCHAR2(500), year_of_issue YEAR, fuel_capacity INT, seats INT ); c...
true
8667e8534216544a54ba95887521c5ae3bd177f7
SQL
Antoine87/site-ecommerce
/database/didierInsertAuteurs.sql
UTF-8
883
2.984375
3
[ "MIT" ]
permissive
-- ------------------------------------------------------ -- INSERT ecommerce.auteurs -- ------------------------------------------------------ TRUNCATE ecommerce.auteurs; INSERT INTO ecommerce.auteurs (nom_auteur, prenom_auteur, biographie) VALUES ('De Lafontaine', 'Jean', 'On dispose de très peu d\’informations ...
true
1dea1e3828a93c5c90ddeb8850b6047b02024500
SQL
ppmotskula/taskr
/scripts/schema.mysql.sql
UTF-8
2,276
3.78125
4
[ "BSD-3-Clause" ]
permissive
/** * RULE: replace TIMESTAMP NULL --> TIMESTAMP NULL */ -- DO NOT alter the lines above!!! DROP TABLE IF EXISTS `Scraps`; DROP TABLE IF EXISTS `Tasks`; DROP TABLE IF EXISTS `Projects`; DROP TABLE IF EXISTS `Users`; CREATE TABLE `Users` ( `id` INTEGER UNSIGNED AUTO_INCREMENT, `username` VARCHAR(30) NOT NULL, `pass...
true