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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
234bae70fcc8b9e4740d7ae06c744fe2b8b3ff17 | SQL | djismael/srm-api | /src/main/resources/db/migration/V01__criar_tabela_cliente.sql | UTF-8 | 608 | 2.828125 | 3 | [] | no_license | CREATE TABLE cliente (
codigo BIGINT(20) PRIMARY KEY AUTO_INCREMENT,
nome VARCHAR (50) NOT NULL,
limite_credito DECIMAL (10,2) NOT NULL,
risco VARCHAR (1)
)ENGINE=InnoDB DEFAULT CHARSET=utf8;
INSERT INTO cliente (nome, limite_credito, risco) VALUES ('José Raimundo', 105000, 'A');
INSERT INTO cliente (nome, li... | true |
ecba43728a5116d126c07241695bb67befca03f1 | SQL | conwqi1/DailyCodeAppAcademy | /w3d1/sql_zoo/9_Self_JOIN.sql | UTF-8 | 1,626 | 4.375 | 4 | [
"MIT"
] | permissive | # 1
SELECT
COUNT(*)
FROM
stops
# 2
SELECT
id
FROM
stops
WHERE
name='Craiglockhart'
-- 3
-- 4
SELECT
company, num, COUNT(*)
FROM
route
WHERE
stop=149 OR stop=53
GROUP BY
company, num
HAVING
COUNT(*)=2
-- 5
SELECT
a.company, a.num, a.stop, b.stop
FROM
route a
JOIN
route b
ON... | true |
8d270bfc0125ba4c218a4e8793c62f211f54d9e2 | SQL | interchange/Flowers | /schema/pgsql.sql | UTF-8 | 44,685 | 3.28125 | 3 | [] | no_license | --
-- PostgreSQL database dump
--
SET statement_timeout = 0;
SET client_encoding = 'UTF8';
SET standard_conforming_strings = off;
SET check_function_bodies = false;
SET client_min_messages = warning;
SET escape_string_warning = off;
SET search_path = public, pg_catalog;
SET default_with_oids = false;
--
-- Name: ad... | true |
87eee2d656dc36d5d3178a52d7446f951c5325e0 | SQL | carinadidomenico/ADS | /banco de dados/Aula 9/ex1-aula9.sql | UTF-8 | 1,752 | 4.125 | 4 | [] | no_license | create database Projeto;
use Projeto;
-- Criar tabela projeto
create table Projeto (
idProjeto int primary key,
nome varchar(40),
descProjeto varchar(50)
);
-- Criar tabela Aluno com chave estrangeira fkProjeto e fkRepresentante
-- fkRepresentante como relacionamento recursivo(autorelacionamento)
create tabl... | true |
229d9938bd6b9acbf9b05f757f5a2e49e1a0ff97 | SQL | ivanfretes/bd2-fpuna-solucionario | /ejercitario-04/04.sql | UTF-8 | 937 | 3.8125 | 4 | [] | no_license | /*
Ejercitario 4
El Señor Ricardo Meza pasa a tener la misma posición y área que la Señora Amanda Pérez. Realice el cambio en 2 sentencias:
- ACTUALICE la fecha de fin a la actual posición de Ricardo Meza
- INSERTE una nueva posición para el señor Ricardo Meza, con la categoría y área de la Señora Amanda... | true |
caec3886bba916511f6558195f1e8f981753305b | SQL | elsamuelisrael/maestria_cmpcliser | /sql/dump-unir-202107282351.sql | UTF-8 | 2,171 | 2.671875 | 3 | [] | no_license | -- MySQL dump 10.13 Distrib 8.0.0-dmr, for osx10.11 (x86_64)
--
-- Host: localhost Database: unir
-- ------------------------------------------------------
-- Server version 8.0.0-dmr
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS *... | true |
e5ce89a155c1645c889a1e1dd744e82661a9a3bb | SQL | 2733284198/gf-demos | /document/sql/create.sql | UTF-8 | 443 | 2.859375 | 3 | [
"MIT"
] | permissive | CREATE TABLE `user` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '用户ID',
`passport` varchar(45) NOT NULL COMMENT '用户账号',
`password` varchar(45) NOT NULL COMMENT '用户密码',
`nickname` varchar(45) NOT NULL COMMENT '用户昵称',
`create_at` datetime DEFAULT NULL COMMENT '创建时间',
`update_at` datetime DEFAULT N... | true |
1013b24a833abd9d1a5d57a19b1366b61ccd4194 | SQL | nujcharee/YAHUAS | /inspection.sql | UTF-8 | 1,660 | 3.328125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 5.1.0
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Generation Time: Jul 19, 2021 at 09:38 PM
-- Server version: 10.4.19-MariaDB
-- PHP Version: 8.0.6
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIEN... | true |
3d4ebbeeedc47dbf66c4d20748002353d29d6dc6 | SQL | JspDarker/cin-lampart | /Lab/Lab06/bai02/bai2.sql | UTF-8 | 1,093 | 2.765625 | 3 | [
"MIT"
] | permissive | start transaction;
delete from fs_product where product_id = 1;
delete from fs_product_img where product_id = 1;
delete from fs_order_detail where product_id = 1;
commit;
-- cau 2:
start transaction;
delete fs_product_img
from fs_product_img
join fs_product on fs_product_img.product_id = fs_product.id... | true |
0baa88c23d4732e4c7aaaca1fd5652228f322807 | SQL | bellmit/dbSmellsData | /data/open-source/extracted_sql/chrismccord_sync.sql | UTF-8 | 324 | 2.71875 | 3 | [
"MIT"
] | permissive | CREATE TABLE projects (id INTEGER PRIMARY KEY, name TEXT)
CREATE TABLE todos (id INTEGER PRIMARY KEY, name TEXT, complete BOOLEAN, user_id INTEGER)
CREATE TABLE users (id INTEGER PRIMARY KEY, name TEXT, cool BOOLEAN, group_id INTEGER, project_id INTEGER, age INTEGER)
CREATE TABLE groups (id INTEGER PRIMARY KEY, name TE... | true |
fc179cdcd1a496d1e6a8971b6dfa74bb73439914 | SQL | davecollett/smes_to_postgres | /Database-Server/scn_varying_tables.sql | UTF-8 | 14,585 | 3.109375 | 3 | [] | no_license | CREATE TABLE scn.mark_description
(
MARK_ID NUMERIC(15, 0) NOT NULL
, STATUS CHAR(2)
, BLOCK_NO CHAR(5)
, LAST_SURVEYOR VARCHAR(30)
, USED_DATE DATE
, BEACON CHAR(1)
, MAP_NUMBER CHAR(8)
, SC_MAP CHAR(6)
, TRIG CHAR(1)
, PLAN_REF VARCHAR(500)
, DATE_AMG_AVAIL DATE
, DATE_MGA_AVAIL DATE
, CON... | true |
1b543b99989135c5a6fa6801a1a1b0437f65f86b | SQL | StanislavGalkin/-Coursework-SQL-Database-Shop | /View_status_error_check.sql | WINDOWS-1251 | 829 | 3.765625 | 4 | [] | no_license | use products;
-- Checking status errors with order status "waiting pay"
create view status_error_check
as
select c.firstname as '',
c.lastname as '',
c.phone as '',
a.order_id as ' ',
a.customer_id as 'ID ',
a.status as ' ',
a.updated_at as ' ',
o.sta... | true |
a3fa05d86c64fe7d2c9049786f2f3607cdd77ce1 | SQL | yeastrc/limelight-core | /database_scripts/install/003_insert_initial_data.sql | UTF-8 | 7,620 | 3.234375 | 3 | [
"Apache-2.0"
] | permissive |
USE limelight ;
-- INSERT INITIAL VALUES USED BY WEBAPP TO HANDLE PERMISSIONS, Must match Java class AuthAccessLevelConstants
INSERT INTO user_access_level_label_description_tbl (user_access_level_numeric_value, label, description)
VALUES ( 0, 'admin', 'application wide, admin' );
INSERT INTO user_access_leve... | true |
d4640f6834321be523cd83e04b0ad9889afd9639 | SQL | rachelseaborn/gutwisdom | /db/seed.sql | UTF-8 | 3,024 | 3.65625 | 4 | [] | no_license | create table subscribed_user (
user_id serial primary key,
username varchar(25) not null,
email varchar(150) not null,
password varchar(250) not null,
profile_picture text
)
create table mentor (
mentor_id serial primary key,
firstname varchar(30) not null,
lastname varchar(50) not null... | true |
cd568373a9e2a22d4dbcf6b504ced8b018546a0c | SQL | OIDC2020-watermelon/BackEnd | /show/src/main/resources/schema.sql | UTF-8 | 6,777 | 3.703125 | 4 | [] | no_license | drop table if exists artist cascade;
drop table if exists batch_job_execution cascade;
drop table if exists batch_job_execution_context cascade;
drop table if exists batch_job_execution_params cascade;
drop table if exists batch_job_instance cascade;
drop table if exists batch_step_execution cascade;
drop table if exis... | true |
2b0798627a4289714b1098213f2aa09bd719ed30 | SQL | molok/vorax4 | /vorax/sql/omni_columns.sql | UTF-8 | 809 | 3.625 | 4 | [
"MIT"
] | permissive | -- OMNI COLUMNS FETCHER
--
-- This script is used to fetch columns matching the provided prefix when
-- the Vorax omni-completion requests it.
-- The following completion types must be addressed:
-- *) columns for a table
-- *) columns for a view
--
-- You may change the query below, but it is important to keep t... | true |
ad016ce098c2daf9695a5561ad540b43fbdf4835 | SQL | AnJian2020/mysql_study | /第12章 汇总数据/聚集数据--SUM()函数.sql | UTF-8 | 182 | 2.921875 | 3 | [] | no_license | SELECT
sum( quantity ) AS items_ordered
FROM
orderitems
WHERE
order_num = 20005;
SELECT
sum( item_price * quantity ) AS total_price
FROM
orderitems
WHERE
order_num = 20005; | true |
139447e316b48ed44649a4e092ab4176f4a92467 | SQL | lidewij23/supermercado | /supermercado.sql | UTF-8 | 13,982 | 3 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 5.0.1
-- https://www.phpmyadmin.net/
--
-- Servidor: 127.0.0.1
-- Tiempo de generación: 24-07-2020 a las 02:44:55
-- Versión del servidor: 10.4.11-MariaDB
-- Versión de PHP: 7.4.3
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
... | true |
a6bc158a5649011a0b38ff7db69eacb8399ed2b4 | SQL | natcalderon/e-tracker | /db/seeds.sql | UTF-8 | 446 | 2.703125 | 3 | [] | no_license | USE employee_tracker;
INSERT INTO department (department_name)
VALUES
('design'),
('development'),
('marketing');
INSERT INTO role (title, salary, department_id)
VALUES
('editor', 50000, 1),
('front-end', 50000, 2),
('writer', 50000, 3);
INSERT INTO employee (first_name, last_name, role_id,... | true |
17b78474c0bed91a52340d41ff951a20e7b4ee1a | SQL | pradippatil01/OraclePracticeProblems | /view.sql | UTF-8 | 239 | 3.015625 | 3 | [] | no_license | use practice;
select * from employee;
create view v_employee as
select id,salary from employee where salary>20000;
select * from v_employee;
drop view v_employee;
create or replace view v_employee as
select ename, salary from employee; | true |
4c5e526b041a765c74b54898d48dced32b61293e | SQL | MarcoGrisanti/SpaceInvaders | /DB Initialization.sql | UTF-8 | 7,880 | 2.875 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.5.1
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Creato il: Feb 23, 2017 alle 12:53
-- Versione del Server: 10.1.16-MariaDB
-- Versione PHP: 5.6.24
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLI... | true |
67a0a7d6b3a96085695723f1dc67a173d70266c2 | SQL | bravesoftdz/shsmeta | /Sources/SQL/SQL2/Z1.sql | WINDOWS-1251 | 1,732 | 3.265625 | 3 | [] | no_license |
/*data_estimate*/
select 'data_estimate -> ZP' as O1,
SUM(zp) as C1,
'data_estimate -> ZP_MASH' as O2,
SUM(ZP_MASH) as C2,
'data_estimate -> EMiM' as O3,
SUM(EMiM) as C3,
'data_estimate -> MR' as O4,
SUM(MR) as C4,
'data_estimat... | true |
03d6ade0249e3a8add9ae92766691f0ae5e45e44 | SQL | zsun005/MovieHub | /hw3-service-movies-revised-zsun005/sql/searchMovie.sql | UTF-8 | 1,250 | 4.21875 | 4 | [] | no_license | DELIMITER $$
CREATE PROCEDURE search_movie(movieid VARCHAR(10))
BEGIN
SELECT m.id, m.title, m.director, m.year, m.backdrop_path, m.overview, m.poster_path, m.revenue, m.hidden ,r.rating, r.numVotes,
GROUP_CONCAT(DISTINCT gm.genre SEPARATOR ',') AS genres,
GROUP_CONCAT(DISTINCT sm.star SEPARATOR ',') AS s... | true |
01967bc1e07dd3803dcf62873eea08f42e4ab684 | SQL | OlafMd/MedCon1.0 | /mmdocconnect-core/MMDocConnectDBMethods/MainData/Atomic/Retrieval/SQL/cls_Get_Drugs_for_SearchCriteria.sql | UTF-8 | 777 | 3.640625 | 4 | [] | no_license |
Select Distinct
cmn_pro_products_de.Content As DrugName,
hec_products.HEC_ProductID As DrugID,
cmn_pro_products.Product_Number As DrugPZN
From
hec_products
Inner Join cmn_pro_products On hec_products.Ext_PRO_Product_RefID =
cmn_pro_products.CMN_PRO_ProductID And cmn_pro_pr... | true |
e9d3fae011390ca86be5fe24b4136d4f43033ebd | SQL | huwolai/git20180416 | /食神到.数据库/paypai.sql | UTF-8 | 12,254 | 3.328125 | 3 | [] | no_license | -- MySQL dump 10.13 Distrib 5.6.17, for Win32 (x86)
--
-- Host: localhost Database: sampledb
-- ------------------------------------------------------
-- Server version 5.6.24
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40... | true |
9b33805a3cc17d62d7b3ad79a6177c97c791a1b0 | SQL | lucasdutraf/banco-de-dados-2019.1 | /ativ-praticas/aula4exer6Evolução2_LucasDutra_170050939/aula4exer6Evolucao3_Popula_LucasDutra-170050939.sql | UTF-8 | 2,125 | 3.109375 | 3 | [] | no_license | INSERT INTO PROPRIETARIO (cpf, nome, logradouro, numero, complemento, bairro, cidade, uf, cep, sexo, dtNascimento)
VALUES(123456789, 'jose', 'logradouro', 10, 'casa 8', 'aguas', 'df', 'c', 7778889, 'M', '1990-02-05');
INSERT INTO telefone (cpf, telefone) VALUES (123456789, 777788889);
INSERT INTO MODELO (nomeModelo, ... | true |
1c831c4199b286d659e190750fd4c24656811ad1 | SQL | Miltios/swtor-charplanner | /etc/dbScripts/CreateTableSetBonuses.sql | UTF-8 | 630 | 2.625 | 3 | [] | no_license | CREATE TABLE swtor.SetBonuses (
SetId VARCHAR(32) NOT NULL PRIMARY KEY,
SetName VARCHAR(128),
SetClass VARCHAR(32),
Bonus2Stat VARCHAR(32),
Bonus2Value DOUBLE(5,3),
Bonus2Desc VARCHAR(1024),
Bonus4Stat VARCHAR(32),
Bonus4Value DOUBLE(5,3),
Bonus4Desc VARCHAR(1024),
Bonus6Stat VAR... | true |
484793e3d27536a0222b147205d82bc2c7bab265 | SQL | XccelerateTech/brianChan | /32-sql/AB.sql | UTF-8 | 1,281 | 4.0625 | 4 | [] | no_license | CREATE TABLE citrus (
id SERIAL primary key,
name VARCHAR(255) not null,
color VARCHAR(255),
taste VARCHAR(255)
);
INSERT INTO citrus (name, color, taste) VALUES ('lemon', 'yellow', 'sour');
INSERT INTO citrus (name, color, taste) VALUES ('orange', 'orange', 'juicy');
INSERT INTO citrus (name,... | true |
6d82b6ed7302307cdd7de6ecfeddc549115ce67d | SQL | ronny1020/SQL-create-database | /coffee website.sql | UTF-8 | 8,595 | 2.984375 | 3 | [] | no_license | CREATE DATABASE `coffee_company` ;
use `coffee_company` ;
CREATE TABLE `coffee_company`.`companies` (
`company id` INT NOT NULL AUTO_INCREMENT,
`company name` VARCHAR(45) NOT NULL UNIQUE,
`company phone` INT NULL,
`company address` VARCHAR(45) NULL,
`company email` VARCHAR(45) NULL,
`company contact name`... | true |
4658669474dedcde998907c8840d8a763e28c71f | SQL | innavicate/BAZY_DANYCH | /create_tables.sql | UTF-8 | 1,895 | 3.40625 | 3 | [] | no_license | CREATE TABLE Ulica (
id_ulica NUMBER CONSTRAINT ulica_pk PRIMARY KEY,
nazwa VARCHAR(45) NOT NULL,
numer NUMBER NOT NULL);
CREATE TABLE Miasto(
id_miasto NUMBER CONSTRAINT miasto_pk PRIMARY KEY,
id_ulica NUMBER CONSTRAINT miasto_ulica_fk REFERENCES Ulica(id_ulica),
nazwa VARCHAR(35)
);
CREATE TABLE Wlasciciel(
id_wlas... | true |
a5bf62c30ace032339ad239884b80bfc077140ed | SQL | nuke2015/nuke2015.github.io | /php/mysql/子查询与临时表/group_fail.sql | UTF-8 | 4,840 | 3.328125 | 3 | [] | no_license |
-- Adminer 4.2.5 MySQL dump
SET NAMES utf8;
SET time_zone = '+00:00';
SET foreign_key_checks = 0;
SET sql_mode = 'NO_AUTO_VALUE_ON_ZERO';
DROP TABLE IF EXISTS `bestphp_order`;
CREATE TABLE `bestphp_order` (
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键id',
`serial_no` varchar(50) NOT NULL COMMENT '订单编号',
... | true |
7a70e88167090f15c949ebcefcda67d371dcab52 | SQL | Anggasayogo/cutiApp-uts-UMB-2020 | /koneksi/test.sql | UTF-8 | 4,109 | 3.15625 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Waktu pembuatan: 12 Des 2020 pada 08.01
-- Versi server: 10.4.11-MariaDB
-- Versi PHP: 7.4.5
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CH... | true |
ab6992cbd0b3264cb78afe9832f529c0b7d89017 | SQL | ayeV/sql-server-samples | /TutorialSql/Clase41.sql | ISO-8859-1 | 4,185 | 3.84375 | 4 | [
"MIT"
] | permissive | --48 - Combinaciones cruzadas (cross join)
drop table if exists comidas;
drop table if exists postres;
create table comidas(
codigo int identity,
nombre varchar(30),
precio decimal(4,2),
primary key(codigo)
);
create table postres(
codigo int identity,
nombre varchar(30),
precio decim... | true |
885548ce61656e2e148628a295215a2cd9f12de2 | SQL | sixj0/dispatcher | /doc/db/dispatcher.sql | UTF-8 | 1,097 | 2.890625 | 3 | [] | no_license | CREATE TABLE `dispatcher` (
`code` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '编号',
`description` varchar(255) DEFAULT NULL COMMENT '描述',
`request_method` varchar(255) NOT NULL COMMENT '请求方式',
`request_url` varchar(255) NOT NULL COMMENT '请求地址',
`request_headers` varchar(255) DEFAULT NULL COMMENT '其他系统所需... | true |
53f115c7ea90cf6a6093ce248ff58ba823d56530 | SQL | SoliareofAstora/studia1920 | /bazy/dvd_rental/zajecia1.sql | UTF-8 | 1,445 | 3.640625 | 4 | [] | no_license | create table Person(
PersonID int primary key ,
LastName varchar(50),
FirstName varchar(50),
HireDate date,
EnrollmentDate date
);
create table Department(
DepartmentID int primary key ,
Name varchar(50),
Budget int,
StartDate date,
Administrator varchar(50)
);
create table Course(
C... | true |
b66cd280f1a577cd9201937afcd871909bf192fc | SQL | cndreisbach/hmda-patterns | /sql/create_hmda_agg_table.sql | UTF-8 | 1,291 | 3.328125 | 3 | [
"Apache-2.0"
] | permissive | -- quick stab at a view to do some common aggregations. Obviously this is just a starting point
DROP TABLE IF EXISTS v_hmda_agg_1;
with raw as (
select msa_md, state_code, county_code, applicant_race_1, year, applicant_ethnicity
, loan_purpose
, case when loan_type != 1 then 1 else 0 end as is_gov_backed
, cas... | true |
50ff139cf9dccf2434dc961c268bf9a7ae59123a | SQL | whiscard/SQL-Queries | /complete/audit_data_subqueries/DischargeDiagnosis.sql | UTF-8 | 561 | 3.78125 | 4 | [
"Apache-2.0"
] | permissive | SELECT
group_concat(concat_ws(', ', cname.name, obs.value_text) SEPARATOR ', ') as DischargeDiagnosis,
v.visit_id
FROM obs obs
INNER JOIN encounter enc on obs.encounter_id = enc.encounter_id
INNER JOIN visit v on enc.visit_id = v.visit_id
LEFT OUTER JOIN concept_name cname ON obs.value_coded = cname.concep... | true |
8758acb221b25b3da943f9d8a64a3cb18ca81ae8 | SQL | rododendron1001/Lab_22 | /SQLQuery5-Department without Company.sql | UTF-8 | 353 | 3.703125 | 4 | [] | no_license | --- varianta I
select dn.DepartmentName, d.CompanyId
from DepartmentNames dn
left join Department d
on dn.DepartmentName=d.DepartmentName
where d.CompanyId is NULL
;
--- varianta II
select DepartmentName
from DepartmentNAmes
where DepartmentName not in
(
select distinct DepartmentName
from DEpartment... | true |
453ec24b8bb0412a7aab2fb797e54f0080b7ed1a | SQL | eTcilopp/sql_profi4u | /profi4u.sql | UTF-8 | 5,936 | 4.03125 | 4 | [] | no_license |
DROP DATABASE IF EXISTS profi4u;
CREATE DATABASE profi4u;
USE profi4u;
DROP TABLE IF EXISTS hometowns;
CREATE TABLE hometowns (
id SERIAL PRIMARY KEY,
hometown VARCHAR (250) UNIQUE
);
DROP TABLE IF EXISTS statuses;
CREATE TABLE statuses(
id BIGINT UNSIGNED NOT NULL UNIQUE PRIMARY KEY,
status VARCHA... | true |
fc0a5b4de32a0c119504ec301d164ad30181aaed | SQL | muhammadzaini0190/dataobat | /dataobat.sql | UTF-8 | 4,323 | 3.125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.7.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Jan 29, 2018 at 02:58 PM
-- Server version: 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... | true |
a907500e55aae7e47443c22e1df5419b0d872316 | SQL | AraProject-2005uifub/ara | /db/new_db.sql | UTF-8 | 9,363 | 3.25 | 3 | [] | no_license | CREATE TABLE "best_paper_awards" (
"id" INTEGER NOT NULL,
"report_id" INTEGER NOT NULL,
"author" TEXT NOT NULL,
"article_title" TEXT NOT NULL,
"wording" TEXT NOT NULL,
"awarding_organization" TEXT NOT NULL,
"a_date" TEXT NOT NULL,
PRIMARY KEY ("id") ,
CONSTRAINT "fk_best_paper_awards_reports_... | true |
39832a21469b64fbd44916bac79381f24c77bd5c | SQL | DimolSPA/Dimol-Fix-Carteras | /Dimol.Carteras/Dimol.Carteras.Database/dbo/Stored Procedures/Procs2/Trae_Tipos_Cpbt_Perfil.sql | UTF-8 | 5,036 | 3.015625 | 3 | [] | no_license |
Create Procedure Trae_Tipos_Cpbt_Perfil(@tpc_codemp integer, @pfc_prfid integer, @clb_tipcpbtdoc char(1), @tci_idid integer) as
SELECT tipos_cpbtdoc.tpc_tpcid,
tipos_cpbtdoc_idiomas.tci_nombre
FROM tipos_cpbtdoc,
tipos_cpbtdoc_idiomas,
clasificacion_cpbtdoc
WHERE ( tipo... | true |
377219874a42fdac08998594bd843139558c9914 | SQL | Cefigueredo/SQL-Project | /Proyecto/Iteracion 3/RFC10.sql | ISO-8859-3 | 3,371 | 3.578125 | 4 | [] | no_license | --@INFORMACIN DE LAS PERSONAS VACUNADAS EN UN RANGO DE FECHAS
--@Administrador del Plan de Vacunacin-----------------------------------------------------------------------------------------------------
--@Ordenado por nombre de ciudadano
SELECT ciudadanos.nombre, ciudadanos.documento, ciudadanos.fechanacimiento, ciuda... | true |
a122e01ef6573d68b0a86db4044414024736b381 | SQL | ujnak/apexapps | /exports/ORDS_REST_WKSP_APEXDEV_rteditor_2023_07_04_2.sql | UTF-8 | 4,197 | 3.03125 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference",
"BSD-3-Clause"
] | permissive |
-- Generated by ORDS REST Data Services 23.1.4.r1501808
-- Schema: WKSP_APEXDEV Date: 火 7月 04 09:12:12 2023
--
DECLARE
l_roles OWA.VC_ARR;
l_modules OWA.VC_ARR;
l_patterns OWA.VC_ARR;
BEGIN
ORDS.ENABLE_SCHEMA(
p_enabled => TRUE,
p_schema => 'WKSP_APEXDEV',
... | true |
e778d42edbeb32b1dd841f1ed7b4a05b7781a09e | SQL | fandashtic/arc_chennai | /Sivabalan-SQL/SQL_STORED_PROCEDURE/sp_Can_CancelPayment.sql | UTF-8 | 1,059 | 3.5625 | 4 | [] | no_license | CREATE Procedure sp_Can_CancelPayment(@PaymentID Int)
As
--Restrict implicit payments that were done during bill
If Exists(Select * From BillAbstract Where PaymentID = @PaymentID)
Begin
Select 0
End
--This check is to verify whether the current selected paymentid has
--been already adjusted in any other payment transa... | true |
0a1b7ad82c35ee72cb3fa5eb56a08ace0d0e34c7 | SQL | silence-do-good/stress-test-Postgres-and-MySQL | /dump/high/day23/select0337.sql | UTF-8 | 178 | 2.640625 | 3 | [] | no_license |
SELECT timeStamp, temperature FROM ThermometerOBSERVATION o
WHERE timestamp>'2017-11-22T03:37:00Z' AND timestamp<'2017-11-23T03:37:00Z' AND temperature>=25 AND temperature<=36
| true |
d6e5ffca4434b667cb446f873eee339913cc1e42 | SQL | nwihardjo/COMP3311 | /Assignment3/Task3DB.sql | UTF-8 | 21,897 | 3.75 | 4 | [] | no_license | /* COMP 3311: Conference Submission Review Management System - Task3DB.sql */
/* Start with a clean database. */
drop table AssignedTo;
drop table Discussion;
drop table PreferenceFor;
drop table RefereeReport;
drop table PCChair;
drop table Author;
drop table Submission;
drop table PCMember;
drop table Person;
/* Cr... | true |
eb80cc6773813b1919be45a0c14af2182531508d | SQL | reckonzzz/CS022 | /sql/create_final.sql | UTF-8 | 1,152 | 3 | 3 | [] | no_license | create table enzyme(
id int(8) primary key auto_increment,
uniqueid varchar(128),
ecnumber varchar(40),
sequence varchar(40),
name varchar(300),
enzyme varchar(64)
);
#enzyme是对的
create table reaction(
id int(8) primary key auto_increment,
uniqueid varchar(128),
formula varchar(512),
... | true |
d2fd431aa86ce9833dfab99e832643f32a147e1a | SQL | warlockza/IBM-Data-Merge-Utility | /idmu-util/src/main/resources/database/IDMU.v3.ORACLE.DDL | UTF-8 | 2,250 | 3.96875 | 4 | [
"Apache-2.0"
] | permissive | CREATE SCHEMA IDMU;
/
/* ----------------------------------------------------- */
/* Table IDMU.TEMPLATE */
/* ----------------------------------------------------- */
/* !!! CHANGES DUE TO ORACLE MIGRATION !!! */
/* VARCHAR(4096) changed to VARCHAR2(4000) to due Oracle Max Size Constr... | true |
b444069d439284609e44b4f53c1712ca61900fb5 | SQL | gangly/sqlpro | /sqlpro/src/main/resources/tasksql/test.sql | UTF-8 | 2,345 | 3.625 | 4 | [] | no_license | set spark.app.name = onlinetest;
--set pbear.task.type = batch;
set df.show.rows = 5;
--hive to hive
--CREATE TEMPORARY TABLE pbear_test FROM hive "" select name, age from test.people2 where age > 7;
--insert into hive "table=test.people3" select name, age from pbear_test;
--select * from pbear_test;
-- hdfs to... | true |
07090dd102ba51255f790c7445915748517fdb99 | SQL | vpesalj/CryptoCurrencyAssignment | /prisma/migrations/20210526220403_/migration.sql | UTF-8 | 538 | 3.8125 | 4 | [
"MIT"
] | permissive | -- AlterTable
ALTER TABLE "Portfolio" ADD COLUMN "date" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP;
-- CreateTable
CREATE TABLE "PortfolioValue" (
"id" SERIAL NOT NULL,
"value" DOUBLE PRECISION NOT NULL,
"portfolioId" INTEGER NOT NULL,
PRIMARY KEY ("id")
);
-- CreateIndex
CREATE UNIQUE INDEX... | true |
b48c2b1bf05feec6e3e24aa2f0737aa236b41279 | SQL | thembones79/cs50x | /pset7/movies/11.sql | UTF-8 | 211 | 3.625 | 4 | [
"MIT"
] | permissive | SELECT title
FROM movies
JOIN stars ON stars.movie_id = movies.id
JOIN people ON people.id = stars.person_id
JOIN ratings ON ratings.movie_id = movies.id
WHERE name = "Chadwick Boseman"
ORDER BY rating DESC
LIMIT 5; | true |
b8ddf9a608eff3ad3d2b65c379afda63c257bf4d | SQL | yadirhb/2let | /app/src/main/resources/import.sql | UTF-8 | 1,089 | 2.828125 | 3 | [
"Apache-2.0"
] | permissive | INSERT INTO roles (id, role) VALUES (1,'ROLE_USER');
INSERT INTO roles (id, role) VALUES (2,'ROLE_ADMIN');
INSERT INTO credentials (username,password,enabled) VALUES ('guest','$2a$10$0.ESlGysrPaiW5HaapKwoehzWt5AibgbPPOvMhDv8D6H26QQ/CwhS', TRUE);
INSERT INTO credentials (username,password,enabled) VALUES ('admin','$2a$... | true |
610a776f17381ddf6bcc5e5708d95e052371de1d | SQL | karmek-k/my-links-be | /prisma/migrations/20210728112454_initial/migration.sql | UTF-8 | 521 | 3.8125 | 4 | [
"MIT"
] | permissive | -- CreateTable
CREATE TABLE "User" (
"id" SERIAL NOT NULL,
"username" TEXT NOT NULL,
"password" TEXT NOT NULL,
PRIMARY KEY ("id")
);
-- CreateTable
CREATE TABLE "Link" (
"id" SERIAL NOT NULL,
"name" TEXT,
"url" TEXT NOT NULL,
"userId" INTEGER NOT NULL,
PRIMARY KEY ("id")
);
-- Cr... | true |
1bcd5c232c3f4ae763c123fc5b9dd95a9cf59083 | SQL | kaloyero/CountryWeb | /sql/tables/telefonos.sql | UTF-8 | 529 | 2.609375 | 3 | [] | no_license | DROP TABLE IF EXISTS `telefonos`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `telefonos` (
`IdTelefono` int(10) unsigned NOT NULL AUTO_INCREMENT,
`CodigoPais` varchar(5) DEFAULT NULL,
`CodigoArea` varchar(5) DEFAULT NULL,
`Prefijo` va... | true |
7254c8dbbc34f184bc3c2d771f48fee0c1abf45c | SQL | aperveyev/booru_processor | /SQL/booru_tables_202105.sql | UTF-8 | 59,622 | 3.078125 | 3 | [] | no_license | prompt PL/SQL Developer Export User Objects for user BOORU@HH19
set define off
spool HH19_booru_tables_202105.log
prompt
prompt Creating table APIC
prompt ===================
prompt
create table APIC
(
id NUMBER,
pid NUMBER,
pubtime DATE,
score NUMBER,
scorn NUMBER,
downl NUMBER,
ero... | true |
80dc407533207906f3c3e9e7e242e13c3cbee42a | SQL | Mkang1204/Neo4j_health_network | /Cypher/load_csv.cql | UTF-8 | 9,860 | 3.515625 | 4 | [] | no_license | --create personnel with their categories
load csv with headers from "file:///PROV_NEW_CAT_X_181119_1430.csv" as csv
with distinct csv.`action_personnel_id_x` as prov_ID, csv.`new_cat1` as cat1, csv.`new_cat2` as cat2
create (p:provider {ID: prov_ID, c1: cat1, c2:cat2})
--create the collaboration relationship ... | true |
e4b60194f7f2d6a2e6ab241fa1e006c51fe7e4d4 | SQL | dibidobi/vizsgamunka | /barkacsbolt.sql | UTF-8 | 10,570 | 3.296875 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.8.5
-- https://www.phpmyadmin.net/
--
-- Gép: 127.0.0.1
-- Létrehozás ideje: 2020. Ápr 16. 10:46
-- Kiszolgáló verziója: 10.1.40-MariaDB
-- PHP verzió: 7.3.5
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_... | true |
9da8a5911ac3259f83c296e61334dbd7e672a7aa | SQL | CUBRID/cubrid-testcases | /sql/_13_issues/_12_1h/cases/bug_bts_6620.sql | UTF-8 | 985 | 3.640625 | 4 | [
"BSD-3-Clause"
] | permissive | drop table if exists t1,t2;
create table t1 (a int primary key) partition by hash(a) partitions 3;
insert into t1 select rownum from db_class limit 44;
create table t2 (a int primary key) partition by hash(a) partitions 3;
insert into t2 select rownum from db_class limit 48;
select * FROM t1 LEFT JOIN t2 ON t1.a=t... | true |
56b17fd20e4cd01e6dca2a3f9874541d26d6eb96 | SQL | ronaldescobarj/restaurants | /src/main/resources/data.sql | UTF-8 | 11,590 | 2.65625 | 3 | [] | no_license | delete from comment;
delete from restaurant_category;
delete from user_like;
delete from restaurant;
delete from category;
delete from user;
delete from city;
insert into Category(id,name) values(1,'Familiar');
insert into Category(id,name) values(2,'Bar');
insert into Category(id,name) values(3,'Buffet');
insert into... | true |
8a479e719bcea55b3887c0697b8d16465b2cccc9 | SQL | cressie176/marv-mssql-driver | /sql/ensure-migrations-tables.sql | UTF-8 | 461 | 3 | 3 | [] | no_license | IF NOT EXISTS (SELECT *
FROM INFORMATION_SCHEMA.TABLES
WHERE TABLE_SCHEMA = 'dbo'
AND TABLE_NAME = 'migrations')
BEGIN
CREATE TABLE migrations (
level INTEGER,
comment TEXT,
"timestamp" datetimeoffset,
checksum TEXT,
namespace varchar(5... | true |
173722be37420bdf54c5da74f1fa1b7a428bf769 | SQL | jxluo/Tiantian | /sitedata/schema.sql | UTF-8 | 3,066 | 3.109375 | 3 | [] | no_license | DROP TABLE IF EXISTS GlobalNameInfo;
DROP TABLE IF EXISTS XingCharInfos;
DROP TABLE IF EXISTS XingInfos;
DROP TABLE IF EXISTS MingCharInfos;
DROP TABLE IF EXISTS MingInfos;
DROP TABLE IF EXISTS XingMingInfos;
DROP TABLE IF EXISTS XingCharRank;
DROP TABLE IF EXISTS XingRank;
DROP TABLE IF EXISTS MingCharRank;
DROP TABLE... | true |
29215d18e52fde3ab04d8495b4f3022bb6914d45 | SQL | AdmiJW/SQL | /Hackerrank/Easy/Weather Observation Station 13.sql | UTF-8 | 218 | 3.4375 | 3 | [] | no_license |
/*
* Find the sum of the latitude, rounded to 4 decimal places
* where the latitude must be between 38.7880 and 137.2345
*/
SELECT ROUND( SUM(LAT_N), 4 ) FROM STATION
WHERE
LAT_N BETWEEN 38.7880 AND 137.2345; | true |
0226c87aa0f050981cc4fed14bb61ec133c7c953 | SQL | darkv314/Sistema-Academico-Proyecto-Base-de-Datos | /base_datos_SA/ProblemasEspecificos/ProblemaEspecifico4.sql | UTF-8 | 403 | 3.28125 | 3 | [
"MIT"
] | permissive | /*• PROBLEMA ESPECÍFICO 4: Dificultad para el acceso a distintos datos puntuales de un alumno en específico como saber que alumnos tienen una deuda mayor a 10000 Bs.*/
select persona.nombre, persona.apellido, persona.CI, estudiante.importe_pagado,estudiante.importe_por_pagar
from persona
inner join estudiante on person... | true |
04d363d952c3e036351c38fb399197a591539478 | SQL | Anthony-ferrari/DiagonAlley__ | /sql/diagonAlley_data_manipulation_queries.sql | UTF-8 | 2,921 | 3.90625 | 4 | [] | no_license | -- These are some Database Manipulation queries for a partially implemented Project Website
-- using the bsg database.
-- Your submission should contain ALL the queries required to implement ALL the
-- functionalities listed in the Project Specs.
-- get a single data for the search form
SELECT * FROM customers WHERE... | true |
eb3258673e64bdd35efe1135b711ca624e7e3b55 | SQL | rekharokkam/t-sql | /Learning SQLForOracle/CreatingTablesAndManipulatingDatabase/Assignment_11.sql | UTF-8 | 1,012 | 3.9375 | 4 | [] | no_license | /*
Use a SQL interactive tool (e.g. Oracle Apex, Toad, etc.) to work out the answers to the following questions.
NOTE: All questions must be answered with a single
SQL statement!
NOTE2: Explicitly specify the column names that
are being affected by the statement!
*/
--Question 1. Code a SQL statement to add "... | true |
577806fe6207bf69c06f4e762442c31ef42900dc | SQL | Nick-L-Ruiz/webhotel | /hotelzone.sql | UTF-8 | 14,438 | 2.78125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.9.2
-- https://www.phpmyadmin.net/
--
-- Servidor: 127.0.0.1
-- Tiempo de generación: 23-10-2020 a las 02:05:15
-- Versión del servidor: 10.4.11-MariaDB
-- Versión de PHP: 7.4.1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
... | true |
bb9f9989c9bebe58a2abd4e684d6c5cc2d4a2335 | SQL | rsunder10/contentuploader | /contentuploader.sql | UTF-8 | 2,362 | 3.1875 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.2.7.1
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Oct 23, 2015 at 10:06 AM
-- Server version: 5.6.20
-- PHP Version: 5.5.15
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */... | true |
7dc2aad0dd68b6a1baafc9a505ffe5e0a42650f3 | SQL | melissakim/depop_exercise | /tech_assessment.sql | UTF-8 | 11,323 | 4.0625 | 4 | [] | no_license |
drop table xchange_rate;
create table xchange_rate (
date date,
currency varchar(12),
rate float
);
copy mkim.xchange_rate from local '/Users/mkim/Documents/exchange_rates.csv' delimiter ',' enclosed by '"' skip 1;
+-------------+
| Rows Loaded |
+-------------+
| 1176 |
+-------------+
drop table transa... | true |
e072cf6123863306858a88ea073b232c20dd30ca | SQL | makewheels/test-sharding | /src/main/resources/sql/createAll.sql | UTF-8 | 8,202 | 3.234375 | 3 | [] | no_license | /*
SQLyog Ultimate v12.09 (64 bit)
MySQL - 5.7.31-log : Database - test-sharding-author-db0
*********************************************************************
*/
/*!40101 SET NAMES utf8 */;
/*!40101 SET SQL_MODE = ''*/;
/*!40014 SET @OLD_UNIQUE_CHECKS = @@UNIQUE_CHECKS, UNIQUE_CHECKS = 0 */;
/*!40014 SET @OLD_FOR... | true |
dd093bf105a23008d5a7ce221b505aa113baf79a | SQL | dagreatcode/our-employee-tracker | /seed.sql | UTF-8 | 1,090 | 3.171875 | 3 | [] | no_license | INSERT INTO employee (first_name, last_name, role_id, manager_id)
values ('Vincent', 'Kendrick', 1, 1);
INSERT INTO employee (first_name, last_name, role_id, manager_id)
values ('Barbara', 'Kendrick', 2, 2);
INSERT INTO employee (first_name, last_name, role_id, manager_id)
values ('Von', 'Kendrick', 1, 3);
INSE... | true |
b75e5a414f92899ca6140bab2f62da949526bcd7 | SQL | georgfalemark/AcceleratedLearning | /Checkpoints/CheckPoint04/Checkpoint04LV1/SQLQuery1.sql | UTF-8 | 251 | 3.0625 | 3 | [] | no_license |
select Location.Location, BuildYear.BuiltWhatYear, NameOfChurch.NameOfChurch
from CHURCH
join Location
on CHURCH.ChurchID = Location.ID
join BuildYear
on CHURCH.ChurchID = BuildYear.ID
join NameOfChurch
on CHURCH.ChurchID = NameOfChurch.ID
| true |
100b8ceb5cedfbde98a88ea3c43243cb2c06ee48 | SQL | DavidDimasPatty/Hampers-Online-SQL-ONLY- | /spOrderStatus.sql | UTF-8 | 1,082 | 3.390625 | 3 | [] | no_license | alter procedure spOrderStatus @idstatus int, @statdit varchar(50),@statdip varchar(50)
, @stattib varchar (50), @statpem varchar (50)
as --sp yang digunakan untuk update status pesanan dan ditampilkan ke customer
set nocount on
if(@statdit is null)--jika status diterima null
begin
select top 1 StatusPesanan.s... | true |
bc4e82c6cc0f63414cccd07972e381d3d796e4d1 | SQL | votons/lechuapp | /dump_base_de_datos.sql | UTF-8 | 637 | 2.59375 | 3 | [
"MIT"
] | permissive | DROP DATABASE lechuapp;
CREATE DATABASE lechuapp;
USE lechuapp;
CREATE TABLE client;
CREATE TABLE client_detail;
CREATE TABLE order;
CREATE TABLE product;
CREATE TABLE category;
DROP TABLE IF EXISTS client;
CREATE TABLE client(
id INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
nombre VARCHAR(50) NOT NULL,
tele... | true |
70db952db9bc31ec4da8215e30da733c7e2cdcbd | SQL | supreetsinghsoni/Services-At-your-Step-SAYS | /says(3).sql | UTF-8 | 1,216 | 2.6875 | 3 | [
"MIT"
] | permissive | -- phpMyAdmin SQL Dump
-- version 4.5.4.1deb2ubuntu2
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Oct 31, 2017 at 10:24 AM
-- Server version: 5.7.20-0ubuntu0.16.04.1
-- PHP Version: 7.1.11-1+ubuntu16.04.1+deb.sury.org+1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40... | true |
99b61ba7f32d6b6207004b6ca0aa74f394d978c3 | SQL | FenilShah2311/Chat-App-System | /chat_app_system.sql | UTF-8 | 2,986 | 3.125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.8.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: May 12, 2021 at 08:07 PM
-- Server version: 10.1.34-MariaDB
-- PHP Version: 7.2.8
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD... | true |
ee03e8ea682e128b6d9951aa6f43275bc7ae9bbb | SQL | luiscarlosjunior/aulas-graduacao | /banco-dados/scripts-sql/oracle/01b-basicos/05-relatorios/Vendas válidas.sql | ISO-8859-2 | 1,825 | 3.921875 | 4 | [
"MIT"
] | permissive |
SELECT * FROM NOTAS_FISCAIS NF
INNER JOIN ITENS_NOTAS_FISCAIS INF
ON NF.NUMERO = INF.NUMERO;
SELECT NF.CPF, NF.DATA_VENDA, INF.QUANTIDADE FROM NOTAS_FISCAIS NF
INNER JOIN ITENS_NOTAS_FISCAIS INF
ON NF.NUMERO = INF.NUMERO;
SELECT NF.CPF, TO_CHAR(NF.DATA_VENDA, 'YYYY-MM') AS MES_ANO
, INF.QUANTIDADE FROM NOTAS_FISCAIS... | true |
fdfe50c528e21aef692ebc2bd547fc3d246662a4 | SQL | c4s4/sqlplus_commando | /sqlplus_commando/test/sql/test_sqlplus_commando_cast_query.sql | UTF-8 | 976 | 3.5 | 4 | [
"Apache-2.0"
] | permissive | BEGIN
FOR cur_rec IN (SELECT object_name, object_type
FROM user_objects
WHERE object_type IN ('TABLE', 'VIEW', 'PACKAGE', 'PROCEDURE', 'FUNCTION', 'SEQUENCE')) LOOP
BEGIN
IF cur_rec.object_type = 'TABLE' THEN
EXECUTE IMMEDIATE 'DROP ' || cur_rec.object_type || ... | true |
eced48383aba49668c773efecf0703339b6c92ed | SQL | Andrewmatilde/dashboard | /metabase/bug_info.sql | UTF-8 | 10,140 | 4.21875 | 4 | [
"Apache-2.0"
] | permissive | # Open Bugs by Repository
SELECT repo_name, count(*) AS count
FROM issue
JOIN repository r ON r.id = issue.repository_id
JOIN issue_label il ON issue.id = il.issue_id
JOIN label l ON l.id = il.label_id
WHERE closed = 0
AND l.name = 'type/bug'
GROUP BY repo_name
ORDER BY repo_name;
# Open B... | true |
c06b8280b2f4a2e10a1d586bbba22c478ab88597 | SQL | clebergriff/python.crawler.zoom | /mysql_database.sql | UTF-8 | 1,127 | 2.875 | 3 | [] | no_license | -- --------------------------------------------------------
-- Servidor: 127.0.0.1
-- Versão do servidor: 5.5.62 - MySQL Community Server (GPL)
-- OS do Servidor: Win64
-- HeidiSQL Versão: 11.0.0.5919
-- ------------------------------------------------------... | true |
f30d9c2d2071544fb3b933acf3dc0bdd8df923da | SQL | DianaSolano1/sql_inalcon | /Consultas Select/9_Presupuesto_general_PTAP.sql | UTF-8 | 1,315 | 3.640625 | 4 | [] | no_license | --SELECT * FROM t_presupuesto_general;
--SELECT * FROM t_subpresupuesto;
--SELECT * FROM t_detalle_subpresupuesto;
--SELECT * FROM t_apu;
-- Reporte presupuesto general
SELECT pg.item,
apu.codigo AS 'apu',
apu.nombre AS 'descripcion',
u.nombre AS 'unidad',
'-' AS valor_unitario,
pg.cantidad,
'-' AS valor_t... | true |
3cd3faacb8d9ba5d78b57d848d2078f805d6de82 | SQL | cgOrtiz805/Databases | /Lab_4/cristian-ortiz-lab4/13.sql | UTF-8 | 507 | 3.953125 | 4 | [] | no_license | SELECT COUNT(DISTINCT o.o_orderkey)
FROM orders o, supplier s, nation n, region r, customer c, lineitem l
WHERE
s.s_nationkey = (SELECT n_nationkey FROM nation, region WHERE n_nationkey = s.s_nationkey AND n_regionkey = r_regionkey AND r_name = "EUROPE")
AND
r.r_regionkey = n.n_regionkey
AND
c.c_nationkey = (SEL... | true |
79c1a5a96c9e91e6a9bcf0a924c2ea9aa6abad9b | SQL | CodingBootcamp-SDSTP/GonzagaCarlosHospitalInformation | /hospitalinformation.sql | UTF-8 | 2,223 | 3.90625 | 4 | [] | no_license | DROP TABLE IF EXISTS patient_medical_case;
DROP TABLE IF EXISTS medical_case;
DROP TABLE IF EXISTS patient_doctor;
DROP TABLE IF EXISTS attending_doctor;
DROP TABLE IF EXISTS doctor;
DROP TABLE IF EXISTS doctor_type;
DROP TABLE IF EXISTS confinement;
DROP TABLE IF EXISTS room;
DROP TABLE IF EXISTS person;
CREATE TABLE... | true |
1fb801e50aa8e86a5bc529b5d0a0ae1e8f9a875f | SQL | Diacrome/hh-school-2019-T-SQL | /sql/task_6.sql | UTF-8 | 627 | 3.734375 | 4 | [] | no_license | select rd.resume_id , array_agg(distinct s.name||'|') ,
MODE() WITHIN GROUP (ORDER BY s2.name) as most_popular_specialization
from resume_data_specialization rs
INNER JOIN specialization s ON rs.specialization_id = s.specialization_id
inner join resume_data rd on rd.resume_data_body_id = rs.resume_body_id
inner... | true |
a1f5806e016f2ef36c243ec2c99ffd1fcdf21f73 | SQL | markjwhite/BootcampX | /4_queries/1_teacher_rqs.sql | UTF-8 | 183 | 3.625 | 4 | [] | no_license | SELECT teachers.name, COUNT(assistance_requests.*)
FROM teachers
JOIN assistance_requests ON teachers.id = assistance_requests.teacher_id
WHERE name = 'Waylon Boehm'
GROUP BY teachers.name; | true |
ddc9d115f7fd9a0289e5f3f3e0871281a371b093 | SQL | johanpoirier/bet4rugby | /docker/mysql/schema.sql | UTF-8 | 11,857 | 3.25 | 3 | [
"MIT"
] | permissive | CREATE DATABASE IF NOT EXISTS `bets`;
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+02:00";
use bets;
-- --------------------------------------------------------
--
-- Structure de la table `rwc2019__invitations`
--
CREATE TABLE IF NOT EXISTS `rwc2019__invitations` (
`code` varchar(32) COLLATE utf8_g... | true |
328798dda201e0c97dd7c17e25d04dda45694772 | SQL | alfiskensa/vaadin-spring | /mhs_fusi.sql | UTF-8 | 8,484 | 3.375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.9.0.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Jul 13, 2019 at 03:13 PM
-- Server version: 10.3.16-MariaDB
-- PHP Version: 7.3.6
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @O... | true |
e1cd9addf1b94f18ed5155e1ae801276a0b4306a | SQL | EmmanuelSantiz/generico | /bd/generico.sql | UTF-8 | 8,120 | 2.9375 | 3 | [] | no_license | /*
SQLyog Ultimate v11.11 (64 bit)
MySQL - 5.5.5-10.1.21-MariaDB : Database - generico
*********************************************************************
*/
/*!40101 SET NAMES utf8 */;
/*!40101 SET SQL_MODE=''*/;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FO... | true |
f706985b3dad9e896bb0aa2d0b6664946961b901 | SQL | thomasgui06110/bien-etre-et-forme | /regroupent.sql | UTF-8 | 188 | 2.796875 | 3 | [] | no_license | SELECT YEAR AS ANNEE, id, customer_id, amount AS Montant,
(january + february + march + april) AS TOTAL,
amount - (january + february + march + april) AS Reste
FROM invoice ORDER BY YEAR | true |
28d80136d7f0351840a588bc9308a032a0730b6f | SQL | Ceyl0n/SQL-tutor | /lesson-3/writeInTables.sql | UTF-8 | 1,165 | 3.3125 | 3 | [] | no_license | /*
Заполнение таблицы пользователей ( users ) во все поля таблицы
*/
INSERT INTO users VALUES('1', 'sergey', 'sergey@mail.ru', 'pas1');
/*
Заполнение таблицы пользователей ( users ) с указания полей таблицы
*/
INSERT INTO users(name, email, password) VALUES
('valera', 'valera@mail.ru', 'pas2'),
('katy', 'katy... | true |
22f46961751793619e6020a83eb5e1b40e38c4a5 | SQL | f/koding | /go/src/socialapi/db/sql/integration_definition/003-sequence.sql | UTF-8 | 632 | 2.609375 | 3 | [
"Apache-2.0"
] | permissive | -- ----------------------------
-- Sequence structure for file_id_seq
-- ----------------------------
DROP SEQUENCE IF EXISTS "integration"."integration_id_seq";
CREATE SEQUENCE "integration"."integration_id_seq" INCREMENT 1 START 1 MAXVALUE 9223372036854775807 MINVALUE 1 CACHE 1;
GRANT USAGE ON SEQUENCE "integration"... | true |
2017558a2cf113b1d5cd972f370fd7c744234630 | SQL | mmusleh75/tempo | /sp_swm_int_tickets_trends_nonPLSPC.sql | UTF-8 | 10,773 | 3.9375 | 4 | [] | no_license | DELIMITER $$
USE `jiraanalysis`$$
DROP PROCEDURE IF EXISTS `sp_swm_int_tickets_trends_nonPLSPC`$$
CREATE PROCEDURE `sp_swm_int_tickets_trends_nonPLSPC`()
BEGIN
SET @future_month = DATE_ADD(CURDATE(), INTERVAL 1 MONTH);
SET @future_1st_of_month = CONCAT(YEAR(@future_month),'-', MONTH(@future_month),'-1');
SET @pr... | true |
48818608994edb06067533a69a295241b7b2161d | SQL | blakeward05/SQL-Queries | /Assessment/MAP/MAP Validate Grade.sql | UTF-8 | 1,288 | 4.0625 | 4 | [] | no_license | SELECT
-- saa.school_code,
-- saa.school_name,
sd.local_school_year,
tsc.test_admin_period,
-- tst.test_subject,
tsc.test_student_grade,
st.student_current_grade_code,
tsc.test_primary_result,
count(st.student_key)
-- round (avg(tsc.test_scaled_score),1) as average_RIT
FROM
K12INTEL_DW.FTBL_TEST_SCORES ... | true |
84a118719ff6fb13afe6b1edaa4deff0bfe9e832 | SQL | andrescanales/angular2-express-oracle | /sql/6-vista-mayoresingresos.sql | UTF-8 | 460 | 3.96875 | 4 | [] | no_license | -- View with the TOP 5 of products with more IN to warehouse
CREATE OR REPLACE VIEW kardex_mayores_entradas AS
SELECT K.COD_PRODUCTO,
P.NOMBRE AS PRODUCTO,
COUNT(K.COD_PRODUCTO) AS INGRESOS,
SUM(K.CANTIDAD_PRODUCTO) AS TOTAL
FROM KARDEX K
INNER JOIN PRODUCTOS P ON K.COD_PRODUCTO = P.COD_PRODUCTO
WHERE TIPO_TRANSACCIO... | true |
4de46e4e25522cd50f4ef0d170d0d950175c818e | SQL | qiuyan12/MS_Sql | /SQL/Sys 后台调用DLL.sql | UTF-8 | 434 | 3.484375 | 3 | [] | no_license | SELECT
sub.FSubFuncID,
detail.FDetailFuncID,
detail.FClassName,
detail.FFuncName,
detail.FFuncName_CHT,
detail.FFuncName_EN,
detail.*
FROM
t_DataFlowSubFunc sub
LEFT JOIN t_DataFlowDetailFunc detail ON sub.FSubFuncID = detail.FSubFuncID
WHERE
1 = 1 --AND sub.FSubFuncID = 19023 --自定义MRP
AND detail.FDetailFuncI... | true |
0cd00305f617a598c1cb8d18db583c236a07db5d | SQL | kingsmiler/trainings | /jooq/jooq-manual/jooq-in-seven-steps/src/main/resources/db-mysql.sql | UTF-8 | 329 | 2.671875 | 3 | [
"Apache-2.0"
] | permissive | DROP DATABASE jooq;
CREATE DATABASE jooq
COLLATE = 'utf8_general_ci'
CHARACTER SET = 'utf8';
USE `jooq`;
CREATE TABLE `author` (
`id` INT NOT NULL,
`first_name` VARCHAR(255) DEFAULT NULL,
`last_name` VARCHAR(255) DEFAULT NULL,
PRIMARY KEY (`id`)
)
ENGINE = InnoDB
DEFAULT CHARSE... | true |
35ceb3c701fecf1c7cf5add13c139e2206e82a2b | SQL | AmberLove328/app_project | /public/share/brickyard.sql | UTF-8 | 17,019 | 2.96875 | 3 | [
"Apache-2.0"
] | permissive | /*
Navicat MySQL Data Transfer
Source Server : localhost
Source Server Version : 50553
Source Host : localhost:3306
Source Database : brickyard
Target Server Type : MYSQL
Target Server Version : 50553
File Encoding : 65001
Date: 2019-07-24 10:12:42
*/
SET FOREIGN_KEY_CHECKS=0;
--... | true |
787b191e0e97a2e99920bff72b15c2ecf2d74817 | SQL | AljonaTrofimova/messages | /src/main/resources/data.sql | UTF-8 | 335 | 2.984375 | 3 | [] | no_license | drop table IF EXISTS message;
create TABLE message (
id INT AUTO_INCREMENT PRIMARY KEY,
text VARCHAR(250) NOT NULL,
created TIMESTAMP NOT NULL
);
insert into message (text, created) values
('Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna al... | true |
02fab7614ba6d249e88135367359e6771505d6b5 | SQL | sudhapsk/Saipoint_1 | /WEB-INF/database/upgrade_identityiq_tables.mysql | UTF-8 | 11,790 | 3.453125 | 3 | [] | no_license | --
-- This script contains DDL statements to upgrade a database schema to
-- reflect changes to the model. This file should only be used to
-- upgrade from the last formal release version to the current code base.
--
USE identityiq;
-- SCIM Audit Resources
ALTER TABLE identityiq.spt_audit_config ADD resources longte... | true |
d5b7609f06f34a899134db34a2b9834c36070850 | SQL | tuanlinh3667/PHPPractice | /my_apartment.sql | UTF-8 | 10,661 | 3.078125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.8.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Aug 02, 2018 at 01:41 PM
-- Server version: 10.1.34-MariaDB
-- PHP Version: 7.2.7
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD... | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.