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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
94556da61d443f9cbebf4e44a660076d4f7e1dd0 | SQL | genjay/java_hr | /CSR/C02 OU建立/p_tOUset_save OU 創立存檔.sql | UTF-8 | 997 | 3.140625 | 3 | [] | no_license | drop procedure if exists p_tOUset_save;
delimiter $$
create procedure p_tOUset_save
(
in_OUguid varchar(36)
,in_ltUser varchar(36)
,in_ltpid varchar(36)
,in_OUID varchar(36)
,in_OUname varchar(36)
,in_Seq int
,in_Rwid int # 0 新增
,out outMsg text /*回傳訊息,直接給user看的*/
,out outRwid int /*重疊的請假單*/
,out err_c... | true |
b17cafd0889b1859857a2dc97d6dab49b6b177dd | SQL | zhandandan11/wtyt | /5对上4.0_供应链金融向上汇总表_810.sql | GB18030 | 14,428 | 3.6875 | 4 | [] | no_license | --t_gyl3_orgxx dd807 --ۻϱ ֱ
select jbxx.,
count(distinct jbxx.Ʊ) ֹ˾,
count(distinct jbxx.org_id_new) Ŀ,
count(distinct case when jbxx.ĿǷԾ = '' then jbxx.org_id_new end) ԾĿ,
count(distinct case when jbxx.ĿǷԾ = '' and zuz.opening_time is not null then jbxx.org_id_new end) ϵͳĿ,
... | true |
91c64bdcd71b1cbc40f2a07ac6b4deab9925973e | SQL | docljn/codeclan_class_notes | /week03/day2/pizza_order/db/pizza_shop.sql | UTF-8 | 507 | 3.015625 | 3 | [] | no_license | -- pizza_shop.sql
DROP TABLE IF EXISTS pizza_orders;
CREATE TABLE pizza_orders (
id SERIAL4 PRIMARY KEY,
first_name VARCHAR(255) NOT NULL,
last_name VARCHAR(255) NOT NULL,
quantity INT2 NOT NULL CHECK (quantity > 0),
topping VARCHAR(255)
);
-- just to test structure
-- INSERT INTO pizza_orders (first_name, last_na... | true |
e9d3d915bc8a321dc377b916b72130c1e6e2d4a2 | SQL | sdmms1/DB_Project | /Data/Operation/create_table.sql | UTF-8 | 2,742 | 3.96875 | 4 | [] | no_license | create table if not exists city
(
city_code integer
primary key,
city_name varchar not null,
province_name varchar not null
);
create table if not exists station
(
station_name varchar
primary key,
station_code integer unique,
city_code integer not null... | true |
e42a28e327be5477f97da9adbbd192cee83ba5a2 | SQL | b228175006/tp_zxmb | /tp_zxmb.sql | UTF-8 | 10,612 | 2.625 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.4.6
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: 2015-06-03 10:49:51
-- 服务器版本: 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 */;
/*!40101 SET @O... | true |
e8bb96d42d21b5a90a6a91a77e187fda648d2460 | SQL | DmitrijR13/billAuk | /Main/DATA/PG/SQL/patches/0018/sys_events.sql | UTF-8 | 2,610 | 2.9375 | 3 | [] | no_license | --central data
update sys_dictionary_values set code = 1 where nzp_dict in (8216, 8216, 6481, 6602, 6603, 6604, 6600, 6601);
update sys_dictionary_values set code = 2 where nzp_dict in (6489, 6490, 6491);
update sys_dictionary_values set code = 3 where nzp_dict in (8215, 6484, 6606, 6485, 6608, 6609);
update sys_dictio... | true |
b81f5c4614a3e3bcdc8b1c874e6568423d807acf | SQL | melkhun/food-delivery-to-hell | /ProjectDatabase/order.sql | UTF-8 | 1,711 | 3.25 | 3 | [] | no_license | --
-- Database: `order`
--
DROP DATABASE IF EXISTS `order`;
CREATE DATABASE `order`;
USE `order`;
--
-- Table structure for table `orders`
--
DROP TABLE IF EXISTS `orders`;
CREATE TABLE `orders` (
`order_id` int(6) NOT NULL AUTO_INCREMENT,
`order_time` datetime default CURRENT_TIMESTAMP,
`customer_id` int(6) NOT... | true |
8fa459098ec1eb52796773e9d7cef9c50bddd73e | SQL | ClickHouse/ClickHouse | /tests/queries/0_stateless/01825_type_json_2.sql | UTF-8 | 1,576 | 3.34375 | 3 | [
"Apache-2.0",
"BSL-1.0"
] | permissive | -- Tags: no-fasttest
SET allow_experimental_object_type = 1;
DROP TABLE IF EXISTS t_json_2;
CREATE TABLE t_json_2(id UInt64, data Object('JSON'))
ENGINE = ReplicatedMergeTree('/clickhouse/tables/{database}/test_01825_2/t_json_2', 'r1') ORDER BY tuple();
INSERT INTO t_json_2 FORMAT JSONEachRow {"id": 1, "data": {"k1... | true |
f95d2da613c18be0fdf4512fd47824347ddfdf24 | SQL | aminuolawale/bank | /db/query/transfer.sql | UTF-8 | 437 | 3.5 | 4 | [] | no_license | -- name: CreateTransfer :one
INSERT INTO transfers (from_account_id, to_account_id, amount)
VALUES ($1, $2, $3)
RETURNING *;
-- name: GetTransfer :one
SELECT *
FROM transfers
WHERE id = $1
LIMIT 1;
-- name: GetTransfers :many
SELECT *
FROM transfers
ORDER BY id
LIMIT $1 offset $2;
-- name: UpdateTransfer :one
update tr... | true |
aa4d2dd5f4331ada18392e6066bec685d1f75d4b | SQL | LabKey/wnprc-modules | /WNPRC_EHR/resources/queries/study/waterTotalByDateWithWeight.sql | UTF-8 | 2,755 | 4.375 | 4 | [
"Apache-2.0"
] | permissive | /*Using the waterTotalByDate this query adds the weight and the condition at the particular
date.The weight query only selects animal with weights with from January 1, 2021. This limitation
was done due to performance reasons and to include the same records as waterTotalByDate. In the future
there may be a need t... | true |
ca0b30768ec0b17d8f04de5bdb5dcc40a0a5ec13 | SQL | yannickguillemot/Tour_de_France | /Scripts/760_create_pqb_db_tdf_categorie.sql | UTF-8 | 977 | 3.40625 | 3 | [] | no_license |
CREATE OR REPLACE PACKAGE BODY "G16_TDF"."PA_CATEGORIE" IS
FUNCTION GetAll return sqlcur
IS
res sqlcur;
BEGIN
OPEN res FOR
SELECT *
From CATEGORIE;
Return res;
END;
FUNCTION GetNbCategorie return NUMBER
IS
res NUMBER(2);
BEGIN
select count(*) into res from CATE... | true |
43fbd7beba01c867b3ef964f94085e6c8a7d219b | SQL | TanZD/blog | /blog.sql | UTF-8 | 4,925 | 3.265625 | 3 | [] | no_license | /*
SQLyog Ultimate v12.08 (64 bit)
MySQL - 10.1.35-MariaDB : Database - db_blog
*********************************************************************
*/
/*!40101 SET NAMES utf8 */;
/*!40101 SET SQL_MODE=''*/;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_K... | true |
d458a6e52a554a5ac2383c61a35e021294677182 | SQL | Typo90/MySql_StudyNote | /DataType.sql | UTF-8 | 2,726 | 4.03125 | 4 | [] | no_license | #常见的数据类型
/*
数值型:
整型
小数:
定点数
浮点数
字符型:
较短的文本:char varchar
较长的文本:text blob(较长的二进制数据)
日期型:
*/
#一 整型
/*
分类:
tinyint 1
smallint 2
mediumint 3
int/interger 4
bigint 8
特点:
如果不设置有无符号默认为有符号
如果超出了类型最大值,out of range异常 并且插入临界值
如果不设置长度,会有默认长度
长度代表显示的最大宽度,搭配zerofill使用会有0左填充
*/
#1.如何设置无符号和有符... | true |
271fcaffaabd6373791b6a2a03a75287a26648e2 | SQL | lmmoreira/nv-erm-full | /db/erm_db-16-04-16.sql | UTF-8 | 1,433 | 3.125 | 3 | [] | no_license | ALTER TABLE `erm`.`materiais`
ADD COLUMN `PUBLICADO` TINYINT(1) NULL COMMENT '' AFTER `QTDE_MATERIAL`;
ALTER TABLE `erm`.`fornecedores`
ADD COLUMN `PUBLICADO` TINYINT(1) NULL COMMENT '' AFTER `CRIADOR`;
CREATE TABLE `erm`.`materiais_mensagens` (
`IDMENSAGEM` BIGINT(20) NOT NULL COMMENT '',
`MATERIAL` BIGINT(20) ... | true |
357be6227cca56fdddbd0c0c20387fe0ad5e7453 | SQL | Dwifa22/DwifahRahmadaniah.github.io | /tokokita_1320.sql | UTF-8 | 11,727 | 3.125 | 3 | [
"LicenseRef-scancode-unknown-license-reference",
"MIT"
] | permissive | -- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Waktu pembuatan: 27 Jun 2021 pada 23.39
-- Versi server: 10.4.14-MariaDB
-- Versi PHP: 7.4.10
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@C... | true |
cd40b5d78742fc5f8792e9972b3ff7e4f2915f27 | SQL | Hallas23/SQL | /Kollegie.sql | ISO-8859-15 | 781 | 3.1875 | 3 | [] | no_license | Drop table Bolig;
Drop table lejer;
drop table kollegie;
Create table Kollegie (
navn varchar (50) not null,
adresse varchar (50) primary key
);
Create table Lejer (
navn varchar (50) not null,
adresse varchar (50) not null,
uddannelse varchar (50) not null,
lejerCPR varchar (50) primary key
);
Create table Bolig ... | true |
c8b005090e66ec9a85e113d16aec680e80eb6641 | SQL | vnrtumu/sql | /6.sql | UTF-8 | 460 | 4.25 | 4 | [] | no_license | -- Dsplay customers who have more than 4 sales details transactions in the month of Jan 2020
SELECT
cust_nm, COUNT(cust_nm) AS sales_Details
FROM
`Sales_dtl`
INNER JOIN
Sales_hdr
ON
Sales_dtl.s_h_id = Sales_hdr.s_h_id
INNER JOIN
customer
ON
Sales_hdr.cust_id = customer.cust_id
WHER... | true |
9e42b43f5a11f54801a7ca898bf059b7c014be10 | SQL | BAEPSAE/JackpotSportsMatchingService | /MatchingService/src/erm/querytestttt.sql | UTF-8 | 832 | 3.34375 | 3 | [] | no_license |
select * from player
select * from team
update team set team_leader='aaa' where team_id=1
select team_leader from team where team_id=1
alter table player add user_manner number(10);
select MIN(calcscore) from (select ABS(100-score) as calcscore from matching)
select score, ABS(100-score) as calcscore from ma... | true |
2b23db8b777ec8cb3f7ed4fa53dc135aaf418944 | SQL | radtek/UGRS | /UGRS_Q/UGRS.AddOn.CreditAndCollection/DAO/SQL/GetComboData.sql | UTF-8 | 299 | 3.078125 | 3 | [] | no_license | select distinct SUM(t1.U_Amount) as TotSelled, t0.U_Folio,t1.U_SellerCode from [@UG_SU_AUTN] T0 with (nolock)
inner join [@UG_SU_BAHS] T1 on T1.U_AuctionId = T0.U_Id
where U_Folio + U_SellerCode
not in (
select U_FolioSubasta + U_Auxiliar from [@UG_CC_AUTN]
)
group by U_SellerCode,t0.U_Folio | true |
98bbb340688fc0dd6261bc2cc9a98511ca9b92ac | SQL | hyeongil2/K-Digital-Training | /MySQL/day1(소개).sql | UTF-8 | 684 | 3.46875 | 3 | [] | no_license | use adventureworks ;
select * from salesorderheader;
select * from salesorderdetail;
select soh.SalesOrderID, soh.OrderDate, sod.salesOrderid, ProductID, OrderQty
from salesorderheader soh join salesorderdetail sod
on soh.SalesOrderID = sod.SalesOrderIDsalesorderheader;
select sod.productid, p.productid, p.name... | true |
96a98e066c8ff50f4574bda106204f83afc33c88 | SQL | MASODION/twproject | /cabinet.sql | UTF-8 | 13,253 | 3.375 | 3 | [
"MIT"
] | permissive | -- phpMyAdmin SQL Dump
-- version 4.9.1
-- https://www.phpmyadmin.net/
--
-- Gazdă: localhost
-- Versiune server: 10.4.8-MariaDB
-- Versiune PHP: 7.3.11
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIE... | true |
315eb1b072dfb60de97646bf9615d62dcc6591a0 | SQL | Ulises309/Easpy2 | /Inicial.sql | UTF-8 | 451 | 2.875 | 3 | [] | no_license | CREATE DATABASE Curso;
USE Curso;
CREATE TABLE TipoUsuario
(
Id_TipoUsuario INT PRIMARY KEY IDENTITY,
Nombre VARCHAR(25) NOT NULL
);
CREATE TABLE Usuario
(
Id_Usuario INT PRIMARY KEY IDENTITY,
TipoUsuario_Id INT NOT NULL FOREIGN KEY REFERENCES TipoUsuario(Id_TipoUsuario),
Nombre VARCHAR(30) NOT NULL,
Apelllido... | true |
3346c04c6e609b783ffdfb45ac376aab285290d6 | SQL | Bharathikavi1902/Bloodbank | /sql/lifeline.sql | UTF-8 | 2,656 | 2.984375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1:3306
-- Generation Time: Aug 17, 2020 at 06:09 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 |
ee6f6cad66c5fb47eb15f8ec9c75b43fb7e9812e | SQL | utcn-sd-serban/assignment-1-lupvasile | /SnackOverflow/src/main/resources/db/migration/V1__Initial_schema.sql | UTF-8 | 3,880 | 4.03125 | 4 | [] | no_license | CREATE TABLE IF NOT EXISTS`snack_overflow`.`user` (
`id` INT NOT NULL AUTO_INCREMENT,
`username` VARCHAR(45) NOT NULL,
`password` VARCHAR(45) NOT NULL,
`is_moderator` BIT(1) NOT NULL,
`is_banned` BIT(1) NOT NULL,
PRIMARY KEY (`id`),
UNIQUE INDEX `username_UNIQUE` (`username` ASC));
... | true |
15833416a5a54da62a8e7e48a8b97fc0383daac6 | SQL | Agnes-Ruescas/Aula-generation | /Mysql/Diversos/TabelaVarejo.sql | UTF-8 | 2,841 | 2.765625 | 3 | [] | no_license | use db_diversos;
-- Criando tabela
create table tb_varejo(
id_produto bigint(5) auto_increment,
nome varchar(20),
preco decimal(10,2),
categoria varchar(20),
marca varchar(20),
cor varchar(20),
desconto varchar(3),
primary key(id_produto)
)
-- Todos os inserts
INSERT INTO tb_varejo(nome, preco, categoria, marca, cor,... | true |
5b698a9a8f9df7b9492c90bacf925a34f1de0163 | SQL | johaneka06/RPS.NET | /Game/database/postgresql/query.sql | UTF-8 | 1,820 | 3.359375 | 3 | [
"MIT"
] | permissive | CREATE TABLE "player"
(
playerId UUID PRIMARY KEY,
playername VARCHAR(255) NOT NULL,
created_at TIMESTAMPTZ DEFAULT CURRENT_TIMESTAMP,
updated_at TIMESTAMPTZ DEFAULT CURRENT_TIMESTAMP
);
CREATE TABLE "exp"
(
expId UUID PRIMARY KEY,
playerId UUID NOT NULL,
xpVa... | true |
115a62aef50aea732abd04f5adda0dac0d7e0bd3 | SQL | joshgagnon/elusers | /resources/sql/get_deed_record.sql | UTF-8 | 644 | 3.96875 | 4 | [] | no_license | WITH file_list AS (
SELECT array_agg(f.*)
FROM deed_packet_record_file dprf
JOIN files f on dprf.file_id = f.id
WHERE
dprf.deed_packet_record_id = :record_id
)
SELECT array_to_json(array_agg(row_to_json(q))) AS record
FROM (
SELECT
records.id, deed_packet_id, document_name, document... | true |
9d2f77439d074952f730d581a615b7b05e17a5f7 | SQL | mayurthakane358/Inspection-Test-Plan | /ratna_gears.sql | UTF-8 | 6,313 | 2.765625 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.8.5
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1:3306
-- Generation Time: Dec 05, 2020 at 07:34 PM
-- Server version: 5.7.26
-- PHP Version: 7.3.5
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHA... | true |
dd6d285b83786cad383fcad604da23dd26c03f6a | SQL | michellesmith0918/codingground | /New Project/main.sql | UTF-8 | 459 | 2.6875 | 3 | [] | no_license | BEGIN TRANSACTION;
drop table example;
CREATE TABLE EXAMPLE(Id integer PRIMARY KEY, Heading text, Title text);
INSERT INTO EXAMPLE VALUES(1,'My title','Serious content');
INSERT INTO EXAMPLE VALUES(2,'My title 2','Serious content');
INSERT INTO EXAMPLE VALUES(3,'My Third title','Serious content');
INSERT INTO EXAMP... | true |
d52bd0fbec5eae2429e90f7ece4eab44e57fa23f | SQL | gessinger-hj/sws | /sql/inventum.create.all.mysql.sql | UTF-8 | 1,402 | 4.0625 | 4 | [
"MIT"
] | permissive | CREATE TABLE t_inventory
(
inventory_key INTEGER NOT NULL AUTO_INCREMENT
, inventory_name VARCHAR(128) NOT NULL
, description TEXT NOT NULL
, miscellaneous TEXT
, status VARCHAR(16) NOT NULL default 'active'
, created_at DATETIME NOT NULL
, last_modified DATETIME ... | true |
8b813595ab20fd525e42728845f1ae5d8822e6a2 | SQL | IbrahimaBAMBA/SQL | /Partie5_Exercice1-7/partie5.sql | UTF-8 | 4,453 | 3.984375 | 4 | [] | no_license | --On selectionne la BD dans laquelle se fera les requètes
USE `webDevelopment`;
--On affiche toutes les données de la table language
SELECT * FROM `languages`;
+----+------------+-------------+
| id | language | version |
+----+------------+-------------+
| 1 | JavaScript | version 5 |
| 2 | PHP | vers... | true |
e1a34457d16a7f1b3044206617d00b2bc2590b4b | SQL | richo/stokepile | /migrations/2018-10-09-034741_create_devices/up.sql | UTF-8 | 241 | 3.40625 | 3 | [] | no_license | CREATE TABLE devices (
id SERIAL NOT NULL PRIMARY KEY,
user_id integer NOT NULL REFERENCES users(id),
name VARCHAR NOT NULL,
kind VARCHAR NOT NULL,
identifier VARCHAR NOT NULL
);
CREATE INDEX devices_by_user ON devices (user_id);
| true |
8854562cebe0b2034bc09bce303ac4aba4e8dde4 | SQL | fastasticDEV/PHP | /addressbooks.sql | UTF-8 | 1,784 | 3.265625 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 5.1.0
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Generation Time: Jun 24, 2021 at 06:31 PM
-- Server version: 10.4.18-MariaDB
-- PHP Version: 7.3.27
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIE... | true |
fd00fb18186220a15d0eb9322252bfa04b0ab772 | SQL | theirix/json_accessors | /test/sql/regress.sql | UTF-8 | 3,610 | 3.09375 | 3 | [
"PostgreSQL"
] | permissive | set client_min_messages to 'error';
drop extension if exists "json_accessors" cascade;
create extension "json_accessors";
set client_min_messages to 'notice';
\t on
\pset format unaligned
-- qq
select json_get_text('{"foo":"qq", "bar": true}', 'foo');
-- t
select json_get_boolean('{"foo":"qq", "bar": true}', 'bar');
... | true |
66788ddd47c6f1bab726958d1619d9326decc0bd | SQL | arniwesth/ra_data_warehouse | /models/warehouse/w_crm/wh_deals_fact.sql | UTF-8 | 800 | 3.78125 | 4 | [] | no_license | {% if not var("enable_crm_warehouse") %}
{{
config(
enabled=false
)
}}
{% else %}
{{
config(
alias='deals_fact',
unique_key='deal_id',
incremental_strategy='merge',
materialized='incremental'
)
}}
{% endif %}
with companies_dim as (
select *
from {{ ref('... | true |
36dc6ad47144a77442f0da52e281befb1d6c200e | SQL | amilendra/fullstack-nanodegree-vm | /vagrant/tournament/tournament.sql | UTF-8 | 1,097 | 4.0625 | 4 | [] | no_license | -- Table definitions for the tournament project.
--
-- Put your SQL 'create table' statements in this file; also 'create view'
-- statements if you choose to use it.
--
-- You can write comments in this file by starting them with two dashes, like
-- these lines here.
-- Clean up
DROP TABLE IF EXISTS matches;
DROP TABL... | true |
895250b919b3bb964b6287f2f4884fa1b1046b2e | SQL | jeluck/JBBXServer | /mgt-core/database/patch/creat_organization_template.sql | UTF-8 | 1,828 | 2.640625 | 3 | [] | no_license | -- 0608
/*==============================================================*/
/* 创建组织 103 陆朝晖 瀚铂钱庄 1141775*/
/*==============================================================*/
INSERT INTO mgt_organizations(org_id,name,description,deleted,count,sms_sign_name,sms_template_id)
VALUES('103','瀚铂钱庄','瀚铂钱庄','0','30','【借... | true |
fcf05885abc40c455ea8a491381164a841227677 | SQL | ershamsadkhan/RajasthanFlavoursFoodApp | /OnlineFoodOrderingService/DatabaseScripts/StoredProcedures/GetOrderDetails.sql | UTF-8 | 470 | 3.515625 | 4 | [] | no_license | --EXEC Usp_GetOrderDetails 4
CREATE PROCEDURE Usp_GetOrderDetails
@Orderid NUMERIC(10) =0
As
BEGIN
SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED
SELECT o.OrderId,
o.OrderDate,
OLI.OrderLineItemId,
OLI. Quantity,
OLI. Price,
OLI.PriceType,
it.ItemHeader,
it.ImageUrl,
it.Itemi... | true |
9e1d1d36a5d938aca620ac5e05bd5b12800136fb | SQL | stenlitong/jenkins_uas | /databased.sql | UTF-8 | 357 | 2.6875 | 3 | [] | no_license | CREATE DATABASE IF NOT EXISTS trudatabase;
USE trudatabase;
CREATE TABLE users (
id int NOT NULL PRIMARY KEY, nama varchar (255) NOT NULL, kantor varchar(255) NOT NULL
);
INSERT INTO users( id, nama, kantor )
VALUES
(01, 'xiao', 'cabang anemo'),
(02, 'tartaglia', 'cabang hydro'),
(03, 'albedo', 'cabang geo'),
(04... | true |
0874c2607d396b13b0e9978941baa852f4868002 | SQL | seongsik-choi/Web_Project | /study_maria/src/main/webapp/WEB-INF/doc/회원/member.sql | UTF-8 | 5,498 | 3.875 | 4 | [] | no_license | /**********************************/
/* Table Name: 회원 */
/**********************************/
-- member 삭제전에 FK가 선언된 자식 테이블 먼저 삭제
DROP TABLE attachfile;
DROP TABLE qna;
DROP TABLE reply;
-- 제약 조건과 함께 삭제(제약 조건이 있어도 삭제됨, 권장하지 않음.)
DROP TABLE member CASCADE CONSTRAINTS;
DROP TABLE member;
CREATE TABLE member(
membern... | true |
2d5901db58e8e77869e9052f58197e031f613d73 | SQL | miye235/data_factory | /dataprocess/oracleprocess/mes/sqls/PSA喷墨率.sql | UTF-8 | 1,038 | 3.84375 | 4 | [] | no_license | SELECT
日期,
B.DATA05 DATA05,
B.LOT LOT
FROM MES.CMMT_CCD_INFO B RIGHT JOIN
(SELECT
"料號",
"批號",
"產出數量",
REPLACE(更新時間,'/','-') as 日期,
"工單",
OLDOPERATION
FROM (
SELECT
vlm.lot AS 批號,
vlm.device AS 料號,
vlm.wo AS 工單,
mwh.newquantity AS 產出數量,
mwh. transactiontime AS 更新時間,
... | true |
d6b5a0d78a035ae70903ef76cc3c819ea9dbc774 | SQL | chipbaber/learning-library | /workshops/dbcs-dba-oci/data/oci_ws_install.sql | UTF-8 | 1,072 | 2.859375 | 3 | [
"UPL-1.0"
] | permissive | create tablespace alpha datafile '+data';
-- defaults 100mb, unlimited
create user alpha identified by ALpha2018__ default tablespace alpha;
grant dba to alpha;
create directory tmp as '/tmp/ws';
grant all on directory tmp to public;
exit;
#!/bin/bash
sqlplus system/ALpha2018__@pdb1 << EOF
create tablespace al... | true |
e5bfe455bb56420c70799655809d7ed4b78b3503 | SQL | herrysa/iHOSv3.7 | /src/test/resources/testSql/t_deptType.sql | UTF-8 | 1,072 | 2.796875 | 3 | [] | no_license | /*
Navicat MySQL Data Transfer
Source Server : localMysql
Source Server Version : 50525
Source Host : localhost:3306
Source Database : ihos
Target Server Type : MYSQL
Target Server Version : 50525
File Encoding : 65001
Date: 2013-10-08 16:26:45
*/
SET FOREIGN_KEY_CHECKS=0;
-- ---... | true |
d18aa0821a376a1c4765b23ae461322ec29ffe36 | SQL | kanchenHeluo/CSharp_Projects | /LogicAppStagingDBForCRMOnline/LogicAppStagingDBForCRMOnline/CRMAzure/tables/MetaActionType.sql | UTF-8 | 171 | 2.53125 | 3 | [] | no_license | CREATE TABLE [CRMAzure].[MetaActionType]
(
[Id] INT NOT NULL,
[Name] VARCHAR(255) NOT NULL,
CONSTRAINT [PK_MetaActionType_Id] PRIMARY KEY CLUSTERED ([Id] ASC)
)
| true |
73a3eeacb5c3146e539297b64534b8ea89f784a4 | SQL | andrescornejo/progra1-bdii | /oracle/scripts/crear_usuarios_prueba.sql | UTF-8 | 2,739 | 2.84375 | 3 | [] | no_license | -- Script para insertar usuarios a la base de datos.
DECLARE
IN_NOMBRE VARCHAR2(200);
IN_APELLIDO VARCHAR2(200);
IN_IDENTIF VARCHAR2(200);
IN_TIPO_IDENTIF VARCHAR2(200);
IN_EMAIL VARCHAR2(200);
IN_USERNAME VARCHAR2(200);
IN_PASSWD VARCHAR2(200);
BEGIN
IN_NOMBRE := 'Gustavo';
IN_APELLIDO := 'Torres';
... | true |
1f9e24008203980fc6dc9e7b46f64d25f58e7221 | SQL | ianT123456/ExamenFinalBasesDeDatos | /Ejercicio3.sql | UTF-8 | 244 | 3.515625 | 4 | [] | no_license | /*Obtener el nombre de equipo del mejor pateador de penales.*/
select other_details.club
from other_details
inner join player_stats on other_details.player_id=player_stats.player_id
where penalties in (select max(penalties) from player_stats); | true |
e533a55c4ca2f8d4a0f9b669f57ac64890727865 | SQL | agungmahariad/Adhimix_Compro | /adhimix_compro.sql | UTF-8 | 11,763 | 2.96875 | 3 | [
"MIT"
] | permissive | -- phpMyAdmin SQL Dump
-- version 4.7.0
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: May 02, 2019 at 02:43 PM
-- Server version: 10.1.25-MariaDB
-- PHP Version: 7.1.7
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD... | true |
d00afd7979e03cbe5bc3529cfc73f6b125fd9d4b | SQL | fabioborbas/Forum_ClubPenguim | /club.sql | UTF-8 | 3,310 | 3.265625 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 5.0.3
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Tempo de geração: 23-Nov-2020 às 23:06
-- Versão do servidor: 10.4.14-MariaDB
-- versão do PHP: 7.4.11
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_C... | true |
fe569197b6967b09e8a886d9ae40baca86ddc43a | SQL | chengxj/detection-supervision | /src/main/resources/sql/ds.sql | UTF-8 | 1,181 | 2.890625 | 3 | [] | no_license | /*
Navicat MySQL Data Transfer
Source Server : localhost_3306
Source Server Version : 50173
Source Host : localhost:3306
Source Database : detection-supervision
Target Server Type : MYSQL
Target Server Version : 50173
File Encoding : 65001
Date: 2018-08-02 17:17:09
*/
SET FOREIGN_... | true |
73ab150e2c6b96e4670e3c6f965a9c9dbd4c37ce | SQL | sakishum/My_Algorithm | /function.sql | UTF-8 | 573 | 2.6875 | 3 | [] | no_license | select MOD(31, 8); -- 求模
select TRUNCATE(1.32, 1); -- 返回被四舍五入去除小数点 y 位的数字 x
select HEX('this is a test str');
select UNHEX('746869732069732061207465737420737472');
select CHAR_LENGTH('this is a test str'); -- 返回字符串长度
select CONCAT_WS('-', '1st', '2nd', '3rd'); -- 合并字符串,concat with separator
select LPAD('hello', 4, '?... | true |
8f4a77ddeac17b7c6bcd864c00e3991c17434aac | SQL | chenhaoxiang/uifuture-ssm | /ssm-mybatis-transaction/src/main/resources/sql/users.sql | UTF-8 | 959 | 3.28125 | 3 | [] | no_license | CREATE TABLE `users` (
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT '自增id',
`username` varchar(32) NOT NULL COMMENT '用户名',
`money` int(22) NOT NULL DEFAULT '0' COMMENT '金额,单位:分 ',
`create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTA... | true |
ac764957fb16a6336c683d18976a6655463a759d | SQL | jaychuo/my-alibaba-integration | /cloud2020/cloud-alibaba-order8080/src/main/resources/alibaba_order.sql | UTF-8 | 2,001 | 3.09375 | 3 | [] | no_license | /*
Navicat Premium Data Transfer
Source Server : 192.168.136.136
Source Server Type : MySQL
Source Server Version : 80020
Source Host : 192.168.136.136:3306
Source Schema : alibaba_order
Target Server Type : MySQL
Target Server Version : 80020
File Encoding ... | true |
051bfd54fa4e179d7a35200e862876ebd039c915 | SQL | AdrianaDinca/addworld | /src/main/resources/sql/addworld.sql | UTF-8 | 1,899 | 3.828125 | 4 | [] | no_license | CREATE TABLE IF NOT EXISTS `addworld`.`ADDWORLD_AGENCY` (
`AGENCY_ID` INT NOT NULL AUTO_INCREMENT,
`NAME` VARCHAR(100) NULL,
`ADDRESS` VARCHAR(200) NULL,
`CITY` VARCHAR(45) NULL,
`STATE` VARCHAR(45) NULL,
`POSTAL_CODE` VARCHAR(45) NULL,
PRIMARY KEY (`AGENCY_ID`),
UNIQUE INDEX `AGENCY_ID_UNIQUE` (`AGENCY_ID` ASC... | true |
b2cf2298be7bd71811ff83ea5ebe046ff4ee06b9 | SQL | keren123/Spark-Cassandra-Demo | /cassandra_import_example/schema.cql | UTF-8 | 355 | 2.8125 | 3 | [] | no_license | CREATE KEYSPACE cassandra_import_example
WITH replication = {
'class' : 'SimpleStrategy',
'replication_factor' : 1
};
CREATE TABLE cassandra_import_example.names (
type VARCHAR,
name VARCHAR,
PRIMARY KEY ((name, type))
);
CREATE TABLE cassandra_import_example.ranks (
type VARCHAR,
name VARCHAR,
rank I... | true |
e4c2a48f27ecd34bad4e134f036ff9c3c951f0f1 | SQL | sbphillips3/Capstone-Health-And-Fitness-Project | /project_database.sql | UTF-8 | 1,635 | 3 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.8.3
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Dec 07, 2018 at 09:42 PM
-- Server version: 10.1.36-MariaDB
-- PHP Version: 7.2.11
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OL... | true |
54e647b070c411b48fc5e35f0c8e0f2351e4cd68 | SQL | namastePrashant/basicCrudInPhp | /info.sql | UTF-8 | 245 | 2.578125 | 3 | [
"MIT"
] | permissive | CREATE TABLE IF NOT EXISTS `info` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(255) NOT NULL,
`address` varchar(255) NOT NULL,
`phone` varchar(255) NOT NULL,
`gender` enum('male','female') NOT NULL,
PRIMARY KEY (`id`)
);
| true |
563f00be6e7839c70a4e6cc598c3af5c1bd402d2 | SQL | Huma88/EleccionesDespliegue | /db_elections.sql | UTF-8 | 2,432 | 3.203125 | 3 | [] | no_license | -- --------------------------------------------------------
-- Host: 127.0.0.1
-- Versión del servidor: 5.7.15-log - MySQL Community Server (GPL)
-- SO del servidor: Win64
-- HeidiSQL Versión: 9.3.0.5117
-- ---------------------------------------------------... | true |
c81bb7e4e0484a1087dc7f43af3ee93a5af9eb76 | SQL | teyyub/CrackingSql2020 | /LeetCode-SQL/--1322. Ads Performance.sql | UTF-8 | 504 | 3.6875 | 4 | [] | no_license | --1322. Ads Performance.sql
select ad_id,
case
when total_clicks_views = 0 then 0
else
round(100 * total_clicks / total_clicks_views, 2) end as ctr
from (
select ad_id,
sum(case when action in ('Viewed', 'Clicked') then 1 else 0 end) as total_clicks_... | true |
b873afb598d6305daa8e652b53ff41fd9876801e | SQL | majedbawarshi/PhpProject | /musicplayer.sql | UTF-8 | 4,427 | 3.390625 | 3 | [
"MIT"
] | permissive | SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!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 */;
/*!40101 SET N... | true |
f2e17d34eebc347b226fa7a22004fe911b7871a8 | SQL | menggus/cloudstoragepractice | /sql/cloudstore.sql | UTF-8 | 3,263 | 3.859375 | 4 | [] | no_license | -- tabfile 文件表
CREATE TABLE `tabfile`
(
`id` int(11) NOT NULL AUTO_INCREMENT,
`file_sha1` char(40) NOT NULL DEFAULT '' COMMENT '文件hash值',
`file_name` varchar(256) NOT NULL DEFAULT '' COMMENT '文件名',
`file_size` bigint(20) DEFAULT '0' COMMENT '文件大小',
`file_addr` varchar(1024) NOT NULL DEF... | true |
b1a94de638235790bb5abaf574c16feab38e7544 | SQL | Dindonpingpong/geekbrains_DB_course | /lesson4/dump.sql | UTF-8 | 2,611 | 3.046875 | 3 | [] | no_license | -- MySQL dump 10.13 Distrib 5.7.29, for Linux (x86_64)
--
-- Host: localhost Database: lesson4
-- ------------------------------------------------------
-- Server version 5.7.29-0ubuntu0.18.04.1
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SE... | true |
f9370327aac98da19a74fb1c9cd683dc85013fca | SQL | LatorreDev/AirBnB_clone_v2 | /setup_mysql_test.sql | UTF-8 | 373 | 2.609375 | 3 | [] | no_license | -- create database, new user, set pasword and permissions
-- Another comment for the checkers
CREATE DATABASE IF NOT EXISTS hbnb_test_db;
CREATE USER IF NOT EXISTS 'hbnb_test'@'localhost' IDENTIFIED BY 'hbnb_test_pwd';
GRANT ALL PRIVILEGES ON hbnb_test_db . * TO 'hbnb_test'@'localhost';
FLUSH PRIVILEGES;
GRANT SELECT O... | true |
d47feb1b220a118c8b578b4fb119ad92407d03ec | SQL | hxxy2003/store | /Work/sql.sql | UTF-8 | 8,431 | 3.375 | 3 | [] | no_license | -- MySQL Script generated by MySQL Workbench
-- 03/29/16 10:38:43
-- 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 |
419828bd3436288bbd9d484f1a274ad02cc91759 | SQL | devonkey/jhechem | /user/user.sql | UTF-8 | 4,383 | 3.984375 | 4 | [] | no_license | #权限管理sql
DROP TABLE IF EXISTS `admin`;
CREATE TABLE `admin` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '管理员id',
`username` varchar(64) NOT NULL DEFAULT '' COMMENT '用户姓名',
`realname` varchar(32) NOT NULL DEFAULT '' COMMENT '真实姓名',
`mobile` varchar(16) NOT NULL DEFAULT '' COMMENT '用户手机号码',
`salt` ... | true |
5c266a1e107865d9112318dc44ab9d0719ff71cf | SQL | rinstance/nurmukhametov-inf | /task with findById/queries.sql | UTF-8 | 1,542 | 4.125 | 4 | [] | no_license | create table driver
(
id bigserial primary key,
first_name varchar(20),
last_name varchar(20),
age integer
);
insert into driver(first_name, last_name, age)
values ('Миша', 'Ховаев', 19),
('Дима', 'Лысенков', 20);
select first_name, age
from driver
where last_name ilike '%ов'
... | true |
c8463b9c6e0d24a7bd182617c21a98df1c8b3441 | SQL | marianaaraujo/grafana_postgres | /pgstatspack-2.3.3/sql/pgstatspack_upgrade_tables_2.3.2.sql | UTF-8 | 758 | 3.5 | 4 | [] | no_license | SET client_min_messages TO error;
-- Upgrade pgstatspack schema tables.
--
-- By mail@meo.bogliolo.name
--
insert into pgstatspack_version values('2.3.2');
CREATE TABLE pgstatspack_activity
(
snapid bigint NOT NULL,
procpid integer,
user_name_id integer,
application_name_id integer,
client_addr inet,
wai... | true |
bc0e215a86c8af1c438cdf354d30bda40b01733e | SQL | AyatoShirayouki/Company_Management_Service | /SQLQuery1.sql | UTF-8 | 1,315 | 3.734375 | 4 | [] | no_license | select EmployeeId, EmployeeFirstName,EmployeeLastName,EmployeeAge, DepartmentName,
convert(varchar(10),DateOfJoining,120) as DateOfJoining
,PhotoFileName
from dbo.Employee E Join Department d on E.DepartmentId = d.DepartmentId
insert into dbo.Employee
(EmployeeFirstName,EmployeeLastName,EmployeeAge,DepartmentId,DateO... | true |
d2a6de2f2593a020f2976f2cc25dc48f99ac4f41 | SQL | simz01/Customers_BEASI671TP3 | /app/sqlite/customer_schema.sql | UTF-8 | 1,870 | 3.21875 | 3 | [] | no_license |
CREATE TABLE adresses (
id INTEGER PRIMARY KEY ASC,
line_1_number_building VARCHAR,
line_2_number_street INTEGER,
line_3_area_locality VARCHAR,
city VARCHAR,
zip_postcode VARCHAR,
state_province_county VARCHAR,
iso_country_code VARCHAR,
other_adress_details TEXT
);
--
-- Table structure for table `... | true |
b0062d1f736bd6a9f5a1396177a9626c465a25d5 | SQL | koukijohn/holbertonschool-higher_level_programming | /0x0E-SQL_more_queries/12-no_genre.sql | UTF-8 | 304 | 3.453125 | 3 | [] | no_license | -- This is a script that lists all shows contained in hbtn_0d_tvshows
-- without a genre linked.
SELECT tv_shows.title, tv_show_genres.genre_id
FROM tv_shows
LEFT JOIN tv_show_genres
ON tv_show_genres.show_id = tv_shows.id
WHERE genre_id is NULL
ORDER BY tv_shows.title ASC, tv_show_genres.genre_id ASC;
| true |
ea165f57dfe465d846b00f7a0e506a01e880cb89 | SQL | Tubbz-alt/SlacTrak | /Database Objects/CONSTRAINTS/CMS_CLAUSE.sql | UTF-8 | 781 | 2.828125 | 3 | [] | no_license | --------------------------------------------------------
-- Constraints for Table CMS_CLAUSE
--------------------------------------------------------
ALTER TABLE "APPS_ADMIN"."CMS_CLAUSE" MODIFY ("CLAUSE_ID" NOT NULL ENABLE);
ALTER TABLE "APPS_ADMIN"."CMS_CLAUSE" MODIFY ("CLAUSE_NAME" NOT NULL ENABLE);
ALTER TA... | true |
7ab39d08d3ec4a49fab7c97d0745f25b30d75f16 | SQL | ramsreeram/Books | /PT/antognini_pt_scripts/chapter11/profile_signature.sql | UTF-8 | 3,820 | 3.21875 | 3 | [] | no_license | SET ECHO OFF
REM ***************************************************************************
REM ******************* Troubleshooting Oracle Performance ********************
REM ************************* http://top.antognini.ch *************************
REM ***************************************************************... | true |
3c6d77fc2036cb451a9d40ada415a9e95dae190f | SQL | lycigv/Projects | /SQLquerries/SQL(15).sql | UTF-8 | 301 | 3.5625 | 4 | [] | no_license | SELECT Bo.Title, B.Name, B.Address, LB.BranchName, BL.DueDate
FROM Book_Loans AS BL INNER JOIN Borrower AS B
ON B.CardNo=BL.CardNo
INNER JOIN Book1 AS Bo
ON BL.BookId=Bo.BookID
INNER JOIN Library_Branch AS LB
ON BL.BranchId=LB.BranchId
WHERE BranchName='Sharptown Central' AND DueDate=' 01-25-2016' | true |
bb0661d1667adf89abd554dbd737e1913f4d2a31 | SQL | shadow81627/2002ICT | /sql/examples/q1.sql | UTF-8 | 130 | 3.0625 | 3 | [] | no_license | select e.name, e.ssn
from employee e
where e.superssn in
(select w.essn from works_on w
where w.hours > 10 )
/* Question 1 */
| true |
5033c4a9a3e5e46908f61296ce1539e6010c2a18 | SQL | levonyang/basic | /config/sql/changelog.sql | UTF-8 | 405 | 2.578125 | 3 | [] | no_license | CREATE TABLE `changelog`
(
`change_number` VARCHAR(22) NOT NULL COMMENT '修改编号',
`complete_dt` DATETIME(6) NOT NULL COMMENT '修改时间',
`applied_by` VARCHAR(100) NOT NULL COMMENT '修改用户',
`description` VARCHAR(500) NOT NULL COMMENT '修改文件',
PRIMARY KEY (`change_number`)
)
COMMENT ='数据库变更记录表'
COLLATE = '... | true |
a65ea09d4d98863760f676da18050d7a065667d7 | SQL | vamshikrishnamraju/microservices_examples | /day3/labs/extra/jdbc-jms-transaction/target/classes/sql/create-processed-payments.sql | UTF-8 | 292 | 2.6875 | 3 | [] | no_license | -- Table: "ProcessedPayments"
-- DROP TABLE "ProcessedPayments";
CREATE TABLE "ProcessedPayments"
(
"paymentIdentifier" character varying(32),
id serial NOT NULL,
CONSTRAINT processedpaymentspk PRIMARY KEY (id)
)
WITH (OIDS=FALSE);
ALTER TABLE "ProcessedPayments" OWNER TO postgres;
| true |
f6d1420aa8da0d4e120170708631d66c219394f8 | SQL | ericbalawejder/employees | /Tableau/Task3/task3.sql | UTF-8 | 561 | 4.28125 | 4 | [] | no_license | # Compare the average salary of female versus male employees in the entire company until
# year 2002, and add a filter allowing you to see that per each department.
SELECT
e.gender,
d.dept_name,
ROUND(AVG(s.salary), 2) AS average_salary,
YEAR(s.from_date) AS calendar_year
FROM
t_salaries s
JOIN
... | true |
e9985c443b99ee59cbdd861dd4701b57d327bef5 | SQL | patoba/SchoolAdministration | /s-04-queries.sql | UTF-8 | 8,049 | 4.0625 | 4 | [] | no_license | --@Autores: Barrero Olguín Patricio
-- Martínez Ostoa Néstor
-- Ramírez Bondi Alejandro
--@Fecha de creación: 24/01/2021
--@Descripción: Queries
/*
REQUERIMIENTOS UNIVERSIDAD
Una Universidad desea analizar los tiempos ... | true |
d1ea79f35127cce4d5dd7eb30cc850285e32d3e3 | SQL | smugclimber/SQLStoreFront | /schema.sql | UTF-8 | 1,814 | 3.515625 | 4 | [] | no_license | CREATE DATABASE bamazon_db;
USE bamazon_db;
-- Created the table "schools"
CREATE TABLE products (
item_id int AUTO_INCREMENT,
product_name VARCHAR(30) NOT NULL,
department_name VARCHAR(30) NOT NULL,
price INT(3) NOT NULL,
stock_quantity INT(3) NOT NULL,
PRIMARY KEY(item_id)
);
-- Inserted a set of record... | true |
5343b742b157c4fce1d1e58618f353ee51b01c09 | SQL | Vashthestupid/Chatroom | /donnees/chat.sql | UTF-8 | 1,504 | 3.09375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.6.4
-- https://www.phpmyadmin.net/
--
-- Client : 127.0.0.1
-- Généré le : Mar 30 Mai 2017 à 06:27
-- Version du serveur : 5.7.14
-- Version de PHP : 7.0.10
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET... | true |
7d8aef73923aef77e5b5c897a84dce313c8c24af | SQL | pufei007/react-umi-express | /server/ktv.sql | UTF-8 | 36,731 | 2.796875 | 3 | [] | no_license | /*
Navicat MySQL Data Transfer
Source Server : localhost
Source Server Version : 50719
Source Host : localhost:3306
Source Database : ktv
Target Server Type : MYSQL
Target Server Version : 50719
File Encoding : 65001
Date: 2019-01-16 01:17:30
*/
SET FOREIGN_KEY_CHECKS=0;
-- -----... | true |
8dff05d90fa79d109639029bd2f21d9bd5f84334 | SQL | AmandaShuman/SQLpython | /week1/notes/postgreSQLexample.sql | UTF-8 | 1,652 | 4.375 | 4 | [] | no_license | -- foreign keys and relationship types
-- one to many
---
--- CREATE tables
---
CREATE TABLE events (
event_id SERIAL,
show_time TIMESTAMP,
PRIMARY KEY(event_id),
auditorium_id INT,
film_id INT NOT NULL
);
CREATE TABLE auditoria (
auditorium_id SERIAL,
capacity INTEGER NOT NULL,
PRIM... | true |
6532b056e525448bd83f3b580562249d529de32f | SQL | seiya0429/apollo-server-prisma-todo-app | /prisma/migrations/20210925095241_init/migration.sql | UTF-8 | 780 | 4.15625 | 4 | [] | no_license | -- CreateEnum
CREATE TYPE "TodoStatus" AS ENUM ('done', 'pending');
-- CreateTable
CREATE TABLE "Todo" (
"id" SERIAL NOT NULL,
"createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
"updatedAt" TIMESTAMP(3) NOT NULL,
"title" VARCHAR(255) NOT NULL,
"description" TEXT,
"status" "TodoStatus"... | true |
0b85917856844bb9c1c3ecb899d164137a9073fe | SQL | FreddyBueno/SoftEPS | /SoftEPS/SCRIPT DE TABLAS.sql | UTF-8 | 169,952 | 3.3125 | 3 | [] | no_license | -- ============================================================
-- Database name: SOFTEPS
-- DBMS name: ORACLE Version 8
-- Created on: 05/10/2002 23:51
-- ============================================================
-... | true |
a70654c2fa13e14d0f225726e5aaab52e6e0de40 | SQL | akusei24/TallerCIC | /taller/taller/database/db_taller(1).sql | UTF-8 | 4,434 | 3.125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.7.9
-- https://www.phpmyadmin.net/
--
-- Servidor: 127.0.0.1
-- Tiempo de generación: 14-12-2018 a las 04:55:21
-- Versión del servidor: 10.1.31-MariaDB
-- Versión de PHP: 7.2.3
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
... | true |
895ed69ba40cf2390ac00f7ccec873661f722712 | SQL | jusm/Black-Mamba | /Mamba-integration/src/dbscript/usm-mysql.sql | UTF-8 | 708 | 2.953125 | 3 | [] | no_license | USE `mamba`;
DROP TABLE IF EXISTS `usm_admin`;
CREATE TABLE `usm_admin` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`login_name` varchar(32) NOT NULL,
`real_name` varchar(64) DEFAULT NULL,
`login_paw` varchar(256) NOT NULL,
`login_count` bigint(20) unsigned NOT NULL DEFAULT '0',
`last_login_dat... | true |
4afd1dc626d8a33937eab714740c2efeb0d4cf79 | SQL | youkefan18/is_jsonb_valid | /sql/dependencies.sql | UTF-8 | 2,134 | 2.890625 | 3 | [
"MIT"
] | permissive | -- dependencies
-- neither
SELECT is_jsonb_valid('{"dependencies":{"bar":["foo"]}}', '{}');
-- nondependant
SELECT is_jsonb_valid('{"dependencies":{"bar":["foo"]}}', '{"foo":1}');
-- with dependency
SELECT is_jsonb_valid('{"dependencies":{"bar":["foo"]}}', '{"foo":1,"bar":2}');
-- missing dependency
SELECT is_jsonb_val... | true |
2db9cda593c27c6995614c3592b2c23fe4e087f1 | SQL | wnbsmart/movie_db | /##sql/movies.sql | UTF-8 | 5,770 | 3.328125 | 3 | [
"MIT",
"BSD-3-Clause"
] | permissive | -- phpMyAdmin SQL Dump
-- version 4.3.11
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Oct 06, 2017 at 05:29 PM
-- Server version: 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 |
cd036ea438fb5a488ffe823c49efcf4a0ded8fc9 | SQL | JimiHuyn/PortfolioProjects | /TwitchDataset.sql | UTF-8 | 3,419 | 4.15625 | 4 | [] | no_license | --Possible visuals for Tableau--
-- Best Ranking Game throughout the Year
Select Distinct Game, Rank, Month, Year, Hours_watched
From Twitch_game_data
Where Rank = '1'
Order by Year ASC
-- Showing Twitch catergory with highest watch count
Select top 20 Game, Month, Year, MAX(Hours_watched) as Watch_count
... | true |
2702bd7c0854344f6b0334612ae02de2b53673d7 | SQL | mikemuchira/simple-PHP-login-reset-password-system | /M_M_S.sql | UTF-8 | 2,460 | 3.359375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.7.0
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Generation Time: Sep 01, 2018 at 06:40 PM
-- Server version: 10.1.22-MariaDB
-- PHP Version: 7.1.4
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD... | true |
28c92ea25e5395755807b4ba5158c0bc5c79a5f1 | SQL | gczarnocki/grovepi-logger | /Db/init.sql | UTF-8 | 276 | 2.6875 | 3 | [
"MIT"
] | permissive | CREATE TABLE SENSOR_INFO (
ID INTEGER NOT NULL GENERATED ALWAYS AS IDENTITY (START WITH 1, INCREMENT BY 1),
LOG_TIME TIMESTAMP,
TEMPERATURE REAL,
HUMIDITY REAL,
LIGHT REAL,
SOUND REAL,
PROXIMITY REAL,
THRESHOLD INTEGER);
ALTER TABLE SENSOR_INFO ADD PRIMARY KEY (ID);
| true |
147849bd31511896c757614e86b5dee526c56dad | SQL | jamestylerwarren/Database_Exercises | /albums_migration.sql | UTF-8 | 243 | 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 varchar(100),
record varchar(100),
release_date YEAR,
sales varchar (100),
genre varchar (200),
primary key (id)
); | true |
19da97cfe0b17d6b6d2befcfa30f784a2d79792a | SQL | ThoPeumasschel/MyProjects | /labs/Lab_05_11.sql | UTF-8 | 300 | 3.234375 | 3 | [] | no_license | SELECT
job_id "Job",
SUM(DECODE(department_id,20,salary) ) "Dept 20",
SUM(DECODE(department_id,50,salary) ) "Dept 50",
SUM(DECODE(department_id,80,salary) ) "Dept 80",
SUM(DECODE(department_id,90,salary) ) "Dept 90",
SUM(salary) "Total"
FROM
employees
GROUP BY
job_id; | true |
9117bbf41525e4309e45c4aa6976478dd2d37e2f | SQL | joaokrlos/Teste_sistema | /CADASTRO_TESTE/script_banco.sql | ISO-8859-1 | 352 | 2.90625 | 3 | [] | no_license | CREATE DATABASE CadastroDB
--Criando tabela
--determina o uso do banco de dados correto
USE CadastroDB
--CRIAO DE TABELA
CREATE TABLE Funcionario (
FuncionarioId int IDENTITY(1,1) NOT NULL PRIMARY KEY,
Nome nvarchar (50) NOT NULL ,
Idade int NOT NULL,
Genero nvarchar (10) NOT NULL,
);
-- VERIFICANDO COLUNAS
SE... | true |
0a26c5646168e2e3f1f2771e29c191eb66788936 | SQL | gaogaolulu/how_to_run_vitess_locally | /02_install_mysql5.7.sql | UTF-8 | 2,317 | 3.015625 | 3 | [] | no_license | /****
Vitess support MySQl 5.6, 5.7 and 8.0 I guess; however, I suggest to use MySQL 5.7 to work with Vitess because MySQL 5.7 is easier to use(I will explain it later).
after I go through whole installation process, I find there are a lot of detail info hidden.
we need to install MySQL 5.7 rpms and setup with semi-s... | true |
c79b511df84c45f0bb42792c91f2234573f5f563 | SQL | work-ronmichael/mwp-migration | /MAYORS_CORNER/1. MWP_MAYORS_CORNER_CATEGORY.SQL | UTF-8 | 399 | 2.953125 | 3 | [] | no_license | DECLARE
CURSOR c IS SELECT BLOG_CATEGORY_NAME,BLOG_DESCRIPTION,BLOG_CATEGORY_ID FROM PORTAL.TBL_BLOG_CATEGORY ;
rc c%ROWTYPE;
BEGIN
OPEN c;
LOOP
FETCH c INTO rc;
EXIT WHEN c%NOTFOUND;
INSERT INTO MWP_MAYORS_CORNER_CATEGORY(
MC_CATEGORY_NAME,
MC_CATEGORY_DESCRIPTION,
TEMP_ID
)
VALUES(rc.BLOG_... | true |
20fcfdb6f1b18ea73577476b1767edd6559ac3ba | SQL | andrefa/play-framework-crud | /conf/evolutions/default/1.sql | UTF-8 | 521 | 2.53125 | 3 | [
"Apache-2.0"
] | permissive | # --- Created by Ebean DDL
# To stop Ebean DDL generation, remove this comment and start using Evolutions
# --- !Ups
create table product (
id bigint auto_increment not null,
title varchar(255),
code varchar(255),
category ... | true |
02cede32861618cfb3e4ea97aa7e6b7e9037066b | SQL | trickerer/Magic-Find | /world_item_template.sql | UTF-8 | 798 | 2.671875 | 3 | [] | no_license | SET @ENTRY1 := 45290;
SET @ENTRY2 := 34643;
SET @ENTRY3 := 29557;
SET @DISPLAYID1 := 58209;
SET @DISPLAYID2 := 19572;
SET @DISPLAYID3 := 37887;
-- DELETE FROM `item_template` WHERE `entry` IN (@ENTRY1,@ENTRY2,@ENTRY3);
INSERT INTO `item_template`
(`entry`,`class`,`name`,`displayid`,`Quality`,`Flags`,`ItemLevel`,`stac... | true |
6b5847cde9abed7295d5ffd883794974cc5d272b | SQL | ElifKarakutukDinc/dvd_rental | /story_telling_1/actor_length_first_name_distribution.sql | UTF-8 | 124 | 2.640625 | 3 | [] | no_license | --Distribution of actors first name length
select count(*), length(first_name) as first_name_length
from actor
group by 2;
| true |
3749019f3e40a99d4307437423b4696769f95e5b | SQL | ddlorz/homecooked | /dummydata.sql | UTF-8 | 2,754 | 2.96875 | 3 | [] | no_license | INSERT INTO menus (email, item, price)
VALUES
("chef1@gmail.com", "Chicken fried steak with garlic mashed potatoes and a chocolate chip cookie", "$10")
("chef1@gmail.com", "Gravy-smothered meatloaf alongside steamed mixed vegetables and a cupcake","$9")
("chef1@gmail.com", "Three-cheese lasagna slice (6 oz.), homem... | true |
67fd4f2ffa4f97effa42a319d2c1a6beac38a85d | SQL | nacho270/GTL | /BackGestionTextilLevel/sql/upgrades/produccion/2015/2015-07-05_nro_sucursal_docs_rs.sql | UTF-8 | 1,024 | 3.328125 | 3 | [] | no_license | -- PARA LA A
update t_factura set a_nro_sucursal = 1 where a_nro_factura < 0;
update t_factura set a_nro_sucursal = 2 where a_nro_factura > 0;
update t_remito r set a_nro_sucursal = 1 where a_nro_factura is not null and a_nro_factura < 0;
update t_remito r set a_nro_sucursal = 2 where a_nro_factura is not null and a_... | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.