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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
ff699b5655deeed24adb6fd9c83da7fe518ab335 | SQL | VictorGarciaAcosta/JuegosOlimpicos | /proyecto_JJOO/proyecto_antiguo/BBDD/script.sql | UTF-8 | 1,007 | 3.53125 | 4 | [] | no_license | --Crear usuario y base de datos
create user usuario-juegos identified by 'usuario';
create database JJOO;
use JJOO;
--Crear tabla de eventos de preguntas
create table 'eventos_pregunta'(
ID INT(3) PRIMARY KEY,
PREGUNTA VARCHAR(50),
RESPUESTAS VARCHAR(300),
RESPUESTA_ACERTADA VARCHAR(100)
);
--Crear t... | true |
7129cc70fcf3f8e1c4043d55571d09728e288740 | SQL | BlackPrince163/semesterapp | /src/main/java/ru/kpfu/itis/dump/Vote.sql | UTF-8 | 3,616 | 3.078125 | 3 | [] | no_license | CREATE TABLE users
(
id BIGSERIAL PRIMARY KEY,
first_name VARCHAR(30),
last_name VARCHAR(30),
email VARCHAR(30),
hash_password VARCHAR(100),
deputies_id INTEGER
);
CREATE TABLE deputies
(
id BIGSERIAL PRIMARY KEY,
first_name VARCHAR(30),
last_na... | true |
8528faec01f04cef88a669437b2192497f4d569f | SQL | dineshbillava91/phpunit | /sql/phpunit.sql | UTF-8 | 1,688 | 3.15625 | 3 | [
"MIT"
] | permissive | -- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Generation Time: Mar 21, 2021 at 06:46 PM
-- Server version: 5.7.33-log
-- PHP Version: 7.4.15
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@... | true |
ef6908da25162bbca40e45ff958d2d191390f08e | SQL | hubertxu123/Water | /_db_log/water_paas.sql | UTF-8 | 2,780 | 3.484375 | 3 | [
"Apache-2.0"
] | permissive |
-- 2021.04.17
ALTER TABLE `paas_file`
ADD COLUMN `use_whitelist` varchar(40) NULL COMMENT '安全名单' AFTER `update_fulltime`;
-- 2021.06.08
ALTER TABLE `paas_file`
MODIFY COLUMN `plan_begin_time` timestamp NULL DEFAULT NULL COMMENT '计划开始执行时间' AFTER `plan_state`,
MODIFY COLUMN `plan_last_time` timestamp NULL ... | true |
c5a230e9f0a6f02c09796004ecbfad74fbc07e4a | SQL | marvindaviddiaz/scripts | /queries.sql | UTF-8 | 1,979 | 3.640625 | 4 | [] | no_license | -- mysql - size data
SELECT table_name AS "Table",
ROUND(((data_length + index_length) / 1024 / 1024 / 1024), 2) AS "Size (GB)"
FROM information_schema.TABLES
WHERE table_schema = "fel"
ORDER BY (data_length + index_length) DESC;
-- oracle - job to create partition table every month
BEGIN
DBMS_SCHEDULER.CREATE_JOB... | true |
1a7c3b0138fdcfd31a96a10ec656969bfc33d12a | SQL | intCCP/CCP | /Produzione/Viste/vtmcre0_app_posizioni_stato.sql | UTF-8 | 2,589 | 3.015625 | 3 | [] | no_license | /* Formatted on 17/06/2014 18:16:13 (QP5 v5.227.12220.39754) */
CREATE OR REPLACE FORCE VIEW MCRE_OWN.VTMCRE0_APP_POSIZIONI_STATO
(
COD_ABI_ISTITUTO,
COD_ABI_CARTOLARIZZATO,
FLG_OUTSOURCING,
COD_COMPARTO,
COD_STRUTTURA_COMPETENTE,
COD_STRUTTURA_COMPETENTE_DV,
COD_STRUTTURA_COMPETENTE_DC,
COD_STR... | true |
17b87b664fadbe9ba6de0a1617fabd00f19f3d45 | SQL | egoshin-igor/SQL | /lab8/filler.sql | UTF-8 | 6,818 | 3.28125 | 3 | [] | no_license | /*
SET @category_size := 6;
SET @currency_size = 2;
SET @delivery_size = 4;
SET @order_status_size = 3;
SET @payment_method_size = 4;
SET @product_status_size = 2;
SET @user_status_size = 2;
SET @user_size = 100;
SET @product_size = 100;
SET @products_order_size = 400;
SET @sellers_product_size = ... | true |
6c4e9c2726584b3f3631c52f926d5bbfc885062e | SQL | toufictalib/ishtirak | /src/main/resources/sql/income.sql | UTF-8 | 217 | 3.03125 | 3 | [] | no_license | SELECT
transaction_type "Transaction Type", sum(amount) total
FROM
transaction
WHERE
insert_date >= "{0}"
AND insert_date <= "{1}"
group by transaction_type
order by total desc; | true |
edbf17be4533206416ff763272dbd9b29b055fc0 | SQL | brent-cahill/CS-121 | /HW4/cs121hw4/make-branch-stats.sql | UTF-8 | 3,354 | 4.65625 | 5 | [] | no_license | -- [Problem 1]
CREATE INDEX idx_account ON account (branch_name, balance);
-- [Problem 2]
CREATE TABLE mv_branch_account_stats (
branch_name VARCHAR(15) NOT NULL,
num_accounts INTEGER NOT NULL,
total_deposits NUMERIC(12,2) NOT NULL,
min_balance NUMERIC(12,2) NOT NULL,
max_balance N... | true |
cc1125289f5b6544321ca40d2196aef452c63fe1 | SQL | xenodochial/Flights-And-Travel-Data-Warehouse | /SQL/Task C.4 report_8.sql | UTF-8 | 2,456 | 3.984375 | 4 | [] | no_license | -- REPORT 8
-- LEVEL 2
SELECT * FROM(SELECT NATIONALITY,
CASE
WHEN TO_CHAR(PASSENGER_TYPE) = TO_CHAR(1) THEN 'Children'
WHEN TO_CHAR(PASSENGER_TYPE) = TO_CHAR(2) THEN 'Teenager'
WHEN TO_CHAR(PASSENGER_TYPE) = TO_CHAR(3) THEN 'Adult'
WHEN TO_CHAR(PASSENGER_TYPE) = TO_CHAR(4) THEN 'Elder'
ELSE 'An... | true |
90a81ed9298f8f46f1f9818cdd5c0c0f51b20db1 | SQL | oscarpon/ClubPadel | /BD/abp23.sql | UTF-8 | 16,375 | 2.921875 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.7.4
-- https://www.phpmyadmin.net/
--
-- Servidor: 127.0.0.1
-- Tiempo de generación: 23-01-2020 a las 18:46:31
-- Versión del servidor: 10.1.26-MariaDB
-- Versión de PHP: 7.1.9
DROP DATABASE IF EXISTS `abp23`;
CREATE DATABASE `abp23` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_... | true |
c1d9b018fcf374fa46575639c459a6041f45229e | SQL | athosgpm/turma16java | /SQL/Lista02/Exercicio02.sql | UTF-8 | 1,553 | 3.71875 | 4 | [] | no_license | create database db_pizzaria_legal;
use db_pizzaria_legal;
create table tb_categoria(
id_categoria int auto_increment primary key,
tamanho varchar(20) not null,
doce boolean not null,
viagem boolean not null
);
create table tb_pizza(
id_personagem int auto_increment primary key,
fk_categoria int,
nome varchar(20) not ... | true |
30e9370dfd1b2a86072e6491e97217cfc4e7ec4e | SQL | henrique-mariano/BD | /Laboratorio_2/Scripts/MySql/script_schema_mysql.sql | UTF-8 | 4,544 | 3.53125 | 4 | [] | no_license | CREATE DATABASE IF NOT EXISTS Locadora;
DROP TABLE IF EXISTS FILME_ATOR;
DROP TABLE IF EXISTS ATOR;
DROP TABLE IF EXISTS LOC_FITA;
DROP TABLE IF EXISTS FITA;
DROP TABLE IF EXISTS FILME;
DROP TABLE IF EXISTS CATEGORIA;
DROP TABLE IF EXISTS LOCACAO;
DROP TABLE IF EXISTS CLIENTE;
CREATE TABLE CLIENTE
(codCli INTEGER ... | true |
48de457f65007b633596fe9c67f150ee316d45ef | SQL | dsaqp1415g1/InfoRunning-Project | /sql/InfoRunning-data.sql | UTF-8 | 984 | 2.515625 | 3 | [] | no_license | source InfoRunning-schema.sql;
insert into users values('admin', MD5('admin'), 'admin', 'admin@mail.com');
insert into user_roles values ('admin', 'administrador');
insert into users values('alex', MD5('alex'), 'alex', 'alex@mail.com');
insert into user_roles values ('alex', 'registered');
insert into users values('... | true |
7e62839a774ff2a7513560592ef49f2180e51ba4 | SQL | sparkdb/COP4710 | /SmashDB V1.2/smashdb2.sql | UTF-8 | 8,077 | 3.296875 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.5.1
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Nov 30, 2016 at 05:12 AM
-- Server version: 10.1.19-MariaDB
-- PHP Version: 7.0.13
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CL... | true |
c077be690a2371354c6255f94caf0da9653d1cfb | SQL | duckback00/epod_datical | /Resources/sql/20200922090727916_states.sql | UTF-8 | 383 | 2.953125 | 3 | [] | no_license | DECLARE
v_column_exists number := 0;
BEGIN
Select count(*) into v_column_exists
from user_tab_cols
where upper(column_name) = 'STATE'
and upper(table_name) = 'EMPLOYEES';
--and owner = 'DELPHIXDB'; -- if using all_xxx or dba_xxx
if (v_column_exists = 0) then
execute immediate 'alte... | true |
aefe59c909d436039008545f88cbdf30b5797587 | SQL | rosasurfer/mt4-tools | /etc/db/db-schema.mysql.sql | UTF-8 | 6,457 | 3.609375 | 4 | [
"WTFPL"
] | permissive | /*
Created 16.01.2017
Modified 02.03.2019
Project Rosatrader
Model Rosatrader
Company
Author Peter Walther
Version 0.2
Database MySQL 5
*/
set sql_mode = 'traditional,high_not_precedence';
set collation_connection = 'utf8_unicode_ci';
set autocommit = 0;
drop ... | true |
f8403311beef2add7713051ee216a5832c30d510 | SQL | thehumacorn/UMUC-Projects | /Hierarchy of Secure User Database/Hierarchy of Database/DBA2/DBA2.sql | UTF-8 | 2,559 | 3.5 | 4 | [] | no_license | Alter session set current_schema = DBA2;
DROP TABLE products;
Create TABLE products(
product_id int PRIMARY KEY,
product_name VARCHAR(20),
product_price int
);
DROP TABLE sales;
Create TABLE sales (
sale_id int PRIMARY KEY
);
DROP TABLE payroll_applications;
Create TABLE payroll_applica... | true |
af1ff6eaee55ef0275306a0743ba4dd6b443482d | SQL | fthedex/Route | /routeDB/procedures/accountInfo.sql | UTF-8 | 3,314 | 3.78125 | 4 | [] | no_license |
DELIMITER //
create procedure createAccountInfo
(
in p_accountID int,
in p_accountPassword varchar(255),
in p_accountType int,
out p_output varchar(50)
)
begin
declare exit handler for sqlexception rollback;
set autocommit=0;
start transaction;
if length(p_accountPassword) < 6
then
... | true |
0adfbef352d787abd3d91bc823466937baa3a87a | SQL | shishc9/blogSystem-backend | /src/main/resources/sql/blog-backend-init.sql | UTF-8 | 4,426 | 2.640625 | 3 | [] | no_license | use blogsys;
# USER INIT
INSERT INTO user(username, password, email, avatar, post_count)
VALUES('user1', '02571c02bcabe4bfc42be1306ae9ff9c', '123456780@126.com', 'https://i.loli.net/2021/05/25/vowpYGb6ND1I3ET.jpg', 8);
INSERT INTO user(username, password, email, avatar)
VALUES('user2', '02571c02bcabe4bfc42be13... | true |
d4d2f5c3a48edaa864a88a8a497e114f63eb6e46 | SQL | brunstart/Database_and_SQL_Programming | /DB 과제_200901.sql | UTF-8 | 2,831 | 3.734375 | 4 | [] | no_license | use company;
set sql_safe_updates = 0;
show tables;
select * from dept_locations;
alter table dept_locations add column phone char(15);
select * from dept_locations;
update dept_locations set phone='01000000001' where dnumber=1 and dlocation='Houston';
update dept_locations set phone='01000000002' where dnumber=4;
up... | true |
4427bf8b2a47d061e0b468a9ded1da809a8d0f12 | SQL | dembygenesis/droppy-prulife | /src/v1/api/database/stored_procedures/add_order_seller.sql | UTF-8 | 9,484 | 4.21875 | 4 | [] | no_license | /**
Transactions
*/
DROP PROCEDURE IF EXISTS `add_order_seller`;
DELIMITER $$
CREATE PROCEDURE `add_order_seller` (
-- person authentication first
-- @p_admin_id INTEGER,
p_user_id INTEGER,
p_order_details TEXT,
p_region TEXT
)
BEGIN
DECLARE EXIT HANDLER FOR SQLEXCEPTION
BEGIN
... | true |
1f8c1a4ab4cf65b772662ca8c0b283146e68fa0e | SQL | airwaves778899/cw | /sql/cw.sql | UTF-8 | 1,260 | 3.671875 | 4 | [] | no_license | BEGIN TRANSACTION;
CREATE TABLE KEYWORD (
ID INTEGER PRIMARY KEY NOT NULL,
WORD TEXT NOT NULL);
CREATE TABLE MASTER_CHANNEL (
ID INTEGER PRIMARY KEY NOT NULL,
NAME TEXT NOT NULL);
CREATE TABLE SUB_CHANNEL (
ID INTEGER PRIMARY KEY NOT NULL,
NAME TEXT NOT NULL,
MASTER_CHANNEL_ID NUM... | true |
d6c629b3d67dd908bdffb98cf51827813427d964 | SQL | kevinthenard/adblock-detect | /bdd.sql | UTF-8 | 736 | 2.671875 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 3.5.1
-- http://www.phpmyadmin.net
--
-- Client: localhost
-- Généré le: Mar 08 Avril 2014 à 13:50
-- Version du serveur: 5.5.25
-- Version de PHP: 5.4.4
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
--
-- Base de données: `test_adblock`
--
-- ---------------------... | true |
ac2fe02607ff93cb3c569de563214bd4677b2f46 | SQL | arthurAddamsSiebert/cartridges | /core/release/lib/resources/core/dbinit/scripts/dbconstraints.ddl | UTF-8 | 2,728 | 3.203125 | 3 | [] | no_license | /*
****************************************************************
File: dbconstraints.ddl
Generated by JGen Code Generator from INTERSHOP Communications AG.
Generator version: Code Generator for Intershop 7.2 and later
*******************************************************************************
The JGen Code ... | true |
c2e57128d4b18214d93fcb8e1aa8bdbe224377a5 | SQL | pabloDC1997/discoolserver | /resources/sql/list_parties_by_name.sql | UTF-8 | 419 | 3.40625 | 3 | [] | no_license | select
c.id,
c.title,
c.description,
loc.name as lacationName,
loc.address_descritpion as addressDescription,
loc.link_maps as linkMaps,
tk.link as ticketsLink,
tk.description as ticketsDescription,
c.thumb,
c.date,
c.time,
c.id_host as idHost
from parties c
inner join locations loc on loc.id_p... | true |
c29e22e60831fa8e5817dcec46ebf1a322af080c | SQL | rida0910/dbpro_051_061_064 | /ProjecViews.sql | UTF-8 | 1,829 | 3.65625 | 4 | [] | no_license | CREATE VIEW JobsDoneByFreelancers AS
SELECT FirstName + ' ' + LastName AS [Freelancer Name], title AS [Job Title], [Description] FROM Job
JOIN Bid ON Job.JobId = Bid.JobID
JOIN Freelancer ON Bid.FreelancerID = Freelancer.FreelancerId
JOIN Person ON Person.PersonId = Freelancer.FreelancerId
where active = 0 an... | true |
d91c245b241df3903872a1175ca9264b68dedf88 | SQL | koketso-seopela-112/NRCSPInterestRate | /src/main/resources/calculateInterestSP.sql | UTF-8 | 347 | 3.125 | 3 | [] | no_license | CREATE PROCEDURE `calculate_interest` (
IN `repo_rate_in` float,
IN `amount_in` double,
IN `agreement_in` varchar(500),
IN `start_in` date,
IN `end_in` date)
BEGIN
select (amount_in * (((repo_rate_in *2)+ s.rate))/100) * ((datediff(start_in,end_in)* -1)/365)
from `ksquareddb`.`specification` s
where s.agreemen... | true |
ebd1b28d2569e3d62898decfa4ce434a489ce9a0 | SQL | blackamd/basic | /all_star_task.sql | UTF-8 | 2,104 | 3.078125 | 3 | [
"BSD-3-Clause"
] | permissive | -- phpMyAdmin SQL Dump
-- version 4.7.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Sep 22, 2018 at 10:48 AM
-- Server version: 10.1.26-MariaDB
-- PHP Version: 7.1.9
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD... | true |
8594256e9e2fa5d8715b0773815d25dac2acdf74 | SQL | matYang/iShangkeBackend | /iShangkeProject/Design/Database/DB_Schema.sql | UTF-8 | 48,411 | 3.25 | 3 | [] | no_license | DROP database edunav;
CREATE database edunav;
-- MySQL Script generated by MySQL Workbench
-- Mon 20 Oct 2014 10:42:16 AM CST
-- Model: New Model Version: 1.0
SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0;
SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0;
SET @OLD_SQL_MODE=@@SQL_MODE... | true |
f0298eceb427bc7d23e83ed075845df9545a4f9e | SQL | silence-do-good/stress-test-Postgres-and-MySQL | /dump/low/day17/select0838.sql | UTF-8 | 260 | 3.015625 | 3 | [] | no_license |
SELECT sen.name
FROM SENSOR sen, SENSOR_TYPE st, COVERAGE_INFRASTRUCTURE ci
WHERE sen.SENSOR_TYPE_ID=st.id AND st.name='WeMo' AND sen.id=ci.SENSOR_ID AND ci.INFRASTRUCTURE_ID=ANY(array['6062','3052','2051','1200','4202','4056','5052','5058','5038','5076'])
| true |
f182574a96ff1b6365d25d643f8d09d2ff54b51c | SQL | Alexandr211/Funny-cook | /tasknsign.sql | UTF-8 | 5,573 | 2.984375 | 3 | [
"BSD-3-Clause"
] | permissive | -- phpMyAdmin SQL Dump
-- version 4.6.6deb5
-- https://www.phpmyadmin.net/
--
-- Хост: localhost:3306
-- Время создания: Фев 23 2019 г., 19:25
-- Версия сервера: 5.7.25-0ubuntu0.18.04.2
-- Версия PHP: 7.2.15-0ubuntu0.18.04.1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTE... | true |
73791aa5a6893de1668256fa1933cc6eccfa2f30 | SQL | JonathanRH07/Control-de-versiones | /DB ICAAVweb/Suite_mig_demo/Stored_Procedures/sp_glob_proveedor_inventario_s.sql | UTF-8 | 3,283 | 3.734375 | 4 | [] | no_license | DELIMITER $$
CREATE DEFINER=`root`@`%` PROCEDURE `sp_glob_proveedor_inventario_s`(
IN pr_id_grupo_empresa INT,
IN pr_id_tipo_proveedor INT,
IN pr_cve_proveedor VARCHAR(10),
IN pr_razon_social VARCHAR(255),
IN pr_nombre_comercial VARCHAR(255),
IN pr_ini_pag INT,
IN pr_fin_p... | true |
5659fda2067a9e7305c0f56dd8ca4f93fa7f4bc9 | SQL | juanverde/datasci_course_materials | /assignment2/keyword_search.sql | UTF-8 | 530 | 4.1875 | 4 | [] | no_license | SELECT a_docid, b_docid, sum(product) as similarity
FROM (
SELECT a.docid AS a_docid, b.docid AS b_docid, a.term, ( a.count * b.count ) AS product
FROM (
SELECT * FROM frequency
UNION SELECT 'query' as docid, 'washington' as term, 1 as count
UNION SELECT 'query' as docid, 'taxes' as term, 1 as count
... | true |
a7a0ec8fc240c95c82d0f8f44c3d7b10f0cf0cdd | SQL | dladowitz/cake | /seed.sql | UTF-8 | 1,564 | 3.09375 | 3 | [] | no_license |
-- Locally (if database is already created):
-- psql <databasename> -f seed.sql
-- On heroku there is only one database present
-- cat seed.sql | heroku pg:psql
-- //create locations
INSERT INTO locations(name, img_url) values('Tradecraft', 'http://s3-media2.fl.yelpcdn.com/bphoto/ISimnz4_yTvuPaa-aOwDMA/l.jpg');
INSE... | true |
1679ddcd8c6e16c33a0da9f0421fc2e908aebb18 | SQL | intCCP/CCP | /Produzione/Viste/v_mcres_fen_pratiche_ch.sql | UTF-8 | 852 | 2.90625 | 3 | [] | no_license | /* Formatted on 17/06/2014 18:12:39 (QP5 v5.227.12220.39754) */
CREATE OR REPLACE FORCE VIEW MCRE_OWN.V_MCRES_FEN_PRATICHE_CH
(
COD_ABI,
COD_NDG,
COD_SNDG,
COD_MATR_PRATICA,
COD_UO_PRATICA,
DESC_MOTIVAZIONE,
DTA_CHIUSURA
)
AS
SELECT P.COD_ABI,
P.COD_NDG,
' ' COD_SNDG,
... | true |
26ba53ffe6df76fe55c08a9bcb08883c12db6f9e | SQL | ivanxavier7/SBD | /database/clinica_v7/ptda2020gr5db_exame.sql | UTF-8 | 4,322 | 3.28125 | 3 | [] | no_license | CREATE DATABASE IF NOT EXISTS `clinica` /*!40100 DEFAULT CHARACTER SET latin1 */;
USE `clinica`;
-- MySQL dump 10.13 Distrib 8.0.22, for Win64 (x86_64)
--
-- Host: localhost Database: clinica
-- ------------------------------------------------------
-- Server version 5.7.17
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=... | true |
11946bffd41985024cf19304071d327a2837d1c5 | SQL | Gautammer/LibroBackend | /SQL/libro_app (1).sql | UTF-8 | 86,862 | 3.046875 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.8.3
-- https://www.phpmyadmin.net/
--
-- Host: localhost:3306
-- Generation Time: Nov 29, 2019 at 09:54 PM
-- Server version: 5.6.46-cll-lve
-- PHP Version: 7.2.7
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET ... | true |
4c7fa65cbc6fdea152ad80b9cdc8e6d1c2fca825 | SQL | filipepiresg/ProjetoBD1 | /scripts/ddl_grupo03.sql | UTF-8 | 3,322 | 3.609375 | 4 | [] | no_license | DROP TABLE CLIENTE CASCADE CONSTRAINTS;
CREATE TABLE CLIENTE(
ID_CLIENTE INT,
CPF CHAR(11),
NOME CHAR(15),
SOBRENOME VARCHAR(40),
TITULO_TRATAMENTO CHAR (3),
DT_NASCIMENTO DATE,
SEXO CHAR(1),
END_RUA CHAR(30),
END_NUM CHAR(5),
END_CIDADE CHAR(20),
END_BAIRRO CHAR(15),
END_ESTADO CHAR(2),
END_PAIS CHAR(20),
END_CEP CHA... | true |
8a84f73fe1dcf1caeb824e5ebe9468a4b0a7c1cc | SQL | daniiel/ora-scripts | /distr.sql | UTF-8 | 1,426 | 3.28125 | 3 | [] | no_license | set verify off
--------------------------------------------------------------------------------------------------------------
-- Script: Distr | Shows the distribution of rows in a table.
-- Author: Orlando Olguin Olvera | oranswer.wordpress.com | orlandoolguin.wordpress.com
-- Dates: 28/05/2010 | Creation
-- ... | true |
adbf873e5be12274e8a4de6bd81390eff4a0db78 | SQL | Y97qb/QuanLyTre | /src/main/resources/quanlytre.sql | UTF-8 | 7,098 | 3.03125 | 3 | [] | no_license | -- MySQL dump 10.13 Distrib 8.0.20, for Win64 (x86_64)
--
-- Host: localhost Database: quanlytre
-- ------------------------------------------------------
-- Server version 8.0.20
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/... | true |
6635a60e1dc7c61beb44a4e34a40b6aa6d4f080a | SQL | satriaadicky/DataFellowshipBatch6 | /SQL_Dicky Satria Dwiputra.sql | WINDOWS-1252 | 2,133 | 4.5 | 4 | [] | no_license | -- 1. How many film recommendation about astronaut?
select COUNT(*)
from film
where description like '%Astronaut%'
-- 2. how many films have a rating of R and a replacement cost between $5 and $15?
select count(*)
from film
where rating = 'R' and replacement_cost between 5 and 15
-- 3. - We have two staf... | true |
a19032e9af1db290ab2d7bd1fd79b9b5386898dc | SQL | mduhau/Refresh | /DATABASE/TABLES_SEULES.sql | UTF-8 | 5,453 | 3.265625 | 3 | [] | no_license | /*
Plateforme web PPR - outil de crowdsourcing
Copyright(C) 2011 Nicolas SEICHEPINE
This file is part of PPR.
PPR is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation, either version 3 of the
L... | true |
ed16490e9589fdc9f193375e792e2c60a64ec82c | SQL | wf-oadenaike/TestProject | /TestDBProject/CADIS_SYS/Stored Procedures/SPGETLOCKINFO.sql | UTF-8 | 354 | 3.5 | 4 | [] | no_license | CREATE PROCEDURE [CADIS_SYS].[SPGETLOCKINFO]
(
@Guid nchar(33),
@Name nvarchar(250)
)
AS
SELECT
PL.COMPONENTID,
VW_ALL.NAME,
PL.LOCKEDBY,
PL.LOCKACQUIRED,
PL.LOCKID
FROM CADIS_SYS.CO_PROCESSLOCK PL
INNER JOIN CADIS_SYS.VW_ALL_PROCESSES VW_ALL
ON
VW_ALL.ComponentId =PL.COMPONENTID AND
VW_ALL.NAME=@Name AND PL.... | true |
f27a35f49dd12b31600b0a674262992b2dc39d9c | SQL | Neosoftware-Nepal/Reports-Layout | /Server Files/Switch ON/Query/SP_ITN_IncommingPayments.txt | UTF-8 | 2,344 | 3.1875 | 3 | [] | no_license | CREATE PROCEDURE "SP_ITN_IncomingPayment" (IN DocKey INT)
AS
BEGIN
SELECT 'IncomingPayment'
,SUBSTR(T2."DocDate",0,10) AS "DocDate"
,T2."DocNum"
,T3."FormatCode"
,IFNULL(T2."PrjCode",'') AS "PrjCode"
,IFNULL(T3."AcctName",'') AS "AccountName"
,IFNULL(T1."LineMemo",'') AS "LineMemo"
,T1."Debit"
,T1."Cre... | true |
1e5e1800ecfb6e35abc762531021ef09e3c5f06c | SQL | Raiane-Dev/EAD | /tb_admin_aulas.sql | UTF-8 | 1,954 | 3.109375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 5.1.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Tempo de geração: 07-Nov-2021 às 23:05
-- Versão do servidor: 10.4.20-MariaDB
-- versão do PHP: 8.0.8
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CL... | true |
1c39526f7da13bf079f9b30c2f90afb2f915f0d2 | SQL | CUBRID/cubrid-testcases | /sql/_23_apricot_qa/_03_i18n/zh_CN/_04_using_index/cases/1003.sql | UTF-8 | 1,946 | 3.515625 | 4 | [
"BSD-3-Clause"
] | permissive | --+ holdcas on;
set names utf8;
--Test using indexes in a select query
create class test_cn (i integer,s STRING collate utf8_gen,j integer,t STRING collate utf8_gen,x STRING collate utf8_gen );
create unique index foo_udx on test_cn (i, s, j, t);
create index int_idx on test_cn (i, j);
insert into test_cn values(101, '... | true |
0b28f2ad871babbdc6e29c61f0ac481f118de7e9 | SQL | Bromptoneer/Code-2020 | /VAT3 vs SA TB v2.sql | UTF-8 | 470 | 3.4375 | 3 | [] | no_license | SELECT
EXTERNAL_SA_ID
,TRUE_BAL_AMT
INTO #SA
FROM
MISUserData.[UK\PB32946].VCRO_SERV_ACCT_01112020
WHERE
TRUE_BAL_AMT < '0'
SELECT
EXTERNAL_SA_ID
,(NET_AMOUNT+VAT_AMOUNT) AMT
INTO #VAT3
FROM
VMI_VAT3_DETAIL_CURRENT
WHERE
CD_BUSE IN ('ESU','GSS')
SELECT
SUM(TRUE_BAL_AMT)
FROM
#SA
SELECT
SUM(AM... | true |
c529f11f1fea15f0ca656a6fa8409962df2c4f02 | SQL | nikolay-doichev/Csharp-Databases-Basics-September-2019 | /Databases Basics - MS SQL Server/01.DataDefinitionAndDatatypes_Exercise/13.MovieDatabase.sql | UTF-8 | 1,880 | 3.5625 | 4 | [] | no_license | CREATE TABLE Directors (
Id INT PRIMARY KEY IDENTITY,
DirectorName VARCHAR(30) NOT NULL,
Notes NVARCHAR(MAX)
)
CREATE TABLE Genres (
Id INT PRIMARY KEY IDENTITY,
GenreName VARCHAR(30) NOT NULL,
Notes NVARCHAR(MAX)
)
CREATE TABLE Categories (
Id INT PRIMARY KEY IDENTITY,
CategoryName VARCHAR(30) NOT NULL,
Not... | true |
06df0374d8bdce1f36e5ec4d28b6598694f4e0f9 | SQL | Mohammed-Elmasry/Laravel-Gym-Project | /GymSystem.sql | UTF-8 | 8,903 | 3 | 3 | [
"MIT"
] | permissive | -- phpMyAdmin SQL Dump
-- version 4.6.6deb5
-- https://www.phpmyadmin.net/
--
-- Host: localhost:3306
-- Generation Time: Mar 21, 2019 at 02:04 PM
-- Server version: 5.7.25-0ubuntu0.18.04.2
-- PHP Version: 7.2.15-0ubuntu0.18.04.1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHA... | true |
8a451a46749a441b46be867824e94a2a59430e88 | SQL | Soliloquiess/SF_Record | /SF_PDF/0311/day1-worldDB.sql | UTF-8 | 1,357 | 3.90625 | 4 | [] | no_license | -- 1. 기존 country 테이블 구조와 동일한 새이름(country2)의 테이블을 하나 만들고(CHARSET=utf8)
CREATE TABLE `country2` (
`Code` char(3) NOT NULL DEFAULT '',
`Name` char(52) NOT NULL DEFAULT '',
`Continent` enum('Asia','Europe','North America','Africa','Oceania','Antarctica','South America') NOT NULL DEFAULT 'Asia',
`Region` char(26) NO... | true |
ce5e70146f76371566994035c544ef72b27549c8 | SQL | JohnDongMobius/GK2RA2_Core | /RA_SQL/fraud/create_table_ra_duplicated.sql | UTF-8 | 12,992 | 2.9375 | 3 | [] | no_license | drop table ra_duplicated;
CREATE TABLE `ra_duplicated` (
`call_id` bigint(20) DEFAULT '0',
`call_type` tinyint(2) DEFAULT '0',
`s_msisdn` bigint(20) DEFAULT '0',
`o_msisdn` bigint(20) DEFAULT '0',
`duration` bigint(20) DEFAULT '0',
`call_time` datetime NOT NULL,
`sw_id` mediumint(5) unsigned DEFAULT '0',
... | true |
2450e15153ad8cf7a1a3b5ea1d508385ad7c9360 | SQL | xiyiaoo/ademo | /src/sql/schema.oracle.sql | UTF-8 | 10,380 | 3.859375 | 4 | [] | no_license | drop index organization_index_parentIds;
drop index organization_index_parentId;
drop table t_sys_organization cascade constraints;
drop index resource_index_parentId;
drop index resource_index_parentIds;
drop table t_sys_resource cascade constraints;
drop index role_index_value;
drop table t_sys_role cascade co... | true |
c467bbe0e28a47ec1c67e4670023724024dc4905 | SQL | TobyJChappell/CPSC_408 | /Assignment_2/toby_chappell_assignment2.sql | UTF-8 | 2,121 | 4.625 | 5 | [] | no_license | --author: Toby Chappell
--date: 10/7/19
--assignment: Assignment 2
DROP TABLE IF EXISTS Customers;
DROP TABLE IF EXISTS Customer_Address;
PRAGMA foreign_keys = ON;
--1. Create a table called Customers with the following structure:
-- Customer ID – this is a primary key
-- Customer first name
-- Customer last name
... | true |
0f9d80089019f16303aed762d2ded6b7a26e125a | SQL | rabiixx/SIW | /proyectoFinal/bd/proyecto.sql | UTF-8 | 2,208 | 2.90625 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 5.0.1
-- https://www.phpmyadmin.net/
--
-- Servidor: 127.0.0.1
-- Tiempo de generación: 21-02-2020 a las 17:53:36
-- Versión del servidor: 10.4.11-MariaDB
-- Versión de PHP: 7.4.2
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
... | true |
a465ab9c09a64831ca9f6f41d0649a5257382c6d | SQL | starisgeek/projects-all | /project-yunfenghui/yunfenghui-erp/scripts/yunfenghui-erp-goods.sql | UTF-8 | 2,412 | 3.375 | 3 | [] | no_license | CREATE DATABASE /*!32312 IF NOT EXISTS*/`yunfenghui_erp_goods` /*!40100 DEFAULT CHARACTER SET utf8 */;
USE `yunfenghui_erp_goods`;
CREATE TABLE `goods` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID',
`barcode` varchar(32) NOT NULL COMMENT '条码',
`name` varchar(64) NOT NULL COMMENT '商品名称',
... | true |
245d473546f1d63e7688b4f4e2b128f4e286e3e8 | SQL | acrylic-origami/reaction-maps | /schemas.sql | UTF-8 | 10,177 | 3.046875 | 3 | [
"BSD-3-Clause",
"ODbL-1.0"
] | permissive | --
-- PostgreSQL database dump
--
-- Dumped from database version 11.5
-- Dumped by pg_dump version 11.5
SET statement_timeout = 0;
SET lock_timeout = 0;
SET idle_in_transaction_session_timeout = 0;
SET client_encoding = 'UTF8';
SET standard_conforming_strings = on;
SELECT pg_catalog.set_config('search_path', '', fal... | true |
f0fcf8e8d533cb2ed7c7a7763b30e8ea857a5fd3 | SQL | VirGIT/MainBucket | /obsolete/(HR).Statistica venituri in 2012.sql | UTF-8 | 1,430 | 3.40625 | 3 | [] | no_license | Select
angajat.matricol angajat_matricol
, angajat.cnp
, alocang.unitier_cod||' - '||unitier.denumire compartiment
, per.denumire
, valvarang.aj_imp1
, valvarang.aj_imp2
, valvarang.aj_imp3
, valvarang.regie
, valvarang.gratificatie
FROM alocari_stat_angajat alocang
, unitati_ierarhice unitier
, perioade... | true |
512551680e0fd88a30974cd5a0c8e66cc01560a0 | SQL | iSevenDays/aiohttp-login | /aiohttp_login/pg_tables.sql | UTF-8 | 1,123 | 3.921875 | 4 | [
"ISC"
] | permissive | -- case independent text field
CREATE EXTENSION IF NOT EXISTS citext;
-- users
DROP TYPE IF EXISTS user_status CASCADE;
CREATE TYPE user_status AS ENUM (
'confirmation', 'active', 'banned');
DROP TABLE IF EXISTS users CASCADE;
CREATE TABLE users (
id serial PRIMARY KEY,
name text N... | true |
12744082719a1155dd80998f65683492edefeb2f | SQL | WeiTang1/BankApplication | /Database/test.sql | UTF-8 | 1,742 | 3.375 | 3 | [] | no_license | -- MySQL Script generated by MySQL Workbench
-- Tue Jun 27 16:01:30 2017
-- Model: New Model Version: 1.0
-- MySQL Workbench Forward Engineering
SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0;
SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0;
SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='TR... | true |
6c31c07adf62984537503fb675e6fb7581a7f74d | SQL | SteeveJ/blog_dut | /sql/2_tables.sql | UTF-8 | 1,058 | 3.53125 | 4 | [] | no_license |
-- Table tag
create table tag(
tag_id serial primary key,
name varchar(50)
);
-- table members
create table members(
mem_id serial primary key,
username varchar(60),
name varchar(60) default null,
password varchar(255),
email varchar(150),
personal_desc text default null,
created_... | true |
883e80316d474a1601def1c25a1f368ebbdceeac | SQL | niandc-developer/Chatbot-Manage | /logic/ddl/TRAINING_QUERY.ddl | UTF-8 | 317 | 2.625 | 3 | [
"Apache-2.0"
] | permissive | CREATE TABLE TRAINING_QUERY(
QUERY_ID INTEGER NOT NULL,
QUERY VARCHAR(32500) NOT NULL,
DELETE_FLAG INTEGER NOT NULL DEFAULT 0,
INSERT_USER VARCHAR(50),
INSERT_TIME TIMESTAMP DEFAULT,
UPDATE_USER VARCHAR(50),
UPDATE_TIME TIMESTAMP DEFAULT,
PRIMARY KEY (QUERY_ID)
) ORGANIZE BY ROW;
| true |
413ddadaf6b2cce4ec539af290a9de8a007419fc | SQL | silverbyte/DATABASE | /ORACLE/REGEXP_SUBSTR.SQL | UTF-8 | 1,563 | 2.921875 | 3 | [] | no_license | select REGEXP_SUBSTR ('plt hlpt ea cs', '[^ ]+', 1, 1) AS word_3 from dual;
select REGEXP_SUBSTR ('plt hlpt ea cs', '[^ ]+', 1, 2) AS word_3 from dual;
select REGEXP_SUBSTR ('plt hlpt ea cs', '[^ ]+', 1, 3) AS word_3 from dual;
select REGEXP_SUBSTR ('plt hlpt ea cs', '[^ ]+', 1, 4) AS word_3 from dual;
SE... | true |
1e6977ad24073e22a87ac65399fc3632d958aed5 | SQL | signtomonika/mysql-node | /Course/Course Activity/10 - ONE TO MANY/05 - Right Joins.sql | UTF-8 | 2,174 | 3.75 | 4 | [] | no_license | select * from customers A inner join orders B on A.id = B.customer_id;
select * from customers A right join orders B on A.id = B.customer_id;
-- same result for above 2 because we do not have any orders that do not have id in customer
/*
+------+------------+-----------+------------------+----+------------+--------+... | true |
ac16e58e445ff1aa4a5f7dc457e680c9df8d5799 | SQL | MichaelClayMoore/CSCE-4350-Final-Project | /db.sql | UTF-8 | 1,492 | 3.671875 | 4 | [] | no_license | --drop table carts
--drop table users
--drop table items
CREATE TABLE public.users
(
user_id serial,
email text COLLATE pg_catalog."default" NOT NULL,
password text COLLATE pg_catalog."default" NOT NULL,
created_on timestamp without time zone NOT NULL DEFAULT CURRENT_TIMESTAMP,
admin boolean,
C... | true |
486d97ed06ad300a4a31600ee1e54b557a6a6c96 | SQL | headbanging3/project1-1 | /project1-1/WebContent/service/service.sql | UTF-8 | 704 | 3.453125 | 3 | [] | no_license | SELECT * FROM member;
CREATE TABLE member
(
mem_num NUMBER(20) PRIMARY KEY,
id VARCHAR2(20) UNIQUE NOT NULL,
pwd VARCHAR2(20) NOT NULL,
name VARCHAR2(20) NOT NULL,
phone VARCHAR2(20) NOT NULL,
email VARCHAR2(20),
addr VARCHAR2(100),
regdate DATE
);
CREATE SEQUENCE member_seq;
--고객센터 리스트 sql (김재두)
CREATE T... | true |
db433ae87788a3c958cbc02cea50324af1895d1a | SQL | chelomox/hsem.bvcgroup.cl_rest | /handsm_bvcgroup.sql | UTF-8 | 316,877 | 2.890625 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.5.1
-- http://www.phpmyadmin.net
--
-- Servidor: 127.0.0.1
-- Tiempo de generación: 31-08-2018 a las 21:29:12
-- Versión del servidor: 10.1.13-MariaDB
-- Versión de PHP: 5.6.23
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT... | true |
2d24e2d205cfd3c0b9c09287b87305c44b143722 | SQL | wall72/JavaCoreFramework | /jcf-ui/jcf-sua-support/src/test/resources/db-script/hsql-product-db-script.sql | UHC | 1,502 | 3.71875 | 4 | [
"MIT"
] | permissive | DROP SEQUENCE SEQ_KEY IF EXISTS;
CREATE SEQUENCE SEQ_KEY start with 1005 increment by 1;
DROP TABLE PRODUCT_TYPE IF EXISTS;
CREATE TABLE PRODUCT_TYPE(
PRODUCT_TYPE_ID VARCHAR(20),
PRODUCT_TYPE_NAME VARCHAR(20),
PRODUCT_TYPE_DESCRIPTION VARCHAR(400),
UPDATED TIMESTAMP,
PRIMARY KEY(PRODUCT_TYPE_ID)
)
DROP TABLE ... | true |
d748cf05a0f0d44fd323d1ec59e3c15151546368 | SQL | diegopacheco/java-pocs | /pocs/spring-boot-2x-data-jpa-h2-sequences-custon/create.sql | UTF-8 | 182 | 2.59375 | 3 | [
"Unlicense"
] | permissive | create sequence book_schema.book_seq start with 1 increment by 50
create table book_schema.book (id varchar(255) not null, author varchar(255), title varchar(255), primary key (id))
| true |
c43787e81be848b2b7e8c94f56a857bbb331d49e | SQL | hellcy/leetcode | /Database/1677. Product's Worth Over Invoices.sql | UTF-8 | 248 | 3.484375 | 3 | [] | no_license | /* Write your T-SQL query statement below */
select a.name, sum(b.rest) as rest, sum(b.paid) as paid, sum(b.canceled) as canceled, sum(b.refunded) as refunded from Product as a inner join Invoice as b
on a.product_id = b.product_id
group by a.name | true |
b95f727d1de79ba4514a768d85a2e1acd047aedc | SQL | wangdahu/diary | /data/diary_report_record.sql | UTF-8 | 1,309 | 3.046875 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 3.5.4
-- http://www.phpmyadmin.net
--
-- 主机: localhost
-- 生成日期: 2012 年 12 月 27 日 10:01
-- 服务器版本: 5.5.24-0ubuntu0.12.04.1
-- PHP 版本: 5.3.10-1ubuntu3.4
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!... | true |
98cd31d796d58fc98d9c1763ef0cbd33554d3b73 | SQL | yeseniavr/pruebaphp2021 | /DesafioBD/desafioempleados.sql | UTF-8 | 2,528 | 3.1875 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 5.1.1
-- https://www.phpmyadmin.net/
--
-- Servidor: localhost:3307
-- Tiempo de generación: 30-06-2021 a las 15:20:07
-- Versión del servidor: 10.4.19-MariaDB
-- Versión de PHP: 8.0.7
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET ... | true |
3bf35c5bf638f1f12eef83c09117936f18b0829a | SQL | alpharol/algorithm_python3 | /leetcode/0101-0200/0181.超过经理收入的员工.sql | UTF-8 | 123 | 3.125 | 3 | [] | no_license | select l1.Name as Employee
from leetcode_0181 l1, leetcode_0181 l2
where l1.ManagerId = l2.Id and l1.Salary>l2.Salary ;
| true |
ad2c8c5aacb453ab805c41ad19dc9074ddb06387 | SQL | pedrovasco96/SIBD | /part2/queries/query1.sql | UTF-8 | 214 | 3.34375 | 3 | [] | no_license | SELECT DISTINCT A.name, P.name, A.species_name, A.age
FROM animal A, consult C, person V, person P
WHERE V.name='John Smith' AND V.VAT=C.VAT_vet AND A.VAT_owner=C.VAT_owner AND P.VAT = A.VAT_owner AND A.name = C.name;
| true |
3bd692898b276346b252f9022220d3e981ca608a | SQL | xuejl/prize | /sql/consultation_20161212.sql | UTF-8 | 10,866 | 3.15625 | 3 | [
"Apache-2.0"
] | permissive | ALTER TABLE redrain.as_shop ADD business_district_id INT(11) DEFAULT 0 NULL;
CREATE TABLE as_consultation_banner
(
consultation_banner_id INT(11) PRIMARY KEY NOT NULL AUTO_INCREMENT,
type_id INT(11) NOT NULL COMMENT '咨询类型id',
consultation_id INT(11) NOT NULL COMMENT '咨询id',
bannner_img VARCHAR(255) NOT... | true |
bfb76fe052e9bacda2cd615dfb5fac159dca5774 | SQL | MohitMotiani99/SG_Assignments | /SQLAssignment.sql | UTF-8 | 1,646 | 4.21875 | 4 | [] | no_license | -- drop table if exists stations;
create table stations(
id varchar(10) not null unique,
name varchar(50),
cc varchar(50) not null,
latitude real,
longitude real
);
insert into stations values(
'IN13',
'Pheonix',
'AZ',
33,
139
);
insert into stations values(
'IN14',
'Florida St... | true |
9f0acd6292fd064bf8a389e4103d9ad348aeefca | SQL | David-Xilo/CodingPlatforms | /HackerRank/SQL/Aggregation/JapanPopulation.sql | UTF-8 | 64 | 2.703125 | 3 | [] | no_license | select sum(c.population) from city c where countrycode = 'JPN';
| true |
3f55ab06b3687610b335a166582a3d9e44b3fa3a | SQL | Hyun0000/Study_KH | /DB_KH/scott 210813(pl_sql 정리).sql | UHC | 6,159 | 4.125 | 4 | [] | no_license | ---------------------- & & ----------------------
declare
-- 3
-- '' ݵ ġ ؾѴ.
emp_id number;
emp_name varchar2(30);
emp_empno number := 25; -- Ϻη ʱȭ κп غô.
begin
-- (:=)
emp_id := 888;
emp_name := '峲';
-- / || -->
dbms_output.put_line('emp_id : ... | true |
db2237666dafa582ba09c0a5b87a9ba822e8f0da | SQL | WilsonCastro1988/reto-kruger | /inventory-vaccination-core.sql | UTF-8 | 3,047 | 2.984375 | 3 | [] | no_license | -- vaccination.kgrt_employee definition
-- Drop table
-- DROP TABLE vaccination.kgrt_employee;
CREATE TABLE vaccination.kgrt_employee (
employeev_dni varchar(255) NOT NULL,
audid_creation_date date NULL,
audid_delete_date date NULL,
audid_modification_date date NULL,
audiv_user_creation varchar(255) NULL,
audi... | true |
084b13b919c9da99c5b7686aa65353b43e19ff0f | SQL | europass/sample-tools-java | /src/main/resources/sql/mysql.sql | UTF-8 | 6,514 | 3.5625 | 4 | [] | no_license | -- Server version: 5.1.41
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
--
-- Database: `cvxml`
--
-- --------------------------------------------------------
--
-- Table structure for table `ecv_driving_licence`
--
CREATE TABLE IF NOT EXISTS `ecv_driving_licence` (
`ID` int(10) NOT NULL AUTO_INCREMENT COMMENT 'ID',
`... | true |
8224bd3e14ed3b777abe72250dea62b6ae8864bc | SQL | rpizarrog/Taller-de-BD-MySql | /boutique/usando variables en mysql a partir de selects.sql | UTF-8 | 259 | 2.65625 | 3 | [] | no_license | # Actualizar total
-- SET SQL_SAFE_UPDATES=0; # Para actualizar varios al mismo tiempo
SET SQL_SAFE_UPDATES=0;
UPDATE tickets
SET total =
(
SELECT SUM(importe)
FROM detalletickets
WHERE tickets.folio = detalletickets.folio
);
| true |
0320a287556a58d15d342cef13d3a9b1d0425187 | SQL | jorgedemetrio/angelgirls | /com_angelgirls-v1.0.1-joomla_3.2/install/create_view_perfil.sql | UTF-8 | 5,880 | 2.75 | 3 | [
"Apache-2.0"
] | permissive |
CREATE OR REPLACE VIEW #__angelgirls_perfil (
`id`,
`tipo`,
`usuario`,
`nivel`,
`pontos`,
`token`,
`nome_completo`,
`email_principal`,
`id_usuario`,
`apelido`,
`descricao`,
`meta_descricao`,
`foto_perfil`,
`foto_adicional1`,
`foto_adicional2`,
`altura`,
`peso... | true |
b432c0f8280602fc6862b038f4d87786f64eb649 | SQL | nahomwosenu/Gym_Management_For_AMU_GYM | /amitgms.sql | UTF-8 | 8,999 | 2.859375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.2.11
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Mar 20, 2018 at 09:36 PM
-- Server version: 5.6.21
-- PHP Version: 5.6.3
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
... | true |
484c5cc9261528c1b657a08b66199b7f1aeddaac | SQL | rcarrillodev/raizen-challenge | /sensors-database/createdb.sql | UTF-8 | 528 | 3.09375 | 3 | [] | no_license | CREATE DATABASE IF NOT EXISTS sensors;
USE sensors;
DROP TABLE IF EXISTS data;
CREATE TABLE data (
data_id INT AUTO_INCREMENT PRIMARY KEY,
time TIMESTAMP NOT NULL,
power INT DEFAULT 0,
temp INT DEFAULT 0,
humidity INT DEFAULT 0,
light INT DEFAULT 0,
co2 INT DEFAULT 0,
dust DOUBLE DEFAULT 0
);
LOAD DATA INFILE ... | true |
47fdf8cbce61f7d0e08b6f8d97df3f5b89dfd737 | SQL | Arun-V-7/batman-assesment | /public/assets/sql/batman.sql | UTF-8 | 6,660 | 3.265625 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Aug 31, 2020 at 07:03 AM
-- Server version: 10.4.11-MariaDB
-- PHP Version: 7.4.4
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIEN... | true |
f431d0933486c03a0e71871323cf3440eefe1d87 | SQL | agarheim/form-register | /ln_users.sql | UTF-8 | 266 | 2.921875 | 3 | [
"LicenseRef-scancode-unknown-license-reference",
"MIT"
] | permissive | create table users
(
id int auto_increment,
name varchar(150) null,
date_birth datetime null,
email varchar(100) null,
favorite_color varchar(15) null,
constraint users_id_uindex
unique (id)
);
| true |
c5f27e4f759fee081bbf29208240760f1ab5da4a | SQL | Ultralesc/Chat_for_Matematika | /chat.sql | UTF-8 | 3,548 | 2.78125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.0.10.6
-- http://www.phpmyadmin.net
--
-- Хост: 127.0.0.1:3306
-- Время создания: Июл 15 2015 г., 21:35
-- Версия сервера: 5.5.41-log
-- Версия PHP: 5.3.29
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIE... | true |
08c7a95e69e814b52a4ffde4dfdd679bc2c82818 | SQL | pevioli/PolideportivoRPC | /CLIENTE PHP/PolideportivoRPC/procedures/TRAER_TURNO_POR_IDTURNO.sql | UTF-8 | 701 | 3.5 | 4 | [] | no_license | USE dbodbc;
DELIMITER $$
DROP PROCEDURE IF EXISTS TRAER_TURNO_POR_IDTURNO $$
CREATE PROCEDURE TRAER_TURNO_POR_IDTURNO(
_idTurno INT(11)
)
BEGIN
SELECT idTurno, turno.fechaHora, vigente, localidad.localidad, deporte.deporte, tipoCancha.tipoCancha, usuario.apellido
FROM turno
JOIN Cancha ON turno.idCancha = cancha.id... | true |
6cbdf9389f12b714cc346f7c8b9b0c6d19535e3a | SQL | nistelrooy1984/tugo_leads | /db/migrate_sql/20210507224550_create_master_lead_sources.up.sql | UTF-8 | 694 | 3.4375 | 3 | [] | no_license | CREATE TABLE master_lead_sources (
id bigserial PRIMARY KEY,
"name" varchar NOT NULL,
is_usable bool NOT NULL,
"order" int4 NOT NULL,
created_at timestamp without time zone NOT NULL,
updated_at timestamp without time zone NOT NULL
);
COMMENT ON TABLE master_lead_sources IS 'Lead Source';
-- Column c... | true |
4070de2bf65ede245a48ba519dba23cb0c745f05 | SQL | CUBRID/cubrid-testcases | /sql/_23_apricot_qa/_01_sql_extension3/_05_analytic_functions/_07_stddev_pop/cases/stddev_pop_partition_range.sql | UTF-8 | 9,858 | 2.859375 | 3 | [
"BSD-3-Clause"
] | permissive | --TEST: test with tables with range partition
create table stddev_pop_p_range(
col1 int,
col2 short,
col3 bigint,
col4 numeric(10, 5),
col5 float,
col6 double,
col7 monetary
)
partition by range(col1)
(
partition p1 values less than (30000),
partition p2 values less than (40000),
partition p3 values less tha... | true |
824a4732bb33511ce69d6e1a22457b66aee39395 | SQL | jcprice12/burger_sequelize | /seeds.sql | UTF-8 | 561 | 2.65625 | 3 | [] | no_license | USE `burger_sequelize`;
INSERT INTO `Toppings` (`nameTopping`) VALUES
("guacamole"),
("cheese"),
("bacon"),
("onions"),
("pickles"),
("mayonnaise"),
("mustard"),
("ketchup"),
("lettuce"),
("tomato");
INSERT INTO `Burgers` (`comment`) VALUES
("Medium Please"),
("Cook it however you want I guess"),
("Ehh is this optiona... | true |
2f66093736f471cf53caa9dbe311475a08036380 | SQL | melsicon/spring-data | /src/main/resources/schema.sql | UTF-8 | 330 | 3.359375 | 3 | [
"Apache-2.0"
] | permissive | DROP TABLE IF EXISTS PERSON;
CREATE TABLE PERSON
(
ID BIGINT AUTO_INCREMENT PRIMARY KEY,
GIVEN_NAME VARCHAR(255) NOT NULL,
SURNAME VARCHAR(255) DEFAULT NULL
);
CREATE TABLE EMAIL_ADDRESS
(
ADDRESS VARCHAR(255) PRIMARY KEY,
PERSON_ID BIGINT,
FOREIGN KEY (PERSON_ID) REFERENCES PERSO... | true |
b0c351f58db913e3891601178c7b92b5249d7c7e | SQL | silence-do-good/stress-test-Postgres-and-MySQL | /dump/high/day26/select0322.sql | UTF-8 | 178 | 2.640625 | 3 | [] | no_license |
SELECT timeStamp, temperature FROM ThermometerOBSERVATION o
WHERE timestamp>'2017-11-25T03:22:00Z' AND timestamp<'2017-11-26T03:22:00Z' AND temperature>=44 AND temperature<=86
| true |
46f73433ff6a387ebeb1340927954e577c9b7876 | SQL | gicadmin/allo | /PHENIX/Packages/VOAR_OPERATION_PACK.sql | UTF-8 | 1,904 | 3.171875 | 3 | [] | no_license | CREATE OR REPLACE PACKAGE phenix.VOAR_OPERATION_PACK AS
PROCEDURE PURGE_PROC(
p_cad_id IN customer_adjustment_details.cad_id%TYPE
);
PROCEDURE PURGE_PROC(
p_cod_coh_id IN customer_order_details.cod_coh_id%TYPE,
p_cod_line_number IN customer_order_details.cod_line_number%TYPE
);
PROCEDURE DELETE_VOAR_FO... | true |
de9ba04e11d553632f0953a5ab8a90658ef77c34 | SQL | jmaj-software-guild/FlashCardApp | /MySQL Files/FlashCards.sql | UTF-8 | 10,298 | 3.984375 | 4 | [] | no_license | DROP DATABASE IF EXISTS FlashCards;
CREATE DATABASE FlashCards;
USE FlashCards;
CREATE TABLE IF NOT EXISTS Category
(CategoryID SMALLINT UNSIGNED AUTO_INCREMENT,
CategoryName VARCHAR(30) NOT NULL,
CategoryDesc VARCHAR(100),
PRIMARY KEY(CategoryID)
);
CREATE TABLE IF NOT EXISTS Card
(CardID MEDIUMINT UNSIGNED AUTO_I... | true |
3208c52311faf66e99d194bbafaaf2c3fe9b4d69 | SQL | Do-Viet-Hoang/DoAn5Chating-DVH | /DataDoAn5.sql | UTF-8 | 1,314 | 3.1875 | 3 | [] | no_license | CREATE DATABASE Chating
CREATE TABLE Users
(
users_id CHAR(10)PRIMARY KEY,
users_name NVARCHAR(50) NOT NULL,
full_name NVARCHAR(250) NOT NULL,
addresss NVARCHAR(50) NOT NULL,
email NVARCHAR(250) NOT NULL,
SDT CHAR(25)NOT NULL,
friends_counter int,
active_flag int
)
CREATE TABLE MessageGroup
(
Message_group_id CHAR(10... | true |
3260ad519a6e9e5d1cbee30d4d68bf95e4a5b973 | SQL | Hamza-BenJabeur/WHAH | /schema.sql | UTF-8 | 2,058 | 2.953125 | 3 | [] | no_license | DROP DATABASE IF EXISTS eduproject;
CREATE DATABASE eduproject;
USE eduproject;
CREATE TABLE students(
id INT(4) NOT NULL PRIMARY KEY AUTO_INCREMENT,
firstname VARCHAR (50),
username VARCHAR (50) NOT NULL,
lastname VARCHAR (50) ,
secretinfo VARCHAR (150) NOT NULL,
password VARCHAR (250) NOT NULL... | true |
eae42b74c6a49dfb9a331c6022ccabe409febc5d | SQL | rahmattobi/depok | /depok.sql | UTF-8 | 12,520 | 3.15625 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | -- phpMyAdmin SQL Dump
-- version 4.7.9
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Waktu pembuatan: 05 Apr 2021 pada 16.31
-- Versi server: 10.1.31-MariaDB
-- Versi PHP: 7.2.3
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARA... | true |
1da019c0a54beb34b71b6214a2daeb525caef0a5 | SQL | lbjhuang/mysql_test | /sql/select.sql | UTF-8 | 2,792 | 4.28125 | 4 | [] | no_license | use company;
select empno, ename, job, MGR, Hiredate, sal from t_employee;
select job from t_employee;
select distinct job from t_employee;
select ename, sal*12 from t_employee; /*四则运算*/
select ename, sal*12 as yearSalary from t_employee; /*取别名*/
select concat(ename, '雇员的年薪是:' sal*12) yearSalary from t_employee;
... | true |
83d2e95c54c8a245e9d6bf040c56f47c2a56e282 | SQL | andrewpprine/project_flashcards | /db/schema.sql | UTF-8 | 271 | 2.828125 | 3 | [] | no_license | DROP DATABASE IF EXISTS flashcards_db;
CREATE DATABASE flashcards_db;
USE flashcards_db;
CREATE TABLE flashcards(
id INT NOT NULL AUTO_INCREMENT,
topic VARCHAR(50) NOT NULL,
question VARCHAR(255) NOT NULL,
answer VARCHAR(255) NOT NULL,
PRIMARY KEY (id)
); | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.