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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
80268467f833e654093db219c5653fbb8936b747 | SQL | A5H0K/library-service-app | /src/main/resources/data.sql | UTF-8 | 1,177 | 3.59375 | 4 | [] | no_license | DROP TABLE IF EXISTS lib_category;
CREATE TABLE lib_category (
category_id INT AUTO_INCREMENT PRIMARY KEY,
category_name VARCHAR(250) NOT NULL
);
insert into lib_category(category_id,category_name) values (1,'Science');
insert into lib_category(category_id,category_name) values (2,'Literature');
DROP TABLE IF... | true |
449c806a1a8a768cbbb48defe3a5fa41a259b70f | SQL | 93-silvestre/MySQL | /Banco de Dados Curso.sql | UTF-8 | 2,676 | 4.15625 | 4 | [] | no_license | create database db_cursoDaMinhaVida;
use db_cursoDaMinhaVida;
create table tb_categoria(
id bigint auto_increment,
descricao varchar(225) not null,
ativo boolean not null,
primary key (id)
);
insert into tb_categoria (descricao, ativo) values ("Front End" , true);
insert into tb_categoria (descricao, ativo) values (... | true |
a813cb3d6ef4e0ed481b1e6582400ceddb1dacf0 | SQL | hxhits/omvnok | /poi-service/src/main/resources/db/migration/V1_032_recruitment_cv.sql | UTF-8 | 3,024 | 3.296875 | 3 | [] | no_license | ALTER TABLE `omart_db`.`omart_recruitment_apply`
ADD COLUMN `status` INT(2) NULL DEFAULT 0 COMMENT '0: New Apply\n1: Interview Invite\n2: Interview Accept\n3: Interview Reject\n4: Interview Fail\n5: Interview OK' AFTER `is_deleted`;
CREATE TABLE `omart_user_cv` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`user_id` va... | true |
cdded6439576cc2bd37f7127159b479bbc17e777 | SQL | eSaniello/studenten_presentie | /db/studenten_presentie.sql | UTF-8 | 4,123 | 3.265625 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.9.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Nov 19, 2019 at 02:57 AM
-- Server version: 10.4.8-MariaDB
-- PHP Version: 7.3.11
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD... | true |
425486d4f75229196eb6787114e4387bedb009f5 | SQL | EPMS3POC/EPMS3POC1 | /EPMS3POC1API/CLI/Tables/DiagnosticCenterPhone.sql | UTF-8 | 1,027 | 3.296875 | 3 | [] | no_license | CREATE TABLE [CLI].[DiagnosticCenterPhone] (
[DiagnosticCenterPhoneId] BIGINT IDENTITY (1, 1) NOT NULL,
[PhoneId] BIGINT NULL,
[DiagnosticCenterId] BIGINT NULL,
[PhoneTypeId] BIGINT NULL,
[CreatedDateTime] DATETIME NOT NULL,
[... | true |
09f701d5e1b27b32f9f9bb6b54724bc37a138e4e | SQL | karandesai24/Shopping-cart | /tbl_product.sql | UTF-8 | 1,693 | 3.25 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 5.1.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Nov 15, 2021 at 10:46 AM
-- Server version: 10.4.21-MariaDB
-- PHP Version: 7.3.31
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIE... | true |
f25a583065b4647e698331c02138ef032ef552ad | SQL | golkii-bpo/golkiibpo_database | /Vicidial/Actualizar Datos Telefonos.sql | UTF-8 | 1,225 | 3.609375 | 4 | [] | no_license |
CREATE PROCEDURE GetUpdatePhones ( IN FechaValidacion DATETIME)
BEGIN
DROP TABLE IF EXISTS GolkiiPhones;
CREATE TABLE GolkiiPhones
with cte_TelefonosDirty (Telefono,IdTipificacion,IdCampaign,list_id,CalledCount,CallDate,FullName)
as
(
select
a.phone_number,
a.status,
a.campaig... | true |
9b73794689658a9aa6f372c16f6ac3477554e39e | SQL | postgres/postgres | /src/test/regress/sql/int4.sql | UTF-8 | 5,588 | 3.40625 | 3 | [
"PostgreSQL"
] | permissive | --
-- INT4
--
-- int4_tbl was already created and filled in test_setup.sql.
-- Here we just try to insert bad values.
INSERT INTO INT4_TBL(f1) VALUES ('34.5');
INSERT INTO INT4_TBL(f1) VALUES ('1000000000000');
INSERT INTO INT4_TBL(f1) VALUES ('asdf');
INSERT INTO INT4_TBL(f1) VALUES (' ');
INSERT INTO INT4_TBL(f... | true |
100fb8148063611d9a5bf28bdf80486d5a574786 | SQL | HuayiJin/SJTU-E100-server | /E100.sql | UTF-8 | 8,235 | 2.859375 | 3 | [] | no_license | -- MySQL dump 10.13 Distrib 5.7.23, for Linux (x86_64)
--
-- Host: localhost Database: E100-test0
-- ------------------------------------------------------
-- Server version 5.7.23-0ubuntu0.16.04.1
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER... | true |
4834ac4785cb0134cbc494ffb1d0f3094d09151a | SQL | jgarzonext/plsql-testing | /script_plsql/bd_iaxis/script/disparadores/DEL_SIN_TRAMITA_MOVPAGO.sql | UTF-8 | 903 | 3.109375 | 3 | [] | no_license | --------------------------------------------------------
-- DDL for Trigger DEL_SIN_TRAMITA_MOVPAGO
--------------------------------------------------------
CREATE OR REPLACE EDITIONABLE TRIGGER "AXIS"."DEL_SIN_TRAMITA_MOVPAGO"
AFTER INSERT
ON sin_tramita_movpago
FOR EACH ROW
WHEN (NEW.cestpa... | true |
2342406c929053d6532fefcecd9c8bf3219433f2 | SQL | nickolai85/newstore | /misc/evaluationdb.sql | UTF-8 | 697 | 3.140625 | 3 | [] | no_license | CREATE TABLE `orders` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`user_id` int(11) NOT NULL DEFAULT '0',
`paid_at` datetime DEFAULT NULL,
`created_at` datetime NOT NULL,
`updated_at` datetime NOT NULL,
`comment` text NOT NULL,
`status` tinyint(4) NOT NULL DEFAULT '0',
`user_ip` varchar(15) NOT NULL,
PR... | true |
725360a19ec085b5022fd0e66ff003c6fc0c1a61 | SQL | CUBRID/cubrid-testcases | /sql/_04_operator_function/_08_click_counter/_003_complex/cases/1004.sql | UTF-8 | 451 | 3.234375 | 3 | [
"BSD-3-Clause"
] | permissive | --[er]test incr, decr with update statement
CREATE CLASS board (
id INT, title VARCHAR(100), content VARCHAR(4000), read_count INT ,edit_count INT);
INSERT INTO board VALUES (1, 'aaa', 'text...', 0,10);
INSERT INTO board VALUES (2, 'bbb', 'text...', 0,0);
INSERT INTO board VALUES (3, 'ccc', 'text...', 0,0);
update... | true |
e58992e1e8377eadea4fd2071679a705da126d58 | SQL | Sanlys/Oppgaver-VG2 | /Databaser/Cinema Booking System/Films.sql | UTF-8 | 260 | 2.96875 | 3 | [] | no_license | SHOW DATABASES;
CREATE DATABASE cinema_booking_system;
USE cinema_booking_system;
CREATE TABLE films(
id INT PRIMARY KEY AUTO_INCREMENT,
name VARCHAR(45) NOT NULL UNIQUE,
length_min INT NOT NULL
);
SHOW TABLES;
SELECT * FROM films;
DESCRIBE films; | true |
742a861b94dc1803fe2157263e0b97ec60318dcb | SQL | tongpa/JMProject | /ManageProject/sql/projects.sql | UTF-8 | 19,051 | 3.140625 | 3 | [] | no_license | /*
Navicat MySQL Data Transfer
Source Server : localhost
Source Server Version : 50525
Source Host : localhost:3306
Source Database : projects
Target Server Type : MYSQL
Target Server Version : 50525
File Encoding : 65001
Date: 2014-10-15 17:57:51
*/
SET FOREIGN_KEY... | true |
8659f502f654eb9f30aeed5c10cc9f821d3e1a7a | SQL | artur309/1_artur_12M_trab_aval_m13 | /cake_book.sql | UTF-8 | 2,761 | 3.265625 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.8.5
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1:3306
-- Generation Time: 11-Jan-2020 às 01:33
-- Versão do servidor: 5.7.26
-- versão do PHP: 7.2.18
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_... | true |
e60dd2cbfbdcea021142e16e534d97daa6ea3477 | SQL | gxlioper/ecology | /data/Oracle/sql201603230101.sql | GB18030 | 962 | 2.75 | 3 | [] | no_license | delete from HtmlLabelIndex where id=126907
/
delete from HtmlLabelInfo where indexid=126907
/
INSERT INTO HtmlLabelIndex values(126907,'ڻлڻҳͻ')
/
INSERT INTO HtmlLabelInfo VALUES(126907,'ڻлڻҳͻ',7)
/
INSERT INTO HtmlLabelInfo VALUES(126907,'The meeting cycle may exist conflict with the existing conference meeting ro... | true |
8e3e489519a336e43fda25f183dc7e824a0f7af3 | SQL | DMilmont/mode | /Mode/roadster/spaces/Team SALES OPS/Salesforce __ Dealer_Admin Errors that must be fixed.2798ada0f427/6) Dealer Names don't match.c5433f531f09.sql | UTF-8 | 763 | 3.546875 | 4 | [] | no_license |
SELECT sf2.integration_manager "Integration Manager",
admin.name as "Admin Dealer Name",
case when sf2.dealer_name is null then '<<can''t find - DPID must be wrong too>>' else sf2.dealer_name END "Salesforce Dealer Name" ,
admin.dpid as "Admin DPID", admin.status as "Admin Status"
FROM public.deal... | true |
86c1a5b1027d2225311a7123aa8b4e7988b0e774 | SQL | PekkaPek/languagelearner | /db/db_create.sql | UTF-8 | 2,692 | 3.296875 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.4.10
-- http://www.phpmyadmin.net
--
-- Host: localhost:8889
-- Generation Time: May 29, 2016 at 10:40 AM
-- Server version: 5.5.42
-- PHP Version: 7.0.0
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
--
-- Database: `mobileweb-amazeme`
--
CREATE DATABASE IF NOT ... | true |
dd973f13bb7cc4d2796f73a6cb0972befa3fb6f4 | SQL | MichaelCurrin/twitterverse | /app/lib/db_query/sql/development/topicStatsHistory/topicStatsC.sql | UTF-8 | 1,348 | 4.46875 | 4 | [
"MIT"
] | permissive | /*
There were issues moving this to topic stats because doing two
inner joins in a row doesn't look right and it's not natural to do count
of countries and towns separately when using distinct.
*/
/*
Join on Country table which necessarily filters to countries only but means
we can't use name without doing a join on ... | true |
13798c12c1e0c699ae7d2818e8d22e145b7fa2d2 | SQL | shuangyulin/ssm_question | /mysql数据库脚本.sql | GB18030 | 3,830 | 3.34375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 3.0.1.1
-- http://www.phpmyadmin.net
--
-- 汾: 5.1.29
-- PHP 汾: 5.2.6
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
-- --------------------------------------------------------
-- ----------------------------
-- Table structure for `admin`
-- ----------------------------
DROP TA... | true |
f1d36134b63fa7aef71123ef705e98480f369d31 | SQL | rmudambi/warzone | /game_analysis/sql/create_turn_state_view.sql | UTF-8 | 1,613 | 3.96875 | 4 | [] | no_license | create view game_analysis_turn_state as
select
p1.end_state_id = 'Won' as p1_winner, -- Did Player 1 win?
g.id as game_id, -- Game ID
t.turn_number as turn_number, -- Turn Number
-- Player 1 State
s1.income as p1_income, s1.armies_on_board ... | true |
cb4b2f619f02d67fc13c444ccac9ff79656e57b5 | SQL | aiturrizaga/SisSegEgresado | /SEGE/oracle_VG.ddl | ISO-8859-1 | 16,710 | 3.015625 | 3 | [] | no_license |
CREATE TABLE alumno
(
cod_alum INTEGER NOT NULL ,
nom_alum VARCHAR2(30) NULL ,
ape_alum VARCHAR2(30) NULL ,
dni_alum INTEGER NOT NULL ,
ingr_alum VARCHAR2(18) NULL ,
fch_nac_alum DATE NULL ,
correo_alum VARCHAR2(50) NULL ,
te... | true |
d4c294d1d0d9af24d47df2c62568129de3aab439 | SQL | jaguilar992/ExpedienteMedico | /06 PL-SQL/01 PLSQL/13.CrearEmergencia.sql | UTF-8 | 1,899 | 3.265625 | 3 | [] | no_license | CREATE OR REPLACE PROCEDURE PL_CrearEmergencia(
observacion IN VARCHAR
,fechaHoraAtencion IN TIMESTAMP
,idExpediente IN INT
,idCentroMedico IN INT
,idMedico IN INT
,mensaje OUT VARCHAR
,resultado OUT SMALLINT
)
IS
--DECLARE
contador INTEGER;
BEGIN
mensaje:='';
resultado:=0;
/*----------------VALIDACI... | true |
d91c0ced95bd125328885a96359f957cc47c67de | SQL | bartovski/UniversityConsole | /src/main/resources/db_sсript.sql | UTF-8 | 1,040 | 4 | 4 | [] | no_license | create table degree
(
id serial not null
constraint degree_pkey
primary key,
name varchar not null
);
create table lector
(
id serial not null,
degree_id integer not null
constraint lector_degree_id_fk
references degree,
name varchar,
salary integer
);
create table depar... | true |
f1774f8217006218fda5f92e620d20f27149d0e2 | SQL | mianandong/fsxy | /fsxy.sql | UTF-8 | 5,429 | 3.265625 | 3 | [] | no_license | /*
Navicat Premium Data Transfer
Source Server : 39.98.135.88_3306
Source Server Type : MySQL
Source Server Version : 50644
Source Host : 39.98.135.88:3306
Source Schema : fsxy
Target Server Type : MySQL
Target Server Version : 50644
File Encoding : 65001
Date: 18/06... | true |
40f048b2b5d05b71a8f7aad0bcc439e535dfc0bf | SQL | vvaug/plsql-examples | /blocos-anonimos-procedures-functions-packages/estrutura.sql | UTF-8 | 2,804 | 3.046875 | 3 | [] | no_license | CREATE TABLE TB_ALUNOS ( MATRICULA INTEGER,
NOME VARCHAR2(100)
);
/
CREATE TABLE TB_NOTAS ( ANO_LETIVO INTEGER,
MATRICULA_ALUNO INTEGER,
NOTA_PRIMEIRO_BIM INTEGER,
NOTA_SEGUNDO_BIM INTEGER,
... | true |
9525c76a26f2dd1668feb567af5a3de3f57a91ee | SQL | fish-spit-bubbles/vvvle | /MySQL/vvvle_adminuser.sql | UTF-8 | 585 | 2.625 | 3 | [] | no_license | SET FOREIGN_KEY_CHECKS = 0;
DROP TABLE IF EXISTS `vvvle_adminuser`;
CREATE TABLE `vvvle_adminuser` (
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT '管理员id自增',
`users` varchar(255) DEFAULT NULL COMMENT '管理员账号',
`pwd` varchar(255) DEFAULT NULL COMMENT '管理员密码',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=14... | true |
89d6895f6ed628c7e2ef3953fda7973c355467b6 | SQL | a3qz/euchre_database_project | /sql_scripts/TournamentCreate.sql | UTF-8 | 191 | 3.03125 | 3 | [] | no_license | create table Tournament(
tournamentid varchar(37),
gameid varchar(37),
roundnumber int,
foreign key (gameid) references Game(gameid),
primary key (tournamentid, gameid)
); | true |
5111b359509b37c19ee732609404b6e2f6e8de74 | SQL | etouss/Infed | /Hook_marked/test3.sql | UTF-8 | 1,450 | 3.5 | 4 | [] | no_license | WITH part_view as (SELECT p_partkey FROM part WHERE p_name IS NULL
UNION SELECT p_partkey FROM part WHERE p_name LIKE'%floral%'),
supp_view as(SELECT s_suppkey FROM supplier WHERE s_nationkey IS NULL
UNION
... | true |
8ed9f4477e1d8c99639891b0559393d61ad2b27d | SQL | leandrocorreati/Curso_mysql | /Curso de MySql/Aula_04_Alteração_Banco.sql | UTF-8 | 1,857 | 3.796875 | 4 | [] | no_license | /* COMANDOS DDL */
ALTER TABLE PESSOAS /* COMANDO PARA ADIÇÃO DE COLUNA A TABELA PROFISSÃO */
ADD COLUMN PROFISSÃO VARCHAR(10);
ALTER TABLE PESSOAS /* COMANDO PARA EXCLUSÃO DE UMA COLUNA NA TABELA PROFISSÃO */
DROP COLUMN PROFISSÃO;
ALTER TABLE PESSOAS
ADD COLUMN PROFISSÃO VARCHAR(20) AFTER NOME; /* O AFTER DEFINE ... | true |
31d1bc22ec8bed5cb33dd8c4245f5533feb05069 | SQL | scchess/LabKey | /server/customModules/ehr/resources/queries/study/demographicsCageClass.sql | UTF-8 | 562 | 3.484375 | 3 | [] | no_license | /*
* Copyright (c) 2010-2013 LabKey Corporation
*
* Licensed under the Apache License, Version 2.0: http://www.apache.org/licenses/LICENSE-2.0
*/
SELECT
d.id,
d.id.MostRecentWeight.MostRecentWeight as MostRecentWeight,
c.sqft as ReqSqFt,
c.height as ReqHeight
from study.demographics d
LEFT JOI... | true |
434ecfcd415916b7cbe627586814003274c7510c | SQL | ramyothman/Qiyas | /Source/EventoNew/QiyasDatabase/BedManagement/Tables/Consultant.sql | UTF-8 | 211 | 2.546875 | 3 | [] | no_license | CREATE TABLE [BedManagement].[Consultant] (
[ConsultantId] INT NOT NULL,
[ConsultantCode] NVARCHAR (50) NULL,
CONSTRAINT [PK_Consultant] PRIMARY KEY CLUSTERED ([ConsultantId] ASC)
);
| true |
b530ec45362bce34d3affe37bd6b27d21c0ed4c1 | SQL | theegr8dev/SocialMedia_DATABASE | /PersonalAcct/Personal StoryImages_Activities.sql | UTF-8 | 6,912 | 2.65625 | 3 | [] | no_license | CREATE TABLE [Personal].[StoryImages_Activities](
[ID] [int] NOT NULL,
[Replys] [text] NOT NULL,
[Replied_By] [varchar](max) NOT NULL
insert into Personal.StoryImages_Activities
values (1, 'Vestibulum ac est lacinia nis.', 'PU11');
insert into Personal.StoryImages_Activities
values (1, 'Morbi non quam nec dui luc... | true |
04d5ebec2d02539c73cccfb0f8d5f97093ad8f09 | SQL | sshellmann/hdfs_fdw | /sql/where_push_down.sql | UTF-8 | 23,016 | 3.59375 | 4 | [
"Apache-2.0"
] | permissive | /*---------------------------------------------------------------------------------------------------------------------
*
* mapping.sql
* Foreign-data wrapper for remote Hadoop servers
* To verify the WHERE Clause with parameters is pushed down.
*
* Portions Copyright (c) 2012-2014, PostgreSQL Glob... | true |
cab76e761b4cd0abe712caf62ab435a6942c5e58 | SQL | kawabata-neolis/KATO | /KATO/SQL/common/CommonForm/ShohinNoTanaList_Kari_View.sql | UTF-8 | 1,267 | 3.328125 | 3 | [] | no_license | SELECT 仮商品.商品コード,
大分類.大分類名,
中分類.中分類名,
メーカー.メーカー名 AS メーカー,
ISNULL(仮商品.C1, '') AS 品名,
仮商品.メモ,
仮商品.棚番本社,
仮商品.棚番岐阜,
仮商品.定価,
仮商品.仕入単価,
仮商品.コメント,
仮商品.標準売価,
仮商品.評価単価,
仮商品.建値仕入単価,
CASE WHEN RTRIM(仮商品.棚番本社) != '' THEN '0' ELSE '1' END AS 見積
FROM 大分類,
中分類,
メーカー,
仮商... | true |
a5d6f3e01749862773eca6744fe2c7e4edec15a9 | SQL | stophobia/SQL | /DLQ_PARTY.sql | UTF-8 | 1,469 | 4.28125 | 4 | [] | no_license | # 현재 연체일이 30일 미만인 사람들의 주민번호, 이름, 휴대폰 번호
SELECT SSN, PARTY_NM, MOBILE_NO
FROM CUST_PARTY
WHERE SSN IN (SELECT DISTINCT SSN
FROM DLQ_PARTY
WHERE DLQ_DURATION < 30 AND CURR_DLQ = 'Y');
# 현재 연체중 또는 과거에 연체 이력 10일 이상
# 외부조인 사용
SELECT TMP1.SSN, TMP1.PARTY_NM, TMP1.MOBILE_NO, TMP2.DLQ_FLAG
FRO... | true |
cfcb9a7a0b8ddf545854f2632ae3fa737c5c394e | SQL | HRiDOX/AskIUT | /ASK_iut_codes/functions/users.sql | UTF-8 | 5,110 | 2.96875 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 5.1.0
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Jul 05, 2021 at 05:19 PM
-- Server version: 10.4.19-MariaDB
-- PHP Version: 8.0.6
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIEN... | true |
51a20436294ab34b8f25053b69b27773c9dc595f | SQL | onursert/LiMo | /6.b Select/ii/select company, job (2 tables).sql | UTF-8 | 111 | 2.8125 | 3 | [] | no_license | SELECT company.id, job.introduction
FROM company, job
WHERE company.id = job.company_id AND company_id = "4"; | true |
8b726c57e082f034c993278493370ab3bc40fc78 | SQL | lshy1993/pcr_database | /sql/mission_reward_data.sql | UTF-8 | 7,165 | 2.53125 | 3 | [] | no_license | DROP TABLE IF EXISTS mission_reward_data;
CREATE TABLE IF NOT EXISTS `mission_reward_data` (`id` INTEGER NOT NULL,`mission_reward_id` INTEGER NOT NULL,`reward_type` INTEGER NOT NULL,`reward_id` INTEGER,`reward_num` INTEGER NOT NULL,PRIMARY KEY(`id`));
INSERT INTO `mission_reward_data` VALUES (1,18001001,6,93001,100);
I... | true |
050026ea742a72cf1a15716e79692f8a528ef2b5 | SQL | huriahar/CSC343-Databases | /assignment3/q3.sql | UTF-8 | 1,197 | 4.71875 | 5 | [] | no_license | SET SEARCH_PATH TO carschema;
DROP VIEW IF EXISTS reservation_freq CASCADE;
DROP VIEW IF EXISTS most_reserved CASCADE;
DROP VIEW IF EXISTS most_reserved_tie CASCADE;
-- Find the frequency at which each car that was rented in 2017
-- Only consider completed reservations
-- Only consider reservations in Toronto
CREATE ... | true |
1e3b4087826b349cb71e2826ebe9320fa9e36c4b | SQL | SajibTalukder2k16/Laravel-Database-Project | /create.sql | UTF-8 | 2,433 | 3.984375 | 4 | [] | no_license | drop TABLE IF EXISTS Operates;
drop TABLE IF EXISTS Account;
drop TABLE IF EXISTS Transaction_table;
drop TABLE IF EXISTS ATM;
drop TABLE IF EXISTS Account_Type;
drop TABLE IF EXISTS Customer;
drop TABLE IF EXISTS Branch;
drop TABLE IF EXISTS Bank;
drop TABLE IF EXISTS login;
create table login
(
id int NOT NULL AUTO... | true |
160a6d8a605b09329535e354589b128405238cfa | SQL | CUBRID/cubrid-testcases | /sql/_27_banana_qa/issue_5765_timezone_support/_00_dev_cases/_02_operator/_37_time_to_sec_with_tz/cases/time_to_sec_007.sql | UTF-8 | 1,584 | 2.625 | 3 | [
"BSD-3-Clause"
] | permissive | --pass out-of-range data of timestamptz/datetimetz type to the parameter
--2. [error] out-of-range argument: timestamptz type
select time_to_sec(timestamptz'23:00:00 13/01');
select time_to_sec(timestamptz'04:14:07 1/19/2038');
select time_to_sec(timestamptz'03:15:07 1/19/2038');
select time_to_sec(timestamptz'03... | true |
c8b7d4a61580d2f06c82d790bdbd6696df780589 | SQL | ehtjd4893/dbstudy | /11_기본sql 작성하기2.sql | UTF-8 | 2,517 | 3.796875 | 4 | [] | no_license | ------------------------4월 2일 작업 시작--------------------------------------
CREATE TABLE nation(
nation_code NUMBER(3),
nation_name VARCHAR2(30),
nation_prev_rank NUMBER,
nation_curr_rank NUMBER,
nation_parti_person NUMBER,
nation_parti_event NUMBER
);
ALTER TABLE nation ADD CONSTRAINT nation_pk ... | true |
e04dc49e81e00eea49a265ef4a3faadd4a54d6c1 | SQL | Aasfga/tcs-solutions | /ID/H/bank.sql | UTF-8 | 2,722 | 3.75 | 4 | [] | no_license | DROP TABLE IF EXISTS klienci CASCADE;
DROP TABLE IF EXISTS konta CASCADE;
DROP TABLE IF EXISTS transakcje CASCADE;
CREATE TABLE klienci (
id numeric(11,0) NOT NULL,
imie character varying(150) NOT NULL,
nazwisko character varying(200) NOT NULL
);
CREATE TABLE konta (
nr_konta numeric(11,0) NOT NULL,
... | true |
ee7b442e93f5ff1ec4ea4ad811fcff7736df46aa | SQL | rvmladenov/Soft-Uni | /Level 3/DB/Week 6 - Език SQL – групиране и DDL/Problem25.sql | UTF-8 | 310 | 3.9375 | 4 | [] | no_license | -- Problem 25. Write a SQL query to display the average employee salary by department and job title.
use SoftUni;
SELECT d.Name as Department, e.JobTitle, AVG(e.Salary) as [Average Salary]
from Employees e
join Departments d on e.DepartmentID = d.DepartmentID
group by d.Name, e.JobTitle
order by e.JobTitle
| true |
27a803d31f74feacdd7edd452f143b111fceda0d | SQL | chanoh-park/mybatisStudy2 | /src/main/resources/www/study/com/bulletinboard/POST_DDL.sql | UTF-8 | 1,222 | 3.53125 | 4 | [] | no_license | drop table t_bulletin_board;
drop table t_post;
-- 게시판 : 자유게시판, 공지사항, FAQ, ...
-- id, name
create table t_bulletin_board (
id number(10),
name varchar2(50),
primary key(id)
);
insert into t_bulletin_board (id, name)
values(-1, '자유게시판');
--게시글
-- hierarchy_id, hierarchy_id, content, post_... | true |
7ee59281c45e0b55b4f9113a1d266da48b5bc0f3 | SQL | AndresMarconi/INGIIgrupo28 | /HomeSwitch/homeswitch.sql | UTF-8 | 7,781 | 3.03125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.5.1
-- http://www.phpmyadmin.net
--
-- Servidor: 127.0.0.1
-- Tiempo de generación: 19-05-2019 a las 18:30:38
-- Versión del servidor: 10.1.13-MariaDB
-- Versión de PHP: 5.6.20
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT... | true |
f6bf963e60a249f6c837251d518f85c2fef47153 | SQL | CUBRID/cubrid-testcases | /sql/_33_elderberry/cbrd_24042/cbrd_24101/impossibility/cases/cte.sql | UTF-8 | 525 | 3.515625 | 4 | [
"BSD-3-Clause"
] | permissive | --Case where view merge is impossible.
DROP TABLE IF EXISTS t_a, t_b;
CREATE TABLE t_a
(
col_a INT,
col_b INT
);
CREATE TABLE t_b
(
col_a INT,
col_b INT
);
INSERT INTO t_a
VALUES (1,1),(2,2),(3,3);
INSERT INTO t_b
VALUES (1,1),(2,2),(3,3);
--subquery has CTE spec.
SELECT /*+ recompile */ a... | true |
1cee64cfa044ed0fee240dc2e953d6b68ad05c80 | SQL | awayjin/JavaScript | /sql/base-tech/source_code/Sample/Ch07/7_1/List7_6_Oracle_SQLServer_DB2_PostgreSQL.sql | UTF-8 | 168 | 2.75 | 3 | [] | no_license | --Oracle, SQL Server, DB2, PostgreSQL
SELECT product_id, product_name
FROM Product
INTERSECT
SELECT product_id, product_name
FROM Product2
ORDER BY product_id; | true |
e574e89f388aaa7d9ff153c38e6e1f117f706c26 | SQL | johnmahugu/TodoApp | /EX_Usager.sql | UTF-8 | 1,697 | 3.078125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.1.8
-- http://www.phpmyadmin.net
--
-- Client : localhost
-- Généré le : Ven 24 Octobre 2014 à 15:26
-- Version du serveur : 5.5.34-MariaDB-cll-lve
-- Version de PHP : 5.4.23
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIE... | true |
fe7e1e0806be9ffb01dd263d0b58b2e869d1fff6 | SQL | TC-haoshuai/rmis | /reclamation.sql | UTF-8 | 90,802 | 2.921875 | 3 | [] | no_license | /*
Navicat MySQL Data Transfer
Source Server : hao
Source Server Version : 50716
Source Host : localhost:3306
Source Database : reclamation
Target Server Type : MYSQL
Target Server Version : 50716
File Encoding : 65001
Date: 2018-09-24 19:58:14
*/
SET FOREIGN_KEY_CHECKS=0;
-- ---... | true |
fe6c237301a3968a7b0f98fc672adc31df073e31 | SQL | Mureithi/ci3 | /dbv/data/schema/get_prepare_order_values.sql | UTF-8 | 1,614 | 3.3125 | 3 | [] | no_license | CREATE DEFINER=`root`@`localhost` PROCEDURE `get_prepare_order_values`(
IN $station VARCHAR(255),
IN $selected_vaccine VARCHAR(255),
IN $station_id VARCHAR(255)
)
begin
if($station= '3' )THEN
SELECT sum(msb.`stock_balance`) AS stock_balance,
min(msb.`expiry_date`) as first_expiry_date, mv.Doses_required, mv.Was... | true |
d3939d54313f2416d391d4b7365802def3e11ebb | SQL | khongvan/VTIACADEMY | /SQL/Testing System/Assignment 4.sql | UTF-8 | 5,329 | 4.28125 | 4 | [] | no_license | USE TestingSystem;
-- Question 1: Viết lệnh để lấy ra danh sách nhân viên và thông tin phòng ban của họ
SELECT *
FROM `Account` a
INNER JOIN Department d ON d.deparmentID = a.departmentID;
-- Question 2: Viết lệnh để lấy ra thông tin các account được tạo sau ngày 20/12/2010
SELECT *
FROM `account`
WHERE createDate... | true |
d9a1bad2beb19b1e5e8e4fe283f62a24d7ef1a5d | SQL | sw88tch/interactive_SQL_simulator | /раздел_2_2/iSQLs_2_2_6.sql | WINDOWS-1251 | 222 | 4.125 | 4 | [] | no_license | SELECT name_author, SUM(amount) AS
FROM author
LEFT JOIN book ON author.author_id = book.author_id
GROUP BY name_author HAVING SUM(amount) < 10 OR COUNT(title) = 0
ORDER BY ASC; | true |
a9a6f6bad3c1b61cf01aa6c2a621967e95cb636c | SQL | TwilightKiddy/Choker | /Resources/Set_Mute_Time.sql | UTF-8 | 128 | 2.90625 | 3 | [] | no_license | INSERT INTO servers (id, mute_time)
VALUES($id, $mute_time)
ON CONFLICT(id)
DO UPDATE SET mute_time=excluded.mute_time; | true |
833571725072563290877375fb86f6d475f05b0e | SQL | jackljj007/BMSystem | /src/main/sql/works.sql | UTF-8 | 1,491 | 3.546875 | 4 | [] | no_license |
create table customer(
id int not null auto_increment,
name varchar(30) not null,
phone varchar(30),
address varchar(50),
primary key(id)
);
create table supply(
id int not null auto_increment,
name varchar(30) not null,
phone varchar(30),
address varchar(50),
primary key(id)
);
... | true |
3e8bd70e3789f30b856c7e027233e5828f5c71b5 | SQL | liquibase/liquibase | /liquibase-standard/src/test/java/liquibase/verify/saved_state/compareGeneratedSqlWithExpectedSqlForMinimalChangesets/addForeignKeyConstraint/unsupported.sql | UTF-8 | 364 | 2.703125 | 3 | [
"LicenseRef-scancode-free-unknown",
"Apache-2.0"
] | permissive | -- Database: unsupported
-- Change Parameter: baseColumnNames=person_id
-- Change Parameter: baseTableName=address
-- Change Parameter: constraintName=fk_address_person
-- Change Parameter: referencedColumnNames=id
-- Change Parameter: referencedTableName=person
ALTER TABLE address ADD CONSTRAINT fk_address_person FORE... | true |
62eb2e1f518c10c73b053a1daa454eb363efa497 | SQL | saxena785/toxsl_task | /toxsl_yi.sql | UTF-8 | 2,745 | 3.140625 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.9.0.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Jun 08, 2020 at 03:05 PM
-- Server version: 10.4.6-MariaDB
-- PHP Version: 7.1.32
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @O... | true |
f7fe1376f57af1c3325d09c3698ed64d9612339a | SQL | dustinknopoff/explorer | /migrations/2019-05-03-111946_notes/up.sql | UTF-8 | 227 | 3.1875 | 3 | [] | no_license | -- Your SQL goes here
create table notes
(
id BIGINT PRIMARY KEY NOT NULL,
title TEXT
);
create table tags
(
noteId BIGINT NOT NULL,
tag TEXT PRIMARY KEY,
FOREIGN KEY (noteId) REFERENCES Notes (id)
); | true |
d4617cf1897cd6676b3165dfd7e31a33b386a7b5 | SQL | sritabh/mySQLWorkSpace | /Cycle1_Q4.sql | UTF-8 | 2,112 | 3.71875 | 4 | [] | no_license | create table DEPARTMENT(
DNO int primary key NOT NULL,
DNAME varchar(50),
D_HOD varchar(50)
);
create table EMPLOYEE(
ENO int primary key NOT NULL AUTO_INCREMENT,
ENAME varchar(55) NOT NULL,
SALARY int NOT NULL,
DNO int,
MNGRNO int,
DOJ DATE NOT NULL,
JOB varchar(55),
ADDRESS varchar(255),
CITY ENUM('KOCHI'... | true |
c7928a696aec23ad6ed1d03f27716a413deab18c | SQL | maxchv/LearnPython | /week12/examples/db/movies.sql | UTF-8 | 641 | 2.8125 | 3 | [] | no_license | -- https://sqlbolt.com/lesson/select_queries_introduction
CREATE TABLE movies
(
id INTEGER PRIMARY KEY AUTOINCREMENT,
title NOT NULL,
director NOT NULL,
year INTEGER,
length_minutes INTEGER
);
INSERT INTO movies (title, director, year, length_minutes) VALUES
("Toy Story", "John Lasseter", 1995, 81),
("A Bu... | true |
52f42a436eb39cd728f3ad269cd15316fdd44926 | SQL | ElLucioVpe/phplabcure | /db/memmet.sql | UTF-8 | 14,168 | 2.9375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Servidor: 127.0.0.1
-- Tiempo de generación: 29-06-2020 a las 22:31:31
-- Versión del servidor: 10.4.11-MariaDB
-- Versión de PHP: 7.4.5
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_... | true |
b064722511569d163cfeece4eeec6988cdeb6c28 | SQL | lucifax301/chelizi | /cms/clz-cms/database/db_lili/db_lili_20160506_ddl.sql | UTF-8 | 4,147 | 3.234375 | 3 | [] | no_license |
USE db_lili;
DROP TABLE IF EXISTS t_s_schaccount;
CREATE TABLE `t_s_schaccount` (
`schoolId` int(11) NOT NULL COMMENT '驾校ID',
`money` int(11) DEFAULT '0' COMMENT '账户余额',
`passwd` varchar(64) NOT NULL COMMENT '支付密码',
`mobile` varchar(16) NOT NULL COMMENT '手机号',
PRIMARY KEY (`schoolId`)
) ENGINE=InnoDB DEFA... | true |
1b0883ab032d3d211d829b33b91750e9c8aa714a | SQL | gon1958/minibso | /minibso/create/exp/prepare/crttab.sql | UTF-8 | 403 | 2.96875 | 3 | [] | no_license | DROP TABLE redu_objects;
CREATE TABLE redu_objects as select * from user_objects;
DROP TABLE redu_tab;
CREATE TABLE redu_tab AS
SELECT table_name FROM user_tables;
COMMIT;
DROP TABLE redu_root;
CREATE TABLE redu_root(
owner VARCHAR2(30),
table_name VARCHAR2(30),
where_clause VARCHAR2(1000),
hidden varchar2(1),
u... | true |
4bed3652e34f44022dc7ba457644ba2b09be3a51 | SQL | devendra-malviya/Student-Information-Management-SIM- | /sim_database.sql | UTF-8 | 7,708 | 2.921875 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.0.4
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Jul 22, 2014 at 03:15 AM
-- Server version: 5.6.12-log
-- PHP Version: 5.4.12
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT ... | true |
9433ebd00bab58601b7364a51d74349698912f47 | SQL | WonderPro/Engineering-Practical-Experiments | /Semester 5/DBMS/exp 08.sql | UTF-8 | 2,374 | 4.09375 | 4 | [
"Unlicense"
] | permissive | create table employee98(id int primary key, name varchar(10), age int, address varchar(10), salary int);
insert into employee98 values (1, 'p', 30, 'a', 20);
insert into employee98 values (2, 'q', 40, 'b', 70);
insert into employee98 values (3, 'r', 20, 'c', 10);
insert into employee98 values (4, 's', 10, 'd', 30);
in... | true |
e413c802af46a27b0a3810cff7cf53501205951e | SQL | hk-cvut-cz/kdh.hk.cvut.cz | /migrations/struct/20131030124300-searching.sql | UTF-8 | 289 | 3.28125 | 3 | [] | no_license |
CREATE TABLE `searching` (
`game_id` int(11) NOT NULL COMMENT 'Hra',
`user_id` int(11) NOT NULL COMMENT 'Uživatel',
FOREIGN KEY (`game_id`) REFERENCES `games` (`id`) ON DELETE CASCADE,
FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE
) COMMENT='Spoluhráči';
| true |
39002f3f292069ba6f1c5c2e4a627a9948b6c553 | SQL | gmills82/project_awesome | /conf/evolutions/default/3.sql | UTF-8 | 473 | 3.21875 | 3 | [
"Apache-2.0"
] | permissive | # --- !Ups
alter table user_model add column parent_team_member bigint;
alter table user_model add constraint fk_child_team_members_parent_team_member_5 foreign key (parent_team_member) references user_model (id) ON DELETE SET NULL;
create index ix_child_team_members_user_id_5 on user_model (parent_team_member);
crea... | true |
4295440f2ebcb014359289a8de1907ec9d9d3438 | SQL | michaelStillwell/Personal-Project | /db/getNewOrderProducts.sql | UTF-8 | 155 | 3.328125 | 3 | [] | no_license | SELECT n.id, p.id AS product_id, p.name, p.description, p.price, p.stock FROM product AS p
JOIN emp_new_order AS n
ON (p.id = n.product AND n.emp_id = $1); | true |
596c21e610f14851d2ded05d52e8330d157686e4 | SQL | minwyy/cs61a | /lab/lab12/lab12.sql | UTF-8 | 437 | 3.5625 | 4 | [] | no_license | .read fa18data.sql
-- Q2
CREATE TABLE obedience AS
SELECT seven, denero FROM students;
-- Q3
CREATE TABLE smallest_int AS
SELECT time, smallest FROM students WHERE smallest > 13 ORDER BY smallest LIMIT 20;
-- Q4
CREATE TABLE matchmaker AS
SELECT first.pet, first.song, first.color, second.color FROM students AS... | true |
dbf72b0c067adb0a4b8949a25209e78946154529 | SQL | fledge-iot/fledge | /scripts/plugins/storage/postgres/downgrade/31.sql | UTF-8 | 207 | 2.71875 | 3 | [
"Apache-2.0"
] | permissive | --
-- ADD the column: read_key uuid
--
ALTER TABLE fledge.readings ADD COLUMN read_key uuid UNIQUE;
UPDATE fledge.readings SET read_key = uuid_in(md5(random()::text || clock_timestamp()::text)::cstring);
| true |
2352547f2878ad57eb48ab8f235e73ad587b2637 | SQL | PierreMonvoisin/Exercices-SQL | /Partie5/source.sql | UTF-8 | 946 | 3.484375 | 3 | [] | no_license | USE `webDevelopment`;
-- Dans la table languages, afficher toutes les données de la table
SELECT * FROM `languages`;
-- Dans la table languages, afficher toutes les versions de PHP
SELECT * FROM `languages` WHERE `language` = 'PHP';
-- Dans la table languages, afficher toutes les versions de PHP et de JavaScript
SELECT... | true |
960979d2f90adb0dc49df3aa7e13d116bca95dd1 | SQL | SithuminiJayasinghe/programming-cSharp | /database_script.sql | UTF-8 | 3,601 | 3.65625 | 4 | [] | no_license |
DROP DATABASE Ayubo_drive;
DROP TABLE Hire;
DROP TABLE Package;
DROP TABLE Rent;
DROP TABLE Customer;
DROP TABLE Driver;
DROP TABLE Vehicle;
DROP TABLE VehicleType;
DROP TABLE VehicleRate;
CREATE DATABASE Ayubo_drive;
CREATE TABLE VehicleType(
V_Type_Id INT NOT NULL,
V_Type_Name VARCHAR(50),
V_Rate INT,
CO... | true |
dd214576d1a8d6181d5be9b22ce08202ac64091b | SQL | cankush625/Database | /SQL/refining_our_selection.sql | UTF-8 | 3,787 | 4.21875 | 4 | [
"MIT"
] | permissive | use books_db; /*Using the database which is already created*/
select database();
INSERT INTO books
(title, author_fname, author_lname, released_year, stock_quantity, pages)
VALUES ('10% Happier', 'Dan', 'Harris', 2014, 29, 256),
('fake_book', 'Freida', 'Harris', 2001, 287, 428),
('Lincol... | true |
e7d83473c0adfe45920c7c381460fcccd070d7cf | SQL | claytonpabst/merica-money | /db/getMembersAccountChecking.sql | UTF-8 | 156 | 2.65625 | 3 | [] | no_license | select * from Members join memberAccounts
on members.acctnum = memberaccounts.acctnum
where members.acctnum = $1 and memberAccounts.accounttype = 'checking' | true |
73c564bdb37f992482228940dfce88e0bf88dacb | SQL | Maximko17/Currency-Converter | /test-project-java/src/main/resources/data.sql | UTF-8 | 617 | 3.109375 | 3 | [] | no_license | CREATE TABLE IF NOT EXISTS history
(
id SERIAL PRIMARY KEY NOT NULL,
startCurrency VARCHAR(10) NOT NULL,
endCurrency VARCHAR(10) NOT NULL,
startAmount DOUBLE PRECISION NOT NULL,
endAmount DOUBLE PRECISION NOT NULL,
date DATE NOT NULL DE... | true |
f1c899a22f5027b05d5ed2425f1505b8d507b68d | SQL | OneBigOwnage/Docu-X | /_DOCUMENTATION/Phase B/Logging EER.sql | UTF-8 | 1,745 | 3.421875 | 3 | [] | no_license | -- Queries to remove & re-generate the User Management System
-- #############################################################################
-- Remove all Foreign Keys
ALTER TABLE fwk_error_log
DROP FOREIGN KEY IF EXISTS fk_fwk_error_log__to__ums_account;
ALTER TABLE fwk_console_lines
DROP FOREIGN KEY IF EXISTS ... | true |
3518bd182081cf02f579dec67cc56bb74d89e2ae | SQL | wangwen1220/ruigui.com | /backup/other/ruigui.sql | UTF-8 | 20,755 | 3.171875 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.0.5
-- http://www.phpmyadmin.net
--
-- 主机: localhost
-- 生成日期: 2015 年 03 月 03 日 17:41
-- 服务器版本: 5.6.19
-- PHP 版本: 5.4.30
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_S... | true |
ad7c82c2439818b52851f035527d44ee66810640 | SQL | andrekorol/banco-de-dados-II | /Atividade-01/FillTables.sql | UTF-8 | 6,186 | 3.625 | 4 | [
"Unlicense"
] | permissive | DROP TABLE IF EXISTS Cargo;
CREATE TABLE Cargo
(
idCargo INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
NomeCargo VARCHAR(45),
SalarioBase FLOAT
);
DROP TABLE IF EXISTS Funcionario;
CREATE TABLE Funcionario
(
idFuncionario INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
nome ... | true |
df317c23c4fd2b35cfc7aea0e015d5a581d83ca9 | SQL | Makasinov/Course-project | /backup.sql | UTF-8 | 9,473 | 3.328125 | 3 | [] | no_license | -- MySQL dump 10.13 Distrib 5.5.23, for Win64 (x86)
--
-- Host: localhost Database: mydb
-- ------------------------------------------------------
-- Server version 5.5.23-log
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40... | true |
abf22fc9d80eeb45ddf76e83f3ac2d1428659296 | SQL | r0mell/baseddistribuidas- | /Scripts/triggers_proyecto.sql | UTF-8 | 5,613 | 3.21875 | 3 | [] | no_license | CREATE MATERIALIZED VIEW LOG ON CLIENTE_REP
BUILD INMMEDIATE
USING INDEX TABLESPACE USERS
REFRESH FAST
START WITH TO_DATE('25-jul-2008 19:00:00'.'dd-Mon-yyy HH24:MI:SS')
NEXT SYSDATE + 1/1440
AS SELECT * FROM CLIENTE@db_bddproyecto;
CREATE MATERIALIZED VIEW LOG ON CLIENTE;
CREATE MATERIALIZED VIEW LOG ON EMPLEADO;
C... | true |
508639f82d14cf63ee8db19709b67c67d57e8d7d | SQL | rquispeg/indicadores | /sql/rec_1.sql | UTF-8 | 212 | 3.03125 | 3 | [] | no_license | SELECT descripcion as categoria,
anio as serie,
cast(anio as integer) as serie_id,
sum(valor)
FROM [Recaudacion]
WHERE anio in (:gestion-3, :gestion-2, :gestion-1, :gestion)
GROUP BY descripcion, anio;
| true |
fcbfb9e71c0a50bcc478808a16a78606a262e935 | SQL | PjMitchell/RockScissorPaper | /SQLScripts/MySQLScripts/StoredProceedures/Player/Player_Create.sql | UTF-8 | 351 | 2.734375 | 3 | [] | no_license | DROP PROCEDURE IF EXISTS `Player_Create`;
DELIMITER $$
CREATE PROCEDURE `Player_Create` (in PlayerNameInput varchar(25), IpAddressInput varchar(45), AvatarInput varchar(25))
BEGIN
Insert INTO Player(PlayerName, PlayerIPAddress, AvatarImg)
Values (PlayerNameInput, IpAddressInput, AvatarInput);
Select LAST_INSERT_... | true |
e4438b6271c28de4ec7333a40a7645bb219c076d | SQL | foxmat90/amm2016 | /web/WEB-INF/db/crea-db.sql | UTF-8 | 1,405 | 3.390625 | 3 | [] | no_license | CREATE TABLE servicesale (
id INTEGER GENERATED BY DEFAULT AS IDENTITY PRIMARY KEY,
nome VARCHAR(128),
description VARCHAR(128),
risk VARCHAR(128),
pic BLOB(1000000),
links VARCHAR(128),
price FLOAT,
tel VARCHAR(128));
CREATE TABLE account (
id INTEGER GENERATED BY DEFAULT AS IDENTITY PRIMARY KEY,
balance ... | true |
5a055ca637881e2fdd876a5e69d6f8c2f261f06e | SQL | walkyria/clean-me | /db.sql | UTF-8 | 384 | 2.828125 | 3 | [] | no_license | SET NAMES utf8;
SET FOREIGN_KEY_CHECKS = 0;
-- ----------------------------
-- Table structure for `users`
-- ----------------------------
DROP TABLE IF EXISTS `users`;
CREATE TABLE `users` (
`id` int(10) NOT NULL auto_increment,
`first_name` varchar(30) NOT NULL,
`last_name` varchar(30) NOT NULL,
PRIMARY KEY... | true |
4f5741862e7fe2274302e3385b9b811a28a0a999 | SQL | Tisandg/SistemasDistribuidos | /requerimientoCORBA/bdusuarios_audio.sql | UTF-8 | 2,374 | 2.9375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.6.5.2
-- https://www.phpmyadmin.net/
--
-- Servidor: 127.0.0.1
-- Tiempo de generación: 07-06-2017 a las 18:08:04
-- Versión del servidor: 10.1.21-MariaDB
-- Versión de PHP: 5.6.30
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CL... | true |
655b00329843a60dce1c2976badb60e5bcf64d5c | SQL | GarghiVamsi/Database-Final-Project | /Project/Zheng_Garghi_Project.sql | UTF-8 | 14,951 | 2.859375 | 3 | [] | no_license | Create table Driving_School (
drivingschool_id int NOT NULL,
city varchar2(64) NOT NULL,
state varchar2(64) NOT NULL,
manager_name varchar2(64) NOT NULL,
PRIMARY KEY (drivingschool_id)
);
Insert into Driving_School Values(1, 'Duluth', 'MN', 'William');
Insert into Driving_School Values(2, 'D... | true |
6affe24ecd6bfc9e325331eb21b68d7d50d0d20d | SQL | silence-do-good/stress-test-Postgres-and-MySQL | /dump/low/day11/select0427.sql | UTF-8 | 191 | 2.65625 | 3 | [] | no_license |
SELECT timeStamp, temperature
FROM ThermometerObservation
WHERE timestamp>'2017-11-10T04:27:00Z' AND timestamp<'2017-11-11T04:27:00Z' AND SENSOR_ID='06ab568d_417e_4d3c_bb16_f167e2be065d'
| true |
5f74bdf03119ce1ceaf7f031d4b1abbaa0837696 | SQL | DaveLyndrex/Web-CRUD | /users.sql | UTF-8 | 550 | 3.140625 | 3 | [] | no_license |
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
CREATE TABLE `data` (
`id` int(11) UNSIGNED NOT NULL,
`firstname` varchar(100) NOT NULL,
`lastname` varchar(100) NOT NULL,
`email` varchar(100) NOT NULL,
`password` varchar(100) NOT NULL,
`age` i... | true |
17013eafdc5cd7da50d02b02622e566b27c5e587 | SQL | KenosSGI/org.kenos.idempiere.lbr | /org.kenos.idempiere.lbr.migration/migration-historic/201606/postgresql/207-NF-HasOpenItems.sql | UTF-8 | 11,758 | 2.75 | 3 | [] | no_license | -- 25/05/2016 18h17min39s BRT
INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,DefaultValue,Description,EntityType,FieldLength,Help,IsActive,IsAllowLogging,IsAlwaysUpdateable,IsAutocomplete,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsPare... | true |
7bac6c87a696b0a95a5c49fce6fc7b711bef909d | SQL | l2jfree/svn | /tags/1.3.0/l2jfree-datapack/sql/auction.sql | UTF-8 | 4,426 | 2.796875 | 3 | [] | no_license | CREATE TABLE IF NOT EXISTS `auction` (
`id` INT UNSIGNED NOT NULL DEFAULT 0,
`sellerId` INT UNSIGNED NOT NULL DEFAULT 0,
`sellerName` VARCHAR(35) NOT NULL DEFAULT "NPC",
`sellerClanName` VARCHAR(45) NOT NULL DEFAULT "",
`itemType` VARCHAR(25) NOT NULL DEFAULT "",
`itemId` SMALLINT UNSIGNED NOT NULL DE... | true |
16860fca5c5be63d9c30766c9727d7aec6745e47 | SQL | ColetonS/helo | /db/seed.sql | UTF-8 | 754 | 3.453125 | 3 | [] | no_license | CREATE TABLE users (
id SERIAL PRIMARY KEY,
username VARCHAR,
password VARCHAR,
profile_pic TEXT
);
SELECT * FROM users;
CREATE TABLE posts (
id SERIAL PRIMARY KEY,
title VARCHAR,
img TEXT,
content TEXT,
author_id INTEGER REFERENCES users(id)
);
SELECT * FROM posts;
INSERT INTO users (username, password, profile_p... | true |
45d53dd910fa0918b19256635245c36a9f047c38 | SQL | CUBRID/cubrid-testcases | /sql/_27_banana_qa/issue_5765_timezone_support/_02_type_conversions/_01_explicit_conversion/cases/_01_dt_to_bbc.sql | UTF-8 | 1,826 | 3.546875 | 4 | [
"BSD-3-Clause"
] | permissive | --cast DATETIME(L)TZ columns to bit/lob data types
drop table if exists tz_test;
create table tz_test(id int, ts datetime, dtltz datetime with local time zone, dttz datetime with time zone);
set timezone 'UTC';
insert into tz_test values(1, datetimeltz'2019-01-02 12:00:01.999', datetimeltz'2019-01-02 12:00:01.999',... | true |
cb1cd7e50b449405170d8b39e6fb18850ccb02a6 | SQL | Team-Flannel-CSCI-3308/Milestones | /Milestone4/database.sql | UTF-8 | 1,186 | 3.4375 | 3 | [] | no_license | CREATE TABLE IF NOT EXISTS user (
id INT NOT NULL PRIMARY KEY,
username VARCHAR(255) NOT NULL,
password VARCHAR(255) NOT NULL
);
CREATE TABLE IF NOT EXISTS character (
id INT NOT NULL PRIMARY KEY,
name VARCHAR(255) NOT NULL,
health INT NOT NULL,
attack INT NOT NULL,
);
CREATE TABLE IF NOT... | true |
57a1e8918c37b9581b90ba3a2503f4c22c367bd9 | SQL | ToborTheGreat/Repository01 | /toolkit.report_queue_function_calls_archive.sql | UTF-8 | 1,630 | 2.828125 | 3 | [] | no_license | --
-- PostgreSQL database dump
--
SET statement_timeout = 0;
SET client_encoding = 'UTF8';
SET standard_conforming_strings = off;
SET check_function_bodies = false;
SET client_min_messages = warning;
SET escape_string_warning = off;
SET search_path = toolkit, pg_catalog;
ALTER TABLE ONLY toolkit.report_queue_functio... | true |
1b61e3b0c6045c5055f1e0e0433c8b9acb3dad6a | SQL | inoro/OAuth2.0-Demo | /mangfeng.sql | UTF-8 | 5,436 | 3.203125 | 3 | [] | no_license | /*
Navicat Premium Data Transfer
Source Server : localhost
Source Server Type : MySQL
Source Server Version : 50553
Source Host : localhost:3306
Source Schema : mangfeng
Target Server Type : MySQL
Target Server Version : 50553
File Encoding : 65001
Date: 16/11/2018 1... | true |
0b928e440480b6f95e9b8911aaa102f789b8c37e | SQL | cyclonstep/diklat | /DB_Back/diklat 21 Januari 2015.sql | UTF-8 | 19,529 | 2.734375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.2.11
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Jan 21, 2015 at 10:00 AM
-- Server version: 5.6.21
-- PHP Version: 5.5.19
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;... | true |
4c20076f4324ac3d03bd3cf2f3dfc28f644b038c | SQL | ahmedfarouk1414/dev-lab | /Database/toystore-test.sql | UTF-8 | 2,815 | 3.390625 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.8.0.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Aug 15, 2018 at 01:14 AM
-- Server version: 10.1.32-MariaDB
-- PHP Version: 7.2.5
DROP DATABASE IF EXISTS toystore;
CREATE DATABASE IF NOT EXISTS toystore;
USE toystore;
SET SQL_MODE = "NO_AUTO_VALUE_ON_Z... | true |
696b6e810182da89c29878ac4b6d6ae8f63ca1ad | SQL | bradwilder/style-guide | /scripts/db/user_schema.sql | UTF-8 | 737 | 3.8125 | 4 | [
"Apache-2.0",
"MIT"
] | permissive | create table role
(
id mediumint not null auto_increment,
name varchar(50) unique,
description varchar(200),
primary key (id)
);
create table groups
(
id mediumint not null auto_increment,
name varchar(50) unique,
description varchar(200),
primary key (id)
);
create table group_role
(
id mediumint n... | true |
ea9f07bd5a502ec62aa9f149a3d17d8f490369d5 | SQL | wsuo/sql_pratice | /chapter/code_with_mosh/demo02.sql | UTF-8 | 3,414 | 4.3125 | 4 | [] | no_license | /*
一定要自己动手去敲!!!
这里介绍数据的增删改查, 即 CRUD
*/
use sql_store;
# 首先展示一次添加一条记录
# 按照顺序添加值,数据库中有默认值的可以写 default 或者 null
# 类型要对应, 在 MySQL 中, 日期的格式为 2000-08-21
insert into customers
values (default,
'Shuo',
'Wang',
'2000-08-21',
null,
'address',
'city',
'CA',
... | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.