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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
2327db9072485f9b21297ffc3e8899e69f54a13f | SQL | Chirags1/HM | /hotel management system/hotel.sql | UTF-8 | 4,772 | 3.046875 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 5.1.0
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: May 21, 2021 at 05:41 PM
-- Server version: 10.4.19-MariaDB
-- PHP Version: 7.3.28
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIE... | true |
bbb87acffb4b0386eb37b7f539f79303e2dff9b9 | SQL | jaketf/bigquery-utils | /udfs/community/median.sql | UTF-8 | 915 | 2.8125 | 3 | [
"Apache-2.0"
] | permissive | /*
* Copyright 2019 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to i... | true |
6cd74b5a222d996c1e450e1171204fcedc9f2f41 | SQL | MarineVdb/CapOuPasCap | /bdd/fixtures-04-taille_vetement.sql | UTF-8 | 1,239 | 2.65625 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.9.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1:3306
-- Generation Time: Mar 20, 2021 at 09:01 AM
-- Server version: 8.0.18
-- PHP Version: 7.4.0
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHA... | true |
bfae8c6871b244fdee33ea2e3122270ce9cbfcae | SQL | chandu5160/Fesh | /db/5Mar19chandu.sql | UTF-8 | 10,379 | 3.265625 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.5.1
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Mar 05, 2019 at 07:07 AM
-- Server version: 10.1.19-MariaDB
-- PHP Version: 5.5.38
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CL... | true |
f9d7d119a41caf2fb49efd6ab09d8aced6af1787 | SQL | samuel-santos3112/php-iniciante | /pessoa.sql | UTF-8 | 289 | 2.796875 | 3 | [] | no_license | #create database chat_2019;
#use chat_2019;
create database pessoa;
use pessoa;
create table usuario(
id integer primary key auto_increment,
nome varchar(60),
email varchar(60),
idade int);
insert into usuario (nome,email,idade) values ('Samuel Souza Santos','samuelsss2016@gmail.com',20);
select * from usuario;
| true |
7b33b672f9c7bdbffe39189b6add620ec109d3a9 | SQL | mgcuthbert/maproulette2 | /conf/evolutions/default/31.sql | UTF-8 | 637 | 2.90625 | 3 | [
"Apache-2.0"
] | permissive | # --- MapRoulette Scheme
# --- !Ups
-- Change users.needs_review to be an integer type so we can have more
-- variability with this setting.
ALTER TABLE users ALTER COLUMN needs_review SET DEFAULT null;;
ALTER TABLE users ALTER COLUMN needs_review TYPE INTEGER USING
CASE
WHEN needs_review = true then 1
... | true |
8c4815c6b8381d9dece77e694894d15c13d65b0f | SQL | Balirina/Transporte-de-mercancias | /Consultas/Consulta6.sql | UTF-8 | 121 | 3.140625 | 3 | [] | no_license | SELECT CIU_ORI
FROM TRAMO
GROUP BY CIU_ORI
HAVING COUNT(*)=(SELECT MAX(COUNT(*))
FROM TRAMO
GROUP BY CIU_ORI); | true |
1653fe7e534acf90a4fed1fb62547276657f83d2 | SQL | andreirhamni09/kuesioner | /database/kuesioner.sql | UTF-8 | 1,663 | 3.09375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 5.1.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Waktu pembuatan: 04 Agu 2021 pada 03.16
-- Versi server: 10.4.19-MariaDB
-- Versi PHP: 7.4.20
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@C... | true |
59d1c8ad57d321521bb9e01659ab8f4ac25f3957 | SQL | gwengo/codingprojects | /Voting Database, mySQL/voter2.sql | UTF-8 | 8,428 | 2.90625 | 3 | [] | no_license | use voter_info_goins;
LOAD DATA INFILE "/Users/gwengoins/Desktop/voterINFO-01.csv" INTO TABLE voter_info COLUMNS TERMINATED BY '$';
DROP TABLE IF EXISTS voter_info;
CREATE TABLE voter_info (
precinct_desc varchar(200) DEFAULT NULL,
party_cd varchar(200) DEFAULT NULL,
race_code varchar(200) DEFAULT NULL,
ethn... | true |
bd01409f787edf051f3bdfb6a854ce88eb6fade3 | SQL | radtek/abs3 | /sql/mmfo/bars/Table/PRVN_FV9.sql | UTF-8 | 2,700 | 2.671875 | 3 | [] | no_license | PROMPT =====================================================================================
PROMPT *** Run *** ========= Scripts /Sql/BARS/Table/PRVN_FV9.sql ========*** Run *** ======
PROMPT =====================================================================================
exec bars.bpa.alter_policy_info( '... | true |
fe93268acfeb315ffe8ce834f2dcc912e2d44283 | SQL | RafiqAdil/sucrerie | /Scripte/triger.sql | UTF-8 | 476 | 3.03125 | 3 | [] | no_license | DELIMITER @
DROP TRIGGER IF EXISTS augmteLigneCommande ;
CREATE TRIGGER augmteLigneCommande
AFTER INSERT ON LIGNE_COMMANDE
FOR EACH ROW
BEGIN
UPDATE COMMANDE
SET nbligne = nbligne +1
WHERE COMMANDE.NUMERO = (SELECT DISTINCT NUMERO FROM LIGNE_COMMANDE WHERE NUMERO= NEW.numero);
END ;
@
DELIMITER ;
DROP TRIGGER IF EXI... | true |
a8e6bbaf0d993e1920d39f613b31788aae363fa2 | SQL | vadimkakhd/dbisworkshops | /km-52/Khodakivskyi_Vadym/workshop1/sql/populate.sql | UTF-8 | 2,963 | 2.875 | 3 | [] | no_license | INSERT INTO "User"
(LOGIN, PASS, NICKNAME, NAME, FACULTY_NAME, COURSE_NUMBER)VALUES
('vadya', 'vadya', 'vadimka', 'Vadym', 'Applied mathematics', 4);
INSERT INTO "User"
(LOGIN, PASS, NICKNAME, SURNAME, FACULTY_NAME, COURSE_NUMBER)VALUES
('petua228', '234', 'Petya', 'Petrov', 'Applied mathematics', 3);
INSERT ... | true |
d297a502bc3b30ecb5d5d2f14b43878382a16522 | SQL | MohammadAreeb/areeb | /My MySQL files/34..sql | UTF-8 | 288 | 3.65625 | 4 | [] | no_license | SELECT
o.order_date,
o.order_id,
c.first_name AS customer,
sh.name AS shipper,
os.name AS status
FROM orders o
LEFT JOIN shippers sh
ON o.shipper_id=sh.shipper_id
JOIN order_statuses os
ON o.status=os.order_status_id
LEFT JOIN customers c
ON c.customer_id=o.customer_id
| true |
7e48554b994947e4f5c15be3e2aaa275519d19a6 | SQL | MarthaPotts/DevStaffRedo | /db/seed.sql | UTF-8 | 901 | 2.921875 | 3 | [] | no_license | USE employees_db;
INSERT INTO department(name)
VALUES('Nursing'),
('Therapy'),
('Dietary'),
('Housekeeping'),
('Maintenance'),
('Business_Office'),
('Social_Services'),
('Activities')
('Administration');
INSERT INTO role(title, salary, department_id)
VALUES('Unit_Manager', 60,000, 1),
('Physical_Therapist',... | true |
3a95d6962933b1801269e3c8d55c3b4ccb718e72 | SQL | andrijz/blog | /closure_table/cassandra_cqlsh.cql | UTF-8 | 3,436 | 3.609375 | 4 | [] | no_license | # sample keyspace
create keyspace if not exists blog with replication = {'class': 'SimpleStrategy', 'replication_factor' : 1};
# edge connection table to play a role of a closure table
create table if not exists blog.edge_connection(
device_ancestor_id text,
session_id text,
distance int,
device_desce... | true |
d212e989a4e3604944c48e9970e829eb25dea436 | SQL | arjunbanker/quickbooks | /tests/debits_minus_credits.sql | UTF-8 | 738 | 4.1875 | 4 | [
"Apache-2.0"
] | permissive | --this tests the entire general ledger process to ensure that debits = credits within each transaction id.
--success is returning no records
with ledger as (
select *
from {{ref('quickbooks_general_ledger')}}
), debits as (
select id, sum(amount) as total
from ledger
where lower(transaction_type) = 'debit... | true |
a3ab15831eb85b1e83af7605130838d1ca72c6df | SQL | piyushkumar636/Hospital-senior-citizen | /hospital/doctor.sql | UTF-8 | 5,081 | 2.65625 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 5.0.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Jan 27, 2021 at 01:09 PM
-- Server version: 10.4.17-MariaDB
-- PHP Version: 8.0.0
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIEN... | true |
5cb74649e3c7fff5374e2932fdcdf738340971cf | SQL | sunnymaurya0123/Swabhav | /SQL/shopping_cart.sql | UTF-8 | 1,494 | 3.578125 | 4 | [] | no_license | create table Customer(
customer_id int NOT NULL PRIMARY KEY,
name varchar(30)
);
create table Orders(
customer_id int NOT NULL,
order_id int NOT NULL PRIMARY KEY,
date varchar(30) NOT NULL,
FOREIGN KEY (customer_id) REFERENCES Customer(customer_id)
);
create table LineItem(
order_id int NOT NULL,... | true |
97631b03108d22316eee42325edcf6b9b55b0e37 | SQL | tcurtis97/nss-SQLMurderMystery | /SQLMurderMystery.sql | UTF-8 | 3,920 | 4 | 4 | [] | no_license |
select c.date, c.type, c.description, c.city
from crime_scene_report c
WHERE c.date = 20180115 AND c.type = 'murder' AND c.city = 'SQL City'
-- date type description city
--20180115 murder Security footage shows that there were 2 witnesses. The first witness lives at the last house on "Northwestern Dr". The s... | true |
597f5e07339bce37a15dc336c899934dc92a65cb | SQL | SkbSaleem/COMP9311-Database-System | /Companies Data Analysis/asx-schema.sql | UTF-8 | 6,641 | 4.34375 | 4 | [] | no_license | -- Address contains the registered address of the company (excluding the zip code and country
-- Zip is the zip code of the Address
-- Country is the incorporation country of the company (same as the country for the Address)
CREATE TABLE Company (
Code char(3) primary key check (Code ~ '[A-Z]{3}'),
Name text n... | true |
20ed36f105b663e74aea8e36bbc5140b065e8177 | SQL | algorenator/OLIVER | /Constraints/EBA_RESTDEMO_HTTP_HEADERS_FK.sql | UTF-8 | 290 | 2.828125 | 3 | [] | no_license | --
-- Foreign Key Constraints for Table EBA_RESTDEMO_HTTP_HEADERS
--
ALTER TABLE OLIVER.EBA_RESTDEMO_HTTP_HEADERS ADD (
CONSTRAINT EBA_RESTDEMO_FK2_SERVICEID
FOREIGN KEY (SERVICE_ID)
REFERENCES OLIVER.EBA_RESTDEMO_SERVICES (ID)
ON DELETE CASCADE
ENABLE VALIDATE);
| true |
33dffa089cd0e56080ed22889d762b5ccd19fa04 | SQL | jbuendia1y/inventory-app-monorepo | /database/productos.sql | UTF-8 | 300 | 2.609375 | 3 | [] | no_license | CREATE TABLE products(
idProduct INT PRIMARY KEY NOT NULL AUTO_INCREMENT,
name VARCHAR(100),
format VARCHAR(100),
category VARCHAR(100),
subcategory VARCHAR(100),
mark VARCHAR(100),
price INT,
stock INT
);
CREATE TABLE lots(
idLot INT PRIMARY KEY NOT NULL AUTO_INCREMENT,
id INT,
type VARCHAR(25))
) | true |
92530bb4f9ef3f1d037aebb9503c9fd975a910b7 | SQL | prometheus-ev/promdilps | /admin/schema.sql | UTF-8 | 122,146 | 3.09375 | 3 | [] | no_license | CREATE TABLE `!prefix_!logfile` (
`logid` bigint(20) NOT NULL auto_increment,
`sessionid` varchar(34) NOT NULL default '',
`logdate` datetime NOT NULL default '0000-00-00 00:00:00',
`type` int(11) NOT NULL default '0',
`subtype` int(11) NOT NULL default '0',
`descr` varchar(255) NOT NULL d... | true |
fe0df52279fd366cb3f7c673af0b027e6fb199a8 | SQL | LEEANQIAN/leetcode-practice-SQL | /# 1285. Find the Start and End Number of Continuous Range (Medium).sql | UTF-8 | 218 | 3.90625 | 4 | [] | no_license | # 1285. Find the Start and End Number of Continuous Ranges (Medium)
SELECT MIN(log_id) AS start_id, MAX(log_id) AS end_id
FROM
(SELECT *, ROW_NUMBER() OVER (ORDER BY log_id) AS num
FROM Logs) AS T
GROUP BY log_id - num | true |
e84f291c82c4730205b96a1d2bb2b30927992f24 | SQL | owen511/ho | /ho-dic/src/main/resource/001_dic.sql | UTF-8 | 6,687 | 3.765625 | 4 | [] | no_license | -- Create table T_HO_DICTABLE
create table T_HO_DICTABLE
(
tableid NUMBER(9) not null,
version NUMBER(9) not null,
tablecode VARCHAR2(32) not null,
name VARCHAR2(32) not null,
tabletype CHAR(1) not null,
keycolumn VARCHAR2(32),
codecolumn VARCHAR2... | true |
b2a87c4495bf9906400056d63680bdde06a12196 | SQL | welchlam/currency | /cmg/sql/view/ctlm_v_in_condition.sql | UTF-8 | 767 | 3.34375 | 3 | [] | no_license | CREATE OR REPLACE VIEW CTLM_V_IN_CONDITION
(
JOB_NAME
, PARENT_JOB
, CHILD_JOB
, CONDITION_ORDER
, CONDITION_NAME
, AND_OR
, ODATE
, OP
)
AS
SELECT
cic.JOB_NAME
, cic.PARENT_JOB
, cic.CHILD_JOB
, cic.CONDITION_ORDER
, CASE WHEN TYPE = 'G'
THEN TYPE || SUBSTR(ct_p.DATACENTER,-2,2) || SUBSTR(ct_c.DATACENTER,-2... | true |
2cf2cdaa19092f47a1c567a15e93a366531fc5f2 | SQL | mohammadnuridin/codeigniter | /ci-ajax.sql | UTF-8 | 4,512 | 3.078125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.9.0.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Waktu pembuatan: 30 Mar 2020 pada 08.27
-- Versi server: 10.3.16-MariaDB
-- Versi PHP: 7.3.6
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHA... | true |
3813b5706f2e8416a1813b004c01b7fc69196773 | SQL | CUBRID/cubrid-testcases | /sql/_24_aprium_qa/_01_i18n/issue_9401_collate/cases/_02_collate_modifier_vs_collate_function_05.sql | UTF-8 | 903 | 3.078125 | 3 | [
"BSD-3-Clause"
] | permissive | --+ holdcas on;
set names utf8;
select 1,collation('8'),coercibility('8'),collation('¥' collate utf8_ja_exp),coercibility('¥' collate utf8_ja_exp) from db_class where '8' > '¥' collate utf8_ja_exp limit 1;
select 1,collation('8' collate utf8_ja_exp),coercibility('8' collate utf8_ja_exp),collation('¥'),coercibility('¥'... | true |
757c500d30f1d62cc129934cc4f7a046c54f376c | SQL | lb930/Preppin_Data | /2019_02/query.sql | UTF-8 | 827 | 3.796875 | 4 | [] | no_license | with concat as (
select
case
when city in ('Londoon', 'Londin', 'nodonL', 'Lond0n', 'london', 'Londen') then 'London'
when city in ('Edenburgh', 'Edinborgh', 'edinborgh', 'Ed!nburgh', '3d!nburgh', 'edinburgh', 'Ed1nburgh') then 'Edinburgh'
else city
end,
date,
metric || ' - ' || measure AS new_metric,
... | true |
eb75248131dbf21a8226bebbecb632167adccafe | SQL | xinlc/elasticsearch-learning | /demos/spring-boot-demo/demo-task-quartz/init/dbTables/tables_pointbase.sql | UTF-8 | 5,415 | 3.421875 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | #
# Thanks to Gregg Freeman
#
#
# ...you may want to change defined the size of the "blob" columns before
# creating the tables (particularly for the qrtz_job_details.job_data column),
# if you will be storing largeounts of data in them
#
#
delete from qrtz_fired_triggers;
delete from qrtz_simple_triggers;
delete from ... | true |
97fc1943ae41f228f88ddc8d586a130ccbc020c8 | SQL | jdrew1303/sqlgenerate | /test/spec_sql/official-suite/index2-1.sql | UTF-8 | 282 | 2.53125 | 3 | [
"MIT"
] | permissive | -- original: index2.test
-- credit: http://www.sqlite.org/src/tree?ci=trunk&name=test
SELECT c123 FROM t1
;SELECT count(*) FROM t1
;SELECT round(sum(c1000)) FROM t1
;EXPLAIN SELECT c9 FROM t1 ORDER BY c1, c2, c3, c4, c5
;SELECT c9 FROM t1 ORDER BY c1, c2, c3, c4, c5, c6 LIMIT 5; | true |
b6389f6cccb241664b8561631ee3e1907bc1f62e | SQL | wy32/CS166 | /project/scripts/create_tables.sql | UTF-8 | 4,555 | 4.1875 | 4 | [] | no_license | drop table comment CASCADE;
CREATE TABLE comment (
comment_id SERIAL PRIMARY KEY,
user_id VARCHAR(9) NOT NULL,
video_id INTEGER NOT NULL,
comment_time TIMESTAMP NOT NULL,
content VARCHAR(300) NOT NULL,
FOREIGN KEY(user_id) REFERENCES users on delete cascade,
FOREIGN KEY(video_id) REFERENCES video on delete casca... | true |
a849c7cae934a2b115daac2a229c7a5ff1becb8e | SQL | mychelrenno/gerenciador-task-api | /src/main/resources/sqlDataBase.sql | UTF-8 | 419 | 3.296875 | 3 | [] | no_license | CREATE DATABASE taskmanagerdatabase ENCODING = 'UTF-8'
CREATE SCHEMA IF NOT EXISTS taskmanager
CREATE TABLE taskmanager.task (
id bigserial NOT NULL,
titulo varchar(100) NOT NULL,
descricao varchar(200),
status character varying(20) check( status in ('CONCLUIDO', 'PENDENTE') ) not null,
data_cadastro date,
data... | true |
4de2c8f9f8242d319b5db95adba37bbefd162f40 | SQL | Antares-97/USC | /cs585/hw2/Q4.sql | UTF-8 | 683 | 3.390625 | 3 | [] | no_license | /* USC CS585 HW2 Q4 */
/* Junzhe Liu 2270250947 */
/* MySql */
CREATE TABLE junkmail
(Name VARCHAR(20) NOT NULL,
Address VARCHAR(100) NOT NULL,
ID INTEGER, NOT NULL,
SameFam INTEGER,
PRIMARY KEY(ID));
INSERT INTO junkmail VALUES('Bob', 'B', 15, NULL);
INSERT INTO junkmail VALUES('Carmen', 'C', 22, NULL);
INSERT ... | true |
e55887f6888dd580171cf1455c4283a6cd65a1dd | SQL | rajeshpalkar/SQLServer | /Lab6/lab6q5.sql | UTF-8 | 182 | 2.6875 | 3 | [] | no_license | alter table Invoices
add check ((PaymentDate is NULL and PaymentTotal = 0) or
(PaymentDate is NOT NULL and PaymentTotal > 0 )),
check((PaymentTotal + CreditTotal) <= InvoiceTotal) | true |
1df20c370a8612a9f0f7af2592a2bfc3420ba35f | SQL | liuxing5457/cloud-project | /cloud-moudle/cloud-project.sql | UTF-8 | 3,182 | 3.46875 | 3 | [] | no_license | -- --------------------------------------------------------
-- 主机: 127.0.0.1
-- 服务器版本: 5.5.60-log - MySQL Community Server (GPL)
-- 服务器操作系统: Win64
-- HeidiSQL 版本: 10.2.0.5672
-- -------------------------------------------------------... | true |
e80fb60e87797202e4aaae2804ee6d8e96677ac0 | SQL | BGCX261/zhugebasecode-svn-to-git | /trunk/ zhugebasecode/NewSite/WebRoot/resource/mysql_db_struct.sql | UTF-8 | 9,995 | 2.921875 | 3 | [] | no_license | /*==============================================================*/
/* DBMS name: MySQL 5.0 */
/* Created on: 2008-4-11 22:08:33 */
/*==============================================================*/
/*========================================... | true |
b2f61e586f58c839931141c572cf5576d394aad2 | SQL | arvamshi/Research-Data-Management-Portal | /research.sql | UTF-8 | 3,615 | 3.25 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.9.1
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Generation Time: Oct 17, 2019 at 06:41 PM
-- Server version: 10.4.8-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 @OLD... | true |
bb7cdd9826e453f61e6878e15eed8aee6614d4f3 | SQL | sergiy-naumovych/Fish-Trading-Company | /src/main/resources/META-INF/sql/users-schema.sql | UTF-8 | 825 | 3.65625 | 4 | [] | no_license | CREATE TABLE USER (
ID INT NOT NULL AUTO_INCREMENT,
NAME VARCHAR(50) NOT NULL,
SURNAME VARCHAR(50) NOT NULL,
USERNAME VARCHAR(45) NOT NULL UNIQUE,
PASSWORD VARCHAR(60) NOT NULL,
PRIMARY KEY (ID)
);
CREATE TABLE CUSTOMER (
ID INT NOT NULL AUTO_INCREMENT,
PAYMENT_RIGHT INT NOT NULL,
PRIMARY KEY (ID),
... | true |
f4332a9a5eb94353a66c99ebf6de47ef95cd5ff1 | SQL | FabianoFaria/eficazSystemAtendimento | /modulos/Z_ATUALIZACAO/projetos.sql | ISO-8859-1 | 6,806 | 3.59375 | 4 | [] | no_license | CREATE TABLE `projetos` (
`Projeto_ID` INT(10) NOT NULL AUTO_INCREMENT,
`Titulo` VARCHAR(250) NOT NULL,
`Descricao` TEXT NULL,
`Tabela_Estrangeira` VARCHAR(50) NULL DEFAULT NULL,
`Projeto_Padrao` INT(11) NULL DEFAULT '0',
`Data_Cadastro` TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP,
`Usuario_Cadastro_ID` INT(11) NUL... | true |
7af7e389d9d606b64ec8941e3eaece4002a6aa0f | SQL | Global-localhost/merge-sh-dbs | /dump_struct.sql | UTF-8 | 10,153 | 3.03125 | 3 | [
"Apache-2.0"
] | permissive | -- MySQL dump 10.13 Distrib 5.7.29, for Linux (x86_64)
--
-- Host: ac3e91d5853dc11ea9212068202d388e-1942592115.us-west-2.elb.amazonaws.com Database: sortinghat
-- ------------------------------------------------------
-- Server version 5.5.5-10.3.16-MariaDB-log
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SE... | true |
c4b8bd8dfac35bbe720f044aafcc5bbb4d4ae784 | SQL | CDRO/igLdapSsoAuth | /ext_tables.sql | UTF-8 | 2,124 | 2.765625 | 3 | [] | no_license | #
# Table structure for table 'tx_igldapssoauth_config'
#
CREATE TABLE tx_igldapssoauth_config (
uid int(11) NOT NULL auto_increment,
pid int(11) DEFAULT '0' NOT NULL,
tstamp int(11) DEFAULT '0' NOT NULL,
crdate int(11) DEFAULT '0' NOT NULL,
cruser_id int(11) DEFAULT '0' NOT NULL,
deleted tinyint(4) DEFAULT '0' ... | true |
1442139b6d83227d81feeb025041a76203f4caf7 | SQL | williamxin97/SQL-Experience | /Forum Semi-Automation/FD and CR/2a___disputes_subdriver_weekly.sql | UTF-8 | 1,707 | 4.03125 | 4 | [] | no_license | set mapped_d = 'Disputes';
-- To change the the number of subdrivers, change the numbers in part 1a, 1c,
-- At the moment there are 5 subdrivers, and 1 "Other" subdriver for a total of 6.
--1. Find top primary_subdrivers.
-- In the end there will be 5 subdrivers and 1 'Other' subdriver.
-- "5" is chosen becau... | true |
313552cf111efe22e31ef947373c87b911321feb | SQL | lukla08/bank9 | /src/main/resources/mysql-security.sql | UTF-8 | 366 | 2.578125 | 3 | [] | no_license | CREATE TABLE `authorities` (
`username` varchar(45),
`authority` varchar(45),
PRIMARY KEY (`username`)
);
INSERT INTO `authorities` VALUES ('maria','ROLE_ADMIN');
CREATE TABLE `users` (
`username` varchar(45),
`password` varchar(45),
`enabled` tinyint(1) DEFAULT NULL,
PRIMARY KEY (`username`)
);
INSERT... | true |
9538dc034fe4f8c0d1749cab79702c14b65b4a3d | SQL | netwo-io/lib_iam | /iam.sql | UTF-8 | 3,830 | 3.703125 | 4 | [] | no_license | drop domain if exists lib_iam.identifier;
create domain lib_iam.identifier as varchar(63)
not null
check (value ~* '^(([a-z]|[a-z]*[a-z0-9\-_]*[a-z0-9])){3,63}$');
drop domain if exists lib_iam.nullable_identifier;
create domain lib_iam.nullable_identifier as varchar(63)
check (value ~* '^(([a-z]|[a-z]*[a-z0-9... | true |
31582f122049ca9a6bc15111a571ff121593d743 | SQL | Wawhub/Hubert_DC | /M3+M4+M5__ZADANIE_PROJEKT.sql | WINDOWS-1250 | 8,420 | 3.96875 | 4 | [] | no_license | --Zadanie projektowe Modu 3 oraz 4
--1.Stwrz nowego uytkownika o nazwie expense_tracker_user z moliwoci zalogowania si do bazy danych i hasem silnym
DROP ROLE IF EXISTS expense_tracker_user;
CREATE ROLE expense_tracker_user WITH LOGIN PASSWORD '1sniegnadywanie!';
--2.. Korzystajc ze skadni REVOKE, odbier... | true |
bb30ca314a2094d0c95a011daf5c9d563bc89222 | SQL | Jabbath/Budgetee | /api-core/sql/init-budget.sql | UTF-8 | 151 | 2.546875 | 3 | [] | no_license | CREATE TABLE IF NOT EXISTS budget(
entryid INT NOT NULL PRIMARY KEY,
userid INT NOT NULL,
date DATETIME NOT NULL,
amount DECIMAL(10, 2) NOT NULL
); | true |
e84d7cf4855297d6f8f2c54ed79d93537db4d94b | SQL | ZhukovAnton/diploma-work | /db-changes.sql | UTF-8 | 13,026 | 3.703125 | 4 | [] | no_license | alter table users
add salt_edge_customer_id varchar;
create table connections
(
id bigserial not null
constraint connections_pk
primary key,
salt_edge_connection_id varchar not null,
country_code varchar not null,
customer_id varchar not null,
created_at timestamp not null,
... | true |
ff2af18e3498451df28267580876425f2d8a4b4c | SQL | anessao/chinook-sql | /playlists_track_count.sql | UTF-8 | 354 | 3.796875 | 4 | [] | no_license | /*playlists_track_count.sql: Provide a query that shows the total
number of tracks in each playlist. The Playlist name should be include on the resulant table.*/
Select pl.Name, Count(*) as TrackCount
From [Playlist] as pl
Join [PlaylistTrack] as plt on plt.[PlaylistId] = pl.[PlaylistId]
Join [Track] as t on t.[TrackId... | true |
5c79dc83f050425e653123f654a92417f764be4d | SQL | suwidnyana/Crud-Jquery-Ajax | /db_pdoajax.sql | UTF-8 | 1,578 | 2.96875 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.9.0.1
-- https://www.phpmyadmin.net/
--
-- Host: localhost:3306
-- Generation Time: Aug 10, 2019 at 09:28 AM
-- Server version: 5.7.24
-- PHP Version: 7.2.11
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_... | true |
30d2dd225c7951375f36036d7c726c4f7406e39c | SQL | akula-srinu/Customization_Test | /custom/NVWB_PO_On_Hold_Invoices.sql | UTF-8 | 7,771 | 3.046875 | 3 | [] | no_license | -- *******************************************************************************
-- FileName: NVWB_PO_On_Hold_Invoices.sql
--
-- Date Created: 2019/Aug/28 06:12:39
-- Created By: nemuser
--
-- Source:
-- - Package: Package_2018_P11_B1_DEV_NEW
-- - Environment: EBSPJD1
-... | true |
f53b0d29ce3f9adea32fdc8dc0a292cec87b5c30 | SQL | cabreration/Bases1 | /Práctica 4/NormalizedQueries.sql | UTF-8 | 14,943 | 3.875 | 4 | [] | no_license | --reporte 1
SELECT * FROM (SELECT DISTINCT E.nombre_eleccion eleccion, E.anio_eleccion anio, P.nombre pais, PP.nombre partido, ROUND(SUM(C.cantidad) OVER(PARTITION BY E.anio_eleccion, P.nombre, PP.nombre) / SUM(C.cantidad) OVER(PARTITION BY P.nombre), 6) porcentaje
FROM CARACTERISTICA_ELECCION C
INNER JOIN ELECCION_Z... | true |
a00d81f45ccb883df8b7204841651980c03aa363 | SQL | silence-do-good/stress-test-Postgres-and-MySQL | /dump/low/day24/select1851.sql | UTF-8 | 178 | 2.671875 | 3 | [] | no_license |
SELECT timeStamp, temperature FROM ThermometerOBSERVATION o
WHERE timestamp>'2017-11-23T18:51:00Z' AND timestamp<'2017-11-24T18:51:00Z' AND temperature>=29 AND temperature<=84
| true |
6d48598775c4d002351e6c56e3d4e2ca3468295c | SQL | nansystem/mysql-test | /initdb.d/yh_team.sql | UTF-8 | 653 | 3.28125 | 3 | [] | no_license | CREATE TABLE IF NOT EXISTS `yh_team` (
`team_id` int unsigned NOT NULL AUTO_INCREMENT,
`team_name` varchar(255) NOT NULL,
PRIMARY KEY (`team_id`)
) ENGINE = InnoDB;
CREATE TABLE IF NOT EXISTS `yh_member` (
`team_id` int unsigned NOT NULL,
`member_name` varchar(255) NOT NULL,
`skill` varchar(255) NOT NULL,
... | true |
30154f8cfb6f8c7bcf741e05e6e3bb2b47a6cd04 | SQL | apache/ambari | /ambari-server/src/main/resources/Ambari-DDL-SQLAnywhere-CREATE.sql | UTF-8 | 88,780 | 3.453125 | 3 | [
"GPL-1.0-or-later",
"GPL-2.0-or-later",
"OFL-1.1",
"MS-PL",
"AFL-2.1",
"GPL-2.0-only",
"Python-2.0",
"Apache-2.0",
"BSD-2-Clause",
"MIT",
"BSD-3-Clause",
"LicenseRef-scancode-free-unknown"
] | permissive | --
-- Licensed to the Apache Software Foundation (ASF) under one
-- or more contributor license agreements. See the NOTICE file
-- distributed with this work for additional information
-- regarding copyright ownership. The ASF licenses this file
-- to you under the Apache License, Version 2.0 (the
-- "License"); you ... | true |
2d2b754861f252ce7de1b73ab8fe563a3774519b | SQL | thangduong3010/PL-SQL | /Script/rdbms_admin/catepg.sql | UTF-8 | 2,042 | 3.015625 | 3 | [] | no_license | Rem
Rem $Header: catepg.sql 15-feb-2005.11:00:12 rpang Exp $
Rem
Rem catepg.sql
Rem
Rem Copyright (c) 2004, 2005, Oracle. All rights reserved.
Rem
Rem NAME
Rem catepg.sql - Embedded PL/SQL Gateway related schema objects
Rem
Rem DESCRIPTION
Rem This script creates the tables and views required for suppo... | true |
b79de4dfb07f294d895d93015903ae2769f50ab0 | SQL | radtek/Oracle-4 | /SQL/Administração/Lock/Mostra_lock_1.sql | UTF-8 | 232 | 2.875 | 3 | [] | no_license | select s.sid,s.username,s.terminal,owner,object_id,object_name,object_type,l.type,sql.sql_text
from dba_objects o,v$lock l,v$session s,v$sql sql
where object_id = l.id1 and
s.sid = l.sid and
s.sql_address = sql.address
| true |
4d189bd0a4d4e692f303a399d95284f31945fbfe | SQL | DeepChallengerVR/sql16-30 | /pg27.sql | UTF-8 | 384 | 3.46875 | 3 | [] | no_license | SELECT
CASE teamID
WHEN 'SLN' THEN "St. Louis Cardinals"
END AS 'Team',
Firstname,
Lastname,
yearID AS 'Year',
W AS 'Wins',
L AS 'Losses',
CG AS 'Complete Games',
BB,
SO,
ERA
FROM
trainwarehouse.bb_players
JOIN trainwarehouse.bb_pitching ON bb_players.playerID = bb_pitching.pla... | true |
c279eaf1c428b726c4e1e335035c47a695885823 | SQL | edwin1993/InventarioPHPMYSQL | /database/inventario.sql | UTF-8 | 2,178 | 2.96875 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.7.9
-- https://www.phpmyadmin.net/
--
-- Servidor: 127.0.0.1
-- Tiempo de generación: 08-07-2019 a las 01:57:27
-- Versión del servidor: 10.1.31-MariaDB
-- Versión de PHP: 7.2.3
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
... | true |
604a2dfcfe895bcf30cc24e74253d088fbc1150b | SQL | leighmacdonald/verimapcom | /store/schema/1_initialize_schema.up.sql | UTF-8 | 6,184 | 3.421875 | 3 | [] | no_license | CREATE EXTENSION IF NOT EXISTS postgis;
create table agency
(
agency_id serial not null
constraint agency_pk
primary key,
agency_name varchar not null,
created_on timestamp not null,
slots integer default 0,
invite_key varchar not null
);
create unique index ag... | true |
773f38957f10dae49aa7eb597ea2d7e720d8ef1b | SQL | xgr07happy/collapsar | /sql/migrations/V1__rbac_init.sql | UTF-8 | 6,467 | 3.984375 | 4 | [] | no_license | -- ----------------------------
-- Table structure for rbac_resource
-- ----------------------------
DROP TABLE IF EXISTS `rbac_resource`;
CREATE TABLE `rbac_resource` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`gid` char(36) NOT NULL COMMENT '全局唯一键',
`create_time` int(11) NOT NULL COMMENT '创建时间',
`update_time` in... | true |
12629a22c7e97b67ad023647f7e67af29942e3c6 | SQL | Jobber77/OTUSMSSQLServerCourse | /OTUSMSSQLServerHomeworks/homework7/Homework7Task4.sql | UTF-8 | 1,273 | 3.984375 | 4 | [] | no_license | CREATE TABLE #totalInvoiceSales ([InvoiceId] INT, [TotalSale] DECIMAL)
INSERT INTO #totalInvoiceSales ([InvoiceId], [TotalSale])
SELECT
i.[InvoiceID],
SUM(il.[UnitPrice] * il.[Quantity])
FROM [Sales].[Invoices] i
INNER JOIN Sales.[InvoiceLines] il ON il.[InvoiceID] = i.[InvoiceID]
GROUP BY i.[InvoiceID]
SELECT D... | true |
f6eac2f1a54c457852f7702ebab861d1497b16ee | SQL | Feok/projeto4 | /script.sql | UTF-8 | 2,955 | 3.265625 | 3 | [] | no_license | DROP TABLE tbCurso;
DROP TABLE tbTurma;
DROP TABLE tbInstrutor;
DROP TABLE tbAluno;
DROP TABLE tbMatricula;
DROP TABLE tbAVista;
DROP TABLE tbAPrazo;
CREATE TABLE tbCurso (
sigla_curso VARCHAR2(2) NOT NULL
CONSTRAINT pk_sigla PRIMARY KEY,
nome_curso VARCHAR2(30),
cargaHoraria_curso NUMBER(3),
valor_curso NUMBER(6,... | true |
c1430188e0b868b0ba33ac1892b2bbf8bbd83f74 | SQL | brandries/Cape_Town_Watercrisis_OptimizePrime | /Gather/SQL Code/Final_combined_views.sql | UTF-8 | 11,137 | 4.125 | 4 | [] | no_license | -- CREATE VIEWS THAT REPRESENT THE UNDERLYING DATA IN THE CAPE TOWN WATER CRISIS DATABASE
-- RAINFALL
CREATE VIEW new_database.rain_view_per_area_yearly AS
SELECT rn.region, tm.t_year, ROUND(AVG(rs."temp"), 3) AS temperature, ROUND(SUM(rs.rain), 3) AS rain, ROUND(AVG(rs.wind_speed), 3) AS wind_speed
FROM new_database.... | true |
4b3b277984932e7d2775934479713f24c89d7208 | SQL | cybernhl/green-deer-server | /green-deer_create.sql | UTF-8 | 1,026 | 3.71875 | 4 | [] | no_license | -- Created by Vertabelo (http://vertabelo.com)
-- Last modification date: 2017-09-20 18:09:41.812
-- tables
-- Table: goals
CREATE TABLE goals (
user_id int NOT NULL,
distance int NOT NULL,
weight real NOT NULL,
CONSTRAINT goals_pk PRIMARY KEY (user_id)
);
-- Table: runs
CREATE TABLE runs (
id ... | true |
81d9c4f6d2833eb7f1d0698dba26873bb5e40819 | SQL | mrinalk84/msvirtuallab | /discountservice/src/main/resources/data.sql | UTF-8 | 388 | 3.203125 | 3 | [] | no_license | DROP TABLE IF EXISTS DISCOUNT;
CREATE TABLE DISCOUNT (
ID NUMBER AUTO_INCREMENT PRIMARY KEY,
PRODUCT_NAME VARCHAR(50) NOT NULL,
DISCOUNT DOUBLE NOT NULL
);
INSERT INTO DISCOUNT (PRODUCT_NAME, DISCOUNT) VALUES ('Orange', 10.5);
INSERT INTO DISCOUNT (PRODUCT_NAME, DISCOUNT) VALUES ('Banana', 12.5);
IN... | true |
5319a42d3897e64f04e9d6ad41185d82b3eb8b01 | SQL | GsAcademy-DEV20/kadai | /lesson_07/sql/gs_kadai_07.sql | UTF-8 | 2,079 | 3.21875 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 5.1.0
-- https://www.phpmyadmin.net/
--
-- ホスト: 127.0.0.1
-- 生成日時: 2021-07-02 06:52:53
-- サーバのバージョン: 10.4.19-MariaDB
-- PHP のバージョン: 8.0.6
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIEN... | true |
3707494308c109e74b93e2cc0ce788559928e541 | SQL | st-hol/php-course-work-project | /__/db/sql trigers/enroll_trig_on_update.sql | UTF-8 | 590 | 3.671875 | 4 | [] | no_license |
drop trigger enrolling_trigger_on_update;
delimiter //
CREATE TRIGGER enrolling_trigger_on_update
BEFORE update ON `introductory_campaign`.`application_for_admission`
FOR EACH ROW
begin
IF (SELECT rating FROM students where id_student = NEW.id_student) > 140 THEN
#UPDATE `introductory_campaign`.`application_for_adm... | true |
c7f13bd8895707643bc86d68847fcba9dad8bf8f | SQL | chasehaddleton/5834FRCScouting | /db/database.ddl | UTF-8 | 13,848 | 3.390625 | 3 | [] | no_license | CREATE TABLE scoutingTeams
(
teamNumber INT(11) PRIMARY KEY AUTO_INCREMENT NOT NULL,
teamName VARCHAR(30)
);
CREATE INDEX scoutingTeams_teamNumber_index ON scoutingTeams (teamNumber);
CREATE TABLE scoutingEvents
(
eventId INT(11) PRIMARY KEY AUTO_INCREMENT NOT NULL,
compName VARCHAR(50) ... | true |
830f0d8fa387c8259dbedb77e9dab4a234e959f6 | SQL | asalbidegoitia/uf2218 | /script_bbdd.sql | UTF-8 | 6,366 | 3.34375 | 3 | [] | no_license | CREATE DATABASE IF NOT EXISTS `videos` /*!40100 DEFAULT CHARACTER SET utf8 */;
USE `videos`;
-- MySQL dump 10.13 Distrib 8.0.12, for Win64 (x86_64)
--
-- Host: 127.0.0.1 Database: videos
-- ------------------------------------------------------
-- Server version 8.0.12
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHA... | true |
90ab1698512616ecd85fca659173f8165152a549 | SQL | Parthfaladu/dirghayu | /gym_system (2).sql | UTF-8 | 50,580 | 2.640625 | 3 | [
"MIT"
] | permissive | -- phpMyAdmin SQL Dump
-- version 4.5.4.1deb2ubuntu2.1
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Apr 01, 2020 at 07:23 PM
-- Server version: 5.7.29-0ubuntu0.16.04.1
-- PHP Version: 7.2.27-1+ubuntu16.04.1+deb.sury.org+1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!... | true |
d825d76623779fa3b9e4f6cadadf52624656cf07 | SQL | muhfahmir/KUIS-CRUD | /Kuis_123180108_PBO_D/kuis_pbo.sql | UTF-8 | 2,028 | 3.03125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.9.0.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Waktu pembuatan: 01 Apr 2020 pada 15.00
-- Versi server: 10.4.6-MariaDB
-- Versi PHP: 7.3.9
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHAR... | true |
1c4cb657686219b67e998eed5117effc8ae9573d | SQL | TJR753/projects | /hutubill/sql/hutubill.sql | UTF-8 | 1,898 | 3.234375 | 3 | [] | no_license | /*
SQLyog Enterprise v12.09 (64 bit)
MySQL - 5.5.15 : Database - hutubill
*********************************************************************
*/
/*!40101 SET NAMES utf8 */;
/*!40101 SET SQL_MODE=''*/;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHE... | true |
e342301a5df89a87528796966d0429af67716b0e | SQL | OjasThanawala/PoC-for-Unified-Payments-System-USA | /UPUSA DB/DB Code/UPUSA_Analytics.sql | UTF-8 | 2,461 | 4.5625 | 5 | [] | no_license | use upusa;
-- ------------------------------------------
-- Category-wise spending for a particular user
-- for any year
-- ------------------------------------------
DROP PROCEDURE IF EXISTS get_user_spending;
DELIMITER //
CREATE PROCEDURE get_user_spending
(
user_name_param VARCHAR(255),
year_param INT
)
BEGIN
... | true |
dc43b64d75e8edc1768c4415b8ee2eeb357ada4c | SQL | bhaskarreddy123/REDDY | /tbl_countries.sql | UTF-8 | 11,295 | 2.90625 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 3.2.0.1
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Jul 12, 2012 at 07:00 PM
-- Server version: 5.1.37
-- PHP Version: 5.3.0
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER... | true |
dfdb7014a6622ca2a4e870127b15eee36feeac29 | SQL | gucuk/deneme | /21.07 fonksiyonlar.sql | ISO-8859-9 | 1,415 | 4.28125 | 4 | [] | no_license | --Aggregate (Toplam Fonksiyonlar,Gruplama Fonksiyonlar)
/*
Aggregate Fonksiyonlar select ifadesiyle kullanlan geriye tek hcre olarak sonu dndren fonksiyonlardr. Btn deerlerin toplam sonucu verir.
1-count() toplam satr adedini sayan fonk. geriye tek satr ve tek stun olarak dner.
2-sum() toplama ilemi
3-avg() or... | true |
85d6c8ba5423d44e9f0355f735e9d4c916f5bb11 | SQL | mkwinco/vzducholod | /db/u_simple1/table.constructions_definition.sql | UTF-8 | 2,357 | 3.703125 | 4 | [] | no_license | -- Name: constructions_definition; Type: TABLE; Schema: u_simple1; Owner: -
--
CREATE TABLE u_simple1.constructions_definition (
constructionid integer NOT NULL,
construction_phase integer NOT NULL,
steps_remaining integer DEFAULT 1 NOT NULL,
type_constructionid integer NOT NULL
);
--
-- Name: TABLE ... | true |
28122fe8c5a16e3b8b7632ea188b09d9b629f76e | SQL | dzunga/awsgithub | /sql/buyTODAY_R250Dvma.sql | UTF-8 | 145 | 2.78125 | 3 | [] | no_license | select * from stockvma
where Date>'2018-03-05'
and (R21Dvma =R250Dvma)
and (R250Dvma >0)
and (Volume >250000)
order by Date desc, 9DVMA desc | true |
6248110abd531a682f70299b009ffe0879f0b564 | SQL | JulesThuillier/INF3710---TP4 | /createtable.sql | UTF-8 | 1,143 | 3.453125 | 3 | [] | no_license | CREATE TABLE Membre (
pseudo VARCHAR(30) PRIMARY KEY,
prenom VARCHAR(30) NOT NULL,
nom VARCHAR(30) NOT NULL,
dteNaiss DATE
);
CREATE TABLE Connexion (
pseudo VARCHAR(30) REFERENCES Membre,
debut TIMESTAMP,
fin TIMESTAMP,
PRIMARY KEY (pseudo, debut)
);
CREATE TABLE Sortie (
idSort INTEGER PRIMARY KEY,
... | true |
5fb561c555a9668079410daa7513b6895c98d134 | SQL | harpratap/shibuya | /shibuya/db/20181221.sql | UTF-8 | 499 | 3.328125 | 3 | [
"Apache-2.0"
] | permissive | use shibuya;
CREATE TABLE IF NOT EXISTS collection_run_history (
run_id INT UNSIGNED NOT NULL UNIQUE,
collection_id INT UNSIGNED NOT NULL,
started_time TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
end_time TIMESTAMP NULL DEFAULT NULL,
key (collection_id, started_time),
key (collection_id, run_id)
)CHAR... | true |
f4ddd46cc859b13b68b3757c496ca36711897845 | SQL | dionisisvas/training-project | /db/sql/hobbies.sql | UTF-8 | 735 | 2.734375 | 3 | [] | no_license | DROP TABLE IF EXISTS hobbies;
CREATE TABLE IF NOT EXISTS hobbies(
hobbyId INTEGER PRIMARY KEY AUTOINCREMENT,
hobbyName TEXT NOT_NULL UNIQUE,
description TEXT
);
INSERT INTO hobbies(hobbyName, description) VALUES
-- Skiing --
("Skiing", NULL),
-- Knitting --
("Knitting", NULL),
-- ... | true |
e71a504e17203461b0d147e7dc878d7b504702d3 | SQL | Choirunnisaa/praktikum-web | /110533406975/Praktikum Ke-7/Tugas_2/myweb.sql | UTF-8 | 2,844 | 3.03125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 3.4.5
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Nov 27, 2013 at 03:35 PM
-- Server version: 5.5.16
-- PHP Version: 5.3.8
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!... | true |
f83c8cfc48fdc69697a0dec9ae579e089f17c4e6 | SQL | jdrew1303/sqlgenerate | /test/spec_sql/official-suite/select8-1.sql | UTF-8 | 869 | 3.328125 | 3 | [
"MIT"
] | permissive | -- original: select8.test
-- credit: http://www.sqlite.org/src/tree?ci=trunk&name=test
CREATE TABLE songs(songid, artist, timesplayed);
INSERT INTO songs VALUES(1,'one',1);
INSERT INTO songs VALUES(2,'one',2);
INSERT INTO songs VALUES(3,'two',3);
INSERT INTO songs VALUES(4,'three',5);
INSERT INTO songs VAL... | true |
073f90cca14d6e69ac53bce5087ea71cc53ef32d | SQL | JGuissart/Dbms-Rennequinepolis | /21. AdminConfig/InstallRQS/CreaMDD/AlimDW_PackageBody.sql | UTF-8 | 3,460 | 3.484375 | 3 | [] | no_license | CREATE OR REPLACE PACKAGE BODY AlimDW IS
PROCEDURE Load AS
BEGIN
AddLogs('Début procédure Load', 'AlimDW.Load', NULL);
LoadDimensions;
--LoadFaits;
AddLogs('Fin procédure Load', 'AlimDW.Load', NULL);
EXCEPTION
WHEN OTHERS THEN
ROLLBACK;
AddLogs('OTHERS : ' || SQLERRM, 'AlimDW.Load', SQLCODE);
DBM... | true |
c41d31b81fef5ff43621cfe16d9c3b1c432566a5 | SQL | Good725/ideabubble-lamp | /projects/shop1/model/irishtimestraining/model-20191014170001.sql | UTF-8 | 9,028 | 3.546875 | 4 | [] | no_license | /*
ts:2019-10-14 17:00:01
*/
DELIMITER ;;
-- Add the "springboard" page, if it does not already exist.
INSERT IGNORE INTO
`plugin_pages_pages` (`name_tag`, `title`, `content`,`date_entered`, `last_modified`, `created_by`, `modified_by`, `publish`, `deleted`, `include_sitemap`, `layout_id`, `category_id`)
SELECT
'... | true |
df80073891dd0afd5eb38acc3a6b3eab06b2f2e2 | SQL | smithrm941/sql-exercises | /sql/13-popular-students.sql | UTF-8 | 414 | 4.09375 | 4 | [] | no_license | /*Find the name and grade of all students who are liked by more than one other
student.*/
/*I used the table I created in 09-mutual-likes.sql*/
SELECT student_info.likers_likees.likee_name, student_info.likers_likees.likee_grade
FROM student_info.likers_likees
GROUP BY student_info.likers_likees.likee_name,
stud... | true |
c17c44b97ddb6ebd62cfaff1656e8709a68cf250 | SQL | miklasiak/projekt | /arcemu_svn/sql/character_updates/261_gm_tickets.sql | UTF-8 | 525 | 2.671875 | 3 | [] | no_license | ALTER TABLE `gm_tickets` DROP PRIMARY KEY;
ALTER TABLE `gm_tickets` CHANGE COLUMN `guid` `playerGuid` INTEGER NOT NULL;
ALTER TABLE `gm_tickets` ADD COLUMN `guid` INTEGER NOT NULL AUTO_INCREMENT FIRST, ADD PRIMARY KEY (`guid`);
ALTER TABLE `gm_tickets` MODIFY COLUMN `guid` INTEGER NOT NULL UNIQUE;
ALTER TABLE `gm_t... | true |
f5899065c79b8c1ffc8bc2d87a1e044bb6246307 | SQL | yassinelounani/computer-database | /app-cdb/cdb-persistence/src/test/resources/1-SCHEMA.sql | UTF-8 | 3,748 | 3.15625 | 3 | [] | no_license | create schema if not exists `computer-database-db`;
use `computer-database-db`;
drop table if exists computer;
drop table if exists company;
create table company (
id bigint not null auto_increment,
name varchar(255),
constraint pk_company primary key ... | true |
d5c86d549eb24553e04f2304feed5d2468c9a5d2 | SQL | pav22sher/Bank | /src/main/resources/db_scripts/clientScript.sql | UTF-8 | 758 | 2.828125 | 3 | [] | no_license | create table client
(
client_id bigserial primary key,
client_last_name varchar(100) not null,
client_first_name varchar(100) not null,
client_second_name varchar(100) not null,
client_phone varchar(15) not null,
client_email varchar(100) not null,
client_passport_number varchar(100) ... | true |
f491b8e4bbf7192e3d6681f61edde82ac9dd8d1a | SQL | XuJ/paxdelay_xu | /sql/oracle/PassengerAllocationQueries.sql | UTF-8 | 2,660 | 3.640625 | 4 | [] | no_license | --------------------------------------------------
-- SELECTING ITINERARIES:
select id, first_flight_id, second_flight,
origin, destination, connection,
first_operating_carrier, second_operating_carrier,
hour_of_day
from itineraries
where year = 2007 and month = 10 and day_of_month = 14
and first_op... | true |
7ca207a5acdf3ca4177d5d4033a48d070d68e391 | SQL | aalexanderkevin/go-diary | /init.sql | UTF-8 | 496 | 3.59375 | 4 | [] | no_license | CREATE DATABASE IF NOT EXISTS tap_talk;
USE tap_talk;
CREATE TABLE IF NOT EXISTS user (
username varchar(50) NOT NULL PRIMARY KEY,
password varchar(255) NOT NULL,
email varchar(50) NOT NULL,
name varchar(255) NOT NULL,
birthday date NOT NULL
);
CREATE TABLE IF NOT EXISTS diary (
user_id varchar(5... | true |
9b25341a14bb624e76962ae5a8368744d5a57b23 | SQL | piratesmanX1/estiatorio-2021 | /estiatorio.sql | UTF-8 | 7,965 | 3.25 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.7.9
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1:3306
-- Generation Time: Jul 16, 2021 at 02:34 PM
-- Server version: 5.7.21
-- PHP Version: 5.6.35
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CH... | true |
a945147a0a99b17421a18dda46d1e8a142c026eb | SQL | minupalaniappan/gradfire | /adhoc/prereq_filter.sql | UTF-8 | 1,235 | 3.984375 | 4 | [] | no_license | SELECT * FROM courses
WHERE (
(WITH RECURSIVE prereq_satisfied AS (
SELECT 0, parent_req, array_agg(sts) child_satisfactions FROM
(SELECT DISTINCT ON (id) cp.*, (scc.course_id IS NOT NULL) sts FROM courses_prerequisites cp
LEFT JOIN courses c ON c.subject = cp.subject AND c.number = cp.number
LEFT ... | true |
3f2433fd738b76e924834521d409b7d78499dcbe | SQL | Monika171/demo-outplacementheros | /OPH_sql_import1/designations.sql | UTF-8 | 7,724 | 2.875 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.8.5
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Jun 26, 2020 at 04:56 AM
-- Server version: 10.1.38-MariaDB
-- PHP Version: 7.3.2
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD... | true |
a468698b00bd6c7225e92974249dc02f0299897c | SQL | souravrrp/AKG-SCIL-SQL | /Payables/Supplier/Supplier Details.sql | UTF-8 | 696 | 3.515625 | 4 | [] | no_license | SELECT
APSA.ORG_ID
,APS.SEGMENT1 SUPPLIER_NUMBER
,APS.VENDOR_NAME SUPPLIER_NAME
,TO_CHAR(APS.START_DATE_ACTIVE,'DD-MON-YYYY HH24:MI:SS') CREATION_DATE
,APS.ENABLED_FLAG
,APSA.VENDOR_SITE_CODE SUPPLIER_SITE
,TO_CHAR(APS.START_DATE_ACTIVE,'DD-MON-YYYY HH24:MI:SS') SITE_CREATION_DATE
,APSA.ADDRESS_LINE1||','||APSA.ADDRESS... | true |
727734da28c5a9e0d9e5e736ec8c2ff891ebeb77 | SQL | guonl/springboot-shiro | /src/main/resources/sql/shiro.sql | UTF-8 | 6,347 | 3.84375 | 4 | [
"Apache-2.0"
] | permissive |
SET FOREIGN_KEY_CHECKS=0;
-- ----------------------------
-- Table structure for sys_authority
-- ----------------------------
DROP TABLE IF EXISTS `sys_menu_authority`;
CREATE TABLE `sys_menu_authority` (
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
`data_url` varchar(100) NOT NULL COMMENT '连接路径或方法',
... | true |
0b692851e7fa1c84f349afa2c96f6c46b83623a4 | SQL | Maribmdj/ControldeEventosBD | /Scripts/TABLAS/2 CATALOGO ESTADO.sql | WINDOWS-1250 | 1,162 | 3.765625 | 4 | [] | no_license | /*
Fecha: 24 SETIEMBRE 2018
Autor: Mariela Barrantes
Descripcion: TABLA CATALOGO ESTADO
*/
create table ESTADO
(
id_Estado number(6),
nombre varchar2(30) CONSTRAINT ESTADO_nombre_NN NOT NULL,
--Atributos Auditoria
Fecha_creacion DATE,
Usuario_creacion VARCHAR2(10),
Fecha_ultima_modificacion DATE... | true |
35fc963f07c75ab85a7d471aecc8a4e5194c62ff | SQL | LHarroldQA/IMS-Starter | /src/main/resources/sql-schema.sql | UTF-8 | 982 | 3.75 | 4 | [
"MIT"
] | permissive | drop schema ims;
CREATE SCHEMA IF NOT EXISTS `ims`;
USE `ims` ;
CREATE TABLE IF NOT EXISTS `ims`.`customers` (
`id` INT(11) NOT NULL AUTO_INCREMENT,
`first_name` VARCHAR(40) NULL DEFAULT NULL,
`surname` VARCHAR(40) NULL DEFAULT NULL,
PRIMARY KEY (`id`)
);
CREATE TABLE IF NOT EXISTS `ims`.`items`(
`id` ... | true |
2f624765a199b1f99a92eb12b54b4a3fe871430d | SQL | MarceloBravo/mabc_angular_node | /mabc.sql | UTF-8 | 17,293 | 3.203125 | 3 | [] | no_license | /*
Navicat Premium Data Transfer
Source Server : MySql 3306
Source Server Type : MySQL
Source Server Version : 80020
Source Host : localhost:3306
Source Schema : mabc
Target Server Type : MySQL
Target Server Version : 80020
File Encoding : 65001
Date: 06/06/2021 12:0... | true |
934d8f268e31be92e3ccab9ac0607c515fee6175 | SQL | jabautista/GeniisysSCA | /src/main/resources/sql/indexes/giac_soa_rep_ext/GIAC_SOA_REP_EXT_USER_ID_IDX.sql | UTF-8 | 274 | 2.984375 | 3 | [] | no_license | SET SERVEROUTPUT ON
BEGIN
EXECUTE IMMEDIATE 'CREATE BITMAP INDEX GIAC_SOA_REP_EXT_USER_ID_IDX ON GIAC_SOA_REP_EXT (USER_ID)';
DBMS_OUTPUT.PUT_LINE('index created');
EXCEPTION
WHEN OTHERS THEN
DBMS_OUTPUT.PUT_LINE(SQLERRM || '-' || SQLCODE);
END;
/ | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.