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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
1e11ed6ff2192088df91053419da04eede1f40a8 | SQL | wchen308/practice_db | /exclude_most_and_least_popular_activity_1355.sql | UTF-8 | 1,277 | 4.21875 | 4 | [] | no_license | /*
Write an SQL query to find the names of all the activities with neither maximum, nor minimum number of participants.
Return the result table in any order. Each activity in table Activities is performed by any person in the table Friends.
The query result format is in the following example:
Friends table:
+------+... | true |
7167c2394260f1a574685afc5260b48b96d25975 | SQL | MichaelShipitsyn/Bulletin-board | /my_avito.sql | UTF-8 | 13,663 | 3.109375 | 3 | [
"MIT"
] | permissive | -- phpMyAdmin SQL Dump
-- version 4.6.6deb5
-- https://www.phpmyadmin.net/
--
-- Хост: localhost:3306
-- Время создания: Дек 05 2018 г., 22:25
-- Версия сервера: 5.7.24-0ubuntu0.18.04.1
-- Версия PHP: 7.2.10-0ubuntu0.18.04.1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTE... | true |
e669489aa78a7c54fee98513b37a57693ab4daf4 | SQL | marshmallow16/cetpa_jsp | /userdb.sql | UTF-8 | 2,034 | 3.03125 | 3 | [
"MIT"
] | permissive | -- phpMyAdmin SQL Dump
-- version 4.4.14
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Jul 08, 2016 at 10:52 AM
-- Server version: 5.6.26
-- PHP Version: 5.6.12
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;... | true |
1f1690dbf0e0df5c29a3365ac5bcc830111b2fbf | SQL | GoldenLeoPT/VisualEncyclopedia | /Produção audiovisuais/registos.sql | UTF-8 | 5,712 | 4.34375 | 4 | [] | no_license | USE Encyclopedia;
/* Consulta todos os programas na base de dados*/
CREATE OR REPLACE VIEW v_visualizar_programas AS
SELECT
p.Nome,
p.AnoEstreia AS "Ano de Estreia",
e.Nome AS Estudio,
pessoa.Nome AS Realizador
FROM Programas p
JOIN Estudios e ON p.IDEstudio = e.IDEstudio
JOIN Realizadores r ON p.IDRealizador = r.IDRe... | true |
3e1ff91aab503005de3e6f0af0bcfb52c8b03876 | SQL | drtobbe/sql2graph | /examples/musicbrainz/sql/export-simple-link_artist_label.sql | UTF-8 | 538 | 3.625 | 4 | [
"MIT"
] | permissive | -- COPY (SELECT * FROM l_artist_label) TO stdout CSV HEADER DELIMITER E'\t';
COPY(
SELECT
link_al.id AS pk,
link_al.entity0 AS artist_fk,
link_al.entity1 AS label_fk,
link.begin_date_year,
link.end_date_year,
link_type.name,
--link_type.long_link_phrase,
... | true |
1c8fef7af5296e3aadc10c15ba21e7f19c5990bb | SQL | dingdayu/CURD | /curd.sql | UTF-8 | 1,193 | 2.890625 | 3 | [
"WTFPL"
] | permissive | /*
Navicat MySQL Data Transfer
Source Server : localhost
Source Server Version : 50505
Source Host : localhost:3306
Source Database : lixiaolong
Target Server Type : MYSQL
Target Server Version : 50505
File Encoding : 65001
Date: 2015-12-28 11:47:47
*/
SET FOREIGN_KEY_CHECKS=0;
-... | true |
12eb6be87a091fa55c3a11589faa9a5c36639c8f | SQL | dmdmitrienko/yandex_praktikum-data_analyst-project5 | /select_flights_ticets_by_week.sql | UTF-8 | 1,099 | 4.40625 | 4 | [] | no_license | SELECT
SUBQ1.week_number,
SUBQ1.ticket_amount,
SUBQ1.festival_week,
SUBQ1.festival_name
FROM (
(
SELECT
EXTRACT(week from flights.departure_time) AS week_number,
COUNT(ticket_flights.ticket_no) AS ticket_amount
FROM
flights
INN... | true |
1ebf3689d9f39c50d22bb053fef622404f93c46f | SQL | HAFDIAHMED/2A-ENSIAS | /S4/M4.5 Bases de données avancées/Bases de données réparties/TP/TPs/Scripts/nassar2.sql | UTF-8 | 3,973 | 3.390625 | 3 | [] | no_license | COPY FROM haddouchi/roudani8@ensias1 TO haddouchi/roudani8@ensias2 APPEND Client_Rabat (no, nom, prenom, adresse) USING Select no, nom, prenom, adresse FROM Client Where Ville='Rabat' ;
COPY FROM haddouchi/roudani8@ensias1 TO haddouchi/roudani8@ensias1 APPEND Client_Casablanca (no, nom, prenom, adresse) USING Select... | true |
f72abec189927275fb8697ed2ac59ee604b89654 | SQL | silence-do-good/stress-test-Postgres-and-MySQL | /dump/high/day24/select1804.sql | UTF-8 | 264 | 3.015625 | 3 | [] | no_license |
SELECT sen.name
FROM SENSOR sen, SENSOR_TYPE st, COVERAGE_INFRASTRUCTURE ci
WHERE sen.SENSOR_TYPE_ID=st.id AND st.name='WeMo' AND sen.id=ci.SENSOR_ID AND ci.INFRASTRUCTURE_ID=ANY(array['5100_7','3086','5212','2214','4204','5082','5100_6','2091','6076','4214'])
| true |
f6d33cd2d0ab13ba8a0643f2b0de276d3afb0596 | SQL | mattfenwick/financeManager | /src/database/version_1_2_0/upgradeSchema.sql | UTF-8 | 1,518 | 3.796875 | 4 | [] | no_license |
use finance;
alter table transactions
add column savetime timestamp
default CURRENT_TIMESTAMP;
alter table transactions
add column purchasedate date
default null;
-- allow nulls for "date"
alter table transactions
change column `date` `date` date
default null;
-- adding/updating date co... | true |
2a5bb30c08fc8be5ae3897281ddb21144668d71a | SQL | vurten/SQL-INF3180 | /TP2/Tp2-2.sql | UTF-8 | 12,367 | 3.5625 | 4 | [] | no_license |
--*************************************************************
-- *
-- auteur: CHAOUKI Mohamed *
-- code permanent: CHAM27088802 *
-- courriel: chaouki.mohamed@courrier.uqam.ca *... | true |
f13ab7f12275c02c31ef67de8099378516a49f74 | SQL | eulalie367/littleapps | /htdocs/ColumnSearch.sql | UTF-8 | 1,395 | 3.78125 | 4 | [] | no_license | SELECT
o.name tableName,
c.name columnName,
c.is_nullable,
t.name as type,
c.max_length,
dc.definition defaulValue,
c.name + ' '
+ t.name
+ case t.name
WHEN 'varchar'then ' (' + CONVERT(varchar,c.max_length) + ')'
WHEN 'nvarchar'then ' (' + CONVERT(varchar,c.max_length) + ')'
WHEN 'char'then ' ... | true |
544b713c5391f8d1cd159b73778bc73160718eb4 | SQL | 123mahmud/tammacorp | /!db_backup/d_form_laporan_leader dan _dt.sql | UTF-8 | 4,202 | 3.09375 | 3 | [] | no_license | -- --------------------------------------------------------
-- Host: 127.0.0.1
-- Server version: 10.1.31-MariaDB - mariadb.org binary distribution
-- Server OS: Win32
-- HeidiSQL Version: 9.5.0.5196
-- ------------------------------------------------... | true |
553bbd742959cc68a9ce80bf72cf0e42234af204 | SQL | something1000/SQL | /rozwiazania/test1.2.sql | UTF-8 | 305 | 3.125 | 3 | [] | no_license | select year(data_otwarcia) as rok, obszar_id as obszar ,sum(wartosc) as wartosc, count(zlecenie_id) as 'ilosc zlecen' from zlecenia
left join klienci on zlecenia.klient_id = klienci.klient_id
left join miasta on klienci.miasto_id = miasta.miasto_id
group by obszar_id, rok
order by 3 DESC
| true |
43c1d8d57c0e9bea2e243edc76230b67b351e3b8 | SQL | shameerahamed/tasksheet | /src/main/resources/query.sql | UTF-8 | 677 | 3.609375 | 4 | [] | no_license | select current_date from App.tbl_User
select * from APP.TBL_TASK where
DATE <= current_date and date >= ('2010-12-20')
select current_timestamp from APP.TBL_USER
select DATE({fn TIMESTAMPADD( SQL_TSI_MONTH, -1, CURRENT_TIMESTAMP)}) from APP.TBL_USER
values ({fn TIMESTAMPADD( SQL_TSI_DAY, 5, CURRENT_TIMESTAMP)... | true |
021588b3ebd09bc5cd854b7c542e3c5a0677ca6b | SQL | syuaip/SQLHC | /SCRIPTS/004C-SQL-Current-Load-Elapsed.sql | UTF-8 | 638 | 3.453125 | 3 | [
"MIT"
] | permissive | SELECT qt.TEXT query_name,
dm_tran_active_snapshot_database_transactions.transaction_id,
transaction_sequence_num,
elapsed_time_seconds, sys.dm_exec_requests.session_id
FROM sys.dm_tran_active_snapshot_database_transactions,
sys.dm_tran_session_transactions,
sys.dm_exe... | true |
fd2da3dfa0103b6ff2c48f8f21af93fd6486b1cf | SQL | pavantejam/SQL | /sql-ex-ru/q70.sql | UTF-8 | 526 | 3.71875 | 4 | [] | no_license | /*
Exercise: 70 (Serge I: 2003-02-14)
Get the battles in which at least three ships from the same country took part.
*/
select distinct(battle) from classes inner join
(
select name,class from Ships inner join outcomes on (Ships.name=Outcomes.ship or ships.class=Outcomes.ship)
union
select ship,class from Classes i... | true |
7f78bc11afbad1e1f08020ec4087adf972b937a6 | SQL | eth51473/sql-2 | /join.sql | UTF-8 | 1,023 | 3.578125 | 4 | [] | no_license | SELECT * FROM invoice_line
WHERE unit_price >.99;
SELECT i.invoice_date,i.total, c.first_name, c.last_name FROM invoice i
JOIN customer c
ON i.customer_id = c.customer_id;
SELECT c.first_name, c.last_name,e.last_name, e.first_name FROM customer c
JOIN employee e
ON c.support_rep_id = e.employee_id;
SELECT album.titl... | true |
380fa6d6ef9487f101dd48049dd6cca649bc213b | SQL | gxlioper/ecology | /data/Oracle/sql201603231303.sql | UTF-8 | 5,321 | 2.609375 | 3 | [] | no_license | create or replace trigger Tri_I_DirAccessControlList
after insert ON DirAccessControlList
for each row
declare
id_1 integer;
dirid_1 integer;
dirtype_1 integer;
seclevel_1 integer;
seclevelmax_1 integer;
includesub_1 integer;
subcompanyid_1 integer;
departmentid... | true |
2d5ad1942b04cc72b5c2777a9ee8e3787aebf3d5 | SQL | cleberspirlandeli/SQL-Server | /TRIGGER - Descobrir Status Habilitado Ou Desabilitado.sql | UTF-8 | 908 | 3.828125 | 4 | [] | no_license | -- Quando retorna 1 está Desabilitado. Se retornar 0 está Habilitado.
Select (
Select name
from sysobjects x
where x.id=tr.parent_obj
) Tabela,
Name as NomeTrigger,
ObjectProperty(Object_id(Name),'ExecIsTriggerDisabled') Habilitado,
case when ObjectPrope... | true |
a8ce7d2f255ea9ff8d7ae11ff2f17872c3577db1 | SQL | JcGaara/SGA-PLSQL-OPE | /SGA-OPERACION/Scripts/412773_tipopedd.sql | ISO-8859-1 | 1,759 | 2.9375 | 3 | [] | no_license | declare
v_count number;
v_countn number;
v_tipopedd operacion.tipopedd.tipopedd%type;
v_estnumtel telefonia.estnumtel.estnumtel%type;
begin
select count(1)
into v_count
from operacion.tipopedd
where abrev = 'IND_ASIGNUMERO';
select count(1)
into v_countn
from telefonia.estnumtel
... | true |
00b00de685039bba3331d4cd4d04c5a82585f032 | SQL | eccentricexit/bd2 | /pedidos.sql | UTF-8 | 3,984 | 3.5 | 4 | [] | no_license | --
-- File generated with SQLiteStudio v3.1.1 on Wed Jun 14 23:48:00 2017
--
-- Text encoding used: System
--
PRAGMA foreign_keys = off;
BEGIN TRANSACTION;
-- Table: cliente
DROP TABLE IF EXISTS cliente;
CREATE TABLE cliente (
id_cliente INTEGER PRIMARY KEY AUTOINCREMENT,
nome VARCHAR (100) NOT NU... | true |
be564b043a6d26b053530488d4299f04e735441c | SQL | transcom/mymove | /migrations/app/schema/20200212153937_add_contract_id_to_re_ref_tables.up.sql | UTF-8 | 856 | 2.796875 | 3 | [
"MIT",
"LicenseRef-scancode-public-domain"
] | permissive | ALTER TABLE re_domestic_service_areas
ADD COLUMN contract_id uuid NOT NULL
CONSTRAINT re_domestic_service_areas_contract_id_fkey
REFERENCES re_contracts,
ADD CONSTRAINT re_domestic_service_areas_unique_key UNIQUE (contract_id, service_area),
DROP CONSTRAINT re_domestic_service_areas_serv... | true |
db2eb4b8da59f6648af46464924cc4c559b03074 | SQL | anjuls/Richards-Monitor | /Scripts/dbaIndColumns.sql | UTF-8 | 72 | 2.5625 | 3 | [] | no_license | select *
from dba_ind_columns
where index_owner = ?
and index_name = ?
/ | true |
ce5484a4529f309b271eedad5aef0b30a04f12f2 | SQL | MaewenPell/Food-suggestor | /db_management/db_creation_script.sql | UTF-8 | 1,767 | 3.828125 | 4 | [
"MIT"
] | permissive | DROP SCHEMA IF EXISTS `main_db_food_suggestor` ;
CREATE SCHEMA IF NOT EXISTS `main_db_food_suggestor` DEFAULT CHARACTER SET utf8mb4;
USE `main_db_food_suggestor` ;
CREATE TABLE IF NOT EXISTS `main_db_food_suggestor`.`categorie` (
`ID` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
`name` VARCHAR(45) NOT NULL,
PRIM... | true |
30a7bb3644221c892b43e9ff3e6488cdca45f1b4 | SQL | bogiesoft/ionic-posapp-server | /kambingsoondb.sql | UTF-8 | 2,527 | 3.109375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.1.6
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Aug 13, 2016 at 09:29 AM
-- 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 |
8a9ba86cd8b0b037da9ac73f87b342f0be18851d | SQL | jkchandra/AnonBot | /anonDBScript.sql | UTF-8 | 1,594 | 3.78125 | 4 | [] | no_license | CREATE DATABASE IF NOT EXISTS anondb;
use anondb;
DROP TABLE IF EXISTS CHATRESPONSES;
DROP TABLE IF EXISTS SESSIONSLIST;
DROP TABLE IF EXISTS USERS;
CREATE TABLE USERS(
User_ID VARCHAR(40) NOT NULL,
User_Name VARCHAR(40) NOT NULL,
Date_Created TIMESTAMP NOT NULL,
User_Type VARC... | true |
7a45ccf8df6ef6377d8056777d2b23a1c0601032 | SQL | stephguac/djsalad | /application/ecommerce.sql | UTF-8 | 9,622 | 3.265625 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | CREATE DATABASE IF NOT EXISTS `ecommerce` /*!40100 DEFAULT CHARACTER SET utf8 */;
USE `ecommerce`;
-- MySQL dump 10.13 Distrib 5.7.9, for osx10.9 (x86_64)
--
-- Host: 127.0.0.1 Database: ecommerce
-- ------------------------------------------------------
-- Server version 5.5.42
/*!40101 SET @OLD_CHARACTER_SET_CL... | true |
9b1059d99741649a8c83ce43f0d73b75a7a398b5 | SQL | rayanc/Pecuniaus | /Database/Stored Procedures/avz_sp_dashboarddetails.sql | UTF-8 | 1,891 | 3.703125 | 4 | [] | no_license | drop procedure if exists avz_sp_dashboarddetails;
delimiter $$
CREATE PROCEDURE `avz_sp_dashboarddetails`(
iNlogedinUser bigint
)
begin
/* Assigned Tasks */
select wkf.WorkFlowName, typ.TaskName, mrc.LegalName, tsk.AssignedDate, tsks.StatusName, tsk.TaskTypeId
, mrc.MerchantId from tb_tasks tsk
left join lkp_tb_sta... | true |
e18ff12ca8e1a870a0fb93acd457559347630cb7 | SQL | accentient/AdventureWorksDB | /Code/AdventureWorks/Auction/Stored Procedures/uspCategoryUpdate.sql | UTF-8 | 420 | 3.296875 | 3 | [] | no_license | CREATE PROCEDURE [Auction].[uspCategoryUpdate]
(
@Name nvarchar(80),
@Original_AuctionCategoryID int,
@Original_Name nvarchar(80),
@AuctionCategoryID int
)
AS
SET NOCOUNT OFF;
UPDATE [Auction].[Category] SET [Name] = @Name WHERE (([AuctionCategoryID] = @Original_AuctionCategoryID) AND ([Name] = @Original_Name));
S... | true |
39645c720d2122a804518b04bfbeccf154984936 | SQL | ChatNoir76/Projet-eCommerce-JEE | /MySQL/SQL/PROCEDURES/ps_panier_getListCommandeProduit.sql | UTF-8 | 1,365 | 3.578125 | 4 | [
"MIT"
] | permissive | Delimiter |
drop procedure if exists ps_panier_getlistcommandeproduit |
create procedure ps_panier_getlistcommandeproduit(in idcommande int,
out errcode int,
out errmsg varchar(1000))
/*
OBJECTIF : récupérer ... | true |
7852c2014bd52434d14bb589517dbe001f1bb517 | SQL | JereTapaninen/cv | /taitaja/sirkus.sql | UTF-8 | 768 | 3.203125 | 3 | [] | no_license | CREATE DATABASE Sirkus;
CREATE TABLE Esitys(
esitysID INT PRIMARY KEY NOT NULL,
teema VARCHAR(20) NOT NULL,
esityspaikka VARCHAR(30),
kaupunki VARCHAR(20),
pvm DATE NOT NULL,
paikat INT NOT NULL,
vapaatpaikat INT NOT NULL
);
CREATE TABLE Tilaaja(
tilaajaID INT PRIMARY KEY NOT NULL,
sposti VARCHAR(40) NOT NULL,
puheli... | true |
e3da7534bc07360c9239166374b164dea4f74abd | SQL | FreddyBueno/SoftEPS | /SoftEPS/SQLs/Errores en Tablas/Integridad de Tablas/Errores Detalle Planilla sin afiliados.SQL | UTF-8 | 408 | 2.640625 | 3 | [] | no_license | SELECT*
FROM det_planilla_autoliquidacion
WHERE (SELECT count(*) FROM afiliados WHERE afiliados.tip_documento=det_planilla_autoliquidacion.afi_tipo_doc
AND afiliados.num_documento=det_planilla_autoliquidacion.afi_numero_doc) = 0
... | true |
fde3fe18100b7169a458206635b00ddcec3a8cc9 | SQL | iamclock/mydatabase | /new_folder/N/12.sql | UTF-8 | 778 | 3.921875 | 4 | [] | no_license | 12. Найти вещи, которые покупались всеми пользователями,
но которые не храняться ни на одном из складов.
Вывод: Название вещи, Стоимость вещи
SELECT `item`.`name`,`item`.`cost` FROM `item`
JOIN (select COUNT(*) as c from `user`) as n
JOIN(
SELECT `item`.`id`, COUNT(DISTINCT `user_id`) as c FROM `order`
... | true |
d74716d4ead7c1b5870cdcf3350e389b0c15b749 | SQL | qinliu1023/practices | /176. Second Highest Salary.sql | UTF-8 | 1,960 | 4.46875 | 4 | [] | no_license | /*
SQL Schema
Create table If Not Exists Employee (Id int, Salary int)
Truncate table Employee
insert into Employee (Id, Salary) values ('1', '100')
insert into Employee (Id, Salary) values ('2', '200')
insert into Employee (Id, Salary) values ('3', '300')
Write a SQL query to get the second highest salary from the ... | true |
aa34ef3798635d7258a1851a6ef3a433f9b4bb0c | SQL | rodrigovb96/cryptochat | /src/DDL_BD.sql | UTF-8 | 2,571 | 3.84375 | 4 | [] | no_license | --drop table chat_user;
--select * from chat_user;
--drop table user_relation;
--select * from user_relation;
--drop table conversation;
--select * from conversation;
--drop table message;
--select * from message;
--drop table key_set;
--select * from key_set;
create table chat_user(
user_id serial not null,
nickn... | true |
8b15be2f7a01f3093c1c7f29ef7421b35989210e | SQL | ysdxz207/fbook | /src/main/resources/sql/book.sql | UTF-8 | 3,832 | 3.03125 | 3 | [
"LicenseRef-scancode-unknown-license-reference",
"Apache-2.0"
] | permissive | -- ----------------------------
-- Table structure for user
-- ----------------------------
DROP TABLE IF EXISTS `user`;
CREATE TABLE `user` (
`id` INTEGER(20) NOT NULL UNIQUE,
`loginname` VARCHAR(64) NOT NULL UNIQUE,
`password` VARCHAR(128) NOT NULL,
`nickname` VARCHAR(128) NOT N... | true |
446dbf81edb08da238aa7ab0a119bbef614851e5 | SQL | SravaniManchukonda/Inmar_Selenium_Assignment | /SQL/queries - Copy.sql | UTF-8 | 7,422 | 3.671875 | 4 | [] | no_license |
CREATE TABLE IF NOT EXISTS departments(
dept_no char(4),
dept_name varchar(40),
PRIMARY KEY(dept_no));
CREATE TABLE IF NOT EXISTS employees(
emp_no int(11),
birth_date DATE,
first_name varchar(14),
last_name varchar(16),
gendar enum('M','F'),
hire_date DATE,
PRIMARY KEY(emp_no));
... | true |
0c059ef52edf3f00bf0b0f1bd9aecc5e36d95932 | SQL | vshapkarin/lunchvoter | /src/main/resources/db/populateDB.sql | UTF-8 | 1,577 | 3.265625 | 3 | [] | no_license | DELETE FROM users;
DELETE FROM menu_positions;
DELETE FROM votes;
DELETE FROM restaurants;
ALTER SEQUENCE users_seq RESTART WITH 100000;
ALTER SEQUENCE menu_positions_seq RESTART WITH 1000000;
ALTER SEQUENCE votes_seq RESTART WITH 1000000;
ALTER SEQUENCE restaurants_seq RESTART WITH 100000;... | true |
63bdd160b24d7be6de8ef34b08cb2cf26fcf8903 | SQL | noobcodebot/CSE-coursework | /CSE111 - Database Systems/lab-4/test/10.sql | UTF-8 | 285 | 3.953125 | 4 | [] | no_license | -- Find the minimum and maximum discount for every part having ECONOMY and COPPER in its type.
select p.p_type, min(l.l_discount), max(l.l_discount) from lineitem l
JOIN part p on l.l_partkey = p.p_partkey
WHERE p.p_type LIKE '%ECONOMY%' and p.p_type LIKE '%COPPER%'
GROUP BY p.p_type | true |
df8dc869b4a4dd014aed24ab0355d21d1e9a8152 | SQL | dheaven92/job4j_design | /src/main/java/ru/job4j/sql/cross-join-example.sql | UTF-8 | 690 | 3.859375 | 4 | [] | no_license | create table teens (
id serial primary key,
name varchar (255),
gender varchar (10)
);
insert into teens (name, gender) values ('Anna', 'female');
insert into teens (name, gender) values ('Lena', 'female');
insert into teens (name, gender) values ('Maria', 'female');
insert into teens (name, gender) values... | true |
d1385ee338abea10a4784a214b40572aa86e4a43 | SQL | FrancescoPasceri31/Business-Intelligence-OLAP-bets | /aggregati2/schedina/sqlCreazAggregSchedina.sql | UTF-8 | 1,519 | 2.578125 | 3 | [] | no_license | -- Aggregate table AggrFasciaEta
-- Estimated 6 rows, 120 bytes
CREATE TABLE `AggrFasciaEta` (
`dt_cliente_fasciaEta` VARCHAR(45),
`ft_schedina_numero_schedine` DOUBLE,
`ft_schedina_bilancio` DOUBLE,
`ft_schedina_vincita_totale` DOUBLE,
`ft_schedina_importo_giocato_to` DOUBLE,
`ft_schedi... | true |
0eee165af3393a8f226b05ebfd6d1cfcd981ea4f | SQL | fishedee/Demo | /skeema/init/schemas/FishMoney/t_blog_sync.sql | UTF-8 | 583 | 2.8125 | 3 | [] | no_license | CREATE TABLE `t_blog_sync` (
`blogSyncId` int(11) NOT NULL AUTO_INCREMENT,
`userId` int(11) NOT NULL,
`accessToken` varchar(1024) NOT NULL,
`gitUrl` varchar(1024) NOT NULL,
`syncType` int(11) NOT NULL,
`state` int(11) NOT NULL,
`stateMessage` varchar(10240) NOT NULL,
`createTime` timestamp NOT NULL DEFA... | true |
d613f12c7c7c29ec5d147358d2e19f2c220d2b17 | SQL | ydy1412/PRJECT_folder | /시간대별 예상 소진 금액 그래프 기획 자료/SQL 쿼리 폴더/일자_타겟팅_노출형태_캠페인_연동_소진(일)_예산_과소진비율_분배형태_등록날짜_변경날짜_지면번호_노출(지면)_클릭수(지면)_소진량(지면).sql | UTF-8 | 1,987 | 3.734375 | 4 | [] | no_license | select
over_exhs_tb.stats_dttm,mcms.advrts_tp_code, mcms.advrts_prdt_code,
over_exhs_tb.site_code,over_exhs_tb.itl_tp_code, over_exhs_tb.advrts_amt,
over_exhs_tb.bdgt_amt, over_exhs_tb.over_exhs_amt, over_exhs_tb.BDGT_DSTB_TP_CODE, over_exhs_tb.REG_DTTM,over_exhs_tb.ALT_DTTM,
mcms.media_script_no, mcms.to... | true |
415bf6730a46812ccb041eebf133bc58af8e0129 | SQL | mogiligarimidi23/GolfCourse | /src/main/webapp/WEB-INF/classes/resources/DB1.sql | UTF-8 | 6,076 | 3.3125 | 3 | [] | no_license | CREATE TABLE hourlydata (
hourlyDataID varchar(255) COLLATE utf8_unicode_ci NOT NULL,
weatherCondition varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL,
weatherDate varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL,
humidity varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL,
iconUrl varchar(100) COLLATE ut... | true |
7820eafcf03ee5719b47696c7693b0a40a642291 | SQL | carloniluca91/spring-hdfs-streaming | /application/src/main/resources/it/luca/streaming/core/dao/ImpalaDao/createTable.sql | UTF-8 | 1,023 | 2.921875 | 3 | [] | no_license | CREATE TABLE IF NOT EXISTS @impala.db.name@.@impala.log.tableName@ (
ingestion_ts TIMESTAMP COMMENT 'Timestamp of ingested batch',
ingestion_dt STRING COMMENT 'Date of ingested batch (pattern yyyy-MM-dd)',
datasource_id STRING,
datasource_type STRING COMMENT 'JSON|XML',
input_data_class STRING COMM... | true |
6df8895cd0c3650ee7cb94f94b13fc0a37b8e91b | SQL | MatEgg/LearningPlatform | /sql/masterthesis_conceptual_difficulty.sql | UTF-8 | 2,412 | 2.9375 | 3 | [] | no_license | -- MySQL dump 10.13 Distrib 8.0.13, for Win64 (x86_64)
--
-- Host: localhost Database: masterthesis
-- ------------------------------------------------------
-- Server version 8.0.13
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */... | true |
f26777ce70fd8f201220f2c803ca265e2ddc01a5 | SQL | ChristianDantas/senai_sprint2_api | /SENAI_HROADS_TARDE_Chris&Bruno/senai_hroads_tarde/bd_hroads/scripts/senai_hroads_tarde_dql.sql | WINDOWS-1252 | 2,352 | 3.546875 | 4 | [] | no_license | USE senai_hroads_tarde;
--SELECT * FROM TipoHabilidade;
--Selecionar todas as habilidades;
SELECT * FROM Habilidades;
--Selecionar todos as classes;
SELECT * FROM Classe;
--Selecionar somente o nome das classes;
SELECT Classe.NomeClasse FROM Classe;
--Selecionar todos os personagens;
SELECT * FROM Personagens;
--... | true |
a14dc22df408b1870f79efa8ad0db0c3977940c4 | SQL | uyuer/account-server-node-koa2-mysql | /sql/users-查找-根据多条件查询.sql | UTF-8 | 199 | 3.015625 | 3 | [] | no_license | SELECT
*
FROM
users
WHERE
-- username = 'test' AND
-- password = '123456' AND
createTime > '2020-08-27' AND
FORMAT(createTime, 'yyyy-mm-dd') <= '2020-08-28'
ORDER BY
users.id
LIMIT 0, 10; | true |
381df693c714d302846cf12507591bd13b1942a2 | SQL | datacode09/data-pipeline-pocket-reference | /ch8/order_dup.sql | UTF-8 | 145 | 2.921875 | 3 | [] | no_license | WITH order_dups AS
(
SELECT OrderId, COUNT(*)
FROM Orders
GROUP BY OrderId
HAVING COUNT(*) > 1
)
SELECT COUNT(*)
FROM order_dups; | true |
9813f6a7fa0747b94b6590d8c6efce1187c7146b | SQL | Miguel72/first | /booker.sql | UTF-8 | 2,508 | 3.25 | 3 | [] | no_license |
DROP TABLE USERIP;
CREATE TABLE USERIP(
IP TEXT PRIMARY KEY NOT NULL,
FOREIGN KEY(IP) REFERENCES RATE(IP)
);
DROP TABLE BOOKS;
CREATE TABLE BOOKS(
BOOK_ID INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL,
TITLE TEXT NOT NULL,
SINOPSE TEXT,
ISBN INT,
IMG TEXT,
LINKS TEXT,
LIKES INT NOT NULL,
DISLIKES INT NOT NULL,... | true |
79f0dcc4b8075dd85dd7aa819a3997897b3b9e8f | SQL | dpolirov/ingos_copy | /_oracle/storage_adm/V_REP_AGR_SALERS_LINE.sql | WINDOWS-1251 | 3,369 | 3.453125 | 3 | [] | no_license | CREATE OR REPLACE FORCE VIEW "STORAGE_ADM"."V_REP_AGR_SALERS_LINE" ("AGRISN", "DATEBEG", "DATEEND", "SALERGOISN", "SALERGOCLASSISN", "SALERGODEPT", "SALERGODEPT0ISN", "SALERCRGOISN", "SALERCRCLASSISN", "SALERCRGODEPT", "SALERCRGODEPT0ISN", "SALERFISN", "SALERFCLASSISN", "SALERFDEPT", "SALERFDEPT0ISN") AS
with P as ... | true |
1113405c0a01b6c3491979f8729cdc0dfafc86ee | SQL | BrianCoveney/LibraryManagement | /src/main/resources/data.sql | UTF-8 | 2,305 | 2.515625 | 3 | [] | no_license | INSERT INTO books VALUES (1, 'Spring in action', '161729120X, 9781617291203', 'Craig Walls', 'Manning Publications', 'Fourth edition', '2015-01-01'),
(2, 'Effective Java', '978-0134685991, 0134685997', 'Joshua Bloch', 'Addison-Wesley Professional', 'Third edition', '2017-01-01'),
(3, 'Code Complete', '0735619670, 97807... | true |
f96433cef092daa6f2a7e406da324a3a42f35f03 | SQL | ippart/search | /sql/schema.sql | UTF-8 | 3,908 | 2.953125 | 3 | [] | no_license | USE ippart;
CREATE TABLE `properties2` (
`id` INT(20) NOT NULL DEFAULT 0,
`category_id` INT(20) NOT NULL DEFAULT 0,
`property_id` INT(20) NOT NULL DEFAULT 0, #Цвет изделия
`value_id` INT(20) NOT NULL DEFAULT 0 #черный
)
ENGINE = InnoDB
DEFAULT CHARSET = utf8;
CREATE TABLE `rela... | true |
b6934d76f1f4b26800c073ba2011716de919296b | SQL | Fllorent0D/B3-Reseau | /BDSociete/creashop.sql | UTF-8 | 324 | 2.546875 | 3 | [] | no_license | drop user SHOP cascade;
create user SHOP identified by oracle default tablespace users temporary tablespace temp profile default account unlock;
alter user SHOP quota unlimited on users;
grant myrole to SHOP;
select 'alter system kill session ''' || sid || ',' || serial# || ''';' from v$session where username = 'SH... | true |
b0c02deb4b7eb465d2f9631e7ee45e535ba69f49 | SQL | Simon-Initiative/oli-cloud-data | /src/main/resources/logging.sql | UTF-8 | 546 | 3.453125 | 3 | [] | no_license | select distinct s.user_sess as login_session,
s.user_id,
a.source,
a.action,
a.server_receipt_time,
a.info,
su.action as action_detail,
su.info_type,
su.info as info_detail
from log.log_... | true |
fb6cecf717ab234dd03c141e1efdc4153c89cf03 | SQL | AndyActive/simplewebapp-master | /src/main/resources/static/createTableWorkers.sql | UTF-8 | 974 | 3.140625 | 3 | [] | no_license | DROP TABLE IF EXISTS employee;
CREATE TABLE employee
(
employee_Id SERIAL PRIMARY KEY,
first_Name VARCHAR(12) NULL,
last_Name VARCHAR(50) NULL,
department_Id BIGINT null,
job_Title VARCHAR(255) NULL,
gender VARCHAR(255) NULL,
data_Of_Birth DATE NULL
);
INSERT INTO em... | true |
044f6af7143f002eafafdb1bd70206d809cb4341 | SQL | felipereis12/smarterp | /oic_db/queries/refund/select_refund.sql | UTF-8 | 1,756 | 3.640625 | 4 | [] | no_license | select
refund.* -- Utilizar aqui somente os campos necessários para a integração
,invoice_customer.erp_customer_id
,invoice_customer.* -- Utilizar aqui somente os campos necessários para a integração
,receivable.* -- Utilizar aqui somente os campos necessários para a integração
from refund
inner j... | true |
f059761d222887865e3ee01bb1da7cb9b6d14b75 | SQL | haidouks/mysql | /dump/dump.sql | UTF-8 | 1,396 | 3.3125 | 3 | [] | no_license | ALTER USER 'ceph' IDENTIFIED WITH mysql_native_password BY 'cephPass';
CREATE TABLE EMM_KullandikcaOde_Detay (
ID INT PRIMARY KEY AUTO_INCREMENT,
Tarih INT(8) NOT NULL,
KullanimByte INT NOT NULL,
ServisTipi TEXT NOT NULL,
SiparisNo TEXT NOT NULL,
MusteriNo TEXT NOT NULL,
Erisimtipi TEXT NOT NULL,
Lokasy... | true |
81697ab1827e79ab9873d333764e95eaf1d3d758 | SQL | fivermori/mysql | /loadData.sql | UTF-8 | 310 | 2.8125 | 3 | [] | no_license | LOAD DATA LOCAL INFILE 'fixedAssets1.csv'
INTO TABLE fixedAssets
FIELDS
TERMINATED BY ','
ENCLOSED BY '"'
LINES
TERMINATED BY '\n'
IGNORE 1 ROWS
(code, name, type)
SET code=code, name=name, type=type;
SHOW WARNINGS;
SELECT name FROM fixedAssets; | true |
2a36bbcca3daafd1596d43f2ebcf038b6833e454 | SQL | ShahidKhosa/Desktop-App | /sql.sql | UTF-8 | 2,853 | 3.421875 | 3 | [] | no_license | /*
SQLyog Community v13.0.1 (64 bit)
MySQL - 10.1.36-MariaDB : Database - mydata
*********************************************************************
Testing.
Testing 2
Test more
Test again
Once more Testing
Okay more Test
*/
/*!40101 SET NAMES utf8 */;
/*!40101 SET SQL_MODE=''*/;
/*!40014 SET... | true |
f47f49b2220db23781213bdb652fa4483145fdd8 | SQL | MatiasTassara/POC-Threads-Hangman | /hangman.sql | UTF-8 | 610 | 3.328125 | 3 | [] | no_license | CREATE DATABASE hangman;
USE hangman;
CREATE TABLE words(
id_word int auto_increment,
word varchar(20),
constraint pk_words primary key (id_word)
);
CREATE TABLE winners(
id_winner int auto_increment,
name varchar(50),
id_word int,
date_win datetime,
constraint pk_winner primary key (... | true |
34c092f0207fb6895a6aa51ad8094fe8d8588ba1 | SQL | svendp1988/youchoach-skeleton | /youcoach-backend/src/main/resources/data.sql | UTF-8 | 5,850 | 3.234375 | 3 | [
"MIT"
] | permissive | -- create table account_verification (created_on timestamp not null, verification_code varchar(255) not null, user_id bigint not null, primary key (user_id))
-- create table admins (user_id bigint not null, primary key (user_id))
-- create table coaches (availability varchar(255), introduction varchar(255), xp integer,... | true |
1f772c52821ef051b498ab3914e28076a4d5f03b | SQL | lgcarrier/AFW | /5.0.0/database/views/vd_i.sql | UTF-8 | 126,712 | 2.59375 | 3 | [
"MIT"
] | permissive | DROP VIEW APEXFRAMEWORK.VD_I_AFW_01_ATRIB_MODL_COMNC;
create or replace force view apexframework.vd_i_afw_01_atrib_modl_comnc
(
seqnc
,code
,nom
,descr
,ref_modl_comnc
,date_creat
,utils_creat
,date_modfc
,utils_modfc
)
as
select seqnc
,code
,nom
,descr
,r... | true |
5f61aa9956bacbc08983eb44366c23bcfe1a8b53 | SQL | JoseNA12/EmpAsistencias | /Ejecucion.sql | UTF-8 | 6,584 | 2.9375 | 3 | [] | no_license |
-------------------------------------------------------------------------------------------------------
-- Crear Solicitud (Crear Paquete)
-- IdCliente, IdOrganizacion, 'a,b,c,d'
Execute sp_SolicitarAsistencias 3, 5, '4,9,1,2'
-----------------------------------------------------------------... | true |
897621a9a32f482efdb33a789b86b914f0117ad2 | SQL | giannini5/fields | /trunk/src/db/fields/routines/sp_addField.sql | UTF-8 | 1,186 | 3.734375 | 4 | [
"MIT"
] | permissive | drop procedure if exists sp_addField;
delimiter $$
create procedure sp_addField(in _leagueName varchar(60),
in _facilityName varchar(60),
in _name varchar(60),
in _enabled tinyint)
BEGIN
declare l_leagueId bigI... | true |
39b2ca90cef47a8dc1f181912f2213721da7b156 | SQL | fuzi1996/staruml-ddl-v2 | /example/generate_product.sql | UTF-8 | 483 | 3.28125 | 3 | [
"MIT"
] | permissive | SET FOREIGN_KEY_CHECKS = 0;
DROP TABLE IF EXISTS `product`;
SET FOREIGN_KEY_CHECKS = 1;
CREATE TABLE `product` (
`code` VARCHAR(50) NOT NULL COMMENT '产品代码',
`name` VARCHAR(300) NOT NULL COMMENT '产品名称',
`price` DECIMAL(19,4) COMMENT ' 产品价格',
`start_date` date COMMENT '成立日',
`end_date` date COMMENT '... | true |
b99cb63bc979a85493fe047c947e9255c6acde51 | SQL | diana-dumbravean/php-hackathon-2021 | /hackathon.sql | UTF-8 | 4,200 | 3.171875 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 5.0.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Apr 18, 2021 at 01:14 PM
-- Server version: 10.4.17-MariaDB
-- PHP Version: 8.0.2
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIEN... | true |
5ab82151bd5401f820c030d8f04b547fc1b3dceb | SQL | fedspendingtransparency/data-act-broker-backend | /dataactvalidator/config/sqlrules/fabs41_2.sql | UTF-8 | 1,435 | 3.78125 | 4 | [
"CC0-1.0"
] | permissive | -- For PrimaryPlaceOfPerformanceCode XX#####, XXTS###, XX####T, or XX####R, where valid 5 or 9-digit
-- PrimaryPlaceOfPerformanceZIP+4 is provided: city code #####, TS###, ####T, or ####R should be valid and exist in the
-- provided state, but will only trigger a warning if not.
WITH fabs41_2_{0} AS
(SELECT submiss... | true |
41b93b76767691901d464c44c374b2e0e67d174e | SQL | bernardoleite/BDAD | /03/Submissão/criar.sql | UTF-8 | 3,936 | 3.328125 | 3 | [] | no_license | --
-- File generated with SQLiteStudio v3.1.1 on Fri May 12 21:17:51 2017
--
-- Text encoding used: System
--
PRAGMA foreign_keys = off;
BEGIN TRANSACTION;
-- Table: Consulta
CREATE TABLE Consulta (ConsultaIdent INTEGER PRIMARY KEY, Dia DATE, HoraInicio TIME, HoraFim TIME CHECK (HoraInicio < HoraFim), Paciente REFEREN... | true |
732c724e20b1702b29424a5abe8366773b601fe8 | SQL | stori-es/stori_es | /dashboard/src/main/webapp/WEB-INF/schemaUpdates/2014-04-15-task-673.sql | UTF-8 | 719 | 3.78125 | 4 | [
"Apache-2.0"
] | permissive | ALTER TABLE collection_story
DROP PRIMARY KEY,
DROP INDEX collection_story_unique_collection_story,
ADD PRIMARY KEY (collection, story),
DROP COLUMN idx;
INSERT INTO collection_story (collection, story, clearedForPublicInclusion)
SELECT
collection,
story,
1
FROM (
SELECT
a.questionn... | true |
75c6fefbbb798d7b0795ba57b01aad7f2de43c83 | SQL | petermorlion/ToDoCommentAnalyzer | /scripts/distinct-paths.sql | UTF-8 | 483 | 2.71875 | 3 | [] | no_license | -- Run this with LogParser:
-- LogParser -i:CSV file:"C:\Users\peter\Projects\ToDoCommentAnalyzer\scripts\distinct-paths.sql" -o:CSV
-- Adjust the paths to match your locations
--
-- I used this script because the formula to find the number of unique paths in Excel was too slow
select distinct [Path]
into C:\Users\pete... | true |
2b95a9e7e894aad62078a2dfff81dab7e6011146 | SQL | dorota-puto/library | /src/main/resources/sqls/populate_db.sql | UTF-8 | 1,617 | 2.71875 | 3 | [] | no_license |
INSERT INTO Author(`name`,last_name)
VALUES('Lucy','Mount Montgomery');
INSERT INTO Author(`name`,last_name)
VALUES('Elżbieta','Cherezińska');
INSERT INTO Author(`name`,last_name)
VALUES('Henryk','Sienkiewicz');
INSERT INTO Publisher(`name`)
VALUES('Zysk i SKa');
INSERT INTO Publisher(`name`)
VALUES('Zielona sowa... | true |
bee897e5a2fbb3b247fa40e1ec30f6edcda98866 | SQL | Ariah-Group/Research | /db_scripts/main/KC-RELEASE-3_2-SCRIPT/mysql/dml/KR_DML_01_KRACOEUS-5043_B000.sql | UTF-8 | 3,438 | 2.625 | 3 | [
"Apache-2.0",
"ECL-2.0"
] | permissive | DELIMITER /
INSERT INTO KRIM_PERM_ID_BS_S VALUES(NULL)
/
INSERT INTO KRIM_PERM_T (PERM_ID, OBJ_ID, VER_NBR, PERM_TMPL_ID, NMSPC_CD, NM, DESC_TXT)
VALUES((SELECT (MAX(ID)) FROM KRIM_PERM_ID_BS_S), UUID(), 1, (SELECT PERM_TMPL_ID FROM KRIM_PERM_TMPL_T WHERE NM = 'Default' AND NMSPC_CD='KUALI'), 'KC-SUBAWARD', 'CREATE SUB... | true |
80bd14101479641732bb2640c65c3e545c696637 | SQL | DocSeton/capstone_project | /db/wupees.sql | UTF-8 | 16,696 | 3.15625 | 3 | [
"MIT"
] | permissive | -- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: May 10, 2021 at 08:21 AM
-- Server version: 10.4.14-MariaDB
-- PHP Version: 7.4.9
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIEN... | true |
026a913b86a3b58018a175826c95db774665677b | SQL | penkocode/JAVA-DB-BASICS | /Data Definition and Data Types - Exercise/15. Create SoftUni Database.sql | UTF-8 | 1,696 | 3.671875 | 4 | [] | no_license | CREATE DATABASE soft_uni;
USE soft_uni;
CREATE TABLE towns (
id INT PRIMARY KEY AUTO_INCREMENT,
name VARCHAR (60) NOT NULL
);
CREATE TABLE addresses (
id INT PRIMARY KEY AUTO_INCREMENT,
address_text VARCHAR (200) NOT NULL,
town_id INT,
constraint `fk_town_id` foreign key (town_id) references town... | true |
640dc4efa4a656fa3f237904369d121c51f7eed6 | SQL | MrD0079/portal | /sql/merch_report_4admin_by_spec_new_files.sql | UTF-8 | 2,081 | 3.546875 | 4 | [] | no_license | /* Formatted on 20.01.2018 11:31:58 (QP5 v5.252.13127.32867) */
SELECT DISTINCT
TO_CHAR (NVL (msr.r_DT, TO_DATE ( :ed, 'dd/mm/yyyy')), 'dd.mm.yyyy') dt,
ms_rep_routes1.cpp1_tz_oblast tz_oblast,
ms_rep_routes1.cpp1_city city,
ms_rep_routes1.n_net_name net_name,
ms_rep_route... | true |
47eb96ebfd2673e28ff85267da2e8d1004db339b | SQL | freyajane/sqlzoo | /TutorialSolution_Hard.sql | UTF-8 | 4,614 | 4.59375 | 5 | [] | no_license | #SELECT from Nobel Tutorial#
/*https://sqlzoo.net/wiki/SELECT_from_Nobel_Tutorial*/
#12
/*Find all details of the prize won by EUGENE O'NEILL.*/
select *
from nobel
where winner = 'EUGENE O''NEILL'
#13
/*List the winners, year and subject where the winner starts with Sir. Show the the most recent first, then by name or... | true |
bc64f582f6e4b7deae0a35958d8755bbe98bc5e6 | SQL | abhinayshrestha/socialnetwork | /Database/students_info.sql | UTF-8 | 1,383 | 2.875 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 3.3.9
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: May 18, 2018 at 02:49 PM
-- Server version: 5.5.8
-- PHP Version: 5.3.5
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SE... | true |
5b94efbd41739321eedc48e761bddea856e509f6 | SQL | codingdojo-projects-algos-august-2019/Thomas-and-Kaleb-Group | /assets.sql | UTF-8 | 4,244 | 3.515625 | 4 | [] | no_license | -- MySQL Workbench Forward Engineering
SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0;
SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0;
SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SU... | true |
895754c35ee7fbe732ed5b56958ae9403711eaa6 | SQL | BrettimusGit/Data_Engineering_Portfolio | /ETL Processes/SQL_Queries.sql | UTF-8 | 861 | 4.03125 | 4 | [] | no_license | -- Bring back all columns
SELECT *
FROM headlines;
SELECT *
FROM sources;
SELECT *
FROM category;
-- Join Category and Headline Table
SELECT
c.category_name,
COUNT(*) AS frequency
FROM
headlines h
JOIN category c
ON h.category_id = c.category_id
GROUP BY
c.category_name
ORDER BY
frequency DESC;
-- Join a... | true |
af7aa366cd6fe7cad28ece9c99dd93f352531eca | SQL | PrabodhaNirmani/dbms_project | /app/Resources/scripts/master_ddl.sql | UTF-8 | 3,705 | 3.71875 | 4 | [
"MIT",
"BSD-3-Clause"
] | permissive | DROP DATABASE IF EXISTS `ministry_of_education`;
CREATE DATABASE ministry_of_education;
USE ministry_of_education;
CREATE TABLE user
(
user_id INT NOT NULL auto_increment PRIMARY KEY,
user_name VARCHAR(255) NOT NULL,
password VARCHAR(255) NOT NULL,
user_type VARCHAR(10) NOT NULL,
UNIQUE... | true |
24e609ca4f8d203e5558d3063a7b5216eada6e36 | SQL | studentdeng/curer | /application/sql/schema.mysql.sql | UTF-8 | 2,589 | 3.171875 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | create table user
(
id INTEGER(32) not null auto_increment,
username VARCHAR(255),
password VARCHAR(255),
parent_id INTEGER(32),
nickname VARCHAR(255),
avatar_url VARCHAR(255),
gender INTEGE... | true |
cc374b0f54dc3b24583276caac9d6e13c33342da | SQL | KishorNaik/Sol_EF_SqlQuery | /Sol_EF_Core/Sol_Test/StoredProcedures/uspGetUsersJoins.sql | UTF-8 | 264 | 3.3125 | 3 | [
"MIT"
] | permissive | CREATE PROC uspGetUsersJoins
@UserId NUmeric(18,0)
AS
BEGIN
SELECT
U.FirstName,
U.LastName,
UL.UserName,
UL.Password
FROM
tblUsers as U
INNER JOIN
tblUserLogin AS UL
ON
U.UserId=UL.UserId
WHERE
U.UserId=@UserId
END
| true |
2b4bc271131428912ae258cc32b0eea657ef5b5f | SQL | AdhiPrasetyo69/Tugas-AdhiPrasetyo | /Adhi/database/Adhi.sql | UTF-8 | 2,449 | 3.109375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.7.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: 03 Jul 2018 pada 06.31
-- Versi Server: 10.1.26-MariaDB
-- PHP Version: 7.1.9
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHA... | true |
4e9b6767664afcc6517bb893a5f2f5187267571b | SQL | minhaiqn96/CODE_GYM2 | /Module 2/Code/8.12.MySQL/furama.sql | UTF-8 | 13,145 | 3.5625 | 4 | [] | no_license | create database furama;
create table furama.accomodation_category(
acc_category_id nvarchar(50) primary key,
acc_category_name nvarchar(50),
size int not null,
price float not null);
create table furama.accomodation_type(
acc_type_id nvarchar(50) primary key,
acc_category_id nvarchar(50) not null,
acc_type_name nvarc... | true |
c51c038130280494a8a32d38186f5f6eec51deb4 | SQL | dTenebrae/sql-project | /triggers.sql | UTF-8 | 814 | 3.484375 | 3 | [] | no_license | -- Создаем триггеры, которые не позволяют вставлять значения зависимостей, при которых пакет ссылается на себя
DELIMITER //
DROP TRIGGER IF EXISTS depend_on_yourself_main //
CREATE TRIGGER depend_on_yourself_main BEFORE INSERT ON main_dependencies
FOR EACH ROW
BEGIN
IF new.package_id = new.depend_id THEN
SIGNAL... | true |
5d06d13d2aa970c0ee5cfcefb608789563e4e658 | SQL | naggenius/BIP | /BIP_App-master/UX/Livraison/SQL/plsql/prohist.sql | ISO-8859-1 | 5,538 | 3.296875 | 3 | [] | no_license | -- -------------------------------------------------------------------
-- pack_verif_prohist PL/SQL
--
-- equipe SOPRA (HT)
--
-- cre le 04/01/200
-- modifie le 23/02/2000 MSA Adaptation au concept d'historique
-- MSA Deplacement de la procedure 'verif_prohist' dans pack_historique (histo.sql)
--
-- Package qui s... | true |
6acdafd12278edc3321350e7e7ef5bd8857c1b3b | SQL | Vulnerator/Vulnerator | /Resources/DdlFiles/Tables/Create/NetworkConnectionRules.ddl | UTF-8 | 282 | 3.328125 | 3 | [
"CC-BY-SA-3.0",
"CC-BY-ND-3.0",
"LicenseRef-scancode-unknown-license-reference",
"LicenseRef-scancode-proprietary-license",
"MIT"
] | permissive | CREATE TABLE IF NOT EXISTS NetworkConnectionRules (
NetworkConnectionRule_ID INTEGER PRIMARY KEY,
NetworkConnectionName NVARCHAR (50) NOT NULL,
NetworkConnectionRule NVARCHAR (200) NOT NULL,
UNIQUE (NetworkConnectionName, NetworkConnectionRule) ON CONFLICT IGNORE
); | true |
fbd752e19f8241a8a18608d1ca00441cf4957034 | SQL | dav-9090/Shift | /tables/foreing_key/shops_manager_employees_fk.sql | UTF-8 | 118 | 2.84375 | 3 | [] | no_license | alter table shops_manager
add constraint shops_manager_employees_fk foreign key (manager_id)
references employees (id) | true |
8085e146fc4e168ce74156a225c88852e50e09bb | SQL | ernareyn31/uts | /uts.sql | UTF-8 | 2,366 | 3.078125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.9.1deb2
-- https://www.phpmyadmin.net/
--
-- Host: localhost:3306
-- Generation Time: Nov 29, 2019 at 07:51 PM
-- Server version: 8.0.18-0ubuntu0.19.10.1
-- PHP Version: 7.3.11-0ubuntu0.19.10.1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_z... | true |
6ebe99d1e1be2b8cf238d41c29fa4e7015f161fb | SQL | 60003263011/bookstore011 | /database/bookstore011.sql | UTF-8 | 7,164 | 2.953125 | 3 | [
"MIT"
] | permissive | -- phpMyAdmin SQL Dump
-- version 5.0.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Mar 11, 2020 at 06:57 PM
-- Server version: 10.4.11-MariaDB
-- PHP Version: 7.4.2
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD... | true |
80bdf3919e202cd55fae1f7f94aee7e55c8e73b8 | SQL | victor-saru/ProyectoFinal | /Documentacion/BBDD/sqlBBDDv2.sql | UTF-8 | 8,314 | 3.71875 | 4 | [] | no_license | /*CREACIÓN DE TABLAS*/
CREATE TABLE PERSONAS(
ID_PERSONA INTEGER AUTO_INCREMENT,
NOMBRE VARCHAR(50) NOT NULL,
PRIMER_APELLIDO VARCHAR(50) NOT NULL,
SEGUNDO_APELLIDO VARCHAR(50),
DNI VARCHAR(9) NOT NULL,
MOVIL VARCHAR(9) NOT NULL,
... | true |
a2f1ac98044baf832063fec68be676f236ef1631 | SQL | muravlyansky/U2035 | /p1_ss21_engagement_team_v_0_1.sql | UTF-8 | 3,368 | 4.15625 | 4 | [] | no_license | SELECT tutor_team.teamID, presentations, market , method, tech, task,
create_card_facts, move_card_facts, mentor_meeting_reqs,
expert_reqs, project_protect_reqs, hakaton_reqs, industry_meeting_reqs
FROM (
select tu.userID, tu.teamID
from people.team_user tu
left join people.context_team ct on ct... | true |
7fdaf99efa6f4fcccb9c8b603e13a84da8b5cd28 | SQL | jw8mc/SequentialTimerWeb | /notes/databaseDumpFiles/sequentialtimerapp_sequential_timers.sql | UTF-8 | 2,497 | 3.140625 | 3 | [] | no_license | CREATE DATABASE IF NOT EXISTS `sequentialtimerapp` /*!40100 DEFAULT CHARACTER SET utf8 */;
USE `sequentialtimerapp`;
-- MySQL dump 10.13 Distrib 5.7.9, for Win64 (x86_64)
--
-- Host: localhost Database: sequentialtimerapp
-- ------------------------------------------------------
-- Server version 5.6.26-log
/*!40... | true |
a0f14399d66b8daec9618b4a2c5024ae40ac7494 | SQL | moriarty-verana/sql-scripts | /Daily ATB Grouper.sql | UTF-8 | 12,188 | 2.859375 | 3 | [] | no_license | SELECT cast([Company Code] AS VARCHAR(50)) AS 'Company Code'
,cast([Account Number] AS VARCHAR(20)) AS 'Account Number'
,cast([Parent Account Number] AS VARCHAR(20)) AS 'Parent Account Number'
,cast([Account Type] AS VARCHAR(5)) AS 'Account Type'
,cast([Medical Record Number] AS VARCHAR(20)) AS 'Medical Recor... | true |
a0621e07622e822debcf9f805c988e992b29c561 | SQL | JoelDichamp/forum | /forum.sql | UTF-8 | 8,613 | 3.359375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.6.4
-- https://www.phpmyadmin.net/
--
-- Client : 127.0.0.1
-- Généré le : Ven 02 Février 2018 à 07:00
-- Version du serveur : 5.7.14
-- Version de PHP : 7.0.10
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER... | true |
e741d63e4fb4e400f72cb01c8e1de22e92bb31b2 | SQL | NicoleAmorim/Projeto_PWIII | /application/config/BD_PWIII.sql | UTF-8 | 1,468 | 3.8125 | 4 | [
"LicenseRef-scancode-unknown-license-reference",
"MIT"
] | permissive | DROP DATABASE IF EXISTS Projeto_PWIII;
CREATE DATABASE IF NOT EXISTS Projeto_PWIII;
USE Projeto_PWIII;
CREATE TABLE Usuario(
codUsuario INT PRIMARY KEY AUTO_INCREMENT,
nome VARCHAR(100) NOT NULL,
email VARCHAR(100) NOT NULL UNIQUE,
userName VARCHAR(100) NOT NULL UNIQUE,
senha VARCHAR(50) NOT NULL... | true |
1df6ca2ac5fbed96754ef87a17c5af9f076b771b | SQL | Vehicle-Information-Display/express-server | /schema.sql | UTF-8 | 2,026 | 3.625 | 4 | [] | no_license | create table users
(
uid INTEGER PRIMARY KEY, /* Unique identifier to identify different users who may make multiple attempts */
uuid varchar(128) not null UNIQUE, /* UUID for a given user for external use */
name TEXT not null, /* User's Name */
contact_em... | true |
b9714115f45ad3d1b956bc69abdc1e6f76dae1c0 | SQL | spalminteri/online_exp | /sql/empty_db.sql | UTF-8 | 3,173 | 3.140625 | 3 | [
"MIT"
] | permissive | -- phpMyAdmin SQL Dump
-- version 4.0.10.6
-- http://www.phpmyadmin.net
--
-- Host: mysql-risc.alwaysdata.net
-- Generation Time: Oct 09, 2017 at 04:56 PM
-- Server version: 10.1.23-MariaDB
-- PHP Version: 5.6.16
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT... | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.