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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
0cb3568ae3509af12ed22b454abf8b92a8d60ebe | SQL | jmgold/SQL-Queries | /Patrons with high fines detail.sql | UTF-8 | 1,996 | 4.09375 | 4 | [
"LicenseRef-scancode-warranty-disclaimer"
] | no_license | /*
Jeremy Goldstein
Minuteman Library Network
fine details for patrons owing 100
created for Andy Gardner at Libraries Online, Inc
*/
/*
The temp table might be an excessive approach but makes the two portions of the query a bit easier to follow
and you could cut and paste the query within the temp table to produce i... | true |
24c0dfd1eb3c3f27ef79e033858acf8d4dd5f4d6 | SQL | TheRockStarDBA/UndercoverToolbox | /Open Transaction Details.sql | WINDOWS-1252 | 2,409 | 3.625 | 4 | [
"MIT"
] | permissive | /******************************************************************
Author: David Fowler
Revision date: 07/02/2018
Version: 1
Description: Display details on all open transaction on the instance
www.sqlundercover.com
MIT License
Permission is hereby granted, free of charge, to any person obtaining a copy of this ... | true |
c8caf4f3c35231574b95ac3d9ba83036e83fdc69 | SQL | gaganparmar110/SQL-MODELS | /SubQuery/DateTask.sql | UTF-8 | 3,069 | 4.5 | 4 | [] | no_license | query-1
--query to display the first day of the month (in datetime format)
--three months before the current month
select dateadd(month, -3, dateadd(day, 1 - day('2014-09-03'), '2014-09-03'))
query-2
--query to display the last day of the month (in datetime format)
--three months before the current month.
select DATE... | true |
95a4aabe3f39261e34d9967c0d864067751b5ec8 | SQL | jfallt/Quench_PowerBI_Reporting | /SQL Queries/Service Data/WO Attributes/wo_work_order_line.sql | UTF-8 | 591 | 4.28125 | 4 | [] | no_license | SELECT
SUM(TotalLinePrice) as TotalLinePrice,
WorkOrder_id,
Family,
Email
FROM
(SELECT SVMXC__Service_Order__c as WorkOrder_id
, SVMXC__Product__c as Product_id
,CASE WHEN SVMXC__Total_Line_Price__c > 250
AND SVMXC__Product__c = '01t36000003PhNKAA0'
THEN 250
ELSE SVMXC__Total_Line_Price__c
END as TotalLin... | true |
b1ffcfab613ee627f63240634a26a7fd8c68ee3e | SQL | PolyCash/polycash | /src/sql/106.sql | UTF-8 | 1,040 | 3.65625 | 4 | [
"MIT"
] | permissive | ALTER TABLE `game_escrow_accounts` DROP `account_id`;
ALTER TABLE `game_escrow_accounts` DROP `time_created`;
ALTER TABLE `game_escrow_accounts` ADD `amount` DOUBLE NULL DEFAULT NULL AFTER `game_id`;
RENAME TABLE `game_escrow_accounts` TO `game_escrow_amounts`;
ALTER TABLE `game_escrow_amounts` ADD `currency_id` INT NU... | true |
1ed8a790436978ef16a7a57e7d3a2952f5d020f1 | SQL | kumaranm/GMC | /GMC_Vithu_UpdateScript.sql | UTF-8 | 688 | 3 | 3 | [] | no_license | -- removed 12.5 sales, tax and 4% sales, tax
CREATE SCHEMA GMC;
CREATE TABLE GMC_SKC_VITHU_BILL
(
COMPANY VARCHAR(5),
BOOK_NUMBER VARCHAR(10) ,
BILL_NUMBER INTEGER UNSIGNED,
14_5_I_SALES_AMOUNT DOUBLE(10,2) UNSIGNED ZEROFILL,
14_5_I_SALES_TAX DOUBLE(10,2) UNSIGNED ZEROFILL,
... | true |
594625528003db68a8e09977c95c3ec9b9587278 | SQL | abrahammora/apps-nodejs | /restapi-mysql-nodejs/db/database.sql | UTF-8 | 742 | 3.96875 | 4 | [] | no_license | CREATE DATABASE IF NOT EXISTS company;
USE company;
CREATE TABLE employees(
id INT(11) NOT NULL AUTO_INCREMENT,
name VARCHAR(45) DEFAULT NULL,
salary INT(11) DEFAULT NULL,
PRIMARY KEY(id)
);
DESCRIBE employees;
INSERT INTO employees values
(1,'Michael Jan',4000),
(2,'Jonh See ',4500),
(3... | true |
4cb21f2de4a84f85d28e93b915a68c645391aaaf | SQL | LilyWS/employee-tracker | /db/seeds.sql | UTF-8 | 627 | 3.125 | 3 | [] | no_license | use employee_db;
insert into departments (name)
values ("Engineering"), ("Management"), ("Sales");
insert into roles (title, salary, department_id)
values ("Front-End Engineer", 95000, 1),
("Back-End Engineer", 95000, 1),
("Lead Engineer", 125000, 2),
("Sales Head", 125000, 2),
("Sale... | true |
5ceeb9e4f193fda41407afef7c73d99ed67446ca | SQL | javadev/pt-backend | /src/main/resources/db/migration/V4.74__create_in_user_goal_photo_table.sql | UTF-8 | 519 | 3 | 3 | [
"MIT"
] | permissive | CREATE TABLE ptcore.in_user_goal_photo (
id BIGSERIAL PRIMARY KEY NOT NULL,
created TIMESTAMP WITHOUT TIME ZONE NOT NULL DEFAULT now(),
file_name VARCHAR(200) NOT NULL DEFAULT '',
file_size BIGINT NOT NULL DEFAULT 0,
file_type VARCHAR(100) NOT NULL DEFAULT '',
data_url TEXT
);
CREATE TABLE ptco... | true |
401c13bd26be8bbfd8a3e2f817a21d1bab1d8b3a | SQL | donmacaron/ananev_vv_11-707 | /dungeonDB/1. create.sql | UTF-8 | 2,721 | 3.703125 | 4 | [] | no_license | create table Users(
user_id int identity(1,1),
name varchar(20) not null unique,
password varchar(32),
mail varchar(32) unique,
bio nvarchar(max),
constraint pk_users primary key(user_id));
create table Spells(
spell_id int not null,
name nvarchar(70) not null,
distance nvarchar(max),
duration nvarchar(max)... | true |
3072f989157a6f066d08eb10018b7a80c798873a | SQL | franzecs/gip | /db/db_gip_estagio.sql | UTF-8 | 2,645 | 2.921875 | 3 | [] | no_license | -- MySQL dump 10.13 Distrib 5.7.12, for Win64 (x86_64)
--
-- Host: localhost Database: db_gip
-- ------------------------------------------------------
-- Server version 5.7.16-log
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESUL... | true |
649abe4d1cee19c392a8f94f705b6fdfde9159e8 | SQL | tyranne/biblio_tp | /sys_borrowing.sql | UTF-8 | 2,561 | 3.09375 | 3 | [] | no_license | -- MySQL dump 10.13 Distrib 5.7.9, for Win64 (x86_64)
--
-- Host: 127.0.0.1 Database: sys
-- ------------------------------------------------------
-- Server version 5.7.12-log
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!4... | true |
8afb98265a08ad4d2f3ba3c7648373f8e3d63f1a | SQL | camicasii/Mysql-notas | /curso.4.sql | UTF-8 | 1,158 | 3.359375 | 3 | [] | no_license | /* Cláusula Order By*/
/* Ordenar consulta por defecto se hace A-Z, MAYOR a MENOR a menos que indiquemos lo contrario*/
SELECT * FROM PRODUCTOS WHERE SECCIÓN="DEPORTES" OR SECCIÓN="CERÁMICA" ORDER BY SECCIÓN;
/* en este caso ordemos de forma inverza*/
SELECT * FROM PRODUCTOS WHERE SECCIÓN="DEPORTES" OR SECCIÓN="CERÁMIC... | true |
28812c087c534e065e4e89bdaaabc15350906325 | SQL | menelaof/public | /Part1.sql | UTF-8 | 733 | 3.671875 | 4 | [] | no_license | WITH CitiesAggregatedData AS (
SELECT Orders.City AS City
, Count(DISTINCT Orders.order_id) AS NoofOrders
, Count(DISTINCT Orders.user_id) AS NoofCustomers
, ROUND(Avg(Orders.basket),2) AS AvgBasketValue
FRO... | true |
a6ace5d8f1ed2341a39ac9f617ef623eadd391e6 | SQL | ARAMESH01/react-cmanager | /db/poc_ddl.sql | UTF-8 | 516 | 2.625 | 3 | [] | no_license | CREATE TABLE IF NOT EXISTS quad_ss_poc_db.users (
user_id INT(11) NOT NULL AUTO_INCREMENT,
user_cd VARCHAR(15) DEFAULT NULL,
first_name VARCHAR(45) DEFAULT NULL,
last_name VARCHAR(45) DEFAULT NULL,
email VARCHAR(60) DEFAULT NULL,
phone_num VARCHAR(15) DEFAULT NULL,
role VARCHAR(15) DEFAULT N... | true |
24a2827c7ca14e595fc32c2582c49bdf1067f4cc | SQL | ekzGuille/pl-sql-oracle-2si | /APUNTES-EJERCICIOS/Practica_Final_Acceso_a_Datos/Entregables/scripts_creacion_procedures.sql | UTF-8 | 29,935 | 3.578125 | 4 | [] | no_license | SET SERVEROUTPUT ON;
CLEAR SCR
DISCONNECT
-- Conectarse como SYS y crear otro usuario
CONNECT SYS AS SYSDBA;
DROP USER GUILLERMO;
-- Usuario con el que trabajaremos
CREATE USER GUILLERMO IDENTIFIED BY Guillermo;
GRANT DBA TO GUILLERMO;
GRANT ALL PRIVILEGES TO GUILLERMO;
REM *** INSERCION DE ... | true |
00ad3eda4073f364404fd543be355f0abcb91761 | SQL | miths1108/PiGen | /codd-data-gen/resources/cdgclient/postgres/projection queries/q162.sql | UTF-8 | 220 | 2.96875 | 3 | [] | no_license | select distinct i_item_id, i_item_desc, s_state
from store_sales, date_dim, store, item
where d_quarter_name = '2001Q1'
and d_date_sk = ss_sold_date_sk
and i_item_sk = ss_item_sk
and s_store_sk = ss_store_sk
; | true |
344e30745e5ea5c0aba6ba53ab437f5754a00072 | SQL | evrimulgen/Oracle-DBA-Life | /INFO/Books Codes/Oracle Database 10g PLSQL/Code/Chapter4/GreatestLeast.sql | UTF-8 | 614 | 2.90625 | 3 | [
"MIT"
] | permissive | /*
* GreatestLeast.sql
* Chapter 4, Oracle10g PL/SQL Programming
* by Ron Hardman, Mike McLaughlin, Scott Urman
*
* This script demonstrates the Greatest and Least functions
*/
SET SERVEROUTPUT ON
DECLARE
v_char VARCHAR2(10);
v_number NUMBER(10);
BEGIN
v_char := GREATEST('A', 'B', 'C');
v_number := ... | true |
f53aba67bfb80645c7c2b4b10b8cf056498bbb43 | SQL | radtek/Scripts | /sql_wait.sql | ISO-8859-1 | 1,089 | 3.25 | 3 | [] | no_license | prompt No necessario diagnostic pack, se tem usa @sql_wait_ash
prompt application_time tem TX e TM lock waits, tempo aguardando linha esta disponivel, quanto mais APPLICATION_WAIT_TIMEs ento provavel lock contention
prompt app_time = APPLICATION_WAIT_TIME
prompt total aguardando "app_time_ms"
prompt em relao a o... | true |
fcf676337be1090b5fe9b7991ccd5f1a49091619 | SQL | MohammadAreeb/areeb | /My MySQL files/41..sql | UTF-8 | 120 | 3.03125 | 3 | [] | no_license | SELECT
sh.name AS shipper,
p.name AS product
FROM shippers sh,products p
-- CROSS JOIN products p
ORDER BY sh.name | true |
93c872e709a747baee2f282a3a2ab4671e1d1645 | SQL | Setu247/Libaray-managment-system-projext- | /library_record.sql | UTF-8 | 3,231 | 2.71875 | 3 | [] | no_license | -- MySQL dump 10.13 Distrib 8.0.23, for Win64 (x86_64)
--
-- Host: localhost Database: library
-- ------------------------------------------------------
-- Server version 8.0.23
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS ... | true |
85be4f52f664366399a4e3bb4592cec223d64fb1 | SQL | MasonVe/buildquerychallenge | /buildquery.sql | UTF-8 | 6,814 | 3.953125 | 4 | [] | no_license | --Mason Veljan 101722004
/*
TOUR (TourName, Description)
PK (TourName)
CLIENT (ClientId, Surname, GivenName, Gender)
PK (ClientID)
EVENT(TourName, EventYear, EventMonth, EventDay, Fee)
PK (TourName, EventYear, EventMonth, EventDay)
FK (TourName) References TOUR
BOOKING(TourName, ClientId, EventYear, EventMonth, Even... | true |
6dd85ddb2622757b82f9ac058b38a096feb2af6f | SQL | DMilmont/mode | /Mode/roadster/spaces/Team SALES OPS/Hyundai Shopper Assurance Report.08b51b9cd6a3/Hyundai Weekly Data.bc0eb4853a47.sql | UTF-8 | 2,114 | 3.703125 | 4 | [] | no_license | with base_data as (
SELECT *
FROM report_layer.shopper_assurance_program_kpis
WHERE date >= '{{ start_date }}' and date <= '{{ end_date }}'
),
almost_data as (
SELECT
dpid,
COUNT(DISTINCT CASE WHEN item_type = 'Total Visitor' AND SOURCE = 'Traffic' THEN unique_visitor_id ELSE NULL END) "Tier 3 Visitors",
COUNT(DISTI... | true |
028fc093fd26ef80659da97c63241a4e38adb027 | SQL | AlvinCommunityCollege/RoomSchedulingAlgorithm | /AlgorithmRunner/Data/SQLite/BuildChoices.sql | UTF-8 | 125 | 2.703125 | 3 | [
"Apache-2.0"
] | permissive | INSERT INTO Choices (SectionId, RoomId, TimePatternId)
SELECT S.Id, R.Id, TP.Id FROM Sections S, Rooms R, TimePatterns TP | true |
c97032f97296c697103bd8a26be164422b004f8b | SQL | JPGeszti/NOVA | /PROGRAMMING FOR DATA SCIENCE/SQL/initial.sql | UTF-8 | 171 | 2.609375 | 3 | [
"MIT"
] | permissive | SELECT 'Hello, World' AS Result;
-- SELECT * FROM Country ORDER BY Name;
SELECT Name, LifeExpectancy AS "Life Expentancy" FROM Country ORDER BY Name;
-- * means to get all | true |
28dfe64f438596002c53ee016c18a52f6a66172a | SQL | Hibss/spring-boot-rabbitmq | /src/main/resources/rabbitMessage.sql | UTF-8 | 750 | 2.609375 | 3 | [] | no_license | CREATE TABLE `mq_rabbit_message` (
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
`exchange` varchar(100) DEFAULT NULL COMMENT 'direct,fanout,topic消息交换机',
`routing_key` varchar(100) DEFAULT NULL COMMENT '路由关键字',
`context` text COMMENT '消息body',
`create_time` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE... | true |
efac7df84dcba25b3478a3afba2d413d2bf84305 | SQL | javajigi/iminbak | /src/main/resources/db/migration/V20130601100551__init.sql | UTF-8 | 2,784 | 3.640625 | 4 | [] | no_license | drop table if exists answer;
drop table if exists answer_content_holder;
drop table if exists attachment;
drop table if exists blog;
drop table if exists blog_content_holder;
drop table if exists board;
drop table if exists board_content_holder;
create table attachment (
i... | true |
3643eb74f9fb97684b01916506c27b9d31e7d6bc | SQL | bsniego/project101 | /CMS/Oracle_CMS - Reporting by Facility.sql | UTF-8 | 904 | 3.078125 | 3 | [] | no_license | /*-------- Run in the CPRO_Reports Database --------*/
SELECT
GDIS.LOCATION_NAME,
GDIS.COUNTRY,
GDIS.REGION,
GDIS.SBU_ABBR,
GDIS.PRODUCT_GROUP_ABBR,
GDIS.PRODUCT_GROUP,
cms.Location_ID,
cms.ReportingYear,
cms.ReportingMonth,
cms.prod_def_qty,
cms.prod_vol+cms.service_vol total_vol,
cms.Prod_In... | true |
a7615ec225b4b8cef203017ba9a0dbca06a10c09 | SQL | flntzr/runVs | /database/Ghostrunner.sql | UTF-8 | 7,380 | 3.21875 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.0.10deb1
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Jun 05, 2015 at 08:35 PM
-- Server version: 5.5.43-MariaDB-1ubuntu0.14.04.2
-- PHP Version: 5.5.9-1ubuntu4.9
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTE... | true |
a394e78bdd021acff77e9812c7b6257d83557f68 | SQL | j7ng/CLFY_SA | /SA/Views/FULL_TABLE_SCANS.sql | UTF-8 | 884 | 3.9375 | 4 | [] | no_license | CREATE OR REPLACE FORCE VIEW sa.full_table_scans ("SID","User Process","Short Scans","Long Scans","Rows Retrieved") AS
SELECT ss.sid, ss.username || '(' || se.sid || ') ' "User Process",
SUM (DECODE (NAME, 'table scans (short tables)', VALUE))
"Short Scans",
SUM (DECODE (NAME, 't... | true |
87ec0b941d7ce832b1416dec9c8617e8aca7f1e3 | SQL | yisiying/naive-video-conference | /roomManager/src/main/resources/sql/roomManager1.sql | UTF-8 | 4,098 | 2.9375 | 3 | [
"MIT"
] | permissive |
-- user_info --------------------------------------------------------------------------
alter table USER_INFO
add uid bigint default 100201 auto_increment;
alter table USER_INFO
add user_name varchar(100) not null;
alter table USER_INFO
add password varchar(100) not null;
alter table USER_INFO
add r... | true |
91c551867285e2a6c0ef22031b9e7a53d0b92e11 | SQL | FeiYangM/program-practice | /Data Scientist/SQL Test/user_behavior.sql | UTF-8 | 2,142 | 4.28125 | 4 | [] | no_license | ## data looks like:
## user_id,item_id.category_id,behavior,timestams,datentime,dates,hours
###########Analysis of PV,UV and so on###########################
# pv/uv
SELECT count(distinct user_id) as 'uv',
(SELECT count(*) FROM userbehavior
where behavior = 'pv') as 'pv',
(SELECT count(*) FROM u... | true |
418d89de7d7fdeb29eeb18afc000a8d17bc61076 | SQL | ricardorohde/ChapeuPaia | /chapeu (10).sql | UTF-8 | 12,296 | 3.328125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.8.5
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1:3306
-- Generation Time: 01-Dez-2019 às 00:12
-- Versão do servidor: 5.7.26
-- versão do PHP: 7.2.18
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_... | true |
49f8506ac1a2d82bbb97cf09d0092070e2b76f02 | SQL | streljk93/jkfeedback | /database/feedback.sql | UTF-8 | 329 | 2.65625 | 3 | [] | no_license | CREATE TABLE `feedback` (
id int not null auto_increment primary key,
user_id int not null,
message text not null,
rate varchar(150) not null,
isactive tinyint(1) not null default 1,
lastupdated timestamp not null default current_timestamp on update current_timestamp
)engine=innodb default chars... | true |
01353d971a506a7bd19c93301e95ec0a4acfce07 | SQL | neonerd/famupad-backend | /model/schema/schema.sql | UTF-8 | 1,792 | 3.546875 | 4 | [] | no_license | BEGIN TRANSACTION;
DROP TABLE IF EXISTS `user`;
CREATE TABLE IF NOT EXISTS `user` (
`id` INTEGER PRIMARY KEY AUTOINCREMENT,
`email` TEXT UNIQUE,
`password` TEXT,
`role` TEXT
);
DROP TABLE IF EXISTS `project_type`;
CREATE TABLE IF NOT EXISTS `project_type` (
`id` INTEGER PRIMARY KEY AUTOINCREMENT,
`name` TEXT
);
D... | true |
ea30ef08eb15a2d6fa9e053e7acaeb11e9dc49a6 | SQL | wuxihuiyuan/www | /xingfu.sql/fenxiao_level.sql | UTF-8 | 28,260 | 3.109375 | 3 | [] | no_license | /*
Navicat MySQL Data Transfer
Source Server : huiyuan
Source Server Version : 50540
Source Host : localhost:3306
Source Database : fenxiao_level
Target Server Type : MYSQL
Target Server Version : 50540
File Encoding : 65001
Date: 2017-04-21 11:12:16
*/
SET FOREIGN_KEY_CHECKS=0;
... | true |
a709c53d651eae878f6642e72468a603731977b8 | SQL | jerzyyy/Spring_TP8 | /bigcorp/src/main/resources/schema.sql | UTF-8 | 720 | 3.390625 | 3 | [] | no_license | CREATE TABLE SITE(ID VARCHAR(255) PRIMARY KEY, NAME VARCHAR(255) NOT NULL);
CREATE TABLE CAPTOR(ID VARCHAR(255) PRIMARY KEY, NAME VARCHAR(255) NOT NULL, SITE_ID
VARCHAR(255) NOT NULL);
CREATE TABLE SITE_CAPTORS(SITE_ID VARCHAR(255) NOT NULL, CAPTOR_ID VARCHAR(255) NOT
NULL);
CREATE TABLE MEASURE (ID BIGINT PRIMARY KEY ... | true |
f4cdb43a9d9e1af8c1b3d039a51abdae340efcc1 | SQL | tincholescano/DB18 | /Class_02.sql | UTF-8 | 803 | 3.890625 | 4 | [] | no_license | create database imbd;
create table film(
film_id int(11) not null auto_increment,
title varchar(40) not null,
description varchar(200),
relese_year date,
constraint films_pk primary key (film_id));
create table actor(
actor_id int(11) not null auto_increment,
first_name varchar(40) not null,
last_name varchar(... | true |
d11915123f665651b3220823c9286818eebcb477 | SQL | maggiflo98/Crud-operations-with-express | /Shoesdb/Shoesdb.sql | UTF-8 | 2,745 | 2.75 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.9.1
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Generation Time: Aug 30, 2021 at 04:15 PM
-- Server version: 10.4.8-MariaDB
-- PHP Version: 7.1.33
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD... | true |
0c839f28a1686fdd134d1b270c6274ecc53d84e2 | SQL | meleklacin/sql-server-proje-legend | /ROMS DATABASE/VİEW/RUKIYE_VW_REZERVASYON_OZELLIKLERI_DETAYLI.sql | UTF-8 | 599 | 3.71875 | 4 | [] | no_license | CREATE VIEW VW_OZELLIK_DETAYLI
AS
SELECT C.NAME_,S.NAMES,P.NAME,PT.NAMES_,B.BOOKING_DATE,COUNT(B.ID) AS REZERVASYON_TARIHI_SAYISI ,AVG(B.PRICE_FOR_STAY) AS ORTALAMA_KALMA_UCRETI ,SUM(B.SITE_FEES) AS TOPLAM_YER_UCRETI
FROM PROPERTIES P
LEFT JOIN BOOKINGS B ON P.ID = B.PROPERTY_ID
INNER JOIN PROPERTY_TYPE PT ON P.P... | true |
9ab4229a99096a17dd3defd058566775abd5a303 | SQL | Tomas5000/ProyectoSenditExpress | /db/inventario.sql | UTF-8 | 1,649 | 3.125 | 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='TRADITIONAL,ALLOW_INVALID_DATES';
-- -----------------------------------------------------
-- Schema inventari... | true |
3fe23ffcb441cd4391cf09453bdabb8f59bfcad1 | SQL | lapc506/proyecto-bd1-parque-la-libertad | /src/org/parquelibertad/metadata/sqlscripts/COMMENTS.sql | ISO-8859-1 | 2,453 | 3.234375 | 3 | [
"MIT"
] | permissive | -- SELECT usr.TABLE_NAME, usr.COMMENTS FROM user_tab_comments usr ORDER BY usr.TABLE_NAME;
-- SELECT usr.TABLE_NAME FROM user_tab_comments usr ORDER BY usr.TABLE_NAME;
COMMENT ON TABLE ACTIVIDAD IS 'Listado de actividades peridicas del Parque.';
COMMENT ON TABLE ALUMNO IS 'Conjunto de personas promovidas a ser alu... | true |
4ab79a3db5e58011fc3822f63c03417a3a0ba195 | SQL | denchaihos/HI-EMR | /sql/tsu_oprt_original.sql | UTF-8 | 1,237 | 2.90625 | 3 | [] | no_license | /*
Navicat MySQL Data Transfer
Source Server : local
Source Server Version : 50505
Source Host : localhost:3306
Source Database : hi
Target Server Type : MYSQL
Target Server Version : 50505
File Encoding : 65001
Date: 2017-09-23 15:57:01
*/
SET FOREIGN_KEY_CHECKS=0;
-- ----------... | true |
28dd3d53726d836e441442029fbe15c025b541f1 | SQL | haithamkhedre/Andha | /seed.sql | UTF-8 | 2,369 | 3.5625 | 4 | [] | no_license | CREATE TABLE users (
id VARCHAR UNIQUE NOT NULL DEFAULT uuid_generate_v4(),
username VARCHAR UNIQUE,
email VARCHAR PRIMARY KEY NOT NULL,
hashedPassword VARCHAR NOT NULL ,
company VARCHAR,
location VARCHAR,
job_title VARCHAR,
linkedin_url VARCHAR,
portfolio_url VARCHAR,
bio VARCHAR DEFAULT 'Hello t... | true |
682e6f767f09b77a2776235200340edcc32a181a | SQL | Archer6621/WinHomesV2 | /src/main/resources/queries/create_tables.sql | UTF-8 | 1,374 | 3.671875 | 4 | [] | no_license | -- Created by Vertabelo (http://vertabelo.com)
-- Last modification date: 2018-01-21 01:29:46.441
-- tables
-- Table: home
CREATE TABLE home (
player_uuid varchar(36) NOT NULL,
x double(12,4) NOT NULL,
y double(12,4) NOT NULL,
z double(12,4) NOT NULL,
pitch double(12,4) NOT NULL,
yaw double(12,... | true |
8abf20a6d9b0aa89ffb7c12802df5acf94a0b260 | SQL | aschulak/civ5-corporations | /Build/AAA - Corporations (Brave New World)/SQL/Corp_TableUpdates.sql | UTF-8 | 3,599 | 3.046875 | 3 | [] | no_license | -- Buildings
ALTER TABLE Buildings ADD COLUMN 'CorporationOwnershipRequired' BOOLEAN DEFAULT 0;
ALTER TABLE Buildings ADD COLUMN 'CorporationHeadquartersCity' BOOLEAN DEFAULT 0;
ALTER TABLE Buildings ADD COLUMN 'CorporationSpreadPressureModifier' INTEGER DEFAULT 0;
ALTER TABLE Buildings ADD COLUMN 'CorporationSpreadDis... | true |
858b56b8ebc14c1d8ed101f4ee440eee526e9ffe | SQL | RodoMark/light-bnb | /1_queries/3_property_listings_by_city.sql | UTF-8 | 214 | 3.421875 | 3 | [] | no_license | SELECT *
FROM properties
JOIN property_reviews ON property_reviews.property_id = property_id
WHERE city = 'Vancouver'
GROUP BY properties.id, property_reviews.id HAVING rating > 4
ORDER BY cost_per_night
LIMIT 10
; | true |
b8ee42b01aa9688ec873e6b9c1b564687017e14a | SQL | vimalkumarasamy/sql_challenges | /window_functions.sql | UTF-8 | 1,131 | 3.84375 | 4 | [] | no_license | drop table salary;
CREATE TABLE "salary" (
"employee_id" INTEGER,
"salary" INTEGER,
PRIMARY KEY("employee_id")
);
insert into salary values(20,8559);
insert into salary values(19,9529);
insert into salary values(18,8602);
insert into salary values(17,9751);
insert into salary values(16,8968);
in... | true |
cdb90fbbc4ba94633aac44bb6bcba2c698e535c0 | SQL | Demi871023/SummerCamp-2019 | /Course2_SQL_WorkShop6.sql | UTF-8 | 914 | 4.375 | 4 | [] | no_license | SELECT PivotTable.BOOK_CLASS_ID AS ClassId , PivotTable.BOOK_CLASS_NAME AS ClassName,
CASE WHEN PivotTable.[2016] IS NULL THEN '0' ELSE PivotTable.[2016] END AS 'CNT2016',
CASE WHEN PivotTable.[2017] IS NULL THEN '0' ELSE PivotTable.[2017] END AS 'CNT2017',
CASE WHEN PivotTable.[2018] IS NULL THEN '0' ELSE PivotTab... | true |
31162fbd8f531d4815b3e1b3beac8b0b3bd3e72e | SQL | artofimagination/mysql-user-db-go-interface | /db/migrations/mysql/20200513132800_user.up.sql | UTF-8 | 608 | 3.25 | 3 | [
"MIT"
] | permissive | -- +migrate Up
CREATE TABLE IF NOT EXISTS user_settings(
id binary(16) PRIMARY KEY,
two_steps_verif BOOL DEFAULT false,
created_at DATETIME NOT NULL DEFAULT NOW(),
updated_at DATETIME NOT NULL DEFAULT NOW()
);
-- +migrate Up
CREATE TABLE IF NOT EXISTS users(
id binary(16) PRIMARY KEY,
name VARCHAR (... | true |
a5df7e484fd488a08e8a55368904a9a73e9873b8 | SQL | CharlesRempel/Mobile-Comp | /Database Files/Plan.sql | UTF-8 | 3,033 | 2.796875 | 3 | [] | no_license | CREATE TABLE PLAN
(planID CHAR(10),
planCost Decimal(5,2),
talkID VARCHAR(10) NOT NULL,
textID VARCHAR(10) NOT NULL,
termID CHAR(1),
dataID CHAR(6) NOT NULL,
compID VARCHAR(1) NOT NULL,
CONSTRAINT pk_plan_planID PRIMARY KEY(planID),
CONSTRAINT fk_company... | true |
228ee3eed8b4b6fe9c036083ca4457ae9eba6b9c | SQL | jerweb63/blog2 | /blog2.sql | UTF-8 | 1,854 | 3.21875 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.3.9
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: May 19, 2015 at 09:03 PM
-- Server version: 5.6.21-log
-- PHP Version: 5.6.5
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT *... | true |
e2be112513b415318077bdfda12a0b98007f5a51 | SQL | YodiYanwar/HibernateMySQLExample | /db/student.sql | UTF-8 | 1,513 | 3 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.2.7.1
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: 07 Sep 2014 pada 07.08
-- Versi Server: 5.6.20
-- PHP Version: 5.5.15
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*... | true |
d9c8a9993d55fd38bc6f715bb7485d664fd94ae7 | SQL | dlslzxxz/sp | /dataprocess/58ganji/58retention.sql | UTF-8 | 9,735 | 2.84375 | 3 | [] | no_license | /*
For retention of merchants in all cities
*/
CREATE TABLE `gj_overall_retention` (
`mid` CHAR(20) DEFAULT NULL COMMENT '商户ID',
`showUpArray` VARCHAR(50) NOT NULL COMMENT '出现情况',
`lastShowDate` DATE NOT NULL COMMENT '最近一次被抓取日期',
`updateDate` DATE NOT NULL COMMENT '更新日期',
`addDate` DATE NOT NULL COM... | true |
3fb46b8e66c476e3484d837329304088e5288140 | SQL | ChainGit/funny-demos | /demo09-easy-shop/easyshop/project/170410_EasyShop/easyshop.sql | GB18030 | 19,230 | 2.921875 | 3 | [
"MIT"
] | permissive | /*
Navicat MySQL Data Transfer
Source Server : VirtualBox-PC
Source Server Version : 50633
Source Host : 192.168.56.2:3306
Source Database : easyshop_test
Target Server Type : MYSQL
Target Server Version : 50633
File Encoding : 65001
Date: 2017-05-13 17:29:27
*/
SET FOREIGN_KEY_CH... | true |
53fa991e0f77836de0c3cc9029392cf5b3c8426e | SQL | MrD0079/portal | /sql/dzc_reestr_total.sql | UTF-8 | 9,491 | 3.046875 | 3 | [] | no_license | /* Formatted on 13.01.2018 18:36:22 (QP5 v5.252.13127.32867) */
SELECT z1.current_status,
(SELECT name1
FROM accept_types
WHERE id = z1.current_status)
current_status_txt,
COUNT (*) c
FROM ( SELECT DISTINCT z.id, NVL (current_accepted_id, 0) current_status
... | true |
baf2cca68799bd662587a4648fd365abfdd087d7 | SQL | hilbug/12-employee-tracker | /src/sql/viewUtilizedBudget.sql | UTF-8 | 638 | 4.65625 | 5 | [
"MIT"
] | permissive | select
IFNULL(details.deptname, 'No associated department') AS 'Department',
details.empcount AS 'Employee Count',
concat('$', format(sum(details.totalsalary), 2)) AS 'Total Utilized Budget'
from
(select
count(employee.id) empcount,
role.title,
sum(role.salary) totalsalary,
department.name deptname
from
employ... | true |
803667aaacba3c6b272209c39656a7babe033d6b | SQL | amartija/gestion-curso | /gestion-curso/src/main/resources/gestioncurso.sql | UTF-8 | 80,388 | 3.671875 | 4 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.5.1
-- http://www.phpmyadmin.net
--
-- Servidor: 127.0.0.1
-- Tiempo de generación: 15-06-2017 a las 17:13:05
-- Versión del servidor: 10.1.13-MariaDB
-- Versión de PHP: 7.0.8
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=... | true |
eff312231cc402512e92c1dd38f0c105d9fd7302 | SQL | DebugKing-GoGoGo/mysql | /paas_aom/columns.sql | UTF-8 | 416 | 2.921875 | 3 | [] | no_license | SELECT *
from information_schema.`COLUMNS`
where 1=1
-- and COLUMN_NAME like '%role%'
-- and COLUMN_NAME != 'S_AUTHROLE'
-- and TABLE_NAME not like 'plf_%'
-- and TABLE_NAME not like 't_snap%'
-- and TABLE_NAME != 'mdl_aos_fiprobook'
and TABLE_NAME = 'mdl_aos_project'
and TABLE_SCHEMA = 'paas_aom'
and COLUMN_NAME in (
... | true |
97e61317975a8ccb7add5158d43bbf7f6f4af68c | SQL | worrbc12/Turkish_Airlines_AF_BW | /Turkish_Airlines_AF_BW-master/Project/Turkish Airlne Database/turk_database.sql | UTF-8 | 1,788 | 3.359375 | 3 | [] | no_license | --DROP TABLE Time_Period;
--DROP TABLE Weather_Table;
--DROP TABLE TK_Stock_Price;
--DROP TABLE TK_Traffic_Update;
CREATE TABLE "Time_Period" (
"Year" INT NOT NULL,
"Month" VARCHAR NOT NULL,
CONSTRAINT "pk_Time_Period" PRIMARY KEY (
"Year","Month"
)
);
CREATE TABLE "Weather_Table" (
"... | true |
4ca5b1e02aec15d618f7fdfb6eb9a8b748d01fe9 | SQL | vmogilev/evnt | /linux/mon/sys/install/cr8_privs.sql | UTF-8 | 3,171 | 2.953125 | 3 | [] | no_license | spool cr8_privs.log
set scan on
prompt 1 = repository tns alias
prompt 2 = evnt user password
prompt 3 = default tablespace
CREATE USER bgproc identified by justagate
DEFAULT TABLESPACE &3
TEMPORARY TABLESPACE temp;
GRANT CONNECT TO bgproc;
GRANT CREATE SYNONYM to bgproc;
CREATE USER webproc identifie... | true |
125610bc2695b97bebc0608c2bd78ba08a383ea4 | SQL | Front-LucasRibeiro/Teste-MontarSite | /config/montarsite.sql | UTF-8 | 720 | 3.046875 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.7.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: 15-Mar-2020 às 16:56
-- Versão do servidor: 8.0.16
-- PHP Version: 7.1.9
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
CREATE DATABASE montarsite;... | true |
e649b817cb212b737429617c27c8b96b39753265 | SQL | csuffyy/Azure-image-gallery | /src/AzureImageGallery.Data/insertImages.sql | UTF-8 | 346 | 2.734375 | 3 | [
"Apache-2.0"
] | permissive | /*
After making a migration and updating the databse through EF,
run this command to make an insert of two images from
the wwwroot images directory
*/
SELECT *
FROM GalleryImages
INSERT INTO GalleryImages
(Created, Title, [Url])
VALUES
(GETDATE(), 'Boat one', '/images/boat1.jpeg'),
(GETDATE(), 'Boat two... | true |
7b27b1d04deead23c8b84fcf45d3729c40fe7cf1 | SQL | ancajeckel/proiect | /proiect_db_library_script_updates.sql | UTF-8 | 720 | 2.796875 | 3 | [] | no_license |
update books set title = 'Constelatia fenomenelor vitale' where bookid = 1;
update books set title = 'Toata lumina pe care nu o putem vedea' where bookid = 2;
update books set title = 'Singuratatea numerelor prime' where bookid = 3;
update authors set FirstName = 'Anthony', LastName = 'Marra', BirthDate = CONVERT(D... | true |
ffeebfad8e55bce8ce2a4db8fb1490527bc5ac00 | SQL | Vladimir-Dodnikov/CSharp-MS-SQL-Problems | /01.-Database-Introduction/14.-CarRental-Database/14.-CarRental-Database.sql | UTF-8 | 3,059 | 3.859375 | 4 | [
"Apache-2.0"
] | permissive | CREATE TABLE Categories (
Id INT PRIMARY KEY IDENTITY NOT NULL,
CategoryName NVARCHAR(30) NOT NULL,
DailyRate INT NOT NULL,
WeeklyRate INT NOT NULL,
MonthlyRate INT NOT NULL,
WeekendRate INT NOT NULL
)
INSERT INTO Categories(CategoryName, DailyRate, WeeklyRate, MonthlyRate, WeekendRate)
VALUES
('Limousine', ... | true |
d7b549c2a99e9694597b95ab641d5b14f97110ea | SQL | strujillodv/aca1-desarrollo-web | /scripts.sql | UTF-8 | 951 | 2.9375 | 3 | [] | no_license | -- CREATE TABLE
CREATE TABLE persona (
idpersona INT AUTO_INCREMENT PRIMARY KEY,
cedula INT NOT NULL,
nombre VARCHAR(50),
apellidos VARCHAR(100),
correo VARCHAR(80),
direccion VARCHAR(200),
telefono VARCHAR(50),
fechaNacimiento DATE
) default charset utf8 comment '';
-- INSER DATA
I... | true |
bd9c5b015ff5d7ceeac3170909c916afdc5e8cf9 | SQL | pdnarmi/CompanyTracker | /schema.sql | UTF-8 | 544 | 3.578125 | 4 | [] | no_license | DROP DATABASE IF EXISTS employee_db;
CREATE DATABASE employee_db;
USE employee_db;
CREATE TABLE department(
id INT AUTO_INCREMENT NOT NULL,
name VARCHAR(30) NOT NULL,
PRIMARY KEY (id)
);
CREATE TABLE role(
id INT AUTO_INCREMENT NOT NULL,
title VARCHAR(30) NOT NULL,
salary DECIMAL(10,4) NOT NULL,
dep... | true |
ad2b39545f4904fd50cafbb1d3ea0f52587c69f2 | SQL | singhanilk/ekkitab | /db/trim_ekkitab_books_log_tables.sql | UTF-8 | 611 | 2.5625 | 3 | [] | no_license | use ekkitab_books;
-- Trim the log_url_info table.
delete from log_url_info where url_id in ( select url_id from log_url where datediff(now(), visit_time) > 15 );
-- Trim the log_url table
delete from log_url where datediff(now(), visit_time) > 15;
-- Trim the log_visitor_info table.
delete from log_visitor_info where ... | true |
c37c0b34cb37b2f4d17acbb5b4e09cd9840a4c44 | SQL | blainerothrock/cpdp-wise-lobsters | /cp1/src/q3.sql | UTF-8 | 1,341 | 4.5 | 4 | [] | no_license | CREATE TEMP VIEW officer_subset AS
SELECT o.id, o.first_name, o.last_name, o.birth_year, o.appointed_date,
date_part('year', '2018-01-01'::DATE) - o.birth_year as estimated_age,
('2018-01-01'::DATE - o.appointed_date) / 365 as years_on_force,
COUNT(a.id) as allegation_count
FROM da... | true |
113ed068742c3f18530ecb870619ca929fdcc35b | SQL | lebirdalabig/SIA | /classrecord2.sql | UTF-8 | 14,758 | 3.25 | 3 | [
"MIT"
] | permissive | -- phpMyAdmin SQL Dump
-- version 4.7.0
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Dec 16, 2018 at 06:02 AM
-- Server version: 10.1.26-MariaDB
-- PHP Version: 7.1.8
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD... | true |
b970a3d2e05c8a2651b109c7386419eed474c178 | SQL | tingley/globalsight | /main6/envoy/schema/mysql/create_tm_mysql.sql | UTF-8 | 7,965 | 3.640625 | 4 | [] | no_license | -- This is a TM migration script from 4.4.x to 4.5
INSERT INTO SEQUENCE VALUES('PAGE_TM_SEQ', 1000);
INSERT INTO SEQUENCE VALUES('PAGE_TM_TU_T_SEQ', 1000);
INSERT INTO SEQUENCE VALUES('PAGE_TM_TUV_T_SEQ', 1000);
INSERT INTO SEQUENCE VALUES('PAGE_TM_TU_L_SEQ', 1000);
INSERT INTO SEQUENCE VALUES('PAGE_TM_TUV_L_SEQ', 10... | true |
4c46e95b0987ded4e86689180d3677b51632302f | SQL | MarieKelling/SQL | /MySQL Database - 2351 Shoemaker/Assignments/Unit 4 - Ch 09; Formatting Queries/4.7 - DIY.sql | UTF-8 | 230 | 2.75 | 3 | [] | no_license | -- 4.7 Marie Kelling
-- DIY - Replaces F for Female and inserts zeros into Emails
USE starter;
SELECT
LastName AS 'Last Name',
INSERT(Email, '1', '2', '00') AS 'Email',
REPLACE(Sex, 'F', 'Female') AS 'Sex'
FROM
student;
| true |
977d9b0efef7ec6cb44da7813038856b24eeb4af | SQL | sunah1003/portfolio | /01_SQL/7_joins.sql | UTF-8 | 4,828 | 4.6875 | 5 | [] | no_license | /* 7_joins */
-- FOREIGN KEY
CREATE TABLE customers(
id INT AUTO_INCREMENT PRIMARY KEY,
first_name VARCHAR(100),
last_name VARCHAR(100),
email VARCHAR(100) UNIQUE NOT NULL);
CREATE TABLE customers2(
id INT AUTO_INCREMENT PRIMARY KEY,
first_name VARCHAR(100),
last_name VARCHAR(100),
ema... | true |
6161e177f4d2a2d12ebf071eadd96494585035ef | SQL | ondramandik/vzorova-maturitni-prace | /sql/data.sql | WINDOWS-1250 | 367 | 2.515625 | 3 | [] | no_license | START TRANSACTION;
INSERT INTO kotec (cislo, kapacita) VALUES
('1',3),
('2',3),
('3',2),
('4',2),
('5',3),
('K1',1),
('K2',1);
INSERT INTO recepcni (jmeno, prijmeni, uzivatelske_jmeno, heslo) VALUES
('Jana','Novkov','jnovakova','tatranka'),
('Petra','Svobodov','psvobodova','MilujuJustina'),
('Kim','Ha... | true |
d66ab14990eff73acc5f171baa7baabbb3284942 | SQL | abanet/YourLastTime | /YourLastTime/yourLastTime.sql | UTF-8 | 459 | 3.171875 | 3 | [] | no_license | PRAGMA foreign_keys=OFF;
BEGIN TRANSACTION;
CREATE TABLE Eventos (id integer PRIMARY KEY AUTOINCREMENT DEFAULT NULL,descripcion Varchar(200));
CREATE TABLE Ocurrencias (id integer NOT NULL PRIMARY KEY AUTOINCREMENT DEFAULT 0,fecha Date DEFAULT NULL,hora Time DEFAULT NULL,idEvento integer NOT NULL DEFAULT 0);
DELE... | true |
a8ab7bc9dfc6cd170d2c0dd457c19dd0e7a96961 | SQL | pringleskate/tp_db_forum | /init.sql | UTF-8 | 11,905 | 4 | 4 | [] | no_license | --SELECT pg_catalog.set_config('search_path', '', false);
CREATE EXTENSION IF NOT EXISTS citext;
DROP TABLE IF EXISTS users CASCADE;
CREATE TABLE users
(
ID SERIAL NOT NULL PRIMARY KEY,
-- nickname text NOT NULL unique ,
nickname CITEXT NOT NULL UNIQUE COLLATE "POSIX",
fullname TEXT NOT NULL... | true |
ecad3031ec6abecf7d5a33500ff541b15b3d207f | SQL | MekDrop/JobTest-iBusMedia-MiniWidgetSystem | /db.sql | UTF-8 | 1,299 | 2.8125 | 3 | [
"MIT"
] | permissive | -- --------------------------------------------------------
-- Host: localhost
-- Server version: 5.5.44-0+deb7u1 - (Debian)
-- Server OS: debian-linux-gnu
-- HeidiSQL Version: 9.2.0.4947
-- --------------------------------------------------------
/*... | true |
64061aadb507586a728b3a7592d825282be8fcee | SQL | dbcdeathdreamer/SoftAcadTours-05.2016- | /admin/softacad.sql | UTF-8 | 3,909 | 3.265625 | 3 | [] | no_license | -- MySQL Script generated by MySQL Workbench
-- 05/09/16 21:02:04
-- 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='TRADITION... | true |
1b07698be3d68badd5ddbfebba7d14a51b72ac18 | SQL | BCerki/BootcampX | /walkthroughs/groupby_having_walkthrough.sql | UTF-8 | 257 | 3.953125 | 4 | [] | no_license | SELECT students.name as student, count(assignment_submissions.*) as total_submissions
FROM assignment_submissions
JOIN students ON students.id = student_id
HAVING students.end_date IS NULL
AND count(assignment_submissions.*) < 100
GROUP BY students.name | true |
43a08b98bd88d419530ba1a46600933660ae1c8c | SQL | CHAUTARD/ResaCovid | /sql/vsttreservation-20201013023246.sql | UTF-8 | 29,592 | 3.359375 | 3 | [] | no_license | -- ----------------------
-- dump de la base au 13-Oct-2020
-- ----------------------
-- ---------------------------------------
-- Structure de la table res_creneaux
-- ---------------------------------------
CREATE TABLE `res_creneaux` (
`id_creneau` int(11) NOT NULL AUTO_INCREMENT,
`Nom` varchar(35) NOT NULL,... | true |
f5bbbd4c2e3822cc2bef6eb688334d9a14050df4 | SQL | xuanviet209/quanlythongtincanhan | /themsuaxoa.sql | UTF-8 | 1,798 | 3 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 5.0.3
-- https://www.phpmyadmin.net/
--
-- Máy chủ: 127.0.0.1
-- Thời gian đã tạo: Th3 03, 2021 lúc 03:25 AM
-- Phiên bản máy phục vụ: 10.4.14-MariaDB
-- Phiên bản PHP: 7.2.34
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHAR... | true |
324bc677669156aa14cb5ec6be238739223c4261 | SQL | OrangeFoxie/PHP-LAB-HUTECH | /LAB-02/SQL/ecommerce.sql | UTF-8 | 3,165 | 3.125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Máy chủ: 127.0.0.1
-- Thời gian đã tạo: Th6 02, 2020 lúc 05:55 AM
-- Phiên bản máy phục vụ: 10.4.11-MariaDB
-- Phiên bản PHP: 7.4.5
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARA... | true |
b04db832a0f4b9cead370e14e95ba07d9e372a41 | SQL | paul-rogers/drill-test-framework | /framework/resources/Functional/drill_fragments/decimal/data/where_like_in_between.sql | UTF-8 | 558 | 2.890625 | 3 | [
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | SET planner.width.max_per_node=100;
SET planner.slice_target=1;
SET planner.enable_multiphase_agg=false;
SELECT
avg(decimal_big.DECIMAL_18_8),
avg(decimal_big.DECIMAL_2_1),
avg(decimal_big.DECIMAL_15_5)
FROM
dfs.drillTestDir.`decimal/fragments/T_DECIMAL_BIG` decimal_big
WHERE
decimal_big.STR_FIELD LIKE 'TmpSt... | true |
39f9e46b62a5cda14b488170f3b169888a6d6572 | SQL | Shruti1289/civil_tech | /civil_tech.sql | UTF-8 | 2,733 | 3.25 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 5.1.0
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Jun 17, 2021 at 09:20 PM
-- Server version: 10.4.19-MariaDB
-- PHP Version: 7.3.28
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIE... | true |
84612c1298bb740a8cad0f1fd267da3c240a6d24 | SQL | RiccardoAtzeni/RestApp | /RestApp/src/main/resources/script/createdb.sql | UTF-8 | 763 | 3.046875 | 3 | [] | no_license | CREATE TABLE SPITTER (
spitter_id BIGSERIAL PRIMARY KEY,
username VARCHAR(40) NOT NULL UNIQUE,
password VARCHAR(30) NOT NULL,
role_user VARCHAR(20) NOT NULL,
firstname VARCHAR(30) NOT NULL,
lastname VARCHAR(30) NOT NULL,
email VARCHAR(30) NOT NULL,
insert_date TIMESTAMP,
last_update TIMESTAMP,
enabl... | true |
a39ce2acbc1ecfbd2010d15700fe36c6e595988b | SQL | LajvIT/LajvIT | /admin/testdata.sql | UTF-8 | 3,589 | 3.390625 | 3 | [] | no_license | --
-- Data in table event
--
INSERT INTO #__lit_event (id, shortname, name, startdate, enddate, description) VALUES
(100, 'KH5', 'Krigshjärta 5', '2011-7-10', '2011-7-15', 'Det senaste
lajvet i Krigshjärtaserien. Kommer hållas under 2011.');
--
-- Data in table Eventspecifics
--
INSERT INTO #__lit_eventspecifics (i... | true |
5d50e98daac1cb3211ad74fb53879765a8e0fb9e | SQL | SirKaleeb/pollls-v2 | /prisma/migrations/20210211182357_pollls/migration.sql | UTF-8 | 763 | 3.296875 | 3 | [] | no_license | -- CreateTable
CREATE TABLE "Member" (
"id" INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
"username" TEXT NOT NULL,
"firstName" TEXT,
"lastName" TEXT,
"email" TEXT NOT NULL,
"bio" TEXT,
"polls" TEXT NOT NULL,
"isBanned" BOOLEAN NOT NULL DEFAULT false,
"isStaff" BOOLEAN NOT NULL DEFAULT... | true |
7b0372c790b8598fc26f3156d420a708bc8e36d0 | SQL | mervynjong96/dealloCraftHouse | /backups/product_review.sql | UTF-8 | 1,202 | 2.671875 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.7.0
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Nov 08, 2017 at 10:29 AM
-- Server version: 10.1.25-MariaDB
-- PHP Version: 5.6.31
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OL... | true |
fa49151ddbf92871ad8ce07fdde2adbc83a403f3 | SQL | gibranPR/Blackbuster | /bd/blackbuster.sql | UTF-8 | 6,330 | 3.3125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.5.1
-- http://www.phpmyadmin.net
--
-- Servidor: 127.0.0.1
-- Tiempo de generación: 16-11-2016 a las 19:17:21
-- Versión del servidor: 10.1.16-MariaDB
-- Versión de PHP: 5.6.24
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT... | true |
d0d3adefee7b2cb5f4ee808cc539a24b8954da70 | SQL | gsmith660/java-web-dev-techjobs-persistent | /queries.sql | UTF-8 | 736 | 4.34375 | 4 | [] | no_license | ## Part 1: Test it with SQL
SHOW COLUMNS FROM job;
## Part 2: Test it with SQL
SELECT name
FROM employer
WHERE location = "St. Louis City";
## Part 3: Test it with SQL
DROP TABLE job;
## Part 4: Test it with SQL
SELECT s.name, s.description
FROM skill s
WHERE s.id IN (
SELECT js.skills_id
FROM job_skills js
)
O... | true |
abca1d60da6f199a0040702d8b63c6f92494983d | SQL | PNNL-Comp-Mass-Spec/DBSchema_PgSQL_DMS | /dms/sw/sw.v_failed_job_steps.sql | UTF-8 | 1,078 | 3.09375 | 3 | [
"Apache-2.0"
] | permissive | --
-- Name: v_failed_job_steps; Type: VIEW; Schema: sw; Owner: d3l243
--
CREATE VIEW sw.v_failed_job_steps AS
SELECT js.job,
js.dataset,
js.step,
js.script,
js.tool,
js.state_name,
js.state,
js.start,
js.finish,
js.runtime_minutes,
js.processor,
localprocs.m... | true |
36000732aefad24d85492819ded93dac45c77c8a | SQL | diondokter/Tscrump-Weather-Station | /Database/weatherr.sql | UTF-8 | 860 | 2.765625 | 3 | [
"MIT"
] | permissive | DROP Database weatherr;
CREATE DATABASE weatherr;
USE weatherr;
CREATE TABLE sensor (
`Date` datetime NOT NULL,
`Temperature` float DEFAULT NULL,
`Pressure` float DEFAULT NULL,
`Humidity` float DEFAULT NULL,
`Brightness` float DEFAULT NULL,
primary key(Date)
)
INSERT INTO sensor VALUES
('2016-01-16 18... | true |
cc96ec067a05893fd2d6cda2cf2774c4e36a1c8f | SQL | realFranco/php_anti_storm | /db/1_create_db.sql | UTF-8 | 1,363 | 3.484375 | 3 | [] | no_license | CREATE TABLE Bank_Acc (
id_bank uuid NOT NULL,
id_user uuid NOT NULL,
bank_number int4 NOT NULL,
balance int4 NOT NULL,
PRIMARY KEY (id_bank));
CREATE TABLE Daily_Limit (
id_limit uuid NOT NULL,
id_bank uuid NOT NULL,
incoming float4 NOT NULL,
outcoming float4 NOT NULL,
"date... | true |
9d287c329c6b5bee950a2357e2422d6e7e714d47 | SQL | nss-day-cohort-28/chinook-racheldaniel | /sales_agent_invoices.sql | UTF-8 | 366 | 3.828125 | 4 | [] | no_license | -- Provide a query that shows the invoices associated with each sales agent. The resultant table should include the Sales Agent's full name.
SELECT E.FirstName || " " || E.LastName as "Agent Full Name", I.*
FROM Invoice as I
INNER JOIN Customer as C on I.CustomerId = C.CustomerId
INNER JOIN Employee as E on C.SupportR... | true |
a1ef3e83dcd885fc68c9cb02e291023d2d88147d | SQL | Sunarchventures/guruniketan | /DB_GuruNiketan.sql | UTF-8 | 2,290 | 3 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | -- phpMyAdmin SQL Dump
-- version 4.0.9
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Dec 22, 2016 at 11:53 AM
-- 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 |
0fbe43b4053180956eab9fe92d50f61acb62a37b | SQL | topcoder-platform/tc-java-components | /components/late_deliverables_tracker/test_files/stress/ddl.sql | UTF-8 | 44,756 | 3.578125 | 4 | [] | no_license | create table phase (
phase_id DECIMAL(12,0) not null,
description VARCHAR(254) not null
);
create table roles (
role_id DECIMAL(12,0) not null,
role_name VARCHAR(100) not null,
description VARCHAR(254) not null,
status_id DECIMAL(12,0) not null
);
CREATE TABLE project_type_lu (
... | true |
1e1a4b0276a07c49ad387ede56660f96bbad65e6 | SQL | trofiv-IFMO/IFMO-Databases | /Лабораторная 5/Запросы для защиты/SQLQuery5.sql | UTF-8 | 229 | 3.90625 | 4 | [] | no_license | select S.CustomerID, S.OrderDate, S.SalesOrderID
from Sales.SalesOrderHeader S
where OrderDate =
(select max (OrderDate)
from Sales.SalesOrderHeader
where CustomerID = S.CustomerID )
order by S.CustomerID, S.SalesOrderID | true |
63ff3da5ef7a2c8bea2485d61d6dda45569059b4 | SQL | pavanhg/pirogram-server | /schema.sql | UTF-8 | 2,337 | 3.53125 | 4 | [] | no_license | CREATE TABLE users (
id SERIAL PRIMARY KEY,
email CHARACTER VARYING(256) NOT NULL UNIQUE,
name CHARACTER VARYING(256),
avatar CHARACTER VARYING(256),
active BOOLEAN,
superuser BOOLEAN,
created_at TIMESTAMP WITHOUT TIME ZONE,
updated_at TIMESTAMP WITHOUT TIME ZONE
);
CREATE TABLE study_q... | true |
074ac423ad7610ee528bdfdcaba1e38ee6279b9e | SQL | aarhusstadsarkiv/sql_queries | /batch 1/avidaars9.sql | UTF-8 | 15,693 | 2.625 | 3 | [] | no_license | SELECT *
FROM moedeforum
INNER JOIN moedeforum_fil ON moedeforum.moedeforum_id = moedeforum_fil.moedeforum_id
INNER JOIN fil ON moedeforum_fil.fil_id = fil.fil_id
WHERE moedeforum.Publicering = 'Publiceret' AND moedeforum.moedeforum_id = '1'
SELECT *
FROM moedeforum
INNER JOIN moedeforum_fil ON moedeforum.moedeforum_i... | true |
3915bff60649c1e96c6ede633a766d12a65a76d5 | SQL | Traizel/giphy-favs | /database.sql | UTF-8 | 598 | 3.453125 | 3 | [] | no_license | CREATE DATABASE "giphy_search_favorites";
-- You'll need a table for storing each giphy image favorite
-- Each favorite image can be assigned 1 of the following categories as a Foreign Key
CREATE TABLE "favorites" (
"id" SERIAL PRIMARY KEY,
"title" VARCHAR (100) NOT NULL,
"url" VARCHAR (500) NOT NULL,
... | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.