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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
c52c2806ec79023f45e82b655ad3b584a8a3f117 | SQL | sr-2020/sr-2020-db | /sql/V9.6.5__sync_models.sql | UTF-8 | 1,915 | 3.28125 | 3 | [
"Apache-2.0"
] | permissive | create table if not exists feature
(
id serial
constraint feature_pk
primary key,
alias varchar(255) not null,
name varchar(1024),
description text,
prerequisites text,
karma int,
level int,
abi... | true |
5a0bb5cb635cb8dc5752d5e91c8b2525097e0a96 | SQL | skeema/skeema | /internal/linter/testdata/validcfg/dupeidx.sql | UTF-8 | 595 | 3.59375 | 4 | [
"Apache-2.0",
"LicenseRef-scancode-free-unknown"
] | permissive | CREATE TABLE `dupeidx` (
`id` int(10) unsigned NOT NULL,
`name` varchar(30) DEFAULT NULL,
`one` int,
`two` int,
`three` int,
`four` int,
`five` int,
PRIMARY KEY (`id`),
KEY onetwo (one, two), /* annotations: dupe-index */
KEY onetwothree (one, two, three),
KEY idnamefive (id, name, five),
UNIQUE... | true |
ae0c66917f518aa3b57d1bc16f1d3f98800c1b70 | SQL | mnegi/leave-planner | /database/sprint1_2/09-Create Views.sql | UTF-8 | 361 | 3.375 | 3 | [] | no_license | CREATE OR REPLACE VIEW infodb.country_holidays AS(
SELECT
c.name AS 'Country',
l.name AS 'Occassion',
lo.leave_date AS 'Date',
lo.week_day AS 'Day'
FROM
infodb.leave_in_countries lo,
infodb.geo_countries c,
infodb.leave_days l
WHERE
lo.country_id = c.id AND lo.leave_id = l.id
ORDER BY l... | true |
c7bee5d67f1b4857c1a5116da8b03e6afa31be9e | SQL | kazakovlv/569953-doingsdone | /schema.sql | UTF-8 | 3,155 | 4.03125 | 4 | [] | no_license | -- Дамп структуры базы данных doingsdone
CREATE DATABASE IF NOT EXISTS `doingsdone` DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_general_ci;
USE `doingsdone`;
-- Экспортируемые данные не выделены.
-- Дамп структуры для таблица doingsdone.users
CREATE TABLE IF NOT EXISTS `users` (
`id` int(10) unsigned NOT NULL AU... | true |
3227aa1b082935ce7905d31212b615d9bce47be6 | SQL | maxchv/oracle_tutorials | /18.ROWTYPE_TO_PROCEDURE.sql | WINDOWS-1251 | 633 | 3.328125 | 3 | [] | no_license | create or replace procedure process_customer
( c_id in CUSTOMER.CUSTOMER_ID%type)
as
c_rec customer%rowtype;
begin
select * into c_rec from customer where customer_id = c_id;
c_rec.first_name := '';
show_customer(c_rec);
end;
/
create or replace procedure show_customer
( customer_in in customer%rowtype)
as
begi... | true |
736b6987c2470ec5ad39a76d75eaf6fead8fdbf9 | SQL | jinwyp/aegis-finance-admin | /src/main/resources/db/migration/V1_0_10__createcompany.sql | UTF-8 | 2,036 | 3.390625 | 3 | [] | no_license | CREATE TABLE `t_finance_company` (
`id` BIGINT(20) NOT NULL AUTO_INCREMENT,
`name` VARCHAR(120) NOT NULL COMMENT '公司名称',
`status` VARCHAR(30) NOT NULL COMMENT '状态',
`status_id` INT(3) NOT NULL COMMENT '状态id',
`create_man_id` varchar(255) DEFAULT NULL COMMENT '创建人userId',
`create_time` datetime DEFAULT NULL ... | true |
fce11c2d0dc8100e712763bae3cb6121f62e0a82 | SQL | zwaker/iOpinio-WebServices | /iopinioejb/build/classes/au/myjsf/com/NNEWS.sql | UTF-8 | 1,490 | 3.109375 | 3 | [] | no_license | drop table OPINIONEWS;
CREATE TABLE OPINIONEWS(
id INT NOT NULL AUTO_INCREMENT,
PRIMARY KEY(id),
HEADING VARCHAR(3000),
IMAGE_URL VARCHAR(3000),
DEFINITION_DETAILS TEXT,
SOURCE_URL VARCHAR(3000),
SOURCE VARCHAR(3000));
INSERT INTO `OPINIONEWS`(HEADING,IMAGE_URL,DEFINITION_DETAILS,SOURCE_URL,SOURCE) VALUES
('Turkish... | true |
ec46f12bb1c5ee01c3b99c53c822505996c56438 | SQL | sankparatkar/LuCAR-Booking-Portal | /lucar_booking_database.sql | UTF-8 | 4,698 | 3.140625 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.7.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Nov 10, 2017 at 07:50 PM
-- 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 |
2746d2f313e21fca154bae38cfa46d8d04eff370 | SQL | CodeMechanix/eVotingApplication | /db/evote_application.sql | UTF-8 | 10,992 | 3.125 | 3 | [
"MIT"
] | permissive | -- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1:3306
-- Generation Time: Apr 25, 2021 at 09:20 AM
-- Server version: 5.7.31
-- PHP Version: 7.3.21
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@... | true |
5b81d16bf7c41e330c201ebb784cadb72638a103 | SQL | MoussiMohamed/O_Wish_API | /wishes_db.sql | UTF-8 | 940 | 3.59375 | 4 | [] | no_license | CREATE SCHEMA IF NOT EXISTS `wishes_db` DEFAULT CHARACTER SET latin1 ;
USE `wishes_db` ;
-- -----------------------------------------------------
-- Table `wishes_db`.`user_login`
-- -----------------------------------------------------
DROP TABLE IF EXISTS `wishes_db`.`user_login` ;
CREATE TABLE IF NOT EXISTS `wishe... | true |
349932c2d5964ccf06eef7efb57308d59120e72b | SQL | btrask/earthfs-js-old | /schema.sql | UTF-8 | 12,901 | 2.953125 | 3 | [
"MIT"
] | permissive | --
-- PostgreSQL database dump
--
SET statement_timeout = 0;
SET client_encoding = 'UTF8';
SET standard_conforming_strings = on;
SET check_function_bodies = false;
SET client_min_messages = warning;
--
-- Name: plpgsql; Type: EXTENSION; Schema: -; Owner: -
--
CREATE EXTENSION IF NOT EXISTS plpgsql WITH SCHEMA pg_cat... | true |
b9d1099589a323ff1857e963982ddf69c27da119 | SQL | xhuanghun/giswater | /sql/ud/ud_14_inp_vdomain.sql | UTF-8 | 15,489 | 2.578125 | 3 | [] | no_license | /*
This file is part of Giswater
The program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This version of Giswater is provided by Giswater... | true |
fb923a5b4067487b51037c60cd84d7dec293a013 | SQL | A0nameless0man/Pile | /Notes/DataBaseSystem/3.52.sql | UTF-8 | 187 | 3.734375 | 4 | [] | no_license | select
CustomerNumber,
ItemNumber
from Purchase a
where
Count > (
select
AVG(Count)
from Purchase b
where
a.CustomerNumber = b.CustomerNumber
); | true |
9927e8c82a276c187fc1b2e78697b6b9143f30b3 | SQL | Safnaj/SellNBye-Ecommerce | /Webservice/databases-schema/udara.sql | UTF-8 | 2,116 | 3.140625 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.8.5
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: May 19, 2019 at 12:15 PM
-- Server version: 10.1.38-MariaDB
-- PHP Version: 7.1.26
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OL... | true |
72b2955bf8699a71bb35b30a1d1b6bdb83ce2518 | SQL | aayushirathi/mySqlServerCodes | /67 Replace function.sql | UTF-8 | 441 | 2.75 | 3 | [] | no_license | Link- https://rextester.com/RAV54307
CREATE TABLE #temp
(name NVARCHAR(50),
GRP NVARCHAR(100));
INSERT INTO #temp VALUES
('Prashanth', 'AB'),('Kiki', 'ABC'),('Steven', 'ABCD');
SELECT name, GRP,
REPLACE(GRP, 'A', '5') GRPCODE
FROM #temp;
SELECT name, GRP,
REPLACE(REPLACE(GRP, 'A', '5'), 'C', 9) GRP... | true |
9230d65c7468c2768000c466bc4a5314dca269e7 | SQL | pyxsor/pemrogramanweb | /CV+960+JS/db/cv.sql | UTF-8 | 2,041 | 3.078125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 5.0.3
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Dec 02, 2020 at 01:12 PM
-- Server version: 10.4.14-MariaDB
-- PHP Version: 7.4.11
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIE... | true |
1fda5aff1157e91d3e615282b30483955c94f8c8 | SQL | zhengqingya/java-workspace | /SpringBoot系列/53-导出数据库表信息生成Word文档/demo.sql | UTF-8 | 4,999 | 3.6875 | 4 | [
"MIT"
] | permissive | /*
Navicat Premium Data Transfer
Source Server : localhost
Source Server Type : MySQL
Source Server Version : 50724
Source Host : localhost:3306
Source Schema : demo
Target Server Type : MySQL
Target Server Version : 50724
File Encoding : 65001
Date: 08/11/2019 17:03... | true |
f99a269e499a51d12f159ed191e866beb45339bf | SQL | RichardSaouma/acct_data | /streetevents/db_matches/problematic_tickers_simple.sql | UTF-8 | 955 | 3.75 | 4 | [] | no_license | SET work_mem='3GB';
WITH
new_names AS (
SELECT ticker, co_name, call_desc,
regexp_replace(co_name, '^(.*?)\s.*$', '\1') AS partial_name,
regexp_replace(call_desc,
'^Q[1-4] \d{4} (.*?) Earnings Conference Call$', '\1')
AS original_name,
regexp_replace... | true |
9f7c3027282727e69b10ae73c8579321e8cb1f1c | SQL | dominicdongwuxing/ETH-record | /ETH_record.sql | UTF-8 | 6,912 | 4.1875 | 4 | [] | no_license | -- TABLE Completed contains all completed courses
CREATE TABLE Completed (
course_id VARCHAR(20) PRIMARY KEY,
course_name VARCHAR(50),
course_category VARCHAR(50),
credit INT,
grade DECIMAL(3,2),
completion_semester VARCHAR(3));
-- TABLE Interested contains all courses I'm planning to ta... | true |
e451bbb409a0e066b0c350bd95030110f98b44e6 | SQL | TeleGoProj/TeleGoDatabase | /Backup/002_DB_BACKUP_08_Feb_2020.sql | UTF-8 | 21,680 | 3.046875 | 3 | [] | no_license | --------------------------------------------------------
-- File created - Saturday-February-08-2020
--------------------------------------------------------
--------------------------------------------------------
-- DDL for Table AREA
--------------------------------------------------------
CREATE TABLE "PHON... | true |
64e6342104f6b923e3325ee10754f67041888383 | SQL | WRBarahona/warSrepo | /ProyectoICSH/script/db_solucionesTecnicas.sql | UTF-8 | 4,346 | 3.734375 | 4 | [] | no_license | #EL SIGUIENTE SCRIPT SIGUE LAS RECOMENDACIONES Y APORTACIONES DEL EQUIPO
#LA FINALIDAD DE ESTOS COMENTARIOS ES DIFERENCIAR LAS DISTINTAS VERSIONES CON CORRECCIONES
#VERSION 3.0
CREATE DATABASE db_solucionesTecnicas;
USE db_solucionesTecnicas;
#CREACION DE TABLAS
#-------------------------
#TABLA ROL
CREATE TABLE rol(... | true |
f92adfb4caa6a25bb38ad82456aa2f30bd08c9e7 | SQL | danhtuan/sf_asad | /frcevent.sql | UTF-8 | 6,006 | 3.1875 | 3 | [
"MIT"
] | permissive | -- phpMyAdmin SQL Dump
-- version 4.4.14
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Apr 25, 2016 at 02:49 AM
-- Server version: 5.6.26
-- PHP Version: 5.6.12
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;... | true |
bde40d3bc4a8347b80258a2feb11608f4ad5ccda | SQL | johnwongca/Analysis | /Analysis/QuoteOld/chart/Views/ChartList.sql | UTF-8 | 859 | 3.765625 | 4 | [] | no_license | create view Chart.ChartList
as
with AllChartUsers as
(
select ChartUserID
from chart.ChartUser
where LoginName in (cast(system_user as varchar(128)), 'Default')
),
ExceptChartIDs as
(
select ParentChartID
from chart.Chart c
inner join chart.ChartUser u on u.ChartUserID = c.ChartUserID
where c.ParentChartID i... | true |
0d6398a21cca197e1a124748118291d995861c42 | SQL | Codepoints/unicode2mysql | /sql/09_schema_search_index.sql | UTF-8 | 225 | 2.734375 | 3 | [
"MIT"
] | permissive | -- vim: ft=mysql
CREATE TABLE search_index (
cp INTEGER(7) REFERENCES codepoints,
text TEXT
) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
CREATE FULLTEXT INDEX search_index_text ON search_index ( text );
| true |
1fab4798898add26c97ca1ae2828b0cd60fb49b8 | SQL | mariojohnson88/database-exercises | /albums_migration.sql | UTF-8 | 270 | 2.828125 | 3 | [] | no_license | USE codeup_test_db;
DROP TABLE IF EXISTS albums;
CREATE TABLE albums (
id INT UNSIGNED NOT NULL AUTO_INCREMENT,
artist_name VARCHAR(200),
record_name VARCHAR(200) NOT NULL,
release_date INT,
sales FLOAT,
genre CHAR(200),
PRIMARY KEY (id)
);
| true |
92f9c0f40a142083b13df1b73174e25cbf4176be | SQL | davidd0minguez/Supermercado-DAME | /target/classes/createAll.sql | UTF-8 | 854 | 2.640625 | 3 | [] | no_license | DROP SCHEMA IF EXISTS supermercado;
CREATE SCHEMA supermercado;
USE supermercado;
CREATE TABLE Productos (codigo int NOT NULL UNIQUE,
nombre VARCHAR (255) NOT NULL,
precio int NOT NULL);
INSERT INTO Productos (codigo, nombre, precio)
VALUES
(1103,"Leche", 30),
(1104,"Pan la... | true |
526fe92dbf2db1806fddc1f474cbf177057708e8 | SQL | yeladlouni/m2i | /sql/conditionals.sql | ISO-8859-1 | 989 | 4.34375 | 4 | [] | no_license | SELECT employee_id, first_name, last_name, department_id,
CASE department_id
WHEN 50 THEN 'Logistiques'
WHEN 80 THEN 'Commercial'
ELSE 'Autres'
END department
FROM employees;
-- Ecrire une requte en utilisant CASE afin d'afficher 'inf' pour les employs affects un dpartment dont l'ID est <= 50
-- 'mid' pour les emplo... | true |
a347bd71aa503bc64b641d3925ed106f955a68ac | SQL | dhiaulhaq/flutter_employee_crud | /flutter_crud.sql | UTF-8 | 1,525 | 2.921875 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 5.0.3
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Waktu pembuatan: 16 Feb 2021 pada 07.42
-- Versi server: 10.4.14-MariaDB
-- Versi PHP: 7.2.34
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@C... | true |
94a3635f1b7de17cdd7b65ec42f25700c4d7e10c | SQL | cristianesgarcia/aulamysql | /exemplo4.sql | UTF-8 | 406 | 3.296875 | 3 | [
"MIT"
] | permissive | -- Exemplo 4
SELECT Pnome AS Nome,
Unome,
F.Cidade AS 'Cidade funcionário',
D.Cidade AS 'Cidade departamento'
FROM FUNCIONARIO AS F,
DEPARTAMENTO AS D
WHERE Dnome = 'Pesquisa'
AND Dnumero = Dnr;
-- Seleciona os dados dos funcionários que são vinculados ao departamento 'Pesq... | true |
42f128a18ed2d3c1f111c885265f6c22f550a5a9 | SQL | Saharsh007/CSE-COURSE-PROGRAMS | /DATABASE LAB/week 2/codes.sql | UTF-8 | 6,724 | 3.484375 | 3 | [] | no_license | use 17co121
DROP TABLE student_d;
DROP TABLE faculty_d;
DROP TABLE student_issue;
DROP TABLE faculty_issue;
DROP TABLE faculty_return;
DROP TABLE student_return;
CREATE TABLE student_d (
sid varchar(10) NOT NULL UNIQUE,
name varchar(255),
age int,
address varchar(255),
state varchar(255),
emai... | true |
a72039d4f581680eb57df744219345f0fe7701f4 | SQL | RajendraKumarR11/cricket_database_normalization_and_optimization | /2_NF.sql | UTF-8 | 3,444 | 3.78125 | 4 | [] | no_license | #Removal of calculated columns from playerbattingstatistics
#Formulas using existing columns:
#Batting Average = Runs_Scored / (Innings_Batted - Not_Outs) --> Same result as 'Batting_Average'
#Batting Strike rate = (Runs_Scored * 100) / Balls_Faced --> Same result as 'Batting_Strike_Rate'
select pb.Player_ID, pb.Run... | true |
186ec634161617989c20ce36b1cce75ab349f02b | SQL | frokrab/goblin-fighter | /database/schema.sql | UTF-8 | 281 | 2.875 | 3 | [] | no_license | DROP SCHEMA IF EXISTS goblin_fighter CASCADE;
CREATE SCHEMA goblin_fighter
CREATE TABLE leaderboard (
id SERIAL PRIMARY KEY,
name CHAR(3),
score SMALLINT
);
CREATE INDEX ON goblin_fighter.leaderboard (score);
ALTER ROLE palpaca SET search_path TO goblin_fighter;
| true |
6be935ccf1dc05a4a9b614a8f8d44bdc8dc57319 | SQL | Bludwarf/roadie | /api/models/sql/foreign_keys.sql | UTF-8 | 190 | 2.59375 | 3 | [] | no_license | ALTER TABLE `morceau`
CHANGE COLUMN `groupe` `groupe` INT(11) UNSIGNED NULL DEFAULT NULL AFTER `nom`,
ADD CONSTRAINT `FK_morceau_groupe` FOREIGN KEY (`groupe`) REFERENCES `groupe` (`id`);
| true |
0c7d1420070942170c40cfdc436ae36fb1df35bc | SQL | NigelThomas/pythonudx | /pipein.test.sql | UTF-8 | 426 | 2.609375 | 3 | [] | no_license | set schema 'test';
set path 'test';
CREATE OR REPLACE VIEW pipetest
as select stream * from stream(pipein(cursor(select stream * from dummy), '/usr/bin/gunzip -c /home/sqlstream/nigel/NOBACKUP/EDR-cricket/f_20210124_1.resorted.txt.gz'));
CREATE OR REPLACE VIEW pipetest2 AS
select stream floor(s.rowtime to second),co... | true |
c1e4e843086dca8515bf91e2a40bacd5bc3abadd | SQL | chicongst/simple_mvc | /libraries/phpmvc.sql | UTF-8 | 3,861 | 3.171875 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.5.4.1deb2ubuntu2
-- http://www.phpmyadmin.net
--
-- Máy chủ: localhost
-- Thời gian đã tạo: Th8 15, 2018 lúc 05:28 PM
-- Phiên bản máy phục vụ: 5.7.23-0ubuntu0.16.04.1
-- Phiên bản PHP: 7.1.20-1+ubuntu16.04.1+deb.sury.org+1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+0... | true |
15cca8598118984811478987f929cc0872f966ed | SQL | CS4398-Group3/CS4398-G3-Database | /schema/question.sql | UTF-8 | 1,013 | 3.09375 | 3 | [] | no_license | CREATE TABLE question
(
topicid int,
questionid int,
question VARCHAR(2000)
);
INSERT INTO question (topicid, questionid, question) SELECT 1, 1, 'When was the Declaration of independence signed';
INSERT INTO question (topicid, questionid, questoin) SELECT 1, 2, 'How many states does the United States have? A 51... | true |
b2b0f30fb63e1ca57e3e4b01a7a58654917c0a9b | SQL | Echidna93/fmr | /db/structure.sql | UTF-8 | 386 | 2.609375 | 3 | [] | no_license | -- Create fmr_bird_data database
CREATE DATABASE fmr_bird_data;
-- Create Flint Hills table
/*
Noise: 0= no background noise, 1=barely reduces hearing, 2=noticeable hearing reduction, 3=prohibitive hearing reduction
*/
DROP TABLE IF EXISTS 'flint_hills';
CREATE TABLE flint_hills(
species_code VARCHAR(20),
... | true |
a980ccc81b3d8bc9e2b848b5f99fd050ff6f77aa | SQL | nielsenius/PATS | /pats_privileges.sql | UTF-8 | 502 | 3.203125 | 3 | [] | no_license | -- PRIVILEGES FOR pats USER OF PATS DATABASE
--
-- by Matthew Nielsen & Theophilus Onime
--
-- SQL needed to create the pats user
CREATE USER pats WITH PASSWORD 'secret';
-- SQL to limit pats user access on key tables
GRANT ALL PRIVILEGES ON DATABASE pats TO pats;
REVOKE DELETE ON TABLE visit_medicines FROM pats;
RE... | true |
394e192c3c0c989421593b17f690133e4b91ae79 | SQL | murras/hiu | /3-2/db/hw1/HW1_나/hw1_1_CreatTable.sql | UTF-8 | 522 | 3.3125 | 3 | [] | no_license | CREATE TABLE Suppliers(
sid integer,
sname varchar(20),
address varchar(20),
CONSTRAINT S_PK PRIMARY KEY (sid)
);
CREATE TABLE Parts(
pid integer,
pname varchar2(20),
color varchar2(20),
CONSTRAINT Parts_PK PRIMARY KEY (pid)
);
CREATE TABLE Catalog(
sid integer,
pid integer... | true |
cc4b1f639564483951e7cd120e8a4c499aae354e | SQL | radtek/abs3 | /sql/mmfo/bars/Data/Applist/codeapp_$RM_@BDK.sql | WINDOWS-1251 | 16,293 | 2.65625 | 3 | [] | no_license | PROMPT =====================================================================================
PROMPT *** Run *** ========== Scripts /Sql/Bars/Data/Applist/codeapp_$RM_@BDK.sql =========*
PROMPT =====================================================================================
PROMPT *** Create/replace ARM ... | true |
4110eadd069c6f333c700d1fe27c9419a379a8c2 | SQL | lunatech-labs/lunatech-sshkey-manager | /conf/evolutions/default/1.sql | UTF-8 | 1,898 | 3.390625 | 3 | [
"Apache-2.0"
] | permissive | # --- First database schema - HSQL
# --- !Ups
set ignorecase true;
create table servers (
id bigint generated by default as identity(start with 1000) not null,
name varchar(255) not null,
comment varchar(255),
status int not nul... | true |
0a8c2153602aa443f3e820f3792d7b11eca8f22d | SQL | pg30/Premium-Calculator-Backend | /database_queries/rate_queries.sql | UTF-8 | 2,842 | 3.84375 | 4 | [] | no_license | #SELECT * FROM premiumcalculator.rate;
use premiumcalculator;
# two wheeler and private cars and taxi upto 6 passengers
SELECT cost from rate left join ccRange on rate.ccId=ccRange.id left join Zone on rate.zoneId=Zone.id left join dayRange on rate.dayId=dayRange.id where vehicleId=2 and Zone.zone_name='B' and ccRange.... | true |
7e3b0a599170131e88da97bbf7902f2dca5807bd | SQL | jeshiihu/comp466 | /TMA2/part2/CreateEmlTables.sql | UTF-8 | 1,297 | 3.578125 | 4 | [] | no_license | DROP TABLE IF EXISTS Units;
CREATE TABLE Units
(
ID int NOT NULL AUTO_INCREMENT PRIMARY KEY,
Title varchar(225) not NULL,
Overview text
);
DROP TABLE IF EXISTS Chapters;
CREATE TABLE Chapters
(
ID int NOT NULL AUTO_INCREMENT PRIMARY KEY,
Title varchar(225) NOT NULL,
Overview text,
UnitID int NOT NULL,
FOREIGN ... | true |
fa61bfdc9aeed7cfc6a1a6c9ced5edea3a30f77e | SQL | kamilBoksa/Queststore-mirror | /data_base/defaultExpLvl.sql | UTF-8 | 551 | 2.53125 | 3 | [] | no_license | PRAGMA foreign_keys=ON;
BEGIN TRANSACTION;
DELETE FROM experience_levels;
INSERT OR IGNORE INTO experience_levels VALUES(1,'novice',0);
INSERT OR IGNORE INTO experience_levels VALUES(2,'apprentice',100);
INSERT OR IGNORE INTO experience_levels VALUES(3,'junior programmer',1000);
INSERT OR IGNORE INTO experience... | true |
4c15456c2bf774424319f3a24cde1db2defa4aa4 | SQL | ThoPeumasschel/MyProjects | /labs/lab_01_10.sql | UTF-8 | 426 | 2.75 | 3 | [] | no_license |
SELECT
lpad(employee_id, 10, ' ')
|| ', '
|| lpad(first_name, 10, ' ')
|| ', '
|| lpad(last_name, 10, ' ')
|| ', '
|| lpad(email, 10, ' ')
|| ', '
|| lpad(phone_number, 10, ' ')
|| ', '
|| hire_date
|| ', '
|| job_id
|| ', '
|| salary
|| ', '
|| commi... | true |
0bed85f0f6c3f298499560e57b928c026d5451f1 | SQL | Khoirul-Diantoro/Khoirul-Diantoro.github.io | /db_login.sql | UTF-8 | 2,820 | 3.21875 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 5.0.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Waktu pembuatan: 04 Bulan Mei 2021 pada 07.58
-- Versi server: 10.4.17-MariaDB
-- Versi PHP: 8.0.2
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIEN... | true |
45108b34ef3970b2fd23e47e5dcfe02bf72d22cb | SQL | soutiagocosta/DALS | /BD/TicketSell.sql | UTF-8 | 3,868 | 3.28125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.4.3
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: 19-Maio-2015 às 21:44
-- Versão do servidor: 5.6.24
-- PHP Version: 5.6.8
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
... | true |
b4b1299884effc4f810dc5ec77c3f7489228632d | SQL | Mosher-Scott/Capstone-Desktop-App | /Client Queries.sql | UTF-8 | 1,313 | 3.78125 | 4 | [] | no_license | -- View training session names that are assigned to a specific user
-- Can be used to populate a dropdown list
SELECT ts.id, ts.SessionName AS [Name], ts.sessionDescription AS [Description], ts.sessionSets AS [Sets], ts.sessionReps AS [Reps]
FROM client_training_session AS cts
JOIN training_session AS ts ON ts.id = ct... | true |
d013431a6ea93f3c9ab397f066d9a1ef624c4ad1 | SQL | david22118/sql-join-lesson-exercises | /solutions/ex_4.sql | UTF-8 | 250 | 3.1875 | 3 | [] | no_license | USE sql_intro;
SELECT p.id ,d.survival_rate FROM
patient AS p ,disease AS d ,ethnicity AS e ,gender AS g ,symptoms AS s
WHERE d.name IS NOT NULL
AND
p.ethnicity=e.id
AND
p.gender=g.id
AND
p.symptoms_family=s.family
AND
p.disease=d.name
ORDER BY p.id; | true |
3cc838cd870f2ec1bc8958da4b04f772f0eea990 | SQL | mspiegel/postgres-playground | /test/sql/median2.sql | UTF-8 | 1,140 | 3.984375 | 4 | [] | no_license | CREATE TABLE intvals2(val int, color text);
-- Test empty table
SELECT median2(val) FROM intvals2;
-- Integers with odd number of values
INSERT INTO intvals2 VALUES
(1, 'a'),
(2, 'c'),
(9, 'b'),
(7, 'c'),
(2, 'd'),
(-3, 'd'),
(2, 'e');
SELECT * FROM intvals2 ORDER BY ... | true |
3b0cf38f4f894bef5abedb6050aabe88a33fe05b | SQL | Nicolanz/holbertonschool-higher_level_programming | /0x0E-SQL_more_queries/9-cities_by_state_join.sql | UTF-8 | 136 | 3.546875 | 4 | [] | no_license | -- More filters
SELECT cities.id, cities.name, states.name
FROM cities JOIN states ON cities.state_id=states.id
ORDER BY cities.id ASC; | true |
837190668d1595be314bd14ad814b85db1ddc49c | SQL | kambiz-frounchi/EmployeeTracker | /Assets/db/seeds.sql | UTF-8 | 1,344 | 3 | 3 | [] | no_license | USE employee_managementDB;
INSERT INTO departments (name) VALUES ("R&D");
INSERT INTO departments (name) VALUES ("Finance");
INSERT INTO departments (name) VALUES ("Legal");
INSERT INTO roles (title, salary, department_id)
VALUES ("Engineer", 80000, 1);
INSERT INTO roles (title, salary, department_id)
VALUES ("Lead E... | true |
87287adf0306ea7ee31b1b6d40d58185261e5f20 | SQL | coder-fang/electronic-registration-cloud | /sql/erc_students.sql | UTF-8 | 4,444 | 3.734375 | 4 | [] | no_license | /*
Navicat Premium Data Transfer
Source Server : localhost
Source Server Type : MySQL
Source Server Version : 80022
Source Host : localhost:3306
Source Schema : erc_students
Target Server Type : MySQL
Target Server Version : 80022
File Encoding : 65001
D... | true |
71ee1395b468293abb1b48e8d755258586f34807 | SQL | Mariusz3100/kitchenAssistant | /kitchen-assistant/sql/dbCreation/recipes.sql | UTF-8 | 696 | 3.5 | 4 | [] | no_license | CREATE TABLE recipe (
rec_id int NOT NULL,
url varchar(100) NOT NULL,
CONSTRAINT recipe_pk PRIMARY KEY (rec_id)
);
CREATE TABLE recipe_ingredient (
rec_ing_id int NOT NULL,
rec_id int NOT NULL,
ing_id int NOT NULL,
amount real NOT NULL,
amount_type varchar(100) NOT NULL,
CONSTRAINT recipe_ing_pk... | true |
ae14d24d055c051dc78099991139edd9e2c39b2e | SQL | github4n/cloud | /database/0130/DDL/device_catalog.sql | UTF-8 | 379 | 3.078125 | 3 | [] | no_license | USE iot_db_device;
SELECT Count(1)
INTO @exist
FROM information_schema.`COLUMNS`
WHERE table_schema = 'iot_db_device' AND table_name = 'device_catalog' and COLUMN_NAME='order';
SET @query = If(@exist=0,
'ALTER TABLE iot_db_device.device_catalog ADD COLUMN `order` int NULL ',
'SELECT \'nothing\' status');
PREPA... | true |
5deba2db12bc70ac0a04a83d3f1df24b6d1c8f99 | SQL | jonas2451/TryMe | /db/tryme_population.sql | UTF-8 | 11,823 | 2.9375 | 3 | [] | no_license | insert into category(id, name, sexen) values (10, 'bodies', 'f');
insert into category(id, name, sexen) values (11, 'summer', 'f');
insert into category(id, name, sexen) values (12, 'croptop', 'f');
insert into category(id, name, sexen) values (13, 'dress', 'f');
insert into category(id, name, sexen) values (14, 'pregn... | true |
4bb0758199a7ede6eb3275c3ab73d17e4c7492dc | SQL | jpablolima/digital-postgresql | /cte.sql | UTF-8 | 1,428 | 3.703125 | 4 | [] | no_license | SELECT numero, nome FROM banco;
SELECT banco_numero, numero, nome FROM agencia;
WITH tbl_tmp_banco AS (
SELECT numero, nome
FROM banco
)
SELECT numero, nome
FROM tbl_tmp_banco;
WITH params, AS(
SELECT 745 AS banco_numero
), tbl_tmp_banco AS(
SELECT numero, nome
FROM banco
JOIN params ON pa... | true |
34c08fc8465bdba9061001eaec0a932591393fbc | SQL | bbeldame/sdwstudies | /sql/library.sql | UTF-8 | 13,513 | 3.21875 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.6.4deb1+deb.cihar.com~xenial.1
-- https://www.phpmyadmin.net/
--
-- Client : localhost
-- Généré le : Mar 15 Novembre 2016 à 09:27
-- Version du serveur : 5.7.16-0ubuntu0.16.04.1
-- Version de PHP : 7.0.8-0ubuntu0.16.04.3
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "... | true |
26c8e2a76c0388ba9c69f3cb4051f9b2b29b0329 | SQL | 7039430126/Sheetal14841_Storage | /MYSQL_Assignment1.sql | UTF-8 | 3,590 | 4 | 4 | [] | no_license | use org_database;
select * from emp;
-- Assignments for Day1 Full Stack FOundation_Storage Layer
-- 1) LIST ALL MANAGER DATA
select * from emp where Job='Manager';
-- 2) LIST EMP WHO ARE WORKING AS MANAGER OR ANALYST OR CLERK
select * from emp where job in ('Manager','Analyst','Clerk');
-- 3) LIST EMP WHO ARE EARNING... | true |
53dac8600ab04b0090f85b905240a2764255e2a7 | SQL | radtek/abs3 | /sql/mmfo/bars/Table/sw_950_arch.sql | UTF-8 | 6,112 | 3.015625 | 3 | [] | no_license |
PROMPT =====================================================================================
PROMPT *** Run *** ========== Scripts /Sql/BARS/Table/SW_950_ARCH.sql =========*** Run *** =
PROMPT =====================================================================================
PROMPT *** ALTER_POLICY_INFO... | true |
0bbc260a5928066f4f3f0ab9eddf65bf84e87655 | SQL | opengauss-mirror/openGauss-server | /src/test/regress/sql/statistic.sql | UTF-8 | 6,575 | 3.15625 | 3 | [
"LicenseRef-scancode-mulanpsl-2.0-en",
"LicenseRef-scancode-unknown-license-reference",
"PostgreSQL",
"BSD-3-Clause",
"LGPL-2.0-or-later",
"LicenseRef-scancode-unicode",
"LicenseRef-scancode-warranty-disclaimer",
"curl",
"GPL-1.0-or-later",
"LGPL-2.1-or-later",
"LGPL-2.1-only",
"CC-BY-4.0",
... | permissive | create schema distribute_stat;
create schema distribute_stat2;
set current_schema = distribute_stat;
create table test_analyze(f1 int, f2 float, f3 text);
insert into test_analyze select generate_series(1,1000), 10.0, repeat('Gauss Database,Niubility!!',2);
analyze test_analyze;
select relpages > 0 as relpagesgtzero,... | true |
485934f34f6b80d74910e46566838325be1d0c46 | SQL | emalock3/spring-boot-scalikejdbc4j-sample | /src/main/resources/db/migration/V1__create_tables.sql | UTF-8 | 285 | 3.140625 | 3 | [
"Apache-2.0"
] | permissive | create table company (
id serial not null,
name varchar(100)
);
create table programmer (
id serial not null,
github_name varchar(100) not null,
real_name varchar(100),
company_id bigint references company(id),
created_at timestamp not null default current_timestamp
);
| true |
3d5e15e4de55e2707abbfda8b088119facb8f5ba | SQL | ethereal-go/example-call-center | /database/migrations/mysql/20171020231124-autoresponders.sql | UTF-8 | 578 | 3.453125 | 3 | [] | no_license |
-- +migrate Up
CREATE TABLE `autoresponders` (
`id` int NOT NULL AUTO_INCREMENT,
`call_id` int NOT NULL,
`attachment_id` int NOT NULL,
`created_at` TIMESTAMP NULL DEFAULT NULL,
`updated_at` TIMESTAMP NULL DEFAULT NULL,
`deleted_at` TIMESTAMP NULL DEFAULT NULL,
PRIMARY KEY (`id`)
);
ALTER TABLE `autoresponders... | true |
5b3fe03a4632c2dae0a8e71f8470b693c3149891 | SQL | patilmayur526/project-2 | /db_file/resume_generator.sql | UTF-8 | 14,505 | 2.96875 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | -- phpMyAdmin SQL Dump
-- version 4.8.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Oct 22, 2018 at 03:53 AM
-- Server version: 10.1.34-MariaDB
-- 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 @OLD... | true |
4aea658829cdc2785f99a5034760c0eba60f0f52 | SQL | putrabandung38/PwebKelompok10 | /books_kelompok10.sql | UTF-8 | 3,815 | 2.890625 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.4.14
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Jul 19, 2019 at 01:25 PM
-- Server version: 5.6.26
-- PHP Version: 5.6.12
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;... | true |
6d7837959ff27882fd0a7ad3491c41fda0b7bebd | SQL | lexxed/celina | /database/sql/hha_products.sql | UTF-8 | 3,575 | 3.09375 | 3 | [] | no_license | -- --------------------------------------------------------
-- Host: 127.0.0.1
-- Server version: 5.7.16-0ubuntu0.16.04.1 - (Ubuntu)
-- Server OS: Linux
-- HeidiSQL Version: 9.4.0.5125
-- --------------------------------------------------------
/*!40... | true |
a804b85472e7ee6d6305acd2c7fed70d059101c4 | SQL | gxlioper/ecology | /data/Oracle/sql201603210103.sql | UTF-8 | 728 | 2.6875 | 3 | [] | no_license | create or replace procedure Hplayout_eid_update(hpid integer,ebaseid varchar2) as
type ref_cursor is ref cursor;
t_cur ref_cursor;
s_id hpElement.id%type;
v_sql varchar2(1000);
sqlstr varchar2(1000);
begin
v_sql := 'areaElements';
sqlstr:='select id from hpElement where isuse=1 and ebaseid='''||ebaseid||''' an... | true |
70626de0f177d7ba27e8113177d369aa50697a36 | SQL | goodsoul1914/DBA | /Scripts/Algemeen/Database/Standardize_Database_File_Sizes_and_AutoGrowth.sql | UTF-8 | 2,630 | 3.828125 | 4 | [] | no_license | /*
Author: Eitan Blumin (t: @EitanBlumin | b: eitanblumin.com)
Date: 2020-01-28
Description:
This script generates commands to implement a minimal standardization of all database
files in the instance.
List of implemented standards:
1. Files must not be allowed to have percentage growth (defaults to 1GB growth
... | true |
43ff8195e7c5edcbc36250b2ddb1f2f0312a6b9a | SQL | annjolie/daw2-incidencias | /problemas.sql | UTF-8 | 2,559 | 3.3125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 3.5.2.2
-- http://www.phpmyadmin.net
--
-- Servidor: 127.0.0.1
-- Xerado en: 27 de Mar de 2013 ás 16:11
-- Versión do servidor: 5.5.27
-- Versión do PHP: 5.4.7
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIE... | true |
64906cb3dba63f09dd5fb5f4ee5890803c8b0329 | SQL | debjava/OPE_releases | /source code/opeserver_Onsite_Release_Source_Code/database/set-up/ope_Install.sql | UTF-8 | 4,210 | 2.96875 | 3 | [] | no_license | --
/************************************************************************************************************************
* Copyright 2006 IDEAL INVENT Technologies Pvt. Ltd. *
* IDEAL INVENT Technologies Pvt. Ltd reserves all rights in the Program as delivered. ... | true |
a6e1c3e4c304b8266a926a26a3f84c3b54112467 | SQL | maxidelisio97/CtaCorrientes | /CuentasCorrientes/dbcta.sql | UTF-8 | 4,056 | 3.109375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.8.5
-- https://www.phpmyadmin.net/
--
-- Servidor: 127.0.0.1:3306
-- Tiempo de generación: 01-03-2021 a las 21:49:25
-- Versión del servidor: 5.7.26
-- Versión de PHP: 7.2.18
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/... | true |
6be48c6d864170789aaf0e6a2d189ae1eb8d4116 | SQL | sprokushev/Delphi | /MASTER/_DATABASE/Constraints/KLS_PROD_PLAN_FK.sql | UTF-8 | 222 | 2.984375 | 3 | [] | no_license | --
-- Foreign Key Constraints for Table KLS_PROD_PLAN
--
ALTER TABLE MASTER.KLS_PROD_PLAN ADD (
CONSTRAINT PROD_PLAN_PARENT_FK
FOREIGN KEY (PARENT_ID)
REFERENCES MASTER.KLS_PROD_PLAN (ID)
ENABLE NOVALIDATE);
| true |
cae1281a23c1354be618b435d36d6dbf076dc220 | SQL | Balupc/WiseOWL-SQL-Exercises | /Passing of the centuries.sql | UTF-8 | 151 | 3.40625 | 3 | [] | no_license | SELECT
1+(YEAR(EventDate)-1)/100 as [Century],
COUNT(EventName)
FROM
tblEvent
GROUP BY CUBE(
1+(YEAR(EventDate)-1)/100)
ORDER BY
Century | true |
d98a82b31ffb5ef99f91d6f655a9aa0a51800f79 | SQL | Mehul1887/MSSQLDatabase | /MSSQLDatabase/nan/Stored Procedures/GetEthnicityChildMasterAll.sql | UTF-8 | 685 | 2.921875 | 3 | [] | no_license | -- =============================================
-- Author: <Author,,ADMIN>
-- Create date: <Create Date,, 24 Apr 2017>
-- Description: <Description,,GetEthnicityChildMasterAll>
-- Call SP : nan.GetEthnicityChildMasterAll
-- =============================================
CREATE PROCEDURE [nan].[GetEthni... | true |
93243a7ec06ecb0b6426697ea73021d8e57d28e8 | SQL | danBohon/sim3 | /db/get_search_posts.sql | UTF-8 | 83 | 2.6875 | 3 | [] | no_license | select *
from users u
join posts p
on u.id = p.author_id
where title = ${search}; | true |
07ae105c84922c9abde295d1116d5d0fc883c91a | SQL | ttakei/fril | /app/create_db.sql | UTF-8 | 4,296 | 3.25 | 3 | [] | no_license | DROP TABLE users;
DROP TABLE groups;
DROP TABLE acos;
DROP TABLE aros;
DROP TABLE aros_acos;
DROP TABLE licenses;
DROP TABLE user_shop_accounts;
DROP TABLE request_headers;
DROP TABLE user_shop_apply_order_tmpls;
DROP TABLE user_shop_receive_fee_tmpls;
DROP TABLE user_shop_ship_tmpls;
DROP TABLE user_shop_evaluate_tmpl... | true |
5690491b8039485418001cf821af6491a1b058ce | SQL | silence-do-good/stress-test-Postgres-and-MySQL | /dump/high/day09/select1930.sql | UTF-8 | 191 | 2.734375 | 3 | [] | no_license |
SELECT timeStamp, temperature
FROM ThermometerObservation
WHERE timestamp>'2017-11-08T19:30:00Z' AND timestamp<'2017-11-09T19:30:00Z' AND SENSOR_ID='7cad6bda_c237_41c1_be90_1bc55c9d5623'
| true |
cf4add6d9b531ab8846393981d04c440f4d0e656 | SQL | MaxSoftwareDevelopment/MultiVendorBitcoinMart | /app/install/12_create_fees.sql | UTF-8 | 602 | 3.203125 | 3 | [
"BSD-3-Clause"
] | permissive | use mvbm;
CREATE TABLE IF NOT EXISTS `fees` (
`id` int(9) NOT NULL AUTO_INCREMENT,
`low` decimal(20,8) NOT NULL COMMENT 'Orders exceeding this value apply to this range',
`high` decimal(20,8) NOT NULL COMMENT 'Orders less than this value apply to this range',
`rate` decimal(4,3) NOT NULL COMMENT 'Percentage fe... | true |
b00e333e094b233e43948054382ea380fdb75553 | SQL | eshults5/imbi | /ddl/tables/v1/deployment_types.sql | UTF-8 | 1,235 | 3.609375 | 4 | [
"BSD-3-Clause"
] | permissive | SET search_path=v1;
CREATE TABLE IF NOT EXISTS deployment_types (
"name" TEXT NOT NULL PRIMARY KEY,
created_at TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT CURRENT_TIMESTAMP,
created_by TEXT NOT NULL,
last_modified_at TIMESTAMP WITH TIME Z... | true |
18e93b6e07053f88e8b2ec923b3d349eaa9cffea | SQL | kuixiao/SelectCourse | /db/tb_teacher.sql | UTF-8 | 477 | 2.578125 | 3 | [] | no_license | CREATE TABLE tb_teacher(
Tno char(6) NOT NULL PRIMARY KEY comment '教师职工编号',
Tname varchar(20) NOT NULL comment '教师姓名',
Tsex char(2) NOT NULL comment '教师性别' check(Tsex = '男' or Tsex = '女'),
Tbirthday datetime NOT NULL comment '教师出生日期',
Tdept varchar(20) NOT NULL comment '教师所属院系',
Tphone varchar(11) NOT NULL com... | true |
272c18347c18f815bdc0dc35f2f4fe45fe9d7b87 | SQL | jrjr-randy/backoffice | /sql/build_new_db/prometheus_tables/exception_logs.table.sql | UTF-8 | 900 | 3.609375 | 4 | [] | no_license | DROP PROCEDURE IF EXISTS table_create_prometheus_exception_logs;
DELIMITER //
CREATE PROCEDURE table_create_prometheus_exception_logs()
BEGIN
IF NOT EXISTS ( SELECT DISTINCT 1 FROM `information_schema`.`TABLES` WHERE `TABLE_SCHEMA` = DATABASE() AND `TABLE_NAME` = 'exception_logs' ) THEN
CREATE TABLE `exc... | true |
6f3f8f4275ccc54881b69fa52798a9a211bf30c7 | SQL | Dmitriy321/verliqps | /sql_script/core/rc_verlioka_15072017.sql | UTF-8 | 9,129 | 2.65625 | 3 | [] | no_license | --
-- PostgreSQL database dump
--
-- Dumped from database version 9.4.4
-- Dumped by pg_dump version 9.4.4
-- Started on 2016-08-11 15:25:56
SET statement_timeout = 0;
SET lock_timeout = 0;
SET client_encoding = 'UTF8';
SET standard_conforming_strings = on;
SET check_function_bodies = false;
SET client_m... | true |
d669e470527c1646c8446b829c4f08753eeb16bc | SQL | onlybhau/dbms | /Assignment7/stud.sql | UTF-8 | 708 | 3.5625 | 4 | [] | no_license |
delimiter //
create function stud() returns varchar(30) deterministic
begin
declare m,cnt,temp,r int(3) default(0);
declare c1 cursor for select total_marks,rno from student_marks;
select count(*) from student_marks into temp;
open c1;
repeat fetch c1 into m,r;
if(m>990 and m<1500) then
update student_result set class... | true |
6136afa94ad82aec178c7afd49e9c5dadef89892 | SQL | Isaacholtkamp/ComS-363-SQL-Project | /Item23.sql | UTF-8 | 158 | 3.203125 | 3 | [] | no_license | #Reports courses with lowest enrollments
Select e.CourseCode, count(e.CourseCode) as Enrollments
from Enrollment e
group by e.CourseCode
having min(count(*))
| true |
4057dd0417b44105acddaacfafe420536b66ea42 | SQL | benjaminVic/ESIEA3A_INF3031_BDD | /TD/TD1/ex_02_15.sql | UTF-8 | 184 | 3.25 | 3 | [] | no_license | SELECT last_name as "Employee", salary as "Monthly Salary",
commission_pct
FROM employees
WHERE salary < 12000 AND salary > 5000
AND department_id in (20,50)
AND commission_pct = 0.2
; | true |
3867eb9d0c8af8080154aa4fc21dfdca5349b64d | SQL | jmgold/SQL-Queries | /Testing/hold removed testing.sql | UTF-8 | 1,532 | 4.46875 | 4 | [
"LicenseRef-scancode-warranty-disclaimer"
] | no_license | SELECT DISTINCT ON (reason, h.patron_record_id, h.record_id)
CASE
WHEN h.holdshelf_status = 'c' THEN 'cancelled_on_shelf'
WHEN h.holdshelf_status = 'p' THEN 'picked_up_on_shelf'
WHEN h.holdshelf_status IS NULL AND h.removed_gmt::DATE >= h.expire_holdshelf_gmt::DATE THEN 'expired_holdshelf'
WHEN h.expires_gmt::DATE ... | true |
2454bdd25fe87b9e8173b4dcfa510bb0d3fcb366 | SQL | sergioivan154/androidVernam | /usb/DreamHome/Periodicos.sql | UTF-8 | 766 | 2.796875 | 3 | [] | no_license | drop table if exists periodicos;
create table periodicos(
num_periodico int(6) primary key,
nombre_peridico varchar(30)not null,
calle varchar(30)not null,
interior varchar(10)not null,
exterior varchar(10)not null,
colonia varchar(30),
delegacion varchar(30),
cp int(6)not null,
num_tel1 varchar(16),
num_tel2 varchar(... | true |
212f83413c03e227c0d2eef8cbc0666c9db92a2c | SQL | LevanceWam/MySQL | /RDFST/WhereClause/WhereClause.sql | UTF-8 | 541 | 3.703125 | 4 | [] | no_license | -- this query is returning the customers with more than 3000 points
-- the WHERE clause is filtering out the other points
SELECT *
FROM Customers
WHERE points > 3000;
-- This is returning the customers from VA
SELECT *
FROM Customers
WHERE state = 'VA';
-- This is returning the customers not from VA
SELECT *
FRO... | true |
cb8020af67bce78bbbc938abf6a11213d5ef8dce | SQL | DennisEzell/Beginning_T-SQL | /Chapter 4/DateAdd.sql | UTF-8 | 586 | 3.59375 | 4 | [] | no_license | SELECT
CONVERT(DATE,OrderDate) AS OrderDate,
CONVERT(DATE,DATEADD(YEAR,1,OrderDate)) AS OneMoreYear,
CONVERT(DATE,DATEADD(MONTH,1,OrderDate)) AS OneMoreMonth,
CONVERT(DATE,DATEADD(DAY,-1,OrderDate)) AS OneLessDay
FROM Sales.SalesOrderHeader
WHERE SalesOrderID IN (43659, 43714, 60621)
/*
OrderDate OneMoreYear On... | true |
0323f8f9a45614e76438e45b25e129c4577229cf | SQL | RPMorganomous/SQL-Sandbox | /Ex_Files_SQLSvr_2008_EssT/Ex_Files_SQLSvr_2008_EssT/Exercise Files/ch_06/04/06_04_CONDITIONS.sql | UTF-8 | 1,650 | 4.125 | 4 | [] | no_license | USE AdventureWorksLT
-- no WHERE, fetch everything
SELECT FirstName, LastName, EmailAddress
FROM SalesLT.Customer
-- basic text check
SELECT FirstName, LastName, EmailAddress
FROM SalesLT.Customer
WHERE LastName = 'vargas'
-- if field is numeric, no quotes
SELECT FirstName, LastName, EmailAddress
FROM SalesLT.Cus... | true |
d859ff6ba4b7e3ad682041726d45c4a77892f336 | SQL | dtloan7012/VTIacademy | /MySQL/Extra Assignment/Etra Assigment 4.sql | UTF-8 | 5,189 | 4.0625 | 4 | [] | no_license | DROP DATABASE IF EXISTS Testing ;
CREATE DATABASE IF NOT EXISTS Testing;
USE Testing;
-- Create Department table
DROP TABLE IF EXISTS Department;
CREATE TABLE IF NOT EXISTS Department (
Deparment_id TINYINT UNSIGNED AUTO_INCREMENT PRIMARY KEY,
Deparment_name VARCHAR(50) NOT NULL
);
... | true |
97a3ff4681ecbc9cdc5c8b6b26cc46a5e91f9e92 | SQL | Mateo1248/DBProject | /computerShop/database/najnowszydump.sql | UTF-8 | 38,441 | 3.21875 | 3 | [] | no_license | -- MySQL dump 10.13 Distrib 8.0.12, for Win64 (x86_64)
--
-- Host: 127.0.0.1 Database: computershop
-- ------------------------------------------------------
-- Server version 8.0.12
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RES... | true |
483a2b8508308c477b7a314b3f9b8d3c8a7dcafd | SQL | laylacomparin/banco_dados | /TAREFAS/TAREFA2.SQL | UTF-8 | 1,441 | 3.84375 | 4 | [] | no_license | CREATE DATABASE GESTAOEMPRESA;
USE GESTAOEMPRESA;
CREATE TABLE DEPARTAMENTO(
ID_DEPART SMALLINT AUTO_INCREMENT,
NOMEDEPART VARCHAR (200) NOT NULL,
NOMESETOR VARCHAR (200) NOT NULL,
PRIMARY KEY (ID_DEPART)
);
CREATE TABLE FUNCIONARIOS(
MATRICULA INT AUTO_INCREMENT,
CPF BIGINT (11) NOT NULL,
NOME VA... | true |
78a90d6e9a0fcb609e1108fc33401550dc59c22d | SQL | nksarea/nksarea | /system/template/sql/getRecord.sql | UTF-8 | 205 | 3.0625 | 3 | [] | no_license | -- Liest einen Datensatz anhand tabelle und id aus
-- @param table string Die Tabelle
-- @param id integer Die ID des Datensatzes
-- @author Cédric Neukom
SELECT *
FROM `%{table}%`
WHERE `id` = '%{id}%'
LIMIT 1 | true |
101f2801cefe544e2aab51983f10575abfeda52d | SQL | bosskme/holbertonschool-higher_level_programming | /0x0E-SQL_more_queries/6-states.sql | UTF-8 | 200 | 2.65625 | 3 | [] | no_license | -- Create database and table
CREATE DATABASE IF NOT EXISTS hbtn_0d_usa;
CREATE TABLE IF NOT EXISTS hbtn_0d_usa.states(
id INT NOT NULL AUTO_INCREMENT,
name VARCHAR(256) NOT NULL,
PRIMARY KEY(id));
| true |
ca6112000c153a8fd3767a08924f8b9e87e92105 | SQL | eliseekn/jstore | /db.sql | UTF-8 | 1,743 | 3.46875 | 3 | [] | no_license | -- create database for products, users and products' categories
CREATE DATABASE `jstore` CHARACTER SET 'utf8';
-- select database
USE `jstore`;
-- create tables
CREATE TABLE `categories` (
id INT(11) NOT NULL AUTO_INCREMENT PRIMARY KEY,
name VARCHAR(255) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE ... | true |
f0518b6cc825767e5789483e03e27e2d7089459b | SQL | kemsguy7/blogging-system | /database/blog2.sql | UTF-8 | 7,963 | 3.140625 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.9.1
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Generation Time: Nov 13, 2020 at 08:17 AM
-- Server version: 5.7.24
-- PHP Version: 7.2.19
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACT... | true |
8516cf1cd73932fb4e12f548f31e59142c995201 | SQL | 1666459266/ArtificialIntelligence | /SpirngCloudAlibabaEnvironmental/zptc.sql | UTF-8 | 28,091 | 3.21875 | 3 | [] | no_license | /*
Navicat Premium Data Transfer
Source Server : localhost_3306
Source Server Type : MySQL
Source Server Version : 50728
Source Host : localhost:3306
Source Schema : zptc
Target Server Type : MySQL
Target Server Version : 50728
File Encoding : 65001
Date: 24/06/2020 ... | true |
da1424346af5048ce6c4ce4bf1ca53945d153311 | SQL | Sigeu/htyjn | /data/databack/tp_hall.sql | UTF-8 | 7,776 | 3.265625 | 3 | [] | no_license | /*
Navicat MySQL Data Transfer
Source Server : 环拓阿里云
Source Server Version : 50637
Source Host : 47.88.228.80:3306
Source Database : ht-memorial
Target Server Type : MYSQL
Target Server Version : 50637
File Encoding : 65001
Date: 2017-07-29 11:07:32
*/
SET FOREIGN_KEY_CHECKS=0;
-... | true |
5894c017ae5e9c60c5f6df586980b2a4d939fc19 | SQL | filove001/ltsh-admin | /eadmin/src/main/resources/sql/cmsArticleData.sql | UTF-8 | 611 | 2.71875 | 3 | [] | no_license | page
===
select @pageTag(){
#use("cols")#
@}
from cms_article_data where #use("like")#
cols
===
id,content,copyfrom,relation
condition
===
1 = 1
@if(!isEmpty(id)){
and id=#id#
@}
@if(!isEmpty(content)){
and content=#content#
@}
@if(!isEmpty(copyfrom)){
and copyfrom=#copyfrom#
@}
@if(!isEmpty(relation... | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.