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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
dff684d6e17803df4d8f4e7b0e2921c6eae53c53 | SQL | nate9/lampstand | /resources/HCSB/HCSB_Colossians_sql_script.sql | UTF-8 | 16,225 | 2.8125 | 3 | [] | no_license | BEGIN TRANSACTION;
INSERT INTO BIBLE VALUES
('HCSB', 'Colossians', 1, 1, 'Paul, an apostle of Christ Jesus by God’s will, and Timothy our brother:');
INSERT INTO BIBLE VALUES
('HCSB', 'Colossians', 1, 2, 'To the saints and faithful brothers in Christ in Colossae. Grace to you and peace from God our Father.');
INSERT IN... | true |
79bc01c34d130aa2763ce96cee59fbdc88147ee1 | SQL | joyfulStalker/asso | /src/main/resources/Dump20180802/community_tt_community_praise.sql | UTF-8 | 2,763 | 3.1875 | 3 | [] | no_license | -- MySQL dump 10.13 Distrib 8.0.12, for Win64 (x86_64)
--
-- Host: localhost Database: community
-- ------------------------------------------------------
-- Server version 8.0.11
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/... | true |
807ccad4fac13da90b70c0a0f2d958198bfd7343 | SQL | Larry-Volz/22.3-SQL-Join-exercises | /data.sql | UTF-8 | 2,719 | 4 | 4 | [] | no_license | DROP DATABASE IF EXISTS joins_exercise;
CREATE DATABASE joins_exercise;
\c joins_exercise
CREATE TABLE owners (id SERIAL PRIMARY KEY, first_name TEXT, last_name TEXT);
CREATE TABLE vehicles (id SERIAL PRIMARY KEY, make TEXT, model TEXT, year INTEGER, price REAL, owner_id INTEGER REFERENCES owners (id));
INSERT INT... | true |
4b728fd59f829870d1a48ae76d8fbceeb58034a1 | SQL | MonicaGonzalez30/PresupuestosTI | /backend/db/dbPresupuestosTI.sql | UTF-8 | 4,408 | 3.703125 | 4 | [] | no_license | CREATE DATABASE presupuestosTI;
USE presupuestosTI;
--Usuarios
CREATE TABLE users(
idUser INT NOT NULL IDENTITY(1,1),
[user] VARCHAR(50) NOT NULL,
[password] VARCHAR(50) NOT NULL,
PRIMARY KEY (idUser)
);
--Registros usuarios
INSERT INTO users ([user],[password]) VALUES (
'AdminMonica','contraM30'
);
INSERT INTO... | true |
958ee4c6cda16fff6d6651dcfde8ec84b78d7725 | SQL | a1402980/SJS-does-more | /database/create_tables.sql | UTF-8 | 972 | 3.15625 | 3 | [] | no_license | CREATE TABLE tapahtuma
(tapahtumaid INTEGER NOT NULL AUTO_INCREMENT
, nimi VARCHAR(255) not null
, kuvaus varchar(500) not null
, pvm date not null
, aika time not null
, paikka varchar(255) not null
, maxosallistujalkm integer
, jarjestaja_id integer
, kategoria varchar(255)
, CONSTRAINT pk_tapaht PRIMARY KEY (tapahtu... | true |
176f1e2eb9d0ff1159d6bcb70b5cea98344ac7bb | SQL | quintenpalmer/onyerfeat | /src/libpathfinder/db/bootstrap.sql | UTF-8 | 860 | 3.484375 | 3 | [] | no_license | PRAGMA foreign_keys=OFF;
BEGIN TRANSACTION;
CREATE TABLE characters ( id INTEGER PRIMARY KEY, name TEXT NOT NULL , ability_score_set_id integer NOT NULL, alignment_order text not null, alignment_morality text not null, FOREIGN KEY(ability_score_set_id) references ability_score_sets(id));
INSERT INTO "characters" VALUES... | true |
d0d8f70ffeff8bceb83b83116acec82fec9363ff | SQL | schunt1/ATAF | /VIEWS/ATAF_TEST_CONDITION_V.sql | UTF-8 | 4,621 | 3.390625 | 3 | [
"MIT"
] | permissive | CREATE OR REPLACE FORCE VIEW "ATAF_TEST_CONDITION_V" ("DATA_ITEM_ID", "DATA_ID", "TEST_COND_ID", "ROW_NUMBER", "CON_SORT_ORDER", "PAGE_ID", "OUTCOME_PAGE_ID", "ACTION_ID", "OUTCOME_ID", "DATA_ATTRIBUTE", "TEST_DATA_ID", "TEST_CASE_ID", "TEST_CASE", "NOTES", "ID", "DOM_ID", "NAME", "LABEL", "ELEMENT_TYPE", "REGION_ID", ... | true |
4d55fabd5c1a8b3b641b0443cb5b409ab550ac14 | SQL | hoangbao1122/C0421G1_HoangGiaBao_Modude3 | /_05_view_index_stored/thuchanh/view.sql | UTF-8 | 327 | 3.296875 | 3 | [] | no_license | USE classicmodels;
CREATE VIEW customer_views
AS
SELECT customerNumber, customerName, phone
FROM customers;
select *
from customer_views;
CREATE OR REPLACE VIEW customer_views
AS
SELECT customerNumber, customerName, contactFirstName, contactLastName, phone
FROM customers
WHERE city = 'Nantes';
DROP VIEW customer... | true |
3060af64a1f532b8161a4d66557ddc61312170c5 | SQL | nicooffee/Yaco-app | /bdd/cons_ops.sql | UTF-8 | 2,639 | 3.375 | 3 | [] | no_license | SELECT PUBLIC."USUARIO".usu_id,est_tipo,usu_fecha_registro,est_exp_total
FROM PUBLIC."USUARIO"
INNER JOIN PUBLIC."ESTUDIANTE" ON PUBLIC."USUARIO".usu_id = PUBLIC."ESTUDIANTE".usu_id
WHERE PUBLIC."USUARIO".usu_id = 'Nicoffee';
--Existe registro de usuarios en USUARIO_PALABRA x palabra
SELECT EXISTS(SELECT 1 FROM PUBLIC... | true |
1ff738fb25cde8ef6213e5a3598fea40c017585f | SQL | cnxtech/security-manager | /db/updates/update-db-to-v9.sql | UTF-8 | 999 | 3.65625 | 4 | [
"Apache-2.0"
] | permissive | PRAGMA foreign_keys=OFF;
BEGIN EXCLUSIVE TRANSACTION;
PRAGMA user_version = 9;
CREATE TABLE shared_path_new (
path_id INTEGER PRIMARY KEY,
path VARCHAR NOT NULL,
path_label VARCHAR NOT NULL,
owner_app_name TEXT NOT NULL,
UNIQUE (path)
);
CREATE TABLE app_private_sharing_new (
target_app_name TEXT NOT NULL,
path_id ... | true |
a466160ab1e2e0f945e54765c3a9aa824fe859c1 | SQL | zelinDavid/DarkGod | /depend/darkgod.sql | UTF-8 | 2,011 | 2.953125 | 3 | [] | no_license | /*
Navicat MySQL Data Transfer
Source Server : localhost_3306
Source Server Version : 50617
Source Host : localhost:3306
Source Database : darkgod
Target Server Type : MYSQL
Target Server Version : 50617
File Encoding : 65001
Date: 2019-06-22 16:40:57
*/
SET FOREIGN_KEY_CHECKS=0;
... | true |
8cfe2b10178cc296cebb5d46ace6b7abf25636e6 | SQL | zz0733/op-gbsql | /history/sql_back/master/V1.0.1.0088__C_settlement_rebate_agent.sql | UTF-8 | 2,273 | 3.1875 | 3 | [] | no_license | -- auto gen by cheery 2015-09-21 06:06:08
--代理返佣结算表
CREATE TABLE IF NOT EXISTS "settlement_rebate_agent" (
"id" SERIAL4 NOT NULL,
"settlement_rabate_id" int4,
"agent_id" int4,
"agent_name" varchar(32),
"effective_player" int4,
"effective_transaction" numeric(20,2),
"profit_loss" numeric(20,2),
"deposit_amount" numeri... | true |
751f40e18704923eada62f8c82fda23fad5e8178 | SQL | quanquanfly/ukma_courses | /postgres/tables/courses_ratings.sql | UTF-8 | 264 | 3.171875 | 3 | [] | no_license | create table courses_ratings (
id bigserial primary key,
course_id bigint not null references courses,
rating_id bigint not null references ratings,
user_id bigint not null references users,
value int check (value is null or (value >= 1 and value <= 10))
); | true |
5fb839c0ec41e10b53b6249262e62ddcd9ec1751 | SQL | amitsukralia/DatabaseScripts | /Drop_Extended_Properties.sql | UTF-8 | 692 | 3.453125 | 3 | [] | no_license | select 'EXEC sp_dropextendedproperty
@name = ''MS_Description''
,@level0type = ''schema''
,@level0name = ' + object_schema_name(extended_properties.major_id) + '
,@level1type = ''table''
,@level1name = ' + object_name(extended_properties.major_id) + '
,@level2type = ''column''
,@level2name = ' + co... | true |
3f5583ab9fe445132053227108feb3545a2f1dc7 | SQL | huyfr/btViewIndexProcedure | /btViewIndexProcedure.sql | UTF-8 | 2,382 | 4.03125 | 4 | [] | no_license | create table `products` (
`id` int not null,
`productcode` int not null,
`productname` varchar(100) not null,
`productprice` double not null,
`productamount` varchar(100) not null,
`productdescription` text,
`productstatus` varchar(100) not null
) engine=innodb default charset=utf8mb4 collate=utf8mb4_0900... | true |
356daf1e814aa43cdf0c2a717637d860be0dd270 | SQL | fzmeng/HiveExample | /data/employees.sql | UTF-8 | 13,201 | 3.765625 | 4 | [] | no_license | #hive 练习3
#data employees.txt
create database practice2;
show databases;
use practice2;
create table if not EXISTS employees(
name string,
salary string,
subordinates array<String>,
deductions map<String,Float>,
address struct<street:string,city:string,state:string,zip:int>
)
row format delimited
fields termina... | true |
38f56a46129595b2f004ef16f6abe0282d2c320c | SQL | fsk119/flink-sql-etl | /etl-job/src/main/resources/job-sql-1.10/kafka2filesystemandhive/Csv2HiveSink.sql | UTF-8 | 655 | 3.09375 | 3 | [] | no_license | create table csv( user_name VARCHAR, is_new BOOLEAN, content VARCHAR) with ( 'connector.type' = 'filesystem',
'connector.path' = '/Users/bang/sourcecode/project/flink-sql-etl/data-generator/src/main/resources/user.csv',
'format.type' = 'csv')
-- table user_ino_no_part is a hive table, we create hive table first, an... | true |
dc9b85e38dfd5c49e4b272a870353d33a4dd0323 | SQL | cqframework/cqf-tooling | /tooling/src/main/resources/org/opencds/cqf/tooling/modelinfo/USCoreHelpers-3.1.0.cql | UTF-8 | 4,079 | 3.203125 | 3 | [
"Apache-2.0",
"LicenseRef-scancode-warranty-disclaimer"
] | permissive | library USCoreHelpers version '3.1.0'
using FHIR version '4.0.1'
define function ToInterval(period FHIR.Period):
if period is null then
null
else
if period."start" is null then
Interval(period."start".value, period."end".value]
else
Interval[period."start".value... | true |
3ba1f3cbaa13b303b27d0c6515e769989ea0f901 | SQL | 862775170/mpool | /btc.sql | UTF-8 | 8,241 | 3.3125 | 3 | [] | no_license | CREATE TABLE `found_blocks` (
`id` INT ( 11 ) NOT NULL AUTO_INCREMENT,#爆块的id号
`puid` INT ( 11 ) NOT NULL,# 爆块的用户id
`worker_id` BIGINT ( 20 ) NOT NULL,# 爆块的矿机矿工号
`worker_full_name` VARCHAR ( 50 ) NOT NULL,# 爆块的矿机矿工名
`job_id` BIGINT ( 20 ) UNSIGNED NOT NULL,# 工作id
`height` INT ( 11 ) NOT NULL,# 区块高度
`... | true |
c67559a0de178db6fe7abedfe40b658e65bb9c75 | SQL | IAmAaronHatch/sim2master | /db/seed.sql | UTF-8 | 454 | 3.109375 | 3 | [] | no_license | create table houses (
id serial primary key,
name varchar(20),
address text,
city text,
state varchar(2),
zipcode integer
);
insert into houses (
name, address, city, state, zipcode
) values (
'Aaron', '123 fake lane drive', 'Salt Lake City', 'UT', 90000
), ('Hannah', '124 fakest lane d... | true |
816d460bbc84653a7ba2b2f314dd89bb756be945 | SQL | aschaetzle/S2RDF | /QueryTranslator/YagoQuerySet/sql_010/Q2-3--SO-OS-SS-VP__yago.sql | UTF-8 | 3,189 | 3.265625 | 3 | [
"Apache-2.0"
] | permissive | SELECT tab0.name AS name , tab7.a AS a , tab3.m1 AS m1 , tab4.movie AS movie , tab9.m2 AS m2 , tab1.actor AS actor
FROM (SELECT sub AS m2
FROM _L_isLocatedIn_B_$$10$$
WHERE obj = '<United_States>'
) tab9
JOIN (SELECT sub AS a , obj AS m2
FROM _L_directed_B_$$8$$
) tab7
ON(tab9.m2=tab7.m2)
JOIN ... | true |
7538f3b5b54582f4776b228dc3037bd4d8258a3f | SQL | jorch17/Tulanmap | /Tulanmap_oauth/data/schema.sql | UTF-8 | 2,124 | 3.71875 | 4 | [] | no_license | CREATE DATABASE demo_google;
USE demo_google;
CREATE TABLE users(
user varchar(64) NOT NULL PRIMARY KEY,
privilege integer NOT NULL DEFAULT -1,
status integer NOT NULL DEFAULT 1,
username varchar(150) NOT NULL,
email varchar(100) NOT NULL,
other_data varchar(50) NOT NULL,
user_hash varchar... | true |
ee92e3aabefb51d01db1faa5ca902a0a8cccb4f9 | SQL | delphi1977/NewDicomPACS | /medica/UPDATE_DB/insert into med.tcalc_prih_rash.sql | WINDOWS-1251 | 2,124 | 3.296875 | 3 | [] | no_license |
drop INDEX med.tcalc_pr_group_by
/
drop INDEX med.tcalc_pr_mogroup_date
/
drop INDEX med.tcalc_pr_dpid
/
truncate table med.tcalc_prih_rash
/
alter trigger med.tcalc_pr_ins disable
/
insert into med.tcalc_prih_rash cpr (fk_kartid, fn_kol, fd_date, fk_mogroup,
... | true |
67aafe2d63e5cbc000ba2c096166c64ed2b9b3b8 | SQL | penicillin0/SQL-from-zero | /sqledi2_Sample/Sample/CreateTable/PostgreSQL/CreateTableShohin.sql | SHIFT_JIS | 1,158 | 2.96875 | 3 | [] | no_license | CREATE TABLE Shohin (
shohin_id CHAR(4) NOT NULL,
shohin_mei VARCHAR(100) NOT NULL,
shohin_bunrui VARCHAR(32) NOT NULL,
hanbai_tanka INTEGER,
shiire_tanka INTEGER,
torokubi DATE,
PRIMARY KEY (shohin_id)
);
BEGIN TRANSACTION;
INSERT INTO Shohin
VALUES ('0001', 'TVc', 'ߕ', 1000, 500, '2009-09... | true |
17ac8402b30a7488f0dbc184c0b1147282130ec3 | SQL | gbax/messaging-rest-service | /src/main/resources/db/migration/initDB.sql | UTF-8 | 2,868 | 4.0625 | 4 | [] | no_license | CREATE SEQUENCE IF NOT EXISTS SEQ_USER_TABLE;
DROP TABLE IF EXISTS user;
CREATE TABLE user (
ID INT DEFAULT (NEXT VALUE FOR SEQ_USER_TABLE) PRIMARY KEY NOT NULL,
login VARCHAR(255) NOT NULL,
password VARCHAR(255) NOT NU... | true |
2a244c076274954bf8eb9c6a4d4dedd1407bb34b | SQL | bmedford01/SQL-Challenge | /EmployeeSQL/queries.sql | UTF-8 | 2,655 | 4.625 | 5 | [] | no_license | --List the following details of each employee: employee number, last name, first name, sex, and salary.
SELECT employee.emp_no, employee.last_name, employee.first_name, employee.sex, salaries.salary
FROM employee
JOIN salaries ON
employee.emp_no=salaries.emp_no;
--List first name, last name, and hire date for employee... | true |
dbe2c42dc1b3cd986b72778c8f32cf8a9d319d23 | SQL | meridacindy98/ProyectoSyone | /src/test/resources/schema.sql | UTF-8 | 2,579 | 3.78125 | 4 | [] | no_license | --creacion de las tablas
DROP TABLE IF EXISTS automovilopcional;
DROP TABLE IF EXISTS automovil;
DROP TABLE IF EXISTS tipoauto;
DROP TABLE IF EXISTS opcional;
--TipoAuto
create table tipoauto(
tipo_Auto_Id int IDENTITY(1,1) primary key not null,
nombre varchar(50),
precio decimal
);
--Opcional
create table opcio... | true |
64fa7a2e55f9d2bb385023e666ece8b1dcb6522d | SQL | mohammedhamza1/PHP-MySQL-CMS | /cms_project/website.sql | UTF-8 | 3,370 | 3.109375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.5.1
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Aug 30, 2017 at 05:28 PM
-- 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 |
dd4abf1e32c081f426ad73be5f54d3390880506a | SQL | Ann2206/DataMola | /lab_8.sql | UTF-8 | 26,163 | 2.59375 | 3 | [] | no_license | CREATE TABLESPACE ts_sa_customer_data_01
DATAFILE '/oracle/u02/oradata/DMORCL19DB/astepanenko_db/ts_sa_customer_data_01.dat'
SIZE 150M
AUTOEXTEND ON NEXT 50M
SEGMENT SPACE MANAGEMENT AUTO;
CREATE TABLESPACE ts_sa_sales_data_01
DATAFILE '/oracle/u02/oradata/DMORCL19DB/astepanenko_db/ts_sa_sales_data_01.dat'... | true |
331792109150a6722aa8e553906784c525120b3f | SQL | jem4488/battle-blocks | /Database/MinedResource.sql | UTF-8 | 365 | 3.234375 | 3 | [] | no_license | CREATE TABLE MinedResource
(
MinedResourceID int IDENTITY PRIMARY KEY,
CompetitorID int,
MinedResourceTypeID int,
Color int,
Used bit DEFAULT(0)
);
DROP TABLE MinedResource
INSERT INTO MinedResource (CompetitorID, MinedResourceTypeID, Color) (
SELECT C.CompetitorID, 2, 4
FROM Competitor C
WHERE UserNa... | true |
055ca7815ed8b381454a22feaad83037ec9ee53d | SQL | seffalabdelaziz/www | /upgrade_5.0 to 6.0/import_tables/avig_translate.sql | UTF-8 | 75,180 | 3.0625 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.8.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Feb 08, 2019 at 01:41 PM
-- Server version: 10.1.33-MariaDB
-- PHP Version: 7.2.6
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD... | true |
d21334d7df203e2b3719fe689035581fb7ab3bd2 | SQL | InvisibleHeart/ssm_SMBMS | /src/main/resources/smbms3.sql | UTF-8 | 15,090 | 3.65625 | 4 | [
"Apache-2.0"
] | permissive | CREATE DATABASE IF NOT EXISTS `smbms`;
USE `smbms`;
/*创建 `smbms_address` */
DROP TABLE IF EXISTS `smbms_address`;
CREATE TABLE `smbms_address` (
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键ID',
`contact` varchar(15) COLLATE utf8_unicode_ci NOT NULL COMMENT '联系人姓名',
`addressDesc` varchar(50) COLLATE utf8... | true |
818254a81ae965febbf23eadc0aea7faab7e22d7 | SQL | dimas-lex/autostop | /autostop/db.sql | UTF-8 | 863 | 2.703125 | 3 | [
"Apache-2.0"
] | permissive | CREATE DATABASE autostop
DEFAULT CHARACTER SET utf8
DEFAULT COLLATE utf8_general_ci;
INSERT INTO auto_auser
VALUES (2, "w32323", "2014-05-20 15:29:08", 0, "lion", "", "", "test@ya.ru", 0,1,"2014-05-20 15:29:08",0, "2014-05-20 15:29:08" , "2014-05-20 15:29:08");
INSERT INTO auto_auser
VALUES (3, "ewdewd", "2014-05-... | true |
8bdd24a19d1aadace9c080f6f3f8fecde88ab1c5 | SQL | Alvan-Tan/Simple-online-purchasing-website | /account.sql | UTF-8 | 2,295 | 2.9375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.7.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1:3306
-- Generation Time: Jun 12, 2020 at 02:17 AM
-- Server version: 5.7.19
-- PHP Version: 7.1.9
-- SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
-- SET AUTOCOMMIT = 0;
-- START TRANSACTION;
-- SET time_zone = "+00:00";
-- /*!401... | true |
b3665703aac5c16ac5301bdcd4ec2c84e622cdc1 | SQL | boutss/hannong | /conf/evolutions/default/1.sql | UTF-8 | 491 | 2.828125 | 3 | [] | no_license |
# --- !Ups
create table account (
name varchar(255) not null,
password varchar(255),
constraint pk_account primary key (name)
);
create table connexion (
name varchar(255) not null,
date TIMESTAMP,
adresseip varchar(255),
... | true |
ffa735bed3e8034f15bf9536651ff302577a8a07 | SQL | sozemego/klucher | /Klucher/src/main/resources/db/migration/V3__klucher.sql | UTF-8 | 207 | 3.5 | 4 | [
"MIT"
] | permissive | CREATE TABLE user_likes (
user_id bigint(20) NOT NULL,
likes bigint(20) DEFAULT NULL,
KEY `FKuserlikekey` (`user_id`),
CONSTRAINT `FKuserlikekey` FOREIGN KEY (`user_id`) REFERENCES `user` (`id`)
) | true |
51ff50d85ca991fadc4aa1ed705dfaf6454c6b3f | SQL | rumel123/LouGehUniversity | /lou-geh-university.sql | UTF-8 | 6,583 | 3.09375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.8.3
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Dec 03, 2020 at 11:25 AM
-- Server version: 10.1.37-MariaDB
-- PHP Version: 7.2.11
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OL... | true |
9aa66814c9566372dbd940fe3c9c274afed1934f | SQL | DemDSC/Zseis-practices- | /z06/firma.sql | UTF-8 | 521 | 2.625 | 3 | [] | no_license | CREATE DATABASE firma;
CREATE TABLE `dostawcy` (
`id_dostawcy` int(11) NOT NULL,
`adres` varchar(11) NOT NULL,
`telefon` bigint(20) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
CREATE TABLE `magazyn` (
`id_towaru` int(11) NOT NULL,
`liczba_sztuk` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4... | true |
d5edbc40439798b1f6e0129be704527a7a5621b7 | SQL | gordonje/multco_prop_sales | /sql/cash_buyers_sellers.sql | UTF-8 | 1,703 | 4.40625 | 4 | [] | no_license | -- create a table of cash buyers
CREATE TABLE cash_buyers AS
SELECT
buyer
, COUNT(*) AS num_cash_buys
, SUM(consideration_amount) AS total_cash_spent
FROM cash_sales_matches
GROUP BY buyer
ORDER BY COUNT(*) DESC;
-- create a table of cash sellers
CREATE TABLE cash_sellers AS
SELECT
... | true |
bc4b366756b8a3e1237a9a264d8a6d3c6ae625e7 | SQL | SQLDBAWithABeard/Presentations | /2022/DataGrillen/scripts/QueryStoreInvestigation.sql | UTF-8 | 260 | 3.484375 | 3 | [] | no_license | SELECT Txt.query_text_id, Txt.query_sql_text, Pl.plan_id, Qry.*
FROM sys.query_store_plan AS Pl
INNER JOIN sys.query_store_query AS Qry
ON Pl.query_id = Qry.query_id
INNER JOIN sys.query_store_query_text AS Txt
ON Qry.query_text_id = Txt.query_text_id; | true |
1c5a8140e81513957d7dc7291beb2e59a827f5e7 | SQL | MrTechi-Dev/Data_base_fundamentals | /Select.sql | UTF-8 | 424 | 2.640625 | 3 | [] | no_license | SELECT se encarga de proyectar o mostrar datos.
El nombre de las columnas o campos que estamos consultando puede ser cambiado utilizando AS después del nombre del campo y poniendo el nuevo que queremos tener:
SELECT titulo AS encabezado
FROM posts;
Existe una función de SELECT para poder contar la cantidad d... | true |
f7ab7d8dc2608bb554c67bd28e5acc6369e099cc | SQL | Oddy-Nuff-Da-Snow-Leopard/Oracle-PL-SQL | /Scripts/L6.sql | UTF-8 | 1,086 | 3.125 | 3 | [] | no_license | --Task01
SELECT SUM(VALUE) FROM v$SGA;
--Task02
SELECT * FROM v$SGA;
--Task03
SELECT component, granule_size FROM v$SGA_dynamic_components;
--Task04
SELECT current_size FROM v$SGA_dynamic_free_memory;
--Task05
SELECT component, granule_size FROM v$SGA_dynamic_components WHERE component LIKE '%cache%';
--Task06
CRE... | true |
1aa39fd67c6aa7a1149eb121e51ffaf95ce54d2a | SQL | cckmit/xinfu | /ccms/WebContent/WEB-INF/action/project/fitness/guestget/favorites/searchfavorites/query-favorites.sql | UTF-8 | 426 | 3.21875 | 3 | [] | no_license | select
tuid,
title,
(case when updated is null then created else updated end) as updated,
'1' as type,
'公告' as typename,
created
from cc_hkb_notice
where status = 2 and org_id = ${def:org}
union
select
tuid,
title,
(case when updated is null then created else updated end) as updated,
'2' as type,
'话术' as ... | true |
e55bddceedaa3489bc71d43ae1ce87300127168e | SQL | Ggaolili/test | /2.sql | UTF-8 | 279 | 3.171875 | 3 | [] | no_license | /*select * from student
left join college on
student.collegeId=college.collegeId
where college.collegeId is null
union
select * from college
right join student on
student.collegeId=college.collegeId
where college.collegeId is null;*/
select *from profit_view
where year=2011; | true |
45a9c3597a4d20ddaf08a1b305f987bcfe89682c | SQL | darotbgu/HttpProxy | /config/migrations/init.sql | UTF-8 | 508 | 3.25 | 3 | [] | no_license | CREATE TABLE IF NOT EXISTS whitelist (
"id" INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
"type" TEXT NOT NULL,
"value" TEXT NOT NULL,
UNIQUE ("type", "value")
);
CREATE TABLE IF NOT EXISTS blacklist (
"id" INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
"type" TEXT NOT NULL,
"value" TEXT NOT NU... | true |
0a36a56b19ce85adc74f0bf99ea9ca27fa707276 | SQL | jsewai/GroupProject_ERD_And_Implimentation | /A2_SQL_SCRIPT.sql | UTF-8 | 4,432 | 3.625 | 4 | [] | no_license | -- ***********************
-- Group: F
-- Name: Woohyuk Kim - 121968176,
-- Junya Sewai - 013019153,
-- Antonio Tersigni - 037872140
-- Date: December 1st, 2018
-- Purpose: Assignment 2 - DBS301
-- ***********************
CREATE TABLE condo
(
condo_id NUMBER(6,0),
num_of_bedrooms NUMBER ... | true |
d74808bd4aa5f2a4fab1ef51139e631b8796b256 | SQL | jdkennedy45/3300 | /3300 SQL ASSIGN4/problem4.sql | UTF-8 | 1,180 | 4.09375 | 4 | [] | no_license | execute procedure drop_if_exists('trigger', 'tr_salary_class_update');
commit work;
set term # ;
create trigger tr_salary_class_update for EMPLOYEE_TESTER after update
as
DECLARE old_class VARCHAR(5);
DECLARE new_class VARCHAR(5);
BEGIN
-- below is an example for calling the stored procedure and
-- putting the retur... | true |
b4fbb06226bbc16782de6e68f95d7f93d23b844c | SQL | mark-mediware/carepoint | /DB_explore.sql | UTF-8 | 332 | 2.96875 | 3 | [] | no_license | -- Database Exploration for table information/data
-- filetype: SQL Server (T-SQL)
SELECT TOP(100)
*
FROM staging.dbo.Patient
;
--Patient contains basic demographics like name, SSN, gender (1 = male), DOB, MRN, Patientid (key),
SELECT COUNT(DISTINCT PatientKey)
from staging.dbo.Patient
-- 58 million p... | true |
571872c8c0bf14236ae113299975ff93c89fc532 | SQL | J3C118146/PABW | /Praktikum02/pabw (1).sql | UTF-8 | 1,735 | 2.984375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Waktu pembuatan: 15 Okt 2020 pada 08.55
-- Versi server: 10.4.11-MariaDB
-- Versi PHP: 7.4.4
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CH... | true |
1974a746bec91724bf8edb9632b883be99b85cd0 | SQL | zz0733/op-gbsql | /history/sql_back/master/V1.0.1.0146__A_notice_sign.sql | UTF-8 | 1,296 | 3.40625 | 3 | [] | no_license | -- auto gen by cheery 2015-10-27 20:01:49
--修改系统消息标记表名
ALTER TABLE IF EXISTS notice_sign rename to station_letter_sign;
--存款表新增玩家填写收款账号、玩家填写收款姓名字段
DROP VIEW IF EXISTS v_player_recharge;
select redo_sqls($$
ALTER TABLE player_recharge ADD COLUMN receive_account varchar(50);
ALTER TABLE player_recharge ADD COLUMN r... | true |
747b3790b735fdde59bc249df49daea1fa790d6d | SQL | eri114/SpringTutorialProject | /src/main/resources/data.sql | UTF-8 | 2,442 | 3.421875 | 3 | [] | no_license | INSERT INTO usr (user_id, first_name, last_name, role_name, password)
VALUES ('taro-yamada', '太郎', '山田', 'USER', '$2a$10$oxSJl.keBwxmsMLkcT9lPeAIxfNTPNQxpeywMrF7A3kVszwUTqfTK')/;
INSERT INTO usr (user_id, first_name, last_name, role_name, password)
VALUES ('aaaa', 'Aaa', 'Aaa', 'USER', '$2a$10$oxSJl.keBwxmsMLkcT9lPeAIx... | true |
84ed8f0dead40a6682252a84cfce73d0099328bb | SQL | gaomc66/saltynote-service | /src/main/resources/db/migration/V0_0_2__note.sql | UTF-8 | 523 | 3.125 | 3 | [
"MIT"
] | permissive | create table note
(
id varchar(40) not null primary key,
user_id varchar(40) NOT NULL,
text varchar(512) not null,
url varchar(512) not null,
note text,
is_page_o... | true |
5a02857fc9a247593362dea554a89c06cd8888d1 | SQL | xiaohuihuigh/Todolist | /mysql/create_table.sql | UTF-8 | 5,369 | 3.734375 | 4 | [] | no_license | use todo;
DROP TABLE task_info;
CREATE TABLE task_info
(
id integer PRIMARY KEY auto_increment, -- 唯一标示
title text NOT NULL, -- 标题
context text DEFAULT NULL, -- 内容
type integer DEFAULT 1, -- task的类型 1,2 todo|project
priori... | true |
a2653c8bcf400f0671967cd42cf69e11ee09e447 | SQL | PedroFernandez30/ProyectoFinal | /clontube1.sql | UTF-8 | 6,381 | 3.109375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Servidor: 127.0.0.1
-- Tiempo de generación: 09-06-2020 a las 18:41:56
-- Versión del servidor: 10.4.11-MariaDB
-- Versión de PHP: 7.4.6
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_... | true |
0303f70634ef0431e71b2348fd537f521b06616c | SQL | vmejiaec/setimimpq | /KCG/xDB/Schema Objects/Schemas/dbo/Programmability/Stored Procedures/Procs1/Apu_Oferta_Mano_Obra_Delete.proc.sql | UTF-8 | 923 | 3.09375 | 3 | [] | no_license | CREATE PROCEDURE dbo.Apu_Oferta_Mano_Obra_Delete
(
@Original_Id varchar(17),
@Original_Codigo varchar(200),
@Original_Apu_Oferta_Id varchar(17),
@Original_Apu_Mano_Obra_Id varchar(17),
@IsNull_Apu_Categoria_Id Int,
@Original_Apu_Categoria_Id varchar(17),
@Original_Apu_Indice_Id varchar(17),
@IsNull_Es... | true |
2721d4dd06a95551868c615dbe1654488613d17c | SQL | MrK3w/databazove-systemy1 | /Skript_Dotazy.sql | WINDOWS-1250 | 4,967 | 4.25 | 4 | [] | no_license | --SKUPINA 1
/*1;1;31;
Vpis vech zznam tabulky Person seazench podle Nicknamu.*/
SELECT *
FROM Person
ORDER BY Nickname
/*1;2;16;
Vypis vsech zaznamu tabulky splnenych achievmentu podle data*/
SELECT *
FROM Completed_Achievments
ORDER BY DAY(Finished_Date) DESC
/*1;3;1;
Vype prmrny pocet achievmentu.*/
S... | true |
ab616d0099dfaa6a531708c6a46efc3102f4f3ae | SQL | dominicbosch/vexp | /conf_server/db/virtual_room.sql | UTF-8 | 3,907 | 3.359375 | 3 | [] | no_license | # Tables used for virtual_room
# You can setup the database by
# mysql -u username -p -h hostname < virtual_room.sql
drop database virtual_room;
create database virtual_room;
use virtual_room;
GRANT usage on virtual_room to laborpage@'%' identified by "change_me";
GRANT usage on virtual_room to Controlle... | true |
c16a04f1205f2bd710f633463a8d31c0c5a9cba2 | SQL | marinfotache/Database-Logic-in-Business-Applications | /Oracle 9i2. Ghidul dezvoltarii aplicatiilor 2003/Cap11_Declansatoare/Listing11_20.sql | UTF-8 | 1,181 | 3.296875 | 3 | [] | no_license | DECLARE
TYPE t_nume_obiecte IS TABLE OF user_objects.object_name%TYPE
INDEX BY PLS_INTEGER ;
v_nume_obiecte t_nume_obiecte ;
TYPE t_tipuri_obiecte IS TABLE OF user_objects.object_type%TYPE
INDEX BY PLS_INTEGER ;
v_tipuri_obiecte t_tipuri_obiecte ;
v_sir VARCHAR2(200) ;
BEGIN
-- stocam in cei doi ve... | true |
3f1dead1a64c30ce004d516ec45d3c21eb1c8843 | SQL | syuaip/SQLHC | /SCRIPTS/015C-Parallelism-Check-3.sql | UTF-8 | 277 | 3.46875 | 3 | [
"MIT"
] | permissive | -- Tasks running in parallel (filtering out MARS requests below):
select * from sys.dm_os_tasks as t
where t.session_id in (
select t1.session_id
from sys.dm_os_tasks as t1
group by t1.session_id
having count(*) > 1
and min(t1.request_id) = max(t1.request_id));
| true |
500cff5bc3630a086d2518738fbc99a63f36c3ba | SQL | Jeff-Playground/LeetCode | /src/com/wen/FourthFifty/Department Top Three Salaries.sql | UTF-8 | 1,061 | 4.53125 | 5 | [] | no_license | # Write your MySQL query statement below
select d.name as Department, e1.Name as Employee, e1.Salary from Employee e1
join Department d on e1.DepartmentId=d.Id
where (SELECT COUNT(DISTINCT Salary) FROM Employee e2 WHERE e2.Salary > e1.Salary
AND e2.DepartmentId = d.Id) < 3
order by d.Name, e1.Salary DESC;
SELECT d.Nam... | true |
1a0ece4c55d26daa0131453f505b55e4323c28aa | SQL | beatriz-rodrig/turma33mysql | /Exercicios 21.09/Exercicio2Join.sql | UTF-8 | 3,799 | 3.8125 | 4 | [] | no_license | -- Atividade 2
-- Crie um banco de dados para um serviço de pizzaria de uma empresa, o nome do banco deverá ter
-- o seguinte nome db_pizzaria_legal, onde o sistema trabalhará com as informações dos produtos
-- desta empresa.
create database db_pizzaria_legal;
-- Crie uma tabela de categorias utilizando a habilidad... | true |
deff0aec7c2ca0beb9e4231e310c6df614c10e79 | SQL | sebastianrcnt/earglass | /query/StoredProcedure/create_Procedure_InsertNewTask.sql | UTF-8 | 1,820 | 3.203125 | 3 | [] | no_license | create
definer = team9@`%` procedure InsertNewTask(IN newTaskName varchar(45), IN newDescription text,
IN newMinPeriod int, IN newTaskDataTableName varchar(100),
IN newMaxDuplicatedRowRatio float, IN newMaxNullRati... | true |
559d9330f482f79f0da196f2f1d05d35dab409e8 | SQL | Derbyhill/EazyjetDB | /ezy_CheckIn.sql | UTF-8 | 1,802 | 3.125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.7.5
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Generation Time: Nov 07, 2018 at 11:23 AM
-- Server version: 10.1.36-MariaDB
-- PHP Version: 7.0.32
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OL... | true |
16e935d7c3b985e5f516a3220772e2f201ca72fc | SQL | yash-b/SouthernCaliforniaRailwaySystem | /server/CPSC531_RailwayDB.sql | UTF-8 | 9,791 | 3.125 | 3 | [] | no_license |
CREATE TABLE `department_info` (
`DeptID` int(11) NOT NULL,
`DeptName` varchar(255) NOT NULL,
`Description` varchar(255) NOT NULL
);
INSERT INTO `department_info` (`DeptID`, `DeptName`, `Description`) VALUES
(1700, 'Conductor', 'Train Drivers'),
(1701, 'Administration', 'Handles employees and web admin'),
(17... | true |
1fc04d879d71a3e860c01e9df4531d8819b68976 | SQL | nashifanhua/spring-vue-demo | /src/main/resources/test.sql | UTF-8 | 2,940 | 3.234375 | 3 | [] | no_license | /*
SQLyog Ultimate v12.5.0 (64 bit)
MySQL - 5.7.18-log : Database - test
*********************************************************************
*/
/*!40101 SET NAMES utf8 */;
/*!40101 SET SQL_MODE=''*/;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN... | true |
c5fc457285849efc6973ef4ceb11a68a05e996c4 | SQL | xunfeng191/-StockTrading | /config/history_trade_table.sql | UTF-8 | 2,713 | 3.234375 | 3 | [
"MIT"
] | permissive | /*
Navicat Premium Data Transfer
Source Server : localhost_3306
Source Server Type : MySQL
Source Server Version : 80011
Source Host : localhost:3306
Source Schema : stocktrading
Target Server Type : MySQL
Target Server Version : 80011
File Encoding : 65001
Date: 07/... | true |
f93a8a3cb5f880e428c0af98b28e4c8532a43243 | SQL | alexthomas2020/Euro-Cup-Data-Analysis | /sql_q3_sol.sql | UTF-8 | 221 | 2.828125 | 3 | [] | no_license | # 3. Write a SQL query to find the match number, date, and score for matches in which no
# stoppage time was added in the 1st half.
select match_no, play_date, goal_score from euro_cup_2016.match_mast
where stop1_sec =0; | true |
a59f55afbabcacbd69d3583e1cc9f926399b2088 | SQL | Anyi0958/blog | /mysql.sql | UTF-8 | 7,034 | 3.046875 | 3 | [] | no_license | set names utf8;
drop database if exists blog;
create database blog charset = utf8;
use blog;
#用户表
create table users(
uid int primary key auto_increment,
uname varchar(20) not null unique, #用户名
upwd varchar(20) not null, #密码
sex varchar(5) default '保密', #性别(男 女 保密)
tel int not null uniq... | true |
bbb3a1eb254be810741793046f5f70ff629ce304 | SQL | ketchupkungen/mini-mdb | /current-mysql-db-export/views.sql | UTF-8 | 7,022 | 4.3125 | 4 | [] | no_license | -- When exporting the database the views will get included
-- This file is only for saving "the actual VIEW-code
-- Why have this? cuz when mysql exports "already created VIEWS"
-- They become unreadable.
-- Proof/Example: select `p`.`id` AS `id`,`p`.`versionId` AS `versionId`,`p`.`changerId` AS `changerId`,`p`.`firstN... | true |
9baea210549764bab4573cd7dd4c38dc128127d5 | SQL | kammasairam/onlinequiz | /exam new godaddy pscdo code.sql | UTF-8 | 90,164 | 2.734375 | 3 | [
"Apache-2.0"
] | permissive | -- phpMyAdmin SQL Dump
-- version 4.8.3
-- https://www.phpmyadmin.net/
--
-- Host: localhost:3306
-- Generation Time: Jul 20, 2020 at 09:49 AM
-- Server version: 5.6.47-cll-lve
-- 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 ... | true |
27b5b93bd363080f05601cee10f5a2d684b29380 | SQL | fadygithub/holbertonschool-python | /0x13-SQL_more_queries/16-shows_by_genre.sql | UTF-8 | 250 | 4.03125 | 4 | [] | no_license | -- List shows and genres linked to that show
SELECT title, name
FROM tv_shows
LEFT JOIN tv_show_genres
ON tv_shows.id = tv_show_genres.show_id
LEFT JOIN tv_genres
ON tv_show_genres.genre_id = tv_genres.id
ORDER BY title, name;
| true |
f9fb5af44a453525f9408e96aa624b7615a4ae7d | SQL | hooninfinity/OneDayProject | /다이어트프로젝트/관리자(2021-05-10).sql | UTF-8 | 313 | 2.765625 | 3 | [] | no_license | -- 여기는 관리자 접속
CREATE TABLESPACE FoodDB
DATAFILE 'C:/oraclexe/data/food.dbf'
SIZE 1M AUTOEXTEND ON NEXT 1K;
CREATE USER food IDENTIFIED BY food
DEFAULT TABLESPACE FoodDB;
GRANT DBA TO food;
DROP TABLESPACE FoodDB
INCLUDING CONTENTS AND DATAFILES
CASCADE CONSTRAINTS;
DROP USER food CASCADE; | true |
d7b7bada7654b0a672cfb8033ff7f3576c420b96 | SQL | 423618259/common-admin | /sql/common-admin.sql | UTF-8 | 17,250 | 3.1875 | 3 | [
"Apache-2.0"
] | permissive | /*
Navicat MySQL Data Transfer
Source Server : mysql
Source Server Version : 50641
Source Host : 172.26.3.74:3306
Source Database : admin
Target Server Type : MYSQL
Target Server Version : 50641
File Encoding : 65001
Date: 2019-03-15 16:17:25
*/
SET FOREIGN_KEY_CHECKS=0;
-- -----... | true |
c13cf481f0680859da66852444ab0ebe10ca9699 | SQL | clickyman1142/ElectronicStore | /electronicstore.sql | UTF-8 | 1,172 | 2.84375 | 3 | [] | no_license | /*
Navicat MySQL Data Transfer
Source Server : MySQL56
Source Server Version : 50626
Source Host : 127.0.0.1:3306
Source Database : electronicstore
Target Server Type : MYSQL
Target Server Version : 50626
File Encoding : 65001
Date: 2016-02-07 16:50:27
*/
SET FOREIGN_KEY_CHECKS=0;... | true |
f9364f7a5ce24262b60e2a5a350c1ed637aefd85 | SQL | phanirajl/datastax-bootcamp-project | /cql/cart.cql | UTF-8 | 1,318 | 3.328125 | 3 | [] | no_license | use atwaters_usa;
drop table if exists cart;
create table cart(
user_id uuid, // keyed by user ID (not referenced here)
items_count int static,
updated timestamp static,
sku uuid,
title text, // title for an item
imgurl text, // URL of image. URL of product itself is generated from SKU
currency text,
... | true |
100bddc8681cbf9ea5e54fd19c0b2da0281cace9 | SQL | paulofellix/crud-php-mysql-bootstrap | /album_store.sql | UTF-8 | 295 | 3 | 3 | [] | no_license | create database album_store;
use album_store;
create table album(
id int auto_increment,
ds_album varchar(100),
dt_album date,
primary key(id)
);
insert into album values (null,'album 1', '2016-01-10'), (null,'album 2', '1991-09-11'),(null,'album 3', '1998-10-30'); | true |
b45edecd794b8762a35dd7b3886a7ae39a437fa0 | SQL | sonilares/bibloteka | /bibloteka.sql | UTF-8 | 7,577 | 3.203125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.8.5
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Generation Time: Feb 14, 2021 at 08:41 PM
-- Server version: 10.1.39-MariaDB
-- PHP Version: 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 |
56a18a74dfa34aae5feb9a7e79df4add1ecaa30a | SQL | koroczr/IMDB_database-SQL-Tableau | /Queries.sql | UTF-8 | 7,346 | 3.265625 | 3 | [] | no_license | DROP DATABASE IF EXISTS imdb;
CREATE DATABASE imdb;
/*Create the tables !*/
#########################################################################################
USE imdb;
DROP TABLE IF EXISTS name_basics;
CREATE TABLE name_basics
(
nconst varchar(255) primary key not null,
primaryName varchar(255),
birthYear ... | true |
2c2f07fa190f3030284de4bbc177bc524c7945f9 | SQL | HaotianXue/SkySQL | /test/test.sql | UTF-8 | 1,146 | 3.703125 | 4 | [] | no_license | drop table student;
create table student
(
id int unique,
name varchar(32),
score float,
primary key(id)
);
create table student
(
id int unique,
name varchar(32),
score float,
primary key(id)
);
create index name_index on student (name);
create index name_index on student (name);
drop index name... | true |
9519731f8a7191f9f625d6c9f852f1b8f9c5520c | SQL | amjbot/megaton | /services/englishpepper/etc/schema.sql | UTF-8 | 853 | 3.25 | 3 | [] | no_license | SET SESSION storage_engine = "InnoDB";
SET SESSION time_zone = "+0:00";
ALTER DATABASE CHARACTER SET "utf8";
DROP TABLE IF EXISTS ideas;
CREATE TABLE IF NOT EXISTS ideas (
id INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
wiki VARBINARY(500) UNIQUE NOT NULL,
pos ENUM('verb','noun','adjective','adverb','pronoun',... | true |
b4c0a15ae471a56d89873ada3a3be4f390110f9a | SQL | radtek/abs3 | /sql/mmfo/bars/Data/doc_scheme.sql | WINDOWS-1251 | 17,605 | 2.546875 | 3 | [] | no_license | exec bc.home;
begin
insert into doc_scheme (ID, NAME, PRINT_ON_BLANK, TEMPLATE, HEADER, FOOTER, HEADER_EX, D_CLOSE, FR, FILE_NAME)
values ('WB_CREATE_DEPOSIT', ' ² 24/7', 0, null, null,null, null, null, 1, 'WB_CREATE_DEPOSIT.frx');
exception when dup_val_on_index then
update doc_scheme set NAME=' ² 2... | true |
3a4580b605a0d0b5f36468f8628a2feb64759334 | SQL | FilipePires98/ContinuousCare | /src/database/relational/init.sql | UTF-8 | 38,660 | 3.828125 | 4 | [
"MIT"
] | permissive | USE db;
-- USERS
CREATE USER pi2019cc_flaskapp IDENTIFIED BY "T)[-keLSh.9UFZcN58.+";
GRANT SELECT, INSERT, UPDATE, DELETE, EXECUTE, CREATE TEMPORARY TABLES
ON db.*
TO pi2019cc_flaskapp;
-- DDL
create table user (
user_id integer primary key auto_increment ,
-- PRIMARY KEY
username ... | true |
0324ef143dd4aaa6cad855853e955908a4804752 | SQL | nicmarti/lunatech-timekeeper | /src/main/resources/db/migration/V8__creation_timesheet.sql | UTF-8 | 1,103 | 3.609375 | 4 | [
"Apache-2.0"
] | permissive | DROP TABLE IF EXISTS timesheets_time_entry CASCADE ;
DROP TABLE IF EXISTS time_entry CASCADE ;
DROP TABLE IF EXISTS timesheets CASCADE ;
create table user_events
(
id int8 not null
constraint user_events_pkey
primary key,
description varchar(255),
enddatetime timestamp(6),
startdate... | true |
e123c269f8e686aa2ee4cd29f8a9c1a0c746e2e8 | SQL | iloveloveyou/utl_svg_report | /report_area.body.sql | UTF-8 | 4,232 | 2.703125 | 3 | [] | no_license | create or replace package body report_area
as
procedure area_reset_x (
page_in in out report_page.page,
area_in in varchar2
)
as
begin
page_in.areas(area_in).track.current_x := page_in.areas(area_in).start_x;
end area_reset_x;
procedure area_reset_y (
page_in in out report_page.page,
ar... | true |
960e2cb16c29ef99e3e8289d2334d65c6d271908 | SQL | domgoodwin/uni | /3A/EAT/coursework_db_2019(1).sql | UTF-8 | 4,310 | 2.953125 | 3 | [] | no_license | -- MySQL dump 10.13 Distrib 5.1.61, for redhat-linux-gnu (x86_64)
--
-- Host: localhost Database: bastinl_db
-- ------------------------------------------------------
-- Server version 5.1.61
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTE... | true |
ab6479d228570479b6b4841f590bab645af00d40 | SQL | anhtuan2461996/C1219H1_Dinh_Vu_Anh_Tuan | /module2/src/Data/Case Study/DataTable/FuramaData.sql | UTF-8 | 16,063 | 3.375 | 3 | [] | no_license | drop database if exists Furama;
create database Furama;
use Furama;
create table loai_khach(
id_loai_khach int auto_increment primary key,
ten_loai_khach nvarchar(255)
);
create table khach_hang(
id_khach_hang int auto_increment primary key,
id_loai_khach int,
foreign key (id_loai_khach) references loai_k... | true |
94a80d774e7d274c098352726c5df058aa6ab864 | SQL | CathyZhou0120/final_project_data_source | /artists_top_songs.sql | UTF-8 | 676 | 2.671875 | 3 | [] | no_license | DROP TABLE artists_top_songs;
CREATE EXTERNAL TABLE artists_top_songs
(song_id string,
Artist_name string,
Artist_id string,
album_id string,
danceability string,
energy string,
key string,
loudness string,
mode string,
speechiness string,
acousticness string,
instrumentalness string,
liveness string,
valence string,
... | true |
a35da9a8957a0b2cef62ee1999a39ad4296843ab | SQL | phucnguyen1995/phucnguyen1995-C0421G1__NguyenKhacPhuc_Module | /_05_/baitap/btbai5.sql | UTF-8 | 3,508 | 3.953125 | 4 | [] | no_license |
-- B1. Tạo database
drop database if exists bai5;
create database bai5;
use bai5;
create table product(
id int primary key not null auto_increment,
product_code varchar(30),
product_name varchar(30),
product_price int,
product_amount int,
product_description varchar(100),
-- mô tả:description
product_status varchar(... | true |
085162f3a09d748438eac0a3a3b9ed13b521a295 | SQL | oborovsky/parsers | /sql/bases/gs3_blank.sql | UTF-8 | 236,385 | 3.359375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.4.15.5
-- http://www.phpmyadmin.net
--
-- Хост: localhost
-- Время создания: Сен 01 2017 г., 18:31
-- Версия сервера: 5.7.11
-- Версия PHP: 5.3.10-1ubuntu3.21
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_C... | true |
21bc0e7f1c65843ae63bdfe7de52d46c650f1d4c | SQL | yanghg/Database_Proj3 | /database_proj3/proj3.sql | UTF-8 | 3,003 | 4.28125 | 4 | [] | no_license | -- project3 procedure
delimiter //
DROP PROCEDURE IF EXISTS login//
CREATE PROCEDURE login(IN username VARCHAR(20), IN userpassword VARCHAR(10))
BEGIN
IF EXISTS (SELECT * FROM student WHERE username = Name AND userpassword = password)
THEN
SELECT * FROM student WHERE username = Name AND userpassword = p... | true |
008a1cf8e605658dd5af783bb2ae7dfd32071ddd | SQL | alex00/GestionnaireProjet | /dump.sql | UTF-8 | 14,908 | 3.4375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 3.5.1
-- http://www.phpmyadmin.net
--
-- Client: localhost
-- Généré le: Mar 09 Juillet 2013 à 08:26
-- Version du serveur: 5.5.24-log
-- Version de PHP: 5.3.13
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
DROP DATABASE IF EXISTS `gestionnaire_projet`;
CREATE DATA... | true |
95c25e4cd86766b15440b6077f393ada3b552095 | SQL | phuongict/QLKS | /database/quanly_khachsan (1).sql | UTF-8 | 16,863 | 2.90625 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.7.0
-- https://www.phpmyadmin.net/
--
-- Máy chủ: 127.0.0.1
-- Thời gian đã tạo: Th1 04, 2018 lúc 11:53 PM
-- Phiên bản máy phục vụ: 10.1.25-MariaDB
-- Phiên bản PHP: 5.6.31
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*... | true |
621f775b59faa5a1d708ac85626b565d04af1561 | SQL | pgpool/pgpool2 | /src/sql/pgpool_adm/pgpool_adm--1.1.sql | UTF-8 | 2,653 | 2.703125 | 3 | [
"NTP"
] | permissive | /* contrib/pgpool_adm/pgpool_adm--1.1.sql */
/* ***********************************************
* Administrative functions for pgPool
* *********************************************** */
/**
* input parameters: node_id, host, port, username, password
*/
CREATE FUNCTION pcp_node_info(integer, text, integer, text, ... | true |
bea6bc1906eba27fee3030272fad1fed7fa7bb39 | SQL | nilesh44/springjdbcdemo | /src/main/resources/schema.sql | UTF-8 | 1,247 | 3.640625 | 4 | [] | no_license | create database jdbc_demo;
use jdbc_demo;
drop table if exists name;
drop table if exists mobile;
drop table if exists email;
drop table if exists employee;
select * from name;
create table employee(
emp_id bigint auto_increment primary key ,
crt_tms TIMESTAMP not null ,
exp_tms TIMESTAMP);
create table name (... | true |
cd41335f8ea5ee8b2081914288f7dfc22aba9d44 | SQL | lucas54neves/countries-api | /prisma/migrations/20210303133741_init/migration.sql | UTF-8 | 3,355 | 3.5 | 4 | [
"MIT"
] | permissive | -- CreateTable
CREATE TABLE "Country" (
"id" SERIAL NOT NULL,
"name" TEXT NOT NULL,
"topLevelDomain" TEXT[],
"alpha2Code" TEXT NOT NULL,
"alpha3Code" TEXT NOT NULL,
"callingCodes" TEXT[],
"capital" TEXT NOT NULL,
"altSpellings" TEXT[],
"region" TEXT NOT NULL,
"subregion" TEXT NOT... | true |
4fce05bb1a089cbbf49df798673dcab9870943ca | SQL | radtek/Telecommunication | /GSM/DataBase/PROCEDURES/SEND_STAT_SMS_PREV_DAY.sql | UTF-8 | 8,052 | 2.984375 | 3 | [] | no_license | CREATE OR REPLACE PROCEDURE SEND_STAT_SMS_PREV_DAY is
--Version 2
--
--v.2 Алексеев 21.10.2015 В письмо добавил прикрепление файлоа с ошибками смс по номерам.
--v.1 Алексеев 19.10.2015 Процедура отправки письма на почту о статистике по смс за предыдущий день.
-- Письмо о... | true |
8cbc35c0cdb8051987982ee44209064eff30e156 | SQL | missaouib/mysql | /remove-duplicate-records/queries.sql | UTF-8 | 934 | 3.984375 | 4 | [] | no_license | DELETE FROM teacher
WHERE id NOT IN (SELECT *
FROM (SELECT min(t.id)
FROM teacher t
GROUP BY t.name) x);
DELETE t1 FROM teacher t1, teacher t2 WHERE t1.id > t2.id AND t1.name = t2.name;
DELETE t1 FROM teacher t1
INNER JOIN teacher t2
WHER... | true |
eb91c22698061fe3a0fed8adc2b811f6dd81f063 | SQL | joanjon86/cielo-php | /DB/cielo_php-2019-09-26.sql | UTF-8 | 2,347 | 2.90625 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | -- MySQL dump 10.13 Distrib 5.7.27, for Linux (x86_64)
--
-- Host: localhost Database: cielo_php
-- ------------------------------------------------------
-- Server version 5.7.27-0ubuntu0.18.04.1
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_... | true |
8fd3c77c4c50178d639353d7f13c11f7ce00a95d | SQL | kanevk/re-poker | /api/db/structure.sql | UTF-8 | 11,303 | 3.3125 | 3 | [] | no_license | 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.set_config('search_path', '', false);
SET check_function_bodies = false;
SET xmloption = content;
SET client_min_messages = warning;
SET row... | true |
defc4ba9ede6a87413e448a14cab9fa58f47b457 | SQL | nixin72/HC-Semester-4 | /420-D20 (Databases II)/EXAMPLES/D20_S03_Examples/example_04.sql | UTF-8 | 748 | 3.28125 | 3 | [] | no_license | ---
--- Sample showing:
--- 1) variable types anchored to DB records
--- 2) SQL query feeding into PL/SQL variable
---- (use of SELECT INTO)
---
SET SERVEROUTPUT ON SIZE 1000000;
DECLARE
lv_first_name EMPLOYEES.FIRST_NAME%TYPE;
lv_last_name EMPLOYEES.LAST_NAME%TYPE;
lv_employee_id EMPLOYEES.EMPL... | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.