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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
95b7aa9cf5a2b2d44a15abf6dbaa6c9d0bf1b6a7 | SQL | RheimerVanDijk/E-learning | /WRTS.sql | UTF-8 | 6,452 | 3.046875 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 5.0.1
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Generation Time: Oct 17, 2020 at 01:01 PM
-- Server version: 10.4.11-MariaDB
-- PHP Version: 7.4.3
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD... | true |
d8015cd5cae3c65b860c72e298344241f64c78d6 | SQL | dieshangtianya/UniqueBlog | /UniqueBlogMySqlDB/functions/func_split_str.sql | UTF-8 | 309 | 2.546875 | 3 | [] | no_license | use UniqueBlogDB;
DROP function IF EXISTS func_split_str;
CREATE function func_split_str
(
str VARCHAR(10000),
delim VARCHAR(10),
pos INT
)
RETURNS varchar(10000)
RETURN REPLACE(
SUBSTRING(SUBSTRING_INDEX(str, delim, pos),LENGTH(SUBSTRING_INDEX(str, delim, pos -1)) + 1),
delim,
''); | true |
061fd22f7e630003fdb507d8d0f204999d01f5c2 | SQL | unsch-ayacucho/practica-calificada-i-is545-Lizbeth06 | /divisimabd.sql | UTF-8 | 4,566 | 2.859375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.8.5
-- https://www.phpmyadmin.net/
--
-- Servidor: 127.0.0.1
-- Tiempo de generación: 17-07-2019 a las 04:13:42
-- Versión del servidor: 10.1.40-MariaDB
-- Versión de PHP: 7.3.5
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
... | true |
9ec18f261768adec52d94f24d5e97b89130da65b | SQL | beanmoon/lobo | /src/main/resources/db.sql | UTF-8 | 2,133 | 3.375 | 3 | [] | no_license | curl --data '{"spu_id":1, "page":1, "page_size":10}' "http://172.16.31.63:16010/lobo/comment"
Create KEYSPACE lobo WITH replication = {'class':'SimpleStrategy', 'replication_factor':1};
create table lobo.spusku (
spu_id bigint,
sku_id bigint,
primary key(spu_id)
)WITH compression={'chunk_length_kb': '64'... | true |
d6d19b787d4aa8e0659e7e54c3ab848c2db16355 | SQL | NicholasBreazeale/NB-springboard-projects | /sql-ddl-design/soccer_league.sql | UTF-8 | 1,079 | 3.4375 | 3 | [] | no_license | DROP DATABASE IF EXISTS soccer_league;
CREATE DATABASE soccer_league;
\c soccer_league;
CREATE TABLE teams
(
id SERIAL PRIMARY KEY,
name TEXT NOT NULL
);
CREATE TABLE players
(
id SERIAL PRIMARY KEY,
first_name TEXT NOT NULL,
last_name TEXT NOT NULL,
team_id INTEGER REFERENCES teams,
... | true |
603e2e26370a43e248815b41e388738d9edd5ee8 | SQL | donofden/vsts-mini | /python/seed_data/workitems.sql | UTF-8 | 899 | 2.796875 | 3 | [] | no_license | CREATE TABLE workitems (
id SERIAL PRIMARY KEY,
team_id VARCHAR(255) NOT NULL, -- team id links to teams table
iteration_id VARCHAR(255) NOT NULL, -- Iteration id of the card in current run
workitem_no VARCHAR(50), -- Workitem number as per ADO
column_id VARCH... | true |
83f15e56eee75e597e7a92cb18524def8c79681f | SQL | reisluana/projeto-modulo3-resilia | /Queries/Mulheres na F1/Resposta 9.sql | UTF-8 | 256 | 3 | 3 | [] | no_license | -- qual a nacionalidade e nascimento das mulheres participantes da fórmula 1 e seus respectivos nomes em ordem ascendente?
SELECT
drivers.forename, drivers.dob, drivers.nationality
FROM
drivers
WHERE
sexo = 'Feminino'
ORDER BY forename ASC;
| true |
709bc81dcdaea2ad7513221e8836983c09f2ba64 | SQL | ArGaL-D/prototipo-almacen | /backend/sql/sp_getUbicacion.sql | UTF-8 | 653 | 3.421875 | 3 | [] | no_license |
USE `EQUIPOS_CECYT16`;
DROP procedure IF EXISTS `sp_getUbicacion`;
USE `EQUIPOS_CECYT16`;
DROP procedure IF EXISTS `EQUIPOS_CECYT16`.`sp_getUbicacion`;
;
DELIMITER $$
USE `EQUIPOS_CECYT16`$$
CREATE DEFINER=`root`@`localhost` PROCEDURE `sp_getUbicacion`()
BEGIN
# Saber la ubicación de los equipos prestados
... | true |
1d533a3b440d2b6c78d0ecde748cd30edbf07e63 | SQL | HesamMohammadian/apex-flowsforapex | /src/views/engine-app/flow_p0014_subflow_log_vw.sql | UTF-8 | 722 | 2.953125 | 3 | [
"MIT",
"LicenseRef-scancode-bpmn-io"
] | permissive | create or replace view flow_p0014_subflow_log_vw
as
select distinct lgsf.lgsf_prcs_id
, coalesce(objt.objt_name, lgsf.lgsf_objt_id) as completed_object
, lgsf.lgsf_sbfl_id
, lgsf.lgsf_sbfl_process_level
, lgsf.lgsf_last_completed
, lgsf.l... | true |
17c49058ca080f80b51f5d19d03de3c8b37a6ee7 | SQL | yunger7/Agenda | /agenda.sql | UTF-8 | 4,444 | 3.28125 | 3 | [
"MIT"
] | permissive | -- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Tempo de geração: 05-Nov-2020 às 20:16
-- Versão do servidor: 10.4.14-MariaDB
-- versão do PHP: 7.4.10
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_C... | true |
55a50eb0b5f9b1548d115adb95f3b2f975e10db9 | SQL | ahbaid/learn | /oracle/segusage.sql | UTF-8 | 239 | 2.796875 | 3 | [] | no_license | clear columns
clear breaks
column c0 format A20 heading "User"
column c1 format 999,999,990 heading "MBytes"
select owner, sum(bytes)/power(2,20) MBytes
from dba_segments
where owner not in ('SYSTEM','SYS')
group by owner
order by 2,1
/
| true |
4ec4425f745ba5a813bcd483a9982e282c55e00f | SQL | rkbplg/adminui | /src/main/resources/db.sql | UTF-8 | 876 | 3.125 | 3 | [] | no_license | /*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
/**
* Author: 631713
* Created: 09/03/2018
*/
CREATE TABLE `XE_DEALS` (
`ID` int(11) AUTO_INCREMENT primary key,
`SRC` varc... | true |
348a9633ec9f30ebc5a8938995cb93ae5a3c4929 | SQL | dualfitting/tc-elasticsearch-feeder-service | /src/main/resources/sql/mm-feeder-into-challenges/get-phases.sql | UTF-8 | 536 | 3.4375 | 3 | [] | no_license | select
round_id as challengeId,
rs.segment_id as phaseId,
CASE
WHEN (rs.status = 'P') THEN 'Closed'
WHEN (rs.status = 'A') THEN 'Open'
WHEN (rs.status = 'F') THEN 'Scheduled'
ELSE 'Scheduled'
END as status,
s.segment_desc as type,
start_time as fixedStartTime,
start_time as scheduledStar... | true |
c4d4db4ff5e047c788a8be2a0ad02dd8ce7a7806 | SQL | shohinsherov/crud | /sql/create_customers_table.sql | UTF-8 | 222 | 2.578125 | 3 | [] | no_license | CREATE TABLE customers (
id BIGSERIAL PRIMARY KEY,
name TEXT NOT NULL,
phone text NOT NULL UNIQUE,
password TEXT NOT NULL,
active BOOLEAN NOT NULL DEFAULT TRUE,
created TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP
);
| true |
a7a0e0c2f49c18a336879390355606f2cbd8b77b | SQL | nullthefirst/sql_shelf | /3-aggregations/26.sql | UTF-8 | 154 | 3.703125 | 4 | [] | no_license | SELECT a.name account,
MIN(o.total_amt_usd) spending
FROM accounts a
JOIN orders o
ON a.id = o.account_id
GROUP BY a.name
ORDER BY spending DESC
LIMIT 1; | true |
e2f233c34db35d16d98ebf076d44e947a5668b79 | SQL | tsukaharakazuki/td | /proc_radiko_data/log_processing/queries/agg_map_radikoid_member_id.sql | UTF-8 | 221 | 2.71875 | 3 | [] | no_license | SELECT
uid AS radiko_id ,
user_key_hash AS user_key ,
MAX(last_access_time) AS last_access_time ,
MAX(TD_TIME_PARSE(last_access_time, 'JST')) AS time
FROM
${in_radiko_db}.in_map_radikoid_member_id
GROUP BY
1,2 | true |
86372c9657e9424a80d62932d56749fb6c480357 | SQL | JD-Fuller/cshack | /Startup.sql | UTF-8 | 971 | 3.296875 | 3 | [] | no_license | -- Notifies us what we are using
USE burgerShack9;
-- DROP TABLE burgers
/* ---Startup Commands --*/
-- CREATE TABLE burgers (
-- id int NOT NULL AUTO_INCREMENT ,
-- name VARCHAR(255) NOT NULL,
-- price INT,
-- description VARCHAR(255),
-- PRIMARY KEY (id)
-- );
-- ALTER TABLE burgers
-- ADD price DECI... | true |
85882d84dfe6935f1f27f720e6358ced142b70a2 | SQL | Edd2525/Proyecto-Analisis | /DB/carnes (1).sql | UTF-8 | 4,659 | 3.171875 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 5.0.1
-- https://www.phpmyadmin.net/
--
-- Servidor: 127.0.0.1
-- Tiempo de generación: 14-04-2020 a las 16:42:07
-- Versión del servidor: 10.4.7-MariaDB
-- Versión de PHP: 7.4.2
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
... | true |
262e9e113df983f3b9816e91d0efd5664cd942cd | SQL | billystjohn1984/CNMT310_Final_Project | /sql/viewPastHour.sql | UTF-8 | 389 | 3.421875 | 3 | [
"MIT"
] | permissive | CREATE VIEW PastHour AS
SELECT song.title, artist.name AS artist, album.name AS album, label.name AS label, stack.name AS stack, PE.submittime
FROM song, album, label, playlistentry AS PE, stack, artist
WHERE PE.song = song.ID AND PE.stack = stack.ID AND song.artist = artist.ID AND song.album = album.ID AND album.labe... | true |
cc3fae1c0d9a9f72ea50f3bbec424e71eae8e6d9 | SQL | ChipEagle/advanced-oracle-sql | /create-triggers.sql | UTF-8 | 746 | 3.21875 | 3 | [] | no_license | CREATE TABLE table1 (col1 number(5), col2 varchar2(50));
CREATE TABLE table2 (col1 number(5), col2 varchar2(50));
CREATE OR REPLACE TRIGGER test_trg1
AFTER INSERT ON table1
FOR EACH ROW
BEGIN
insert into table2 values (:new.col1 , :new.col2);
END;
/
SELECT * FROM table1;
SELECT * FROM table2;
INSERT IN... | true |
5e62f527b2a03a75f5dc1e6dda0bf6af45e09a98 | SQL | khushbu-14/hotel-management | /ALL-SQL-FILES/update&delete.sql | UTF-8 | 738 | 3.125 | 3 | [] | no_license | set serveroutput on;
create or replace
procedure update_email(new_email in varchar2, id1 in varchar2)
as
begin
dbms_output.put_line('Updating Email');
update guest_db
set email= new_email where guest_id = id1;
commit;
dbms_output.put_line('Update Complete');
end;
/
exec update_email('johnny@gmail.com',8);
exec u... | true |
0c043c41ae07c614108866945250edbf791f01bd | SQL | SinianskiiIlya/ITMO_FSPO_DataBases_2020 | /students/y2336/laboratory_works/Zolotarev_Daniil/laba5/selects.sql | UTF-8 | 2,137 | 4.03125 | 4 | [
"MIT"
] | permissive | -- 1 запрос
SELECT "Author_Book" FROM public."Book" WHERE ("Pages_Book" > 100);
-- 2 запрос
SELECT "Name_Book" FROM public."Book" INNER JOIN public."Publisher" ON
"Book"."ID_Book" = "Publisher"."ID_book" WHERE ("Publications_per_month" = 12);
-- 3 запрос
SELECT "Author"."FIO_auuthor" FROM public."Contract" INNER J... | true |
ef69c44c9077c629b4b75a381157fe11aa322a74 | SQL | karlaugust1/wotan-api | /wotan/src/main/resources/sql/pergunta/select/perguntas_respondidas_by_student.sql | UTF-8 | 182 | 3 | 3 | [] | no_license | SELECT * FROM
pergunta p
INNER JOIN
conteudo c
ON
c.cont_id = p.cont_id
INNER JOIN
historico_pergunta hp
ON
hp.perg_id = p.perg_id
WHERE
hp.estu_id = ?; | true |
b7f0775ef115e35341dc1ade3f9206547fd1e9b9 | SQL | virgofreedom/sp16-itc250 | /books-01282016.sql | UTF-8 | 189 | 2.53125 | 3 | [] | no_license | /*
books-01282016.sql
A place to store SQL commands for our app
*/
select BookTitle,Category from
srv_Books inner join srv_Categories on
srv_Books.CategoryID = srv_Categories.CategoryID | true |
4da3f54be733e54a4f5810c872e5cba179364d16 | SQL | bintangpamungkas/w4c-project | /database/20191117.sql | UTF-8 | 33,576 | 3.125 | 3 | [
"LicenseRef-scancode-unknown-license-reference",
"MIT"
] | permissive | /*
Navicat Premium Data Transfer
Source Server : localhost
Source Server Type : MySQL
Source Server Version : 100406
Source Host : localhost:3306
Source Schema : w4c_official
Target Server Type : MySQL
Target Server Version : 100406
File Encoding : 65001
Date: 17/11/... | true |
10c70973315bd45cacd481a290baecebeb01561b | SQL | Emily97/musicstore | /people.sql | UTF-8 | 1,484 | 2.734375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.6.4
-- https://www.phpmyadmin.net/
--
-- Host: daneel
-- Generation Time: Jan 09, 2017 at 08:22 PM
-- Server version: 5.7.15-log
-- PHP Version: 5.6.26
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT *... | true |
07f362a74569a955521b51f07b3275f780095e6a | SQL | altamira/visualstudio | /Sistema de Informação Altamira/EGISSQL.Database/dbo/Stored Procedures/Procs1/pr_consulta_altera_vendedor.sql | UTF-8 | 8,042 | 3.703125 | 4 | [] | no_license |
CREATE PROCEDURE pr_consulta_altera_vendedor
@ic_parametro int,
@cd_pedido_venda int,
@cd_nota_saida int,
@dt_inicial datetime, --Data Inicial
@dt_final datetime --Data Final
AS
--------------------------------------------... | true |
4d2d68fa0ce7b5e03c9ed2445490ad2c1075937c | SQL | ko-aoki/springboot-doma | /src/main/resources/META-INF/com/example/dao/MstNewsDao/selectNewsDtoByCond.sql | UTF-8 | 468 | 3.8125 | 4 | [] | no_license | select
n.mst_news_id id,
n.role_id role_id,
r.role_name role_nm,
n.subject subject,
n.url url,
n.version version
FROM
mst_news n
INNER JOIN
mst_role r
ON
n.role_id = r.role_id
WHERE
/*%if @isNotEmpty(url) */
n.url LIKE /* @prefix(url) */'http'
/*%end*/
/*%if @isNotEmpty(subject) */
AND
n.subje... | true |
8cd9795395c3c5c51d2d1226c19a11f1949d53bc | SQL | MMunter/database-exercises | /join_exercises.sql | UTF-8 | 1,865 | 4.40625 | 4 | [] | no_license | use employees;
#2-all current department managers
select d.dept_name as 'Department Name', concat(e.first_name, ' ', e.last_name) as 'Department Manager'
from departments as d
join dept_manager as dm
ON dm.dept_no = d.dept_no
join employees as e
on e.emp_no = dm.emp_no
where dm.to_date like '9999-%-%'
ORDER BY d.dept_... | true |
00f976be85f73f27f08a79e6b389255cb78bc79d | SQL | msetkin/divolte_dwh | /models/marts/core/intermediate/l_hit.sql | UTF-8 | 432 | 2.9375 | 3 | [
"Apache-2.0"
] | permissive | with l_hit_temp as (
select * from {{ ref('stg_divolte_clickstream') }}
),
final as (
select
hash (sessionID||'*divolte') as HK_session_id,
hash (partyID||'*divolte') as HK_party_id,
hash (remoteHost||'*divolte') as HK_remote_host_id,
'divolte' as record_source,
timestamp as load_date,
timesta... | true |
6360ca4417ca10a40e485a45a8015031cb83cdd1 | SQL | lmu-cmsi486-fall2020/assignments | /netflix-prize-relational-example/schema.sql | UTF-8 | 312 | 3.28125 | 3 | [] | no_license | CREATE TABLE movie (
id INT PRIMARY KEY GENERATED BY DEFAULT AS IDENTITY, -- Helps auto-generate IDs.
year INT,
title VARCHAR
);
CREATE TABLE rating (
movie_id INT REFERENCES movie(id),
viewer_id INT, -- There is no actual viewer table because all we have is an ID.
rating INT,
date_rated DATE
);
| true |
12ab2c068a4d8be220a8dab1406b972c93ef2eed | SQL | nadiahristova/SoftUni | /Databases-SQL/5_Advanced_SQL/Problem_25.sql | UTF-8 | 189 | 3.59375 | 4 | [] | no_license | SELECT d.Name AS Department, e.JobTitle AS [Job Title], AVG(Salary) AS [Average Salary] FROM Departments d
JOIN Employees e
ON e.DepartmentID = d.DepartmentID
GROUP BY d.Name, e.JobTitle | true |
e7c56c52fdeb6ceb44947ef3a3a10c2ac4a527c6 | SQL | EBignardi/BasicSQL | /esame08-07-2016.sql | UTF-8 | 2,688 | 3.90625 | 4 | [] | no_license | use master
use DB_08_07_2016
-----------------------------------------------------------------------
alter table Ciclista
add constraint chk_maggiorenne
check (datediff(year, data_nascita, getdate()) >= 18)
-----------------------------------------------------------------------
alter table Iscritto
add constra... | true |
b60dd1f4d37328cf78b1f729353d5ba25637add2 | SQL | prafailov9/fin-app-server | /persistence/src/main/resources/mysql-fin-db-script.sql | UTF-8 | 8,848 | 3.3125 | 3 | [] | no_license | CREATE TABLE IF NOT EXISTS instruments (
id BIGINT AUTO_INCREMENT NOT NULL,
instrument_name VARCHAR(50),
interest_rate DOUBLE,
start_payment_date TIMESTAMP,
end_payment_date TIMESTAMP,
interest_frequency VARCHAR(50),
principal_frequency VARCHAR(50),
instrument_type VARCHAR(50),
PRIMARY KEY (i... | true |
9607aa1feb5b9f22ce53b201ff3990cd1bc28e28 | SQL | blehli/beneco | /DB/benecoapp-initial.sql | UTF-8 | 4,873 | 3.21875 | 3 | [] | no_license | -- MySQL dump 10.13 Distrib 5.7.17, for Win64 (x86_64)
--
-- Host: 127.0.0.1 Database: benecoapp
-- ------------------------------------------------------
-- Server version 5.7.19
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/... | true |
f8b4d8a27612fc7bb3b5dd5eafb4b7d46a6c1267 | SQL | Wanghuaichen/openlab | /code/trunk/database/init_ddl_mysql.sql | UTF-8 | 991 | 3.046875 | 3 | [] | no_license | /******创建数据库******/
create database if not exists oplab default character set utf8;
drop table if exists tb_user;
/*==============================================================*/
/* Table: tb_user */
/*==============================================================*/
cre... | true |
89afef044c8420ee8dcf134eb1a44b3ff570e1eb | SQL | corentindargent/Project | /dbo.Table.sql | UTF-8 | 226 | 3.28125 | 3 | [] | no_license | CREATE TABLE [StudentCourse]
(
[StudentId] BIGINT NOT NULL,
[CourseId] BIGINT NOT NULL,
PRIMARY key ([StudentId],[CourseId]),
Foreign Key (StudentId) REFERENCES Student,
Foreign Key (CourseId) REFERENCES Course,
)
| true |
c1b2b2f35d6f7f457dc75b591e43f1adfed731f7 | SQL | azizanhakim/Mandiri-Integrated-Testing-Management---API | /src/main/resources/db/migration/V2019_01_30_14_27_11__schema-device.sql | UTF-8 | 1,422 | 3.0625 | 3 | [
"MIT"
] | permissive | create table device (
device_id varchar(64) not null primary key,
device_name varchar(150) not null,
category_id varchar(64) not null,
color_id varchar(64) not null,
brand_id varchar(64) not null,
condition_id varchar(64) not null,
unit_id varchar(64) not null,
pe... | true |
76a5c005dfcf39982c7d269d14228573d1fc985b | SQL | SafwenBensaid/bankingSystem | /utilities/banking_system.sql | UTF-8 | 9,417 | 3.453125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 3.5.1
-- http://www.phpmyadmin.net
--
-- Client: localhost
-- Généré le: Ven 10 Février 2017 à 23:25
-- Version du serveur: 5.5.24-log
-- Version de PHP: 5.3.13
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLI... | true |
d8252d40a59c1d02439d3ff0ef9a7e5fd0e54a35 | SQL | mullerpaul/DBAstuff | /warehouse/resources/migration/operationalstore/2016Q3/lego_invoice_object_create_tbl.sql | UTF-8 | 384 | 2.578125 | 3 | [] | no_license | CREATE TABLE lego_invoice_object (
object_name VARCHAR2(30),
source_name VARCHAR2(6),
object_desc VARCHAR2(255) NOT NULL,
enabled CHAR(1) NOT NULL,
create_date DATE NOT NULL)
/
ALTER TABLE lego_invoice_object
ADD CONSTRAINT l... | true |
c037ea91776907af01d3158a6246b021cd4b159c | SQL | bazy1983/devour_sequelize | /db/burger_db.sql | UTF-8 | 2,546 | 3.328125 | 3 | [] | no_license | DROP DATABASE IF EXISTS burger_db;
CREATE DATABASE burger_db;
USE burger_db;
CREATE TABLE burger_list (
id INT AUTO_INCREMENT,
category VARCHAR (15) NOT NULL,
name VARCHAR(30) NOT NULL,
cal INT (5),
description VARCHAR (300),
image VARCHAR (300),
PRIMARY KEY (id)
);
CREATE TABLE devour_tbl (
id INT AUTO_INCREMENT,
b... | true |
28031055be1b21af3b79f31356b7fd2aaf196265 | SQL | Artheanos/kinder | /back/src/main/resources/db/changelog/20201511_add_subcategory.sql | UTF-8 | 190 | 2.765625 | 3 | [] | no_license | --liquibase formatted sql
DROP TABLE IF EXISTS dbo.subcategory;
CREATE TABLE subcategory(
id BIGSERIAL NOT NULL,
title VARCHAR UNIQUE NOT NULL,
PRIMARY KEY(id)
) | true |
34782c06e1b86c2b109bdc3d28bf3169bf1e0a4d | SQL | Nedhro/openmrs-module-queuemanagement | /api/src/main/resources/assignedPatientUpdate.sql | UTF-8 | 2,129 | 3.515625 | 4 | [] | no_license | update global_property
set property_value = 'select distinct concat(pn.given_name," ", ifnull(pn.family_name,'''')) as name,
pi.identifier as identifier,
concat("",p.uuid) as uuid,
concat("",v.uuid) as activeVisitUuid,
IF(va.value_reference = "Admitted", "true", "false") ... | true |
d0c9e22cdb374e6d02b5bf41e0c185aa48ac76a5 | SQL | ThanhBTran/Cloud | /cuoiky.sql | UTF-8 | 10,997 | 3.25 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.9.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Jan 03, 2020 at 03:30 AM
-- Server version: 10.4.8-MariaDB
-- PHP Version: 7.3.11
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD... | true |
ffb67de91bf2c4537d7e67f99953a63ea68649a3 | SQL | chendi1995/Movie_Recommended | /script/create.sql | UTF-8 | 885 | 2.75 | 3 | [] | no_license | CREATE TABLE `movie` (
`Mname` char(50) COLLATE 'utf8_general_ci' NOT NULL,
`MURL` char(50) COLLATE 'utf8_general_ci' NULL,
`Mpic` char(50) COLLATE 'utf8_general_ci' NULL,
`dtor` char(50) COLLATE 'utf8_general_ci' NULL,
`ator` char(50) COLLATE 'utf8_general_ci' NULL,
`info` char(150) COLLATE 'utf8_general_c... | true |
b2d879b1b5b00b0f2290e6b20e0cdb70007ac89a | SQL | xo/xo | /_examples/booktest/sqlserver/xo.xo.sql | UTF-8 | 1,033 | 4.09375 | 4 | [
"MIT"
] | permissive | -- Generated by xo for the booktest schema.
-- table authors
CREATE TABLE authors (
author_id INT IDENTITY(1, 1),
name VARCHAR(255) DEFAULT ('') NOT NULL,
CONSTRAINT authors_pkey PRIMARY KEY (author_id)
);
-- index authors_name_idx
CREATE INDEX authors_name_idx ON authors (name);
-- table books
CREATE TABLE bo... | true |
05dee2f0762d1b5add9b869f32ad89449da7c129 | SQL | bravesoftdz/KsmProj | /PersonUchet/createRep1.sql | WINDOWS-1252 | 2,221 | 3.375 | 3 | [] | no_license | create global temporary table sta.PersonForm1Rep (
RecID integer not null,
RecSubID integer not null,
RecData varchar(600) not null
)
;
create procedure STA.PersonForm1Generate(in packetid integer)
begin
delete from sta.PersonForm1Rep;
insert into PersonForm1Rep select 1,0,'=1.3=' as ReportRow... | true |
b27edacee1ea7a4dcfef90a8a6c9fdbbad42140b | SQL | SASCopenhaver/References | /_questiNation/_QN/Create_QN/File_13_Create_tbl_REPORTINFO_TEMP.sql | UTF-8 | 689 | 3.421875 | 3 | [] | no_license | -- Create table
create table REPORTINFO_TEMP
(
UUID VARCHAR2(50) not null,
PRJID NUMBER not null,
MNGROPP NUMBER,
MNGRPE NUMBER,
MNGRTC NUMBER,
MNGRLS NUMBER,
MNGRPCE NUMBER,
MNGRCAR NUMBER,
MNGRCCR NUMBER,
MNGRIC NUMBER,
MNGRTD NUMBER,
MNGRCO NUMBER,
PARTOPP NUMBER,
... | true |
d8167ee86fd6574f1fed0e3e7a75189238be177d | SQL | SaltyRain/ITMO_DB_DurakCardGame | /sql/functions/get-card-type.sql | UTF-8 | 388 | 3.21875 | 3 | [] | no_license | DELIMITER //
CREATE FUNCTION getCardType(cardid INT UNSIGNED)
RETURNS INT UNSIGNED
BEGIN
RETURN (SELECT id_typecard FROM cardTypes WHERE id_typecard = (SELECT id_typecard FROM cards WHERE id_card = cardid));
END //
-- SELECT id_typecard FROM cardTypes WHERE id_typecard IN (SELECT id_typecard FROM cards WHERE id_ca... | true |
f649ee1115e3887d4c2d44471e3822b3e3f5b027 | SQL | mudriver/Nicks-Repo | /MySQLCode/employee_last_pay.sql | UTF-8 | 327 | 3.328125 | 3 | [] | no_license | update te_employees as te
join (select c.cards_employee_id as id, e.last_pay as last_pay from
te_cards as c join Employee as e on e.card_number = c.cards_card_number and
e.card_type=c.cards_card_type) as records on te.employees_employee_id = records.id
set te.employees_last_year_paid = records.l... | true |
bba3b8df966204a4159560c4f402d6fc7c8f43e0 | SQL | viorake86/aspnetmembership-with-firebird | /src/sample/AspNetWebApplicationWithFirebirdTest/AspNetWebApplicationWithFirebirdTest/Database/FIREBIRD_ASPNET_MEMBERSHIP.sql | WINDOWS-1252 | 53,402 | 3.46875 | 3 | [] | no_license | /******************************************************************************/
/*** Generated by IBExpert 2010.03.23 16.9.2010 12:57:47 ***/
/******************************************************************************/
SET SQL DIALECT 3;
SET NAMES WIN1251;
CREATE DATABASE '127.0.0.1/3051:D:\p... | true |
d1c9eef90e00348bfe4de5c7bbc61b5013bddd5c | SQL | syakuis/salt-framework | /src/main/resources/egovmei/apps/modules/dashboard/oracle/schema/portlet.table.sql | UTF-8 | 1,273 | 3.515625 | 4 | [
"MIT"
] | permissive | CREATE SEQUENCE PORTLET_IDX_SEQ;
CREATE TABLE PORTLET
(
DASHBOARD_IDX CHAR(20) NOT NULL ,
PORTLET_IDX CHAR(20) NOT NULL ,
PORTLET_NAME VARCHAR2(150) NOT NULL,
PORTLET_ID VARCHAR2(150) NOT NULL,
WIDTH NUMBER(2) NULL,
HEIGHT NUMBER(2) NULL,
PADDING NUMBER(2) ... | true |
ce3c875f6d64e6adcb0d00b87be1efb6580edb2d | SQL | JuantaMajose/Punto-de-Venta | /P.O.S.G/puntovengaguadalupe/sql/dbventasguadalupe.sql | UTF-8 | 5,018 | 3.34375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.0.4
-- http://www.phpmyadmin.net
--
-- Servidor: localhost
-- Tiempo de generación: 06-08-2014 a las 14:50:56
-- Versión del servidor: 5.6.12-log
-- Versión de PHP: 5.4.12
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CH... | true |
f2045fb245e4087194b0e99464286cbde1348684 | SQL | angryjenkins/coding-classwork | /day43_May2/14.3/16-instructor-do/db/schema.sql | UTF-8 | 168 | 2.8125 | 3 | [] | no_license | ### Schema
CREATE DATABASE demo_db;
USE demo_db;
CREATE TABLE things
(
id int NOT NULL AUTO_INCREMENT,
name varchar(255) NOT NULL,
state BOOL,
PRIMARY KEY (id)
); | true |
c94cff30ab70708b7b8767cc3c6840b2a9e900c1 | SQL | rahmor/rxo-api | /migrations/002.do.create_rxo_prescriptions.sql | UTF-8 | 218 | 2.59375 | 3 | [] | no_license | DROP TABLE IF EXISTS prescriptions;
CREATE TABLE prescriptions (
id INTEGER PRIMARY KEY GENERATED BY DEFAULT AS IDENTITY,
rx_name TEXT NOT NULL,
user_id INTEGER REFERENCES users(id) ON DELETE CASCADE NOT NULL
); | true |
f5f556e600de381a0674b46321970208b99639a6 | SQL | H-Shen/Collection_of_my_coding_practice | /Leetcode/1083/1083.sql | UTF-8 | 482 | 3.5625 | 4 | [] | no_license | # Write your MySQL query statement below
select distinct t1.buyer_id
from (select x.buyer_id
from Sales as x
where x.buyer_id not in
(select s.buyer_id
from Sales as s
where s.product_id in (select product_id from Product where product_name = 'iPhone'))) as t1
where t1.... | true |
c955f2568612cfaf7751849df3e1a54f0cba2689 | SQL | GoktepeEren/PL-SQL-Queries-for-Oracle-Fusion | /Expense_To_Cash_Advance_Matched.sql | UTF-8 | 1,722 | 3.71875 | 4 | [] | no_license | Select
eer.EXPENSE_REPORT_NUM as ExpReportNumber,
eer.PURPOSE as ExpPurpose,
eer.PAYMENT_METHOD_CODE as ExpMethodCode,
eer.EXPENSE_STATUS_CODE as ExpStatus,
eer.EXPENSE_REPORT_TOTAL as ExpReportTotal,
eer.REIMBURSEMENT_CURRENCY_CODE as ExpCurrencyCode,
eer.EXPENSE_REPORT_DATE as ExpReportDate,
eer.RE... | true |
1ae03f6460e326d938960738d898a3ce5686a144 | SQL | MichaelCrockett/my_trip_tracker | /db/trip_tracker.sql | UTF-8 | 543 | 3.328125 | 3 | [] | no_license | DROP TABLE trips;
DROP TABLE sights;
DROP TABLE countries;
DROP TABLE cities;
CREATE TABLE countries (
id SERIAL4 primary key,
name VARCHAR(255)
);
CREATE TABLE cities (
id SERIAL4 primary key,
name VARCHAR(255),
country_id int4 REFERENCES countries(id) ON DELETE CASCADE
);
CREATE TABLE sights (
id SER... | true |
d567a05e1b91a6bedd40cf7ce0e5ca7d7966845a | SQL | GonzaSuarez/Solvd | /Booking Data Base/City Insertions.sql | UTF-8 | 1,447 | 2.53125 | 3 | [] | no_license | INSERT INTO mydb.City (city_name, postal_code, Country_idCountry) VALUES
("Necochea", 7630, (SELECT idCountry FROM mydb.Country WHERE country_name = "Argentina")),
("Quequen", 7631, (SELECT idCountry FROM mydb.Country WHERE country_name = "Argentina")),
("Rio de Janeiro", 22050000, (SELECT idCountry FROM mydb.Country W... | true |
edeccee36e04c941ea74886953dba39cbb9b2400 | SQL | zeze94/les-ualg-bioterio-g8 | /bd-les-updated23.06.18.sql | UTF-8 | 33,765 | 2.96875 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.6.5.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Jun 23, 2018 at 04:41 AM
-- Server version: 10.1.21-MariaDB
-- PHP Version: 5.6.30
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SE... | true |
aeeccc2e3cff05fa60fe931ca95bad565e2b7e0a | SQL | Sifat-Ahmed/DDB_Project | /Trigger_ProductOutOfStock.sql | UTF-8 | 268 | 2.859375 | 3 | [] | no_license | SET SERVEROUTPUT ON;
CREATE OR REPLACE TRIGGER ShowProductQuantity
BEFORE DELETE OR INSERT OR UPDATE ON product
FOR EACH ROW
WHEN (NEW.quantity < 2)
DECLARE
BEGIN
dbms_output.put_line('Only one product remaining before getting out of stock!');
END;
/ | true |
2fccb767f3b2ac7f525d2bb4d400157c418199d7 | SQL | tangjz/acm-icpc | /leetcode/2001-3000/2066-account-balance.sql | UTF-8 | 183 | 3.265625 | 3 | [
"Apache-2.0"
] | permissive | # Write your MySQL query statement below
select account_id, day, (sum(if(type = 'Deposit', amount, -amount)) over(partition by account_id order by day)) as balance from Transactions;
| true |
54ec9ce893d2b195f32be456f4a3c0c56ee60f3e | SQL | techniqs/Fridget | /server/src/main/resources/sql/database.sql | UTF-8 | 1,927 | 3.640625 | 4 | [] | no_license | CREATE TABLE IF NOT EXISTS User (
id INT AUTO_INCREMENT PRIMARY KEY,
name VARCHAR(255),
email VARCHAR(255),
password VARCHAR(255)
);
CREATE TABLE IF NOT EXISTS PasswordResetCode (
id INT AUTO_INCREMENT PRIMARY KEY,
user_id INT NOT NULL REFERENCES User (id),
code ... | true |
376183c9c1d19c5cfb2981e3fc409c5a3581eb99 | SQL | Shyamswami/cscripts | /sql/active_user_sessions.sql | UTF-8 | 169 | 2.578125 | 3 | [] | no_license | SELECT sid, serial#, module, action, sql_id, last_call_et last_call_secs
FROM v$session
WHERE status = 'ACTIVE'
AND type = 'USER'
ORDER BY
sid, serial#
/
| true |
bdee4e73fd272d46c16a99c10c8cc98d61c356b2 | SQL | kramery/Zamora_Jimenez_Jesus_Proyecto_IAW | /Proyecto/db/proyecto.sql | UTF-8 | 9,499 | 2.890625 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.6.6
-- https://www.phpmyadmin.net/
--
-- Host: localhost:3306
-- Generation Time: Mar 12, 2017 at 12:47 PM
-- Server version: 10.1.20-MariaDB
-- PHP Version: 7.0.8
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_... | true |
d7c131dc5e21c4f6cfae108f9a96fa35238fc601 | SQL | Camille-t/formation_CDA | /Developper_la_persistance_des_donnees/Developper_des_composants/evaluation/3_mise_en_place_d_une_regle_de_gestion/regle_de_gestion.sql | UTF-8 | 2,679 | 4.1875 | 4 | [] | no_license | /* Décrivez par quel moyen et comment vous pourriez implémenter la règle de gestion suivante.
Pour tenir compte des coûts liés au transport, on vérifiera que pour chaque produit d’une commande, le client réside dans le même pays que le fournisseur du même produit */
/* On créé un trigger qui va empêcher l'insertio... | true |
88508ceca17b5c357966adc3b61f64187fef9f4c | SQL | minskowl/MY | /Develop/Projects/Net/KnowledgeBase/DAL/KnowledgeBase.SqlLite.Dal/Database.sql | UTF-8 | 4,298 | 3.859375 | 4 | [] | no_license | CREATE TABLE [Categories] (
[CategoryID] INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL,
[ParentCategoryID] INTEGER NULL,
[Name] NVARCHAR(50) NOT NULL,
[CreationDate] TIMESTAMP DEFAULT CURRENT_TIMESTAMP NOT NULL
);
CREATE TABLE [FileIncludes] (
[FileIncludeID] NVARCHAR(50) UNIQUE NULL PRIMARY KEY,
[KnowledgeID] INTEGE... | true |
257917307829f0d351ee10add1dfe7af4bae47bb | SQL | KleeGroup/kinetix | /Kinetix/Kinetix.Workflow/SQLResources/FindAllDefaultActivityDefinitions.sql | UTF-8 | 484 | 3.890625 | 4 | [
"Apache-2.0"
] | permissive | SELECT
WAD.WFAD_ID AS WfadId,
WAD.NAME AS Name,
WAD.LEVEL AS Level,
WAD.WFMD_CODE AS WfmdCode,
WAD.WFWD_ID AS WfwdId
FROM
WF_WORKFLOW_DEFINITION WFD
JOIN WF_ACTIVITY_DEFINITION WAD ON (WFD.WFWD_ID = WAD.WFWD_ID)
WHERE WAD.WFWD_ID = @WFWD_ID
AND WAD.LEVEL >= @LEVEL
AND (WAD.WFAD_ID = WFD.WFAD_ID
OR WAD... | true |
c6569703eb3127c6a52e6a408bb958fc8d2c23cb | SQL | CrystallizedSnowflakes/MySQL-SoftUni | /05_TABLE_RELATIONS/Lab/03-SoftUni-Hiking-JOIN_ON.sql | UTF-8 | 236 | 3.40625 | 3 | [] | no_license | SELECT `starting_point` AS `route_starting_point`,
`end_point` AS `route_ending_point`,
`leader_id`,
CONCAT(c.`first_name`, ' ', c.`last_name`) AS `leader_name`
FROM `routes` AS r JOIN `campers` AS c
ON r.`leader_id` = c.`id`; | true |
54e7782c950c6f3f7dd23884828aee4eba32082b | SQL | nixford/SoftUni-DataBases-May-2020-TasksAndExams | /MS-SQL-Server/Table-Relations-Exercises/PeaksinRila.sql | UTF-8 | 148 | 3.328125 | 3 | [] | no_license | SELECT MountainRange, PeakName, Elevation FROM Peaks
JOIN Mountains ON Peaks.MountainId = Mountains.Id
WHERE MountainId = 17
ORDER BY Elevation DESC | true |
f5ccb5562884421449d26e751bb7a5a5cc54b104 | SQL | trong0805/sql | /THITHU.sql | UTF-8 | 1,362 | 3.21875 | 3 | [] | no_license | CREATE DATABASE THITHU
CREATE TABLE MATHANG
(
MSMH NVARCHAR (50) NOT NULL PRIMARY KEY,
TENHANG NVARCHAR (50) NULL,
DONGIA MONEY NULL,
DVT NVARCHAR (50) NULL
)
INSERT INTO MATHANG
VALUES ('MSMH1','CU ĐƠ',50000,'CÁI'),
('MSMH2','KẸO LẠC',100000,'CÁI'),
('MSMH1','BÁNH GAI',150000,'CÁI')
CREATE TABLE ... | true |
c4b000163c65cfe10f33c240d5b71146400a3bf2 | SQL | dannyvorton/IS6465-GroupProject | /DaveCode/orderline.sql | UTF-8 | 1,800 | 2.984375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1:3306
-- Generation Time: Mar 20, 2021 at 06:53 PM
-- Server version: 8.0.21
-- PHP Version: 7.3.21
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@... | true |
b8f866e421f59a64a5686d327441c19881c6efe1 | SQL | juliolimareis/celula | /docs/outros/mysql/BD.sql | UTF-8 | 890 | 3.359375 | 3 | [] | no_license | CREATE SCHEMA IF NOT EXISTS `celula` DEFAULT CHARACTER SET utf8 ;
USE `celula` ;
CREATE TABLE IF NOT EXISTS `celula`.`element` (
`id_element` INT NOT NULL AUTO_INCREMENT,
`cito` INT NULL,
`cloro` INT NULL,
`comp` INT NULL,
`memb_celu` INT NULL,
`memb_nucl` INT NULL,
`mito` INT NULL,
`nucl` INT NULL,
... | true |
b097cb0fe70a04956d2f55959a958e4d84cf2439 | SQL | pdvmoto/binsql | /fix_1333.sql | UTF-8 | 549 | 3.015625 | 3 | [] | no_license | -- fix item 1333, index on PIL_CES_LEQ
--
-- fix is index on call_ref + ces_id + leq_id: find all info+links via 1 index
spool fix_1333
set timing on
set echo on
create index pcs.pil_ces_leq_crn_xtra6 on
pcs.pil_ces_leq ( call_ref_nr_drv, leq_id, ces_id )
tablespace pcs_index;
create index pcs.ces_id_dty_ogn... | true |
d41293c07cb7c988f3c8b5910a443510991a8eb0 | SQL | ariespirnando/thesis-2019 | /DATABASE.sql | UTF-8 | 47,926 | 3.203125 | 3 | [
"MIT"
] | permissive | -- --------------------------------------------------------
-- Host: 127.0.0.1
-- Server version: 5.6.24 - MySQL Community Server (GPL)
-- Server OS: Win32
-- HeidiSQL Version: 9.4.0.5125
-- --------------------------------------------------------
/*... | true |
ec7a56e594990248e1bff64848e09d68fb4a99ad | SQL | Agunahwan/fabelio-test | /fabelio.sql | UTF-8 | 4,755 | 2.96875 | 3 | [] | no_license | /*
SQLyog Community v13.1.5 (64 bit)
MySQL - 10.1.37-MariaDB : Database - fabelio
*********************************************************************
*/
/*!40101 SET NAMES utf8 */;
/*!40101 SET SQL_MODE=''*/;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS... | true |
0209b9359cf46195cc4121a30f677703e226bd05 | SQL | dagasaga/css | /data.sql | UTF-8 | 93,509 | 2.75 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 3.5.8.2
-- http://www.phpmyadmin.net
--
-- Client: sql313.byethost24.com
-- Généré le: Dim 17 Janvier 2016 à 13:16
-- Version du serveur: 5.6.27-76.0
-- Version de PHP: 5.3.3
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHA... | true |
bebc1a311c522364d998ab5e897b60a4ed45535a | SQL | femke77/sqlsat | /SQLproject/report on lecturers.sql | UTF-8 | 821 | 4.15625 | 4 | [] | no_license | --How many presentations did speakers present over the years at the events - not how many total they had, but those that were scheduled and presented.
--Expected result:
--Speaker Full Name, Event Year, Number of the Presentations
CREATE PROCEDURE lecturerReport (@fname varchar(255), @lname varchar(255))
AS
BEGIN
SE... | true |
a7cbb65379e1ba76df5920ecd04a70f8d0abc8dd | SQL | matschaffer/horizon | /spec/fixtures/scenarios/paths-horizon.sql | UTF-8 | 43,593 | 3.15625 | 3 | [
"Apache-2.0"
] | permissive | --
-- PostgreSQL database dump
--
SET statement_timeout = 0;
SET lock_timeout = 0;
SET client_encoding = 'UTF8';
SET standard_conforming_strings = on;
SET check_function_bodies = false;
SET client_min_messages = warning;
SET search_path = public, pg_catalog;
DROP INDEX public.unique_schema_migrations;
DROP INDEX pub... | true |
5687bc16de009cabc08b7a01b53c43012e9d89f3 | SQL | brian86258/Programming | /SQL/LC_185_Department Top Three Salaries.sql | UTF-8 | 1,180 | 4.65625 | 5 | [] | no_license | /*
A company's executives are interested in seeing who earns the most money in each of the company's
departments. A high earner in a department is an employee who has a salary in the
top three unique salaries for that department.
Write an SQL query to find the employees who are high earners in each of the department... | true |
f7128f3d4df12cd78ed0e69e083642b546563578 | SQL | yinxufientsui/MarketingMixModeling-MMM | /SQL2.sql | UTF-8 | 5,020 | 3.96875 | 4 | [] | no_license | /*Paid Search*/
/*1*/
insert into mmm.mmm_adwordssearch_2017_raw (date_id,AdGroupId, AdGroupName, site_name,exchange_name, campaign_advertiser, campaign_budget, campaign_id, campaign_name, keywordid, keyword_name, device_id, device_browser, match_type,keyword_quality_score, position, impressions, CTR, clicks, currency)... | true |
beabf8f3e8a2fb3804ba60c6c84cedc267e746ff | SQL | alvin198761/erp_laozhang | /docs/数据库设计文档/erp_laozhang.sql | UTF-8 | 21,229 | 3.265625 | 3 | [
"MIT"
] | permissive | /*
Navicat MySQL Data Transfer
Source Server : webosapp_db
Source Server Version : 50722
Source Host : localhost:3306
Source Database : erp_laozhang
Target Server Type : MYSQL
Target Server Version : 50722
File Encoding : 65001
Date: 2019-01-14 17:02:15
*/
SET FOREIGN_KEY_CHECKS=0... | true |
f453a78daaf51b83214e811074e7497bd798b697 | SQL | vijaydairyf/jeff-farm | /jeff-farm-ws/src/main/sql/functions/read-list/read_hive_inspections.sql | UTF-8 | 587 | 2.828125 | 3 | [
"MIT"
] | permissive | CREATE OR REPLACE FUNCTION read_hive_inspections(IN hive_id INT)
RETURNS SETOF hive_inspections
AS
$body$
SELECT
hi.id
, hi.hive_id
, hi.queen_seen
, hi.eggs_seen
, hi.laying_pattern_stars
, hi.temperament_stars
, hi.queen_cells
, hi.supersedure_cells
, hi.swarm_cells
, hi.comb_building_stars
, h... | true |
66cd550697439612d9ae4ffd5b7532c4297de920 | SQL | StringLiu2/java-las-notas-and-code | /day3/homework.sql | UTF-8 | 1,900 | 3.828125 | 4 | [] | no_license | 视图:
1.创建视图,查询学号为1的学生的姓名,课程名称,成绩
CREATE VIEW v_stu
AS
SELECT studentname ,co.courseno,score FROM course co,scores sc,studentinfo st WHERE co.courseno = sc.courseno AND sc.studentno = st.studentno AND st.studentno LIKE '_______1';
SELECT * FROM v_stu;
2.查询上述视图,输出该学生的姓名,总成绩与平均成绩
SELECT studentname,SUM(score),AV... | true |
6c77820422abb08f61361a56f2f05ebe37cd3d83 | SQL | ksokol/myreader | /myreader-backend/src/main/resources/db/migration/V2__Add_user_feed_tag_table.sql | UTF-8 | 1,368 | 3.890625 | 4 | [
"Apache-2.0"
] | permissive | create table user_feed_tag (
user_feed_tag_id bigint generated by default as identity (start with 1),
user_feed_tag_name varchar(255) not null,
user_feed_tag_color varchar(255),
user_feed_tag_created_at timestamp,
user_feed_tag_user_id bigint not null,
primary key (user_feed_tag_id)
);
alter table user_fee... | true |
abc868dbb7c48c7b05b7aa9074a5e990812dbd17 | SQL | jwatte/mwreg | /MySQL-schema.sql | UTF-8 | 5,127 | 3.859375 | 4 | [
"MIT"
] | permissive | /*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
DROP TABLE IF EXISTS `events`;
CREATE TABLE `events` (
`eventid` int(10) unsigned NOT NULL AUTO_INCREMENT,
`name` varchar(255) DEFAULT NULL,
`location` varchar(255) DEFAULT NULL,
`starttime` datetime DEF... | true |
88e32484fa91bb7ed2226153bc7ed132cff4d60e | SQL | pymass/Multicampus_AI | /2. 유창희 강사님/SQL/sql_sol/10_cust_rcpt_sol.sql | UTF-8 | 2,951 | 2.953125 | 3 | [] | no_license | CREATE TABLE RCPT_ACCT
(
SSN CHAR(13) NOT NULL,
ACCT_NO CHAR(10) PRIMARY KEY NOT NULL,
NEW_DT DATE,
CNCL_DT DATE,
RCPT_AMT DECIMAL(15,0)
);
INSERT INTO RCPT_ACCT VALUES ('5707121111000', '578221', '2012-03-26', , 500000);
INSERT INTO RCPT_ACCT VALUES ('7706302222111', '687322', '2011-12-22', ‘2013-12-01... | true |
f721680fc016de92af399d57785005916255d963 | SQL | MatrixOfDeath/CW_TP_Gamenote_BOUBRIT_Karim | /Dump_SQL_GameNote/gamenote_routines.sql | UTF-8 | 8,411 | 2.90625 | 3 | [] | no_license | CREATE DATABASE IF NOT EXISTS `gamenote` /*!40100 DEFAULT CHARACTER SET utf8 */;
USE `gamenote`;
-- MySQL dump 10.13 Distrib 5.5.53, for debian-linux-gnu (x86_64)
--
-- Host: 127.0.0.1 Database: gamenote
-- ------------------------------------------------------
-- Server version 5.5.53-0ubuntu0.14.04.1
/*!40101 S... | true |
1e6e6b2766a400cd5767f3bfe9f8e1b812e357db | SQL | GabrielUlici/ProfilingHelper | /src/src/SQL/propReadWritten.sql | UTF-8 | 627 | 4.03125 | 4 | [] | no_license | -- This query shows the required time of a property beeing read/written
-- To order uncomment the last line, change the word table with the table(s) name separated by comma and then choose ascending or descending
select ThreadTimestamp, EventType, EventSubject,
(ThreadTimestamp-(select ThreadTimestamp from profiling ... | true |
fb4a32efe8efd8a5c36cbb26b67e7fcad1d2b18c | SQL | chase-ramsey/sql-chinook | /exercises/sales_agent_invoices.sql | UTF-8 | 336 | 3.671875 | 4 | [] | no_license | -- Provide a query that shows the invoices associated with each sales agent. The resultant table should include the Sales Agent's full name.
SELECT
e.FirstName || ' ' || e.LastName as FullName,
i.*
FROM Invoice i, Employee e, Customer c
WHERE c.CustomerId = i.CustomerId
AND c.SupportRepId = e.EmployeeId
AND e.Titl... | true |
196a8c0f0b6859196def8e7b97a7cac42ac1a56d | SQL | rrighetti/cscripts | /sql/top_memory.sql | UTF-8 | 468 | 3.78125 | 4 | [] | no_license | SET PAGES 100 LIN 300;
COL sql_text FOR A100;
BREAK ON REPORT;
COMPUTE SUM lABEL 'TOTAL' OF sharable_mem_mb cursors ON REPORT;
SELECT * FROM (
SELECT ROUND(SUM(sharable_mem)/POWER(2,20)) sharable_mem_mb,
--con_id,
sql_id,
COUNT(*) cursors,
sql_text
FROM v$sql
GROUP BY
--con_id,
... | true |
b42fe7b66d034a42e850d3a4f968804f58222f1d | SQL | sbaltinsoy/SQL-LEARNING | /DistinctOrderBy.sql | UTF-8 | 532 | 3.4375 | 3 | [] | no_license | -- Hangi Musterilere satis yaptigimizi gosteren sorgu
-- (Tekrarlayan verileri gostermez)
select distinct MusteriID, PersonelID from Satislar
-- Urunler Tablosundaki Verileri BirimFiyatina gore siralama
Select * from Urunler order by BirimFiyati asc
-- tersten siralar
Select * from Urunler order by BirimFiyati desc
-... | true |
1fe7601a6d1bfd75b1137d944bca1d416a428eda | SQL | dhydrated/pay-up | /conf/evolutions/default/23.sql | UTF-8 | 363 | 2.578125 | 3 | [] | no_license | # --- !Ups
create table credentials_backup as table credentials;
delete from credentials where id not in (select credential_id from users u join credentials c on u.credential_id = c.id);
update credentials set password = md5(password);
# --- !Downs
drop table credentials;
create table credentials as table credential... | true |
e86b894cb2566a1df15fc8ac58e9295ee18c1e0c | SQL | bearcat2/privilege_manager | /src/main/resources/sql/table.sql | UTF-8 | 3,441 | 3.390625 | 3 | [] | no_license | /*
SQLyog Ultimate v13.1.1 (64 bit)
MySQL - 5.7.24-log : Database - db_privilege
*********************************************************************
*/
/*!40101 SET NAMES utf8 */;
/*!40101 SET SQL_MODE=''*/;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@... | true |
ecd1b63342a85c78f2ba244f1a1baeb2053b03cd | SQL | DumeGeorgiana/SGBD | /Code/index2.sql | UTF-8 | 682 | 2.765625 | 3 | [] | no_license | CREATE UNIQUE NONCLUSTERED INDEX UNI_TerminationReason ON
HumanResources.TerminationReason (TerminationReason)
INSERT HumanResources.TerminationReason
(DepartmentID, TerminationReason)
VALUES (1, 'Bad Engineering Skills')
INSERT HumanResources.TerminationReason
(DepartmentID, TerminationReason)
VALUES (2, 'Breaks Expe... | true |
013fcb6777f75c68695bbd79ffb6e29b2f37a6b0 | SQL | allwaysoft/Oracle-1 | /Database performance tuning/Scripts/Capitulo6/13_Criando_indices_globais_locais.sql | UTF-8 | 249 | 2.515625 | 3 | [] | no_license | drop index soe.ORD_ORDER_DATE_IX;
-- crie um indice local
CREATE INDEX soe.ORD_ORDER_DATE_IX on "SOE"."ORDERS"("ORDER_DATE") local;
-- crie um indice global
CREATE INDEX soe.ORD_ORDER_DATE_IX on "SOE"."ORDERS"("ORDER_DATE") global; | true |
9e8615875a3a9d60bf207bf4e9651334b0d60ac7 | SQL | ranggatw/belajar-postgreSQL | /09-Practice01-Time/.HINT/quis-1/soal7.sql | UTF-8 | 205 | 2.515625 | 3 | [] | no_license | SELECT
concat(first_name, ' ', last_name) AS nama_lengkap,
job_id AS kode_jabatan,
salary * 12 AS gaji_setahun
FROM employees
WHERE manager_id = 100 | true |
784c7e7d8dde296283f417fd379c02f347c34e19 | SQL | cromulencellc/chess-aces | /phase_2/eval/iroquois/priv/messages.sql | UTF-8 | 224 | 3.328125 | 3 | [
"LicenseRef-scancode-unknown-license-reference",
"MIT"
] | permissive | CREATE TABLE messages (
id integer primary key,
topic_id integer REFERENCES topics (id) NOT NULL,
content text,
created_at datetime DEFAULT CURRENT_TIMESTAMP
);
CREATE INDEX messages_topic_id ON messages(topic_id); | true |
4bc64161b3e6c37746b4c7f1b71824d47b5ca26a | SQL | sgutierrez-19/orange | /orangeserver/src/main/resources/schema.sql | UTF-8 | 6,492 | 3.875 | 4 | [] | no_license | drop schema if exists something cascade;
CREATE SCHEMA something;
CREATE TABLE something.households(
household_id SERIAL PRIMARY KEY,
expected_move_in DATE NULL,
expected_move_out DATE NULL,
move_in DATE NULL,
move_out DATE NULL,
is_prospect BOOLEAN DEFAULT 0,
is_future BOOLEAN DEFAULT 0,
is_current BOOLEAN D... | true |
c4e630344b86efab23ef105731824792022eaa7b | SQL | alam366sa/SMSApp | /Docs/sms.sql | UTF-8 | 16,695 | 3.390625 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.2.11
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Dec 09, 2014 at 02:56 PM
-- Server version: 5.6.21
-- PHP Version: 5.6.3
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
... | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.