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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
e71f04409cbfe74025e3d111f0bc7742ed229919 | SQL | Krafalski/Flashcard | /db/schema.sql | UTF-8 | 781 | 3.578125 | 4 | [] | no_license | -- database name is flashcards
DROP TABLE IF EXISTS users;
DROP TABLE IF EXISTS cards;
DROP TABLE IF EXISTS session;
-- create db flashcards;
CREATE TABLE users (
id SERIAL UNIQUE PRIMARY KEY,
email VARCHAR (225),
password_digest TEXT,
user_name VARCHAR (50)
);
-- from node-connect-pg-simple https://github... | true |
935b2f9d066a6d95d608315511ab8807762c371e | SQL | vinixiii/2DM-S1-banco-de-dados | /exercicios/modelagens/1.3-clinica/clinica_03_DQL.sql | ISO-8859-1 | 1,072 | 4 | 4 | [] | no_license | USE Clinica;
SELECT * FROM Donos;
SELECT * FROM TiposDePet;
SELECT * FROM Racas;
SELECT * FROM Pets;
SELECT * FROM Veterinarios;
SELECT * FROM Clinicas;
SELECT
IdConsulta,
IdVeterinario,
IdPet,
FORMAT(Valor, 'c', 'pt-br') as Valor,
DataDaConsulta,
Descricao
FROM Consultas;
-- Todos os veterinrios de uma cl... | true |
b2145718316a0d1d6a4127f3f0863cd8bea38d0d | SQL | williamHardyProjects/TechElevatorWork | /module-2/03_Joins/student-exercise/postgres/joins-exercises.sql | UTF-8 | 8,260 | 3.78125 | 4 | [] | no_license | -- The following queries utilize the "dvdstore" database.
-- 1. All of the films that Nick Stallone has appeared in
-- (30 rows)
SELECT concat(a.first_name, ' ', a.last_name) AS actor_name
, f.*
FROM actor AS a
INNER JOIN film_actor AS fm
ON a.actor_id = fm.actor_id
INNER JOIN film AS f
ON fm.film_id = f... | true |
1a50410a0fa90c18ebbd411c995a6a9f45eb3506 | SQL | erinmayg/CS3223-project | /isaac/query1.sql | UTF-8 | 169 | 2.734375 | 3 | [] | no_license | SELECT EMPLOYEES.eid,EMPLOYEES.ename,CERTIFIED.eid,CERTIFIED.aid,EMPLOYEES.salary
FROM EMPLOYEES,CERTIFIED
WHERE EMPLOYEES.eid=CERTIFIED.eid,EMPLOYEES.eid=CERTIFIED.eid
| true |
ee1161a6cb0d268e71c43eb98d617fe229c02d85 | SQL | suda-amir/AMC | /Databases/amc.sql | UTF-8 | 3,742 | 3.078125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.7.0
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Sep 14, 2017 at 09:17 PM
-- Server version: 10.1.25-MariaDB
-- PHP Version: 7.1.7
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD... | true |
8172f8402ca02efff52beaf114e6b6051356ac54 | SQL | kmh5500/homepage | /webtest/WebContent/WEB-INF/sql/news.sql | UTF-8 | 1,333 | 3.453125 | 3 | [] | no_license | DROP TABLE news;
CREATE TABLE news(
newsno INT NOT NULL,
title VARCHAR(100) NOT NULL,
media VARCHAR(50) NOT NULL,
author VARCHAR(30) NOT NULL,
rdate DATE NOT NULL,
PRIMARY KEY(newsno)
);
INSERT INTO news(newsno, title, media, author, rdate)
VALUES(1, 'MS, 2016년 구형 IE 브라... | true |
c697cb5264a3f1ec8d00c8619887d544b8d8269d | SQL | vijaydairyf/TimelyFish | /SolomonApp/dbo/Stored Procedures/dbo.ADG_UpdateSOSchedPriority.sql | UTF-8 | 527 | 2.75 | 3 | [] | no_license | CREATE PROCEDURE ADG_UpdateSOSchedPriority
@CpnyID varchar(10),
@OrdNbr varchar(15),
@LineRef varchar(5),
@SchedRef varchar(5),
@PrioritySeq int,
@LUpd_Prog varchar(8),
@LUpd_User varchar(10)
AS
update SOSched
set PrioritySeq = @PrioritySeq,
LUpd_DateTime = GETDATE(),
LUpd_Prog = @LUpd_Prog,
... | true |
7e8db6c0b3e2aaaac0851ba432ae54a7ecf43e09 | SQL | manoel-ats/atsfinanceiro | /script/sp_contas_pagas.sql | UTF-8 | 1,892 | 3.359375 | 3 | [] | no_license | ALTER PROCEDURE SP_CONTAS_PAGAS (
DTAINI Date,
DTAFIM Date,
COD_FOR Integer,
COD_CCUSTO Smallint,
COD_CONTA Integer,
COD_CAIXA Smallint )
RETURNS (
DTAEMISSAO Date,
DTAPAGTO Date,
CODFORN Integer,
FORNECEDOR Varchar(60),
DESCRICAO Varchar(150),
VALORTIT Double precision,
... | true |
b9121ce73d2aade2d596389e33192c53a59d9b8c | SQL | GustavoBorges-tec/bancodados | /bdinfox.sql | UTF-8 | 2,261 | 3.734375 | 4 | [
"MIT"
] | permissive | /*
informações sobre usuário
@author Gustavo Borges
*/
-- Pesquisar bancos de dados disponíveis
show databases;
-- Criando um banco de dados
create database dbinfox;
show databases;
-- Remover um banco de dados
drop database dbinfox;
-- Selecionar o banco de dados
use dbinfox;
-- Criando uma tabela no baco d... | true |
e186f16304842b08d016a56c56a25ed84aa6fc6d | SQL | JackDan9/miniProgram | /better_work_data/better_work_data/docs/sql/table/create/token.sql | UTF-8 | 446 | 2.625 | 3 | [
"MIT"
] | permissive | CREATE TABLE `system_tokens` (
`id` INT(11) NOT NULL AUTO_INCREMENT COMMENT "序号",
`uid` VARCHAR(36) NOT NULL COMMENT "用户UUID",
`access_token` VARCHAR(64) NOT NULL COMMENT "2小时的Token",
`refresh_token` VARCHAR(64) NOT NULL COMMENT "7天的Token",
`created_at` datetime DEFAULT NULL COMMENT '创建时间',
`updated_at` dat... | true |
06eb72a67456b700a6bdb2041b5fe19f2b4bf256 | SQL | abdouthetif/Shop-PHP-exercice | /migrations/shop.sql | UTF-8 | 10,004 | 2.6875 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 5.0.3
-- https://www.phpmyadmin.net/
--
-- Hôte : 127.0.0.1
-- Généré le : mer. 02 déc. 2020 à 17:29
-- Version du serveur : 10.4.14-MariaDB
-- Version de PHP : 7.4.11
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_S... | true |
df5c6121be6c13d7a63b21d508bd0e1bc447b174 | SQL | fredyns/ppjk | /development/dbchangelog/201703120955_add-companyType.sql | UTF-8 | 299 | 2.875 | 3 | [
"BSD-3-Clause"
] | permissive |
CREATE TABLE IF NOT EXISTS `companyType` (
`id` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
`name` VARCHAR(32) NOT NULL,
PRIMARY KEY (`id`))
ENGINE = InnoDB
DEFAULT CHARACTER SET = utf8;
ALTER TABLE `companyProfile`
ADD COLUMN `companyType_id` INT(10) UNSIGNED NULL DEFAULT NULL AFTER `name`;
| true |
73390592bf54068ebe59c7e7d552e7a4689d2c12 | SQL | LeonVA/it-ausleihe | /docs/it-ausleihe.sql | UTF-8 | 1,506 | 3.109375 | 3 | [
"MIT"
] | permissive | -- phpMyAdmin SQL Dump
-- version 4.7.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Erstellungszeit: 19. Feb 2019 um 09:24
-- Server-Version: 10.1.28-MariaDB
-- PHP-Version: 7.1.11
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_C... | true |
1d9600f8e69ead5fe1a84893454d832d5aa8a861 | SQL | complitex/flexpay | /eirc/etc/sql/update/2008_04_23.sql | UTF-8 | 902 | 3.6875 | 4 | [] | no_license | create table eirc_sp_registry_statuses_tbl (
id bigint not null auto_increment,
code integer not null unique,
primary key (id)
);
create table eirc_sp_registry_archive_statuses_tbl (
id bigint not null auto_increment,
code integer not null unique,
primary key (id)
);
alter table ei... | true |
717384ea63a87a67145f0e185009eed9d2b6dddb | SQL | VictorAlmeidaLima/Lifesys | /SQL/De_Para_Campos/MODULO_CONTRATO.SQL | UTF-8 | 1,179 | 3.40625 | 3 | [] | no_license | /*
MODULOS_CONTRATO
Layout: Arquivo txt de largura fixa
Arquivo de Importação: MODULOS_CONTRATO
Descrição: Listagem de módulos contratados (vinculo entre contrato e módulo)
Listagem de Campos:
CODPROD
Nome: COD_MODULO - Tipo: INTEGER - Tamanho: 4 - Preenchimento Obrigatório -
COD_EXT
Nome: CLIENTE - Tipo: INTEGER ... | true |
6b0389ace829d6cf2f86c3e53024451416379358 | SQL | fsindustry/mynote | /01_oracle/02 resource/SQL练习.sql | GB18030 | 3,367 | 3.78125 | 4 | [] | no_license | CREATE PROCEDURE CHANGE_SAL(emp_name VARCHAR2 , new_sal Number) IS
BEGIN
UPDATE emp SET sal=new_sal
WHERE ename=emp_name;
END CHANGE_SAL;
CREATE OR REPLACE FUNCTION CAL_ANNUAL_SAL(empname VARCHAR2)
--ֵ
RETURN NUMBER IS
--洢нֵ
annual_sal NUMBER(7,2);
BEGIN --ִв
SELECT (sal+NVL(comm,0))*12 INTO annual_sal ... | true |
b3916e337fbfda28fd17ae5ac9f5dbec759cd54d | SQL | geosmart/me.geosmart.pssms | /pssms-rpcservice/src/main/resources/schema/BackOrderLog.sql | UTF-8 | 823 | 3.296875 | 3 | [] | no_license | -- auto Generated on 2017-03-08 14:07:31
DROP TABLE IF EXISTS `tb_back_order_log`;
CREATE TABLE `tb_back_order_log`(
`serialId`bigint (20) NOT NULL AUTO_INCREMENT COMMENT '编号',
`sale_order_id` VARCHAR (64) COMMENT '销售单号',
`back_order_id` VARCHAR (32) COMMENT '退单编号',
`customer_code` VARCHAR (64) CO... | true |
8743de63c61be087acbfb236f077fd2debacffe0 | SQL | Muthuseenivelraja/orginfl | /initialization/add_db_functions.sql | UTF-8 | 948 | 3.328125 | 3 | [] | no_license | DROP FUNCTION IF EXISTS normal_name;
DELIMITER $$
CREATE FUNCTION normal_name (v TEXT)
RETURNS TEXT
COMMENT 'Normalize a string stripping delimiters and excluding delimiter repeats'
LANGUAGE SQL
DETERMINISTIC
CONTAINS SQL
BEGIN
DECLARE result TEXT;
SET result = TRIM(
REPLACE(REPLACE(REPLACE(REPLACE(... | true |
133850c7c01afd62a843f0cf55aa262847f5bc99 | SQL | ESSeRE-Lab/qualitas.class-corpus | /projects/castor-1.3.3/cpactf/src/test/ddl/org/castor/cpa/test/test15/derby-create.sql | UTF-8 | 1,892 | 3.328125 | 3 | [] | no_license | create table test15_person (
fname varchar(15) not null,
lname varchar(15) not null,
bday timestamp
);
create unique index test15_person_pk on test15_person( fname, lname );
create table test15_address (
fname varchar(15) not null,
lname varchar(15) not null,
id int not null,
... | true |
660a55af094796ed55b6de0777df2c32a97f7f5c | SQL | lonby/airbnb_sql | /Joe.SQL | UHC | 6,171 | 4.1875 | 4 | [] | no_license |
--AirBnB User Analysis on SQL Project
--On kaggle
-- create table
create table air_user
(id varchar2(50),
date_account_created date,
timestamp_first_active number,
date_first_booking varchar2(50),
gender varchar2(50),
age number(10),
signup_method ... | true |
e9412f5b7d5e442c4bc689f7e023f9a9d9236b00 | SQL | firat-can-slnk/untis-timetable-ios | /Webserver/database.sql | UTF-8 | 1,609 | 3.046875 | 3 | [
"MIT"
] | permissive | -- phpMyAdmin SQL Dump
-- version 5.0.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Erstellungszeit: 05. Apr 2021 um 12:43
-- Server-Version: 10.3.27-MariaDB-0+deb10u1
-- PHP-Version: 7.3.27-1~deb10u1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_C... | true |
9f675fa4edfe210a85e3e34361eecebf8e1f0a6f | SQL | jeeno44/testContact | /database/createDatabase/conts.sql | UTF-8 | 5,914 | 3.25 | 3 | [
"MIT"
] | permissive | -- phpMyAdmin SQL Dump
-- version 4.9.0.1
-- https://www.phpmyadmin.net/
--
-- Хост: localhost
-- Время создания: Янв 17 2020 г., 17:20
-- Версия сервера: 5.7.28-0ubuntu0.18.04.4
-- Версия PHP: 7.2.26-1+ubuntu18.04.1+deb.sury.org+1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time... | true |
97a5aa277d2d6318a1008c8313803146ef0a5bbb | SQL | vctrmarques/interno-rh-sistema | /rhServer/src/main/resources/db/migration/V1_2019_10_18_14_59__ALTER_TABLE_FOLHA_PAGAMENTO_CONTRACHEQUE.sql | UTF-8 | 1,135 | 2.5625 | 3 | [] | no_license | -- Flávio Silva
-- Alteração da tabela folha_pagamento_contracheque para ajuste das colunas valorBruto, valorDesconto e valor liquido.
if col_length('folha_pagamento_contracheque', 'valor_bruto') is null
begin
alter table folha_pagamento_contracheque add valor_bruto float;
end
if col_length('folha... | true |
103d1a8b6c2dd87be690d4804474cff86e290aaf | SQL | IrinaAristova/DB--Workshop4 | /package.sql | UTF-8 | 2,337 | 3.703125 | 4 | [] | no_license | CREATE OR REPLACE PACKAGE Olimpiada_package IS
TYPE OLIMP_RECORD IS RECORD(CountryName VARCHAR2(50), OlimpYear NUMBER(4,0), MedalColor VARCHAR2(15));
TYPE OLIMP_TABLE IS TABLE OF OLIMP_RECORD;
PROCEDURE ChangeCountry(athletename IN VARCHAR2, countryname IN VARCHAR2);
FUNCTIO... | true |
fe5a4c053d9ca5ad94445e637a39433736c0750b | SQL | merxbj/notwa | /Installation/Database/initial_scripts/testdata/notwa.sql | UTF-8 | 3,371 | 2.640625 | 3 | [] | no_license | -- ----------------------------
-- Records of project
-- ----------------------------
INSERT INTO `project` VALUES ('1', 'notwa');
INSERT INTO `project` VALUES ('2', 'notwa fake');
INSERT INTO `project` VALUES ('3', 'person');
INSERT INTO `project` VALUES ('4', 'general');
-- ----------------------------
-- Records of... | true |
f4a0da53c5eaf2ab76059ccff0de8b82fbb2422a | SQL | baywind/rujel | /RujelEduResults/Resources/creEduResults.mysql | UTF-8 | 1,594 | 3.046875 | 3 | [
"BSD-3-Clause"
] | permissive | CREATE TABLE ITOG_COMMENT (
ITOG_CONTAINER smallint NOT NULL,
EDU_CYCLE smallint NOT NULL,
STUDENT_ID int NOT NULL,
COMMENT_TEXT text NOT NULL,
PRIMARY KEY (ITOG_CONTAINER,EDU_CYCLE,STUDENT_ID),
INDEX (STUDENT_ID)
) ENGINE=InnoDB;
CREATE TABLE ITOG_CONTAINER (
I_ID smallint NOT NULL,
ITOG_TYPE smallint... | true |
490b726c73e99c18e497dbc6c6f9afe706ca9ee2 | SQL | EvgeniyLengin/YouWanna | /bitrix/modules/iqsms.sender/install/db/mysql/install.sql | UTF-8 | 1,017 | 3.21875 | 3 | [] | no_license |
CREATE TABLE `iqsms_sender_list` (
`ID` int(11) NOT NULL AUTO_INCREMENT,
`PHONE` varchar(13) NOT NULL,
`TEXT` text NOT NULL,
`STATUS` tinyint(2) NOT NULL,
`CREATED` datetime NOT NULL,
`SCHEDULE` datetime DEFAULT NULL,
`TYPE` varchar(255) DEFAULT NULL,
`COMMENT` text,
`SITE_ID` varchar(2) NOT NULL,
... | true |
3336d9037dce2429e159551a8f9997e2a8580f97 | SQL | ayubekop/nebeng | /SQLQuery1 db api koin.sql | UTF-8 | 1,698 | 3.421875 | 3 | [] | no_license | Create table [58659KoInOrder] (
Id int identity(1,1),
OrderDate datetime ,
OrderNumber varchar(100)
constraint PK_58659KoInOrder primary key(Id)
)
create table [58659KoInProduct](
Id int identity(1,1),
ArtDating varchar(100),
ArtDescription varchar(100),
ArtId varchar(100),
Artist varchar(100)
A... | true |
e1734f273a682475267477ac27c1c4b283d0aa0d | SQL | supermao1013/study-demo | /dalomao-springboot/sql/demo.sql | UTF-8 | 1,891 | 3.140625 | 3 | [] | no_license | drop table if exists t_sys_user;
create table t_sys_user (
id bigint(20) not null auto_increment comment '主键',
login_name varchar(32) not null comment '登录账号',
user_name varchar(32) not null comment '用户昵称',
user_type varchar(2) default '00' comment '用户类型(00系统用户 01普通用户... | true |
dbf3b97232b66d1c196682f846fd5586b02a1594 | SQL | silence-do-good/stress-test-Postgres-and-MySQL | /dump/low/day23/select1726.sql | UTF-8 | 191 | 2.78125 | 3 | [] | no_license |
SELECT timeStamp, temperature
FROM ThermometerObservation
WHERE timestamp>'2017-11-22T17:26:00Z' AND timestamp<'2017-11-23T17:26:00Z' AND SENSOR_ID='47ad4c55_7a4e_4366_a59d_43d5c9138ffe'
| true |
9782bd8e28da108cb255dfb2b7389c04243bb4b7 | SQL | devatsrs/neon.web | /dbv-1/data/schema/prc_UpdateInProgressJobStatusToFail.sql | UTF-8 | 1,104 | 3.265625 | 3 | [
"MIT"
] | permissive | CREATE DEFINER=`neon-user`@`117.247.87.156` PROCEDURE `prc_UpdateInProgressJobStatusToFail`(IN `p_JobID` INT, IN `p_JobStatusID` INT, IN `p_JobStatusMessage` LONGTEXT, IN `p_UserName` VARCHAR(250))
BEGIN
SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
/*
This procedure used to restart and terminate j... | true |
061a256a77811723050294487d1330342aba665e | SQL | DesmonFur/Financial-App | /db/seed.sql | UTF-8 | 2,068 | 3.84375 | 4 | [] | no_license | DROP TABLE IF EXISTS deposits;
DROP TABLE IF EXISTS expenses;
DROP TABLE IF EXISTS budgets;
DROP TABLE IF EXISTS user_info;
CREATE TABLE user_info(
user_id SERIAL PRIMARY KEY,
email VARCHAR(9999),
hash TEXT
);
CREATE TABLE budgets (
budget_id SERIAL PRIMARY KEY,
user_id INTEGER REFERENCES user_info(user_id),
... | true |
8fa0d6cc7dace93421235dd2d91122414fd6d7de | SQL | samson84/unique-number | /sql/init/init.sql | UTF-8 | 447 | 3.578125 | 4 | [] | no_license | DROP TABLE IF EXISTS votes;
CREATE TABLE votes (
id SERIAL PRIMARY KEY,
round_id INTEGER,
vote INTEGER NOT NULL,
username VARCHAR(100) NOT NULL,
UNIQUE(username, round_id)
);
DROP TABLE IF EXISTS rounds;
CREATE TABLE rounds (
id SERIAL PRIMARY KEY,
started_at TIMESTAMPTZ,
finished_at T... | true |
085caea960e09484d389abbccabb27b0fe1fc47d | SQL | natalia0911/Proyecto1-BDII | /SCRIPTS/postgres/CreateUsuarios.sql | UTF-8 | 682 | 3.1875 | 3 | [] | no_license | -- Table: public.Usuarios
-- DROP TABLE public."Usuarios";
CREATE TABLE public."Usuarios"
(
"ID" numeric(20,0) NOT NULL,
"Nombre" character varying(60) COLLATE pg_catalog."default" NOT NULL,
"Cedula" numeric(9,0) NOT NULL,
"Direccion" character varying(256) COLLATE pg_catalog."default" NOT NULL,
"... | true |
102197ab3caa17484fcb913e094b6382a78fe1b3 | SQL | lhoffmann7/StudyCollection | /Datenbanken-Praktikum/blatt3/alter-table.sql | UTF-8 | 342 | 3.25 | 3 | [] | no_license | alter table country add constraint cap foreign key (capital,code,province) references city(name,country,province) on delete cascade;
alter table country disable constraint cap;
--
alter table city add constraint cit foreign key (province,country) references province (name,country) on delete cascade;
alter table city di... | true |
98c989f69fd208b14d3b005e2d5f04d7b2f5ab27 | SQL | Antoniolm/Grado_Informatica-WebDIU | /diu_hotel_dream_garden.sql | UTF-8 | 5,718 | 3.078125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.5.1
-- http://www.phpmyadmin.net
--
-- Servidor: 127.0.0.1
-- Tiempo de generación: 17-05-2016 a las 13:29:16
-- Versión del servidor: 10.1.8-MariaDB
-- Versión de PHP: 5.5.30
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=... | true |
03d392b98e2242a3699db3b4be6cd5a26962a9d3 | SQL | mitchellolsthoorn/ASE-Technical-2021-api-linkage-replication | /EvoMaster/core/src/test/resources/sql_schema/passports.sql | UTF-8 | 621 | 3.953125 | 4 | [
"LGPL-3.0-only",
"LGPL-2.0-or-later",
"MIT"
] | permissive |
create table Countries (
country_id bigint not null,
country_name varchar (255) not null unique,
primary key (country_id)
);
create table Passports (
country_id bigint not null,
passport_number bigint not null,
expiration_date timestamp not null,
birth_date timestamp not null,
primary key (country_id,... | true |
b0303f1d8ad2d25aee54bed67951a538e18be879 | SQL | hanzhipeng123/han_admin | /admin-login/src/sql-file/user_info.sql | UTF-8 | 1,081 | 2.65625 | 3 | [] | no_license | CREATE TABLE `user_info` (
`userId` int(11) NOT NULL AUTO_INCREMENT COMMENT '用户id',
`unionId` varchar(255) NOT NULL DEFAULT '' COMMENT '用户唯一标识',
`nickname` varchar(255) NOT NULL COMMENT '用户昵称',
`mobile` varchar(64) NOT NULL COMMENT '用户手机号',
`registryPlatform` tinyint(4) DEFAULT NULL COMMENT '用户平台:1-applet 2-i... | true |
ed0d3a244076d28921b4eb7880338f627afbfa87 | SQL | Sergiu221/Project | /database/Teachers.sql | UTF-8 | 481 | 3.21875 | 3 | [] | no_license | -- Table: public.teachers
-- DROP TABLE public.teachers;
CREATE TABLE public.teachers
(
id bigint NOT NULL,
first_name character varying(20) COLLATE pg_catalog."default" NOT NULL,
middle_name character varying(20) COLLATE pg_catalog."default",
last_name character varying(20) COLLATE pg_catalog."defaul... | true |
9565d2f0afb1799b064795e36a65284401b4e071 | SQL | SaBierBo/DRDB | /MySQL/Backup.sql | UTF-8 | 15,167 | 3.421875 | 3 | [
"MIT"
] | permissive | -- MySQL dump 10.13 Distrib 8.0.22, for Linux (x86_64)
--
-- Host: localhost Database: DRDB
-- ------------------------------------------------------
-- Server version 8.0.22
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!401... | true |
1dfaf882a1594d4dc6547b46286af6b5a6544822 | SQL | lqhjava/java-leaning | /shop.sql | UTF-8 | 1,058 | 3.21875 | 3 | [] | no_license | # java-leaning
This is I learn java
create database if not exists shop ;
use shop;
create table goods(
goods_id int primary key comment '商品编号',
goods_name varchar(20) not null comment '商品名',
goods_uniprice float(6,2) default 0 not null comment '单价',
goods_category varchar(10) not null comment '商品类别',
goods_pr... | true |
b94d90ed57de410ff73acfde63a837f33e277f48 | SQL | kyle624701089/crawler | /src/main/resources/SQL/car_type.sql | UTF-8 | 906 | 3.0625 | 3 | [] | no_license | /*
Navicat Premium Data Transfer
Source Server : test
Source Server Type : MySQL
Source Server Version : 50525
Source Host : localhost:3306
Source Schema : crawler
Target Server Type : MySQL
Target Server Version : 50525
File Encoding : 65001
Date: 01/04/2018 18:15:3... | true |
035cac33ef6723d7ce53ee703b2306ec40215111 | SQL | achmadnabawi/sparkdata | /wrt/data_base_process/caiji/t_wrt_caiji_record_newid_feed.sql | UTF-8 | 864 | 3.8125 | 4 | [] | no_license | drop table wl_analysis.t_wrt_caiji_record_newid_feed;
create table wl_analysis.t_wrt_caiji_record_newid_feed(
item_id string comment '商品id'
)
COMMENT '采集评论所需的新晋商品id'
PARTITIONED by (ds string)
location '/commit/ids_4_crawler/shopitem_newid_feed';
--新晋商品且销量不超过5000和1000
insert overwrite table wl_analysis.t_wrt_caiji_rec... | true |
f485491a402b70e08d7da5668e978b2d9432fd75 | SQL | facundopereztomasek/mysql-docker-testing-db | /examples/create-database.sql | UTF-8 | 1,485 | 4.5 | 4 | [] | no_license | -- This remove the databse if it exists
DROP DATABASE IF EXISTS movies;
-- This creates the database with the utf8 charset encoding
CREATE DATABASE movies
CHARACTER SET utf8
COLLATE utf8_bin;
-- This tells mysql to select the movies database in order to run next senteces
USE movies;
-- Creates movies table
CREATE TA... | true |
da064813ccdf1a01d78dc57677427499485230b8 | SQL | zeeiqbal100/ajax | /ajax_demo.sql | UTF-8 | 1,314 | 2.765625 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.7.0
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Nov 06, 2017 at 04:37 PM
-- Server version: 10.1.26-MariaDB
-- PHP Version: 7.1.8
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD... | true |
a70659a21092c864af0f05f5beff8f7b59a9bf61 | SQL | jastack/sqlite3 | /import_db.sql | UTF-8 | 1,897 | 4.0625 | 4 | [] | no_license | DROP TABLE IF EXISTS users;
CREATE TABLE users (
id INTEGER PRIMARY KEY,
fname TEXT NOT NULL,
lname TEXT NOT NULL
);
DROP TABLE IF EXISTS questions;
CREATE TABLE questions (
id INTEGER PRIMARY KEY,
title TEXT NOT NULL,
body TEXT NOT NULL,
user_id INTEGER NOT NULL,
FOREIGN KEY (user_id) REFER... | true |
c93ead571dfdf01fe5fad521254e37b2afc3f2ab | SQL | danielamezcua/BDA | /Primera entrega/Transacciones/5.sql | UTF-8 | 2,478 | 2.609375 | 3 | [] | no_license | -- MTY
---------------------------------------
CREATE OR REPLACE PROCEDURE EDITARDEFECTO
(
P_ID_TIPO_DEFECTO IN NUMBER,
P_DESCRIPCION IN VARCHAR2
)
AS
BEGIN
UPDATE DEFECTO SET DESCRIPCION = P_DESCRIPCION WHERE ID_TIPO_DEFECTO = P_ID_TIPO_DEFECTO;
UPDATE DEFECTO@HMO SET DESCRIPCION = P_DESCRIPCION ... | true |
61db2ae3618118e140e10f2d87b1547e270071f5 | SQL | akhandeshi/transmart-data | /ddl/oracle/i2b2demodata/qt_query_result_instance.sql | UTF-8 | 711 | 2.671875 | 3 | [] | no_license | --
-- Type: TABLE; Owner: I2B2DEMODATA; Name: QT_QUERY_RESULT_INSTANCE
--
CREATE TABLE "I2B2DEMODATA"."QT_QUERY_RESULT_INSTANCE"
( "RESULT_INSTANCE_ID" NUMBER(5,0),
"QUERY_INSTANCE_ID" NUMBER(5,0),
"RESULT_TYPE_ID" NUMBER(3,0) NOT NULL ENABLE,
"SET_SIZE" NUMBER(10,0),
"START_DATE" DATE NOT NULL ENABLE,
"END_DA... | true |
7743eedd4078c5c66bb9dcf2b04b26d671abde4a | SQL | andreivercosa/My_SQL | /Aula 01 BD_5.sql | UTF-8 | 170 | 2.609375 | 3 | [] | no_license |
CREATE TABLE filho
(
id INT NOT NULL PRIMARY KEY AUTO_INCREMENT,
idPai INT ,
nome VARCHAR(50),
dtCadastro DATE,
FOREIGN KEY(idPai) REFERENCES pai(id)
) | true |
df27eba77c83eee05e98741ec352961eb28e95ff | SQL | SairamShanmuganathan/webprojects | /career/career.sql | UTF-8 | 9,973 | 3.546875 | 4 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.6.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Dec 27, 2017 at 10:04 AM
-- Server version: 5.7.14
-- PHP Version: 5.6.25
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */... | true |
a5951a9f3b207efa18e2f6cc33024cbdfac86863 | SQL | kanjengsaifu/PerangkatMengajar | /pbm2/pbm(1).sql | UTF-8 | 11,690 | 3.015625 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.4.14
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Jun 19, 2016 at 06:49 PM
-- Server version: 5.6.26
-- PHP Version: 5.6.12
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;... | true |
0b4f633d37f1abd2103012bf5e1b229f8fea927d | SQL | PatrickShea814-zz/itsAmazonSoAmazon | /MySQL_dbs/Departments.sql | UTF-8 | 176 | 2.515625 | 3 | [] | no_license | USE bamazon;
CREATE TABLE departments (
department_id INTEGER(20) NOT NULL AUTO_INCREMENT PRIMARY KEY,
department_name VARCHAR(50) DEFAULT NULL,
over_head_costs INTEGER(10)
); | true |
4ad39d827fbf42a8310bc385d69323adb3826be1 | SQL | josepitteloud/VESPA | /ad_hoc/V059_Panel_enablement_listing/Vespa panel migration 4 to 12.sql | WINDOWS-1250 | 5,701 | 3.71875 | 4 | [] | no_license | /****************** EXTRACTION OF VESP PANEL BY CALL BACK DATE ******************/
-- So the first thing we're going to do is batch the Vespa panel 4 out as determined
-- by the call back date, whatever that is. Panel members are on SBV, call back date
-- is on the golden box tables, so we need to patvh those together... | true |
d76d7014f54af03eb2651f0395de3c9c9e81f2be | SQL | pjsinco/p2.10rempatrick.com | /sql-stuff/db-bak-2013-10-30.sql | UTF-8 | 4,448 | 2.859375 | 3 | [] | no_license | -- MySQL dump 10.13 Distrib 5.5.33, for osx10.6 (i386)
--
-- Host: localhost Database: rempatri_p2_10rempatrick_com
-- ------------------------------------------------------
-- Server version 5.5.33
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTE... | true |
01bb5aab75f2a8c89a85a9f589a1551e6b4e3a1a | SQL | shandianlala/AntFooder | /antfooder.sql | UTF-8 | 31,832 | 2.90625 | 3 | [] | no_license | /*
Navicat MySQL Data Transfer
Source Server : MySql-本机
Source Server Version : 50173
Source Host : localhost:3306
Source Database : antfooder
Target Server Type : MYSQL
Target Server Version : 50173
File Encoding : 65001
Date: 2018-02-28 12:03:38
*/
SET FOREIGN_KEY_CHECKS=0;
-- ... | true |
2c73793031488c954a01f196f2407c81d47cba52 | SQL | jatakiajanvi12/Aptitude-test-for-artisans | /section3.sql | UTF-8 | 5,328 | 3.28125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.1.12
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Dec 15, 2015 at 07:01 AM
-- Server version: 5.6.16
-- PHP Version: 5.5.11
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;... | true |
865151a329e316d9be7e96dee3be55d57c677869 | SQL | tmdgy6232/BIZ_403_06_Oracle | /USER3(2019-06-24 select.sql | UTF-8 | 273 | 2.84375 | 3 | [] | no_license | --user3 화면입니다.
SELECT * FROM tbl_score;
SELECT
*
FROM tbl_student;
INSERT INTO tbl_student(st_num, st_name, st_age, st_tel, st_grade)
values('00003', '임꺽정', 22, '001-001');
-- 다른 스키마에 있는 테이블 조회
select * from user3.tbl_score; | true |
a79a467e2b32ac52e222cc3db19b30f674049099 | SQL | teja-goud-kandula/5xTest | /TejaTest/models/recovery_rate_by_region.sql | UTF-8 | 758 | 3.453125 | 3 | [] | no_license |
/*
Welcome to your first dbt model!
Did you know that you can also configure models directly within SQL files?
This will override configurations stated in dbt_project.yml
Try changing "table" to "view" below
*/
/*
Welcome to your first dbt model!
Did you know that you can also configure model... | true |
0719c2df1d25e473353976ddc205d0d8b89cafd8 | SQL | kaltura/dwh | /ddl/migrations/development/add_columns_entry_id_context_id_to_facts/041.dwh_fact_fms_sessions.sql | UTF-8 | 853 | 3.171875 | 3 | [] | no_license | USE kalturadw;
DROP TABLE IF EXISTS `dwh_fact_fms_sessions_new`;
CREATE TABLE `dwh_fact_fms_sessions_new` (
`session_id` varchar(20) NOT NULL,
`session_time` datetime NOT NULL,
`session_date_id` int(11) unsigned DEFAULT NULL,
`bandwidth_source_id` int(11) NOT NULL,
`session_client_ip` varchar(15) DEFAULT NU... | true |
5b543f7d5394c56bbb99f1fe816e39e0b8c6540f | SQL | hqottsz/MXI | /assetmanagement-database/src/upgrade/plsql/lib/liquibase/7/2/4/0/sql/DEV-1075.sql | UTF-8 | 7,935 | 3.359375 | 3 | [] | no_license | --liquibase formatted sql
--changeSet DEV-1075:1 stripComments:false endDelimiter:\n\s*/\s*\n|\n\s*/\s*$
-- migration script for DEV-1075
BEGIN
utl_migr_schema_pkg.table_create('
Create table "REF_CHANGE_REASON" (
"CHANGE_REASON_CD" Varchar2 (16) NOT NULL DEFERRABLE ,
"DISPLAY_CODE" Varchar2 (8) NOT NULL DEFERRABLE... | true |
221f012973324a6525aaa0858bed0d4a617a09b0 | SQL | fernandosavin/Votaciones | /eventos_imc.sql | UTF-8 | 33,587 | 3.28125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.7.0
-- https://www.phpmyadmin.net/
--
-- Servidor: 127.0.0.1
-- Tiempo de generación: 17-04-2018 a las 01:55:02
-- Versión del servidor: 10.1.25-MariaDB
-- Versión de PHP: 7.1.7
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
... | true |
cdb8ea4cf26a3ec0b56324e5b675392661c937b8 | SQL | nuriakman/Ornek_Veri_Setleri | /bulmaca.sql | UTF-8 | 22,671 | 3.0625 | 3 | [] | no_license | -- Adminer 4.2.1 MySQL dump
SET NAMES utf8;
SET time_zone = '+00:00';
SET foreign_key_checks = 0;
SET sql_mode = 'NO_AUTO_VALUE_ON_ZERO';
DROP TABLE IF EXISTS `bulmaca`;
CREATE TABLE `bulmaca` (
`sira` int(11) NOT NULL AUTO_INCREMENT,
`soru` varchar(255) DEFAULT NULL,
`cevap` varchar(255) DEFAULT NULL,
PRIMAR... | true |
71c40fe85f0e07cab5a83149bf4caa12d3720937 | SQL | gurpreet19/ec198392_wht | /Database/configuration/03_02_headless_tool/Delta_WST/SourceTriggerDefinitions/IU_CNTX_MENU_ITEM_PARAM.sql | UTF-8 | 2,316 | 3.1875 | 3 | [] | no_license | CREATE OR REPLACE EDITIONABLE TRIGGER "IU_CNTX_MENU_ITEM_PARAM"
BEFORE INSERT OR UPDATE ON CNTX_MENU_ITEM_PARAM
FOR EACH ROW
DECLARE
/* cursor c_bf_component_action is
select bf_component_action_no
from bf_component_action bca, bf_component bfc
where bfc.bf_component_no = bca.bf_component_no
and bfc.bf_cod... | true |
ba215ed7487a915b2a2986b3828594efeab47419 | SQL | CMKawser7476/basicsqltest | /Subqueries.sql | UTF-8 | 217 | 2.609375 | 3 | [] | no_license | SELECT * FROM shirt_table
WHERE last_worn = (SELECT MIN(last_worn) FROM shirt_table);
SELECT article, description, color, size, last_worn FROM shirt_table
WHERE last_worn = (SELECT MIN(last_worn) FROM shirt_table); | true |
722a8e38185cea2297f0a08d4228f3556e61d67e | SQL | abijitsuresh/PioneerTech.WebApp | /Database/StoredProcedureScripts/uspSaveEmployeeEducationalDetails.sql | UTF-8 | 682 | 3.375 | 3 | [] | no_license | CREATE PROCEDURE uspSaveEmployeeEducationalDetails
@EmployeeID INTEGER,
@CourseType VARCHAR(50),
@CourseSpecialization VARCHAR(50),
@CourseYearOfPassing VARCHAR(50)
AS
BEGIN
IF(NOT EXISTS(SELECT * FROM EmployeeEducationalDetails WHERE EmployeeID = @EmployeeID))
BEGIN
INSERT INTO EmployeeEducationalDetails(Employ... | true |
2a3fad7f538d029c4fe227b75f8e11002b7cf184 | SQL | Jaware/stack-2015 | /authorization-server/src/main/resources/db/migration/V1_0_0_0__Schema_Oauth.sql | UTF-8 | 4,022 | 3.265625 | 3 | [] | no_license | create table if not exists `c_security_permission` (
`id` varchar(255) NOT NULL,
`permission_label` varchar(255) NOT NULL,
`permission_value` varchar(255) NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `UK_k4suda9cvcsoikdgquscypmt6` (`permission_value`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 ;
create table if not ... | true |
1b83918caf7af85c466ea54890a2a8f65773c491 | SQL | AirJEC/AirJEC-reviews-jesse | /data/postgres/postgres.sql | UTF-8 | 1,216 | 3.5625 | 4 | [] | no_license | DROP TABLE IF EXISTS reviews;
DROP TABLE IF EXISTS users;
DROP TABLE IF EXISTS listings;
CREATE TABLE users (
id SERIAL PRIMARY KEY,
guest_name VARCHAR(50),
guest_photo VARCHAR(150)
);
CREATE TABLE listings (
id SERIAL PRIMARY KEY,
address VARCHAR(100),
host_name VARCHAR(250),
host_photo VARCHAR(500),
... | true |
74ad143e596f452d19f4c090aace38ec840f3993 | SQL | iJasonCui/big_database | /MySQL/sproc/Accounting/wsp_updSettlementQ.mysql | UTF-8 | 1,565 | 3.328125 | 3 | [] | no_license | DELIMITER ;;
DROP PROCEDURE IF EXISTS wsp_updSettlementQ;
CREATE DEFINER='root'@'10.10.26.21' PROCEDURE wsp_updSettlementQ (
/******************************************************************************
**
** CREATION:
** Author: Jeff Yang
** Date: Jnue 7 2008
** Description: approve or reject settlement... | true |
067c186b4a0b0cd19b7d5152601e2d79c44028b2 | SQL | haris-tulic/Poslovna-inteligencija | /17.02.2020/zadatak1_SQL.sql | UTF-8 | 200 | 2.765625 | 3 | [] | no_license | create table god_voznje(
voznja_ID int not null primary key(voznja_ID),
godina_voznje int
)
insert into god_voznje
select voznja.voznja_ID,year(voznja.dtm_voznje)
from voznja
select *from god_voznje
| true |
88ffdc5fa5ec1dc016b09ae4496bc435080109a1 | SQL | CubeBlack/Acta-day | /DB/Codigos do DB.sql | UTF-8 | 6,936 | 3.71875 | 4 | [] | no_license | /*Criando DB*/
create database if not exists acta_dei
default character set utf8
default collate utf8_general_ci;
use acta_dei;
/*Criando Tabelas*/
create table if not exists usuarios (
email varchar (50) not null,
nome varchar(60) not null,
senha varchar (100) not null,
tipo_de_usuario enum('Administra... | true |
cf2eb7b9724bfe5f205bbd004f0bba11419964fa | SQL | avihoo44/Website-with-connection-to-MySql-server | /team05-Query 3.sql | UTF-8 | 384 | 3.5625 | 4 | [] | no_license | SELECT dog_name FROM (SELECT Dogs.dog_name ,count(*) as max_trip
FROM Taking_Dogs as tk JOIN Dogs on tk.dog_id=Dogs.dog_id
GROUP BY Dogs.dog_name
HAVING max_trip<=0.5*(SELECT max(max_trip) FROM
(SELECT tk.dog_id, count(*) as max_trip
FROM Taking_Dogs as tk JOIN Dogs on ... | true |
327441547cfd58ab24c0cba7aefa25adec35e747 | SQL | somas/drools | /src/main/resources/schema.sql | UTF-8 | 259 | 2.6875 | 3 | [] | no_license | --CREATE USER som PASSWORD "password";
--CREATE SCHEMA drools;
CREATE TABLE rules (id VARCHAR(40) not null, merchant_name VARCHAR(100), merchant_jurisdiction VARCHAR(100), insurer VARCHAR(100), start_date DATE, end_date DATE);
GRANT ALL ON rules TO PUBLIC;
| true |
304a11e1d3ce7b432c41f65fb11ade85a68418e8 | SQL | ganqiubo/code-name001 | /sql/upload_pic_thumbup.sql | UTF-8 | 222 | 2.609375 | 3 | [] | no_license | create table upload_pic_thumbup(
id bigint not null primary key auto_increment COMMENT '图片id',
upload_pic_id bigint not null COMMENT '上传图片id',
thumbup_user_id varchar(10) not null COMMENT '点赞用户id'
); | true |
9c14d890f13cd2d08e1ad7f7d53275786215a2a1 | SQL | jlw429/JasonsBlog | /public/seed.sql | UTF-8 | 284 | 2.65625 | 3 | [
"MIT"
] | permissive | DROP DATABASE IF EXISTS jasons_blog;
CREATE DATABASE jasons_blog;
USE jasons_blog;
CREATE TABLE blog (
ID INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
CreationDate datetime default current_timestamp,
Author VARCHAR(100) NOT NULL,
Title VARCHAR(100) NOT NULL,
Blog_Body TEXT NOT NULL
); | true |
ce381ca0ad6ef1252ef4745fc45c85843fa74503 | SQL | mar1n/PHP-OOP-CRUD | /books.sql | UTF-8 | 2,086 | 3.21875 | 3 | [] | no_license | --
-- PostgreSQL database dump
--
-- Dumped from database version 10.3
-- Dumped by pg_dump version 10.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;
SELECT pg_catalog.set_config('search_path', '', fal... | true |
53ee63564f7e11510aed045c0ea6ee01b1280bd0 | SQL | varshawankhede/new-repository | /ossum/ossum.sql | UTF-8 | 2,062 | 3.0625 | 3 | [
"Apache-2.0"
] | permissive | -- phpMyAdmin SQL Dump
-- version 5.1.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Sep 13, 2021 at 02:23 PM
-- Server version: 10.4.20-MariaDB
-- PHP Version: 7.3.29
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIE... | true |
83254bc87b08b97bd1e88b9c08c5be20d40d0b30 | SQL | mo3athBaioud/bluestome | /ssi-common-model/res/scripts/mobile.sql | UTF-8 | 720 | 3.59375 | 4 | [] | no_license | DROP TABLE IF EXISTS TBL_MOBILE_BRAND;
--手机品牌表
CREATE TABLE TBL_MOBILE_BRAND (
D_ID INT(4) NOT NULL AUTO_INCREMENT, --主键ID
D_BRAND_ID INT(4) NOT NULL, --品牌ID
D_CH_NAME VARCHAR(128) NOT NULL DEFAULT '', --品牌名称
D_EN_NAME VARCHAR(128), -- 品牌英文名
D_ICON VARCHAR(512), -- 品牌图标
D_SOURCE SMALLINT(6) NOT NULL DEFAU... | true |
c5d70d668431ae5040530c42e7cb9f6e6ce7ea76 | SQL | wilkersoh/prisma-orm | /base.sql | UTF-8 | 898 | 3.8125 | 4 | [] | no_license | -- Create a custom type
CREATE TYPE "user_role_enum" AS ENUM ('user', 'admin', 'superadmin');
-- Create a table
CREATE TABLE "users"(
"id" BIGSERIAL PRIMARY KEY NOT NULL,
"name" VARCHAR(255) NOT NULL,
"email" VARCHAR(255) UNIQUE NOT NULL,
"role" user_role_enum NOT NULL DEFAULT('user')
);
-- Create a t... | true |
c5cf8a85e752a4d4f475eb2205277c1aa5a9baf1 | SQL | reiherric/Hackerrank | /SQL/Basic Select/Weather Observation Station 9.sql | UTF-8 | 584 | 3.765625 | 4 | [] | no_license | /*
Query the list of CITY names from STATION that do not start with vowels. Your result cannot contain duplicates.
Input Format
The STATION table is described as follows:
STATION
FIELD FORMAT
ID NUMBER
CITY VARCHAR2(21)
STATE VARCHAR2(2)
LAT_N NUMBER
lONG_W NUMBER
where LAT_N is the norther... | true |
2066f9e1e52131d52cc83357eaafa659134b9b9d | SQL | ThePatrickStar/sqlite-test-generator | /minimized/unionvtabfault.sql | UTF-8 | 472 | 2.78125 | 3 | [] | no_license | ATTACH 'test.db2' AS aux;
CREATE TABLE t1(a INTEGER PRIMARY KEY, b TEXT);
CREATE TABLE t2(a INTEGER PRIMARY KEY, b TEXT);
CREATE TABLE aux.t3(a INTEGER PRIMARY KEY, b TEXT);
INSERT INTO t1 VALUES(1, 'one'), (2, 'two'), (3, 'three');
INSERT INTO t2 VALUES(10, 'ten'), (11, 'eleven'), (12, 'twelve');
INSERT INTO t3 VALUES... | true |
34378fb120f52882357420f64675d738698d02dd | SQL | TYPO3-svn-archive/artless | /ext_tables.sql | UTF-8 | 407 | 2.65625 | 3 | [] | no_license | #
# Table structure for table 'pages'
#
CREATE TABLE pages (
tx_artless_startdate int(11) DEFAULT '0' NOT NULL,
tx_artless_enddate int(11) DEFAULT '0' NOT NULL,
tx_artless_place text,
tx_artless_enablecomments tinyint(3) DEFAULT '0' NOT NULL,
tx_artless_categories text,
tx_artless_relatives text,
tx_artless_owne... | true |
14d6dcdde75cbc52b0c8df1b0d839df6ed4f4eec | SQL | anctilsa/sources | /2016-09 Projet Saint-Pierre - C#/SOURCES/Dev/stpierrePeuple.sql | UTF-8 | 12,907 | 3.609375 | 4 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.5.1
-- http://www.phpmyadmin.net
--
-- Client : 127.0.0.1
-- Généré le : Ven 25 Novembre 2016 à 15:55
-- Version du serveur : 10.1.19-MariaDB
-- Version de PHP : 5.6.28
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@C... | true |
4cead495204606e92d88cd2d59f3f9ab12634aa9 | SQL | esharp054/EDUEXCHANGE | /eduexchange.sql | UTF-8 | 16,198 | 3.015625 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.5.4.1deb2ubuntu2
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: May 04, 2017 at 07:08 PM
-- Server version: 5.7.18-0ubuntu0.16.04.1
-- PHP Version: 7.0.15-0ubuntu0.16.04.4
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_C... | true |
2cea345c757c1e985c4f318e27326fe509790c6d | SQL | hyotylainensusanna/twimm | /database/create_tables.sql | UTF-8 | 1,043 | 3.78125 | 4 | [] | no_license | DROP TABLE kayttajanKiinnostus;
DROP TABLE kiinnostus;
DROP TABLE kayttaja;
CREATE TABLE authority (
id INT NOT NULL auto_increment PRIMARY KEY,
role varchar(255) NOT NULL UNIQUE
) ENGINE=InnoDB CHARACTER SET=utf8;
CREATE TABLE kayttaja (
id INT NOT NULL AUTO_INCREMENT,
etunimi VARCHAR(20) NOT NULL,
sukunimi ... | true |
29e6986b87fddd451270a982c51a5d809cb92105 | SQL | pepeul1191/ruby-padrino-gestion | /archivos/migrations/20180813222027_create_archivos.sql | UTF-8 | 334 | 2.984375 | 3 | [] | no_license | -- migrate:up
CREATE TABLE archivos (
id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
nombre VARCHAR(45) NOT NULL,
nombre_generado VARCHAR(80) NOT NULL,
ruta VARCHAR(40) NOT NULL,
extension_id INTEGER,
FOREIGN KEY (extension_id) REFERENCES extensiones(id) ON DELETE CASCADE
);
-- migrate:down
DROP TABLE IF EXI... | true |
9721fc4341d949cafce2c250ceedaf0d0c97f2be | SQL | vuloi/instaliker | /schema.sql | UTF-8 | 1,162 | 3.734375 | 4 | [] | no_license | # Tao bang users
# Bang nay chua cac truong thong tin: user_id, access_token, username, created_on. 3 truong du lieu dau tien chung ta
# nhan duoc sau khi truy van de lay access_token. Moi user cua instragram co mot user_id duy nhat. Do do chung ta su
# dung user_id lam khoa chinh cho bang users
CREATE TABLE users (
... | true |
ac04c2ca21e1b8922b5214d39b57485fca9b6812 | SQL | Rubenjose2/bamazon | /seed.sql | UTF-8 | 1,428 | 2.640625 | 3 | [] | no_license | -- Adding Initial Data into Database
INSERT INTO product (product_name, department_name,price,stock_quantity)
VALUES ("Sandas",1,34.99,100);
INSERT INTO product (product_name, department_name,price,stock_quantity)
VALUES ("Fine Towels",1,19.39,20);
INSERT INTO product (product_name, department_name,price,stock_quan... | true |
c17a2b18df315c485c2abb66bb5baf69a30a8d70 | SQL | cortlandperry/CS121 | /cs121hw7 2/make-warehouse.sql | UTF-8 | 1,730 | 4.15625 | 4 | [] | no_license | -- [Problem 3]
DROP TABLE IF EXISTS resource_fact;
DROP TABLE IF EXISTS visitor_fact;
DROP TABLE IF EXISTS datetime_dim;
DROP TABLE IF EXISTS resource_dim;
DROP TABLE IF EXISTS visitor_dim;
-- This is the dimension table for the visitor
CREATE TABLE visitor_dim (
visitor_id INTEGER NOT NULL AUTO_INCREMENT,
ip_ad... | true |
26ed38403761ada66207deba868a8a290bb2e338 | SQL | Antonio-Cruciani/Agricola-Database | /Scripts/Agricola View.sql | UTF-8 | 4,249 | 4.09375 | 4 | [] | no_license | --7) Seleziona il terreno più grande con più di un dipendente che lavora ad esso,la città,la via in cui si trova ed il numero totale di dipendenti (agronomi e contadini) che lavorano a quel terreno
select
terreno.id_terreno as IdTerreno,
terreno.dimensione as Dimensione,
ifnull(AgronomiCheAnalizzan... | true |
10698533e0fb151a863d6931eb68425b6855cef7 | SQL | cf-student-5731/CFLMS-JAVA-fasy-CodeReview-07 | /sql/database-dump.sql | UTF-8 | 34,078 | 2.890625 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.9.5deb2
-- https://www.phpmyadmin.net/
--
-- Host: localhost:3306
-- Generation Time: Aug 15, 2020 at 09:40 AM
-- Server version: 10.3.22-MariaDB-1ubuntu1
-- PHP Version: 7.4.3
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
... | true |
3f28d35404497840f99a9a5e87c5f27d360f5b8b | SQL | advaitpatel/CSC-453-Database-Technology | /orac_allfiles/oracle_sql/scripts/ch08/fig8-19a.sql | UTF-8 | 271 | 2.765625 | 3 | [] | no_license | SELECT invoice_number, terms_id,
CASE terms_id
WHEN 1 THEN 'Net due 10 days'
WHEN 2 THEN 'Net due 20 days'
WHEN 3 THEN 'Net due 30 days'
WHEN 4 THEN 'Net due 60 days'
WHEN 5 THEN 'Net due 90 days'
END AS terms
FROM invoices | true |
16972238f8046a27e3b00c181b9617bd53ce292b | SQL | UAMS-DBMI/PosdaTools | /posda/posdatools/queries/sql/ClassicPublicDownloadPath.sql | UTF-8 | 571 | 3.390625 | 3 | [
"Apache-2.0"
] | permissive | -- Name: ClassicPublicDownloadPath
-- Schema: public
-- Columns: ['file_path']
-- Args: ['sop_instance_uid']
-- Tags: ['public']
-- Description: Get the 'classic download file path' for a file based on sop_instance_uid
--
select concat(gs.project,'/',
gs.patient_id,'/',
s.study_instance_ui... | true |
f5e45b7af2de6c03b33895459172205903ff14b3 | SQL | chudali1/jachaubachau | /sql/v1.sql | UTF-8 | 802 | 3.328125 | 3 | [] | no_license | create table symptoms(
s_id int primary key auto_increment ,
s_name varchar(100) not null);
--------------------------------------------------------------------------------------------------------------------
create table desease(
d_id int primary key auto_increment,
d_name varchar(100) not null);
d
--------... | true |
bb33ac0fe1493d9030c2bd6f15ee94bd51a0f0e8 | SQL | andrenq/host_agent | /solution.sql | UTF-8 | 1,016 | 4.3125 | 4 | [] | no_license | -- First exercise
SELECT cpu_number,
id,
total_mem
FROM host_info
ORDER BY 1,
2,
3 DESC;
-- SECOND exercise
SELECT host_id,
hostname,
total_memory,
Round(used_memory_percentage, 0)
FROM (SELECT host_id,
hostname,
tot... | true |
1a729db3477b9a33c1517c969f241e8566b2484a | SQL | xuegaodanjuan/note | /target/classes/schema.sql | UTF-8 | 502 | 2.703125 | 3 | [] | no_license | create table User
(
id int(2147483647),
username varchar(20) unique not null,
password varchar(20) not null,
firstName varchar(30) not null,
lastName varchar(30) not null,
email varchar(30) not null
);
create table NoteBook (
id int(2147483647),
name varchar(50) not null,
message varchar(50) not nu... | true |
fa6033229099ad1e6e885f127485db9d003948ec | SQL | UCLALibrary/sql-scripts | /Voyager/Acquisitions/Report of current print continuation POs RR-583.sql | UTF-8 | 2,831 | 3.625 | 4 | [] | no_license | select distinct
po.po_number
, f.ledger_name
, vger_support.unifix(title) as title
, v.vendor_name
, v.vendor_code
, f.fund_code
, f.fund_name
, ( select
i.invoice_number
from invoice i
inner join invoice_line_item ili on i.invoice_id = ili.invoice_id
where ili.line_item_id = li.line_item_id
... | true |
723043a0b59a47c8130f7098d3262a60ee6216ae | SQL | Storm-Visser/Testen | /gerecht.sql | UTF-8 | 3,135 | 3.25 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.9.0.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Jan 06, 2021 at 01:57 PM
-- Server version: 10.4.6-MariaDB
-- PHP Version: 7.3.9
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OL... | true |
f6c95266d9049d03d5e7fb6bf94af7215de7c53d | SQL | CUBRID/cubrid-testcases | /sql/_13_issues/_12_2h/cases/bug_bts_8226.sql | UTF-8 | 862 | 3.140625 | 3 | [
"BSD-3-Clause"
] | permissive | set system parameters 'create_table_reuseoid=no';
--TEST: [ErrorEnhance] Error message is not clear when creating a view with invalid column name.
create table aa(a int);
insert into aa values(1), (2), (3);
--create view
create view v as select aa a from aa;
show create view v;
select * from v;
select a.a from v o... | true |
8b813004d10aaedcf78557ebe17cc4dd12280b80 | SQL | Sywooch/question-list | /point_enter/auth_a_i.sql | UTF-8 | 5,285 | 2.828125 | 3 | [] | no_license | -- --------------------------------------------------------
-- Хост: 127.0.0.1
-- Версия сервера: 5.5.38-log - MySQL Community Server (GPL)
-- ОС Сервера: Win32
-- HeidiSQL Версия: 8.3.0.4694
-- ---------------------------------------------------... | true |
f830c075bf27259b23bc18eb98f12b19abff2066 | SQL | allwaysoft/fun | /Clients/MBTA/SQL/View_Scripts/COST_TO_COMPLETE_CADVW_NEW.sql | UTF-8 | 4,333 | 3.578125 | 4 | [] | no_license | /*
CREATE OR REPLACE FORCE VIEW DA1.COST_TO_COMPLETE_CADVW (CTC_COMP_CODE, CTC_JOB_CODE, CTC_PHS_CODE1
, CTC_PHS_CODE2, CTC_CAT_CODE, CTC_PHS_NAME, CTC_POST_DATE
, CTC_COMMITED_AMT, CTC_WM_CODE)
AS
SELECT JCDT_COMP_C... | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.