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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
61aa68ccd7587bc38774818a0b271b499fab59e5 | SQL | pigor/mybatis-migration-example | /scripts/20170210183546_first_migration.sql | UTF-8 | 313 | 3.078125 | 3 | [] | no_license | -- // First migration.
-- Migration SQL that makes the change goes here.
CREATE TABLE USERS (
ID NUMERIC(20,0) NOT NULL,
USERNAME VARCHAR(25) NOT NULL,
EMAIL VARCHAR(255) NOT NULL
);
ALTER TABLE USERS
ADD CONSTRAINT PK_USERS
PRIMARY KEY (id);
-- //@UNDO
-- SQL to undo the change goes here.
DROP TABLE USERS;
| true |
5af45daddcb0ae2e6700ec6f49a26bdd074874a1 | SQL | brettshollenberger/database-course-lab3 | /INN/INN-setup.sql | UTF-8 | 741 | 3.78125 | 4 | [] | no_license | CREATE DATABASE inn;
USE inn;
CREATE TABLE rooms (
id varchar(3) PRIMARY KEY NOT NULL,
name varchar(100) NOT NULL,
beds integer NOT NULL,
bed_type varchar(25) NOT NULL,
max_occupancy integer NOT NULL,
base_price integer NOT NULL,
decor varchar(100),
UNIQUE KEY name (name)
);
CREATE TABLE reservations... | true |
fd828e6354d46ae04ee0932015d87ae07863cad3 | SQL | heather-arellano/database-exercises | /group_by_exercises.sql | UTF-8 | 527 | 3.703125 | 4 | [] | no_license | USE employees;
SELECT DISTINCT title FROM titles;
SELECT last_name FROM employees
WHERE last_name LIKE 'E%E'
GROUP BY last_name;
SELECT CONCAT(last_name,', ', first_name) FROM employees
WHERE last_name LIKE 'E%E'
GROUP BY last_name, first_name;
SELECT last_name, COUNT(last_name)
FROM employees
WHERE last_name Like ... | true |
b96a643a315e53c8a0b23ff5a8a1a5275d848922 | SQL | GabSaldana/Web | /Domino/basededatos.sql | UTF-8 | 1,669 | 2.671875 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.1.14
-- http://www.phpmyadmin.net
--
-- Servidor: 127.0.0.1
-- Tiempo de generación: 11-01-2016 a las 14:37:00
-- Versión del servidor: 5.6.17
-- Versión de PHP: 5.5.12
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARA... | true |
d581f9c6017fc9b98507ba86cafab809c8055602 | SQL | karlandreas/sql | /music_library_rails.sql | UTF-8 | 12,709 | 3.015625 | 3 | [] | no_license | # Sequel Pro dump
# Version 2492
# http://code.google.com/p/sequel-pro
#
# Host: 127.0.0.1 (MySQL 5.1.44)
# Database: music_library32
# Generation Time: 2011-06-14 15:53:59 +0200
# ************************************************************
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SE... | true |
49ce64404b22227da0d30c3cd5cb61c0e1ebb67b | SQL | brunocabral/SA_Assign2 | /DB/web_portal.sql | UTF-8 | 3,773 | 3.203125 | 3 | [] | no_license | -- create DB with HyperSQL
-- :web_portal/DB$ java -jar ../WebContent/WEB-INF/lib/hsqldb.jar --rcFile sqltool.rc web_portal web_portal.sql
CREATE TABLE ExpertAdministrator (Username VARCHAR(16),
Password VARCHAR(16),
FirstName VARCHAR(64),
LastName VARCHAR(64),
EmailAddress ... | true |
a4910b3c97df3136d98a67101178a0b3e103ff77 | SQL | ashriths/college-management | /bmsce_app_db.sql | UTF-8 | 6,619 | 3.625 | 4 | [
"MIT"
] | permissive | -- phpMyAdmin SQL Dump
-- version 4.0.4.1
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: May 17, 2014 at 04:48 AM
-- Server version: 5.6.12
-- PHP Version: 5.5.3
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;... | true |
075c0ebeb47fa0bdf7fa5cd624126ee26c7dbb83 | SQL | tomaszbabkiewicz/ireporttest | /jsf2App/database/Test.sql | UTF-8 | 755 | 3.5 | 4 | [] | no_license | CREATE DATABASE test WITH TEMPLATE = template0 ENCODING = 'UTF8';
ALTER DATABASE test OWNER TO test;
/* Table structure */
CREATE TABLE "role" (
role_id SERIAL NOT NULL,
name VARCHAR(32),
CONSTRAINT role_pk PRIMARY KEY (role_id)
);
CREATE TABLE "person" (
person_id SERIAL NOT NULL,
role_id INTEGER NOT NULL,
... | true |
f288f7c3622ca39b0be429598b5a5542215cb1f4 | SQL | CuVees/SQL | /MF/func_agg_first_success_loan_repay_user.sql | UTF-8 | 606 | 3.796875 | 4 | [] | no_license | BEGIN
delete from reportdb.agg_first_success_loan_repay_user;
insert into reportdb.agg_first_success_loan_repay_user(user_id,credit_id,created_time,status);
select
t1.uid as user_id,
t1.id as credit_id,
t1.created_time as created_time,
t1.status as status
from(
select uid,id,created_time,status from (
select uid,id... | true |
cd7ea9b0f8b11f8289963a238574cdfbbb985b7e | SQL | perverskitty/hair-web-app | /sql/hair_db_query.sql | UTF-8 | 4,502 | 4.21875 | 4 | [] | no_license | -- display a client's active appointments
SELECT
appt_date AS date,
CONCAT(start_time, ' to ', end_time) AS time,
CONCAT(clients.first_name, ' ', clients.last_name) AS client,
CONCAT(hairdressers.first_name, ' ', hairdressers.last_name) AS hairdresser,
title AS 'service required'
FROM appointm... | true |
39ce17328e4de01773ebc5ca957229c040635901 | SQL | MahirIsHere/Database | /mysql/Constraints_Example.sql | UTF-8 | 444 | 3.359375 | 3 | [
"MIT"
] | permissive | create table students (
sid int auto_increment,
sname varchar(10) not null,
sdob date,
sgender varchar(4),
primary key (sid)
);
describe students;
alter table students add major varchar(10) DEFAULT 'undecided';
select * from students;
insert into students value (1,'Mahir','1998-07-22'... | true |
5702f3bd5618d93664729d52397b62bd0f97e892 | SQL | dmakogon/intro-to-streaming | /asa-queries.sql | UTF-8 | 4,338 | 4.34375 | 4 | [
"MIT"
] | permissive | -- Hello World of streaming
SELECT *
INTO alldata
FROM donutshop
-- Cosmos DB queries against this data:
SELECT top 10 * from c
SELECT sum(c.donutCount) as donuts FROM c
where c.partitionId = "2"
and
c.donutType = "blueberry"
-- Grab specific fields
SELECT
id,
eventTime,
donutType,
qcIssueCount,
... | true |
ceca2fa2344480ed2b6a33d8ec78a4b7b3c01f1a | SQL | MbqIIB/Salesforce_Marketing_Cloud_Code | /SQL/Unsubs_Last_24hrs.sql | UTF-8 | 182 | 2.90625 | 3 | [] | no_license | SELECT
EmailAddress,
Status,
SubscriberKey,
DateUnsubscribed as 'UnsubscribeDate'
FROM _Subscribers
WHERE
Status = 'Unsubscribed'
AND
DateUnsubscribed > dateadd(hh,-24,getdate())
| true |
0d4a96a48d86bd3695dcc48ddb68dd76a0fa1f72 | SQL | aarhusstadsarkiv/sql_queries | /batch 3/missing_beslutning_in_beslutpaategnerkl.sql | UTF-8 | 1,754 | 3.59375 | 4 | [] | no_license | /* This query references a certain decision from Lotus Notes
where the columns BeslutResume and Indhold are identitical
although it is possible to find a more elaborate text in Lotus Notes in the field "Beslutning" when inspecting document properties */
SELECT *
FROM beslutpaategnerkl
LEFT JOIN indstilling_beslutpaa... | true |
69c4388f93463c09932be406f2ed02ab721b2f8c | SQL | Madhu2244/LearningSQL | /School.sql | UTF-8 | 3,093 | 4.09375 | 4 | [] | no_license | DROP TABLE STUDENT;
CREATE TABLE STUDENT (
student_id INTEGER,
student_name VARCHAR(30),
address_id INTEGER,
student_birthday VARCHAR(12),
student_age INTEGER,
PRIMARY KEY (student_id)
);
DROP TABLE ADDRESS;
CREATE TABLE ADDRESS (
address_id INTEGER,
street_address VARCHAR(30),
address_city ... | true |
e20fd7c16ad44e0ffefa6b87046e05347ad4fde9 | SQL | nikolasburk/prisma | /packages/migrate/src/__tests__/fixtures/introspection/nativeTypes-cockroachdb-with-postgresql-provider/setup.sql | UTF-8 | 918 | 3.609375 | 4 | [
"Apache-2.0"
] | permissive | DROP TYPE IF EXISTS "Role";
CREATE TYPE "Role" AS ENUM ('USER', 'ADMIN');
DROP TABLE IF EXISTS "public"."Post" CASCADE;
CREATE TABLE "public"."Post" (
"id" text NOT NULL,
"title" varchar NOT NULL,
"content" string,
"authorId" character varying,
"exampleChar" char,
"exampleCharLength" char(16),
... | true |
86545436385abe7e2f4af8a8cd897f2a72b48042 | SQL | AppStateESS/nomination | /boost/updates/update_0_0_10.sql | UTF-8 | 244 | 2.65625 | 3 | [] | no_license | alter table plm_nominator add column doc_id int references plm_doc(id);
alter table plm_reference add column doc_id int references plm_doc(id);
create table plm_doc (
id int not null,
name varchar(255) not null,
primary key(id)
);
| true |
bf22e44784f67a02c149effbb48d166c40898c97 | SQL | justinklam/BootcampX | /2_queries_joins/2_cohort_total_assignment_duration.sql | UTF-8 | 526 | 3.921875 | 4 | [] | no_license | SELECT sum(assignment_submissions.duration) as total_duration
FROM assignment_submissions
JOIN students ON students.id = student_id
JOIN cohorts ON cohorts.id = cohort_id
WHERE cohorts.name = 'FEB12';
-- SELECT sum of assignment_submission table's duration, name alias as total_duration
-- from assignment table from as... | true |
dc3204f2ebb123a1ee23aedb7e27a363c8f27fb2 | SQL | FraserGreenroyd/SwedeGaming | /database/Multiplayer.sql | UTF-8 | 284 | 2.859375 | 3 | [] | no_license | USE swedeuniverse;
CREATE TABLE Multiplayer(
MultiplayerID INT NOT NULL auto_increment,
Status VARCHAR(45),
RequesterID int,
AddresseeID int,
PRIMARY KEY (MultiplayerID),
FOREIGN KEY (RequesterID) REFERENCES User(UserID),
FOREIGN KEY (AddresseeID) REFERENCES User(UserID)
); | true |
18dd15407a60999ef59137e18f7a9f616180bbc3 | SQL | josephcsoti/cs182 | /Lab3/createindex.sql | UTF-8 | 84 | 2.578125 | 3 | [] | no_license | -- Index to speed up queries
CREATE INDEX LookUpSales ON Sales(customerID, dayDate) | true |
d571c739c419cdc9a09e6c550c67fed2a7752547 | SQL | ocdet/ocdet-swift-bench | /ocdet/capistrano/utils/create_table.sql | UTF-8 | 5,145 | 3.46875 | 3 | [] | no_license | PRAGMA foreign_keys = ON;
CREATE TABLE IF NOT EXISTS TEST (
TESTID INTEGER PRIMARY KEY AUTOINCREMENT,
TESTNAME TEXT,
PROXY_WORKERS INTEGER,
OBJECT_WORKERS INTEGER,
CONTAINER_WORKERS INTEGER,
ACCOUNT_WORKERS INTEGER,
REPLICATION INTEGER,
ZONE INTEGER,
ACCOUNT_PAR_ZONE INTEGER,
CONTAINER_PAR_ZONE INT... | true |
5ffdb7b9fdfc6e8ae09ccee499ac5906087a7da3 | SQL | jgarzonext/plsql-testing | /script_plsql/bd_iaxis/script/indices/CONTAB_ASIENT_DIA_PK.sql | UTF-8 | 609 | 2.6875 | 3 | [] | no_license | --------------------------------------------------------
-- DDL for Index CONTAB_ASIENT_DIA_PK
--------------------------------------------------------
CREATE UNIQUE INDEX "AXIS"."CONTAB_ASIENT_DIA_PK" ON "AXIS"."CONTAB_ASIENT_DIA" ("CPAIS", "FEFEADM", "CPROCES", "CCUENTA", "NLINEA", "NASIENT", "CEMPRES", "FCONTA",... | true |
b418bf1e08cfef7c6a981cf2cc15a9762772b187 | SQL | schejin/info | /info.sql | UTF-8 | 1,594 | 3.734375 | 4 | [] | no_license |
SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0;
SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0;
SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='TRADITIONAL';
DROP SCHEMA IF EXISTS `info` ;
CREATE SCHEMA IF NOT EXISTS `info` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci ;
USE `info` ;
--... | true |
faefceea1920a01f45f0db6f8c2bdbc080fbdb54 | SQL | silence-do-good/stress-test-Postgres-and-MySQL | /dump/low/day23/select1241.sql | UTF-8 | 178 | 2.6875 | 3 | [] | no_license |
SELECT timeStamp, temperature FROM ThermometerOBSERVATION o
WHERE timestamp>'2017-11-22T12:41:00Z' AND timestamp<'2017-11-23T12:41:00Z' AND temperature>=28 AND temperature<=67
| true |
a0c6796d7ded702a0c4f5064a48d2f65f3479c81 | SQL | kongyew/gpdb | /src/test/tinc/tincrepo/mpp/gpdb/tests/storage/filerep_end_to_end/sync2/sql/sync2_uaocs_alter_part_add_col.sql | UTF-8 | 7,183 | 3.265625 | 3 | [
"Apache-2.0",
"LicenseRef-scancode-generic-cla",
"PostgreSQL",
"LicenseRef-scancode-other-copyleft",
"metamail",
"BSD-3-Clause",
"LicenseRef-scancode-openssl",
"LicenseRef-scancode-other-permissive",
"ISC",
"Python-2.0",
"bzip2-1.0.6",
"LicenseRef-scancode-ssleay-windows",
"LicenseRef-scanco... | permissive | -- @product_version gpdb: [4.3.0.0-]
--
-- SYNC2 CO Part Table 1
--
CREATE TABLE sync2_uaocs_alter_part_add_col1 (id int, rank int, year date, gender
char(1)) with ( appendonly='true', orientation='column') DISTRIBUTED BY (id, gender, year)
partition by list (gender)
subpartition by range (year)
subpartition template ... | true |
de18189882bb71c310a4ed22e0f3e3db1ef944e8 | SQL | kelsey-myton/WheresTheMath | /databaseStuff/Quiz_database.sql | UTF-8 | 4,639 | 3.65625 | 4 | [] | no_license | CREATE TABLE student_info (
user_id INT,
user_name VARCHAR(255) NOT NULL,
Num_Lessons_Compl_Alg INT,
Num_Lessons_Compl_Geom INT,
RecentLesson VARCHAR(255),
PRIMARY KEY (user_id)
)
INSERT INTO student_info (
user_id,
user_name,
Num_Lessons_Compl_Alg,
Num_Lessons_Compl_Geom,
RecentLesson)
VA... | true |
a757ac890b3349d5af94c52003fb7b6bf31fda7f | SQL | sindile/municipal-data | /sql/table_demarcation.sql | UTF-8 | 270 | 2.734375 | 3 | [
"MIT"
] | permissive | -- Table: public.demarcation
-- DROP TABLE public.demarcation;
CREATE TABLE public.demarcation
(
label text,
code text NOT NULL,
CONSTRAINT demarcation_pkey PRIMARY KEY (code)
)
WITH (
OIDS=FALSE
);
ALTER TABLE public.demarcation
OWNER TO municipal_finance;
| true |
ef9a7f2e87b26e8ab8ce326c0435288358fb9ed2 | SQL | margaetem/PruebaBasedeDatos | /PruebaBaseDatos.sql | ISO-8859-1 | 6,979 | 3.625 | 4 | [] | no_license | /**
* Script SQL para insertar valores a los atributos de la entidad TEST.
*/
insert into test (id_test, nombre, descripcion, programa, unidad, autor, fecha_creacion)
values ('1', 'Evaluacion PSEint', 'Primera evaluacion para medir conocimientos en algoritmos',
'Programacion FullStack Java Trainee', '1.1', 'Bria... | true |
2f2371823f7451149d9945166a31f8e4e522f579 | SQL | mjkonarski/vigil | /db/migrations/20170315103930_init.sql | UTF-8 | 517 | 3.03125 | 3 | [
"MIT"
] | permissive | -- +goose Up
-- SQL in section 'Up' is executed when this migration is applied
CREATE TABLE public.jobs
(
id INTEGER NOT NULL,
container_name TEXT NOT NULL,
frequency INTEGER NOT NULL,
config JSON NOT NULL,
enabled BOOLEAN NOT NULL,
recipient TEXT NOT NULL,
P... | true |
d5712db5ef9e589608cc59ab2f7ce6a268f82a92 | SQL | jcook25/sql-challenge-jac | /EmployeeSQL/queries.sql | UTF-8 | 1,376 | 3.96875 | 4 | [] | no_license | -- epilogue --
select emp_no, first_name, last_name from employees
where emp_no = 499942;
-- #1 --
SELECT e.emp_no, e.last_name, e.first_name, e.gender, s.salary
FROM employees AS e
JOIN salaries AS s
ON e.emp_no = s.emp_no;
-- #2 --
SELECT * FROM employees
WHERE hire_date LIKE '1986%';
-- #3 --
SELECT dm.dept_no,... | true |
be727c1052050655e85cefd1fba8f0a2e1546d51 | SQL | anhtran102/NODEJS_DEMO | /DB.sql | UTF-8 | 1,341 | 3.921875 | 4 | [] | no_license | USE DEMO
CREATE TABLE Brand (
ID INT(11) NOT NULL AUTO_INCREMENT,
Name NVARCHAR(100) NOT NULL,
Description NVARCHAR(1000),
PRIMARY KEY (ID)
)
CREATE TABLE AvailableStatus (
ID INT NOT NULL PRIMARY KEY AUTO_INCREMENT,
Name NVARCHAR(100) NOT NULL
)
CREATE TABLE UserType (
ID INT NOT NULL PRIMARY KEY ... | true |
11a6b6cf565f3fd03cb91f245e856693d1fadc9a | SQL | Luciana-mon/Readme | /Desafio_3/Querys_consultas.sql | UTF-8 | 1,545 | 4.21875 | 4 | [] | no_license |
-- 1 TOTAL DE PRODUTOS DISPONIVEL NO ESTOQUE --
select sum(quantidade) as Total_Produtos_Disponiveis from estoques;
-- QUANTIDADE DE PRODUTOS CADASTRADOS --
select count(quantidade) as Qtda_Itens_Cadastrados from estoques;
-- 2 QUANTIDADE DE PRODUTOS POR DEPARTAMENTOS --
select nome, quantidade from produtos
inner jo... | true |
c3dfed5fcc67d2b141b98c6d07c5f300d09f3cc5 | SQL | Shenny-L/viewing- | /ysh_wbs.sql | UTF-8 | 1,739 | 3.078125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.9.2
-- https://www.phpmyadmin.net/
--
-- 主机: 127.0.0.1:3306
-- 生成日期: 2020-12-16 08:52:12
-- 服务器版本: 10.4.10-MariaDB
-- PHP 版本: 7.3.12
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CH... | true |
b528be0ab31e4674dddf9c43e407d977be6939d3 | SQL | hail-is/hail | /batch/sql/estimated-current.sql | UTF-8 | 65,974 | 3.359375 | 3 | [
"MIT"
] | permissive | CREATE TABLE IF NOT EXISTS `globals` (
`instance_id` VARCHAR(100) NOT NULL,
`internal_token` VARCHAR(100) NOT NULL,
`n_tokens` INT NOT NULL,
`frozen` BOOLEAN NOT NULL DEFAULT FALSE
) ENGINE = InnoDB;
CREATE TABLE IF NOT EXISTS `feature_flags` (
`compact_billing_tables` BOOLEAN NOT NULL,
`oms_agent` BOOLEAN... | true |
04d9a46bc2772ae38a6a0eab952bf90b2738c830 | SQL | Jonathanbustos15/SISEP | /Script/Requerimiento_20/docente_grupo.sql | UTF-8 | 2,097 | 3.09375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.8.5
-- https://www.phpmyadmin.net/
--
-- Servidor: 127.0.0.1
-- Tiempo de generación: 27-06-2019 a las 16:20:55
-- Versión del servidor: 10.1.38-MariaDB
-- Versión de PHP: 5.6.40
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";... | true |
f2ad380055ee9ce1fadf2ee46c4502e573bb5ba8 | SQL | haqh310/C0221G1-LeKhanhHa | /module3/case_study_jsp_servlet/create_database.sql | UTF-8 | 5,150 | 3.453125 | 3 | [] | no_license | use case_study_2;
create table contract_detail(
contract_detail_id INT AUTO_INCREMENT PRIMARY KEY,
contract_id INT NOT NULL,
attach_service_id INT NOT NULL,
quantity INT,
FOREIGN KEY (contract_id) REFERENCES contract(contract_id),
FOREIGN KEY (attach_service_id) REFERENCES attach_service(attach_se... | true |
3f7ef9b17c3ceb454b1ddccf703a450426c1bffb | SQL | andrianavalonaravalison/dadah_phpoo | /immobilier/EVALUATION PHPSQL/logement.sql | UTF-8 | 3,128 | 3.078125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Hôte : 127.0.0.1
-- Généré le : mar. 08 sep. 2020 à 14:27
-- Version du serveur : 10.4.13-MariaDB
-- Version de PHP : 7.4.8
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SE... | true |
a70b7f493322bb592aff138207b3ed087a9be489 | SQL | rasaford/DB1Tasks | /3/Aufgabe-3-4.sql | UTF-8 | 1,170 | 3.453125 | 3 | [] | no_license | DROP TABLE anzeigen;
CREATE TABLE anzeigen (
ident INTEGER PRIMARY KEY,
kunden_id VARCHAR(10) NOT NULL,
typ VARCHAR(30) NOT NULL,
breite INTEGER,
hoehe INTEGER,
einlieferung DATE NOT NULL,
dfue VARCHAR(10)
);
INSERT INTO anzeigen (ident, kunden_id, typ, einlieferung, dfue) VALUES (123, 'P0488', 'SW-Tex... | true |
149d43d2296f83a69d216726a95814f214b4a086 | SQL | hczhcz/ClickHouse | /dbms/tests/queries/0_stateless/00804_test_delta_codec_compression.sql | UTF-8 | 3,916 | 3.640625 | 4 | [
"Apache-2.0"
] | permissive | SET send_logs_level = 'none';
DROP TABLE IF EXISTS test.delta_codec_synthetic;
DROP TABLE IF EXISTS test.default_codec_synthetic;
CREATE TABLE test.delta_codec_synthetic
(
id UInt64 Codec(Delta, ZSTD)
) ENGINE MergeTree() ORDER BY tuple();
CREATE TABLE test.default_codec_synthetic
(
id UInt64 Codec(ZSTD)
) E... | true |
48c80df20f7e10e63fe1052101411a660c4c212b | SQL | liuluhe/DataEngineering | /RedshiftPipelineDemo/s3Assets/redshift_script/01-createReporting.sql | UTF-8 | 189 | 2.5625 | 3 | [] | no_license | create table if not exists test.quarter_revenue_report(
quarter char(10),
warehouse_num int,
revenue decimal,
item_quantity bigint
)
diststyle even
sortkey(quarter,warehouse_num)
; | true |
c32d027d94af3226aab621ff61f1e13b9de22d27 | SQL | mikels111/DesarroloDeAplicacionesWeb | /Programacion web en entorno servidor/sql/consultas.sql | UTF-8 | 1,406 | 4.40625 | 4 | [] | no_license | SELECT emp_no,first_name,birth_date
FROM employees
WHERE birth_date=(SELECT MIN(birth_date) FROM employees);
--OBTENER TODOS LOS EMPLEADOS DEL DEPARTAMENTO DP03 QUE ESTEN TRABAJANDO ACTUALMENTE
SELECT employees.first_name
FROM employees, dept_emp
WHERE employees.emp_no=dept_emp.emp_no AND
dept_emp.dept_no='D003' ... | true |
337f8863a3eb13445766ea5a1681dde4a6f4ef1a | SQL | basedosdados/mais | /bases/br_ana_reservatorios/sin/publish.sql | UTF-8 | 1,307 | 3.53125 | 4 | [
"MIT"
] | permissive | /*
Query para publicar a tabela.
Esse é o lugar para:
- modificar nomes, ordem e tipos de colunas
- dar join com outras tabelas
- criar colunas extras (e.g. logs, proporções, etc.)
Qualquer coluna definida aqui deve também existir em `table_config.yaml`.
# Além disso, sinta-se à vontade para alterar algu... | true |
eaca3460f48961e7f29ecfec3cc0eca94303bcff | SQL | Ares7/2013-JUL-Module-7 | /DWSO/Req. Online Sales (Vasili_Korzun)/u_dw_references/tables/t_countries/w_countries.sql | UTF-8 | 651 | 3.0625 | 3 | [] | no_license | --drop view u_dw_references.w_countries;
--==============================================================
-- View: w_countries
--==============================================================
CREATE OR REPLACE VIEW u_dw_references.w_countries
AS
SELECT geo_id
, country_id
FROM t_countries;
COMMENT ON ... | true |
72967ebc8e3155f3be904b56b92e34eb64b94c71 | SQL | silvia-collab/DB_work-1 | /05_SQL_SELECT_stocks/05_3_que_sort.sql | UTF-8 | 616 | 3.5 | 4 | [] | no_license | /* QUERIES Sortierung */
USE stocks;
system clear;
-- ASC / DSC
-- sortieren nach Sektor / aufsteigend (alphabetisch)
/**/
SELECT
ticker "sym",
c_name "company",
CONCAT(sector," : ",industry) "operations"
FROM stocks.ccc_list
ORDER BY sector,industry ASC
#ORDER BY sector ASC , industry DESC
LIMIT 30;
-- sortieren n... | true |
b3651291cd655989fe867abb75b6b85c1c716f26 | SQL | joscor90/desafio_modelamiento | /caso1.sql | UTF-8 | 651 | 3.140625 | 3 | [] | no_license | -- Creación de la base de datos caso1
CREATE DATABASE caso1;
-- Creación de la tabla departamentos
CREATE TABLE departamentos(id SERIAL, nombre VARCHAR(100) NOT NULL, PRIMARY KEY (id));
-- Creación de la tabla trabajadores
CREATE TABLE trabajadores(id SERIAL, nombre VARCHAR(50) NOT NULL, rut INT NOT NULL, direccio... | true |
8a6bce982c7c4ca1cf64b1c0b88d8bcbe94ba39a | SQL | Youstina-Nabil/Track | /FleetOwner.sql | UTF-8 | 1,505 | 2.796875 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.5.2
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Apr 26, 2016 at 02:06 PM
-- Server version: 5.7.9
-- PHP Version: 5.6.16
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/... | true |
1840a1e9a366f50d8d9953cb1164f96ba2aac768 | SQL | sgerra/FacturacionMarceDuran | /Scripts_Compras/32.actualizarArticulosgranel.sql | UTF-8 | 197 | 2.5625 | 3 | [] | no_license | select * from articulos where [desc] like '%COCA%'
select * from Proveedores where idProveedor=24
UPDATE Articulos
set unidadesgranel=8, costogranel=74.56,uni_id=3
where codart in (595,596,593) | true |
c9b9d3ea6fcdff73ab5bd7a5abaed07d00f67f6e | SQL | pltanton/ITMO | /15-16/DB/hw_3/solution.sql | UTF-8 | 5,179 | 3.765625 | 4 | [] | no_license | -- vim: ts=2 sw=2 sts=2
DROP TABLE IF EXISTS AudioTrackStoreNF1;
-- Выкинем повторяющеяся строки получим нф1
SELECT DISTINCT *
INTO AudioTrackStoreNF1
FROM AudioTrackStore;
ALTER TABLE AudioTrackStoreNF1 ADD PRIMARY KEY (TrackId, PlaylistId, OrderId);
-- Приведем к нф2
DROP TABLE IF EXISTS NF2Quantity;
DROP TABLE IF ... | true |
6ae8bea7fe10f066d954b36508b9cf0235b256db | SQL | oushu1zhangxiangxuan1/TronStreaming | /analyze/suspects.sql | UTF-8 | 1,921 | 2.609375 | 3 | [
"Apache-2.0"
] | permissive | SELECT to1 from orc_t_ethereum_nm_ta where from1 in (
'0x3ccd56b3f428a0e541b1e273ba2f4d4dee086024',
'0x1eb182eeefc68a711167cbbdd03c8f78d12834ed',
'0x40619ce71c8c8721cc76396b7c65f2b54fba5ad7',
'0x1194d33bd19c0680d99ae7160510523207b6cd5d',
--'0x99968f71044a679a4f5b3b89d3f8d1ced74055b0',
--'0x2a675f3ab4ed10b9c... | true |
c861920da72993e80dcfaf16efd3c054e3a20c28 | SQL | jpcv222/www-project | /server/src/database/views/v_chat_friend_list.sql | UTF-8 | 497 | 3.375 | 3 | [] | no_license | CREATE OR REPLACE VIEW v_chat_friend_list AS(
SELECT
CONVERSATIONS.ts_creation,
CONVERSATIONS.row_id,
CONVERSATIONS.name AS conversation_name,
patient_id,
doctor_id,
t_doctor.name AS doctor_name,
t_patient.name AS patient_name
FROM CONVERSATIONS
... | true |
b4fc9b5fa22dd7dbbf1ccd9d2557287917b5084c | SQL | sbourbousse/GestionEleve_Sqlite3 | /databaseCode.sql | UTF-8 | 888 | 3.328125 | 3 | [] | no_license | create table Parametre(
version float
);
create table Option(
optionId smallint auto_increment primary key,
optionLibelle varchar(64));
create table Etudiant(
etudiantId int primary key,
etudiantPrenom varchar(64),
etudiantNom varchar(64),
optionId smallint,
FOREIGN KEY(optionId) REFERENCES Option(optionId));
in... | true |
0b2d0cfd8985792f9b9b5a004ebebc867d557839 | SQL | posttk421/CodeVault | /CodeVault/SQLScripts/Querying/CreatingDynamicSQLUsingReplace.sql | UTF-8 | 2,300 | 3.390625 | 3 | [
"MIT"
] | permissive | -- n.b. You will need to do results to text to get the newline.
-- one replace:
select
REPLACE(
'insert into #Backup(TankId, PBLNR, TNKNR, MATNR, nCapacity, nHeel, nOverillProtection, DynamicMinHours, DynamicMaxHours) ' + char(13) + char(10) +
' values (@TID, ''@PBL'', ''@TNK'', ''@MAT'', @CAP, @HEEL, @... | true |
97b51565895816cc8df7cd8113a37740b0cad994 | SQL | Dani-Interrante-Phl/li-metabase_For_Eclipse | /etl/queries/licenses/revenue_bl.sql | UTF-8 | 565 | 3.375 | 3 | [] | no_license | SELECT job.externalfilenum jobnumber,
(
CASE
WHEN jt.description LIKE 'Amendment/Renewal'
THEN 'Amend/Renew'
WHEN jt.description LIKE 'Business License Application'
THEN 'Application'
END ) AS jobtype,
fee.latestpayment paymentdate,
fee.paymenttotal AS amount, fee.FeeType
FROM query.o_fn_fee... | true |
7d4bb185b707a82a749c6e09627ae7b8def33b39 | SQL | samgville/desarrollo | /script/Inserts Modulo 8.sql | UTF-8 | 5,450 | 2.9375 | 3 | [] | no_license | /* **************************** INSERTS *************************************************** */
/* Minutas---------------------------------------------------------------------------------------------------------*/
INSERT INTO dbo.MINUTA(min_fecha, min_motivo, min_observaciones) VALUES ('20150425 18:00','Requerimient... | true |
6538f5982bd965fdb89f807b021dc0261c94e783 | SQL | FINAL-4/FINAL4_NEW | /FIFAOFFLINE/target/classes/scripts/최종 sql.sql | UHC | 11,152 | 3.171875 | 3 | [] | no_license | DROP TABLE MEMBER CASCADE CONSTRAINTS;
DROP TABLE P_RECRUIT;
DROP TABLE NOTICE;
DROP TABLE P_LIST;
DROP TABLE BOARD;
DROP TABLE REPLY;
DROP TABLE ATTACH;
DROP TABLE CATAGORY;
DROP TABLE TEAM;
DROP TABLE TEAM_AD;
DROP TABLE T_JOINED_MEMBER;
DROP TABLE T_MEMBER;
DROP TABLE MATCHING;
DROP TABLE APP_MATCHING;
... | true |
68f3bdb728f39a5fc6e95996ff9ed55ad2d0eab3 | SQL | eladioruiz/golf | /db/migrate/alter_privacy.sql | UTF-8 | 1,010 | 3.375 | 3 | [] | no_license | /*DROP TABLE `privacy_types`;*/
CREATE TABLE `privacy_types` (
`id` int(11) NOT NULL,
`description` varchar(255) DEFAULT NULL,
`enabled` tinyint(1) DEFAULT '1',
`created_at` datetime DEFAULT NULL,
`updated_at` datetime DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*DROP TABLE `... | true |
7111a8993ea1351ca2b0ff1fc325516623b493d2 | SQL | Deepan-Vishwa/php-rest-api | /students.sql | UTF-8 | 1,576 | 3.25 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 5.0.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: May 11, 2020 at 04:23 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 |
05c6ada33da8a4c1bddaad3954f84e2614cba4b0 | SQL | herfalerf/ayc-back | /scratchpad.sql | UTF-8 | 683 | 4 | 4 | [] | no_license | -- returns table with videos list and their corresponding tags
SELECT videos.id, videos.name, tags.id AS tags_id FROM videos JOIN videos_tags ON videos.id = videos_tags.video_id JOIN tags ON videos_tags.tag_id = tags.id;
-- returns tabel with videos that correspond to a certain tag.
SELECT videos.id, videos.name, ... | true |
ac3dc68488d3d26f652f66ee1d3493dda6553396 | SQL | kennycaiguo/oracle11gR2 | /触发器.sql | GB18030 | 6,537 | 4.03125 | 4 | [] | no_license | ---------------------------------------------------------------------
grant create any trigger to my;--ûȨ
---------------------------------------------------------------------
--Ҫıд־
CREATE TABLE T3 (NAME VARCHAR2(20),MONEY NUMBER);
INSERT INTO T3 VALUES ('A',10);
INSERT INTO T3 VALUES ('B',20);
CREATE TABLE T4 (NA... | true |
428dd33dfcdc1522b13ac45bad657448e6ad9d4e | SQL | MARCOSBLACKER7/ESCOM-TRAYECTORIA | /BASES DE DATOS/Apuntes clases/Oracle by example/Capitulo5/Scripts/Ejercicio 3.sql | UTF-8 | 435 | 3.140625 | 3 | [] | no_license | set echo off;
Column Promedio format 9999;
Column Minimo format A15;
Column Maximo format A15;
set colsep ' * ';
Spool "C:\Users\Acer\Desktop\Ejercicios\Oracle by example\Capitulo5\Salidas\Ejercicio 3.txt"
SELECT AVG(CASE WHEN prerequisite IS NOT NULL THEN cost*1.1
WHEN prerequisite = 20 THEN cost*1.2
EL... | true |
1c1ce1b7a6fdc3d4c4c03c55f588d9852548a6de | SQL | afhfjh/enteco | /SQL/Aplicaciones/AnalEsta/Vistas/ANE_MERMA_PLANIFICACION.sql | UTF-8 | 42,784 | 3.09375 | 3 | [] | no_license | --------------------------------------------------------
-- DDL for View ANE_MERMA_PLANIFICACION
--------------------------------------------------------
CREATE OR REPLACE FORCE VIEW "ANALESTA"."ANE_MERMA_PLANIFICACION"
("EMPRESA", "N_CLIENTE", "CLIENTE", "OT", "FEC_CIERRE_OT", "TIPO_PRD", "ESPECIALIDAD", "LINEA"... | true |
ecba7e195e7b82fcf358b3f8b80e0c411bdb84c8 | SQL | jzaoueli/bht-2017-RideSharing-Server | /samples/core/src/main/resources/db/migration/mysql/V0001__R001_Create_schema_MYSQL.sql | UTF-8 | 4,613 | 3.65625 | 4 | [
"Apache-2.0"
] | permissive | -- Rename this file to V0001__R001_Create_schema_MYSQL.sql.mysql if the database used is not MariaDB 10.0.27
-- This is the SQL script for setting up the DDL for the h2 database
-- In a typical project you would only distinguish between main and test for flyway SQLs
-- However, in this sample application we provde sup... | true |
f3f7517b581348ce0b1adcd716559b645506b685 | SQL | cyberpunx/Alarmas911 | /_db_dataModels/Ejecutar SQL para v5_1/insert Tipos/alarmas_db_tipos_monitoreo.sql | UTF-8 | 2,417 | 3.109375 | 3 | [] | no_license | CREATE DATABASE IF NOT EXISTS `alarmas_db` /*!40100 DEFAULT CHARACTER SET utf8 */;
USE `alarmas_db`;
-- MySQL dump 10.13 Distrib 5.6.13, for Win32 (x86)
--
-- Host: localhost Database: alarmas_db
-- ------------------------------------------------------
-- Server version 5.6.12-log
/*!40101 SET @OLD_CHARACTER_SET... | true |
a7e8ccef689a9bfeef7891bc06866cdaf9563994 | SQL | SIU-Toba/framework | /proyectos/toba_usuarios/metadatos/componentes/toba_datos_relacion/dump_2202.sql | UTF-8 | 8,112 | 2.796875 | 3 | [] | no_license | ------------------------------------------------------------
--[2202]-- Mantenimiento de Perfiles Funcionales - datos
------------------------------------------------------------
------------------------------------------------------------
-- apex_objeto
------------------------------------------------------------
... | true |
1d0444670b7c8a84af3b54c0469fcac297c74eb8 | SQL | patrickllarenagomez/Online-Shop-Ticketing-System | /onlineshopdb.sql | UTF-8 | 11,078 | 2.796875 | 3 | [
"MIT"
] | permissive | -- phpMyAdmin SQL Dump
-- version 4.5.1
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Mar 25, 2017 at 07:31 AM
-- Server version: 10.1.19-MariaDB
-- PHP Version: 5.6.28
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CL... | true |
cabf647c308476bed86f15d7577ffc94d3377dac | SQL | cleanjenn/team-tracker | /db/seeds.sql | UTF-8 | 782 | 3.046875 | 3 | [] | no_license | INSERT INTO department (id, name)
VALUES
(1, "Sales"),
(2, "Engineering"),
(3, "Finance"),
(4, "Legal");
INSERT INTO roles (id, title, salary, department_id)
VALUES
(1, "Sales Lead", 100000, 1),
(2, "Salesperson", 80000, 1),
(3, "Lead Engineer", 150000, 2),
(4, "Software Engineer", 120000, 2),
... | true |
74cf1d69230648322b1400ce591a81897e4325ac | SQL | Asianatix/meeting | /db_mom.sql | UTF-8 | 10,253 | 3.015625 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.8.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Jan 26, 2019 at 11:36 AM
-- 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 |
c9dc3aa45914b42cd17598419ea97d1669937964 | SQL | JM-Oh/dbSql | /2019_11_19.sql | UHC | 4,348 | 4.625 | 5 | [] | no_license | --emp_test̺
DROP TABLE emp_test;
--multiple insert Ʈ ̺
--empno, ename, ΰ ÷ emp_test, emp_test2 ̺ emp̺κ Ѵ.(CTAS)
--ʹ ʴ´.
CREATE TABLE emp_test AS
SELECT empno, ename
FROM emp
WHERE 1=2;
CREATE TABLE emp_test2 AS
SELECT empno, ename
FROM emp
WHERE 1=2;
--INSERT ALL
--ϳ INSERT SQL ̺ Է
INSERT ALL
INTO emp_t... | true |
af125755ef2aeb4dcddd44006dd291d7c2be8db1 | SQL | adkafka25/regressionsite | /conf/evolutions/default/2.sql | UTF-8 | 474 | 3.296875 | 3 | [] | no_license | # --- Rename Get rid of format in Page
# --- !Ups
ALTER TABLE `RegressionSite`.`Page`
DROP FOREIGN KEY `Page_Format`,
DROP COLUMN `Format_ID`,
DROP INDEX `FileFormatID_idx` ;
# --- !Downs
ALTER TABLE `RegressionSite`.`Page`
ADD `Format_ID` INT NOT NULL ,
ADD INDEX `FileFormatID_idx` (`Format_ID` ASC) ,
ADD C... | true |
5b4f2447a9173d13d043b6988401bad25420b24a | SQL | liviubalan/liviubalan.com-vagrant-ubuntu | /provision-shell/tutorials/000/040/resources/mysql/my.sql | UTF-8 | 325 | 2.6875 | 3 | [
"MIT"
] | permissive | # Make a new user
CREATE USER '$LIV_USR_MYSQL_USR_USR'@'localhost' IDENTIFIED BY '$LIV_USR_MYSQL_USR_PWD';
# Allow the user to read, edit, execute and perform all tasks across all the databases and tables
GRANT ALL PRIVILEGES ON * . * TO '$LIV_USR_MYSQL_USR_USR'@'localhost';
# Reload all the privileges
FLUSH PRIVIL... | true |
37568d8a270ad85f870bac6a9f8421b49f3997d5 | SQL | paul-rogers/drill-test-framework | /framework/resources/Datasources/parquet_storage/DRILL-6118/DRILL_6118_parquet_partitioned_by_files.ddl | UTF-8 | 505 | 2.96875 | 3 | [
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | create table if not exists dfs.drillTestDir.`filter/pushdown/DRILL_6118_parquet_partitioned_by_files` (c1, c2, c3, c4, c5)
partition by (c1) as
select cast(columns[0] as int) c1, columns[1] c2, columns[2] c3, columns[3] c4, columns[4] c5
from dfs.drillTestDir.`filter/pushdown/DRILL_6118_data_source.csv`;
create view i... | true |
620feae68db3cb9aacba0b1467cecdb45a0db992 | SQL | HSATAN/mzhan | /mzhan/user.sql | UTF-8 | 1,955 | 2.875 | 3 | [] | no_license | --
-- PostgreSQL database dump
--
-- Dumped from database version 9.6.3
-- Dumped by pg_dump version 9.6.3
SET statement_timeout = 0;
SET lock_timeout = 0;
SET idle_in_transaction_session_timeout = 0;
SET client_encoding = 'UTF8';
SET standard_conforming_strings = on;
SET check_function_bodies = false;
SET client_min... | true |
20dc798eae4ae822a10827856cf1db300f12d8d4 | SQL | O46002101/hw2 | /homework2.sql | UTF-8 | 17,901 | 2.71875 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 5.0.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Creato il: Giu 13, 2021 alle 17:30
-- Versione del server: 10.4.16-MariaDB
-- Versione PHP: 7.4.12
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIEN... | true |
5ed1d6fe383c741c1d0ce968407174a395f67ccb | SQL | ysugimoto/perooon | /perooon.sql | UTF-8 | 1,067 | 2.625 | 3 | [
"MIT"
] | permissive | -- phpMyAdmin SQL Dump
-- version 3.5.1
-- http://www.phpmyadmin.net
--
-- ホスト: localhost
-- 生成日時: 2012 年 12 月 08 日 23:20
-- サーバのバージョン: 5.5.20
-- PHP のバージョン: 5.3.10
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHAR... | true |
f236a063cb41add5ae633437805ff1c3fa06fc1e | SQL | tjb/billshare-backend | /src/main/resources/db/migration/V20171003__InitializeDatabase.sql | UTF-8 | 713 | 3.84375 | 4 | [] | no_license | CREATE TABLE Users (
id INT NOT NULL AUTO_INCREMENT,
email VARCHAR(255) NOT NULL,
first VARCHAR(255),
last VARCHAR(255),
password VARCHAR(255) NOT NULL,
enabled BIT NOT NULL DEFAULT 1,
PRIMARY KEY (id)
);
CREATE TABLE Bills (
id INT NOT NULL AUTO_INCREMENT,
name VARCHAR(255) NOT NUL... | true |
8bc97f82c926aef6162fba6ca532282ee32c08f5 | SQL | happyjianguo/order-service-parent | /scripts/weighing_settlement_bill_daily.sql | UTF-8 | 596 | 3.34375 | 3 | [] | no_license | ALTER TABLE `dili_orders`.`weighing_settlement_bill_daily`
ADD COLUMN `settlement_day` varchar(20) NOT NULL COMMENT '结算日期,yyyy-MM-dd ex:2020-10-10' AFTER `settlement_time`,
DROP PRIMARY KEY,
ADD PRIMARY KEY (`market_id`, `goods_id`, `trade_type`, `settlement_day`) USING BTREE;
ALTER TABLE `dili_orders`.`weighing_settl... | true |
fc46e8784ab6ecefbc990ff9f86f88bc31650d45 | SQL | pandeytanmay/htmltraining | /olep.sql | UTF-8 | 8,911 | 2.90625 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.5.4.1deb2ubuntu1
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Jul 21, 2016 at 07:50 AM
-- Server version: 5.7.12-0ubuntu1
-- PHP Version: 7.0.4-7ubuntu2
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIE... | true |
47a9bb17e2b86ab442ad93e9289ba42eb31ea156 | SQL | luisalbertogh/oracle-maven | /src/test/resources/VR_database/src/main/scripts/VR_OWNER/CODE/view/VW_VRI_MRM_LIMIT_OVERRIDE.sql | UTF-8 | 704 | 2.984375 | 3 | [] | no_license | --liquibase formatted sql
--changeset ${vr_owner_user}_CODE:VIEW_VW_VRI_MRM_LIMIT_OVERRIDE runOnChange:TRUE failOnError:TRUE splitStatements:TRUE
CREATE OR REPLACE FORCE VIEW "VW_VRI_MRM_LIMIT_OVERRIDE" ("ID", "DESK_ID", "TYPE_OF_LIMIT", "LIMIT_SIZE", "VALUE_USAGE", "LIMIT_USAGE", "MEASUREMENT_UNIT", "START_DATE",... | true |
74174deeee9921b5ccf9b3385ca799152d740295 | SQL | libero/reviewer-submission | /xpub-schema.sql | UTF-8 | 9,781 | 2.953125 | 3 | [
"MIT"
] | permissive | --
-- PostgreSQL database dump
--
-- Dumped from database version 10.6
-- Dumped by pg_dump version 10.10 (Ubuntu 10.10-0ubuntu0.18.04.1)
SET statement_timeout = 0;
SET lock_timeout = 0;
SET idle_in_transaction_session_timeout = 0;
SET client_encoding = 'UTF8';
SET standard_conforming_strings = on;
SELECT pg_catalog.... | true |
9428a0a6e1d42edaeb8d46dad94bbf17e431f02d | SQL | evanjhopkins/TeleSked | /build.sql | UTF-8 | 3,542 | 3.28125 | 3 | [] | no_license | -- MySQL dump 10.13 Distrib 5.5.44, for debian-linux-gnu (x86_64)
--
-- Host: localhost Database: telesked
-- ------------------------------------------------------
-- Server version 5.5.44-0ubuntu0.12.04.1
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@... | true |
46c4105c36f9d8d838db073f345b5d18ef5fa648 | SQL | nrpope/BootcampX | /3_queries_group-by/total_by_day.sql | UTF-8 | 104 | 2.953125 | 3 | [] | no_license | SELECT day, COUNT(assignments.duration) AS total_assignments
FROM assignments
GROUP BY day
ORDER BY day; | true |
557779065f4394c83b596b5f10808f2ff01871d9 | SQL | christopher-mason/sql-instruction | /bmdb/bmdb-joins-5-table.sql | UTF-8 | 1,093 | 4.28125 | 4 | [] | no_license | -- bmdb genre queries
-- id of comedy genre
select id from genre
where genre = 'Comedy';
-- 3 table join to list comedy movies
select *
from movie m
join moviegenre mg
on mg.movieID = m.id
join genre g
on g.ID = mg.genreID;
-- will return title and genre
select m.title, g.genre
from movie m
joi... | true |
6505bebb09b37d2e058b8238180814fb0bfc59a0 | SQL | Codefellows-Team-GET/lunchbox | /schema.sql | UTF-8 | 1,132 | 2.65625 | 3 | [
"MIT"
] | permissive | DROP TABLE IF EXISTS saved_res;
CREATE TABLE saved_res (
id SERIAL PRIMARY KEY,
userName VARCHAR(255),
resName VARCHAR(255),
walkTime VARCHAR(255),
waitTime VARCHAR(255),
totalTime VARCHAR(255),
price VARCHAR(255),
rating VARCHAR(255)
);
INSERT INTO saved_res (userName, resName, walkTime, waitTime, to... | true |
a5f9c896e3ff6d247deed1b1fa105e07bd41120f | SQL | diabagate/projetbd | /construction.sql | UTF-8 | 2,295 | 3.25 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.7.9
-- https://www.phpmyadmin.net/
--
-- Hôte : 127.0.0.1
-- Généré le : ven. 26 avr. 2019 à 13:55
-- Version du serveur : 10.1.31-MariaDB
-- Version de PHP : 7.2.3
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101... | true |
b942edcdc9af1ed83fc84c7a9d3912942871e461 | SQL | nwork/Capstone | /childdaycare.sql | UTF-8 | 4,810 | 3.203125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.2.12deb2+deb8u1
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: May 25, 2016 at 06:16 PM
-- Server version: 5.5.49-0+deb8u1
-- PHP Version: 5.6.20-0+deb8u1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIE... | true |
b48848e616821abdc280ebd5861ebbe2c6f354ba | SQL | Good725/ideabubble-lamp | /application/model/model-20160811174500.sql | UTF-8 | 1,000 | 3.234375 | 3 | [] | no_license | /*
ts:2016-08-11 17:45:00
*/
CREATE TABLE IF NOT EXISTS `engine_lookup_fields`
(
`id` INT (11) UNSIGNED NOT NULL AUTO_INCREMENT,
`name` VARCHAR (255) NOT NULL,
PRIMARY KEY (`id`)
)
ENGINE = INNODB CHARSET = UTF8;
CREATE TABLE IF NOT EXISTS `engine_lookup_values` (
`id` INT (11) UNSIGNED NOT NULL AUTO_INCREMENT,
`... | true |
cc9a295076d4259e1c09e702a5d261bc10202088 | SQL | DaniellKondoff/Databases----MS-SQL-Server | /08.ExamPreparation 16-OCT-2016/Section 3 Querying - 11. AIrports and Passengers.sql | UTF-8 | 248 | 3.65625 | 4 | [] | no_license |
Select AirportID,AirportName, COUNT(*) as Passengers
from Flights as f
Join Airports as a
ON f.OriginAirportID=a.AirportID AND f.Status='Departing'
JOIN Tickets as t
ON t.FlightID=f.FlightID
Group By AirportID,AirportName
Order BY AirportID ASC
| true |
974c40675cf82281ef7f06af9714485a0c06314f | SQL | anhsirk0/CS50x-2020 | /Week_7_SQL/movies/13.sql | UTF-8 | 273 | 3.796875 | 4 | [] | no_license | SELECT DISTINCT name FROM people
JOIN stars ON stars.person_id = people.id
JOIN movies ON movies.id = stars.movie_id
WHERE name != 'Kevin Bacon'
AND movie_id IN (
SELECT movie_id FROM people
JOIN stars on stars.person_id = people.id
where name = 'Kevin Bacon' AND birth = 1958
);
| true |
72fde779dc31960ca28d4d4a4102c926bdb4334e | SQL | j-sieben/PIT | /PIT/install_scripts/uninstall_apex.sql | UTF-8 | 1,088 | 2.515625 | 3 | [
"MIT"
] | permissive | /*
Script to install PIT-CLIENT
Usage:
Call this script either directly or by using the bat/sh script files.
Parameters:
-- 1: PIT_OWNER: database user who own PIT
-- 2: APP_USER: database user who owns PIT_UI (Schema of the APEX-Workspace you install into)
-- 3: APEX workspace name, into which... | true |
d9a3ef21c065f52124924cd6f05a14d3819f54b0 | SQL | radtek/Telecommunication | /GSM/DataBase/FUNCTION/TELETIE_PAYMENT.sql | WINDOWS-1251 | 4,276 | 2.75 | 3 | [] | no_license | CREATE OR REPLACE FUNCTION TELETIE_PAYMENT(phonenr IN VARCHAR2, --
amount IN VARCHAR2, --
numpay IN VARCHAR2, --
paycom IN VARCHAR2, --
... | true |
ed0ee61ec39a04896666d80fbe1511dba35de8ce | SQL | dahas/makeup2-cli | /_sources/db/SampleDB.sql | UTF-8 | 1,956 | 3.34375 | 3 | [
"ISC"
] | permissive |
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET NAMES utf8 */;
/*!50503 SET NAMES utf8mb4 */;
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_M... | true |
e360c445e0fb6cba7bc3b08d8f0015fab53a6cf6 | SQL | vladlazarev1998/webby-lab-test | /webby_lab_db.sql | UTF-8 | 2,740 | 3.15625 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Хост: 127.0.0.1:3306
-- Время создания: Янв 22 2021 г., 11:20
-- Версия сервера: 10.3.22-MariaDB
-- Версия PHP: 7.4.5
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIEN... | true |
3a1f1be1221b992c7eee0c06852718175f34de01 | SQL | henrique-r-luz/pessoal | /db/db_1.sql | UTF-8 | 688 | 3.65625 | 4 | [
"BSD-3-Clause"
] | permissive | -- tipos de investimentos da corretora
create table categorias(
id int NOT NULL primary key,
nome text
);
-- relata as atualizações do sistema
create table atualizacao(
id serial primary key,
data date,
valor_total real
);
--banco titlos financeiros
create table titulos(
id serial primary key,
ativo text... | true |
c3afa4694091101db8cb0884c1ce2d61147469a8 | SQL | darktux/alcaldiafinal | /registrofamiliar/tablas_registrofamiliar.sql | UTF-8 | 7,217 | 2.90625 | 3 | [] | no_license |
--
-- PERSONA
--
create table rf_persona(
cod_per serial,
nom varchar(30),
ape1 varchar(20),
ape2 varchar(20),
sex char,
fec_nac date,
dui varchar(10),
nit varchar(20),
tel1 varchar(10),
tel2 varchar(10),
dep varchar(12),
mun varchar(30),
dir text,
ocu varchar(40),
est_civ varchar(30),
primary key(co... | true |
0fe30fbfafeba086c1c8eacd6c0b56567fbd51ff | SQL | alex-bogomolov/oracle_labs | /tables/create_investment_data.sql | UTF-8 | 507 | 3.578125 | 4 | [] | no_license | CREATE TABLE investment_data
(
id NUMBER(6),
investor_id NUMBER(6) NOT NULL,
investment_id NUMBER(6) NOT NULL,
investment_date DATE NOT NULL,
invest_amount NUMBER(9),
CONSTRAINT investment_data_pk PRIMARY KEY(id),
CONSTRAINT fk_investor
FO... | true |
b43c837101c57e426c6d447edde15fa9ae4445a1 | SQL | RivicVisuals/harvard-cs50 | /pset7/movies/9.sql | UTF-8 | 162 | 3.421875 | 3 | [] | no_license | SELECT DISTINCT name
FROM people
JOIN stars ON stars.person_id = people.id
JOIN movies ON movies.id = stars.movie_id
WHERE movies.year=2004
ORDER BY birth ASC;
| true |
4716d254486876309c074968994c747639947c62 | SQL | IhorDovhyi/ASP.Net-Core-MVC | /sql/Name of course and related students.sql | UTF-8 | 255 | 3.671875 | 4 | [] | no_license | USE UNIVERSITY;
SELECT COURSES.NAME AS 'COURSE', STUDENTS.FIRST_NAME + ' '+ STUDENTS.LAST_NAME AS 'STUDENTS'
FROM COURSES
LEFT JOIN GROUPS ON COURSES.COURSE_ID = GROUPS.COURSE_ID
LEFT JOIN STUDENTS ON GROUPS.GROUP_ID = STUDENTS.GROUP_ID
ORDER BY 'COURSE' | true |
0961c36829f0cad4bc76ad38df0d71715321a41a | SQL | saurabhsoni5893/Leetcode_Database | /43_570_Managers_with_at_Least_5_Direct_Reports.sql | UTF-8 | 1,786 | 4.40625 | 4 | [] | no_license | /*
The Employee table holds all employees including their managers. Every employee has an Id, and there is also a column for the manager Id.
+------+----------+-----------+----------+
|Id |Name |Department |ManagerId |
+------+----------+-----------+----------+
|101 |John |A |null |
|102 |Dan... | true |
4dc385620b865b9111bca6fdf35e76c1fe2e3c7d | SQL | Xelopante/Brasserie_Clemence_liste_recettes | /brasserieclemence.sql | UTF-8 | 3,944 | 3.328125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.9.2
-- https://www.phpmyadmin.net/
--
-- Hôte : 127.0.0.1:3306
-- Généré le : Dim 18 oct. 2020 à 14:29
-- Version du serveur : 10.4.10-MariaDB
-- Version de PHP : 7.3.12
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!... | true |
f4dabd10aef560639d34b9fe3664ea5d090b67cf | SQL | alexthomas04/dynforms | /dyn_forms (1).sql | UTF-8 | 3,588 | 2.71875 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.1.14
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Jun 25, 2014 at 05:27 PM
-- Server version: 5.6.17
-- PHP Version: 5.5.12
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.