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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
1968446a3e5b411950460dd52ac8e060c023f33b | SQL | CCI-MOC/reporting | /docker-images/init-db/src/db/poc/constraints/address_fk.sql | UTF-8 | 160 | 3.171875 | 3 | [] | no_license |
ALTER TABLE poc ADD CONSTRAINT poc_address_fk
FOREIGN KEY (address_id)
REFERENCES address (address_id)
ON DELETE NO ACTION
ON UPDATE NO ACTION
NOT DEFERRABLE;
| true |
b42f94a1cd705f45a876c8bd3dd1c4eb8975be67 | SQL | OneSharpeGuy/showtime | /sites/all/modules/osg_stuff/sts/osg_singout_support/rollup ip.sql | UTF-8 | 794 | 3.53125 | 4 | [] | no_license | SELECT a.title,
a.start_time_unix,
b.*,
c.*,
yes_count/yes_respondants*100 AS pct_yes,
no_count/no_respondants*100 AS pct_no,
limbo_count/limbo_respondants*100 AS pct_limbo,
((eligible_users-unregistered_count)/eligible_users) *100 as pct_responding
FROM osg_ical_imported a
INNER JOIN
(
SELECT nid... | true |
eb44c743ecb322119841d3bbb7050a0387960b3f | SQL | TalRodin/SQL_Hackerrank | /Asian_Population.sql | UTF-8 | 120 | 3.15625 | 3 | [] | no_license | select sum(c.population) as population
from city c
join country y
on c.CountryCode=y.Code
where y.CONTINENT in ('Asia'); | true |
a75b1cc7766e988060e7583cf80a4c928716bc62 | SQL | andrelago13/LTW | /database/db.sql | WINDOWS-1250 | 5,383 | 3.59375 | 4 | [] | no_license | PRAGMA foreign_keys = ON;
DROP TABLE IF EXISTS User;
CREATE TABLE User
(
id INTEGER PRIMARY KEY,
name VARCHAR NOT NULL,
username CHAR(25) NOT NULL,
email VARCHAR NOT NULL,
hash VARCHAR NOT NULL
);
DROP TABLE IF EXISTS EventType;
CREATE TABLE EventType
(
id INTEGER PRIMARY KEY,
name VARC... | true |
9f15d81e3057dd89fbca3dc24f2465650a4eb426 | SQL | barbmk/sql | /week5_teradata_drillards.sql | UTF-8 | 10,265 | 4.71875 | 5 | [] | no_license | -- Some time ago I finished a course on Coursera on how to manage Big Data with MySQL. This was the last assignment of the course, done using Teradata and the Dillard's database. I think that the assignment was great to learn so I decided to publish my responses.
-- Exercise 1. How many distinct dates are there in the... | true |
c399a8b17f6dc271647c52b5673746558238824e | SQL | josepicon/IST-659 | /lab_advanced_querying/SQLQuery_Lab7.sql | UTF-8 | 2,215 | 3.984375 | 4 | [] | no_license | SELECT
vc_User.UserName
, vc_User.EmailAddress
, vc_Vidcast.vc_VidCastID
FROM vc_Vidcast
JOIN vc_User ON vc_User.vc_UserID = vc_VidCast.vc_UserID
ORDER BY vc_User.UserName
-- Look for users who have not yet made any VidCasts
SELECT * FROM vc_User
WHERE vc_UserID NOT IN (SELECT vc_UserID FROM vc_VidCast)
-- ... | true |
a822211cca719b24368ddf265a6081a2e2d11e02 | SQL | mklv13/C-Sharp-DB-SoftUni | /MSSQL/03. Table Relations/Peaks in Rila.sql | UTF-8 | 169 | 3.390625 | 3 | [] | no_license | USE Geography
SELECT MountainRange,PeakName,Elevation
FROM Mountains m
JOIN Peaks P ON m.Id = P.MountainId
WHERE MountainRange LIKE 'Rila'
ORDER BY Elevation DESC | true |
5e5d884b5bd21164c23fa3dfc9e9051e4ed94e2a | SQL | ddt-sawa/sql_drill_sawa | /1-3_question2.sql | UTF-8 | 357 | 3.265625 | 3 | [] | no_license | /*1-3 問2 アクセス記録テーブル(access_log)からリンク元URLを重複のない形式で取り出してみましょう。
以下の空欄を埋めて、SQL命令を完成させてください。*/
--取得列(重複なし)
SELECT DISTINCT
--リンク元URL
referer
--参照範囲
FROM
--アクセス記録テーブル
access_log
;
| true |
5c0ce1ae059ddd4d36a713da310ce19e995d1e76 | SQL | zzqq0103/ltcd4vip | /sql/create_table.sql | UTF-8 | 1,449 | 3.375 | 3 | [] | no_license | create table leetcode_problems
(
id int auto_increment
primary key,
lid int null
comment '前端展现题目号',
qid int null
comment 'LeetCode题目真正Id',
title varchar(100) null
comment '题目',
`desc` text null
comment '题干',
difficulty int n... | true |
5ce0a4f028f492686a7c8485445aa2cf84b3c31f | SQL | beanieboi/mtfv-stats | /db/views/lifetime_player_stats_v01.sql | UTF-8 | 1,051 | 2.828125 | 3 | [] | no_license | SELECT
player_stats.player_id,
SUM(player_stats.overall_performance_index) AS overall_performance_index,
SUM(player_stats.overall_score) AS overall_score,
SUM(player_stats.overall_score_against) AS overall_score_against,
SUM(player_stats.overall_goals) AS overall_goals,
SUM(player_stats.overall_... | true |
0d53fb2aa8d8ad5c354e5a16db9790bef46ea179 | SQL | GG1024/springcloud2020 | /mybatis-plus-tenant/db/init.sql | UTF-8 | 322 | 2.796875 | 3 | [] | no_license | CREATE TABLE sys_user(
id bigint PRIMARY KEY COMMENT '主键ID',
account varchar(64) COMMENT '账号',
tenant_id bigint COMMENT '租户ID'
) COMMENT = '用户表',
CHARACTER SET utf8,
COLLATE utf8_general_ci;
INSERT INTO demo.sys_user (id,account,tenant_id) VALUES
(1,'admin',1),
(2,'lisi',1),
(3,'wangwu',2); | true |
cb8083e5c37f31427c205243838bad975da14cf5 | SQL | BPT-Coders/skips | /["docs"]/sms.sql | UTF-8 | 1,774 | 3.296875 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 3.4.11.1deb2+deb7u2
-- http://www.phpmyadmin.net
--
-- Хост: localhost
-- Время создания: Мар 23 2016 г., 13:11
-- Версия сервера: 5.5.47
-- Версия PHP: 5.4.45-0+deb7u2
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER... | true |
f84a87e4424102c1452c3e34af309855051338a9 | SQL | neoocean/slackservice | /tables.sql | UTF-8 | 3,120 | 3.015625 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.3.3
-- http://www.phpmyadmin.net
--
-- Host: slackservice.db
-- Generation Time: Jan 23, 2015 at 02:56 PM
-- Server version: 5.3.12-MariaDB
-- PHP Version: 5.6.4-nfsn1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARAC... | true |
49b02465daf7b3f7b074348b49eef50cf9c493c4 | SQL | Ryuo-Rei/sql | /C-Level1.sql | UTF-8 | 562 | 2.8125 | 3 | [] | no_license | -- 1
SELECT
ID,
名称,
職業コード,
HP,
MP,
状態コード
FROM
パーティー
-- 2
SELECT
名称 AS 名前,
HP AS 現在のHP,
MP AS 現在のMP
FROM
パーティー;
-- 3
SELECT
*
FROM
イベント;
-- 4
SELECT
イベント番号 AS 番号,
イベント名称 AS 場面
FROM
イベント;
-- 5
INSERT INTO
パーティー
VALUES('A01', 'スガワラ', '21', 131, 232, '03');
INSERT INTO
パーティー
VALUES('A02', 'オーエ', '10'... | true |
53129ce215883169baac2d0c0e890eda234e5982 | SQL | TamasNeumer/CodeFights-Arcade-Solutions-in-Java | /src/main/java/Database/13_securityBreach.sql | UTF-8 | 231 | 2.703125 | 3 | [] | no_license | /*Please add ; after each select statement*/
CREATE PROCEDURE securityBreach()
BEGIN
SELECT * FROM users
WHERE
attribute LIKE CONCAT('%_\%',first_name,'_',second_name,'\%%') COLLATE utf8_bin
ORDER BY attribute;
END | true |
33417ccb0db72e6b5c5caf38817caea3ee2430bc | SQL | rheehot/intern-2020 | /Database/table_create.sql | UTF-8 | 7,223 | 3.609375 | 4 | [] | no_license | use block_board;
drop table view_records;
drop table alarms;
drop table files;
drop table comments;
drop table posts;
drop table users;
drop table functions_check;
drop table functions;
drop table boards;
drop table companies;
create table companies(
company_id int(9) not null,
company_name varchar(20) not null,... | true |
e7f48a96a2ae2221031f85526b799160b177a1f6 | SQL | Lucas4088/SQL_base | /Triggers/DodanieWypozyczenia.sql | UTF-8 | 539 | 3.4375 | 3 | [] | no_license | ALTER TRIGGER "DodanieWypozyczenia" BEFORE INSERT
ORDER 1 ON Wypozyczenie
REFERENCING NEW AS Nowa
FOR EACH ROW
BEGIN
DECLARE flag INTEGER;
DECLARE l_wyp INTEGER;
SET l_wyp=(SELECT LiczbaWypEgzemplarzy
FROM KontoBiblioteczne AS KoB
WHERE Nowa.KontoID=KoB.KontoID);
SET flag ... | true |
30f8dfc97343d5ab123777e2220b63f6b17aebb9 | SQL | realkasparov/MyCode | /table-edit/ajax-edit.sql | UTF-8 | 450 | 2.875 | 3 | [] | no_license | CREATE TABLE IF NOT EXISTS `clients` (
`id` int(11) NOT NULL,
`firstname` varchar(255) NOT NULL,
`lastname` varchar(255) NOT NULL,
`phone` varchar(255) NOT NULL
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8;
INSERT INTO `clients` (`id`, `firstname`, `lastname`, `phone`) VALUES
(1, 'Иван', 'Иванов... | true |
2cfb52c8abb9e95c982bd316e4a438845105a6b5 | SQL | varshithaskashyap/tourism | /tourism (1).sql | UTF-8 | 5,679 | 2.75 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.8.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Nov 25, 2018 at 02:56 PM
-- Server version: 10.1.34-MariaDB
-- PHP Version: 7.2.7
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD... | true |
63606a23f1139d339d2e7364d5464b574e0133c8 | SQL | paul-rogers/drill-test-framework | /framework/resources/Advanced/tpcds/tpcds_sf1/original/parquet/query49.sql | UTF-8 | 5,830 | 3.484375 | 3 | [
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | -- start query 49 in stream 0 using template query49.tpl
SELECT 'web' AS channel,
web.item,
web.return_ratio,
web.return_rank,
web.currency_rank
FROM (SELECT item,
return_ratio,
currency_ratio,
Rank()
... | true |
763db9d126070f21cd58635b10fd3372577052bd | SQL | bhimbho/Movie-Reservation-System | /db/db_movie.sql | UTF-8 | 11,264 | 3.21875 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.8.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1:3306
-- Generation Time: Feb 25, 2020 at 02:09 PM
-- Server version: 5.7.24
-- PHP Version: 7.3.1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHA... | true |
e0d20de085245842236063707fd50539ee829a53 | SQL | TYPO3-svn-archive/content_replacer | /ext_tables.sql | UTF-8 | 2,496 | 2.828125 | 3 | [] | no_license | -- -----------------------------------------------------
-- Table tx_content_replacer_term
-- -----------------------------------------------------
CREATE TABLE tx_content_replacer_term (
uid int(10) unsigned NOT NULL auto_increment,
pid int(10) unsigned NOT NULL DEFAULT '0',
tstamp int(10) unsigned NOT NULL DEFAUL... | true |
8330affd9542c7d9d8d4b6710ac08fb1527e64a8 | SQL | FARADAY001/Beton-construction | /data_base/visitors_messages.sql | UTF-8 | 1,164 | 2.84375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.8.5
-- https://www.phpmyadmin.net/
--
-- Hôte : 127.0.0.1
-- Généré le : mar. 23 avr. 2019 à 12:35
-- Version du serveur : 10.1.38-MariaDB
-- Version de PHP : 7.1.28
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!4010... | true |
666e22c6e9dd3597ba15bc3faaff7bbcf3f8d9aa | SQL | umeshinde007/learning | /employee.sql | UTF-8 | 2,134 | 2.75 | 3 | [
"MIT"
] | permissive | CREATE TABLE `employee` (
`id` int(11) NOT NULL PRIMARY KEY AUTO_INCREMENT,
`emp_name` varchar(80) NOT NULL,
`salary` varchar(20) NOT NULL,
`gender` varchar(10) NOT NULL,
`city` varchar(80) NOT NULL,
`email` varchar(80) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
INSERT INTO `employee` (`id`, `emp_name`... | true |
f6d0d95c59943759850de8d0e1e394577326015e | SQL | ervinne13/student-hospital-records | /storage/queries/sp_register_user.sql | UTF-8 | 990 | 3.0625 | 3 | [
"MIT"
] | permissive | CREATE PROCEDURE IF NOT EXISTS SP_RegisterUserAccount(
IN pusername VARCHAR(100),
IN pcomplete_name VARCHAR(100),
IN pusertype VARCHAR(100),
IN plicense_no VARCHAR(100),
IN pmodifiedby INT,
IN ppassword VARCHAR(100),
IN ppassword_repeat VARCHAR(100),
... | true |
e936531e279721fb61394f2f32c2972b38805169 | SQL | Droid008/geekbrains-mysql | /concole_commands.sql | UTF-8 | 589 | 4.3125 | 4 | [] | no_license | SELECT max(birthday), min(birthday), name, count(profiles.user_id) as c,count(profiles.user_id)/(select count(id) from users)*100 as p, (select count(id) from users) as s FROM communities_users JOIN communities ON communities_users.community_id = communities.id JOIN profiles ON communities_users.user_id = profiles.user... | true |
6b0742e83bccf16b1c7192543c7b7974f0910d97 | SQL | EduardoNuezWehbe/PracticasADBD | /Triggers/TriggerStockAfterUpdate.sql | UTF-8 | 181 | 2.625 | 3 | [] | no_license | CREATE DEFINER = CURRENT_USER TRIGGER `Diagrama_Viveros`.`Productos_Stock_AFTER_UPDATE` AFTER UPDATE ON `Productos` FOR EACH ROW
BEGIN
IF Stock = 0 THEN
RETURN NULL;
END IF;
END | true |
f4e93f848915ab5a6faa29c68986b484a7266c0d | SQL | ManuelLoaizaVasquez/inf246-bases-de-datos-pucp | /libros/SQLLFDL2E/02-ddl/integridad.sql | UTF-8 | 1,712 | 3.5 | 4 | [] | no_license | -- 8.1 La clave primaria
CREATE TABLE cr_dormitorio(
id_habitacion INTEGER PRIMARY KEY,
id_hotel INTEGER,
id_tipo_habitacion INTEGER,
numero VARCHAR2(6),
comentario VARCHAR2(400)
);
CREATE TABLE cr_dormitorio(
id_habitacion INTEGER,
id_hotel INTEGER,
id_tipo_habitacion INTEGER,
numero VARCHAR2(6),
... | true |
14fb836704846049d0d62c289cdf598ce9ca2317 | SQL | al361877/1027_2021_BBDD | /reset.sql | UTF-8 | 11,528 | 3.515625 | 4 | [] | no_license | delete from Municipio;
delete from EspacioPublico;
delete from Zona;
delete from Usuario;
delete from Estacion;
delete from Controlador;
delete from Ciudadano;
delete from Gestor;
delete from Reserva;
delete from Servicio;
delete from FranjaEspacio;
--------------------------------------------
DROP table Servicio;
DR... | true |
cbd2787c093d865660392147b2aee22eb16dd954 | SQL | LGEun02/test_code | /HRD_홈쇼핑/src/main/webapp/홈쇼핑.sql | UTF-8 | 2,622 | 3.3125 | 3 | [] | no_license | create table member_tbl_02(
custno number(6) not null primary key,
custname varchar2(20),
phone varchar2(13),
address varchar2(60),
joindate date,
grade char(1),
city char(2)
);
insert into member_tbl_02 values(100001,'김행복','010-1111-2222','서울 동대문구 휘경1동','20151202','A','01');
insert into member_tbl_02 v... | true |
05647e81826d356ae57c7d9965207fd55b5f3fc2 | SQL | colinbut/javaee-samples | /jpa/hibernate/hibernate-xml-mapping/src/main/scripts/script.sql | UTF-8 | 157 | 2.625 | 3 | [] | no_license | CREATE TABLE DBUSER (
USER_ID INT(6) PRIMARY KEY AUTO_INCREMENT,
USERNAME VARCHAR(30) NOT NULL,
CREATED_BY VARCHAR(30) NOT NULL,
CREATED_DATE DATETIME
); | true |
3ec7125c9daf7be5abc83654b88f57b99b46d06f | SQL | tarikbilla/PHP-simple-Login-Registration-with-SB-Admin-2 | /members.sql | UTF-8 | 3,062 | 2.9375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.8.5
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Sep 28, 2020 at 08:10 PM
-- Server version: 10.1.38-MariaDB
-- PHP Version: 7.1.28
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OL... | true |
f06d7bddeb1bbeb3f56f07539ea38dbd35ec2148 | SQL | rafiq/codeWars | /aug2021/logisticsOpt.sql | UTF-8 | 222 | 3.15625 | 3 | [
"MIT"
] | permissive | -- SELECT producer, COUNT(SELECT * FROM products WHERE ) count_product_type
SELECT
COUNT(producer) AS count_products_types,
producer
FROM
products
GROUP BY
producer
ORDER BY
COUNT(producer) DESC,
producer ASC | true |
bc378366e5471ec0d7af21ab2f4d5e16d8e1c81c | SQL | evidencebp/general | /ght/queries/repo_properties.sql | UTF-8 | 12,216 | 3.515625 | 4 | [] | no_license | # GHT repo_properties.sql
drop table if exists general_ght.repo_issues_profile;
create table
general_ght.repo_issues_profile
as
select
p.repo_name as repo_name
, count(distinct issue_id) as issues
, count(distinct if(ie.assigned_at is null, null, issue_id)) as assigned_issues
, 1.0*count(distinct if(ie.assigned_at is ... | true |
2342489091ea8c69d927037c96e76a83e016b8c8 | SQL | radtek/abs3 | /sql/mmfo/bars/Procedure/dynamic.sql | UTF-8 | 1,793 | 2.8125 | 3 | [] | no_license |
PROMPT =====================================================================================
PROMPT *** Run *** ========== Scripts /Sql/BARS/Procedure/DYNAMIC.sql =========*** Run *** =
PROMPT =====================================================================================
PROMPT *** Create procedure... | true |
eabb5a86727ac0d1d789e6dbb59dfed7e5d49b91 | SQL | hpmsnell/measures | /measures/2017/mips/quality/343/spec.cql | UTF-8 | 2,049 | 3.53125 | 4 | [] | no_license | library MIPS_343_2017 version '1'
/*
*
* Source: MIPS
* ID: 343
* Year: 2017
* Version: 1
* Written by: Steve Daniels
*
*/
using QDM
// MIPS value sets
valueset "MIPS; MIPS 343 Procedure"
valueset "MIPS; Risk Factors for Colorectal Cancer"
valueset "MIPS; Performance Met: 3775F"
valueset "MIPS; Denominator... | true |
940a5281b1264a9988514987c04da8edac3f6c8d | SQL | louishust/jnfdc_go | /data/create_table.sql | UTF-8 | 3,248 | 3.875 | 4 | [] | no_license | DROP TABLE `jn_net_sign`;
CREATE TABLE `jn_net_sign` (
`id` bigint(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键ID',
`sign_type` varchar(128) NOT NULL COMMENT '网签类型',
`sign_number` int unsigned NOT NULL COMMENT '网签数量',
`sign_area` decimal(20,2) unsigned NOT NULL COMMENT '网签面积',
`created` timestamp DEFAULT ... | true |
6da166423b1567aced973bbccad938e9405e0ef4 | SQL | pedrobrigatto/drivethruapp | /bd.sql | UTF-8 | 1,976 | 3.171875 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 3.5.2.2
-- http://www.phpmyadmin.net
--
-- Servidor: 127.0.0.1
-- Tempo de Geração:
-- Versão do Servidor: 5.5.27-log
-- Versão do PHP: 5.4.6
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 S... | true |
5ed849e41a3380727af1ed6fb2b2a5ec22ca8ab9 | SQL | qwat/qwat-data-model | /ordinary_data/nodes/od_network_element.sql | UTF-8 | 3,316 | 3.484375 | 3 | [] | no_license | /*
qWat - QGIS Water Module
SQL file :: network network_element
*/
CREATE TABLE qwat_od.network_element ();
COMMENT ON TABLE qwat_od.network_element IS 'Tables for network network_elements.
Every network_element of the network (hydrants, network_element, installations, etc.) inherit from network_element which it... | true |
8dee296ec00aeb1337fbb907a64d117adc12cc15 | SQL | jessicabrock/oracle | /oracle/dba/jobs_running.sql | UTF-8 | 1,084 | 3.25 | 3 | [] | no_license | -- ********************************************************************
-- * Filename : jobs_running.sql
-- * author: : Jess Brock
-- * Original : 08-Jun-2016
-- * Last Update : 08-Jun-2016
-- * Description : What scheduler jobs are currently running
-- * Usage : @jobs_running.sq... | true |
b0f6450d91b8315dc93a2ef21c54ad551691cb12 | SQL | Kenyi3327/LibraryDB- | /schema.sql | UTF-8 | 1,445 | 3.765625 | 4 | [] | no_license |
CREATE TABLE IF NOT EXISTS authors(
author_id INTEGER UNSIGNED PRIMARY KEY AUTO_INCREMENT,
name VARCHAR(100) NOT NULL,
nationality VARCHAR(3)
);
CREATE TABLE IF NOT EXISTS books(
book_id INT UNSIGNED PRIMARY KEY AUTO_INCREMENT,
author_id INT UNSIGNED,
title VARCHAR(100) NOT NULL,
year... | true |
689a1731a3029e27d28ed75594c81369fdd164d8 | SQL | arafathnihar/dilushi | /src/dilushipharmacy/movedb (1).sql | UTF-8 | 5,037 | 3.109375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.1.14
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Aug 15, 2015 at 07:25 PM
-- Server version: 5.6.17
-- PHP Version: 5.5.12
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;... | true |
ec64a9b66af009ca6a51987047fc2e2019329324 | SQL | jmburgues/UEED-Server | /ueedDB_Script.sql | UTF-8 | 12,574 | 4.28125 | 4 | [] | no_license | CREATE DATABASE UEED_DB;
# DROP DATABASE UEED_DB;
USE UEED_DB;
CREATE TABLE RATES(
rateId int auto_increment,
category varchar(40) unique,
kwPrice float CHECK(kwPrice>0),
CONSTRAINT pk_rateId primary key (rateId)
);
CREATE TABLE USERS(
username varchar(40),
password varchar(40) not null,
e... | true |
ce3350d44bbd792a05d7d887b836d35d5b0a733a | SQL | Julia-gardione/Generation | /Exercicio1-21.05.sql | UTF-8 | 2,164 | 3.609375 | 4 | [] | no_license | create database db_game_online;
use db_game_online;
create table tb_classes(
id bigint auto_increment,
nome varchar(100),
habilidade varchar(150),
primary key (id)
);
insert into tb_classe (nome, habilidade) values ("Feiticeiro", "Magia");
insert into tb_classe (nome, habilidade) values ("Arqueiro", "Usar arco e fle... | true |
7a20d8437bcc4babb161a72903452ba15163ea0f | SQL | leixuecynthia/python-exercise | /L1322.sql | UTF-8 | 233 | 3.390625 | 3 | [] | no_license | SELECT ad_id,
ifnull(round(SUM(CASE WHEN ACTION = 'Clicked' THEN 1 ELSE 0 END) / SUM(CASE WHEN ACTION = 'Clicked' OR ACTION = 'Viewed' THEN 1 ELSE 0 END) * 100, 2), 0) AS ctr
FROM Ads
GROUP BY ad_id
ORDER BY ctr DESC, ad_id ASC
| true |
c7026cd30a876895853cb879bbe7745aad09598a | SQL | prestodb/presto | /presto-native-execution/src/test/resources/tpch/queries/q4.sql | UTF-8 | 461 | 3.953125 | 4 | [
"Apache-2.0"
] | permissive | -- TPC-H/TPC-R Order Priority Checking Query (Q4)
-- Functional Query Definition
-- Approved February 1998
select
o.orderpriority,
count(*) as order_count
from
orders as o
where
o.orderdate >= '1993-07-01'
and cast(o.orderdate as date) < date '1993-07-01' + interval '3' month
and exists (
select
*
from
... | true |
a1fb2134c21f836e8d46bb0d9856c12a4b65f696 | SQL | johnmull400/S-G_GIT_ROUTE | /_MAIN SQL SOLUTIONS/Oft Used Code/Oft Used Code/Get list of user by Quindell BRANCH.sql | UTF-8 | 222 | 3.0625 | 3 | [
"MIT"
] | permissive |
select department,* from users u
inner join Usr_DepartmentCodes_srs dp on dp.Addresscode = u.department
inner join Usr_DepartmentAddresses_srs da on da.id = dp.dcode
where branch = 'Fareham' and u.userstatus = 0
| true |
fd19db050641650ad61637f45e3de9f71a74793e | SQL | Diogemaz/sistemarpg-DeD | /sistemarpg.sql | UTF-8 | 9,372 | 3.34375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 5.0.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Tempo de geração: 04-Dez-2020 às 20:24
-- Versão do servidor: 10.4.16-MariaDB
-- versão do PHP: 7.4.12
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_C... | true |
69255bd3499e26eb946a76c3064ae5838529c447 | SQL | ecommerce-builder/ecom-api-go | /schemas/postgres/schema/order_item.sql | UTF-8 | 859 | 3.5625 | 4 | [] | no_license | CREATE TABLE IF NOT EXISTS order_item (
id SERIAL PRIMARY KEY,
uuid UUID DEFAULT uuid_generate_v4() UNIQUE,
order_id INTEGER NOT NULL,
path VARCHAR(1024) NOT NULL,
sku VARCHAR(64) NOT NULL,
name VARCHAR(1024) NOT NULL,
qty ... | true |
59a1f3c9782d5e69a1b2d272856fb96a4c1ef7c7 | SQL | PratikRaut15/speed-elixia-project | /.svn/pristine/59/59a1f3c9782d5e69a1b2d272856fb96a4c1ef7c7.svn-base | UTF-8 | 925 | 2.8125 | 3 | [] | no_license |
-- Insert SQL here.
use mobility;
create table client(
clientid int(11) primary key auto_increment,
clientno varchar(55) not null,
client_name varchar(105) not null,
dob date default null,
anniversary date default null,
mobile varchar(15) default null,
phone varchar(15) default null,
email varchar(55) default null,
... | true |
9ce399c6d8fbc15e0cff163aa385d357ac7e33c8 | SQL | jinnkeyxx/ci4 | /db_ci4.sql | UTF-8 | 4,203 | 3.109375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Máy chủ: localhost
-- Thời gian đã tạo: Th9 06, 2020 lúc 12:06 PM
-- Phiên bản máy phục vụ: 10.4.13-MariaDB
-- Phiên bản PHP: 7.4.8
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARA... | true |
36284bc493cc451696c23cba59504e80fde673e7 | SQL | jongvin/werp | /werp/erpw/general/t_web/sql/Procedure/SP_T_BUDG_DEPT_CONFIRM_Y.sql | UHC | 2,400 | 3.21875 | 3 | [] | no_license | CREATE OR REPLACE Procedure SP_T_BUDG_DEPT_CONFIRM_Y
(
Ar_COMP_CODE Varchar2,
Ar_CLSE_ACC_ID Varchar2,
Ar_DEPT_CODE Varchar2,
Ar_CHG_SEQ Number,
Ar_CRTUSERNO Varchar2
)
Is
ls_BUDG_CODE_NAME T_BUDG_CODE.BUDG_CODE_NAME%Type;
lb_Found Boolean;
Begin
If Ar_CHG_SEQ = 0 Then
Begin
... | true |
067eabae237fd98a4d9e49f919fd1d51d7d4e12e | SQL | hyankelwin/Faculdade | /TIC - Trabalho Interdiciplinar de Computacao/Banco de dados/Scrips - BD Fisico/Create Tables - v2.sql | UTF-8 | 5,585 | 3.96875 | 4 | [] | no_license | -- Criação dos Schemas
CREATE SCHEMA "institucional";
CREATE SCHEMA "eventos";
-- Criação das tabelas do SCHEMA Institucional
CREATE TABLE "institucional".tb_departamento(
cod_departamento SERIAL
CONSTRAINT nn_cod_departamento NOT NULL,
nome VARCHAR(30)
CONSTRAINT nn_nome NOT NULL,
CONSTRAINT pk_departament... | true |
c118839aed06a7c451c6c4c0ac069b33b24c91d4 | SQL | trankhoi1403/DA-LTW1 | /Bình Lê/db.sql | UTF-8 | 575 | 3.03125 | 3 | [] | no_license | // trần khôi 1660281
CREATE DATABASE id7264102_web17ck1
CHARACTER SET 'utf8' COLLATE 'utf8_unicode_ci';
USE id7264102_web17ck1;
CREATE TABLE myuser(
userID int AUTO_INCREMENT PRIMARY KEY,
status int null,
email varchar(255),
password varchar(255),
username varchar(255),
fullname varchar(255),
ph... | true |
af2f383b50126b86351a664a4a36c472befbb11e | SQL | tanbt-work/moolahgo_interview | /DB/schema.sql | UTF-8 | 662 | 3.0625 | 3 | [] | no_license | --
-- Current Database: `moolahgo`
--
CREATE DATABASE /*!32312 IF NOT EXISTS*/ `ec` /*!40100 DEFAULT CHARACTER SET latin1 */;
USE `moolahgo`;
DROP TABLE IF EXISTS `referal_code`;
CREATE TABLE `referal_code` (
`id` SMALLINT NOT NULL AUTO_INCREMENT,
`code` VARCHAR(255) NOT NULL,
`owner` VARCHAR(255) NOT NU... | true |
9f7b80dfd9a645604eb906fcaf5c09db5980c719 | SQL | pranavkene/Online-Banking-System | /Database.sql | UTF-8 | 5,286 | 3 | 3 | [] | no_license | CREATE DATABASE IF NOT EXISTS `admin` /*!40100 DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci */ /*!80016 DEFAULT ENCRYPTION='N' */;
USE `admin`;
-- MySQL dump 10.13 Distrib 8.0.25, for Win64 (x86_64)
--
-- Host: localhost Database: admin
-- ------------------------------------------------------
-- Serve... | true |
33ac55bc86a247e30d6a67f78ab48832343ae4d4 | SQL | alanIF/VendasWeb | /db/bd.sql | UTF-8 | 334 | 3.328125 | 3 | [] | no_license | create database sig_vendas;
use sig_vendas;
create table produto(
id int auto_increment not null,
nome text not null,
preco float,
primary key(id)
);
create table venda(
id int auto_increment not null,
id_produto int not null,
qtd int not null,
primary key(id),
foreign key(id_produto) references p... | true |
cdbbb9f53ba6dfdd7f6e7ba5f230d5e9a05fc29f | SQL | RamonCruz-Hinojosa/GroceryList | /sql/users.sql | UTF-8 | 716 | 2.78125 | 3 | [] | no_license | DROP TABLE IF EXISTS users;
CREATE TABLE users (
id INT NOT NULL AUTO_INCREMENT,
first_name VARCHAR(50),
last_name VARCHAR(50),
PRIMARY KEY (id)
);
INSERT INTO users
(first_name, last_name)
VALUES
("James","Butt"),
("Josephine","Darakjy"),
("Art","Venere"),
("Lenna","Paprocki"),
("Donette","Folle... | true |
3f0c710166fbc645d4ac64fc673604c54a972c45 | SQL | gonsee1/protecso | /cargosfijos/webfacturacion/src/main/resources/scripts/01_update.sql | UTF-8 | 7,648 | 3.0625 | 3 | [] | no_license | /*Creation of table REGLAS_NOMBRE_PLAN*/
CREATE TABLE REGLAS_NOMBRE_PLAN
(
COD_REGLAS_NOMBRE_PLAN int NOT NULL,
COD_PRODUCTO int,
COD_SERVICIO int,
NOMBRE_PLAN varchar(100),
APLICA_VELOCIDAD int,
ARRENDAMIENTO int,
RELACIONADO_TI int,
ST_ELIM bit
);
/*Creation o... | true |
d43b9971123c5d3f7bedb4b6b640324042096c61 | SQL | bydan/pre | /erp_ejb/src_sris/com/bydan/erp/sris/resources/general/SriRetenciones_Postgres.sql | UTF-8 | 717 | 3.359375 | 3 | [
"Apache-2.0"
] | permissive | select
(select nombre from seguridad.modulo where id=a.id_modulo) as nombre_modulo,
(select nombre from contabilidad.tipo_comprobante where id=l.id_tipo_comprobante) as nombre_tipo_comprobante,
l.numero_documento,
l.fecha_emision,
l.fecha_registro_contable,
l.numero_serie,
l.total_iva,
l.monto_iva,
l... | true |
f7c9441be7f10d2e27bd6850296b10c723bba5cd | SQL | abercalini/projeto | /igreja-api/src/main/resources/db/migration/V18__create_table_dizimo.sql | UTF-8 | 512 | 2.9375 | 3 | [] | no_license | CREATE TABLE dizimo (
codigo BIGINT(20) PRIMARY KEY AUTO_INCREMENT,
forma_de_pagamento VARCHAR(50),
valor DECIMAL(10,2),
data_dizimo DATE,
codigo_caixa BIGINT(20),
codigo_membro BIGINT(20),
codigo_culto BIGINT(20),
codigo_igreja BIGINT(20),
FOREIGN KEY (codigo_caixa) REFERENCES caixa(codigo),
FOREIGN KEY (co... | true |
0e59255d5b89e1b9dbfdeecc037071ff7b9e25d4 | SQL | zetysx/Meh | /Final Project 24.10.2017_12.41AM/QueryCameraShop.sql | UTF-8 | 3,709 | 3.75 | 4 | [] | no_license | //Tính giá tiền từng cái orderDetail
use CameraShop
Select OrderListID, o.CameraID,Quantity, CameraName, Price , Tong = Price*Quantity
From tblOrderDetail o, tblCamera c
Where OrderListID = 'OrderList5' and o.CameraID = c.CameraID
//Tính giá tiền của 1 cái orderListID
Select OrderListID, Tong = sum(Price*Quantity)
... | true |
9526d1620bc065ccaf7228fc74ed22aeedd6bf0f | SQL | koolgax99/DBMS-lab-assignments | /LAB 5/SQLQuery28-c.sql | UTF-8 | 434 | 2.765625 | 3 | [] | no_license | Use Hospital
select T1_room.doctor_id,T1_patient.name
from T1_room
right join T1_patient on T1_room.room_type='ac' AND
T1_room.patient_id=T1_patient.patient_id
select T1_room.doctor_id,T1_patient.name
from T1_room
right join T1_patient on T1_room.patient_id=T1_patient.patient_id
select T1_room.doctor_id,T1_patient.n... | true |
699bbb761b8b89595f608bcfc6d035fea0329b7b | SQL | EBS-IT-GIT/REPOSITORIO_MYDASHBOARD | /public/RES_SALTI_EMERGENCIAL_-_Projeto_Compliance_Fiscal_-_Script_Modelo_de_Documento_Fiscal.msg | UTF-8 | 233 | 2.609375 | 3 | [] | no_license | -- UPDATE_RA_BATCH_SOURCES_ALL_NFSE --
UPDATE RA_BATCH_SOURCES_ALL rbs SET RBS.GLOBAL_ATTRIBUTE5 = 'Y', RBS.GLOBAL_ATTRIBUTE6 = '99'
where upper(rbs.name) like 'NFSE%'
and nvl(rbs.end_date, sysdate) >= sysdate
and rbs.status = 'A';
| true |
7fac6a56cff1626846ec920587c23cd86a7e46ec | SQL | Mando72/database-exercises | /join_exercises.sql | UTF-8 | 3,594 | 4.375 | 4 | [] | no_license | USE employees;
SELECT d.dept_name AS 'Department Name', concat(e.first_name,
' ', e.last_name) AS 'Department Manager'
FROM departments d
JOIN dept_manager dm on dm.dept_no = d.dept_no
JOIN employees e on e.emp_no = dm.emp_no
WHERE dm.to_date > now()
ORDER BY d.dept_name;
SELECT d.dept_name AS 'Department Name', co... | true |
9a8575397ed08d0a8fe52c36dae14213db515160 | SQL | optimajet/WorkflowServer | /sql/Oracle/update_wfs_2_9.sql | UTF-8 | 1,974 | 3.671875 | 4 | [] | no_license | /*
Company: OptimaJet
Project: WorkflowServer Provider for Oracle
Version: 2.9
File: update_wfs_2_9.sql
*/
ALTER TABLE WORKFLOWPROCESSTRANSITIONH ADD
(
ACTORNAME NVARCHAR2(256),
EXECUTORNAME NVARCHAR2(256)
);
CREATE TABLE WORKFLOWPROCESSASSIGNMENT (
ID RAW(16),
ASSIGNMENTCODE VARCHAR2(256 BYTE) NOT NU... | true |
ca3c02f497b30320cf3150dab631230464f02239 | SQL | rensi4rn/sis_reservas | /base/patch000001.sql | UTF-8 | 819 | 2.890625 | 3 | [] | no_license | /***********************************I-SCP-JRR-RES-1-27/03/2014****************************************/
CREATE TABLE res.tasegurado
(
id_asegurado SERIAL NOT NULL,
codigo_asegurado varchar(255),
id_persona int4, PRIMARY KEY (id_asegurado)
)INHERITS (pxp.tbase);
/***********************************F... | true |
b0bc37fe719731e366f8ae6e79d07cb1a56bcb1f | SQL | srgeverson/Estacionamento | /DB/DDL/create_table_usuarios.sql | UTF-8 | 570 | 3.21875 | 3 | [] | no_license | SET SQL DIALECT 3;
CREATE GENERATOR GEN_USUARIOS_ID;
CREATE TABLE USUARIOS (
ID INTEGER,
LOGIN VARCHAR(50) NOT NULL,
SENHA VARCHAR(255),
ATIVO CHAR(1) NOT NULL,
DATA_CADASTRO TIMESTAMP NOT NULL
);
SET TERM ^ ;
CREATE OR ALTER TRIGGER TG_USUARIOS FOR USUARI... | true |
577573597978c8bf08bb7bec7feffc16df714edd | SQL | YaleArchivesSpace/yams_data_auditing | /agents_and_subjects/name_person_source_count.sql | UTF-8 | 219 | 3.640625 | 4 | [] | no_license | ##get count of name_corporate_entity sources
SELECT ev.value as source
, COUNT(ev.value) as count
FROM name_person
LEFT JOIN enumeration_value ev on ev.id = name_person.source_id
GROUP BY ev.value
ORDER BY count DESC
| true |
a4e62e9c77007e985c16f863dd9492f7541161a9 | SQL | de-jcup/eclipse-sql-editor | /sqleditor-other/testscripts/formatter/origin/003-insert-into-select.sql | UTF-8 | 347 | 3 | 3 | [
"Apache-2.0"
] | permissive | -- first one, no where
INSERT INTO Customers (CustomerName, ContactName, Address, City, PostalCode, Country)
SELECT SupplierName, ContactName, Address, City, PostalCode, Country FROM Suppliers;
-- another one with WHERE
INSERT INTO Customers (CustomerName, City, Country)
SELECT SupplierName, City, Country FROM Supplie... | true |
2167515d4659cadeaeb05b34e8321d08a4128471 | SQL | JitendraCode/PHP-EmployeeInformationManagementSystem | /jeet1 (1).sql | UTF-8 | 4,855 | 3.046875 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.8.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Mar 19, 2019 at 09:57 PM
-- Server version: 10.1.37-MariaDB
-- PHP Version: 7.3.1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD... | true |
7da7737a07a9a568827abcbce39e897240795022 | SQL | FishAI1337/g | /sql/SQL.sql | UTF-8 | 263 | 2.875 | 3 | [] | no_license | CREATE DATABASE lsdforreal;
USE lsdforreal;
CREATE TABLE Highscore(
highScoreId int not null AUTO_INCREMENT,
highScoreScore int not null,
highScoreName VARCHAR(50) not null,
highScoreDate TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY(highScoreId)
);
| true |
32f538c8fae49a7a445414fbeac93ff7a8ddfe60 | SQL | SLIB53/udacity-fsnd-logs-analysis | /src/sql/create_view_daily_http_request_counts.sql | UTF-8 | 641 | 3.8125 | 4 | [] | no_license | CREATE VIEW daily_http_request_counts AS
SELECT http_requests_count.day,
http_requests_count.count AS total_count,
http_error_counts.count AS error_count
FROM
(
SELECT date_trunc('day', log.time) AS day, count(*)
FROM log
GROUP BY day
) ... | true |
0be0a44561c5d4a23f8434692624adf2a9a7c041 | SQL | jaimecll/SocialGallery | /bd_gamers.sql | UTF-8 | 2,957 | 2.84375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.8.5
-- https://www.phpmyadmin.net/
--
-- Servidor: 127.0.0.1
-- Tiempo de generación: 16-10-2019 a las 19:58:57
-- Versión del servidor: 10.1.38-MariaDB
-- Versión de PHP: 7.3.2
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
... | true |
d1a5e20fdf8a523ecb44cbc0d4e133d094949fcc | SQL | bjx2130/spring-framework-base | /sino_parent/sino_oauth2/src/test/resources/postgrel_db.sql | UTF-8 | 17,319 | 2.8125 | 3 | [] | no_license | /*
Navicat Premium Data Transfer
Source Server : 100.11
Source Server Type : PostgreSQL
Source Server Version : 100001
Source Host : 192.168.100.11:5432
Source Catalog : test
Source Schema : public
Target Server Type : PostgreSQL
Target Server Version : 100001
File Enc... | true |
6cdf349bd2c8082cb0b78b99b251f94937a5b611 | SQL | imclab/Google-Analytics-Report | /database.sql | UTF-8 | 3,638 | 3.328125 | 3 | [] | no_license | /*
MySQL - 5.1.55-community : Database - response_google_analytics
*********************************************************************
*/
/*!40101 SET NAMES utf8 */;
/*!40101 SET SQL_MODE=''*/;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@F... | true |
5a7a3f76183996f09b1aab57d1fd36a768e85b4f | SQL | NotItemName/flac-player | /conf/evolutions/default/1.sql | UTF-8 | 2,249 | 3.65625 | 4 | [] | no_license | # Flac-Player schema
# --- !Ups
CREATE TABLE `GENRE` (
`id` INT NOT NULL AUTO_INCREMENT,
`name` VARCHAR(255) NOT NULL UNIQUE,
PRIMARY KEY (`id`)
) ENGINE = InnoDB
DEFAULT CHARSET = utf8;
CREATE TABLE `ARTIST` (
`id` INT NOT NULL AUTO_INCREMENT,
`name` VARCHAR(255) NOT NULL UNIQUE,
... | true |
2f566cb45acf54639b4e8d87d8ada16a9848beea | SQL | leonidkurmyshkin/job4j_design | /data/insert.sql | UTF-8 | 1,511 | 2.8125 | 3 | [] | no_license | insert into states(name) values
('Принята'),
('Отклонена'),
('Исполняется'),
('Завершена')
;
insert into categories(name) values
('Важная'),
('Обычная')
;
insert into roles(name) values
('Администратор'),
('Пользователь'),
('Гость')
;
insert into rules(name) values
('Создавать за... | true |
b1df1c191c2e79d262e731da66a5304698da9504 | SQL | yshmidt/CICD_Database | /ExistingDB/dbo/Stored Procedures/Procs1/bcPOReceivingPOGet.sql | UTF-8 | 604 | 3.296875 | 3 | [] | no_license | -- =============================================
-- Author: David Sharp
-- Create date: 10/18/2012
-- Description: gets a list of Open orders for receiving
-- =============================================
CREATE PROCEDURE bcPOReceivingPOGet
-- Add the parameters for the stored procedure here
AS
BEGIN
-- SET NOCOUNT... | true |
1b39ac55df98fbd2f12ba8d21a56ba1acc40b11a | SQL | nisargjhaveri/canteenOnline | /database.sql | UTF-8 | 2,047 | 2.90625 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.0.6deb1
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Apr 28, 2014 at 07:18 AM
-- Server version: 5.5.35-0ubuntu0.13.10.2
-- PHP Version: 5.5.3-1ubuntu2.3
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLI... | true |
2ebca68b685c1b9601f737f0b8064f1a76af4180 | SQL | Mathumitha2561/spark_foundation | /banking.sql | UTF-8 | 1,766 | 3.015625 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1:3306
-- Generation Time: Jan 19, 2021 at 02:56 PM
-- 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 |
bc63c9078c995fec8914d413ff3cf16d0c7c8d74 | SQL | SirPhemmiey/hack-a-j | /src/database/database.sql | UTF-8 | 800 | 3.15625 | 3 | [] | no_license |
-- Create phonebook table
CREATE TABLE `phonebook` (
`id` INT NOT NULL AUTO_INCREMENT,
`firstname` VARCHAR(100) NOT NULL,
`lastname` VARCHAR(100) NOT NULL,
`email` VARCHAR(100) NOT NULL,
`phone` VARCHAR(50) NOT NULL,
`mobile` VARCHAR(50) NULL,
`company` ... | true |
a5e77d319030cef7aba712014c3eff6af2382342 | SQL | akash-backend/my_party | /myparty/myparty_sql.sql | UTF-8 | 17,042 | 3.234375 | 3 | [
"MIT"
] | permissive | -- phpMyAdmin SQL Dump
-- version 4.7.7
-- https://www.phpmyadmin.net/
--
-- Host: localhost:3306
-- Generation Time: Dec 31, 2018 at 03:31 AM
-- Server version: 5.6.41-84.1
-- PHP Version: 5.6.30
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @O... | true |
f5bff6333d803802ecbc1d8c6d5bdaa9d48b8273 | SQL | UpGradGrading/sql_042017 | /SQL_Assignment/graded/LeelaRaviShankar_grade.sql | UTF-8 | 4,322 | 4.3125 | 4 | [] | no_license | /*
Leela RaviShankar
*/
### Task 1: Understanding the data
## A. Describe the data
# superstoredb has 5 tables: 'cust_dimen', 'market_fact', 'orders_dimen', 'prod_dimen' and 'shipping_dimen'
# The list of feilds and data types for 'cust_dimen' table:
# 'Customer_Name` text, `Province` text, `Region` text, ... | true |
71a2319e8b9b546d1a84545e0b4de2e1f061f267 | SQL | paswes/SoSe-21-RDBMS-HW03 | /Dockerdir/db/docker-entrypoint-initdb.d/init.sql | UTF-8 | 701 | 3.484375 | 3 | [] | no_license | DROP TABLE IF EXISTS libraries;
CREATE TABLE libraries (
library_id INT(10) NOT NULL AUTO_INCREMENT,
library_location VARCHAR(50),
PRIMARY KEY (library_id)
);
INSERT INTO libraries (library_location) VALUES ('Berlin');
INSERT INTO libraries (library_location) VALUES ('Dresden');
DROP TABLE IF EXISTS books... | true |
1a4f934463ee7ab2dda5059ad5cb3d8232eec24f | SQL | CodeForAfrica/HURUmap-Data | /sql/cardiovascular_risk.sql | UTF-8 | 31,854 | 2.78125 | 3 | [] | no_license | SET statement_timeout = 0;
SET lock_timeout = 0;
SET client_encoding = 'UTF8';
SET standard_conforming_strings = on;
SELECT pg_catalog.set_config('search_path', '', false);
SET check_function_bodies = false;
SET client_min_messages = warning;
ALTER TABLE IF EXISTS ONLY public.cardiovascular_risk DROP CONSTRAINT IF EXI... | true |
903a0aa55f2081ac201ac1a06b595466c28904a6 | SQL | dieshangtianya/PocketeEStore-SpringMVC | /mysql-script/t_cart.sql | UTF-8 | 249 | 2.78125 | 3 | [] | no_license | /*创建 客户购物车表 t_Category*/
DROP TABLE IF EXISTS t_Cart;
CREATE TABLE IF NOT EXISTS t_Cart(
Id CHAR(36) PRIMARY KEY,
CustomerId CHAR(36) NOT NULL,
CreatedDate DATETIME NOT NULL DEFAULT NOW()
)ENGINE=InnoDB DEFAULT CHARSET=utf8; | true |
6c6a82e4883a1a8b2a702923c0b7a12d906a6210 | SQL | BabaKosuke111/SQL | /Q8.sql | UTF-8 | 138 | 3.015625 | 3 | [] | no_license | SELECT
n.item_id
,n.item_name
,n.item_price
,c.category_name
FROM
item AS n
INNER JOIN
item_category AS c
ON n.category_id=c.category_id
; | true |
5a3be152e49c3560f203fc5d9552a5aef9056f7d | SQL | mromero1591/sublasa | /db/get_newsLetters_by_topic.sql | UTF-8 | 161 | 3.296875 | 3 | [] | no_license | SELECT
n.id,
n.name,
n.topic_id,
n.snippet,
n.img
FROM
newsletters AS n
JOIN topics AS t ON (n.topic_id = t.id)
WHERE
t.name = $1 | true |
bf23829b641c521c0d25abcdf724cf47ac31e98c | SQL | bikle/rluck | /svmhstk/avg_recent_scores.sql | UTF-8 | 1,431 | 4.09375 | 4 | [] | no_license | --
-- avg_recent_scores.sql
--
-- I use this script to aggregate recent scores.
-- I intend to look at output from this script before I open positions.
CREATE OR REPLACE VIEW ocj_stk_1hr AS
SELECT
s.tkrdate
,s.score
,s.rundate
,s.tkr
,s.ydate
,g.score gscore
,p.clse
FROM stkscores_1hr s
,stkscores_1hr g
,di1hr_stk p
... | true |
5b910a2ba2450dec85fcc79deb215787f28090d4 | SQL | JusticeArbiter/First_Work | /extract_sql/sql_expected/135_timestamp/22_timestamp.sql | UTF-8 | 91 | 2.546875 | 3 | [] | no_license | SELECT count(*) AS two FROM TIMESTAMP_TBL WHERE d1 = timestamp(2) without time zone 'now';
| true |
65424091539a855a2b01962287acc099ad4bd8a9 | SQL | malekelthomas/snkrz-sqlmigrations | /migrations/000001_init.up.sql | UTF-8 | 3,750 | 3.828125 | 4 | [] | no_license | CREATE TABLE brands (
id serial PRIMARY KEY,
name text NOT NULL UNIQUE
);
INSERT INTO
brands (name)
VALUES
('nike'),
('adidas'),
('jordan');
CREATE TABLE sites (
id serial PRIMARY KEY,
name text NOT NULL
);
INSERT INTO
sites (name)
VALUES
('STADIUMGOODS');
CREATE TABLE sneake... | true |
964dd65f2d9f02d7ae3890a1eaaff2993562431b | SQL | egalli64/green367 | /Sql/hospital.sql | UTF-8 | 2,203 | 2.953125 | 3 | [] | no_license | use green;
drop table if exists hospital;
create table hospital(
hospital_id integer primary key auto_increment,
hospital_name varchar(100),
hospital_address varchar(100),
hospital_city varchar(50),
hospital_telephone integer
);
insert into hospital (hospital_i... | true |
a6de13a96e67e77ca182fb3b32bcd74c08f785a7 | SQL | srqway/ggy-dba | /oracle/sql/pdb/sc.sql | UTF-8 | 707 | 2.734375 | 3 | [] | no_license | --#-----------------------------------------------------------------------------------
--# File Name : sc.sql
--#
--# Description : Change current container at session level.
--#
--# Call Syntax : SQL> @sc <PDB_NAME>
--#
--# SQL> @sc CDB$ROOT
--#------------------------------------------------------... | true |
b261f7416dbe33484820970db0c9622b2b440cff | SQL | thanhle1547/175A071547_175A071483 | /Bài tập lớn/Database/View.sql | UTF-8 | 475 | 2.59375 | 3 | [] | no_license | -- View DL_GiangVien
-- View DL_NhanVien
-- View CT_MonNganh (MaNganh, MaMon, TenMon, ThucHanh)
/*
-- View CT_LopHocPhan
(
Ma,
TenHocPhan (TenMon - TenLop - LyThuyet/NhomThucHanh
hoặc TenMon - GiaiDoan - NamHoc - TenLop . LyThuyet/NhomThucHanh),
Vd: Ngôn ngữ lập trình-2-17 (TH4)
... | true |
8d79f937bc662f0c4722d7b6583df2df9990e926 | SQL | htmlacademy-yii/514921-task-force-1 | /DumpNew20200916diffStructure.sql | UTF-8 | 12,694 | 3.3125 | 3 | [] | permissive | CREATE DATABASE IF NOT EXISTS `mydb` /*!40100 DEFAULT CHARACTER SET utf8 */ /*!80016 DEFAULT ENCRYPTION='N' */;
USE `mydb`;
-- MySQL dump 10.13 Distrib 8.0.12, for macos10.13 (x86_64)
--
-- Host: 127.0.0.1 Database: mydb
-- ------------------------------------------------------
-- Server version 8.0.19
/*!40101 S... | true |
f8474ff9eed0127d41991232e6c8faab760171a4 | SQL | nwd3/cs342 | /08programming/homework08_2.sql | UTF-8 | 1,818 | 3.921875 | 4 | [] | no_license | --Homework08_2
--Nathanael Dick
--Calculates the Bacon Number based on a given actor
drop table BaconTable;
create table BaconTable(
actorId integer,
BaconNumber integer
);
--this function gets the current number of actors
CREATE or replace FUNCTION countit RETURN INTEGER AS
counter integer;
BEGIN
... | true |
1a86a30b37670eef59fc5989272654eec0653c01 | SQL | wd563253440/flask_admin | /common/db/sql/role_permission.sql | UTF-8 | 1,582 | 3.546875 | 4 | [] | no_license | /*
Navicat MySQL Data Transfer
Source Server : localhost_3306
Source Server Version : 80022
Source Host : localhost:3306
Source Database : test
Target Server Type : MYSQL
Target Server Version : 80022
File Encoding : 65001
Date: 2021-03-25 16:20:27
*/
SET FOREIGN_KEY_CHECKS=0;
--... | true |
36f1ae494d2ce823f769c3be334e6954d7b98b36 | SQL | gusgalarnyk/projectCauldron | /SQL/SQL_Scripts/clubs.sql | UTF-8 | 225 | 3.03125 | 3 | [] | no_license | DROP TABLE IF EXISTS clubs CASCADE;
CREATE TABLE clubs
(
id integer NOT NULL,
name varchar(255),
school integer
);
ALTER TABLE public.clubs
ADD CONSTRAINT clubs_pkey
PRIMARY KEY (id);
COMMIT; | true |
705c0668d036d5db1201f6da3088aa130b1c442f | SQL | rudia0226/Test1 | /Gardening/target/classes/sqlPAC/Jan28 Database PLSQL 연습-01 PLSQL 반복문 .sql | UHC | 3,037 | 3.953125 | 4 | [] | no_license | # LOOP
LOOP
ó;
EXIT [WHEN ];
END LOOP;
-- 1
DECLARE
VN_BASE_NUM NUMBER := 3;
VN_CNT NUMBER := 1;
BEGIN
LOOP
DBMS_OUTPUT.PUT_LINE(VN_BASE_NUM || '*' || VN_CNT || '= ' || VN_BASE_NUM * VN_CNT );
VN_CNT := VN_CNT +1;
EXIT WHEN VN_CNT > 9;
END LOOP;
END;
OUTPUT > 3*1= 3
3*2= 6
3*3= 9... | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.