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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
32cb1b018fd4af3b79708bf3a2b316115e14efff | SQL | cusfrank/HelpDesk_PERN_Stack | /server/database.sql | UTF-8 | 419 | 2.609375 | 3 | [] | no_license | CREATE DATABASE HelpDesk_PERN_Stack;
CREATE TABLE admin(
id SERIAL PRIMARY KEY,
name TEXT NOT NULL,
email TEXT NOT NULL UNIQUE,
password TEXT NOT NULL
);
CREATE TABLE customer(
id SERIAL PRIMARY KEY,
ticket_code VARCHAR(8) NOT NULL UNIQUE
);
CREATE TABLE chat_log(
id SERIAL PRIMARY KEY,
id_customer I... | true |
65c48dcfc31d18f48b9c2a5aa4f50f73569bac48 | SQL | djw8605/Gratia | /admin-util/site-cleanup/site-cleanup-sql/Site_delete.sql | UTF-8 | 406 | 3.265625 | 3 | [] | no_license |
\! echo "-- ========================================================"
\! echo "-- Site table DELETE statements (unused ones)"
\! echo "-- ============================================================"
SELECT
CONCAT("DELETE FROM Site WHERE siteid = ", a.siteid ,";")
as delete_sql
FROM
( SELECT siteid FROM Site... | true |
03fa0af10a96bbf4619d3bdb3f4854c0a23d36de | SQL | hortonworks/registry | /bootstrap/sql/oracle/v009__create_registry_audit.sql | UTF-8 | 1,524 | 3.625 | 4 | [
"Apache-2.0",
"GPL-3.0-or-later",
"EPL-1.0",
"Classpath-exception-2.0",
"LGPL-2.0-or-later",
"LicenseRef-scancode-generic-exception",
"BSD-3-Clause",
"Apache-1.0",
"LicenseRef-scancode-warranty-disclaimer",
"LicenseRef-scancode-proprietary-license",
"LicenseRef-scancode-oracle-openjdk-exception-... | permissive | -- Copyright 2018-2021 Cloudera, Inc.;
-- ;
-- 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... | true |
4daa2395ff2c1cd4ee25111c96312d393f2d3074 | SQL | nuannuanwu/qtxiaoxin | /protected/data/procedure/xiaoxin/php_xiaoxin_getNewsMessage.sql | UTF-8 | 692 | 3.21875 | 3 | [] | no_license | DELIMITER $$
USE `xiaoxin`$$
DROP PROCEDURE IF EXISTS `php_xiaoxin_getNewsMessage`$$
CREATE DEFINER=`dbManager`@`%` PROCEDURE `php_xiaoxin_getNewsMessage`(uid BIGINT,n INT,identity INT)
BEGIN
DECLARE sqltext VARCHAR(1000);
IF identity=1 THEN
SET sqltext=CONCAT(" select tb_notice_message.* from tb_notice_mes... | true |
cb08a9566b6aa84e026fbdd5401d4d6be4464385 | SQL | Taami23/reservaHotelera | /src/main/resources/db/initDB.sql | UTF-8 | 1,440 | 3.609375 | 4 | [] | no_license | DROP TABLE Cliente IF EXISTS;
DROP TABLE Reserva IF EXISTS;
DROP TABLE Habitacion IF EXISTS;
DROP TABLE Hotel IF EXISTS;
CREATE TABLE Cliente (
idCliente INTEGER IDENTITY PRIMARY KEY,
nombre VARCHAR(50),
rut VARCHAR(9),
fechaNacimiento DATE,
telefono VARCHAR(11),
correoElect... | true |
5567d0b6e35e8cb7b21abf3ec00ce5cf57705d6f | SQL | ntuifranklin/shop4all-web.net- | /sql/autresTable.sql | UTF-8 | 2,343 | 3.703125 | 4 | [] | no_license | SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT=0;
START TRANSACTION;
DROP TABLE IF EXISTS `connected`;
CREATE TABLE IF NOT EXISTS `connected` (
`id` bigint(10) NOT NULL AUTO_INCREMENT,
`macaddr` varchar(16) DEFAULT NULL,
`datec` datetime DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=la... | true |
ab017dd006bbfa6d33992a0f37312de60842d737 | SQL | josepitteloud/VESPA | /regular_reports/sky_view_dialback/Sky View Dialback 02 - check progress, manual QA.sql | UTF-8 | 1,903 | 3.140625 | 3 | [] | no_license | /******************************************************************************
**
** Sky View panel: Dialback Report
** - Results Extraction
**
** Following the weekly refresh script ("Sky View Dialback 01 - build reports.sql")
** you run all of these guys manually and it gives you the outputs. See ei... | true |
cf3c84179224b88caea0b6a724e0245105479348 | SQL | kulsxyz7/MySql | /section_four/min_max.sql | UTF-8 | 875 | 3.28125 | 3 | [] | no_license | CODE: MIN and MAX Basics
SELECT MIN(released_year)
FROM books;
SELECT MIN(released_year) FROM books;
SELECT MIN(pages) FROM books;
SELECT MAX(pages)
FROM books;
SELECT MAX(released_year)
FROM books;
SELECT MAX(pages), title
FROM books;
CODE... | true |
c060b6703a2fbbce9a3d8b576c4d13a2fe79130c | SQL | genostack/trans-annot-notebook | /config/sqlite_database_schema.sql | UTF-8 | 5,365 | 3.5 | 4 | [
"LicenseRef-scancode-public-domain"
] | permissive | PRAGMA synchronous = OFF;
PRAGMA journal_mode = MEMORY;
BEGIN TRANSACTION;
CREATE TABLE `bioprojects` (
`id` INTEGER PRIMARY KEY AUTOINCREMENT,
`path` varchar(255) NOT NULL
);
CREATE TABLE `blastx` (
`id` INTEGER PRIMARY KEY AUTOINCREMENT,
`slen` int(11) DEFAULT NULL,
`qstart` int(11) DEFAULT NULL,
`qend... | true |
cc1b1890dca17d8bc8dfcb33d3ce651cd9817504 | SQL | 17alejandrog/proyecto | /Transito.sql | ISO-8859-1 | 28,892 | 3 | 3 | [] | no_license | -- Generado por Oracle SQL Developer Data Modeler 17.4.0.355.2131
-- en: 2018-05-08 16:31:54 COT
-- sitio: Oracle Database 11g
-- tipo: Oracle Database 11g
CREATE TABLE accidente (
fecha DATE NOT NULL,
croquis BLOB NOT NULL,
... | true |
ed5ac7c3fd5fe3fa3d2cc1881d7076b08a4025b6 | SQL | JohnLBevan/EdinburghFringe | /WebApplication/Database/dbo/Stored Procedures/sp_GetSingleSupplementaryInfoById.sql | UTF-8 | 205 | 2.765625 | 3 | [
"MIT"
] | permissive | create procedure sp_GetSingleSupplementaryInfoById (@Id as bigint)
as
begin
set nocount on
select top 1 Id, SupplementaryInfoTypeId, Value
from SupplementaryInfo
where Id = @Id
option (fast 1)
end | true |
0c126f62804848cf8ea960a5ee975a7804dd5ee5 | SQL | YovkoGospodinov/TelerikAcademy | /Databases/Exercise - Intro to SQL/SolutionQuery.sql | WINDOWS-1250 | 4,493 | 4.5625 | 5 | [] | no_license | --04. find all information about all departments
SELECT *
FROM Departments
--05. find all department names
SELECT Name
FROM Departments
--06. find the salary of each employee
SELECT FirstName,
LastName,
Salary
FROM Employees
--07. find the full name of each employee
SELECT FirstName + ' ' + LastName AS [F... | true |
f13999ff2910caf577e42d0fabe3880e61c4cf7f | SQL | xiangli2341/ml_DataBase_test | /01(A).sql | UTF-8 | 3,151 | 3.578125 | 4 | [] | no_license | /*
SQLyog 企业版 - MySQL GUI v8.14
MySQL - 5.5.15 : Database - test
*********************************************************************
*/
/*!40101 SET NAMES utf8 */;
CREATE DATABASE /*!32312 IF NOT EXISTS*/`test` /*!40100 DEFAULT CHARACTER SET latin1 */;
USE `test`;
# 用户表
/*Table structure for ... | true |
1d696a12e4aa69e136b1143ef437a92e163aafea | SQL | mrlima49/caixa-eletronico | /caixa_eletronico.sql | UTF-8 | 2,704 | 3.28125 | 3 | [] | no_license | -- --------------------------------------------------------
-- Servidor: localhost
-- Versão do servidor: 5.7.24 - MySQL Community Server (GPL)
-- OS do Servidor: Win64
-- HeidiSQL Versão: 10.2.0.5599
-- --------------------------------------------------------
/... | true |
1d8406d21a5dcff8047bf1d2a2bd91ca15657e01 | SQL | BegonaAramburu/modelatge_BBDD | /cul_dampolla.sql | UTF-8 | 8,459 | 3.28125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.9.0.1
-- https://www.phpmyadmin.net/
--
-- Servidor: 127.0.0.1
-- Tiempo de generación: 16-07-2019 a las 10:50:48
-- Versión del servidor: 10.3.16-MariaDB
-- Versión de PHP: 7.3.6
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00"... | true |
be5bb0dfa26d5d544ac66dfd4380b2a22bc02b02 | SQL | LaithGHnemat/maintaining | /src/main/resources/data.sql | UTF-8 | 3,749 | 3.078125 | 3 | [] | no_license | insert into cars_tabel (car_color, car_model, car_status, convertible, date_created, engine_type, license_plate,
manufacturer, rating, seat_count)
VALUES ('Green', 'Accord', 'MAP', true, '2021-09-11 06:10:35.000000', 'GAS', 'JORZ84bu', 'Honda', 4.4, 4);
insert into cars_tabel (car_id, car_color... | true |
c5d47d3f24ac546419e10ff15c0775f00907f803 | SQL | lucasliet/POO | /Aula08/Dojo/criar_tabelas.sql | UTF-8 | 849 | 3.90625 | 4 | [] | no_license | DROP DATABASE tutorial;
CREATE DATABASE tutorial;
USE tutorial;
CREATE TABLE cliente (
id SMALLINT UNSIGNED NOT NULL,
nome VARCHAR(60) NOT NULL,
fone CHAR(10),
PRIMARY KEY (id)
) ENGINE = InnoDB;
CREATE TABLE pedido (
id SMALLINT UNSIGNED NOT NULL,
data DATE NOT NULL,
valor NU... | true |
d02546b2209112a070da7a0bd827d06db477f348 | SQL | KarmaScripter/BudgetExecution | /Data/Database/Access/DataModels/SELECT/SelectYearOverYearAnalysis.sql | UTF-8 | 1,332 | 3.40625 | 3 | [
"MIT"
] | permissive | SELECT Allocations.PrcId AS PrcId, Allocations.BFY AS BFY, Allocations.AhCode AS AhCode, Allocations.FundCode AS FundCode, Allocations.FundName, Allocations.BocCode AS BocCode, Allocations.BocName AS BocName, Allocations.OrgCode AS OrgCode, Allocations.AccountCode AS AccountCode, Allocations.ActivityCode AS ActivityCod... | true |
4f198a824ef64a56ce4eb3362c3c81d71ba271fa | SQL | l-bevc/Internship-5-Northwind | /SQLQuery2.sql | WINDOWS-1250 | 2,573 | 3.875 | 4 | [] | no_license | --BAZA PODATAKA ZA BANKU
CREATE TABLE Titule(
ID INT IDENTITY(1,1),
Titula nvarchar(50)
)
INSERT INTO Titule
(Titula)
VALUES
('Direktor'),('Potpredsjednik'),('Investicijski suradnik'),(N'Investicijski analitiar')
SELECT * FROM Titule
CREATE TABLE Korisnici(
ID INT IDENTITY(1,1),
Ime nvarchar(25),
Prezime nvarcha... | true |
c06c41f27e915567499c3993f8eab8ffb4d9895a | SQL | hqottsz/MXI | /assetmanagement-database/src/upgrade/plsql/lib/liquibase/11/0/0/0/sql/OPER-23977.sql | UTF-8 | 4,928 | 3.1875 | 3 | [] | no_license | --liquibase formatted sql
--changeSet OPER-23977:1 stripComments:false endDelimiter:\n\s*/\s*\n|\n\s*/\s*$
create or replace procedure convertAcEvents(aFilterEventDbId IN NUMBER, aFilterBeginEventId IN NUMBER, aFilterEndEventId IN NUMBER, aReturn OUT NUMBER) IS
CURSOR lcur_EvtEvent(cn_FilterEventDbId NUMBER, cn_Fi... | true |
1de5e9e533769772c9ea78fb70268f123784a543 | SQL | lsom11/coding-challenges | /codewars/sql/SQL Basics: Group by Day.sql | UTF-8 | 136 | 2.796875 | 3 | [] | no_license | SELECT created_at::date as day, description, count(name)
FROM events
WHERE name = 'trained'
GROUP BY day, description
ORDER BY day | true |
f2a37b8493fbaf127785ca6c366edd1279f70b51 | SQL | codekeyur/sql | /SQL Hands-On/inner_join.sql | UTF-8 | 241 | 3.046875 | 3 | [] | no_license | USE sql_invoicing;
SELECT payment_id, c.name AS client_name, c.state,amount,date,pm.name AS payment_type FROM payments p
JOIN clients c
ON p.client_id = c.client_id
JOIN payment_methods pm
ON p.payment_method = pm.payment_method_id | true |
a77038d9555487fedaa723414bf5a99510de2922 | SQL | lahirumadushanka/StudentPerformance | /ETLModel/Queries/queries/distinctTest_Preparation_Course.sql | UTF-8 | 797 | 3.34375 | 3 | [] | no_license | SELECT DISTINCT[Test_Preparation_Course]
FROM [StudentPerformance].[StudentPerformance].[Source_Data_Staging]
ORDER BY [Test_Preparation_Course] ASC;
SELECT * FROM StudentPerformance.StudentPerformance.DimTest_Preparation_Course;
UPDATE StudentPerformance.StudentPerformance.Source_Data_Staging
SET StudentPerformance.... | true |
385e9fe418c48e017b57cdd739cb158a9878235f | SQL | SHKShuvo/Bus-Management-Java | /bus.sql | UTF-8 | 8,187 | 3.109375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.6.5.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Dec 13, 2018 at 04:03 PM
-- Server version: 10.1.21-MariaDB
-- PHP Version: 5.6.30
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SE... | true |
378e921eb5d690060905c3c55121f45b68fa84ec | SQL | Anand27git/Employee_payroll_serviceDB | /Employee_payroll_service.sql | UTF-8 | 12,488 | 3.96875 | 4 | [] | no_license | /* Welcome to Employee_payroll_services */
/*UC-1 creation of database */
mysql> CREATE database employee_payroll_service;
Query OK, 1 row affected (0.18 sec)
mysql> show databases;
+--------------------------+
| Database |
+--------------------------+
| address_book |
| classicmodels ... | true |
2617324ae19f9f1fb047a30bdbb92569e40a95a2 | SQL | 631137742/shnnnn | /server/shnnnn.sql | UTF-8 | 4,789 | 3.15625 | 3 | [] | no_license | SET NAMES UTF8;
DROP DATABASE IF EXISTS shnnnn;
CREATE DATABASE shnnnn CHARSET=UTF8;
USE shnnnn;
#创建用户登录表
#用户登录密码需要加密保存使用 MySQL自带函数md5()
CREATE TABLE shn_login(
id INT PRIMARY KEY AUTO_INCREMENT,
uname VARCHAR(25),
upwd VARCHAR(32)
);
#理解:用户输入123对用户输入内容加密
#加密后与数据密码比较
#SELECT id FROM boy_login
#WHERE uname = ? AN... | true |
998ec6c85c844ddd6614c877164fa8110c964b2f | SQL | youngdon95/start_over | /patientAllergy procedure.sql | UTF-8 | 293 | 3.125 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | DELIMITER //
CREATE PROCEDURE diagnosisDate(IN firstname varchar(50), IN lastname varchar(50))
BEGIN
Select allergy from patientAllergy JOIN patient ON patient.PID = patientAllergy.PID where
fname = firstname AND lname = lastname;
END//
DELIMITER ; | true |
9406f69685a40a142a6482450202ed6b49ddd5e1 | SQL | zakolm/Database | /lab_02/sql_querys/8.sql | UTF-8 | 137 | 3.3125 | 3 | [] | no_license | SELECT Street,
(
SELECT AreaName
FROM EcologyDB.dbo.area
WHERE Id = T.Area
) AS [Area Name]
FROM EcologyDB.dbo.trashbasket T | true |
3a31fb0a79c597664a2fb7db12a3cbeb53c3b6cc | SQL | marcosd94/trabajo | /pases/092/create_ControlRemuneracionesTmp.sql | UTF-8 | 898 | 3.15625 | 3 | [] | no_license | -- Table: remuneracion.control_remuneraciones_tmp
CREATE TABLE remuneracion.control_remuneraciones_tmp
(
id_control_remuneracion_tmp bigserial NOT NULL,
anho integer,
mes integer,
id_configuracion_uo bigint,
cant_lineas integer,
ultima_linea_procesada integer,
fecha_update timestamp without time zone,
... | true |
fb3f516985fc9fcb06308ebf88f6a6d5554a88c6 | SQL | carryegaulin31/garbage-pail-api | /garbagePail.sql | UTF-8 | 8,854 | 2.609375 | 3 | [] | no_license | CREATE DATABASE GarbagePail;
USE kids;
CREATE TABLE kids(
id INT auto_increment,
name VARCHAR(255),
series INTEGER,
releaseDate INTEGER,
cardNumber INTEGER,
aOrB ENUM('A', 'B')
createdAt DATETIME DEFAULT NOW(),
updateAt DATETIME DEFAULT NOW() ON UPDATE NOW(),
deletedAt DATETIME,
primary key(id)
... | true |
30bfc21d7a69cc67ddbbf0dc9ff5352936f77eee | SQL | samtalks/grouplab | /10-03_labs/kickstarter_hw/setup.sql | UTF-8 | 1,916 | 3.125 | 3 | [] | no_license | CREATE TABLE projects (
id INTEGER PRIMARY KEY,
title TEXT,
category TEXT,
funding_goal INTEGER,
start_date TEXT,
end_date TEXT
);
CREATE TABLE users (
id INTEGER PRIMARY KEY,
name TEXT,
age INTEGER
);
CREATE TABLE pledges (
id INTEGER PRIMARY KEY,
user_id INTEGER,
project_id INTEGER,
amou... | true |
b26ac51a3b9a1f8bc29df98f38b5b072fc276f8f | SQL | itsBravo6/DatabaseSystems | /Labtasks/ThemePark Script.sql | UTF-8 | 8,819 | 3.671875 | 4 | [
"MIT"
] | permissive | DROP TABLE SALES_LINE;
DROP TABLE SALES;
DROP TABLE HOURS;
DROP TABLE ATTRACTION;
DROP TABLE TICKET;
DROP TABLE EMPLOYEE;
DROP TABLE THEMEPARK;
CREATE TABLE THEMEPARK (
PARK_CODE VARCHAR(10) NOT NULL PRIMARY KEY,
PARK_NAME VARCHAR(35) NOT NULL,
PARK_CITY VARCHAR(50) NOT NULL,
PARK_COUNTRY CHAR(2) NOT NULL);
CREATE TA... | true |
5886daed3c93b403934933ace88a6c89b330c987 | SQL | silence-do-good/stress-test-Postgres-and-MySQL | /dump/low/day27/select1120.sql | UTF-8 | 191 | 2.703125 | 3 | [] | no_license |
SELECT timeStamp, temperature
FROM ThermometerObservation
WHERE timestamp>'2017-11-26T11:20:00Z' AND timestamp<'2017-11-27T11:20:00Z' AND SENSOR_ID='37b039b0_b619_4601_bbb6_1e4a38efe1a7'
| true |
19be58e82322a8aa8145710baafb9dfddad402ef | SQL | CodecoolBPoop/oop-java-codecool-shop-b-and-b | /src/main/sql/init_db.sql | UTF-8 | 2,493 | 3.765625 | 4 | [] | no_license | ALTER TABLE "order" DROP CONSTRAINT IF EXISTS "Order_fk0";
ALTER TABLE lineItems DROP CONSTRAINT IF EXISTS "LineItems_fk0";
ALTER TABLE lineItems DROP CONSTRAINT IF EXISTS "LineItems_fk1";
ALTER TABLE products DROP CONSTRAINT IF EXISTS "Products_fk0";
ALTER TABLE products DROP CONSTRAINT IF EXISTS "Products_fk1";
... | true |
702aa50ca3d26257a2f44972022633bd9ea9d46a | SQL | frafac-JumpStart/jumpstart-5.2.4.0 | /tools/substitutes/initial_data.sql | UTF-8 | 2,099 | 2.765625 | 3 | [
"LicenseRef-scancode-warranty-disclaimer"
] | no_license | -- ------------------------------------------------------------------------------------------------------------
-- INITIAL DATA FOR JUMPSTART
-- ------------------------------------------------------------------------------------------------------------
-- users
delete from UserRole;
delete from Role;
delete from Use... | true |
9bb31ccb6a80456ac77793e3fabe5b98603bf074 | SQL | kuvichkamaksim/kpi_labs | /ThirdYear/DataBases/FirstYear/Lab5/КувічкаМЄ_лаб5.sql | UTF-8 | 2,580 | 4.1875 | 4 | [] | no_license | /* Створити базу даних з ім’ям, що відповідає вашому прізвищу англійською мовою. */
CREATE DATABASE Kuvichka;
/* Створити в новій базі таблицю Student з атрибутами StudentId, SecondName, FirstName, Sex. Обрати для них оптимальний тип даних в вашій СУБД. */
CREATE TABLE Student (
StudentId INT NOT NULL,
SecondName ... | true |
d20f0903de64746b00f79fbf643a60090e2fea2b | SQL | mmadala95/db2 | /src/Assignment3/createindexes.sql | UTF-8 | 638 | 3.15625 | 3 | [] | no_license | drop index cse532.facilityidx;
drop index cse532.zipidx;
drop index cse532.facility_index;
drop index cse532.us_index;
drop index cse532.zip_index;
create index cse532.facilityidx on cse532.facility(geolocation) extend using db2gse.spatial_index(0.85, 2, 5);
create index cse532.zipidx on cse532.uszip(shape) extend usi... | true |
8b59281fb4d0970ae8ac277cc1d08888fa998ea2 | SQL | panawe/edu | /src/scripts/CLEANUP_DB.SQL | UTF-8 | 1,422 | 2.546875 | 3 | [] | no_license | DELETE FROM AVERAGES;
DELETE FROM BULLETIN;
DELETE FROM RECEIVER;
DELETE FROM CORRESPONDANCE;
DELETE FROM COURSE_HISTORY;
DELETE FROM CURRICULUM_PROGRESS;
DELETE FROM CURRICULUM;
DELETE FROM EXAM_TIMETABLE;
DELETE FROM EXAMPTION;
DELETE FROM FILES;
DELETE FROM FURNITURE;
DELETE FROM MARK;
DELETE FROM EXAM;
... | true |
3dec7969dd39523a7943f1b93647c5b66c247144 | SQL | CUBRID/cubrid-testcases | /sql/_17_sql_extension2/_02_full_test/_06_string_functions/_05_elt/cases/elt_002.sql | UTF-8 | 623 | 2.84375 | 3 | [
"BSD-3-Clause"
] | permissive | --test all kinds of string types for the 2nd and more parameters
create table soo(
col1 char(26),
col2 varchar(25),
col3 nchar(29),
col4 nchar varying(30),
col5 string
);
insert into soo values ('aaa,', 'bbb,', n'ccc,', n'ddd,', 'eee,');
select elt(1, col1, col2, col3, col4, col5) from soo;
select elt(2, col... | true |
d22e6afdb4f4e922fa6e92c1c1f403a7e17fa94a | SQL | wildflower/SCMTurboCharge | /champion_day_nite_0 consumptions for a tariff.sql | UTF-8 | 956 | 3.078125 | 3 | [] | no_license | SELECT
champion_registry.icp,
champion_eiep1.reportmonth,
champion_eiep1.units,
champion_eiep1.status,
champion_eiep1.retailer,
metercontact,
champion_eiep1.pricecode,
meterregister,
champion_eiep1.fixedvariable,
champion_eiep1.pricerate,
champion_eiep1.charge,
champion_... | true |
c37dc4bad1202013baaa01c46102ed1a46858245 | SQL | scionaltera/agony-engine | /src/main/resources/db/migration/V0006__map_schema.sql | UTF-8 | 185 | 2.546875 | 3 | [
"LicenseRef-scancode-free-unknown",
"MIT"
] | permissive | CREATE TABLE game_map (
id BINARY(16) NOT NULL,
width INTEGER NOT NULL,
tiles BLOB NOT NULL,
PRIMARY KEY (id)
) ENGINE=InnoDB CHARACTER SET=utf8mb4, COLLATE=utf8mb4_unicode_ci;
| true |
1d0fa4dc303a319976a9e30885d8963008d58461 | SQL | 6638112/mps-1 | /doc/文档/5.产品发布/war包/V1.3.1-20180104-001/数据库表结构变更/jeesite_table-v16.0-2017.12.08_01(hyh).sql | GB18030 | 22,080 | 2.578125 | 3 | [
"Apache-2.0"
] | permissive |
drop table if exists biz_project_progress_summary_data;
create table biz_project_progress_summary_data
(
id int(11) not null auto_increment,
order_id int(11) not null comment 'id',
customer_accept_delay_days varchar(10) comment 'ͻϿ',
is_actual_startwork_customer_signature va... | true |
c3af83d133d750e7c2a34e7ea424e5bba7b05803 | SQL | cseshahriar/attendance-and-payroll-system | /app/models/payrollsys.sql | UTF-8 | 10,670 | 3.203125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.6.6deb5
-- https://www.phpmyadmin.net/
--
-- Host: localhost:3306
-- Generation Time: Feb 21, 2019 at 10:29 AM
-- 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 |
3e57645ea2daca9ac9e05d33a4eae333b0f3f6a2 | SQL | zx80/pg_comparator | /casts_test.sql | UTF-8 | 1,130 | 3.375 | 3 | [
"BSD-3-Clause"
] | permissive | -- test bit and varbit to bytea
-- 80
SELECT
(VARBIT '1')::BYTEA,
(BIT '1')::BYTEA,
(VARBIT '1000')::BYTEA,
(BIT '1000')::BYTEA,
(VARBIT '10000000')::BYTEA,
(BIT '10000000')::BYTEA;
SELECT
(VARBIT '0100001101000001010011')::BYTEA AS "CAL",
(VARBIT '0101011')::BYTEA AS "V",
(VARBIT '010010010100... | true |
6dfc47fbf5e3063b0a3b000b428d474ff555d4ce | SQL | jayasptl/silex | /silex_api_demo/guestbook.sql | UTF-8 | 1,809 | 2.9375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.5.1
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Sep 01, 2017 at 03:39 AM
-- Server version: 10.1.16-MariaDB
-- PHP Version: 7.0.9
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLI... | true |
04733a91924f615fa3c0912f67180bffa4434bd1 | SQL | scottpreston/archive | /phpframework-book/ch2/data.sql | UTF-8 | 656 | 3 | 3 | [] | no_license | CREATE TABLE IF NOT EXISTS `contactlog` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(100) NOT NULL,
`email` varchar(255) NOT NULL,
`comments` mediumtext NOT NULL,
`thetime` datetime NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=ascii AUTO_INCREMENT=1;
CREATE TABLE IF NOT EXISTS `p... | true |
f73b6003da93a09b5b7c0c28b5ce30b9f46d7c8a | SQL | MateusDosSantos2001/ProjetoLoja | /QueryProjeto.sql | UTF-8 | 1,157 | 3.125 | 3 | [
"MIT"
] | permissive | CREATE TABLE JOGOS (
Id INT AUTO_INCREMENT,
Nome VARCHAR(64),
Gênero VARCHAR(64),
Data_de_lançamento DATE,
Descrição VARCHAR(1024),
Avaliação DOUBLE,
Preço DOUBLE,
PRIMARY KEY(Id)
);
INSERT INTO JOGOS VALUES (1, 'Detroit: Become Human', 'Aventura de ação, Mundo aberto, Terceira pessoa', '2018-04-24', 'Inspirado no c... | true |
ea33d76ca895ed76e0f39b87d22cc4465ccc313e | SQL | pgoldtho/visulate | /code/database/public_records/volusia/vol_tables.sql | UTF-8 | 1,548 | 3.28125 | 3 | [] | no_license | drop table vol_properties purge;
drop table vol_sqft purge;
drop table vol_sales purge;
create table vol_properties
( source_pk number
, owner_name varchar2(128)
, address1 varchar2(60)
, address2 varchar2(60)
, city varchar2(60)
, zipcode ... | true |
d04418661e84440d25901aa6b3f7316c6f5cd493 | SQL | epiii/sister | /shared/db/@tables/hrd_statuskaryawan.sql | UTF-8 | 594 | 2.59375 | 3 | [] | no_license | # Host: localhost (Version: 5.6.20)
# Date: 2015-01-28 15:26:55
# Generator: MySQL-Front 5.3 (Build 4.187)
/*!40101 SET NAMES latin1 */;
#
# Structure for table "hrd_statuskaryawan"
#
DROP TABLE IF EXISTS `hrd_statuskaryawan`;
CREATE TABLE `hrd_statuskaryawan` (
`id` int(3) NOT NULL AUTO_INCREMENT,
`nama` varc... | true |
214a9cc0525d41fd863755f0c95760fcedf2d539 | SQL | DirPos/javaweb | /seckill/src/main/sql/schema.sql | UTF-8 | 2,069 | 3.828125 | 4 | [
"Apache-2.0"
] | permissive | -- 数据库初始化脚本
-- 创建数据库
CREATE DATABASE seckill;
-- 使用数据库
USE seckill;
-- 创建秒杀库存表
CREATE TABLE seckill(
`seckill_id` BIGINT NOT NULL AUTO_INCREMENT COMMENT '商品库存id',
`name` VARCHAR(120) NOT NULL COMMENT '商品名称',
`number` INT NOT NULL COMMENT '库存数量',
`start_time` DATETIME NOT NULL COMMENT '秒杀开启时间',
`end_time` ... | true |
0e2f931c1a4da65539e4a6e2c776aa84e4469085 | SQL | dssg/mexico-public | /pre-processing/data_cleaning/ssa_hopitals/calculate_distances_ssa_maternal_data.sql | UTF-8 | 1,452 | 4.0625 | 4 | [] | no_license | /***********
This script calculates distances between hopitals to residence of individuals using maternal data (Secretaria de Salud hospital data known as (SAEH)) for indiviual-level modeling!
input tables are:
layla.saeh_maternal_10_13
categories (cat_saeh_13)
clues_data
localities
The ouput is stored as:
layla.... | true |
2f5d94f5d71e8ac745eced3db56e0526870e8cf0 | SQL | BianchiniG/TransaccionesDistribuidasConJTA | /creaciontabla_german.sql | UTF-8 | 1,105 | 3.625 | 4 | [] | no_license | --DROP TABLE cuentas
create role german LOGIN password 'german'
CREATE TABLE cuentas (
id integer NOT NULL,
titular character(20) NOT NULL,
fecha_creacion timestamp with time zone DEFAULT now()
bloqueada boolean,
saldo integer CONSTRAINT CHK_saldo CHECK (saldo>=0)
);
ALTER TABLE public.cuentas OW... | true |
caded1d0caddbc7a9517fd809c4148046b60fceb | SQL | lanaflon-cda2/B4W | /Bid4WinEntity/database/BID4WIN_DB.BID4WIN/UPGRADE_2_V_1_0_0/TABLE_NORMAL_BID.SQL | ISO-8859-1 | 1,878 | 3.8125 | 4 | [] | no_license | -- Cration de la table NORMAL_BID
CREATE TABLE `NORMAL_BID`
(
-- Dfinition des champs de la table NORMAL_BID
`ID` int(10) NOT NULL AUTO_INCREMENT COMMENT 'Identifiant de l enchere normale',
`VERSION` int(3) NOT NULL COMMENT 'Version de l enchere normale',
`CREATE_DAT... | true |
6fb878ff6773f8ad05082b14daef38fd7f1eebac | SQL | esarqasmi/creativezone | /db/bookings.sql | UTF-8 | 1,797 | 3.03125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.9.7
-- https://www.phpmyadmin.net/
--
-- Host: localhost:3306
-- Generation Time: Jul 04, 2021 at 10:25 PM
-- Server version: 10.3.30-MariaDB
-- PHP Version: 7.3.28
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SE... | true |
f9a6c1b5943d23702d8b5c0d1ece2b7eb06dbe0f | SQL | mariludobrescu/REST-API-NodeJS-Sequelize-ORM-Babel-PostgreSQL | /sql/db.sql | UTF-8 | 1,250 | 3.3125 | 3 | [
"MIT"
] | permissive | CREATE DATABASE node_postgresql_rest_api;
CREATE TABLE IF NOT EXISTS projects(
id SERIAL PRIMARY KEY,
name TEXT NOT NULL CHECK (name <> ''),
priority INTEGER NOT NULL,
description TEXT,
deliveryday DATE NOT NULL
);
CREATE TABLE IF NOT EXISTS tasks(
id SERIAL PRIMARY KEY,
name TEXT NOT NULL CHECK (name <... | true |
f8f2eb0b0096dad78a92a07b0a2ef4f1e90362d2 | SQL | mjmanoj/data-act-broker-backend | /dataactvalidator/config/sqlrules/a22_appropriations.sql | UTF-8 | 481 | 3.578125 | 4 | [
"CC0-1.0"
] | permissive | SELECT
approp.row_number,
approp.obligations_incurred_total_cpe,
sf.amount as sf_133_amount
FROM appropriation as approp
INNER JOIN sf_133 as sf ON approp.tas = sf.tas
INNER JOIN submission as sub ON approp.submission_id = sub.submission_id AND
sf.period = sub.reporting_fiscal_period AND
... | true |
58f0a96405cf0cf08392770ad8b2013cc71dde18 | SQL | pgarello/inmobiliaria | /script/tablas/contrato_actor.sql | ISO-8859-1 | 2,071 | 3.546875 | 4 | [] | no_license | -- Tabla: contrato_actor
-- Representa como participa una persona/entidad en un contrato
-- Pueden ser como: INQUILINO 1
-- PROPIETARIO 2
-- GARANTE
--
-- Le agregamos fecha de baja, si un propietario cambia entonces le ponemos fecha de baja
-- y damos de alta un nuevo propietario con fecha_baja en nulo ...... | true |
ae80227e2ca75d983dd158578aabc6fddb06cf10 | SQL | Floles/p2luth | /luthnode/luthier.sql | UTF-8 | 2,095 | 3.5 | 4 | [] | no_license | -- MySQL Script generated by MySQL Workbench
-- mar. 31 oct. 2017 10:10:50 CET
-- 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_MO... | true |
24ee15a4dc3b93fa89e8636870564efe7088293a | SQL | brydela/sql-library-lab-v-000 | /lib/insert.sql | UTF-8 | 809 | 2.578125 | 3 | [
"LicenseRef-scancode-unknown-license-reference",
"LicenseRef-scancode-public-domain"
] | permissive | INSERT INTO series (title, author_id, subgenre_id)
VALUES ("Harry Potter", 1, 1), ("A Song of Ice and Fire", 2, 2);
INSERT INTO books (title)
VALUES ("A Game of Thrones"), ("A Clash of Kings"), ("A Storm of Swords"), ("Harrp Potter and the Sorcerors Stone"), ("Harry Potter and the Chamber of Secrets"), ("Harry Pot... | true |
55661524054139466da3fd45193c9904e0692c21 | SQL | wqbill/opendota-java | /src/main/resources/static/sql/currentmmr.sql | UTF-8 | 125 | 2.78125 | 3 | [
"MIT"
] | permissive | SELECT *
FROM player_ratings pr
WHERE time = (SELECT MAX(time) from player_ratings WHERE account_id = ?);
AND account_id = ?; | true |
e6ec5f757212350f806266291f3288d46f6f3459 | SQL | astrorafael/nixnoxdb | /sql/photometer.sql | UTF-8 | 1,516 | 2.859375 | 3 | [] | no_license | PRAGMA foreign_keys=OFF;
BEGIN TRANSACTION;
INSERT OR REPLACE INTO photometer_t(model, serial_number) VALUES("SQM-L","123456");
INSERT OR REPLACE INTO photometer_owner_t(photometer_id, observer_id) VALUES (
(SELECT last_insert_rowid()),
(SELECT observer_id FROM observer_t WHERE name = 'Fernando' AND surname = '... | true |
8cb0760fb0ee034f15b11dc78c93e75f97751b99 | SQL | superlinkgalaxy2/webplatform | /jonas.sql | UTF-8 | 3,979 | 2.75 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.6.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Sep 15, 2017 at 04:16 PM
-- Server version: 5.7.14
-- PHP Version: 5.6.25
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */... | true |
f94d08c2a8f032da60e245ffa84bacea29f7c04e | SQL | PlayDateMate/PlayDateMate5000 | /db/get_sender_event_invites.sql | UTF-8 | 112 | 2.59375 | 3 | [] | no_license | select * from event_invites
join users on users.id = receiver
and receiver_status = 'pending'
where sender = $1; | true |
8c5c0c0b1f4a06701753a6a2dd8d67c2d098bef0 | SQL | BenMorel/doctrine-groupBy-bug | /setup.sql | UTF-8 | 1,025 | 3.71875 | 4 | [] | no_license | CREATE TABLE Commission (
id int(10) unsigned NOT NULL AUTO_INCREMENT,
merchantId int(10) unsigned NOT NULL,
amount int(10) NOT NULL,
PRIMARY KEY (id)
) ENGINE=InnoDB;
CREATE TABLE Merchant (
id int(10) unsigned NOT NULL AUTO_INCREMENT,
networkId int(10) unsigned not null,
name varchar(50) COLLATE utf8mb4_unico... | true |
1a5ae4a1222d9dfa64d353d501d52b713367540b | SQL | fstanchese/corporativo | /corporativo/sql/GradAlu/GradAlu_qMatricQtde.sql | UTF-8 | 144 | 2.5625 | 3 | [] | no_license | select
Count(*) as Total
from
GradAlu
where
GradAlu.TurmaOfe_Id = nvl( p_TurmaOfe_Id ,0 )
and
GradAlu.Matric_Id = nvl( p_Matric_Id ,0 )
| true |
07eab0c804256c3f4d06d6a48b71e3774261a0d8 | SQL | UNDogMan/RailwayDB | /DBProgect/rw_user.sql | UTF-8 | 6,888 | 3.734375 | 4 | [] | no_license | create or replace package rw_user as
type t_passenger_table is table of PASSENGER%rowtype;
type t_favorite_path_table is table of FAVORITE_PATH%rowtype;
type t_favorite_train_table is table of FAVORITE_TRAIN%rowtype;
procedure update_info(
key raw, username nvarchar2, surname nvarchar2, father_... | true |
62e0c5cd0e637fca2b3c86b5eac7253b15c6a872 | SQL | codesquad-member-2020/todo-1 | /BE/src/main/resources/schema.sql | UTF-8 | 1,203 | 3.75 | 4 | [] | no_license | drop table if exists project;
drop table if exists category;
drop table if exists user;
drop table if exists card;
drop table if exists history;
create table project
(
id int primary key auto_increment
);
create table category
(
id int primary key auto_increment,
column_name varchar(45),
proj... | true |
674e9ee2ed760c1f7be808c2d8da479cc832c6d8 | SQL | vijaydairyf/TimelyFish | /CFDataStore/stage/Tables/stage.LastChangeTrackingVersion.sql | UTF-8 | 326 | 2.734375 | 3 | [] | no_license | CREATE TABLE [stage].[LastChangeTrackingVersion] (
ID INT NOT NULL IDENTITY
, DatabaseName SYSNAME NOT NULL
, LastChangeTrackingVersion BIGINT NOT NULL
, LastChangeAppliedDate DATETIME NOT NULL DEFAULT GETDATE()
, CONSTRAINT [pkLastChangeTrackingVersion]
PRIMARY KEY CLUSTERED ( ID DESC)
... | true |
fe1383363c98929406bfdde43da084be2b0a9370 | SQL | sangmin9412/sql-study | /source/0609/sam/2020-06-09.sql | UHC | 9,252 | 4.5 | 4 | [] | no_license | drop table board;
drop table member;
create table member(
user_id VARCHAR2(20) not null,
USER_PW VARCHAR2(200) not null,
USER_NAME VARCHAR2(40) not null,
USER_BIRTH TIMESTAMP not null,
USER_GENDER VARCHAR2(1) not null,
USER_ADDR VARCHAR2(200) null,
USER_PH1 VARCHAR2(13) not null,
USER_PH2 VARCHAR2(13),... | true |
9dd0eda828266e79996e68370ac297f393137221 | SQL | djulzz/code_ccsd | /sql/week3/ch5.sql | UTF-8 | 3,381 | 4.28125 | 4 | [] | no_license | -- Q1
-- select b.book_code, b.title, p.publisher_code, p.publisher_name
-- from book b, publisher p where ( p.publisher_code = b.publisher_code )
-- order by publisher_name;
-- Q2
-- select b.book_code, b.title, b.price, p.publisher_name
-- from book b, publisher p where ( p.publisher_code = b.publisher_code )
-- a... | true |
a6f159660746f7ddbfde282a9ee6c1de9e8a571a | SQL | PedroJuliari/ERP | /public_html/ead/admin/ead.sql | UTF-8 | 4,782 | 3.15625 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 5.0.3
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Tempo de geração: 15-Jan-2021 às 16:43
-- Versão do servidor: 10.4.14-MariaDB
-- versão do PHP: 7.4.11
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_C... | true |
ba753471f1b8e50db2b86c72f6741d21028f36bc | SQL | HakobyanAni/MS-SQL | /3. Select, Where, Like, Between, Group by, Having and other tools.sql | UTF-8 | 4,436 | 4.21875 | 4 | [] | no_license | --- > SELECT <----------------------------
SELECT TOP 3 * FROM Company -- Select first 3 rows
SELECT TOP 25 PERCENT * FROM Company -- Select 25% of rows
---> ORDER BY <----------------------------
SELECT * FROM Company -- Select all the table
ORDER BY [Company Name] DESC -- Sorting by company names (d... | true |
70b15c3135c20092db357091769e38369d589fc8 | SQL | FroeMic/CDTM-Backend-Workshop-WT2016 | /solutions/server/server-10-upload-files/server/schema.sql | UTF-8 | 1,168 | 3.734375 | 4 | [
"MIT"
] | permissive | PRAGMA foreign_keys = ON;
DROP TABLE IF EXISTS Lists;
CREATE TABLE Lists(
id INTEGER PRIMARY KEY AUTOINCREMENT,
title TEXT NOT NULL,
revision INTEGER NOT NULL DEFAULT 1,
inbox INTEGER NOT NULL DEFAULT 0,
created TIMESTAMP NOT NULL DEFAULT CURREN... | true |
4e49ff50c56165b9c078bd75444ab49b06f87022 | SQL | cognovis/intranet-reporting-translation | /sql/postgresql/upgrade/upgrade-4.0.3.0.0-4.0.3.0.1.sql | UTF-8 | 1,168 | 2.9375 | 3 | [] | no_license | SELECT acs_log__debug('/packages/intranet-reporting-translation/sql/postgresql/upgrade/upgrade-4.0.3.0.0-4.0.3.0.1.sql','');
SELECT im_report_new (
'Translation Units Sold by UoM and Language',
'translation_units_sold_by_uom_and_language',
'intranet-reporting-translation',
40,
(select menu_id from im_menus where... | true |
86e8e4539aa6ca84c0cdd1ae6a4820a0fd386242 | SQL | muratyaman/simple-hr-api-php8 | /db/upgrades/001--create-table-department.sql | UTF-8 | 332 | 2.890625 | 3 | [
"Unlicense"
] | permissive | CREATE TABLE `tbl_department` (
`id` tinyint NOT NULL,
`name` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
PRIMARY KEY (`id`),
KEY `tbl_department_name_IDX` (`name`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8
COMMENT='department table for HR, Marketing, IT, etc. and it would be rarely... | true |
579c58031067d321f3d17c3a682e9ae9ecdc7f9e | SQL | KoalaLiusy/ImagePlatform | /ImagePlatform/WebContent/WEB-INF/sql/seqid.sql | UTF-8 | 796 | 3.59375 | 4 | [] | no_license | CREATE TABLE `seqId` (
`PICID` bigint NOT NULL ,
`DATETIME` date NULL
);
INSERT INTO seqId(PICID,DATETIME) VALUES (0,CURDATE());
DELIMITER //
CREATE PROCEDURE `getPicStep`()
BEGIN
DECLARE t_error INTEGER DEFAULT 0;
DECLARE isOutDate DATE;
DECLARE CONTINUE HANDLER FOR SQLEXCEPTION SET t_error =1;
START T... | true |
0ad18f089f666eb6e9e6e41a328bfcd2d23ba593 | SQL | retroinspect/DB101 | /strawberry.sql | UTF-8 | 2,048 | 3.78125 | 4 | [] | no_license | SET SESSION FOREIGN_KEY_CHECKS=0;
/* Drop Tables */
DROP TABLE IF EXISTS DemandComment;
DROP TABLE IF EXISTS UserPostLikes;
DROP TABLE IF EXISTS DemandPost;
DROP TABLE IF EXISTS Categories;
DROP TABLE IF EXISTS User;
/* Create Tables */
CREATE TABLE Categories
(
CategoryTitle varchar(20) NOT NULL,
CategoryId i... | true |
1059155afb4afa0ac08eee713e6f76f3518e6c64 | SQL | agungwahyudi04/Single-Moving-Average-php | /prediksi.sql | UTF-8 | 5,292 | 3.15625 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.5.1
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: May 30, 2020 at 11:37 AM
-- Server version: 10.1.19-MariaDB
-- PHP Version: 5.6.28
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CL... | true |
27065b89c6259fe39ae9e8ef3716cd1fe1719752 | SQL | JaeHyeon89/MyProject | /SpringProSitemesh/target/classes/sql/Customer.sql | UTF-8 | 1,908 | 3.671875 | 4 | [] | no_license | ---------------------------------------------
---------------select--------------------------
select * from FAQ;
select * from info;
select * from userQuestion;
---------------------------------------------
---------------create--------------------------
-- FAQ 게시판 --
-- 넘버, 분류, 제목, 내용, 등록일 --
creat... | true |
f7fe54cfa08ee9567cd9cdbe80eddda222e6adb4 | SQL | karsany/obridge | /obridge-main/src/main/resources/queries/GET_ALL_PACKAGES.sql | UTF-8 | 82 | 2.625 | 3 | [
"MIT"
] | permissive | Select owner,
object_name
From all_objects
Where object_type = 'PACKAGE' | true |
5a1eede593bd0168d328b26b404969712de47c1d | SQL | RaBuko/SystemObslugiHoteluBD2 | /sql/userGrants.sql | UTF-8 | 807 | 2.84375 | 3 | [] | no_license | CREATE USER 'administrator'@'localhost' IDENTIFIED BY 'admin';
CREATE USER 'hotelarz'@'localhost' IDENTIFIED BY 'hotel';
GRANT SELECT, INSERT, UPDATE, DELETE, REFERENCES ON hotel.Hotelarz TO 'administrator'@'localhost';
GRANT SELECT, INSERT, UPDATE, DELETE, REFERENCES ON hotel.Pokoj TO 'administrator'@'localhost';
GRA... | true |
514e07ffc412ec78af8f29266ff740bde35cf4c0 | SQL | jeanhor/SQL_do_Zuruba | /Aula 3 - Funções de agrupamento e GROUP BY/Select aula 3.sql | ISO-8859-1 | 523 | 3.734375 | 4 | [] | no_license | /*
SELECT -- O qu? (Quais dados sero retornados no select)
sepal_width AS sepala_largura,
sepal_lenght AS sepala_comprimento,
petal_length petala_comprimento,
petal_width,
class
FROM -- Onde? (Quais so as tabelas que eu irei buscar os dados)
tbl_iris
WHERE -- Como? (Quais so as regras da minha seleo)
sepal_wid... | true |
7538d295ce853f8c1bb91e319d4cf8be6fb90b4b | SQL | Apisajan/ITP | /DB Script/Raw Material Management/CreateTables.sql | UTF-8 | 2,459 | 3.765625 | 4 | [] | no_license | DROP TABLE IF EXISTS `raw_invoice_tab`;
DROP TABLE IF EXISTS `raw_order_line_tab`;
DROP TABLE IF EXISTS `raw_purchase_order_tab`;
DROP TABLE IF EXISTS `raw_supplier_tab`;
DROP TABLE IF EXISTS `raw_item_tab`;
CREATE TABLE `raw_item_tab` (
`item_id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(2000) NOT NUL... | true |
4b9ff52ed1df1f90811a3c2f25daa49e812c1f23 | SQL | igi64/airyhub | /db/mysql/schema-views.sql | UTF-8 | 4,231 | 3.03125 | 3 | [
"Apache-2.0"
] | permissive | CREATE VIEW vw_cacheDir AS
SELECT fldl.folder_id AS `id`,
fldl.user_id AS `user_id`,
fldl.parent_id AS `parent_id`,
fldl.name AS `name`,
'directory' AS `mime`,
0 AS `size`,
fld.mtime AS `ts`,
fldl.mtime AS `tsl`,
fldl.read AS `read`,
fldl.write AS `write`,
fld.locked AS `locked`,
fld.hidden... | true |
3a5f441903785fd04c5640337034241b366b2d8b | SQL | larisastupinean/Library-database | /view_borrows.sql | UTF-8 | 335 | 3.421875 | 3 | [] | no_license | CREATE VIEW View_Borrows AS
SELECT bor.BorrowID,stu.Name AS StudentName,boo.Title AS BookTitle,aut.Name AS Author,bor.BorrowDate,bor.DueDate,bor.ReturnDate
FROM Borrows bor INNER JOIN Students stu ON bor.StudentID=stu.StudentID
INNER JOIN Books boo ON bor.BookID=boo.BookID
INNER JOIN Authors aut ON boo.Author... | true |
a78520c0cf0633ce1e3c4f45fe06b1cadd48c59b | SQL | VinodRobert/DBCapacite | /VersionSQL/BERACHAH/BSBS_CAPACITE/BI/Procedure/BULKDEPPOST.sql | UTF-8 | 11,821 | 3.03125 | 3 | [] | no_license | /****** Object: Procedure [BI].[BULKDEPPOST] Committed by VersionSQL https://www.versionsql.com ******/
CREATE PROCEDURE [BI].[BULKDEPPOST]
AS
--- THIS IS THE BULK ASSET POSTING MODULE
-- SELECT DISTINCT YEAR,PERIOD from BI.ASSETPOSTS ORDER BY YEAR,PERIOD
-- TO KNOW WHERE WE POSTED LAST
--EXEC [BI].[spP... | true |
ed5544c028140c9d8b6e7a828eff5158778aa5ab | SQL | jespernyhlen/me-api | /db/migrate.sql | UTF-8 | 560 | 3.1875 | 3 | [] | no_license | DROP TABLE IF EXISTS 'users';
DROP TABLE IF EXISTS 'reports';
DROP TABLE IF EXISTS 'presentation';
CREATE TABLE
IF NOT EXISTS users
(
email VARCHAR
(255) PRIMARY KEY NOT NULL,
firstname VARCHAR
(255) NOT NULL,
lastname VARCHAR
(255) NOT NULL,
birthday VARCHAR
(20) NOT NULL,
password VARCHAR
(60) N... | true |
a54859b2478c8e8b9b59863c843c57b4f9df6728 | SQL | silence-do-good/stress-test-Postgres-and-MySQL | /dump/low/day21/select1840.sql | UTF-8 | 191 | 2.71875 | 3 | [] | no_license |
SELECT timeStamp, temperature
FROM ThermometerObservation
WHERE timestamp>'2017-11-20T18:40:00Z' AND timestamp<'2017-11-21T18:40:00Z' AND SENSOR_ID='5a94378a_a8d0_4cbe_8851_7d01783968ad'
| true |
452ee6932348fadb22549eaae44495363405ee26 | SQL | YauheniD/GodelDataMasteryPart1 | /Tasks/Viachaslau/Task5/query05.sql | UTF-8 | 645 | 3.890625 | 4 | [] | no_license | SELECT P.BusinessEntityID,
LastName,
FirstName
FROM Person.Person AS P
INNER JOIN HumanResources.Employee AS E
ON E.BusinessEntityID = P.BusinessEntityID
INNER JOIN Sales.SalesPerson AS SP
ON SP.BusinessEntityID = E.BusinessEntityID
EXCEPT
SELECT P.BusinessEntityID,
LastName,
F... | true |
d4ccbc48e54f47a6c98857c02b70fc87b7e7c814 | SQL | muzammilali28/Undergard-Assignments-and-PracticeLabs | /Intro to Databases (DB)/Assignments/A3/task2/airline.sql | UTF-8 | 7,888 | 3.46875 | 3 | [] | no_license | create database airplane;
use airplane;
CREATE TABLE AIRPORT(
Airport_code CHAR(3) NOT NULL,
Airport_name VARCHAR(50) NOT NULL,
City VARCHAR(20) NOT NULL,
State VARCHAR(10),
PRIMARY KEY (Airport_code)
);
describe AIRPORT;
insert INTO AIRPORT VALUES
('SKT','Sialkot International Airport','Sialkot','Pakistan'),
('MUX... | true |
e4d50736a454270427a803b2f2a51c8eeafbcef8 | SQL | Genuba/node-cloud-admin | /02_implementation/01_sql/01_postgres/02_TABLAS/cl_tclient.sql | UTF-8 | 1,262 | 3.71875 | 4 | [
"Apache-2.0"
] | permissive | CREATE TABLE ab_core_us.cl_tclient
(
client_client serial NOT NULL, -- Identificador unico de la tabla de cliente
client_ident varchar(50) NOT NULL, -- numero de identificacion del cliente
client_fname varchar(50) NOT NULL, -- nombre de la persona cliente.
client_lname varchar(50) NOT NULL, -- apellido ... | true |
4eee5620b2ed49f2a97477ca681fbea0afd13d38 | SQL | jrouly/hap-with-map | /sql/create_routines.sql | UTF-8 | 6,995 | 3.5 | 4 | [
"Apache-2.0"
] | permissive | --
-- Copyright 2013 AMALTHEA REU; Dillon Rose; Michel Rouly
--
-- 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... | true |
c563680512bef72a6c7b1da14720699551bd0f0a | SQL | Indy2222/collab-mobile-server | /doc/create.sql | UTF-8 | 3,647 | 3.21875 | 3 | [] | no_license | CREATE SEQUENCE collabms_has_message_id_seq;
CREATE TABLE collabms_has_message (
has_message_id INTEGER NOT NULL
DEFAULT nextval('collabms_has_message_id_seq'),
readed BOOLEAN DEFAULT false NOT NULL,
message_id INTEGER NOT NULL,
user_id INTEGER NOT NULL,
CONSTRAINT has_message_id PRIMARY KE... | true |
ba21df05dfabb20adab2d56ec5fc8587c444c6b8 | SQL | stevenpg1/LDCCSharpTest | /sqlTest.sql | UTF-8 | 280 | 4.15625 | 4 | [] | no_license | SELECT b.Business, ISNULL(p.StreetNo,'') as StreetNo, p.Street, p.PostCode, sum(f.Count) as FootfallCount
FROM Businesses b
INNER JOIN Premises p ON b.Id = p.BusinessId
INNER JOIN Footfall f ON p.Id = f.PremisesId
GROUP BY b.Business, ISNULL(p.StreetNo,''), p.Street, p.PostCode | true |
a6f9f96a175fe52c17cb7f4d2f8e07ab24a453c2 | SQL | komihana/bamazon | /bamazon.sql | UTF-8 | 734 | 3.234375 | 3 | [] | no_license | DROP DATABASE IF EXISTS bamazon_db;
CREATE DATABASE bamazon_db;
USE bamazon_db;
CREATE TABLE products (
item_id INT NOT NULL AUTO_INCREMENT,
product_name VARCHAR(45) NULL,
department_name VARCHAR(45) NULL,
price DECIMAL(65,2) NULL,
stock_quantity INT NULL,
PRIMARY KEY (item_id)
);
INSERT INTO products
... | true |
0cc40928ee531e57bd939db6cbaaf9a0628e40ea | SQL | apex-io/abode-similar-homes-monthly-cost-neighborhood-facts | /database/schema.sql | UTF-8 | 681 | 3.21875 | 3 | [] | no_license | DROP DATABASE IF EXISTS abode;
CREATE DATABASE abode;
USE abode;
CREATE TABLE neighborhoods (
id INT AUTO_INCREMENT PRIMARY KEY,
neighborhood VARCHAR (20) NOT NULL UNIQUE KEY,
transit_score INT NOT NULL,
walk_score INT NOT NULL,
value_inc_dec_past INT NOT NULL,
value_inc_dec_future INT NOT NU... | true |
d3a7a66cdd530b4ff60368cfe0df0a79d24259f2 | SQL | ishanku/sql-challenge | /EmployeesSQL/mystery.sql | UTF-8 | 895 | 3.421875 | 3 | [] | no_license | create table departments(
dept_no varchar primary key,
dept_name varchar
);
create table employees
(
emp_no varchar primary key,
birth_date date,
first_name varchar,
last_name varchar,
gender varchar,
hire_date date
);
create table salaries(
emp_no varchar,
salary varchar,
from_date date,
to_date date,
FOREIGN KEY ... | true |
d89d9262569a603badef1b524326377fa84260f5 | SQL | SergioDiaz99/UTNPhonesDiazFtMurrie | /src/databaseScripts/triggers/202005101525_bills_before_update.sql | UTF-8 | 356 | 2.640625 | 3 | [] | no_license | /*
* Author: Murrie Battistoni Felipe
* Created Date: 10/05/2020
* Description: create of trigger for the table bills
*/
use utnphones;
drop trigger if exists bills_before_update;
delimiter //
create trigger if not exists bills_before_update
before update on bills
for each row
begin
set new.updaterUser=getDbUse... | true |
330992d59318dd0df7fb5a1436fda7be17ffeba7 | SQL | TheGreenHacker/IntroToSQL | /Exercises/SelectFromTable/ex2.sql | UTF-8 | 705 | 4.03125 | 4 | [] | no_license | USE coffee_store;
SELECT * FROM products;
DESC orders;
-- From products table, select name and price of all products with origin of 'Colombia' or 'Indonesia' ordered alphabetically (ascending)
SELECT name, price
FROM products
WHERE coffee_origin = 'Colombia' OR coffee_origin = 'Indonesia'
ORDER BY name;
-- 2. From... | true |
8b5b3b1b5c5d288641d6ea8d4e0b7d7507675a0b | SQL | woshisomeone/MyProject_RentHouse | /rent.sql | UTF-8 | 13,866 | 3.25 | 3 | [] | no_license | /*
Navicat MySQL Data Transfer
Source Server : myconnection
Source Server Version : 50505
Source Host : localhost:3306
Source Database : rent
Target Server Type : MYSQL
Target Server Version : 50505
File Encoding : 65001
Date: 2018-08-15 10:40:06
*/
SET FOREIGN_KEY_CHECKS=0;
-- -... | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.