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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
87b02f3c2482885b405e2936d3da9e75eae1a695 | SQL | michele872/CorsoPROXIMA | /eclipse-workspace/ProCeAcMiPersistence/.svn/pristine/87/87b02f3c2482885b405e2936d3da9e75eae1a695.svn-base | UTF-8 | 445 | 2.953125 | 3 | [] | no_license | DROP TABLE surveycategory;
/*
CREATE TABLE surveycategory(
id INT NOT NULL auto_increment,
label VARCHAR(50) NOT NULL,
description VARCHAR(100),
PRIMARY KEY(ID)
);
*/
INSERT INTO surveycategory(label, description)
VALUES('Java Capitolo 1', 'Questionario Certificazione Java Capitolo 1');
INSERT INTO surveycategory(... | true |
602066fd4cc02af9cd55339d76be4618ddb2b69f | SQL | CheolHo-0428/myWebWorkspace | /WebMarket/src/main/webapp/WEB-INF/sql/product.sql | UTF-8 | 921 | 2.921875 | 3 | [] | no_license | CREATE TABLE Market_User01.product(
p_id VARCHAR(10) NOT NULL PRIMARY KEY,
p_name VARCHAR(20),
p_unitPrice INTEGER,
p_description CLOB,
p_category VARCHAR(20),
p_manufacturer VARCHAR(20),
p_unitsInStock LONG,
p_condition VARCHAR(20),
p_fileName VARCHAR(20)
)TABLESPACE WebMarketDB;
DROP TABLE Market_U... | true |
6d4dda6664e011e7a019c62d0444dbd00e5e52cb | SQL | Tryford/MP_MODSPACK_VPJFD | /Mods/(JFD-3) JFD's Cities in Development (v 58)/Components/Health/Core/Health_Buildings.sql | UTF-8 | 52,722 | 3.0625 | 3 | [] | no_license | --==========================================================================================================================
-- BUILDING CLASSES
--==========================================================================================================================
-- Buildings
--------------
INSERT INTO BuildingC... | true |
87024041d2ebe6af7aa1bc251d3d25d2bce68cee | SQL | LesterAGarciaA97/OnlineCourses | /08. Coursera/07. Advanced relational database and SQL/Module 1/Week 01/Querys/Task 7B.sql | UTF-8 | 1,205 | 4.125 | 4 | [] | no_license | --
-- Welcome to Task 7 !!
--
-- Advanced RDB and SQL
--
-- CTE Recursive Part B
USE world_peace;
WITH RECURSIVE merchandise_cte (merchandise_item_id, depth, description, unit_price_decimal, alpha_sort, bundle_id)
-- defining the common table expression
AS (
-- top level items
SELECT
merchandise_item_id, ... | true |
5a8a0dc111a2f8968d1c678920cb0c853edc4c75 | SQL | Bahis27/parts | /createAndFill.sql | UTF-8 | 2,592 | 2.828125 | 3 | [] | no_license | DROP DATABASE IF EXISTS test;
CREATE DATABASE test;
USE test;
CREATE TABLE `test`.`test` (
`id` INT(11) NOT NULL AUTO_INCREMENT,
`name` VARCHAR(255) NOT NULL,
`need` BIT(1) NOT NULL,
`quantity` int(11) NOT NULL,
PRIMARY KEY (`id`))
COLLATE='utf8_general_ci';
INSERT INTO `test`.`test` (`name`,`need`,`quantity... | true |
422fa859136d3b0a394504a63d0207791a128c1a | SQL | vasilstoyanov99/CSharp_DB_January_2021 | /MSSQL/Exercises/01.Databases_Introduction/01.Databases_Introduction/08. Create Table Users.sql | UTF-8 | 612 | 2.578125 | 3 | [] | no_license | CREATE TABLE Users
(
Id BIGINT PRIMARY KEY IDENTITY,
Username VARCHAR(30) NOT NULL,
[Password] VARCHAR(26) NOT NULL,
ProfilePicture NVARCHAR(MAX) NOT NULL,
LastLoginTime DATETIME,
IsDeleted BIT
)
INSERT INTO Users (Username, [Password], ProfilePicture, LastLoginTime, IsDeleted) VALUES
('Kevin', 'sdlfhewriog', 's... | true |
1ba8bcb80355edba6f6767218e36a7e15c3fbfaf | SQL | sebastianfrasic/Proyecto-MBDA | /XTablas.sql | ISO-8859-1 | 1,976 | 2.890625 | 3 | [] | no_license | --xForaneas--
ALTER TABLE Empleados DROP CONSTRAINT FK_EMPLEADOS_PERSONAS;
ALTER TABLE Veterinarios DROP CONSTRAINT FK_VETERINARIOS_EMPLEADOS;
ALTER TABLE Asistentes DROP CONSTRAINT FK_ASISTENTES_EMPLEADOS;
ALTER TABLE Cajeros DROP CONSTRAINT FK_CAJEROS_EMPLEADOS;
ALTER TABLE Dueos DROP CONSTRAINT FK_DUEOS_PERSONA... | true |
e0ae16261dbd95f60113c5b21d596bd3b63996b1 | SQL | payneteasy/jdbc-proc | /jdbc-proc-integration-test/src/test/resources/sql_postgresql/ancestry.sql | UTF-8 | 1,246 | 3.84375 | 4 | [] | no_license | drop table if exists boy;
drop table if exists father;
drop table if exists grandfather;
DROP SEQUENCE if EXISTS grandfather_seq;
CREATE SEQUENCE grandfather_seq;
DROP SEQUENCE if EXISTS father_seq;
CREATE SEQUENCE father_seq;
DROP SEQUENCE if EXISTS boy_seq;
CREATE SEQUENCE boy_seq;
create table grandfather (
... | true |
9f9d35f3a23e31ff229fc72d179d0fd4e895a74c | SQL | maikale/Hellground_database | /updates/characters/old/HG_6235_characters_characters.sql | UTF-8 | 1,089 | 3 | 3 | [] | no_license | ALTER TABLE characters
ADD gender TINYINT UNSIGNED NOT NULL default '0' AFTER class,
ADD xp INT UNSIGNED NOT NULL default '0' AFTER gender,
ADD money INT UNSIGNED NOT NULL default '0' AFTER xp,
ADD playerBytes INT UNSIGNED NOT NULL default '0' AFTER money,
ADD playerBytes2 INT UNSIGNED NOT NULL default '0' AFTER player... | true |
c202fc38626b2366efd267e820487c590d47e877 | SQL | tcash562/Team5--ETL_Project | /NHL_Data.sql | UTF-8 | 384 | 2.625 | 3 | [] | no_license | CREATE TABLE team_history (
franchise TEXT PRIMARY KEY,
years_active INT,
games_played INT,
wins INT,
losses INT,
overtime_losses INT,
points INT,
playoff_appearences INT,
stanley_cup_wins INT
);
CREATE TABLE player_data (
franchise TEXT,
player_name TEXT,
age INT,
position TEXT,
rating DECIMAL,
games_playe... | true |
37789bc1ea89ab585ba487ea87427166624714c5 | SQL | MikeDM16/Computer-Science-UMinho | /Licenciatura_BSc/3º Ano/1º Semestre/Bases de Dados/Guiões aulas TP/TP 7/pizzaria_scrip.sql | UTF-8 | 8,302 | 4.125 | 4 | [
"MIT"
] | permissive | USE pizzaria;
/*1) Qual a informação que temos disponível na base de dados sobre pizzas?*/
SELECT * FROM pizzas;
/*2) Quais são os nomes das matérias-primas definidas na base de dados? Apresente-as
ordenadas alfabeticamente.*/
SELECT matériaprima.Designação FROM matériaprima
ORDER BY matériaprima.Designação ASC;
/*... | true |
3724c8b23d40e6258a76e8de7f9b199e3223985c | SQL | meta-khemanshu-rao/get2015 | /DBMS/Assignment3/Question2_assignemnt3.sql | UTF-8 | 650 | 4.34375 | 4 | [] | no_license | SELECT subject_name, S.subject_Id, count(t.title_id) as "Number Of books purchased" FROM subjects S, titles T
where T.subject_id = S.subject_Id GROUP BY(subject_id);
-- Question -2
SELECT M.member_name,M.member_Id,T.title_Name,T.title_Id,B.accession_No,B.issue_Date,B.due_Date , DATEDIFF(due_Date,issue_Date ) AS DiffD... | true |
23f96e59069017eed6e61594167ce451c9ba2eaf | SQL | brandontkessler/sql_helpers | /compare_queries.sql | UTF-8 | 434 | 3.78125 | 4 | [] | no_license | /* SIMPLE QUERY COMPARISON
*
* Use the below template, replace the two queries with queries to test
* If query returns anything, queries are not equivalent
* */
WITH
q1 AS (
SELECT distinct
test_col,
sum(totals)
FROM test_tbl
GROUP BY 1
),
q2 AS (
SELECT
test_col,
sum(totals)
FROM test_tb... | true |
31843c47227ae8e7852f2eaeb7b0171fad83d05f | SQL | lyyh/hsweb-framework | /hsweb-web-bean/src/main/resources/system/install/sql/h2/install.sql | UTF-8 | 20,279 | 3.234375 | 3 | [
"Apache-2.0"
] | permissive | CREATE TABLE "S_USER_PROFILE" (
"U_ID" VARCHAR2(32) NOT NULL,
"CONTENT" CLOB NOT NULL,
"TYPE" VARCHAR2(512) NULL,
"USER_ID" VARCHAR2(32) NULL
);
COMMENT ON TABLE "S_USER_PROFILE" IS '用户配置表';
COMMENT ON COLUMN "S_USER_PROFILE"."U_ID" IS 'UID';
COMMENT ON COLUMN "S_USER_PROFILE"."CONTENT" IS '配置内... | true |
04c8fc10647c577b2597a894624dc704cb50129f | SQL | prjromy/ChannakyaBase | /ChaBase/LG/Tables/TransferRole.sql | UTF-8 | 415 | 2.546875 | 3 | [] | no_license | CREATE TABLE [LG].[TransferRole] (
[TURId] INT IDENTITY (1, 1) NOT NULL,
[MUid] INT NOT NULL,
[TUid] INT NOT NULL,
[RoleId] INT NOT NULL,
[EffFrom] DATETIME NULL,
[EffTo] DATETIME NULL,
[Status] BIT NULL,
[Remarks] ... | true |
a598fefdf6bc44f6e3c33235fccf60b517d5ea0d | SQL | DanielBankov/SoftUni | /C# DB Fundamentals/Databases Basics - MS SQL Server/Exam - 29 Aug 2018/13. Sellers.sql | UTF-8 | 414 | 4.3125 | 4 | [
"MIT"
] | permissive | SELECT TOP(10) CONCAT(FirstName, ' ', LastName) AS [Full Name],
SUM(i.Price * oi.Quantity) AS [Total Sum],
SUM(oi.Quantity) AS [Items]
FROM Employees AS e
JOIN Orders AS o ON o.EmployeeId = e.Id
JOIN OrderItems AS oi ON oi.OrderId = o.Id
JOIN Items AS i ON i.Id = oi.ItemId
WHERE o.[Dateti... | true |
105d05a7832dc3250c85625606ad2ca82f3305e9 | SQL | denisshapiro/sqlzoo | /1_SELECT_name.sql | UTF-8 | 1,998 | 3.96875 | 4 | [] | no_license | -- 1 Query to find the country that start with 'Y'
SELECT name FROM world
WHERE name LIKE 'Y%'
-- 2 Query to find the countries that end with 'y'
SELECT name FROM world
WHERE name LIKE '%y'
-- 3 Query to find the countries that contain the letter 'x'
SELECT name FROM world
WHERE name LIKE '%x%'
-- 4 Query to f... | true |
eb79a8428ecb12202255d96b1d5a2cb57d167753 | SQL | thinkverse/Interclip | /scripts/db.sql | UTF-8 | 1,727 | 3.6875 | 4 | [
"Apache-2.0",
"MIT"
] | permissive | USE iclip;
/* Rate limit table */
DROP TABLE IF EXISTS `hits`;
CREATE TABLE `hits` (
`id` int NOT NULL AUTO_INCREMENT,
`iphash` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
`date` datetime NOT NULL,
`operation` text CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
PRIMARY KEY (`id`)
... | true |
9f9984103ca64e0cf60d8b2b09ac817473ab9a3a | SQL | InnovateUKGitHub/innovation-funding-service | /ifs-data-layer/ifs-data-service/src/main/resources/db/setup/V118_3_1__Add_apc_terms_and_conditions_version_2.sql | UTF-8 | 779 | 3.1875 | 3 | [
"MIT"
] | permissive | -- IFS-3171: Add new version of APC terms and conditions
-- Add entry into terms and conditions table for the version 2 APC terms and conditions
INSERT INTO terms_and_conditions (name, template, version)
VALUES ("APC Terms and Conditions v2", "apc-terms-and-conditions-v2", 2);
-- Update link from template APC com... | true |
187ed0c65b622dfa04d21b045c2504e345caaf51 | SQL | Elena741/diplom-php-26 | /faq.sql | UTF-8 | 7,952 | 2.890625 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.8.3
-- https://www.phpmyadmin.net/
--
-- Хост: localhost
-- Время создания: Янв 18 2019 г., 14:19
-- Версия сервера: 5.6.39-83.1
-- Версия PHP: 5.6.37
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */... | true |
eaa7b83bd0717099b434a979cb1636e23753604f | SQL | abdou7isil/the-ancient-time | /ancient_time_db/bd/revenus.sql | UTF-8 | 1,419 | 3.046875 | 3 | [
"CC-BY-2.5"
] | permissive | -- phpMyAdmin SQL Dump
-- version 4.9.2
-- https://www.phpmyadmin.net/
--
-- Hôte : 127.0.0.1:3306
-- Généré le : Dim 09 fév. 2020 à 20:12
-- Version du serveur : 10.4.10-MariaDB
-- Version de PHP : 7.3.12
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!... | true |
ae791cba28a34efaa96c1e65fd40e6f49931dac2 | SQL | wangylhs/Yinglai_Wang | /CS_stuff/ECE562/project3/trg.sql | UTF-8 | 9,554 | 3.71875 | 4 | [] | no_license | set serveroutput on;
create or replace trigger trg_gen after insert on GENERAL_WARD
for each row
declare
ct_bed int;
min_pre_date date;
potential_date date;
begin
begin
select count(*) into ct_bed from SCREENING_WARD s where s.Bed_No is not null;
EXCEPTION
WHEN NO_DATA_FOUND THEN
ct_bed:=0;
end;
if(ct_bed... | true |
e4176916d44b3774c0b9cd85ab788274d68a214a | SQL | silence-do-good/stress-test-Postgres-and-MySQL | /dump/low/day27/select0253.sql | UTF-8 | 177 | 2.609375 | 3 | [] | no_license |
SELECT timeStamp, temperature FROM ThermometerOBSERVATION o
WHERE timestamp>'2017-11-26T02:53:00Z' AND timestamp<'2017-11-27T02:53:00Z' AND temperature>=3 AND temperature<=28
| true |
d5877f42d1b25fb79832ffbf8244febf9c7fa71f | SQL | Ralfi18/CI_Boilerplate | /new_table_schema.sql | UTF-8 | 2,116 | 3.46875 | 3 | [] | no_license | CREATE TABLE `users`
(
`id` int NOT NULL AUTO_INCREMENT PRIMARY KEY,
`name` varchar(100),
`email` varchar(150),
`password` text,
`last_updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`timestamp_login` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`timestamp_logout` timestamp NOT NULL DEFAULT CUR... | true |
ee860224f3aa73bbd5741c66341a6383b1d18572 | SQL | thachgiasoft/MedicalLink | /SQL_MedicalLink/BC_Doanh thu theo nhom DV.sql | UTF-8 | 6,286 | 3.71875 | 4 | [] | no_license | ---Bao cao doanh thu theo nhom dich vu - Ngay 18/7/2017
--TOng hop
SELECT (row_number() OVER (PARTITION BY degp.departmentgroupname ORDER BY dv.servicepricegroupcode,dv.servicepricename)) as stt,
degp.departmentgroupname,
dv.servicepricecode,
dv.servicepricename,
dv.servicepricegroupcode,
dv.loaidoituon... | true |
9b3c5a3ad76b3dab78997751eac536409263b2c6 | SQL | HarrissonPereira/WebApi | /queries.sql | UTF-8 | 2,074 | 4.03125 | 4 | [] | no_license | /* 1. Quais alterações devemos fazer nessa estrutura para que o cliente consiga fazer mais de um serviço por solicitação?
Remover o ID Serviço da tabela Ordem de Serviço e criar uma nova tabela para relacionar o Serviço com a Ordem de Serviço.
Com essa nova tabela, teremos 'ID Serviço' e 'ID Ordem de Serviço', pois ass... | true |
fe22597eb5dc69856e16adc37fad8c39de4f396c | SQL | omniwheelss/aols | /Codebase_V2.0/db/CODEBASE.sql | UTF-8 | 3,434 | 3.109375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.1.12
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Jan 26, 2015 at 02:15 PM
-- Server version: 5.6.16
-- PHP Version: 5.5.11
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;... | true |
bd2e4905a1d53e7d1f3597c11b79b3398dc66c40 | SQL | radtek/abs3 | /sql/mmfo/bars/Data/tts/et_tou.sql | WINDOWS-1251 | 11,153 | 2.859375 | 3 | [] | no_license | set lines 1000
set trimspool on
set serveroutput on size 1000000
prompt / TOU
prompt : TOU-
declare
cnt_ number;
begin
--------------------------------
-- --
--------------------------------
begin
insert into tts(tt, name, dk, nlsm, kv, nlsk, kvk, nlss, nlsa, nlsb, mfob, flc, ... | true |
7453eac6579029f544681a3361fe6cf550e2960c | SQL | hyunmoon-han/hanhyunmoon-spring5 | /DATABASES/SQL진도_20210608.sql | UTF-8 | 872 | 3.078125 | 3 | [] | no_license | --SQL쿼리 페이징을 구현해서 변수로 삼을것을 정의
--PageVO의 멤버변수로 사용예정
SELECT TableB.* FROM
(
SELECT ROWNUM AS RNUM, TableA.* FROM
(
SELECT * FROM tbl_member
WHERE user_id LIKE '%admin%'
OR user_name LIKE '%사용자8%'
ORDER BY reg_date DESC
) TableA WHERE ROWNUM <= (2*5)+ 5--0부터 선택한 페이지까지 총개수
) Tabl... | true |
e972ade5382f75f306ed96809e5cc3bc17902a55 | SQL | Team-Rough-Puffs/reviews | /schema.sql | UTF-8 | 1,645 | 3.59375 | 4 | [] | no_license | DROP DATABASE IF EXISTS reviews;
CREATE DATABASE reviews;
\c reviews;
DROP TABLE IF EXISTS characteristics, reviews, characteristics_reviews, review_photos CASCADE;
CREATE TABLE characteristics (
characteristics_id SERIAL PRIMARY KEY,
product_id INT,
name VARCHAR (50)
);
CREATE TABLE reviews (
review_id SERIA... | true |
385ff0134fadf11cfa9e775080104d0d25a2b7cf | SQL | sork01/dbas | /lab1/present/lab1.2.sql | UTF-8 | 181 | 3.28125 | 3 | [] | no_license | -- 2. Give the name and area of the world's northernmost desert.
SELECT name, area
FROM desert
WHERE (coordinates).latitude = (
SELECT MAX((coordinates).latitude)
FROM desert
);
| true |
6c20b9acbe682dccace5e7c6e4507fa2aa19f9d5 | SQL | radtek/abs3 | /sql/mmfo/bars/Table/cp_many.sql | WINDOWS-1251 | 3,430 | 3.046875 | 3 | [] | no_license |
PROMPT =====================================================================================
PROMPT *** Run *** ========== Scripts /Sql/BARS/Table/CP_MANY.sql =========*** Run *** =====
PROMPT =====================================================================================
PROMPT *** ALTER_POLICY_INFO... | true |
7c29c4fb4714b61a5aa129c1d812dcf99ea5f61d | SQL | black-shadows/LeetCode-Topicwise-Solutions | /MySQL/second-degree-follower.sql | UTF-8 | 177 | 3.6875 | 4 | [] | no_license | # Time: O(nlogn)
# Space: O(n)
SELECT f1.follower, COUNT(DISTINCT f2.follower) AS num
FROM follow f1
JOIN follow f2 ON f1.follower = f2.followee
GROUP BY f1.follower
| true |
7198a052409a8199c0f7c3f26fd833021ef2e1da | SQL | jo-soomin/Kh-SemiProject | /SEMI_1team/src/member/trade/db/Trade.sql | UTF-8 | 760 | 3.046875 | 3 | [] | no_license | SELECT * FROM (SELECT V.*, ROWNUM AS RNUM FROM (SELECT * FROM (SELECT * FROM MEMBER_TRADE
WHERE ID = 'MENTOR01'
ORDER BY TRADE_NO DESC)V)V)
WHERE RNUM BETWEEN = 1 AND 3;
SELECT * FROM (SELECT V.*, ROWNUM AS RNUM FROM (SELECT * FROM (SELECT * FROM MEMBER_TRADE
WHERE ID = #{id}
ORDER BY TRADE_NO DESC))V)
WHERE RNUM BE... | true |
80ccab0b31d2643f5e675c647f45ae17dd0e2a88 | SQL | luisorellana777/SpringBoot | /BD/tables.sql | UTF-8 | 751 | 3.828125 | 4 | [] | no_license | CREATE TABLE school.course (
code varchar(4) NOT NULL,
name varchar(100) NOT NULL,
CONSTRAINT course__PK PRIMARY KEY (code)
)
ENGINE=InnoDB
DEFAULT CHARSET=utf8mb4
COLLATE=utf8mb4_0900_ai_ci;
CREATE TABLE `student` (
`rut` varchar(100) NOT NULL,
`name` varchar(100) NOT NULL,
`lastName` varchar(100) NOT NULL... | true |
42483871485fa47a7996f405ed8bd2c4bdd87a99 | SQL | sidabs/mysql-node-play | /queries/stored_procedutes.sql | UTF-8 | 938 | 3.78125 | 4 | [] | no_license | ##### CRUD
#create new user
DELIMITER $$
CREATE PROCEDURE createNewUser
(
IN userId varchar(10),
IN userName varchar(20),
IN userEmail varchar(50)
)
BEGIN
INSERT INTO users VALUES (userId, userName, userEmail);
END$$
DELIMITER ;
#retrieve user by id
DELIMITER $$
CREATE PROCEDURE getUserById
(
IN userId varchar(10... | true |
827fe4dd56e3a1983235ca9d04d43e618e78225c | SQL | nisarhassan12/materialize | /misc/dbt-materialize/dbt/include/materialize/macros/catalog.sql | UTF-8 | 2,218 | 3.75 | 4 | [
"Apache-2.0",
"BSD-2-Clause",
"CC0-1.0",
"BSD-3-Clause",
"MPL-2.0",
"0BSD",
"PostgreSQL",
"GPL-1.0-or-later",
"GPL-2.0-only",
"MIT",
"BUSL-1.1"
] | permissive | -- Copyright 2020 Josh Wills. All rights reserved.
-- Copyright Materialize, Inc. and contributors. All rights reserved.
--
-- 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 in the LICENSE file a... | true |
e419fdcaa6d462efcf34ac758562dec617e87d0d | SQL | Oleg-Lopes/learn-logic-backend | /learnlogic.sql | UTF-8 | 15,127 | 3.0625 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.5.1
-- http://www.phpmyadmin.net
--
-- Хост: 127.0.0.1
-- Время создания: Окт 11 2017 г., 23:45
-- Версия сервера: 10.1.13-MariaDB
-- Версия PHP: 5.6.23
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT ... | true |
d120919261c75856b1629ff81b441c46bd09dcfd | SQL | hector81/MySql | /Funciones/5_11_FUNCION_PAISMASVENTA_produ.sql | UTF-8 | 510 | 3.828125 | 4 | [] | no_license | DELIMITER $$
DROP FUNCTION IF EXISTS PAISMVENTApro $$
CREATE FUNCTION PAISMVENTApro(prod INT) RETURNS CHAR(20)
BEGIN
DECLARE TOTAL DECIMAL(10,2);
DECLARE PAIS VARCHAR (20);
SELECT p.nombrepais ,SUM(CANTIDAD) INTO PAIS,TOTAL
FROM PEDIDOSDETA PD JOIN PEDIDOSCABE PC
ON PD.IDPEDIDO = PC.IDPEDIDO
JOIN CLIENTES C ON C.I... | true |
d0ea70e0e697add74d9ea14e7a07f92019dccb40 | SQL | menty44/data | /fred.sql | UTF-8 | 1,795 | 3 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.1.6
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Oct 29, 2015 at 01:01 PM
-- Server version: 5.6.16
-- PHP Version: 5.5.9
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/... | true |
bd06123c7b4325f2d2c4c6cb625b1245d0f1a846 | SQL | silence-do-good/stress-test-Postgres-and-MySQL | /dump/low/day11/select0003.sql | UTF-8 | 405 | 3.46875 | 3 | [] | no_license |
SELECT obs.sensor_id, avg(counts)
FROM (SELECT sensor_id, date_trunc('day', timestamp), count(*) as counts
FROM WiFiAPObservation WHERE timestamp>'2017-11-10T00:03:00Z' AND timestamp<'2017-11-11T00:03:00Z' AND SENSOR_ID = ANY(array['3144_clwa_4065','3142_clwa_2219','3143_clwa_3059','wemo_04','3141_clwa_1300'])... | true |
2cfcd014fc8d956c19d8ae714b4c68b420fbbfbb | SQL | be-lb/solar-loader | /solar_loader/sql/select_result_batch.sql | UTF-8 | 205 | 3.328125 | 3 | [] | no_license | SELECT
res.roof_id,
st_astext(ro.{roof.geometry})
FROM
{results.table} res
LEFT JOIN {roof.table} ro ON res.roof_id = ro.id
WHERE
res.compute_status = 0
ORDER BY res.id
LIMIT %s ;
| true |
28392559948d4361a0af83fa8c290470bce5417f | SQL | silence-do-good/stress-test-Postgres-and-MySQL | /dump/high/day12/select2012.sql | UTF-8 | 191 | 2.734375 | 3 | [] | no_license |
SELECT timeStamp, temperature
FROM ThermometerObservation
WHERE timestamp>'2017-11-11T20:12:00Z' AND timestamp<'2017-11-12T20:12:00Z' AND SENSOR_ID='1ac2663d_cca6_4ba8_af4d_0eba94600311'
| true |
8443898656c41a1a0ad3c0c126d1a8518274e356 | SQL | dao2014/ibtis-spring-maven | /src/main/resources/book.sql | UTF-8 | 825 | 2.953125 | 3 | [] | no_license | /*
Navicat MySQL Data Transfer
Source Server : my1
Source Server Version : 50709
Source Host : 115.29.113.54:3306
Source Database : mytest
Target Server Type : MYSQL
Target Server Version : 50709
File Encoding : 65001
Date: 2015-11-17 09:07:37
*/
SET FOREIGN_KEY_CHECKS=0;
-- ----... | true |
3f6e5d197931ca277e26c9abffecb02131e6d929 | SQL | TavaresCarlos/city-codes | /src/cache/makeTmp.sql | UTF-8 | 1,577 | 2.859375 | 3 | [] | no_license |
--
-- Script generated by datapackage.json files and pack2sql generator.
-- Created in 2017-10-16
--
CREATE EXTENSION IF NOT EXISTS file_fdw;
-- DROP SERVER IF EXISTS csv_files CASCADE; -- danger when using with other tools.
CREATE SERVER csv_files FOREIGN DATA WRAPPER file_fdw;
DROP FOREIGN TABLE IF EXISTS tm... | true |
f6cdf58dd557923263af4c13c48bd8a7e02a2f8a | SQL | dMedinaO/webPESB2 | /db/dump.sql | UTF-8 | 5,620 | 3.109375 | 3 | [] | no_license | -- MySQL dump 10.13 Distrib 5.7.27, for Linux (x86_64)
--
-- Host: localhost Database: pesb2DB
-- ------------------------------------------------------
-- Server version 5.7.27-0ubuntu0.16.04.1
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SE... | true |
f7cb2b18bc5ff321c8195a0367a9e63c5b3843c8 | SQL | megamind-94/TrapWeb | /trap_web.sql | UTF-8 | 5,028 | 3.3125 | 3 | [] | no_license | /*
Navicat Premium Data Transfer
Source Server : localhost
Source Server Type : MySQL
Source Server Version : 50553
Source Host : localhost:3306
Source Schema : trap_web
Target Server Type : MySQL
Target Server Version : 50553
File Encoding : 65001
Date: 07/03/2019 2... | true |
9b938b96800f074b883e7dd65e64d6768ff73549 | SQL | yuramitsyuk/jdbctemplate | /target/classes/sql/schema.sql | UTF-8 | 657 | 3.8125 | 4 | [] | no_license | DROP DATABASE IF EXISTS jdbctemplate;
CREATE DATABASE jdbctemplate;
USE jdbctemplate;
CREATE TABLE role (
id INT NOT NULL AUTO_INCREMENT,
name VARCHAR(10) UNIQUE NOT NULL,
PRIMARY KEY(id)
);
CREATE TABLE user (
id INT NOT NULL AUTO_INCREMENT,
login VARCHAR(30) UNIQUE NOT NULL,
password VARCHAR(15) NOT NULL... | true |
169bdf371b45f9920d537c0653e0004c2023ccf8 | SQL | Bittosan/ecommerce | /ecommerce-model/build/classes/schema.ddl | UTF-8 | 1,085 | 2.875 | 3 | [] | no_license |
create table Orders (
id_order integer not null,
id_product integer not null,
email varchar(255),
purchase_data varchar(255),
quantity integer not null,
total float not null,
primary key (id_order, id_product)
);
create table OrdersLogger (
i... | true |
f2dcb65f2b56c017a59737d82989b9395c6dc022 | SQL | Seelenoede/AusbiScore | /Datenbank/projekt_ausbiscore (1).sql | UTF-8 | 1,778 | 3.078125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.8.3
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Erstellungszeit: 14. Sep 2020 um 12:10
-- Server-Version: 10.1.36-MariaDB
-- PHP-Version: 7.2.11
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_C... | true |
d901a46368224f88e75ecfe156a36548cc22dd50 | SQL | solenn-massot/tdl | /bdd/todolist.sql | UTF-8 | 3,072 | 3.34375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Hôte : 127.0.0.1:3306
-- Généré le : lun. 04 mai 2020 à 07:59
-- Version du serveur : 5.7.26
-- Version de PHP : 7.4.4
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLI... | true |
48fbd50e2a832981364217f5e441ea180d8d253f | SQL | dommii1218/coursera | /sqlzoo.sql | UTF-8 | 4,728 | 4.40625 | 4 | [] | no_license | --8. 找出所有國家,其名字以t作第二個字母。
SELECT name
FROM world
WHERE name LIKE '_t%'
ORDER BY name
--12. 顯示所有國家名字,其首都是國家名字加上”City”。
SELECT name
FROM world
WHERE capital LIKE concat(name, ' City')
--14. 找出所有首都和其國家名字,而首都是國家名字的延伸。你應顯示Mexico City,因它比其國家名字Mexico長。你不應顯示Luxembourg,因它的首都和國家名相是相同的。
SELECT name, capital
FROM world
WHERE cap... | true |
c921fc1e42531f1529d6440b261e3f0e36d22926 | SQL | Kukafee/myProject | /sublime/mktable/mktable_total_194.sql | UTF-8 | 10,759 | 3.296875 | 3 | [] | no_license | --
-- ----------------------------------------------------------------------------
-- ----------------------------------------------------------------------------
-- 总体样本: databank.freq_info 440466597
-- mid string
-- sex int
-- age int
-- income ... | true |
be889ea5612fb39c5d577a1f05793c10cc895950 | SQL | sofiaaaaaa/sql-basic | /practiceMyself/sqld이론.sql | UTF-8 | 919 | 2.84375 | 3 | [] | no_license | ANSI/SPARC 의 3단계 스키마 요약
외부 스키마 - 사용자 관점
개념스키마 - 사용자 관점을 통합한 조직 전체의 DB
내부 스키마 - DB의 물리적 저장 구조
엔티티 분류 - 유무와 발생시점
부서 - 유무: 개념 / 발생: 기본
교육이력, 구매 신청 - 유무: 사건 / 발생 - 중심
구매신청상세 - 유무: 사건 / 발생: 행위
사원 - 유무: 유형 / 발생: 기본
구매 신청에 있는 주문번호는 인조식별자 이다.
본테이블-상세테이블이 필수관계 인 경우 옆에 동그라미가 없음.
제1정규화위반 - 한 테이블에 여러개의 같은속성의 컬럼이... | true |
38dda17f709157314bab6f145408d662827eb893 | SQL | sumeetmathpati/dbms_sql_files | /oracle/bank_schema/questions-answers.sql | UTF-8 | 2,620 | 4.53125 | 5 | [] | no_license | -- Find all loans over 500
SELECT * FROM loan WHERE amount > 500;
-- Find the loan number for each loan of an amount greater than 500
SELECT loan_number FROM loan WHERE amount > 500;
-- Find the names of all customers who have a loan, an account, or both from the bank.
(SELECT customer.customer_name FROM customer J... | true |
aa487c9e1ca172a3ad36cdfdd5e06701be90ae86 | SQL | andku83/beer-test | /database/migrations/dump.sql | UTF-8 | 3,426 | 3.03125 | 3 | [
"MIT"
] | permissive | -- phpMyAdmin SQL Dump
-- version 4.7.4
-- https://www.phpmyadmin.net/
--
-- Хост: 127.0.0.1:3307
-- Время создания: Янв 22 2018 г., 05:51
-- Версия сервера: 10.2.8-MariaDB
-- Версия PHP: 5.6.31
SET FOREIGN_KEY_CHECKS=0;
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+0... | true |
ca5cb95ab604d9259542ed5ef5063dc7de73b5ec | SQL | IrfanSayeed/Pewlett-Hackard-Analysis | /Employee_Challenge_starter_code.sql | UTF-8 | 348 | 3.65625 | 4 | [] | no_license | Select distinct ee.emp_no, ee.first_name, ee.last_name, tt.tile, tt.from_date, tt.to_date
Into Retirement_titles
From employees as ee
INNER JOIN titles AS tt
ON (ee.emp_no = tt.emp_no)
WHERE (birth_date BETWEEN '1952-01-01' AND '1955-12-31')
Order by ee.emp_no;
select * from retirement_titles;
drop table Retirement_t... | true |
6f38084869e7759baabd4cad15b9c64751dbd860 | SQL | atha-tsaqif/Archives | /sql-file/php/php_laravel_with_migration.sql | UTF-8 | 855 | 2.96875 | 3 | [] | no_license | SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
CREATE DATABASE IF NOT EXISTS `php_laravel` DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
USE `php_laravel`;
CREATE TABLE `mahasiswa` (
`id` int(11) NOT NULL,
`nama` varchar(255) NOT NULL,
`nrp` char(9) NOT NULL,
`e... | true |
e33bbb79792919c0776667e78370b54013ed6837 | SQL | TecAbel/ProjectsMan | /estructura_pm.sql | UTF-8 | 2,011 | 4.1875 | 4 | [] | no_license | #se crea la base de datos
CREATE DATABASE projectsman CHARACTER SET 'UTF8' COLLATE 'utf8_general_ci';
create USER 'pm_god'@'localhost' IDENTIFIED BY 'God_P*7';
GRANT SELECT, DELETE, UPDATE, CREATE, INSERT ON projectsman.* TO 'pm_god'@'localhost';
USE projectsman;
CREATE TABLE usuarios (
num_usuario int(8) NOT NULL U... | true |
2daea4dde256baf7f0bcd71a040f3a4b84f6a72a | SQL | devfest-bugbust/cps | /cps-ri/src/test/resources/data/schemaset.sql | UTF-8 | 2,974 | 2.953125 | 3 | [
"Apache-2.0"
] | permissive | /*
============LICENSE_START=======================================================
Copyright (C) 2020-2021 Pantheon.tech
Modifications Copyright (C) 2020 Nordix Foundation.
Modifications Copyright (C) 2020-2021 Bell Canada.
=============================================================================... | true |
0353ad9925b3e8f8f5022190f1e064922b31aa7c | SQL | malak-dev/cleaning_mate | /back_end/db/seeds/appointments.sql | UTF-8 | 10,810 | 2.609375 | 3 | [] | no_license | --- passed provider 1
INSERT INTO appointments
(date,start_time,hours,booked,cost_per_hour,comment,rating,client_id,provider_id)
VALUES
('2020-02-02', 8, 1, true, 15, 'Great Work', 5, 1, 1);
INSERT INTO appointments
(date,start_time,hours,booked,cost_per_hour,comment,rating,client_id,provider_id)
VALUES
('2020-... | true |
d95d7ee145f16d132beca183a65160dfbeb073fe | SQL | Felix-xilef/Banco-de-Dados | /Aulas/11-23/exercicios2.sql | UTF-8 | 1,537 | 3.40625 | 3 | [
"MIT"
] | permissive | delimiter &
/* Adicionar */
create trigger t_venda after insert on itemnota
for each row
begin
declare p numeric(6,2);
update produto set estoque=estoque-new.quant where codproduto=new.codproduto;
set p=(select preco from produto where codproduto=new.codproduto)*new.quant;
update notafiscal set valor=valor+... | true |
c4320ebe165d8558b4612a069197ce9eb3de2ec5 | SQL | silence-do-good/stress-test-Postgres-and-MySQL | /dump/high/day20/select1555.sql | UTF-8 | 264 | 2.796875 | 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='WiFiAP' AND sen.id=ci.SENSOR_ID AND ci.INFRASTRUCTURE_ID=ANY(array['4032','1428','3058','4219','4088','5204','3100_7','2089','6056','3026'])
| true |
ec7790d8e42cdf777fd8fc57d46a925c0631c7a6 | SQL | Anastasoff/Telerik-Academy | /Software-Technologies/Databases/04.SQL-Advanced/05.AvgSalaryInDepName.sql | UTF-8 | 228 | 4.25 | 4 | [] | no_license | -- Task 5. Write a SQL query to find the average salary in the "Sales" department.
SELECT
AVG(e.Salary) AS [Average Salary]
FROM Employees e
INNER JOIN Departments d
ON e.DepartmentID = d.DepartmentID
WHERE d.Name = 'Sales' | true |
16e65bae17767916e65573fb4a54cd6965bbaa80 | SQL | delphi1977/NewDicomPACS | /Database/oracle/tables/theal_tmp.sql | WINDOWS-1251 | 746 | 3.4375 | 3 | [] | no_license | DROP TABLE ASU.THEAL_TMP CASCADE CONSTRAINTS
/
--
-- THEAL_TMP (Table)
--
CREATE GLOBAL TEMPORARY TABLE ASU.THEAL_TMP
(
FK_ID NUMBER(6),
CODE VARCHAR2(15 BYTE),
FC_NAME VARCHAR2(500 BYTE),
FK_OWNER INTEGER
)
ON COMMIT DELETE ROWS
NOCACHE
/
COMMENT ON TABLE ASU.THEAL_TMP IS ' -- Created 20090... | true |
0784fab94dbde87e9e3b58aa99be228669903773 | SQL | namelessan/sql-crud | /11.sql | UTF-8 | 197 | 3.390625 | 3 | [] | no_license | select date_of_birth, 'Birth of ' || first_name
from persons
where date_of_birth is not NULL
union
select start_at, 'Start of ' || id
from matches
where start_at is not NULL
order by date_of_birth; | true |
1e00008e9a1d94855f1042fb122f0b73c62c8356 | SQL | KonstantinKirchev/DataBases | /Homeworks/Homework-Advanced SQL - functions, grouping and DDL-63940/Advanced SQL/Problem18_Write a SQL statement to add a column GroupID to the table Users/GroupId.sql | UTF-8 | 109 | 3.0625 | 3 | [] | no_license | ALTER TABLE Users
ADD GroupId int
CONSTRAINT FK_Users_Groups
FOREIGN KEY (GroupId) REFERENCES Groups(Id)
| true |
2569fa2d2ad2e48987fe128d923f993fe710699a | SQL | hsemarap/coursesPHP | /triggers.sql | UTF-8 | 340 | 3.5625 | 4 | [] | no_license | CREATE trigger facDelete AFTER DELETE ON departments
FOR each ROW
DELETE FROM faculties WHERE department_id = OLD.id;
DELIMITER $
CREATE PROCEDURE facultyTermid(IN termid INT(11))
BEGIN
SELECT * from users as u,term_faculties as tf,faculties as f where tf.term_id = termid and tf.faculty_id = f.id and f.user_id = u.id... | true |
688d44f256b6add59cc26eebff9429ee6ff0e18b | SQL | CUBRID/cubrid-testcases | /sql/_17_sql_extension2/_02_full_test/_09_implicit_type_conversion/_01_assignment/_02_type_conversion_by_update/cases/sequence_conversion_update.sql | UTF-8 | 3,513 | 3.25 | 3 | [
"BSD-3-Clause"
] | permissive | --test implicit type conversion of set type
create table sequence_conversion(
col1 datetime,
col2 date,
col3 time,
col4 timestamp,
col5 double,
col6 float,
col7 numeric,
col8 bigint,
col9 int,
col10 short,
col11 monetary,
col12 bit(30),
col13 bit varying,
col14 char(30),
col15 varchar(30),
col16 ncha... | true |
ded099b6acec9bc8bdbddd801a20036942ce6168 | SQL | Neofine/Data-Base-Project | /ddl.sql | UTF-8 | 23,862 | 3.640625 | 4 | [] | no_license | drop table Gra cascade constraints;
drop table Rozgrywka cascade constraints;
drop table Uczestnicy cascade constraints;
drop table Ruch cascade constraints;
drop table Gracz cascade constraints;
drop table GraczLudzki cascade constraints;
drop table GraczSI cascade constraints;
drop table Znajomosc cascade constraints... | true |
b0b0879d698876303866e5f45a0c996899bf2eb7 | SQL | vlbash/diklz | /src/App.Data/DTO/ATU/AtuStreetDTO.sql | UTF-8 | 273 | 3.484375 | 3 | [] | no_license | SELECT
street.id as id,
street.name as name,
city.id as city_id,
city.name as city_name,
street.caption as type_enum,
coalesce(street.caption, '') as caption
FROM atu_street as street
LEFT JOIN atu_city as city on street.city_id = city.id
WHERE street.record_state <> 4 | true |
fb29236994bc45a47809e7a6cbd9fcb107ab8bae | SQL | justinchuby/tartanhacks | /th.sql | UTF-8 | 5,572 | 3.265625 | 3 | [] | no_license | -- MySQL dump 10.16 Distrib 10.1.9-MariaDB, for Linux (x86_64)
--
-- Host: unix.bezi.io Database: th_2016
-- ------------------------------------------------------
-- Server version 5.6.27-0ubuntu0.14.04.1
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@C... | true |
3f4ac10bf89837b20122c157dba9b13c3546f774 | SQL | omersevim/SEP-assignment-1 | /assignment2/q19.sql | UTF-8 | 136 | 3.359375 | 3 | [] | no_license | Select c.ContactName, o.OrderDate
from Customers c inner join Orders o
on c.CustomerID = o.CustomerID
where o.OrderDate > '19980101' | true |
37bf4e6589daf74862dc0b5b66e21514391754a9 | SQL | 18753377299/MavenSSM | /src/main/resources/sql/riskcontrol/riskWisdom/other/联系人信息-无下划线.sql | UTF-8 | 1,113 | 3.375 | 3 | [] | no_license | --联系人信息
drop table if exists RiskWisdom_contactInfo;
CREATE TABLE RiskWisdom_contactInfo(
riskFileNo varchar(22) NOT NULL ,
participantType varchar(255) NOT NULL ,
serialno serial NOT NULL ,
linkName varchar(255),
linkTele varchar(255),
email varchar(255),
inserttimeforhis TIMESTAMP(0) WITHOUT TIME ZONE DEFAULT... | true |
9354e4f92dee150fb47533ef9bedad8e41731f14 | SQL | hanhathuy2612/SQL_QUANLYCHUYENBAY | /QUANLICHUYENBAY.sql | UTF-8 | 13,851 | 3.609375 | 4 | [] | no_license | CREATE DATABASE QUANLICHUYENBAY
USE QUANLICHUYENBAY
CREATE TABLE KHACHHANG(
MAKH NVARCHAR(15)NOT NULL,
TENKH NVARCHAR(30) NOT NULL,
DCHI NVARCHAR(50) NOT NULL,
DTHOAI VARCHAR(12) NOT NULL
)
CREATE TABLE NHANVIEN(
MANV VARCHAR(20) NOT NULL,
TENNV NVARCHAR(30) NOT NULL,
DCHI NVARCHAR(50) NOT NULL,
DTHOAT VARC... | true |
32fa583a332e1e5869c30f90fa437af9b07852c3 | SQL | papagr/TheLMA | /thelma/repositories/rdb/sql/migrate_209_0011_pre.sql | UTF-8 | 2,770 | 3.9375 | 4 | [
"MIT"
] | permissive | -- Replaces the old rack position table with a new one that contains 1536
-- positions (incl. labels) and does not accept duplicate positions (unlike
-- the current one). At this, we also have to replace the foreign keys in the
-- tube transfer, rack position set member and planned transfer tables.
-- The PRE script re... | true |
7d6e1029661454991fe7fbef1ba114b9078cc032 | SQL | epiii/sister | /shared/db/@tables/useronlinemonth.sql | UTF-8 | 1,141 | 2.671875 | 3 | [] | no_license | # Host: localhost (Version: 5.6.20)
# Date: 2015-01-28 16:50:10
# Generator: MySQL-Front 5.3 (Build 4.187)
/*!40101 SET NAMES latin1 */;
#
# Structure for table "useronlinemonth"
#
DROP TABLE IF EXISTS `useronlinemonth`;
CREATE TABLE `useronlinemonth` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`ipproxy` varchar(1... | true |
0e5bfce680440818472fcae829175462aaad830e | SQL | NonWhite/rcjapp | /conf/evolutions/default/1.sql | UTF-8 | 5,010 | 3.34375 | 3 | [] | no_license | # --- Created by Ebean DDL
# To stop Ebean DDL generation, remove this comment and start using Evolutions
# --- !Ups
create table accion (
idaccion integer auto_increment not null,
nombreruta varchar(255),
descripcion varchar(255),
constraint pk_accion primar... | true |
aa7a1c50b0ca17913f366e39c1229c479df4718b | SQL | AlvaroCardonaH/Turnos | /HorariosInicioFinTurno.Sql | UTF-8 | 11,978 | 3.40625 | 3 | [] | no_license | DELIMITER //
CREATE PROCEDURE HorariosInicioFinTurno (P_IdFlota INT, P_HoraCero INT, P_HoraUno INT, P_HoraDos INT, P_HoraTres INT,
P_HoraCuatro INT, P_HoraCinco INT, P_HoraSeis INT, P_HoraSiete INT, P_HoraOcho INT, P_HoraNueve INT,
P_HoraDiez INT, P_HoraOnce INT, P_HoraDoce INT, P_HoraTrece INT, P_HoraCatorce INT, P_... | true |
09e5c5a6cededd2d4d64d75f4d4160d4cb795f73 | SQL | tknzk/isucon10 | /mysql/db/0_Schema.sql | UTF-8 | 2,450 | 3.5625 | 4 | [] | no_license | DROP DATABASE IF EXISTS isuumo;
CREATE DATABASE isuumo;
DROP TABLE IF EXISTS isuumo.estate;
DROP TABLE IF EXISTS isuumo.chair;
DROP TABLE IF EXISTS isuumo.chair_features;
CREATE TABLE isuumo.estate
(
id INTEGER NOT NULL PRIMARY KEY,
name VARCHAR(64) NOT NULL,
descriptio... | true |
760ddf53e7ef0b6f6b68efb2dbc136c808f73641 | SQL | siminastefan/Databases | /Asg2/Asg2-h.sql | UTF-8 | 906 | 4.125 | 4 | [] | no_license | --Find the number of books in each language
SELECT COUNT(IWI.Language_id) Count_id, IWI.Language_id
FROM IS_WRITTEN_IN IWI
GROUP BY IWI.Language_id
--Find the librarians that earn more than the average of all
SELECT L.Lid, L.Salary
FROM LIBRARIAN L
GROUP BY L.Lid, L.Salary
HAVING L.Salary >
( SELECT AVG(... | true |
b369162a81c8a3a6e73fb35f7e1442fb499b062f | SQL | aswathkumar07/Euro_2016_SQL_Mini_Project | /sql_q15_sol.sql | UTF-8 | 276 | 3.90625 | 4 | [] | no_license | SELECT r.referee_name, COUNT(DISTINCT player_id) AS unique_player_bookings
FROM match_mast as m
INNER JOIN referee_mast as r
ON m.referee_id = r.referee_id
INNER JOIN player_booked as pb
ON m.match_no = pb.match_no
GROUP BY r.referee_name
ORDER BY unique_player_bookings DESC; | true |
28f98e0ed2c912151e6346e45bf69f17f9ef6be2 | SQL | kingfish777/KnowledgeBase | /LAERTES/Analyses/validation_query_04-22-2016.sql | UTF-8 | 2,804 | 3.65625 | 4 | [] | no_license | /*FIRST LET'S JUST GET EVERYTHING THAT CAN GO TO THE INGREDIENT LEVEL TO THE INGREDIENT LEVEL*/
/*SINCE IT IS SLOW, WE'LL WRITE IT TO A TEMP TABLE*/
/*REMEMBER A CLINICAL DRUG THAT IS A COMBO DRUG WILL DUPILICATE THE EVIDENCE ACROSS THE COMBINATIONS, WE CANNOT ASSUME WHICH INGREDIENT SHOULD TAKE THE BLAME*/
SELECT r.H... | true |
00b3355808b5c6c46cee1ac94f986337a17ce598 | SQL | ebeilmann/DixieStateUniversity | /cs4307/sql_vqs3_files/listing0903.sql | UTF-8 | 122 | 2.796875 | 3 | [] | no_license | SELECT au_fname || ' ' || au_lname AS "Name"
FROM authors
UNION
SELECT pub_name
FROM publishers
ORDER BY 1 ASC; | true |
2e89b1ad40e34c8f7376c5b0555ca82e9853720c | SQL | invoke888/caipiao | /document/增加腾讯类sql/data/game_catch_config.sql | UTF-8 | 2,909 | 2.953125 | 3 | [] | no_license | /*
Navicat MySQL Data Transfer
Source Server : 47.75.222.46(hk_test)
Source Server Version : 50642
Source Host : 47.75.222.46:3306
Source Database : kdy28
Target Server Type : MYSQL
Target Server Version : 50642
File Encoding : 65001
Date: 2019-03-06 23:06:49
*/
SET... | true |
a3ace78b11bca1ebed1ac75b2835174b3e6cc9cd | SQL | julianop0/Treinamento | /www/public/veiculos.sql | UTF-8 | 3,278 | 3.0625 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.9.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1:3306
-- Tempo de geração: 25-Jun-2020 às 14:36
-- Versão do servidor: 8.0.18
-- versão do PHP: 7.3.12
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD... | true |
a4d30f654a96fe2936483b6eed224f5162538b55 | SQL | patoch/austin-longhorns | /src/main/cql/create_ks.cql | UTF-8 | 1,409 | 3.46875 | 3 | [] | no_license | DROP KEYSPACE IF EXISTS austin_longhorns_ks;
CREATE KEYSPACE austin_longhorns_ks WITH replication = {'class': 'NetworkTopologyStrategy', 'Cassandra' : 2, 'Analytics' : 1, 'Solr' : 1};
USE austin_longhorns_ks;
CREATE TABLE tweets2 (
id VARCHAR,
creation_day VARCHAR,
creation_at TIMESTAMP,
user_id VARC... | true |
0b4ca308b3bbbd22e23e6cf02e5e4c6540f70737 | SQL | michonau/ai16projet | /fichier_creation_bdd.sql | UTF-8 | 1,251 | 3.4375 | 3 | [] | no_license | DROP SCHEMA ai16 CASCADE;
CREATE SCHEMA IF NOT EXISTS ai16;
CREATE TABLE IF NOT EXISTS ai16.sujets(
id SERIAL PRIMARY KEY,
titre VARCHAR,
fkmoderateur_createur INTEGER,
statut VARCHAR(12),
date_creation DATE,
date_fermeture_auto DATE,
CONSTRAINT C_statut CHECK (statut in ('elaboration', 'c... | true |
9e58e92be31becfab07f5f65d6de9ba47ca6bcf1 | SQL | malexander92/MIDS | /w205/exercise_1/investigations/best_states/top_10_states.sql | UTF-8 | 4,274 | 4.34375 | 4 | [] | no_license | --Creating ratios of hosptials better/worse readmission and mortality measures for each state
DROP TABLE IF EXISTS readmissions_states_scores_average;
CREATE TABLE readmissions_states_scores_average AS
SELECT
state,
CASE WHEN measure_id LIKE 'READM%' THEN 'readmission_average'
WHEN measure_id LIKE 'MORT%' THEN 'mor... | true |
c7adef930bbc9f051d8b222c6f2ded265b294a94 | SQL | Badamsereedari/Tools | /CREATE_METADATA_SCRIPTS/0_FUNC_LONG_TO_CHAR.sql | UTF-8 | 675 | 3.03125 | 3 | [] | no_license | CREATE OR REPLACE FUNCTION LONG_TO_CHAR
( in_table_name varchar,
in_column varchar2,
in_column_name varchar2,
in_tab_name varchar2)
RETURN varchar AS
text_c1 varchar2(32767);
sql_cur varchar2(2000);
begin
sql_cur := 'select '||in_column||' from
... | true |
b386a614ff6b008f639886800c418ef2a3694179 | SQL | radtek/Telecommunication | /K7/DataBase/FUNCTION/USSD_K7_LK_RESET_PASSWORD.sql | WINDOWS-1251 | 1,000 | 2.890625 | 3 | [] | no_license | CREATE OR REPLACE FUNCTION USSD_K7_LK_RESET_PASSWORD (
pPHONE_NUMBER IN VARCHAR2
)
RETURN VARCHAR2
AS
--
--#Version=1
--
--v.1 26.11.2015 - USSD K7_LK (ag-sv.ru)
--
PRAGMA AUTONOMOUS_TRANSACTION;
vRESULT VARCHAR2 (2000);
BEGIN
if nvl(CONVERT_PCKG.GET_IS_COLLECTOR_BY_PHONE(pPHO... | true |
2d3cc07ae188e8bde1d46e819161834d7c652f13 | SQL | codenation-dev/squad-10-java-2 | /log/src/main/resources/db/migration/V1__Initial_version.sql | UTF-8 | 494 | 2.75 | 3 | [] | no_license | CREATE TABLE IF NOT EXISTS usuario (
id BIGSERIAL PRIMARY KEY,
nome VARCHAR(100) NOT NULL,
perfil VARCHAR(10) NOT NULL,
email VARCHAR(100) UNIQUE NOT NULL,
senha VARCHAR(60) NOT NULL
);
CREATE TABLE IF NOT EXISTS log (
id BIGSERIAL PRIMARY KEY,
usuario_id BIGINT REFERENCES usuario(id) NOT N... | true |
54b2a6995e4b4b1dfe41b82cc359c9959e3eeab0 | SQL | jayapura-dev/backend-infocoronapapua | /application/sql/v_rekap_suspect.sql | UTF-8 | 368 | 2.890625 | 3 | [
"MIT"
] | permissive | SELECT
COUNT(DISTINCT tb_suspect.id_suspect) as Confirm,
COUNT(DISTINCT CASE WHEN tb_suspect.status = 'POSITIF' THEN tb_suspect.id_suspect END) as Positif,
COUNT(DISTINCT CASE WHEN tb_suspect.status = 'SEMBUH' THEN tb_suspect.id_suspect END) as Sembuh,
COUNT(DISTINCT CASE WHEN tb_suspect.status = 'MENINGGAL' THEN tb_su... | true |
35cadb0fc21ee2eb04822ac1a5c41c225e8f2e41 | SQL | maxposher/code_backup | /DB Query/Default Work Query.sql | UTF-8 | 1,745 | 2.96875 | 3 | [] | no_license | SELECT raw_mongo_user_traces.dt, SUM(raw_mongo_user_traces_agg.aba) AS "raw_mongo_user_traces.android_sessions"
FROM raw_mongo.user_traces AS raw_mongo_user_traces
LEFT JOIN raw_mongo.user_traces_agg AS raw_mongo_user_traces_agg ON raw_mongo_user_traces_agg.user_traces_id = raw_mongo_user_traces.generated_id
LEFT JOIN ... | true |
5e00259e6196a33ea2b361f385e9fce362ec8167 | SQL | heruujoko/tsel-net-management | /tselno.sql | UTF-8 | 141,444 | 2.9375 | 3 | [
"MIT"
] | permissive | -- phpMyAdmin SQL Dump
-- version 4.4.10
-- http://www.phpmyadmin.net
--
-- Host: localhost:8889
-- Generation Time: Feb 10, 2016 at 09:03 AM
-- Server version: 5.5.42
-- PHP Version: 5.6.10
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
--
-- Database: `tselno`
--
-- -----------------------------... | true |
eaa008e60af0dcb21a9ddbc1a4b954ed392cadcd | SQL | Jerome-Horton/weekend-sql-to-do-list | /database.sql | UTF-8 | 421 | 2.671875 | 3 | [] | no_license | CREATE TABLE toDoList(
"id" serial PRIMARY KEY,
"task" varchar(2000),
"date" Date,
"is_complete" varchar not null
);
INSERT INTO toDoList ( "task", "date", "is_complete" )
VALUES ( 'Review LinkedIn Profile', '11-20-2021', 'N'),
( 'complete Assignment', '11-20-2021', 'N'),
( 'Watch the two Assigned... | true |
badbf9d6b93e3aa1d93043c44371587783aa3cbd | SQL | leoouyang/csc343 | /A3/data.sql | UTF-8 | 3,872 | 3.484375 | 3 | [] | no_license | INSERT INTO student(id, firstName, lastName)
VALUES
('0998801234', 'Lena', 'Headey'),
('0010784522', 'Peter', 'Dinklage'),
('0997733991', 'Emilia', 'Clarke'),
('5555555555', 'Kit', 'Harrington'),
('1111111111', 'Sophie', 'Turner'),
('2222222222', 'Maisie', 'Williams');
INSERT INTO room(id, roomName, teacher)
VALUES
(1... | true |
bcd4934b6814dcafa2eacec1ffd8237cc3f3afa3 | SQL | techstard/portfolio-recipe | /RecipeProject/target/recipe-1.0.0-BUILD-SNAPSHOT/WEB-INF/classes/DDL_INGREDIENTS.sql | UTF-8 | 409 | 3.328125 | 3 | [] | no_license | DROP TABLE IF EXISTS Ingredient;
CREATE TABLE Ingredient(
ingredientId int not null AUTO_INCREMENT,
ingredientType int not null NOT NULL,
amount varchar (255),
metric varchar (255),
version int not null default 0,
PRIMARY KEY (ingredientId),
CONSTRAINT ingredientTypeFK
FOREIGN KEY (ingredientType)
... | true |
108d1bb86892b0fb4dba80ddfa2f40101d8c9ef6 | SQL | dream0708/goodwilldd-prototype-project | /spring-mybatis-h2/src/main/resources/database/create_table.sql | UTF-8 | 1,601 | 3.71875 | 4 | [] | no_license | create table TB_AUTH(
username varchar(50) not null primary key,
password varchar(50) not null,
enabled boolean not null);
create table TB_AUTH_ROLE (
username varchar(50) not null,
authority varchar(50) not null,
constraint fk_authorities_users foreign key(username) referen... | true |
34d8565ce559cee4cc12d2d2ac40e13b50405553 | SQL | Oscar101019/VironchiSoft | /ScriptsDB/Crear_DBVironchi.sql | UTF-8 | 6,082 | 3.59375 | 4 | [] | no_license | -- VIRONCHISOFT
-- Crear base de datos
-- Los cambios fueron los siguinetes
-- Se le agrego el campo e fecha a la tabla CitamED
-- Se le agrego el campo sexo a la tabla Cliente
-- Se agrego la tabla Tabla_Citas_Inicio
-- Se crearon 2 triggers
-- Se creo una vista
create database BDVIRONCHI;
use BDVIRONCHI;... | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.