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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
04c7a357b8a0443ebeddfba8059dd839522d3661 | SQL | abq-outdoor-trails/outdoor-trails-master | /sql/abq-bike-trails.sql | UTF-8 | 1,693 | 3.875 | 4 | [
"Apache-2.0"
] | permissive | ALTER DATABASE abqbiketrails CHARACTER SET utf8;
DROP TABLE IF EXISTS favoriteRoute;
DROP TABLE IF EXISTS comment;
DROP TABLE IF EXISTS `user`;
DROP TABLE IF EXISTS route;
-- CREATE TABLE statement for route table
CREATE TABLE route (
routeId BINARY(16) NOT NULL,
routeName VARCHAR(64),
routeFile BLOB NOT NULL,
ro... | true |
91318d453c9d77349625ba8fb232f65421671cc9 | SQL | FELLSAT/Procedimientos | /Procedimientos/Disparadores/Otros/H3i_TRGUPD_FORMA_PAGO.sql | UTF-8 | 2,712 | 3.546875 | 4 | [] | no_license | CREATE OR REPLACE TRIGGER H3i_TRGUPD_FORMA_PAGO
AFTER UPDATE
ON FORMA_PAGO
FOR EACH ROW
-- =============================================
-- Author: FELIPE SATIZABAL
-- =============================================
DECLARE
V_PrimaryKeyField VARCHAR2(1000);
V_PrimaryKeyValue VARCHAR... | true |
4f5d108742b0b5c74457267c0c13814b18d63249 | SQL | roadman1991/SteinamProjekt | /Dokumente/ER_Modell.sql | UTF-8 | 2,592 | 3.703125 | 4 | [] | no_license | 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='TRADITIONAL,ALLOW_INVALID_DATES';
create database watson_11fi1_ssg;
use watson_11fi1_ssg;
-- -----------------------------------------------------... | true |
6e9894896b9412415bb8fb596a231463761953fe | SQL | GnanadeepPedapati/railinfographics | /insertScriptForFactsAndDimension.sql | UTF-8 | 1,813 | 4.3125 | 4 | [] | no_license |
use db
--for dimensionStation
insert into dimensionStation ([stationName]) select distinct station from trainschedule;
select * from dimensionStation
--for table dimensionTraininfo
insert into dimensionTrainInfo (trainNo,trainName,noOfStoppage,totalDistanceCoveredByTrain)
select distinct CONVERT(int,trainschedule.tr... | true |
109ad8dad1bd9706d54fff5a431575ec8a3dd14b | SQL | jam1987/databases | /BD ABRIL JULIO 2011/Pretaller/gatac-load.sql | UTF-8 | 1,047 | 2.71875 | 3 | [] | no_license | SPOOL gatac-load.txt
ALTER SESSION SET NLS_DATE_FORMAT = 'DD-MON-YY HH:MIAM';
INSERT INTO CINE VALUES ('CCS01', 'Galerias Avila', 24.00, 4);
INSERT INTO CINE VALUES ('CCS02','Sambil Caracas',30.00,6);
INSERT INTO CINE VALUES ('CCS01','Lider',50.00,10);
INSERT INTO CINE VALUES ('MRG01','Sambil Margarita',30.00,7);
INS... | true |
e16bea25a17251e0b0ce2fa54b84c1d3bdb5b408 | SQL | SQLHorizons/T-SQL | /ScriptSQLLogin.sql | UTF-8 | 433 | 3.6875 | 4 | [] | no_license | SELECT 'CREATE LOGIN ' + QUOTENAME(u.name) + ' WITH PASSWORD=' + CONVERT(NVARCHAR(MAX),l.password_hash,1)+ ' HASHED, DEFAULT_DATABASE='
+QUOTENAME(l.default_database_name) +', DEFAULT_LANGUAGE='
+QUOTENAME(l.default_language_name)+', CHECK_EXPIRATION=OFF, CHECK_POLICY=OFF, sid = ' + CONVERT(NVARCHAR(MAX),u.sid,1) FROM ... | true |
182904904c20260840986fc574601106e8cb5df8 | SQL | iamdhruvsharma-zz/SQL-MasterClass | /SQL_Aggregations.sql | UTF-8 | 1,073 | 3.96875 | 4 | [] | no_license | -- SQL Statements
-- UPPERCASE - Keywords AND lowercase for other words
-- finding all the rows in a table.
SELECT COUNT(*)
FROM accounts;
-- COUNT only considers NON NULL data
-- Find the total amount of poster_qty paper ordered in the orders table.
SELECT SUM(poster_qty)
FROM orders;
-- Find the ... | true |
651a8afb580b016c15cd9d57b4d05d13624acfbc | SQL | 0liv06/credit-card-manager | /src/main/resources/scripts/ccmanagement_credit_card.sql | UTF-8 | 482 | 3.09375 | 3 | [] | no_license | --
-- Table structure for table `credit_card`
--
DROP TABLE IF EXISTS `ccmanagement`.`credit_card`;
CREATE TABLE `ccmanagement`.`credit_card` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`expiry_date` datetime DEFAULT NULL,
`name` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
`number` varchar(255) ... | true |
a438684fadc6a57e325ce0681a94dcb05326446f | SQL | p1k0pan/HumanResource-Management | /HRM_Javafx/hrm.sql | UTF-8 | 4,872 | 3.171875 | 3 | [] | no_license | /*
Navicat Premium Data Transfer
Source Server : MYSQL80
Source Server Type : MySQL
Source Server Version : 80019
Source Host : localhost:3306
Source Schema : hrm
Target Server Type : MySQL
Target Server Version : 80019
File Encoding : 65001
Date: 16/04/2020 12:07:20... | true |
00cab813715ff36bb5d0a713058f76add0d18575 | SQL | hdeal1/digital-hum-ref | /config/create_db.sql | UTF-8 | 336 | 2.53125 | 3 | [] | no_license | DROP DATABASE IF EXISTS digital_humanities;
CREATE DATABASE digital_humanities;
USE digital_humanities;
CREATE TABLE digital_humanities.project_meta (
`pri_key` INT UNSIGNED NOT NULL AUTO_INCREMENT,
`project_name` VARCHAR(255) NOT NULL,
`num_inputs` INT UNSIGNED NOT NULL,
`meta_data` VARCHAR(1000),
PRIMARY KE... | true |
3fc4b69bb468f50c105c021a4a8ba3c525452094 | SQL | yixiuEagle/myPro | /chewei_zend/.svn/pristine/3f/3fc4b69bb468f50c105c021a4a8ba3c525452094.svn-base | UTF-8 | 12,926 | 2.96875 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version phpStudy 2014
-- http://www.phpmyadmin.net
--
-- 主机: 127.0.0.1
-- 生成日期: 2014-12-02 08:56:23
-- 服务器版本: 5.5.36-log
-- PHP 版本: 5.4.26
use chewei;
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 |
11a97aac29e3000d6f5d7b20d3abf30245a7e439 | SQL | melissacabral/2020-summer | /image-app/database-backup/imageapp_0807_likes.sql | UTF-8 | 7,759 | 3.21875 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.8.5
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Aug 07, 2020 at 09:59 AM
-- Server version: 10.1.39-MariaDB
-- 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... | true |
bc94a9b5a44156699c6380975dbd9bbb1f8f6713 | SQL | jsdelivrbot/app_academy | /SQL/questions_database/import_db.sql | UTF-8 | 3,839 | 3.9375 | 4 | [] | no_license | DROP TABLE if EXISTS users;
CREATE TABLE users (
id INTEGER PRIMARY KEY,
fname TEXT NOT NULL,
lname TEXT NOT NULL
);
DROP TABLE if EXISTS questions;
CREATE TABLE questions (
id INTEGER PRIMARY KEY,
subject TEXT NOT NULL,
body TEXT NOT NULL,
user_id INTEGER NOT NULL,
FOREIGN KEY (user_id) REFERENCES ... | true |
5ad45267f577d589dffad940687f01e85d526aa8 | SQL | META-DREAMER/291-P1 | /sql/2.sql | UTF-8 | 645 | 3.40625 | 3 | [] | no_license | create or replace view good_connections (src,dst,dep_date1,dep_date2,dep_time,arr_time,flightno1,flightno2,layover,price,seats1,fare1,seats2,fare2)
as select a1.src, a2.dst, a1.dep_date, a2.dep_date, a1.dep_time, a2.arr_time, a1.flightno, a2.flightno,
(a2.dep_time-a1.arr_time)*24,min(a1.price+a2.price),a1.seats,a1.fare... | true |
d686022ff830253079ddeefe7e524f48c5a9ea61 | SQL | sjenedi/Database-Management-Labs-Oracle-SQL- | /lab6.sql | UTF-8 | 2,796 | 3.90625 | 4 | [] | no_license | --Lab 6
--Answer 1
SELECT count (*) AS "Number of Invoices"
FROM ap.invoices;
--Answer 2
SELECT COUNT(payment_date) AS "Number of Valid Payment Dates"
FROM ap.invoices;
--Answer 3
SELECT COUNT(*) - COUNT(payment_date) AS "Number of Null Payment Dates"
FROM ap.invoices;
--Answer 4
SELECT DISTINCT paym... | true |
28a40ee7ca3362fd404d25019b4e5f1a258169d9 | SQL | owenthomas1969/CMH_Armada | /EBA_DEMO_CHART_POPULATION.sql | UTF-8 | 56,634 | 2.546875 | 3 | [] | no_license | declare
type t_clob is table of clob index by binary_integer;
l_clob t_clob;
type t_varchar2 is table of varchar2(64) index by binary_integer;
l_varchar2 t_varchar2;
begin
l_varchar2(1) :=q'!1!';
l_varchar2(2) :=q'!1!';
l_clob(3) :=q'!California!';
l_clob(4) :=q'!CA!';
l_varchar2(5) :=q'!37253956... | true |
3a9a961ff0ac0a1b5e4b92604e0aaf08ff812734 | SQL | pjuliano/glowing-waffle | /Views/KD_Work_Days_This_Month.sql | UTF-8 | 1,179 | 3.796875 | 4 | [] | no_license | Create Or Replace View KD_Work_Days_This_Month As
Select
Extract(Month From Sysdate) As Month,
Count(Extract(Month From A.Day)) Total_Days,
Sum(Case
When
A.Weekday In ('Saturday','Sunday')
Then
0
Else
1
End) As Weekdays,
Sum(Case
W... | true |
01d7bf0ab873c95ad33d1f693ce9606e806f4036 | SQL | alexbartley/SOCO-Test | /104909/CONTENT_REPO/Triggers/DEL_JURISDICTION_REVISIONS.sql | UTF-8 | 351 | 3.140625 | 3 | [] | no_license | CREATE OR REPLACE TRIGGER content_repo."DEL_JURISDICTION_REVISIONS"
AFTER
DELETE
ON content_repo.jurisdiction_revisions
REFERENCING NEW AS NEW OLD AS OLD
BEGIN
UPDATE jurisdiction_revisions r
SET next_rid = NULL
WHERE next_rid IS NOT NULL
AND NOT EXISTS (
SELECT 1
FROM jurisdiction_revisions r2
where r... | true |
ccb5bd5c725da8a393bfc5d8dd94a192ad6e9c62 | SQL | MirzaLeka/SQLCourse | /Examples/Multiple tables/Joins.sql | UTF-8 | 1,354 | 4.125 | 4 | [] | no_license | CREATE TABLE City (
CityId INTEGER,
CityName TEXT
);
CREATE TABLE Customer (
CustomerId INTEGER,
CityId INTEGER,
CityName TEXT
);
INSERT INTO Customer
VALUES
(1, 1, "Bob"),
(2, 1, "Sally"),
(3, 2, "Tom"),
(4, NULL, "Mike")
;
INSERT INTO City
VALUES
(1, "Kansas City"),
(2, "New York"),
(3, "Houston")
;
SELECT'All d... | true |
ee0145c960ff8870a5ff28b3a4b48d117580eac3 | SQL | MeloryS/cs304-final-project | /loft.sql | UTF-8 | 2,351 | 4.03125 | 4 | [] | no_license |
--
-- Current Database: `loft`
--
CREATE DATABASE /*!32312 IF NOT EXISTS*/ `loft` /*!40100 DEFAULT CHARACTER SET latin1 */;
USE `loft`;
/* Create tables for user and properties */
drop table if exists tenants;
drop table if exists users;
drop table if exists properties;
drop table if exists dates;
drop table if ex... | true |
8893849e2495927820ce08c7cca794da787d82c8 | SQL | AnaCuesta/controlVacunacion | /frontend/views/tarj-controlvac/logo/localidad.sql | UTF-8 | 1,607 | 2.8125 | 3 | [
"BSD-3-Clause"
] | permissive | -- phpMyAdmin SQL Dump
-- version 4.5.1
-- http://www.phpmyadmin.net
--
-- Servidor: 127.0.0.1
-- Tiempo de generación: 29-12-2016 a las 22:52:09
-- Versión del servidor: 10.1.16-MariaDB
-- Versión de PHP: 5.6.24
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT... | true |
f26b4ce921be983892e76a05c7bfa3d70b2781b1 | SQL | missaouib/tr-backend | /src/main/resources/db/migration/V1_32__createAttributeCategory.sql | UTF-8 | 641 | 3.3125 | 3 | [] | no_license | DROP TABLE IF EXISTS `attribute_category`;
CREATE TABLE `attribute_category`(
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`created_by` varchar(255) DEFAULT NULL,
`date_created` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
`deleted` bit DEFAULT 0,
`date_deleted` datetime DEFAULT NULL,
`last_modifie... | true |
df459b9ca4d0ebe51b85ff5cc1fe99f9dceab7dc | SQL | t2m-git/LeetCode | /SQL/1398.sql | UTF-8 | 836 | 4.59375 | 5 | [] | no_license | # Write your MySQL query statement below
/*
SELECT
o.customer_id,
c.customer_name
FROM
Customers AS c
INNER JOIN Orders AS o ON o.customer_id = c.customer_id
GROUP BY o.customer_id
HAVING COUNT(o.product_name IN ('A', 'B') OR null) > 1
AND COUNT(o.product_name = 'C' or null) = 0;
*/
WITH CTE_ONE AS (
SELE... | true |
641c1554025696fd863f412c67a71e59ef297891 | SQL | cryptoPickle/invoicespace-backend | /db/migrations/1_user.up.sql | UTF-8 | 441 | 2.984375 | 3 | [] | no_license | CREATE EXTENSION IF NOT EXISTS "uuid-ossp";
CREATE TABLE users(
user_id UUID PRIMARY KEY DEFAULT uuid_generate_v4(),
first_name VARCHAR (5000) NOT NULL,
last_name VARCHAR (5000) NOT NULL,
email VARCHAR (3000) NOT NULL UNIQUE,
password VARCHAR (5000) NOT NULL,
organisation_id UUID,
created_a... | true |
30a2247d7c7548487e23c9a28f86b2d2fa03eac5 | SQL | yangguang8112/NER_RE_DB | /schema.sql | UTF-8 | 758 | 3.046875 | 3 | [] | no_license |
DROP TABLE IF EXISTS paper;
DROP TABLE IF EXISTS NER;
DROP TABLE IF EXISTS RE;
CREATE TABLE paper (
id INTEGER PRIMARY KEY AUTOINCREMENT,
title TEXT NOT NULL,
downloaded TEXT NOT NULL,
paper_url TEXT,
key_words TEXT,
pdf_path TEXT,
author TEXT,
quote INTEGER,
pubtime TEXT,
ner_res TEXT NOT NULL
);... | true |
1cd5c45ca85b2e2c5a57708757669e878b969de9 | SQL | mebelousov/antlr_psql | /src/test/resources/sql/select/5dd1ae4a.sql | UTF-8 | 177 | 2.703125 | 3 | [
"MIT"
] | permissive | -- file:inet.sql ln:44 expect:true
SELECT '' AS four, c AS cidr, masklen(c) AS "masklen(cidr)",
i AS inet, masklen(i) AS "masklen(inet)" FROM INET_TBL
WHERE masklen(c) <= 8
| true |
b2ac62e057818ef4eef8bb99a0178682c917378a | SQL | Vallisha-M/DBMS-Lab | /CIE - 1/1BM19CS177.sql | UTF-8 | 3,727 | 3.71875 | 4 | [] | no_license | create database cie1;
use cie1;
create table person(
driver_id varchar(10),
name varchar(20),
address varchar(30),
primary key(driver_id)
);
desc person;
create table car(
reg_num varchar(10),
model varchar(10),
myear int,
primary key(reg_num)
);
desc car;
create table accident(
report_num int,
accid... | true |
26af1fa35c9c4ae4e5ded027f2cd4240b6355e20 | SQL | sakthi5006/coding_sql_question | /students_country.sql | UTF-8 | 722 | 3.78125 | 4 | [] | no_license | SET
@row_am:=0,
@row_as:=0,
@row_eu:=0;
SELECT ifnull(min(american), '') AS America,
ifnull(min(asian), '') AS Asia,
ifnull(min(european), '') AS Europe
FROM
(SELECT CASE
WHEN continent = 'America' THEN @row_am:=@row_am+1
WHEN continent = 'Asia' THEN @row_as:=@r... | true |
9605f4769e4a66c104ceb76506bc06319774c9a8 | SQL | irungudeveloper/iko-project | /database/iko-2.sql | UTF-8 | 8,279 | 3.09375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.9.0.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Mar 24, 2020 at 10:52 AM
-- Server version: 10.4.6-MariaDB
-- PHP Version: 7.3.8
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OL... | true |
46c19925e4fce0871776e926e2a0a5543a1160ec | SQL | AffDk/dd-genomics | /labeling/templates/genepheno-raw-precision/input.sql | UTF-8 | 1,539 | 4 | 4 | [
"Apache-2.0"
] | permissive | copy (
select
hs.doc_id
, hs.section_id
, hs.sent_id
, array_agg(DISTINCT genes.ensembl_id) as gene_id
, p.entity as pheno_id
, g.wordidxs as gene_wordidxs
, p.wordidxs as pheno_wordidxs
, string_to_array(si.words, '|^|') as words
, ARRAY_TO_STRING(STRING_TO_ARRAY(lower(ap.names), '|^|'), ', ') as ph... | true |
90b9101e475827375bf4cb4fa957f49f581be76f | SQL | agile-alliance-brazil/event_registrations | /db/structure.sql | UTF-8 | 21,995 | 3 | 3 | [] | no_license | SET statement_timeout = 0;
SET lock_timeout = 0;
SET idle_in_transaction_session_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 xmloption = content;
SET client_min_messages = warning;
SET row... | true |
f22d098ad3b5138c526063e11992b727e864cea9 | SQL | Nalofree/armap2 | /armap2.sql | UTF-8 | 2,344 | 3.46875 | 3 | [] | no_license | CREATE DATABASE armap2_db CHARACTER SET utf8 COLLATE utf8_general_ci;
-- ALTER TABLE offices MODIFY office_cover INT(11);
-- ALTER TABLE objects MODIFY object_cover INT(11);
-- ALTER TABLE objects ADD object_city INT(11);
CREATE TABLE users (
user_id INT(11) NOT NULL AUTO_INCREMENT,
user_email VARCHAR(60),
user... | true |
9acf5f0231b822b847f66132c47b454efefd51b1 | SQL | mumi0351/C8MS | /sqls/商城道具補丁.sql | UTF-8 | 1,364 | 2.71875 | 3 | [] | no_license | ALTER TABLE cashshop_modified_items RENAME cashshop_items;
ALTER TABLE `cashshop_items`
CHANGE COLUMN `serial` `SN` int(11) NOT NULL FIRST ,
CHANGE COLUMN `name` `Note` varchar(4096) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL AFTER `SN`,
CHANGE COLUMN `discount_price` `Price` int(11) NOT NULL D... | true |
5150c011dbcc9e2c37b0495b19a7ad61d054ce0e | SQL | AtlasOfLivingAustralia/image-service | /src/main/resources/db/migration/V202105031529340709__add_duplicate_of_update.sql | UTF-8 | 376 | 3.359375 | 3 | [] | no_license | ALTER TABLE failed_upload
ADD PRIMARY KEY (url),
ALTER COLUMN date_created TYPE timestamp without time zone;
UPDATE failed_upload
SET date_created = date_created AT TIME ZONE
(SELECT current_setting('TIMEZONE'));
ALTER TABLE image
ADD CONSTRAINT image_is_duplicate_of_id_fk FOREIGN KEY (is_duplicate_o... | true |
bd67dfb92c98266b6f1eb4452467e5d8a5db1839 | SQL | adrianhideki/sindex | /scripts/functions/fn_GetServerId.sql | UTF-8 | 185 | 2.890625 | 3 | [] | no_license | CREATE FUNCTION dbo.fn_GetServerId()
RETURNS TABLE
AS RETURN(
SELECT [server].server_id
FROM sys.servers
INNER JOIN dbo.[server]
ON [server].server_name = servers.name
); | true |
605b3edeee699904c64d4093cb27b1cab9437a33 | SQL | darg93/SQL | /having.sql | UTF-8 | 370 | 3.796875 | 4 | [] | no_license | select
last_name, count(*)
from sakila.actor
group by 1
having count(*)>3;
select
c.customer_id,
c.last_name,
c.first_name,
sum(p.amount)
from sakila.payment p
inner join sakila.customer c on (p.customer_id=c.customer_id)
group by 1,2,3
having sum(p.amount)<60
order by sum(p.amount) desc;
select last_name,count(*)... | true |
d40f1f2c5e8242cda42c7803143aa529e941f6d3 | SQL | JeyanthChandru/ArtProject | /Project_With_Login/cheapbooks.sql | UTF-8 | 6,011 | 3.03125 | 3 | [] | no_license | SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
CREATE DATABASE IF NOT EXISTS `cheapbooks` DEFAULT CHARACTER SET latin1 COLLATE latin1_swedish_ci;
USE `cheapbooks`;
CREATE TABLE `author` (
`ssn` bigint(20) NOT NULL,
`name` mediumtext NOT NULL,
`address` longtext NOT NULL,
`phone` bigint(10) NO... | true |
12b6bfab76b30b20c8b936f9d61ccf47ef041d6f | SQL | Gaia3D/kei | /doc/database/platform/ddl/micro_service.sql | UTF-8 | 2,154 | 3.65625 | 4 | [] | no_license | -- FK, Index 는 별도 파일로 분리. 맨 마지막에 작업 예정
drop table if exists micro_service cascade;
-- 서비스 관리
create table micro_service (
micro_service_id int,
micro_service_key varchar(30),
micro_service_name varchar(60) not null,
micro_service_type varchar(30) not null,
server_ip ... | true |
98deb2ef18aae8781440482e5592b06f2b596ab3 | SQL | bakhodir10/EA | /lab2/Lab2-Hibernate-2/src/main/resources/simpsons.sql | UTF-8 | 1,912 | 3.5625 | 4 | [
"MIT"
] | permissive | -- MySQL dump 10.11
--
-- to install this database, from a terminal, type:
-- mysql -u USERNAME -p -h SERVERNAME simpsons < simpsons.sql
--
-- Host: localhost Database: simpsons
-- ------------------------------------------------------
-- Server version 5.0.45-log
DROP DATABASE IF EXISTS simpsons;
CREAT... | true |
0570dc646d3f55228a779b02d6356ac724d35202 | SQL | BTS-SIO-SLAM/PPE-WEB-BELLE-TABLE | /bdd/belletableweb.sql | UTF-8 | 24,569 | 3.015625 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.1.4
-- http://www.phpmyadmin.net
--
-- Client : 127.0.0.1
-- Généré le : Mar 30 Mai 2017 à 10:26
-- Version du serveur : 5.6.15-log
-- Version de PHP : 5.4.24
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_S... | true |
c1080b6256541bd69113c13a72c2e77a709998b0 | SQL | munttraian/magentomysqlconnector | /insertProductTestData_1.sql | UTF-8 | 1,877 | 2.65625 | 3 | [] | no_license | -- insert into to_magento_records
insert into to_magento_records (`record_id`, `identifier`, `type`, `status`)
values (6, 'XXX001', 2, 0);
-- insert into to_magento_datas
insert into to_magento_datas (record_id, field_name, field_value)
values (6, 'action', 1);
-- default store
insert into to_magento_datas (record_... | true |
9c0f2eb40d19fd30331c7082915c209578c4355e | SQL | WilliamCloudDuke/CoffeeShop | /target/classes/data.sql | UTF-8 | 3,141 | 3.484375 | 3 | [] | no_license | INSERT INTO ADDRESS (ID, CITY, STATE, COUNTRY, ZIP_CODE)
VALUES (-1, 'Chicago', 'Illinois', 'US', '60007');
INSERT INTO ADDRESS (ID, CITY, STATE, COUNTRY, ZIP_CODE)
VALUES (-2, 'Dallas', 'Texas', 'US', '75001');
INSERT INTO PERSON (ID, FIRST_NAME, LAST_NAME, EMAIL, ADDRESS_ID, PHONE, ENABLED)
VALUES (-1, 'Admin', 'Ad... | true |
42e2e10f266b0867986ea5d796883b820c8ffe93 | SQL | SheKei/ISAD251_Coursework | /assets/mySQL/Admin/PROCEDURES/items/getItemDetails.sql | UTF-8 | 201 | 2.5625 | 3 | [] | no_license | DELIMITER //
CREATE PROCEDURE ISAD251_STong.TeaAdmin_Get_Item_Details(IN itemId INT(11))
BEGIN
SELECT * FROM ISAD251_STong.Tearoom_item
WHERE tearoom_item.item_id = itemId;
END//
DELIMITER ; | true |
330ee9b500b5eaf7cf489b4eeccfd99173459bc2 | SQL | Pudnaa/nodejs-notifacatioin | /status.sql | UTF-8 | 1,863 | 2.953125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.8.0.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Jun 28, 2018 at 10:20 AM
-- Server version: 10.1.32-MariaDB
-- PHP Version: 5.6.36
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @... | true |
7677d63014cc4a61bbe6fbbd29c726ead1246a6a | SQL | FrozenPearH/java | /培训练习/HAP/数据库数据/hap_om_order_headers.sql | UTF-8 | 3,619 | 2.921875 | 3 | [] | no_license | /*
Navicat MySQL Data Transfer
Source Server : localhost_3306
Source Server Version : 50727
Source Host : localhost:3306
Source Database : hap_dev
Target Server Type : MYSQL
Target Server Version : 50727
File Encoding : 65001
Date: 2019-09-11 21:09:24
*/
SET FOREIGN_KEY_CHECKS=0;
... | true |
3d0b975e18a8b051e2fd5b4355596a83430f63ae | SQL | jiuno/SQL-Python-Covid19-excercise | /SQL_Postgresql_Sirena.sql | UTF-8 | 1,985 | 4.03125 | 4 | [] | no_license | -- Bruno Fernando Alliani
-- Excercise 1.1
CREATE VIEW mrr_per_account as (SELECT accounts.id as account ,
SUM(revenue_mrr.amount_inc_tax) as mrr
from accounts INNER JOIN revenue_mrr ON accounts.id = revenue_mrr.account_id
GROUP BY accounts.id
);
CREATE VIEW mrr_usage_per_account as (SELECT accounts.id... | true |
ae1da3987cf53601b73de42a9828474e2f7bda59 | SQL | Raise666/-Tutoring-Center-Website | /database/tutor_class.sql | UTF-8 | 2,453 | 3.078125 | 3 | [] | no_license | CREATE DATABASE IF NOT EXISTS `tutor` /*!40100 DEFAULT CHARACTER SET utf8 */;
USE `tutor`;
-- MySQL dump 10.13 Distrib 5.6.13, for Win32 (x86)
--
-- Host: localhost Database: tutor
-- ------------------------------------------------------
-- Server version 5.6.14
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@C... | true |
e1ea0143da978c8809c52865bac8ac46892b4a3b | SQL | GorodilovRoman/SQL | /Views.sql | UTF-8 | 7,666 | 3.734375 | 4 | [] | no_license | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------;
-- Tworzenie perspektywy;
----------------------------------------------------------------------------------------------------------------------------... | true |
61c4b55fbe8198c6bb8bbb08e9653f4898800886 | SQL | Kimuksung/bigdata | /python/myFlask/templates/app05/_hospital_table.sql | UTF-8 | 3,511 | 3.921875 | 4 | [] | no_license | -- hostpital_table.sql
-- 1. 의사 테이블
create table doctors(
doc_id int(10) primary key,
major_treat varchar(25) not null,
doc_name varchar(20) not null,
doc_gen char(1) not null,
doc_phone varchar(15) not null,
doc_email varchar(20) not null,
doc_position varchar(20) not null
);
insert into DOCTORS values(980312, '... | true |
01443cb4ce81161c299b8029bc07d332131e60c7 | SQL | MarkLester10/ehome-backend-cms | /ehome.sql | UTF-8 | 5,890 | 3.328125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 5.1.0
-- https://www.phpmyadmin.net/
--
-- Host: localhost:3306
-- Generation Time: Apr 21, 2021 at 10:11 AM
-- Server version: 5.7.24
-- PHP Version: 7.4.16
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@... | true |
01d51011987546c5d03fd6997ffe793410f2d566 | SQL | mauriiciobarbosa/BDII_2013.1 | /DML/Functions/uf_retorna_cotacao_vencedora.sql | ISO-8859-1 | 1,090 | 3.671875 | 4 | [] | no_license | CREATE FUNCTION uf_retorna_cotacao_vencedora
(
@num_licitacao CHAR(13),
@nom_basico VARCHAR(50)
)
RETURNS TABLE
AS
RETURN
(
SELECT F.nom_fornecedor AS Fornecedor,
CL.val_preco_unitario AS [Valor da cotao]
FROM dbo.cotacoes_licitacao CL
INNER JOIN dbo.produtos_licitacao PL
ON (PL.n... | true |
2bfa768d1bc304020c6bd5ad249c86cd13b57d25 | SQL | fedelucesoli/gestion | /gestion.sql | UTF-8 | 10,926 | 3.078125 | 3 | [
"MIT"
] | permissive | -- phpMyAdmin SQL Dump
-- version 4.5.1
-- http://www.phpmyadmin.net
--
-- Servidor: 127.0.0.1
-- Tiempo de generación: 28-07-2017 a las 17:01:50
-- Versión del servidor: 10.1.19-MariaDB
-- Versión de PHP: 5.6.24
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT... | true |
597a2085a5da50f3d8f9d549c5de568e6e5820f1 | SQL | Ney-Rocha/AC5---Projeto-Lms-Criando-tabelas | /TABELA 7,8.sql | UTF-8 | 914 | 3.625 | 4 | [
"Apache-2.0"
] | permissive | CREATE DATABASE BD_PROJETO_7_8;
USE BD_PROJETO_7_8;
CREATE TABLE CURSO
(
ID INT IDENTITY,--(PK)
NOME VARCHAR (200) NOT NULL,--(UQ)
CONSTRAINT PK_ID_CURSO PRIMARY KEY (ID)
);
CREATE TABLE SOLICITACAO_MATRICULA
(
ID INT IDENTITY,--(PK)
ID_ALUNO TINYINT NOT NULL,--(FK)
ID_DISCIPLINA_OFERTADA CHAR (40) NOT NULL,--(FK... | true |
1ff11d2f77c727f1165dcf7084e8360252a29d52 | SQL | Anoia/cookbook | /boot/src/main/resources/db/migration/V2__Create_foodstuffs_table.sql | UTF-8 | 733 | 3.65625 | 4 | [] | no_license | CREATE TABLE IF NOT EXISTS foodstuff
(
foodstuff_id INT GENERATED ALWAYS AS IDENTITY PRIMARY KEY,
foodstuff_name TEXT NOT NULL CHECK (foodstuff_name <> ''),
description TEXT NOT NULL DEFAULT '',
created_at TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT (NOW())... | true |
cb6197442a32c4353cc1469c407bf61b5fa37bd2 | SQL | psj3006/wines.co | /WebContent/sql/qna.sql | UTF-8 | 596 | 3.390625 | 3 | [] | no_license | create table qna (
q_num number(10) primary key,
id varchar2(30) not null,
subject varchar2(50) not null,
content CLOB not null,
regdate date not null,
hit number(5) not null,
foreign key(id) references member(id) on delete cascade
);
create sequence qna_seq;
create table qna_comment (
com_num number(10) prim... | true |
76d97f8982e5c26bdf98d7e1c2bba0d44f392ca9 | SQL | vitorgewe/dw_adventure_works | /models/marts/fact_sales.sql | UTF-8 | 1,071 | 3.71875 | 4 | [] | no_license | with
sales as (
select
/* Surrogate key */
{{ dbt_utils.surrogate_key('sales_order_header.order_id') }} as order_sk
/* Primary key */
, sales_order_header.order_id
/* Foreign keys */
, sales_order_header.sales_person_id
,... | true |
09174764d1ad9f9d6cd0a314f9eaffa6977378ac | SQL | medharik/d2j_2020 | /poo_mvc/d2j_sport.sql | UTF-8 | 3,416 | 3.625 | 4 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.8.4
-- https://www.phpmyadmin.net/
--
-- Hôte : 127.0.0.1
-- Généré le : Dim 14 juin 2020 à 16:26
-- Version du serveur : 10.1.37-MariaDB
-- Version de PHP : 7.2.13
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101... | true |
3226e6fb791db0b5f5f68bf6de0d02eef7aed7c3 | SQL | lisa-lin/sql_zoo | /select_basics.sql | UTF-8 | 504 | 3.859375 | 4 | [] | no_license | -- 1. Population of Germany
SELECT population
FROM world
WHERE name = 'Germany';
-- 2. Name and per capita GDP for each country with area > 5 million
SELECT name, gdp/population
FROM world
WHERE area > 5000000;
-- 3. Name and population for Ireland, Iceland, and Denmark
SELECT name, population
FROM world
WHERE nam... | true |
f4fed6e783bbf08c8e7b73464fcf1af085edd03f | SQL | thorwolpert/namex | /nro-legacy/sql/object/names/namex/view/partner_name_system_vw.sql | UTF-8 | 1,416 | 3.09375 | 3 | [
"Apache-2.0"
] | permissive | -- noinspection SqlNoDataSourceInspectionForFile
DROP VIEW NAMEX.PARTNER_NAME_SYSTEM_VW;
CREATE OR REPLACE FORCE VIEW namex.partner_name_system_vw (partner_name_system_id,
request_id,
start_event_id,
... | true |
8925dbf021a3e50b212dc4d16ca0a0a1bde7e6ca | SQL | sechae0528/html-css | /mariadb/03.20_1.sql | UTF-8 | 2,150 | 4.125 | 4 | [] | no_license | select * from news
select `no`, `title` from news
where `no` = 1
or `no` = 2
select `no`, `title` from news
where `no` = 1 and `title` = '아이폰 x 출시'
1.member 테이블에서 모든 데이터 조회
select * from member
2. basicsalary 테이블에서 모든 데이터 조회
select * from basicsalary
3. 번호가 1004인 사람을 member 테이블에서 조회
se... | true |
7f08c14360838c61e82a974971ca150904331191 | SQL | StevenMeiklejohn/ubiquitous-guide | /week3/day_4/magic/db/wizards_sleeve.sql | UTF-8 | 349 | 2.796875 | 3 | [] | no_license | DROP TABLE sleeves;
DROP TABLE wizards;
DROP TABLE magical_items;
CREATE TABLE wizards (
id serial4 primary key,
name VARCHAR(255)
);
CREATE TABLE magical_items (
id serial4 primary key,
name VARCHAR(255)
);
CREATE TABLE sleeves (
id serial4 primary key,
wizard_id int4 references wizards(id),
magical_item_id int4 re... | true |
d825b5c1dfe63117d0786b1537e7d04172bf31e8 | SQL | RAJALAKSHMIRAJKUMAR/EI | /FORM OBJECTS/ALL DOMAIN SP WITHOUT COMMENTS/EXPENSE/SP_BIZDLY_SUBELECTRICITY_INSERT_VER_0_2_31032014.sql | UTF-8 | 2,014 | 3.703125 | 4 | [] | no_license | DROP PROCEDURE IF EXISTS SP_BIZDLY_SUBELECTRICITY_INSERT;
CREATE PROCEDURE SP_BIZDLY_SUBELECTRICITY_INSERT(
IN INPUT_UNITNO TEXT,
IN INPUT_INVOICEDATE DATE,
IN INPUT_FROMPERIOD DATE,
IN INPUT_TOPERIOD DATE,
IN INPUT_ECNID TEXT,
IN INPUT_AMOUNT DECIMAL(7,2),
IN INPUT_COMMENTS TEXT,
IN INPUT_USERSTAMP VARCHAR(50),
OUT EE... | true |
25723ae2d3d52c04f616a83953f4c611d6035a0a | SQL | itm-dsc-idc-2020-1/idc-practica-7-raspberry-pi-geolocalizacion-arturogilja | /mapas.sql | UTF-8 | 1,421 | 2.875 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.8.4
-- https://www.phpmyadmin.net/
--
-- Servidor: localhost
-- Tiempo de generación: 20-03-2020 a las 20:37:38
-- Versión del servidor: 10.1.37-MariaDB
-- Versión de PHP: 7.3.1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
... | true |
5094aae5152893ce1b6c509380d3955cb8d256d5 | SQL | mkallgren08/Class-Projects | /Week 6/week6-day4-splicing-node-and-SQL/Great_Bay/greatbayDB.sql | UTF-8 | 433 | 3.328125 | 3 | [] | no_license | CREATE DATABASE IF NOT EXISTS greatbayDB;
USE greatbayDB;
CREATE TABLE items_to_bid(
-- make a table with item name, description, current highest bid, --
-- 'buy now' price, and a sold/not sold column --
primary key(id),
id integer(10) not null auto_increment,
itemName varchar(50) not null,
de... | true |
dc839f333513c1ca2922c3df96b9d75e02220d25 | SQL | silence-do-good/stress-test-Postgres-and-MySQL | /dump/high/day26/select0246.sql | UTF-8 | 177 | 2.640625 | 3 | [] | no_license |
SELECT timeStamp, temperature FROM ThermometerOBSERVATION o
WHERE timestamp>'2017-11-25T02:46:00Z' AND timestamp<'2017-11-26T02:46:00Z' AND temperature>=6 AND temperature<=74
| true |
68180cacc7d5a4ab437e56795f99d91bc9b08ede | SQL | craig-gaskill/swkroa-v1 | /swkroa-service/src/main/resources/com/cagst/swkroa/contact/sql/GET_EMAILADDRESSES_FOR_ENTITY.sql | UTF-8 | 323 | 2.578125 | 3 | [] | no_license | SELECT e.email_id
,e.parent_entity_id
,e.parent_entity_name
,e.email_type_cd
,e.email_address
,e.primary_ind
,e.active_ind
,e.updt_cnt AS updt_cnt
FROM email e
WHERE e.parent_entity_id = :parent_entity_id
AND e.parent_entity_name = :parent_entity_name
AND e.active_ind ... | true |
93725f5677f33a474894adb662c355eabdfad5ac | SQL | ApurboRahman/EmployeeManagementSystem | /src/main/resources/mssqlFile/mssqlFile/emsMssqlFile/personalInformation.mssql.sql | UTF-8 | 440 | 2.796875 | 3 | [] | no_license | personalInformationDao.personalInformationDetails=SELECT \
A.PERSONAL_ID_NUMBR as personalIdNumber ,\
A.FIRSTNAME+' '+A.MIDDLENAME+' '+A.LASTNAME as firstName,\
A.DATEOFBIRTH as dateOfBirth,\
A.CELLPHONE as cellPhone,\
A.HOMEPHONE as homePhone,\
A.EMAIL as email,\
A.ADDRESS as address,\
A.CITY as city,\... | true |
32c3161b95512dcb3e74b9ee1168a354c92f5045 | SQL | ibnoe/bc-miracle | /UPDATE_DB/2011-03-09_11-00.sql | UTF-8 | 538 | 2.65625 | 3 | [] | no_license | CREATE TABLE `perpanjang_paket` (
`perpanjang_id` INT( 11 ) NOT NULL AUTO_INCREMENT ,
`perpanjang_djpaket_id` INT( 11 ) NULL ,
`perpanjang_hari` INT( 11 ) NOT NULL ,
`perpanjang_tanggal` DATE NOT NULL ,
`perpanjang_keterangan` VARCHAR( 250 ) NOT NULL ,
`perpanjang_author` VARCHAR( 50 ) NOT NULL ,
`perpanjang_dat... | true |
4637f50a507d30a7fd840c8fb840a75ceb712715 | SQL | linxuan2/sheepshead-scores | /Commands/ScoreReport.command.sql | UTF-8 | 265 | 3.859375 | 4 | [] | no_license | select player.name,
sum(gamePlayer.score)
from game
inner join gamePlayer
on gamePlayer.gameId = game.id
inner join player
on player.id = gamePlayer.playerId
where game.playedWhen >= {0}
and game.playedWhen < {1}
group by player.name
order by 2 desc,
1 asc;
| true |
e6aa1e51f2b3d3f3fc3ed133e90881c5f977d4f5 | SQL | alsantos10/longevo | /longevo.sql | UTF-8 | 3,808 | 3.390625 | 3 | [
"MIT"
] | permissive | -- phpMyAdmin SQL Dump
-- version 4.2.11
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: 29-Jan-2017 às 15:32
-- Versão do servidor: 5.6.21
-- PHP Version: 5.6.3
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
... | true |
ae95a10df1856aff391a8542137b14c827335b4c | SQL | alifahfathonah/laundryuk | /laundryuk.sql | UTF-8 | 6,764 | 2.703125 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | -- phpMyAdmin SQL Dump
-- version 4.7.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Jan 31, 2020 at 01:59 AM
-- Server version: 10.1.29-MariaDB
-- PHP Version: 7.2.0
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD... | true |
e3cf7f3e398d76276b635c06930ffbbe26710f1c | SQL | adnshr/nextgen | /SQL/Oracle/catissuecore.sql | UTF-8 | 53,893 | 2.796875 | 3 | [] | no_license | create table CATISSUE_PERMISSIBLE_VALUE (
IDENTIFIER number(19,0) not null ,
CONCEPT_CODE varchar(40),
DEFINITION varchar2(500),
PARENT_IDENTIFIER number(19,0),
VALUE varchar(225),
PUBLIC_ID varchar(30),
primary key (IDENTIFIER)
);
create table CATISSUE_CDE (
PUBLIC_ID varchar(30) not null,
L... | true |
3589b00b0ae5c86594902d59ef22d74388b81fab | SQL | Colleen-ODonnell/QTM385 | /SQLclass5.sql | UTF-8 | 3,016 | 4.40625 | 4 | [] | no_license | USE sakila;
DESC film;
SELECT title, description, rating
FROM film
LIMIT 30;
/* CASE WHEN is like IF statement */
/* END finishes the clause */
SELECT rating,
CASE WHEN rating IN ('R', 'NC-17') THEN 'Young Adults Only'
ELSE 'General Audience' END AS rating2
FROM film;
/* created new variable rating2 */
/* once you ... | true |
df433eac9c74cf9412d7b20e9d78f04a49c6304f | SQL | Milena8903/PracticasAGN | /Sql/1.1/BD_IngresoDatosAGN.sql | UTF-8 | 5,278 | 3.109375 | 3 | [] | no_license | use ArchivoGN;
-- Dependencia
insert into Dependencia (Nombre_Dep)
values ('Oficina de Planeamiento Archivistico'),
('División de Clasificación y Descripción'),
('División de Programas Especiales'),
('División Administrativa y Financiera'),
('División de Reprografia y Automatización'),
('Dirección Gen... | true |
905c3e90c2d2f030fdd2e640d9b5715e46be8cc5 | SQL | c2j185/Pewlett-Hackard-Analysis | /Queries/query3.sql | UTF-8 | 300 | 3.71875 | 4 | [] | no_license | --join the current_emp and dept_employee tables
-- Employee count by department number
SELECT COUNT(ce.emp_no), de.dept_no
into emp_count_by_dept
FROM current_emp as ce
LEFT JOIN dept_employee as de
ON ce.emp_no = de.emp_no
GROUP BY de.dept_no
order BY de.dept_no;
select * from emp_count_by_dept
| true |
3ecd97fe4f6afe2ff2dcad0848c5d130a8fcef64 | SQL | alfangr/twiscode | /transaction-detail-table.sql | UTF-8 | 337 | 2.765625 | 3 | [] | no_license | CREATE TABLE detail_transaksi (
id int NOT NULL,
id_transaksi int NOT NULL,
harga int,
jumlah int,
subtotal int,
PRIMARY KEY (id),
FOREIGN KEY (id_transaksi) REFERENCES transaksi(id)
);
INSERT INTO detail_transaksi VALUES (1, 1, 20000, 2, 40000);
INSERT INTO detail_transaksi VALUES (2, 2, 2... | true |
e63e6a692a0ba7df02e4c5261a23f97cac79c7e2 | SQL | lazyyyyy/BDD | /gsb (11).sql | UTF-8 | 42,081 | 3.21875 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.6.4
-- https://www.phpmyadmin.net/
--
-- Client : 127.0.0.1
-- Généré le : Jeu 04 Mai 2017 à 10:14
-- 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 |
65d5cfe92b2b5bcb1e6b5284af31748a4bd0d521 | SQL | aaqibtariq/SQLZOO-Probelms | /Project 1/Select from world/file4.sql | UTF-8 | 630 | 3.078125 | 3 | [] | no_license | /* In this tutorial 2 you will use the SELECT command on the table world:*/
SELECT name, population/1000000 FROM world WHERE continent = 'South America'
/* This query will Show the name and population in millions for the countries of the continent 'South America'. Divide the population by 1000000 to get population i... | true |
930e2f9802fb535c0947ef9565964a256864ae4a | SQL | vsolv/BigFin | /Bigflow/DB/SPS/ATMA/sp_Atma_partnerproduct_Map_Set.sql | UTF-8 | 8,484 | 3.15625 | 3 | [] | no_license | CREATE DEFINER=`developer`@`%` PROCEDURE `sp_Atma_partnerproduct_Map_Set`(in ls_Action varchar(16),
in lj_filter json,in lj_classification json,
out Message varchar(1000))
sp_Atma_partnerproduct_Map_Set:BEGIN
declare Query_Insert varchar(1000);
Declare countRow varchar(6000);
Declare Query_Update varchar(1000);
Declare... | true |
4e0e74b5adb06564969137f8367769b0311b8a84 | SQL | ericdallo/CuboMania | /database.sql | UTF-8 | 2,067 | 2.6875 | 3 | [] | no_license | create database cubos;
create table cubo(id int(11) not null auto_increment, nome varchar(100) not null, tamanho varchar(10) not null, tipo varchar(20) not null, dificuldade varchar(20) not null, imagem varchar(255) null, preco double, primary key(id));
INSERT INTO cubo( nome, tamanho, tipo, dificuldade, imagem, preco... | true |
c30dcaf3e817705cec78a39aad4a7f6280c88d1f | SQL | mhku/WEB1702 | /AJax/day06/dangdang_02/dangdang.sql | UTF-8 | 883 | 2.546875 | 3 | [] | no_license | CREATE DATABASE dangdang CHARSET=utf8;
USE dangdang;
CREATE TABLE dd_book(
bid INT PRIMARY KEY AUTO_INCREMENT,
bname VARCHAR(20) NOT NULL DEFAULT '',
pic VARCHAR(20) NOT NULL DEFAULT '',
price DOUBLE(10,2) NOT NULL DEFAULT 0,
pubtime DATETIME NOT NULL DEFAULT 0
);
INSERT INTO dd_book VALUES(n... | true |
dd4ee76153963e4524588b52b8d4093cf59bc30b | SQL | Dunnel45/CA218 | /lab_04/q2.sql | UTF-8 | 234 | 3.640625 | 4 | [] | no_license | SELECT c.Name, c.Region, c.Population, cl.Language, cl.Percentage
FROM country c
JOIN countrylanguage cl ON
c.Code = cl.CountryCode
WHERE (c.Population * cl.Percentage) / 100 > 1000000
ORDER BY (c.Population/100) * cl.Percentage DESC; | true |
b109b99ad030dbbc09419ba3bbc1f135d017feca | SQL | centreon/centreon-broker | /sql/mysql_v3/rt_servicestateevents.sql | UTF-8 | 597 | 3.390625 | 3 | [
"Apache-2.0"
] | permissive | --
-- Service states.
--
CREATE TABLE rt_servicestateevents (
servicestateevent_id int NOT NULL auto_increment,
host_id int NOT NULL,
service_id int NOT NULL,
start_time int NOT NULL,
ack_time int default NULL,
end_time int default NULL,
in_downtime boolean NOT NULL,
last_update tinyint NOT NULL defau... | true |
ec367694e09938e0ef6a5d24fee8340dbd205cf5 | SQL | renrenqian/rmyy | /trunk/admin/db/mysql/schema.website.mysql.sql | UTF-8 | 6,568 | 3.3125 | 3 | [] | no_license | /*==============================================================*/
/* Database name: hzhos */
/* DBMS name: mysql 5.1 */
/* Created on: 2012-06-10 14:20:00 */
/*==================================================... | true |
113020cf5fa393f54b73953ec238d4d11f23caae | SQL | MariaPereira1/DBMinDaSpot | /F006.sql | UTF-8 | 1,956 | 3.953125 | 4 | [] | no_license | -- CRUD Genre
DROP PROCEDURE IF EXISTS add_genre;
CREATE PROCEDURE add_genre (IN name_in VARCHAR(30))
BEGIN
INSERT INTO genre (name)
VALUES(name_in);
END;
DROP PROCEDURE IF EXISTS get_genre_by_id;
CREATE PROCEDURE get_genre_by_id (IN genre_id_in INTEGER)
BEGIN
SELECT
name
FROM
genre
WHERE
genre_id = genre_... | true |
8524241d45fb12f540ed61f2af415f697ce8440d | SQL | cjonasl/Leander | /Work/Fixzone/Tasks/Task1/Task27_Day49_Date190612_Update trigger sql/UpdateScript_TriggerSql_2019-06-12.sql | UTF-8 | 92,159 | 3.171875 | 3 | [] | no_license | --Ran ok 2019-06-12 kl. 16:19
UPDATE [Triggers]
SET TRIGGERSQL = 'SELECT
ctm.EMAIL AS ''MESSAGESRV_NEWSGV_HTML_EMAIL'',
new.CustomerID,
new.CustAplID,
dbo.fn_getCustomerName(ctm.TITLE, ctm.FIRSTNAME, ctm.SURNAME) AS ''CustomerName'',
ISNULL(mdl.[DESCRIPTION], ''Product'') AS ''DESC'',
cap.PolicyNumber,
... | true |
0e71ae0e862340d5fa0be13abedaa47cf87569fb | SQL | hnahmad/AnalyticsHW5 | /Analytics HW 9/SQL HW.sql | UTF-8 | 10,151 | 4.375 | 4 | [] | no_license |
-- 1a. Display the first and last names of all actors from the table `actor`.
USE sakila;
-- Want to see table
SELECT * FROM actor;
-- To see only first and last names
SELECT first_name, last_name FROM actor;
-- * 1b. Display the first and last name of each actor in a single column in upper case letters. Name the c... | true |
3ef36848cf00178c6cbb17ae035882a5492d2a0b | SQL | ToborTheGreat/Repository01 | /dw_evdo.sam_evdo_bts_cc_type_params_fact.sql | UTF-8 | 2,368 | 3 | 3 | [] | no_license | --
-- PostgreSQL database dump
--
SET statement_timeout = 0;
SET client_encoding = 'UTF8';
SET standard_conforming_strings = off;
SET check_function_bodies = false;
SET client_min_messages = warning;
SET escape_string_warning = off;
SET search_path = dw_evdo, pg_catalog;
DROP TRIGGER dw_evdo_sam_evdo_bts_cc_type_par... | true |
1bb515172c4aa6cd15603a5ef0761f4e557dad3c | SQL | mynamedaike/petstore | /src/main/sql/create_databases.sql | UTF-8 | 683 | 2.65625 | 3 | [] | no_license | /* USAGE: mysql -u root -p < src/main/sql/create_databases.sql */
DROP DATABASE IF EXISTS petstore;
DROP DATABASE IF EXISTS petstore_dev;
DROP DATABASE IF EXISTS petstore_tests;
CREATE DATABASE petstore CHARACTER SET utf8 COLLATE utf8_general_ci;
CREATE DATABASE petstore_dev CHARACTER SET utf8 COLLATE utf8_general_ci... | true |
ce0b3f32272f09211d269690e49c400e849a848b | SQL | PetePrattis/eclass-web-application | /create.sql | UTF-8 | 7,679 | 3.25 | 3 | [
"MIT"
] | permissive | CREATE TABLE courses(
course_code TEXT NOT NULL,
AM TEXT NOT NULL,
department TEXT NOT NULL,
semester TEXT NOT NULL,
primary key ( course_code )
);
insert into courses(course_code,AM,department,semester) values ('computermaths','c37bf859faf392800d739a41fe5af151','informatics','1');
insert into courses... | true |
dab637342466f87f198e6a72a8da138cec146bfe | SQL | tvharris/grocery-organizer | /database/construct_DB.sql | UTF-8 | 5,217 | 4.1875 | 4 | [] | no_license | -- Initial Table Creation
CREATE TABLE Users (
userID INT AUTO_INCREMENT NOT NULL,
email VARCHAR(255) UNIQUE NOT NULL,
username VARCHAR(255) NOT NULL,
PRIMARY KEY (userID),
CONSTRAINT email_unique UNIQUE (email)
);
CREATE TABLE FoodGroups (
foodGroupID INT AUTO_INCREMENT NOT NULL,
name VARCHAR(255) NO... | true |
d652ab778040e01365c479ac7c94a13f1372ab42 | SQL | akotadi/ESCOM | /5o Semestre/Ingeniería de Software/1a/AdministradorUnidadesAcademicas/mydb.sql | UTF-8 | 6,921 | 2.84375 | 3 | [] | no_license | -- MySQL dump 10.13 Distrib 5.7.19, for Win64 (x86_64)
--
-- Host: localhost Database: mydb
-- ------------------------------------------------------
-- Server version 5.7.19-log
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS... | true |
7ad38dbe6be81ec484fec4146336933863400682 | SQL | Joralmo/BD20171 | /Estructura y datos de la bd/Admisiones_Aulas_Grupos.sql | UTF-8 | 2,373 | 3.0625 | 3 | [] | no_license | -- MySQL dump 10.13 Distrib 5.7.18, for Linux (x86_64)
--
-- Host: localhost Database: Admisiones
-- ------------------------------------------------------
-- Server version 5.7.18-0ubuntu0.16.04.1
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER... | true |
e2e5b1d352684944b44262d23b808216114e8dfb | SQL | SmithWenge/lgb_manage | /db/lgb_manage_20170104.sql | UTF-8 | 44,642 | 3.1875 | 3 | [] | no_license | /*
Navicat MySQL Data Transfer
Source Server : wenge
Source Server Version : 50617
Source Host : localhost:3306
Source Database : lgb_manage
Target Server Type : MYSQL
Target Server Version : 50617
File Encoding : 65001
Date: 2017-01-04 19:26:56
*/
SET FOREIGN_KEY_CHECKS=0;
-- --... | true |
2038c076bdc448cb5b2ca3af6ac240ba2a65faa4 | SQL | Uginim/JavaSWEngineeringCourse | /exmaples/sql/20191124.sql | UHC | 5,452 | 3.953125 | 4 | [] | no_license | CREATE TABLE Employee (
empno VARCHAR2(10) PRIMARY KEY,
name VARCHAR2(10),
phoneno VARCHAR2(13),
sex CHAR(3) CHECK(sex='' or sex=''),
position CHAR(6) DEFAULT '',
deptno VARCHAR2(15) NULL
);
CREATE TABLE Department(
deptno VARCHAR(10) PRIMARY KEY,
deptname VARCHAR(15),
"manager" VARCHAR(10),
FOREI... | true |
68f41c1aaefdeca7989d7f0f57ed0356795b84d6 | SQL | z3bull/EdFi_Assessment_Loader | /oracle/ddl/DISTRICT_TSI_DATA.sql | UTF-8 | 1,896 | 3.59375 | 4 | [] | no_license | -- Create table
create table DISTRICT_TSI_DATA
(
line_number INTEGER not null,
test_start DATE,
last_name VARCHAR2(50),
first_name VARCHAR2(30),
middle_initial VARCHAR2(30),
student_id VARCHAR2(10),
birth_dat... | true |
dc71c959132054c17193c5f543ba94fed0dff68c | SQL | oleg123987/FirstPy | /sql_queries/orders_by_one_user.sql | UTF-8 | 432 | 4 | 4 | [] | no_license | select count(*) as orders_count, sum(order_sum) as total from `intense-wavelet-274110.DZ1.orders`
where user_id = 13175
--order by order_sum desc
--limit 3
-- Количество заказов по каждому email
select users.email, count(orders.orders_id) as orders_amount from `intense-wavelet-274110.DZ1.users` users
right join `inten... | true |
00dbf6ca1118c69c94ef7cb65f3aec396fd77615 | SQL | Jhi97/Markdown-Board | /board/db/profile.sql | UTF-8 | 362 | 2.90625 | 3 | [] | no_license | CREATE TABLE `profile` (
`profile_num` int NOT NULL,
`introduce` varchar(45) DEFAULT NULL,
`member_img` varchar(100) DEFAULT NULL,
PRIMARY KEY (`profile_num`),
CONSTRAINT `profile_num` FOREIGN KEY (`profile_num`) REFERENCES `member` (`member_num`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CH... | true |
17d99df9ccc65a711431c6cfb2bd9849fcd05354 | SQL | arrrlette/ETL_Project | /ETL_Project/ETL_Project/AutomationTablesFinal.sql | UTF-8 | 4,261 | 3.21875 | 3 | [] | no_license | -- Exported from QuickDBD: https://www.quickdatabasediagrams.com/
-- NOTE! If you have used non-SQL datatypes in your design, you will have to change these here.
-- Modify this code to update the DB schema diagram.
-- To reset the sample schema, replace everything with
-- two dots ('..' - without quotes).
--DROP TABL... | true |
13af86b1daba97a5f5603f1adc292a99160e7dc8 | SQL | Khoalabear0424/PantryPal | /db/schema.sql | UTF-8 | 668 | 3.546875 | 4 | [] | no_license | DROP DATABASE IF EXISTS food_db;
CREATE DATABASE food_db;
USE food_db;
CREATE TABLE user_auth (
id INT NOT NULL AUTO_INCREMENT,
userName VARCHAR(255) NOT NULL,
email VARCHAR(255) NOT NULL UNIQUE,
password_hash VARCHAR(255) NOT NULL,
PRIMARY KEY(id)
);
CREATE TABLE foods (
id INT NOT NULL AUTO_INCREMENT,
food_... | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.