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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
b736cb4bc748628b80d86483a42dd62d5d551f09 | SQL | OlegKhaykin/OK_Lib | /OK_PLSQL_lib/1.Generic/01.Types.sql | UTF-8 | 985 | 3.140625 | 3 | [
"MIT"
] | permissive | begin
for r in
(
select owner, type_name from all_types
where owner = SYS_CONTEXT('USERENV','CURRENT_SCHEMA')
and type_name in ('OBJ_NAME_VALUE','TAB_NAME_VALUES','TAB_V256')
order by type_name desc
)
loop
execute immediate 'drop type '||r.owner||'.'||r.type_name;
end loop;
end;
/
CREATE ... | true |
926a9636aed74011a00dce77e27c59487d1d54df | SQL | mehtaharsh15/Pay2All | /pay2all.sql | UTF-8 | 1,717 | 3.265625 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.5.4.1deb2ubuntu2.1
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Oct 31, 2019 at 06:11 PM
-- Server version: 5.7.27-0ubuntu0.16.04.1
-- PHP Version: 7.0.33-0ubuntu0.16.04.6
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
--
-- Database: `p... | true |
2f4d9e65e29d35565dbe6410c60b5cabe1ace2e7 | SQL | miraDask/DB-Basics-MS-SQL-Server-Sept-2019 | /06.SUBQUERIES AND JOINS/P04.Employee Departments.sql | UTF-8 | 219 | 3.734375 | 4 | [] | no_license | SELECT TOP(5)
e.EmployeeID,
e.FirstName,
e.Salary,
d.[Name]
FROM Employees AS e
JOIN Departments AS d ON e.DepartmentID = d.DepartmentID
WHERE e.Salary > 1500
ORDER BY e.DepartmentID | true |
77c4adfe44484840477e0f8baa6ce0aa3e1ff5a7 | SQL | medamine95/gmail-contact-importer | /laraveldb.sql | UTF-8 | 4,110 | 3.203125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.8.1
-- https://www.phpmyadmin.net/
--
-- Hôte : 127.0.0.1
-- Généré le : mer. 06 mars 2019 à 20:30
-- Version du serveur : 10.1.33-MariaDB
-- Version de PHP : 7.2.6
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101... | true |
57859f13425cab4dc1971d433778de6aaed4aa75 | SQL | knuber/hc_comp | /SQL/DB2/DB2 for i/STATEMENTS SETUP.sql | UTF-8 | 3,552 | 4.03125 | 4 | [] | no_license |
CREATE TABLE RLARP.FFSTMTD(
STMT varchar(255) ,
SEQ int,
FGRP varchar(7),
EFLAG varchar(30),
LINE int,
L_DESCR varchar(255),
AGG_FLG varchar(1),
PLINE int,
PRE_SIGN int,
POST_SIGN int,
STAT varchar(10),
SUPP_S varchar(255)
);
--------------------------------------------------------------------------------... | true |
53bbb73d70378f2f6b22cfee56d2decfaa97a07f | SQL | dadisigursveinn/wallgag | /database_breytingar.sql | UTF-8 | 661 | 3.5 | 4 | [] | no_license | DELETE FROM users;
INSERT INTO categories (categoryName) values
('Animals'),
('Artistic'),
('City'),
('Films'),
('Games'),
('Nature'),
('Space'),
('Other')
SELECT * FROM users;
ALTER TABLE images
ADD uploaderName varchar(15);
ALTER TABLE images
ADD uploadDate TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP;
drop pro... | true |
cd7dffc65784c45ee60db0cafb6347af8e4ef61d | SQL | VeselinAtanasov/mysql-database-demos | /mysql-database-demos/11_DatabaseBasicsMySQLExam-9Jun2019/tasks/08_Top5Employees.sql | UTF-8 | 289 | 4.28125 | 4 | [] | no_license | SELECT CONCAT(e.`first_name`, ' ', e.`last_name`) AS 'name', `started_on`, COUNT(ec.`client_id`) AS 'count_of_clients'
FROM `employees` AS e
LEFT JOIN `employees_clients` AS ec ON e.`id` = ec.`employee_id`
GROUP BY `name`, `started_on`
ORDER BY `count_of_clients` DESC, e.`id` ASC
LIMIT 5; | true |
745e9317e809a292832fe824a012947348b3397b | SQL | a559927z/doc | /chinahrd-hrbi/base/src/test/resources/pro-script/pro_fetch_dim_position.sql | UTF-8 | 2,005 | 3.5625 | 4 | [] | no_license | #=======================================================pro_fetch_dim_position=======================================================
-- 'b5c9410dc7e4422c8e0189c7f8056b5f','3cfd3db15ffc4c119e344e82eb8cbb19'
-- 'demo','jxzhang'
-- 保证:dim_organization表存在
-- DELIMITER //
DROP PROCEDURE IF EXISTS `pro_fetch_dim_posit... | true |
5874a39d856d02cc7ad76b3d3a20003fb3246768 | SQL | digitalfarmer/bakd | /Retur/retur_KDT.sql | UTF-8 | 263 | 2.65625 | 3 | [] | no_license | UPDATE sl_faktur_retur_global
SET bebas_ppn_std = sub_total
WHERE tgl_faktur_retur BETWEEN "2019-04-01" AND "2019-02-31" AND status_tercetak<>"B"
AND kode_divisi_produk IN (SELECT Kode_Divisi_Produk FROM ms_divisi_produk_bebas_ppn)
AND bebas_ppn_std <> sub_total
| true |
efdcf51b90c0872db54e579260f5fc5511ae37bd | SQL | reisritter/turma11java | /bd/mysql/ex2.sql | UTF-8 | 12,679 | 3.078125 | 3 | [] | no_license | create database if not exists db_RH2;
use db_RH2;
drop table if exists tb_cargo;
create table if not exists tb_cargo
(
id int primary key auto_increment,
nome varchar(255),
vigencia bool
);
drop table if exists tb_funcionario;
create table if not exists tb_funcionario
(
id int primary key auto_increment,
... | true |
8fb48c900ade684fcc457c7fe235b423797c1586 | SQL | HUYNHTHANHTHU/RAILWAY06 | /SQL/test 2.sql | UTF-8 | 3,411 | 3.75 | 4 | [] | no_license | DROP DATABASE IF EXISTS test_2;
CREATE DATABASE test_2;
USE test_2;
DROP TABLE IF EXISTS users;
CREATE TABLE users (
id INT(10) PRIMARY KEY AUTO_INCREMENT,
first_name VARCHAR(30),
last_name VARCHAR(30),
email VARCHAR(100),
phone VARCHAR(20),
employee_id VARCHAR(10),
avatar TEXT,
... | true |
d33e3d17913cf2ba322d833a397c16867f0cebd9 | SQL | CodipherX/Airbus-Aerothon | /Database/Create_Tables.sql | UTF-8 | 2,826 | 3.8125 | 4 | [] | no_license | CREATE TABLE Airports (
id INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
airport_name VARCHAR(255) NOT NULL,
iata VARCHAR(255) NOT NULL,
inserted TIMESTAMP default CURRENT_TIMESTAMP
);
CREATE TABLE Users (
id INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
email VARCHAR(255),
hash_password VARCHAR(255) NOT NULL,
first_name VARCH... | true |
85ac379b7e9930343082d00a9e67a5f436d307a4 | SQL | chuigeng/spider-man | /spider-man/db/spider_man.sql | UTF-8 | 682 | 2.96875 | 3 | [] | no_license | SET FOREIGN_KEY_CHECKS=0;
-- ----------------------------
-- Table structure for sm_trouble_maker
-- ----------------------------
DROP TABLE IF EXISTS `sm_trouble_maker`;
CREATE TABLE `sm_trouble_maker` (
`troubleMakerId` varchar(32) NOT NULL COMMENT '主键 ID',
`url` varchar(1024) NOT NULL COMMENT '爬取的 URL',... | true |
21bd55f2fb786d0368c58918bc564e6b0f931874 | SQL | demianbarry/web-db | /inventario/trunk/DBScripts/48.create_table.sql | UTF-8 | 493 | 3.15625 | 3 | [] | no_license | USE inventario;
START TRANSACTION;
CREATE TABLE `inventario`.`condiciones_compra` (
`condicion_compra_id` INTEGER UNSIGNED NOT NULL AUTO_INCREMENT,
`nombre` VARCHAR(50) NOT NULL,
`descripcion` VARCHAR(255) NOT NULL,
`observaciones` MEDIUMTEXT DEFAULT NULL,
PRIMARY KEY (`condicion_compra_id`),
UNIQUE `no... | true |
97695679b516b3c5fea3fd6d6b5f598580b82a70 | SQL | carlos-sierra/cscripts | /cs_top_indexes.sql | UTF-8 | 2,392 | 3.328125 | 3 | [] | no_license | ----------------------------------------------------------------------------------------
--
-- File name: cs_top_indexes.sql
--
-- Purpose: Top Indexes according to Segment(s) size
--
-- Author: Carlos Sierra
--
-- Version: 2020/12/09
--
-- Usage: Execute connected to CDB or PDB.
--
-- ... | true |
d59b1df2f8f1505cf0047cc1731ef3d5fba94ed4 | SQL | Bharadwajgr/Hotel_management | /database/hotel.bak.sql | UTF-8 | 17,594 | 3 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 3.3.9
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Mar 26, 2012 at 04:34 AM
-- Server version: 5.5.8
-- PHP Version: 5.3.5
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SE... | true |
dc967b060a527cf1430f4c126cf766f4f720c120 | SQL | changhakim/HOME_SQL | /SOCCER.sql | UHC | 2,952 | 4.21875 | 4 | [] | no_license | -- SOCCER_SQL_015
-- STADIUM ϵ ߿
-- Ȩ
-- īƮ 20
SELECT S.STADIUM_NAME ,S.STADIUM_ID,S.SEAT_COUNT,S.HOMETEAM_ID,T.E_TEAM_NAME
FROM (SELECT STADIUM_NAME,HOMETEAM_ID,STADIUM_ID,SEAT_COUNT
FROM STADIUM) S
FULL OUTER JOIN TEAM T ON T.STADIUM_ID LIKE S.STADIUM_ID
ORDER BY HOMETEAM_ID;
-- SOCCER_... | true |
30f21ebd8879674f59790d8b7445e12730cfe70e | SQL | radtek/Telecommunication | /K7/DataBase/VIEW/V_PHONE_NUMBER_CREDITS.sql | UTF-8 | 820 | 3.546875 | 4 | [] | no_license | CREATE OR REPLACE VIEW V_PHONE_NUMBER_CREDITS AS
SELECT C.PHONE_NUMBER_FEDERAL,
A.SURNAME||' '||A.NAME||' '||A.PATRONYMIC FIO,
C.DISCONNECT_LIMIT,
T.BALANCE_BLOCK_CREDIT
FROM CONTRACTS C,
ABONENTS A,
TARIFFS T
WHERE C.IS_CREDIT_CONTRACT=1
AND C.ABONENT_ID=A.A... | true |
0339c74ea0336cd4e88ea3dda5b9bc2020795279 | SQL | slotcz/jdevProjects | /CreateDBObj_STB/Schema_DB_STB/create_view_stb.sql | UTF-8 | 182 | 2.9375 | 3 | [] | no_license | CREATE VIEW STB_CURRENT_VERSION_FW AS SELECT stb.id, stb.mac, stb.category, rfw.id, rfw.version. rfw.category
FROM stb, register_fw rfw
WHERE stb.category = rfw.category;
| true |
367ac3a7bb4c957a2c1660e7b883679f09598619 | SQL | jacksonjunelee/Wiki.r | /db/schema.sql | UTF-8 | 968 | 3.328125 | 3 | [] | no_license | -- drop table if exists authors cascade;
drop table if exists versions cascade;
drop table if exists documents cascade;
drop table if exists comments cascade;
create table authors(
id serial primary key,
first_name varchar(255) not null,
last_name varchar(255) not null,
username varchar(255) not null,
password ... | true |
7a210e1e82cb4cc37870ee6b0c4aa1fd07903229 | SQL | wvanheemstra/core | /apps/individuals/models/views/structures/sql/individual_party.sql | UTF-8 | 622 | 2.65625 | 3 | [
"MIT"
] | permissive | /*
Navicat MySQL Data Transfer
Source Server : wvanheem_core_local
Source Server Version : 50509
Source Host : 127.0.0.1
Source Database : core
Target Server Version : 50509
File Encoding : utf-8
*/
SET NAMES utf8;
SET FOREIGN_KEY_CHECKS = 0;
-- ----------------------------
--... | true |
56ee0ce750db6db0b16b17de9943ed70920bf10f | SQL | dhildeb/Contracted | /Contracted/setup.sql | UTF-8 | 1,028 | 3.859375 | 4 | [] | no_license | CREATE Table IF NOT Exists contractors(
id VARCHAR(255) NOT NULL PRIMARY KEY COMMENT "Primary Key",
name VARCHAR(255),
expertise VARCHAR(255),
rating int
) DEFAULT charset utf8 COMMENT '';
CREATE Table IF NOT Exists jobs(
id int NOT NULL AUTO_INCREMENT PRIMARY KEY COMMENT "Primary Key",
title VARCHAR(255) N... | true |
f89b0d038d2d4f6c86cbf0b9b53ed1ec000a8a1f | SQL | tainenko/Leetcode2019 | /leetcode/editor/en/[1204]Last Person to Fit in the Bus.sql | UTF-8 | 2,753 | 4.5625 | 5 | [] | no_license | #Table: Queue
#
#
#+-------------+---------+
#| Column Name | Type |
#+-------------+---------+
#| person_id | int |
#| person_name | varchar |
#| weight | int |
#| turn | int |
#+-------------+---------+
#person_id is the primary key column for this table.
#This table has the information... | true |
8525dff9a63fc2faced95fc77fb5ee530c6e5d60 | SQL | KehrenDev/Kentico-Xperience-SQL-Utility-Scripts | /src/KX12-to-13-Upgrade/PreUpgrade/PREUPGRADE-5-SetCompatabilityLevel.sql | UTF-8 | 1,023 | 2.609375 | 3 | [
"Unlicense"
] | permissive | -------------------------------------------------------------------------------
-------- PRE UPGRADE Kentico Xperience 12 to Kentico Xperience 13 ------------
-------- Database Compatability Level Fix ------------
-- Instances of Kentico Xperience that started before KX 12 may have an older--
... | true |
f26dba203bd7e6bfb31d48501171974752707cac | SQL | Janani-Manoharan/Login-ass1-A00211748 | /setup/data/init.sql | UTF-8 | 1,041 | 3.46875 | 3 | [] | no_license | --username - Mark, password - mark
--username - James, password - james
--username - Jack, password - jack
use database;
CREATE TABLE blog_author (
author_email varchar(255) primary key
,author_name varchar(255) not null
,hash_val varchar(255) not null
);
CREATE TABLE blog_lists (
author_id int primary key AUTO_I... | true |
251cc64052ba980d10251b2b4e8e265d8164a8cf | SQL | RMLio/rmlmapper-java | /src/test/resources/test-cases/RMLTC0003c-SQLServer/resource.sql | UTF-8 | 251 | 2.78125 | 3 | [
"MIT",
"LGPL-3.0-only",
"EPL-1.0",
"MPL-2.0",
"BSD-3-Clause",
"LGPL-2.0-or-later",
"GPL-2.0-only",
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | EXEC sp_msforeachtable 'ALTER TABLE ? NOCHECK CONSTRAINT all'
EXEC sp_msforeachtable 'DROP TABLE ?'
CREATE TABLE student (
"ID" INTEGER,
"FirstName" VARCHAR(50),
"LastName" VARCHAR(50)
);
INSERT INTO student values ('10', 'Venus', 'Williams');
| true |
bb6c6fc55853f30e08defc1634e07e00b871c979 | SQL | monirahmedtanveen/Ecommerce---Codeigniter-Application | /db_ecomerce.sql | UTF-8 | 16,803 | 2.921875 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | -- phpMyAdmin SQL Dump
-- version 4.4.12
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Jan 27, 2016 at 05:54 AM
-- Server version: 5.6.25
-- PHP Version: 5.6.11
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;... | true |
b1c32b6958ef1816ec25982b64d5fef501ed3c1f | SQL | aprajapati/datasci_course_materials | /assignment2/similarity_matrix.sql | UTF-8 | 136 | 3.34375 | 3 | [] | no_license | select sum( A.count * B.count )
from frequency A, frequency B
where A.term = B.term and A.docid < B.docid
group by A.docid, B.docid;
| true |
358f303012663f007e6967739544165edc65ff1c | SQL | liujiancheng2015/shop | /玩具数据库/db_wlgw.sql | UTF-8 | 10,990 | 2.9375 | 3 | [] | no_license | /*
Navicat MySQL Data Transfer
Source Server : localhost_3306
Source Server Version : 50090
Source Host : localhost:3306
Source Database : db_wlgw
Target Server Type : MYSQL
Target Server Version : 50090
File Encoding : 65001
Date: 2015-05-26 22:26:27
*/
SET FOREIGN_KEY_CHECKS=0;
... | true |
9ced3115d7d8fdafc3e302cdec247ec782c9fe5e | SQL | vipuldivyanshu92/Projects | /AoC/AOCEmuDev/db/MySQL/dbCreate.sql | UTF-8 | 2,083 | 3.609375 | 4 | [] | no_license | /******************************************************************************/
/*************************** Age Of Conan Database ****************************/
/***************************** By Ashura75013 ********************************/
CREATE SCHEMA aocemudb;
CREATE USER aocemu IDENTIFIED BY 'aocemu';
USE aoc... | true |
fe5af039e38984e459c56c505909f81f6d2a9c5c | SQL | WagnerWFM/SQLALGAWORKS | /Capítulo 01 - dando privilégios a outro user.sql | UTF-8 | 343 | 2.59375 | 3 | [] | no_license | select * from aluno;
select * from professor;
-- permissao de select e insert para schema pedido_venda em user algaworks acessando localmente ( localhost)
grant select, insert on pedido_venda.* to 'algaworks'@'localhost'
flush privileges;
grant select, insert, alter, delete on escola_ingles.* to 'algaworks'@'localh... | true |
4382004d23943ff7ecc760a7b8612a5f313f8544 | SQL | CooperZA/BI_and_Advanced_Analytics | /Assignments/Assignment_1/Assignment-1-Cooper-Zach.sql | UTF-8 | 410 | 3.09375 | 3 | [] | no_license | Select LastName, FirstName, MaritalStatus, EmailAddress, Education, YearlyIncome, TotalChildren, NumberCarsOwned, NumberChildrenAtHome from DimCustomer where Education = 'Bachelors';
Select * from DimProduct left outer join FactSales on DimProduct.ProductKey = FactSales.ProductKey order by DimProduct.ProductKey;
Sele... | true |
f3d6a495d42c8ffd8c8a44b1af534efda140368f | SQL | halimmadjid/SQL-w4-d2 | /movie-theater-table.sql | UTF-8 | 483 | 3.515625 | 4 | [] | no_license | CREATE TABLE customers (
customer_id SERIAL PRIMARY KEY,
membership_id VARCHAR (16)
);
CREATE TABLE tickets (
ticket_id SERIAL PRIMARY KEY,
FOREIGN KEY(customer_id) REFERENCES customers(customer_id)
);
CREATE TABLE concessions (
order_id SERIAL PRIMARY KEY,
payment NUMERIC(10,2),
item VARCHAR(200)
FOREIGN ... | true |
1343c96c01665b3f02e102b2541f4f571ac1384b | SQL | sunnyoyes/Order | /main/resources/data/h2/schema.sql | UTF-8 | 1,736 | 3.40625 | 3 | [] | no_license | /*
* http://localhost:8080/h2-console
*
* JDBC URL: jdbc:h2:mem:testdb
*
*/
DROP TABLE SECUENCIAS IF EXISTS;
DROP TABLE LINEAS_PEDIDO IF EXISTS;
DROP TABLE PEDIDOS IF EXISTS;
DROP TABLE CAMAREROS IF EXISTS;
DROP TABLE PRODUCTOS IF EXISTS;
DROP TABLE CONTACTOS_CLIENTE IF EXISTS;
D... | true |
617c6b30fc3a923551aec173ed0cf72475195307 | SQL | bk-10/Certificate_Management_System | /sample database/pan_id_sample.sql | UTF-8 | 7,613 | 2.65625 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.5.1
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Nov 08, 2016 at 05:11 PM
-- Server version: 10.1.13-MariaDB
-- PHP Version: 5.6.23
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CL... | true |
d1914304a988d69a1e905ce6f94fd707098440ac | SQL | jaittola/postgresql-scripts | /create_schema.sql | UTF-8 | 252 | 2.671875 | 3 | [] | no_license |
CREATE EXTENSION IF NOT EXISTS "uuid-ossp";
CREATE TABLE IF NOT EXISTS users (
id SERIAL PRIMARY KEY,
secret_id UUID NOT NULL UNIQUE DEFAULT uuid_generate_v4(),
username VARCHAR,
yachtname VARCHAR,
email VARCHAR
);
| true |
045bfd43a717ffacfdc0dd4137431f7138e5a281 | SQL | hackathonUTC/trocecocup | /includes/swift(2).sql | UTF-8 | 1,791 | 3.125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.4.1.1
-- http://www.phpmyadmin.net
--
-- Client : localhost:3306
-- Généré le : Dim 29 Novembre 2015 à 09:32
-- Version du serveur : 5.5.42
-- Version de PHP : 5.6.7
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
--
-- Base de données : `swift`
--
-- ------... | true |
8f05dcb66f8f1c61040d778ac2c95817bc2caacc | SQL | LouisAldorio/latest-inception-backend | /migration/000009_create_schedule_user_table.up.sql | UTF-8 | 213 | 3.578125 | 4 | [] | no_license | CREATE TABLE IF NOT EXISTS schedule_user (
user_id INTEGER NOT NULL,
schedule_id INTEGER NOT NULL,
FOREIGN KEY (user_id) REFERENCES user (id),
FOREIGN KEY (schedule_id) REFERENCES schedule (id)
); | true |
f988937e84414e949d0426921286205766a9e2b2 | SQL | bellmit/flexdb | /2.HOST/3.Procedure/od0066.sql | UTF-8 | 5,901 | 3.375 | 3 | [] | no_license | CREATE OR REPLACE PROCEDURE od0066 (
PV_REFCURSOR IN OUT PKG_REPORT.REF_CURSOR,
OPT IN VARCHAR2,
BRID IN VARCHAR2,
F_DATE IN VARCHAR2,
T_DATE IN VARCHAR2,
I_BRID IN VARCHAR2,
SYMBOL IN VARCHAR2,
EXECTYPE... | true |
f1110483bd6a236af204d82c3f371a3036fc8863 | SQL | xp137221357/sql_personal_business | /xiaopan_sum/代理数据/t_group_ref表/func_getAllSonUser.sql | UTF-8 | 1,017 | 3.140625 | 3 | [] | no_license | CREATE DEFINER=`report`@`%` FUNCTION `func_getAllSonUser`(`rootId` VARCHAR(20), `userlevel` VARCHAR(20))
RETURNS mediumtext CHARSET utf8
LANGUAGE SQL
NOT DETERMINISTIC
CONTAINS SQL
SQL SECURITY DEFINER
COMMENT ''
BEGIN
DECLARE sTempChd MEDIUMTEXT;
DECLARE temp MEDIUMTEXT;
DECLARE currentLev... | true |
1af5b1b4756cc9c8a44da0336bf67268bc20422b | SQL | tony-hub/HIVESQL | /poi_test.sql | UTF-8 | 2,066 | 3.40625 | 3 | [] | no_license | create table SERVICE_SECURITY.poi_test
(
city_name STRING comment'城市名',
name STRING comment'起终点名字',
type STRING comment'POI类型'
)
PARTITIONED BY(
`year` STRING,
`month` STRING,
`day` STRING)
ROW FORMAT SERDE 'org.apache.hadoop.hive.ql.io.orc.OrcSerde'
STORED AS INPUTFORMAT 'org.apache.hadoop.hive.ql.io.orc.OrcInput... | true |
137060fc41ce26b4762a9675c4b94fb3d955b03d | SQL | samuel-j-rossi/NCAA-Database | /CBDB_table_creation.sql | UTF-8 | 2,074 | 3.546875 | 4 | [] | no_license | /* BIG EAST TOURNAMENT DATABASE */
/* Creation of database schema */
DROP TABLE COLLEGE CASCADE CONSTRAINTS;
DROP TABLE PLAYER CASCADE CONSTRAINTS;
DROP TABEL GAME CASCADE CONSTRAINTS;
DROP TABLE GAME_INSTANCE CASCADE CONSTRAINTS;
CREATE TABLE COLLEGE(
TeamID INT NOT NULL,
Team_Name Char(50) NOT NULL,
... | true |
a535b1fbbc7aaab7c426a253a4f975f899a4c2ae | SQL | prajaktapingale/Leetcode-Sql-Solutions | /1355. Activity Participants.sql | UTF-8 | 456 | 3.6875 | 4 | [] | no_license | # Write your MySQL query statement below
select activity
from Friends
group by activity
having count(*) > (select min(counts)
from (select activity, count(id) as counts
from Friends
group by activity)t1)
and count(*) < (select max(counts)
... | true |
0cac251a2968c5a49759649ac25bfb7b8a76e325 | SQL | fenago/Oracle12cCourse | /ora12labs/lab_07_02.sql | UTF-8 | 401 | 2.8125 | 3 | [] | no_license | select pu.uname, -- lab_07_02.sql
pe.ssn_sm,
pe.name_ind,
pe.yr_mo_last_phys_ex,
ps.cum_ret_pt,
pg.pay_gr,
pe.depn_nbr
from pers_person_tbl pe, pers_svcmbr_tbl ps,
pers_unit_tbl pu,pers_svcmbr_pay_tbl pg
where pe.ssn_sm = ps.ssn_sm
and pe.rec_prec = ps.rec_prec
and... | true |
c32478ae52a053f72af923ae5e7c5cad01db531e | SQL | AMrozik/PJATK-JAZ | /app/src/main/resources/db.changelog/20191128_zad4.sql | UTF-8 | 1,156 | 3.75 | 4 | [] | no_license | create table section(
id int not null primary key,
name varchar not null
);
create table category(
id int not null primary key,
section_id int not null,
name varchar not null,
foreign key (section_id) references section (id)
);
create table auction(
id bigint not null primary key,
cate... | true |
f8400af03af9746cb8cf117ea70b50b310ca31a1 | SQL | 64Harshit98/SQL-SERVER | /OINM Transvalue.sql | UTF-8 | 2,366 | 3.921875 | 4 | [] | no_license | SELECT *
FROM INFORMATION_SCHEMA.COLUMNS
WHERE TABLE_NAME='OINM';
--OINM
SELECT TransType, SUM( TransValue )'TransValue', SUM(InQty)'InQty', SUM(OutQty)'OutQty'
FROM OINM
GROUP BY TransType;
--OITM
SELECT *
FROM INFORMATION_SCHEMA.COLUMNS
WHERE TABLE_NAME='OITM';
SELECT ItemName, ItemCode,
ROW_NUMBER() OVER(PARTITI... | true |
e87f4a3bf66412da1e8cbe2421d6bf0e89b175a2 | SQL | juangranda/sql-zoo | /SelectFromCountry.sql | UTF-8 | 1,516 | 4.0625 | 4 | [] | no_license | Select from Country
SELECT name, continent, population FROM world
SELECT name FROM world
WHERE population>200000000
SELECT name, GDP/population
FROM world
WHERE population>200000000
SELECT name, population/1000000
FROM world
WHERE continent LIKE 'South America'
SELECT name, population
FROM world
WHERE name ='Franc... | true |
87907e86f44d55c2170fc37be630cbd94633135c | SQL | JacobGonzalez0/database_exercises | /albums_migration.sql | UTF-8 | 335 | 3.015625 | 3 | [] | no_license | USE codeup_test_db;
CREATE TABLE `albums` (
`id` int(10) UNSIGNED NOT NULL,
`artist` varchar(100) NOT NULL,
`name` varchar(100) NOT NULL,
`release_date` int(11) NOT NULL,
`sales` float NOT NULL,
`genre` varchar(100) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
ALTER TABLE `albums`
ADD PRIMARY KEY (... | true |
0f152d4f412e7f0c09a25c92c0548e324c9dfdcf | SQL | melsborburgh/kederan | /src/main/database/latest/views/kdr_char_errors_view.sql | UTF-8 | 1,144 | 3.984375 | 4 | [] | no_license |
CREATE OR REPLACE FORCE EDITIONABLE VIEW KDR_CHAR_ERRORS_VIEW (LABEL, CHAR_ID,
TEXT) AS
with xp_data as (select char_id, get_total_xp(char_id) total_xp, get_total_xp_
spend(char_id) total_xp_spend from kdr_characters)
select 'Soorten rasvaardigheden' label,
char_id,
'Dit personage h... | true |
7ff86baccd3defda511132dcdb23b36ba035985f | SQL | PascalHonegger/LePrAtos_Server | /Datenbank/CreateDB.sql | UTF-8 | 3,945 | 3.40625 | 3 | [] | no_license | -- MySQL Script generated by MySQL Workbench
-- 03/10/16 11:50:28
-- Model: New Model Version: 1.0
-- MySQL Workbench Forward Engineering
SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0;
SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0;
SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='TRADITION... | true |
26e7604653aab7d5125e8f1f739e5d855d85a6df | SQL | Arihant-kr-33/infinito-2k19 | /infinitoAdmin.sql | UTF-8 | 5,363 | 2.796875 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.6.6deb5
-- https://www.phpmyadmin.net/
--
-- Host: localhost:3306
-- Generation Time: Sep 14, 2019 at 06:20 PM
-- Server version: 5.7.27-0ubuntu0.18.04.1
-- PHP Version: 7.2.19-0ubuntu0.18.04.2
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHA... | true |
ea7435cde1b45e4d049112cd7755abf08bff340a | SQL | tsmoraes/design-de-interacao-com-php-e-bootstrap | /DB e Mockup/design-de-interacao.sql | UTF-8 | 2,771 | 3.234375 | 3 | [
"MIT"
] | permissive | -- phpMyAdmin SQL Dump
-- version 4.8.2
-- https://www.phpmyadmin.net/
--
-- Host: localhost:3306
-- Generation Time: 01-Out-2018 às 06:53
-- Versão do servidor: 5.7.23
-- PHP Version: 7.1.21
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CH... | true |
62f0784612edb093509c831f2d70840e03f4bad2 | SQL | slamet789/restfulapi | /api/api_db.sql | UTF-8 | 1,383 | 2.984375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.7.0
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Apr 15, 2018 at 03:07 PM
-- Server version: 10.1.25-MariaDB
-- PHP Version: 5.6.31
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OL... | true |
bffed4c2f7749a792587abaef87a2784d532d5e0 | SQL | butterfly1of4/Complete_addressbook | /backend/settings.sql | UTF-8 | 897 | 3.34375 | 3 | [] | no_license | CREATE DATABASE addressbook;
CREATE USER addressbookuser WITH PASSWORD 'addressbook';
GRANT ALL PRIVILEGES ON DATABASE addressbook TO addressbookuser;
--instructions:
-- if you already have an addressbook database run:
--DROP DATABASE addressbook;
--DROP USER addressbookuser;
--Then, to create addressbook database i... | true |
2dab26969ebbe2ee16f32ce52a0db761b2726cda | SQL | OrionJoshi/SQL | /Hospital_DB/problem2.sql | UTF-8 | 629 | 3.59375 | 4 | [] | no_license | -- 2. Write a query in SQL to find the name of the nurse who are the head of their department.
-- Sample table: nurse
-- employeeid | name | position | registered | ssn
-- ------------+-----------------+------------+------------+-----------
-- 101 | Carla Espinosa | Head Nurse | t | ... | true |
e62482c395d571bf764d8e4e62bab9b459a949ac | SQL | dend1abd/mab | /dokumen/17 01 26 mab/sql.sql | UTF-8 | 288 | 2.78125 | 3 | [] | no_license |
create table mst_runno
(
urutan int primary key,
prefiks varchar(10),
mab_urut int,
maf_urut int,
mat_urut int
)
delete from mst_runno;
insert into mst_runno values (5, 'SO',100,200,300);
-- select * from combo_data
-- select kodereff, reff from mst_reff where tipereff=23 order by reff | true |
a472a2dfc6fd9ffb31a437ae00d19f295244638d | SQL | diskronos/partner_consultsystems | /data/sql/deltas/0006_create_table_individual_requisites.sql | UTF-8 | 426 | 3.03125 | 3 | [] | no_license | CREATE TABLE `individual_requisites` (
`id` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
`partner_id` INT(10) UNSIGNED NOT NULL,
`wmz_purse_number` VARCHAR(50) NOT NULL,
`confirmed` TINYINT(1) UNSIGNED NOT NULL DEFAULT '1',
PRIMARY KEY (`id`),
CONSTRAINT `individual_requisites_partner_fk1` FOREIGN KEY (`partner_id`)... | true |
bb567701c64c2cfb417b00ff6f9ee7e3d3886b86 | SQL | cckmit/szjm | /eis-jianming-master/src/main/resources/sql/3.mcs接口.sql | UTF-8 | 1,510 | 3.453125 | 3 | [] | no_license | DROP TABLE IF EXISTS `mcs_task`;
CREATE TABLE `mcs_task` (
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键',
`task_id` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '任务ID',
`type` int(11) NOT NULL COMMENT '任务类型:1:入库:2:出库 3移库',
`bank_id` int(11) NOT NULL COMMENT '库编号',
`conta... | true |
6e55401ef5536173f089d7ba5b31a9ca412ebff5 | SQL | Thalassicus/ceg | /Cep/Faith/CEF_Start.sql | UTF-8 | 497 | 2.59375 | 3 | [] | no_license | --
INSERT INTO Belief_BuildingClassTourism(BeliefType, BuildingClassType, Tourism)
SELECT 'BELIEF_DIVINE_INSPIRATION', Type, 2
FROM BuildingClasses WHERE (
MaxGlobalInstances = 1
);
/*
UPDATE Beliefs
SET GoldPerFirstCityConversion = 2 * GoldPerFirstCityConversion
WHERE GoldPerFirstCityConversion > 0;
*/
/*
UPDATE ... | true |
87c1773309612bef2f1bbce92942aa3782077131 | SQL | artyomdmitriev/DWH | /sa_src/tables/ext_countries_codes/ext_countries_codes.sql | UTF-8 | 744 | 2.8125 | 3 | [] | no_license | BEGIN
EXECUTE IMMEDIATE 'DROP TABLE sa_src.ext_countries_codes';
EXCEPTION
WHEN OTHERS THEN
IF SQLCODE != -942 THEN
RAISE;
END IF;
END;
/
CREATE TABLE sa_src.ext_countries_codes (
country_id NUMBER(10),
country_desc VARCHAR2(200 CHAR),
country_code VARCHAR2(3)
)
organiza... | true |
755cd447f2281cdefa9ed5b80d2960368cbb75b8 | SQL | iseohyun/sql-example | /basic/10. Update table.sql | UTF-8 | 352 | 2.546875 | 3 | [] | no_license | UPDATE Reservation SET RoomNum = 2002 WHERE Name = 'hong';
select * from reservation;
select * from customer;
/*
1. INSERT INTO 테이블이름(필드이름1, 필드이름2, 필드이름3, ...)
VALUES (데이터값1, 데이터값2, 데이터값3, ...)
2. INSERT INTO 테이블이름
VALUES (데이터값1, 데이터값2, 데이터값3, ...)
/* | true |
f61556b5e954141f381263ba318c73a2487cbdd1 | SQL | yaseminkiraz/BankAccountToy | /src/main/resources/db/migration/V1__init_schema.sql | UTF-8 | 734 | 3.359375 | 3 | [] | no_license | -- account definition
--DROP TABLE if exists test.account;
CREATE TABLE test.account (
id bigserial NOT NULL,
balance numeric(19,2) NOT NULL,
customer_number int8 NOT NULL,
iban uuid NOT NULL,
is_withdrawable bool NOT NULL DEFAULT true,
is_locked bool NOT NULL DEFAULT false,
"type" varchar(255) NOT NULL,
CONST... | true |
46cf0d8edb6419fe060d70983132a93ad259364b | SQL | LiamB299/COS221 | /Assignment 1/scripts/insert.sql | UTF-8 | 1,017 | 2.65625 | 3 | [] | no_license | select * from book;
insert into book(isbn, book_title, book_author, book_genre, year_published)
values ('978-0-7981-8166-2', 'Donkerdrif', 'Deon Meyer', 'Crime', '2020');
('978-0307474278', 'The Da Vinci Code', 'Dan Brown', 'Mystery', '2003'),
('978-0345391803', 'The Hitchhiker''s Guide to the Galaxy', 'Douglas Ada... | true |
fa3a6894b796ccc1c6fa0cfb3a3b2c66f4c74ea7 | SQL | andeliero/Basi | /public_html/SQL/tabelle.sql | UTF-8 | 3,202 | 3.5 | 4 | [] | no_license | CREATE TABLE Account(
User VARCHAR(32),
Password CHAR(32),/*utilizzo 32 caratteri perchè utilizzo MD5*/
Nome VARCHAR(32),
Cognome VARCHAR(32),
Iscrizione DATE,
PRIMARY KEY(User)
) ENGINE=InnoDB;
CREATE TABLE Editori(
Editore VARCHAR(32),
PRIMARY KEY(Editore),
FOREIGN KEY(Editore) REFERENCES Account... | true |
de017322f3b92da4f5c9d8952689ee6063ecbedb | SQL | r3dfoxx/testing-project | /db/updates.sql | UTF-8 | 864 | 3.5625 | 4 | [] | no_license | ALTER table `products` CHANGE COLUMN `count` `quantity` INT(11) NOT NULL;
ALTER TABLE products ADD COLUMN `image` VARCHAR(250) DEFAULT '';
RENAME TABLE orders TO cart_products;
ALTER table `cart_products` CHANGE COLUMN `date` `created_at` TIMESTAMP DEFAULT CURRENT_TIMESTAMP;
CREATE TABLE `cart` (
`id` int(10) unsign... | true |
d0fc4deadc9178a322e9abda7b589aa7afce9050 | SQL | rubenski/entities-iam | /db/create_logged_out_token.sql | UTF-8 | 615 | 3.390625 | 3 | [] | no_license | CREATE TABLE public.f_logged_out_token (
token character varying(800) NOT NULL,
logout_time timestamp without time zone,
expiry_time timestamp without time zone
);
ALTER TABLE public.f_logged_out_token OWNER TO faceter;
--
-- Name: f_logged_out_token f_logged_out_token_pkey; Type: CONSTRAINT; Schema: public; O... | true |
2ee6b1ee7127a6eaa37fe77e1f80d8432e1cf044 | SQL | cologiamp/ngodonate | /database/ngo.sql | UTF-8 | 2,427 | 3.421875 | 3 | [
"MIT"
] | permissive |
-- phpMyAdmin SQL Dump
-- version 4.1.14
-- http://www.phpmyadmin.net
--
-- Servidor: 127.0.0.1
-- Tiempo de generación: 25-10-2019 a las 03:43:06
-- Versión del servidor: 5.6.17
-- Versión de PHP: 5.5.12
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHAR... | true |
ef40518545ba498798af70c77d13e3540f775419 | SQL | rutsatz/brewer | /src/main/resources/db/migration/V11__inserir_permissoes_e_relacionar_usuario_admin.sql | UTF-8 | 573 | 3.109375 | 3 | [] | no_license | -- Insere as permissões.
INSERT INTO permissao VALUES (1, 'ROLE_CADASTRAR_CIDADE');
INSERT INTO permissao VALUES (2, 'ROLE_CADASTRAR_USUARIO');
-- Relaciona as permissões a um grupo.
INSERT INTO grupo_permissao (codigo_grupo, codigo_permissao) VALUES (1, 1);
INSERT INTO grupo_permissao (codigo_grupo, codigo_permissao)... | true |
87f65da0cf4e0a9d2b5cfb0fa10566f965f5979e | SQL | ashenoy95/leetcode | /sql/empEarningMoreThanManager.sql | UTF-8 | 162 | 3.125 | 3 | [] | no_license | # Write your MySQL query statement below
select e1.Name as Employee
from Employee e1
where e1.Salary>(select e2.Salary from Employee e2 where e2.Id=e1.ManagerId) | true |
a0e188b36cb86a1b511763a64b117093031592e3 | SQL | zubayer-ahamed/struts_hibernate_crud | /pf_crud.sql | UTF-8 | 3,644 | 3.1875 | 3 | [] | no_license | -- MySQL Administrator dump 1.4
--
-- ------------------------------------------------------
-- Server version 5.7.17-log
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION ... | true |
dc0fac392566ba81005bec6f9ad84510625ccd32 | SQL | nhanvo-1811/codegym-bootcamp | /session 2/SQL/Query/Test(09.09.19).sql | UTF-8 | 463 | 3.078125 | 3 | [] | no_license | -- tạo database test
--create database Test
-- sử dụng database ngay trong code.
use Test;
--- Tạo bảng GV
create table gv
(
Magv char(5),
Tengv nvarchar(50),
)
--- Tạo bảng HS
create table HocSinh
(
MaHS char(5),
TenHS nvarchar(50),
)
-- rename tabale
EXEC sp_rename 'Hocsinh', 'Hocsinh2';
-- thêm cột ngày sinh ... | true |
753ca759843419e4243e6a834a5b8fe227534bf2 | SQL | VisualAcademy/SqlServer | /SqlServer/PostgreSQL/01_PostgreSqlStart_IdeaApp.sql | UTF-8 | 569 | 3.71875 | 4 | [] | no_license | -- 데이터베이스 생성
Create Database IdeaApp;
-- 테이블 생성
Create Table Ideas (
Id Int Not Null Generated Always As IDENTITY Primary Key,
Note Text Not Null
);
-- 데이터 입력
Insert Into Ideas (Note) Values('PostgreSQL');
Insert Into Ideas (Note) Values('SQL Server');
-- 데이터 출력
Select * From Ideas;
-- 데이터 수정
Update Ideas ... | true |
7c5db5042a99b012e8360a6e8e5dd01278637af7 | SQL | sinerger/HR_Application | /HR_Application_DB/Stored Procedures/Base/Locations/DeleteLocation.sql | UTF-8 | 135 | 2.75 | 3 | [] | no_license | CREATE PROCEDURE [HRAppDB].[DeleteLocation]
@ID int
AS
DELETE
FROM [HRAppDB].[Locations]
WHERE [HRAppDB].[Locations].[ID] = @ID
| true |
83488238ee0e6524401c9ea0fa14e1beee182b9e | SQL | SukanyaVee/indevr | /db/search_projects.sql | UTF-8 | 328 | 3.40625 | 3 | [] | no_license | SELECT * FROM projects WHERE LOWER(project_name) LIKE '%' || LOWER($1) || '%';
-- SELECT * FROM projects JOIN project_stacks ON (projects.id = project_stacks.project_id) WHERE LOWER(project_name) LIKE '%' || LOWER($1) || '%';
-- SELECT projects.project_name, projects.description, WHERE projects.id = project_stacks.pr... | true |
8e32e50879f1bcfb5e8e8ab542a9303a10723473 | SQL | Gismann/projet-BD | /utilitaires/dr_marais.sql | UTF-8 | 434 | 2.859375 | 3 | [] | no_license | -- ==========================
-- fichier : dr_marais_salants.sql
-- base : Marais Salant
-- auteur(s) : Louis Butraud & Thomas Dubos
-- date : 15/12/2014
-- role : altération des tables
-- resultat dans : nom_du_fichier.out
--=============================
ALTER TABLE RECOLTE
add constraint fk_rec_car foreign key (idcar... | true |
cb06a75dcbd8e7151854dd690349234113824e09 | SQL | stayrascal/rascal-microservice | /service-product/src/main/resources/db/migration/V2017.07.30.22.04__create_product_table.sql | UTF-8 | 902 | 3.3125 | 3 | [] | no_license | DROP TABLE IF EXISTS `PRODUCT`;
DROP TABLE IF EXISTS `PRODUCT_ITEM`;
DROP TABLE IF EXISTS `OPTION_PAIR`;
CREATE TABLE `PRODUCT` (
`id` varchar(64) not null,
`name` varchar(32) not null,
`description` varchar(64),
`thumbnail` varchar(32),
`create_time_from` bigint(22),
`create_time_to` bigint(22),
`filter... | true |
d56653d9c774c1469ca9f230c41a7ab83f70213d | SQL | hkuk1004/SQL | /chapter09_연습문제.sql | UHC | 3,845 | 4.1875 | 4 | [] | no_license | /*ǽ 3 ̺ Ͽ ο ̺ Ѵ.*/
create table t_emp
as select * from employee where dno in (20,30);
select * from t_emp;
create table t_dept
as select * from department;
create table t_salgrade
as select * from salgrade;
/*Q1.ȣ 7703, ̸ JOSH, SALESMAN, ڻȣ 7566, 1400, Ŀ̼ 0, μȣ 20 ԻϿ. Ͻÿ.*/
insert into t_emp(eno, en... | true |
1bcbbea625d968519a88f199071fd60424a3b3fe | SQL | ppedvAG/SQL_Progammierung_LPZ_27112019 | /SQL Programmierung_LPZ_25112019/SQL Programmierung_LPZ_25112019/CTE.sql | UTF-8 | 849 | 3.625 | 4 | [] | no_license | select employeeid, lastname, reportsto from employees
--Liste
Fuller 0
Leverling 1
Peacock 1
Buchanan 1
Callahan 1
Dodsworth 2
King 2
--CTE
WITH CTENAME (Spalten, Spalten..)
as
(Ergebnismenge)
select * from cte
with kundenfrachtkosten (Firma, Frachtkosten)
as
(select companyname as ... | true |
2dac75348f3961209c0d3c80fefebd5be17b9703 | SQL | fell8000/movieSearch | /sql.sql | UTF-8 | 917 | 3.515625 | 4 | [] | no_license | create database mydb;
use mydb;
create table user (
user_id int primary key,
age int,
gender char(5),
occupation varchar(15),
zipcode varchar(15)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
create table genres (
genres_code int primary key,
genres_name varchar(20)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
c... | true |
67fc9d7653ee8b4f7dfd293e7a6a9cf27b6d93ef | SQL | juan-martinezu/Proyecto_backend | /bd/mydb.sql | UTF-8 | 4,904 | 3.046875 | 3 | [] | no_license | -- MySQL Workbench Forward Engineering
SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0;
SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0;
SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTI... | true |
18c801b862b6713e23e9b50f9d7e8822524ae48e | SQL | nickto/copycats-analysis | /sql/index-tables.sql | UTF-8 | 2,185 | 2.875 | 3 | [] | no_license | -- Create TR indeces
CREATE INDEX ON tr.fund_characteristics (fundno);
CREATE INDEX ON tr.fund_characteristics (fdate);
CREATE INDEX ON tr.stock_characteristics (cusip);
CREATE INDEX ON tr.stock_characteristics (fdate);
CREATE INDEX ON tr.holdings (fundno);
CREATE INDEX ON tr.holdings (fdate);
CREATE INDEX... | true |
32c213c6a48cfed70d69a2a68c5f29eca39c432b | SQL | danny95333/cs5200-fall2019-yiwei | /assignment-3/endorsedUsersForWeek.sql | UTF-8 | 447 | 4.3125 | 4 | [] | no_license |
DELIMITER $$
create procedure endorsedUsersForWeek(IN start_date date, IN end_date date)
BEGIN
SELECT user.id, full_name FROM
(SELECT user.id, CONCAT(user.first_name, user.last_name) AS full_name
FROM question JOIN user on question.user_id = user.id JOIN answer ON user.id = answer.user_id
WHERE start_date < po... | true |
c67f7310b6bb7837c7244d1ac3375433faa1e64d | SQL | amani7173/Bank-project-MySQL | /bankproject.sql | UTF-8 | 3,154 | 3.96875 | 4 | [] | no_license | create database `bank`;
use bank;
create table if not exists account1
(
account_number char(5) not null primary key,
branch_name varchar(10),
balance double
);
insert into account1 values('A-101', 'abc', 500);
insert into account1 values('A-102', 'bcd', 400);
insert into account1 values('A-201', 'cde', 900);
insert i... | true |
f7f4725b5a0e5d01544b44f5748a49f0ab01ca97 | SQL | MaximumTroubles/project-mvc | /library.sql | UTF-8 | 13,261 | 3.34375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 3.5.1
-- http://www.phpmyadmin.net
--
-- Хост: localhost
-- Время создания: Дек 10 2015 г., 19:52
-- Версия сервера: 5.0.27-community-nt
-- Версия PHP: 5.3.28
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIEN... | true |
cdb3e90c5ddc807f343097ee8c013b85463fa442 | SQL | wdxzs1985/tongrenlu | /oracle-sql/TABLES/M_USER_COMMENT.sql | UTF-8 | 810 | 2.75 | 3 | [
"MIT"
] | permissive | -- 无法呈现对象 APPLICATION 的 TABLE DDL。带有 DBMS_METADATA 的 M_USER_COMMENT 正在尝试内部生成器。
CREATE TABLE M_USER_COMMENT
(
COMMENT_ID VARCHAR2(15 BYTE)
, SENDER_USER_ID VARCHAR2(15 BYTE)
, PARENT_ID VARCHAR2(15 BYTE)
, USER_ID VARCHAR2(15 BYTE)
, ADD_DATE DATE
, UPD_DATE DATE
, DEL_FLG CHAR(1 BYTE)
, CONTENT NCLOB
)
LOG... | true |
e95ce3231576da9c187bc528d6ba31cc2470a965 | SQL | Albertlarsen/Bike_project | /database.sql | UTF-8 | 1,308 | 3.515625 | 4 | [] | no_license | CREATE TABLE AdminUsers(
email VARCHAR(255) NOT NULL,
password1 VARCHAR(255) NOT NULL,
salt CHAR(64) NOT NULL,
PRIMARY KEY(email)
);
CREATE TABLE DockingStation(
name VARCHAR(255) NOT NULL,
x_coordinate DOUBLE DEFAULT 0,
y_coordinate DOUBLE DEFAULT 0,
PRIMARY KEY(name)
);
CREATE ... | true |
85e3b6c162d09a6180a085cc94d0122611f59e02 | SQL | OutOfBandDevelopment/MasterDataTools | /src/MasterDataTools/MyDataTools.Db/Vehicles/Tables/Stations.sql | UTF-8 | 396 | 2.71875 | 3 | [
"MIT"
] | permissive | CREATE TABLE [Vehicles].[Stations] (
[StationID] INT IDENTITY (1, 1) NOT NULL,
[Name] NVARCHAR (256) NOT NULL,
[Address1] NVARCHAR (256) NULL,
[Address2] NVARCHAR (256) NULL,
[City] NVARCHAR (256) NULL,
[State] NVARCHAR (256) NULL,
[ZipCode] NVARCHAR (256) NULL,... | true |
0c21940ff9cd0cb8dfbe19c29fed67f36a7c550d | SQL | LouieSankey/quik_server | /migrations/003.do.create_chat_table.sql | UTF-8 | 256 | 2.546875 | 3 | [] | no_license | DROP TABLE IF EXISTS chat_table;
CREATE TABLE chat_table (
id INTEGER PRIMARY KEY GENERATED BY DEFAULT AS IDENTITY,
room_id TEXT NOT NULL,
username TEXT NOT NULL,
msg TEXT NOT NULL,
date_published TIMESTAMPTZ DEFAULT now() NOT NULL
);
| true |
2847b6b92219c4a8aaf038d33d6b0f1eea733abc | SQL | Aminbouzouita/Employees_Tracker | /db/schema.sql | UTF-8 | 687 | 3.640625 | 4 | [] | no_license | drop database if exists employee_tracker_db;
create database employee_tracker_db;
use employee_tracker_db;
create table departments(
Id int auto_increment not null,
Department varchar(30) not null,
primary key(Id)
);
create table roles(
Id int auto_increment not null,
Title varchar(30) not null,
Sala... | true |
8c076fd38f2c2762cfe03b46045c91457b2537a3 | SQL | RogerColindres/RepasoPLSQL | /ConsultasNullIsNotNull.sql | UTF-8 | 1,186 | 2.96875 | 3 | [] | no_license | --Consultas null/is not null--
create table medicamentos(
codigo number(5) not null,
nombre varchar2(20) not null,
laboratorio varchar2(20),
precio number(5,2),
cantidad number(3,0) not null
);
insert into medicamentos (codigo,nombre,laboratorio,precio,cantidad)
values(1,'Sertal gotas',null,null,100);
... | true |
fb065e8d6294f8b186c640aff6f10a5aaf304ebe | SQL | loganjhennessy/fatcat | /fatcat/db/migrations/v1__initial_tables.sql | UTF-8 | 726 | 3.6875 | 4 | [] | no_license | PRAGMA foreign_keys = ON;
CREATE TABLE IF NOT EXISTS company (
id TEXT PRIMARY KEY
, symbol TEXT
, name TEXT
, description TEXT
, industry TEXT
, sector TEXT
, exchange TEXT
, website TEXT
, ceo TEXT
);
CREATE TABLE IF NOT EXISTS metric (
id ... | true |
40d3e86e4db84cef19f79d74bdf71d19bf889cfd | SQL | merelbongenaar/Someren | /Someren1920F/SQLQuery1.sql | UTF-8 | 370 | 2.671875 | 3 | [] | no_license | ALTER TABLE [StudentActivity]
ADD FOREIGN KEY (studentID) REFERENCES Person (personID);
ALTER TABLE [TeacherActivity]
ADD FOREIGN KEY (teacherID) REFERENCES Person (personID);
ALTER TABLE [activity]
ADD FOREIGN KEY (activityID) REFERENCES TeacherActivity (activityID)
ALTER TABLE [activity]
ADD FOREIGN KEY (activi... | true |
ebaba73c3c7a21961891e2f675205edfa9e587a7 | SQL | kchugh2/TwitterGroup | /Twitter/sql/twitter.sql | UTF-8 | 4,104 | 3.203125 | 3 | [] | no_license | --------------------------------------------------------
-- File created - Tuesday-November-03-2015
--------------------------------------------------------
--------------------------------------------------------
-- DDL for Table TWITTERFEEDS
--------------------------------------------------------
CREATE T... | true |
2977fa8e41d5374efc3ab707e70e7172fbf6d0b4 | SQL | PacktPublishing/Learning-PostgreSQL-11-Third-Edition | /Chapter04/sql_examples/rule.sql | UTF-8 | 1,278 | 3.375 | 3 | [
"MIT"
] | permissive | CREATE TABLE car_portal_app.car_log (LIKE car_portal_app.car);
ALTER TABLE car_portal_app.car_log ADD COLUMN car_log_action varchar (1) NOT NULL, ADD COLUMN car_log_time TIMESTAMP WITH TIME ZONE NOT NULL;
GRANT ALL ON car_portal_app.car_log to car_portal_app;
CREATE RULE car_log AS ON INSERT TO car_portal_app.car DO A... | true |
1166b53bb5ac37126f75d45f327562e3a90cc893 | SQL | monika-hrda/social-me | /src/main/sql/insert_data.sql | UTF-8 | 6,711 | 2.84375 | 3 | [] | no_license | USE SocialMe;
INSERT INTO Friendship_Status
(id, name)
VALUES
(1, 'requested'),
(2, 'accepted');
#All passwords are 'password' (without quotes)
INSERT INTO User
(email, password, first_name, last_name, gender, profile_image_filename, profile_image_filename_thumb, birth_date, created_date)
VALUES
... | true |
a5bcfe2ed8dff0e85fc2f67a81f5cf08e8c59ffa | SQL | dferwave/VideoGameStoreDatabase | /backend/class.sql | UTF-8 | 3,254 | 2.96875 | 3 | [] | no_license | Use `Videogamestore`;
CREATE TABLE `Addresses`(
`AddressID` INT(10) NOT NULL AUTO_INCREMENT,
`AddressLine1` VARCHAR(50) NOT NULL,
`AddressLine2` VARCHAR(50),
`City` VARCHAR(50) NOT NULL,
`State` VARCHAR(2),
`ZipCode` INT(15) NOT NULL,
`Country` VARCHAR(50) NOT NULL,
PRIMARY KEY (AddressID)... | true |
f8da5c30d165c43c9b997f5ae14928add101b0dc | SQL | kennycaiguo/Oracle-database-11g | /scott用户的表的备份/scott.students.sql | GB18030 | 2,068 | 3.484375 | 3 | [] | no_license | --------------------------------------------------------
-- ļѴ - --05-2020
--------------------------------------------------------
--------------------------------------------------------
-- DDL for Table STUDENTS
--------------------------------------------------------
CREATE TABLE "SCOTT"."STUDENTS"
... | true |
65df05cbda6161bb815c19c5eda388d571e05a12 | SQL | sanaullahAhmad/stylista | /backup/db/neoglobal_stylista.sql | UTF-8 | 6,578 | 3.015625 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 3.5.2.2
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Jan 01, 2013 at 08:09 AM
-- Server version: 5.5.27
-- PHP Version: 5.4.7
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/... | true |
53d820ac1b2451ceb01a8ba31ea4dddd805bb082 | SQL | MSurfer20/test2 | /mysql-schema/Model/EmojiReactionBaseAllOf.sql | UTF-8 | 597 | 2.625 | 3 | [] | no_license | --
-- Zulip REST API.
-- Prepared SQL queries for 'EmojiReactionBase_allOf' definition.
--
--
-- SELECT template for table `EmojiReactionBase_allOf`
--
SELECT `user_id`, `user` FROM `EmojiReactionBase_allOf` WHERE 1;
--
-- INSERT template for table `EmojiReactionBase_allOf`
--
INSERT INTO `EmojiReactionBase_allOf`(`... | true |
70570c7d10465c4ebf24fb2eddaa247423ff17ed | SQL | axel-op/public-PDDI-analysis | /PDDI-Datasets/World_Vista/DatabaseConversion/backups/schema-with-annotations.sql | UTF-8 | 7,348 | 3.28125 | 3 | [] | no_license | DROP TABLE IF EXISTS Drug_Interaction_With_Annotations CASCADE;
DROP TABLE IF EXISTS Drug_Interaction CASCADE;
DROP TABLE IF EXISTS ATC_Code CASCADE;
DROP TABLE IF EXISTS Drug_Group CASCADE;
DROP TABLE IF EXISTS tmp CASCADE;
CREATE TABLE Drug_Group (
Drug_Name VARCHAR(250) NOT NULL,
RxNorm VARCHAR(50),
Sou... | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.