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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
b70deafb645306fd9a73fc780cafc0e04ceb757c | SQL | koding1/maple_web | /rank_data/0128.sql | UTF-8 | 3,030 | 3.0625 | 3 | [] | no_license | -- MySQL dump 10.13 Distrib 5.7.32, for Linux (x86_64)
--
-- Host: localhost Database: rank_db
-- ------------------------------------------------------
-- Server version 5.7.32-0ubuntu0.18.04.1
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SE... | true |
f4599b8ed9f82009516850705c894981c16641d6 | SQL | MarionCrp/Projet | /SQL datas/projet_part2.sql | UTF-8 | 5,731 | 2.9375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.5.2
-- http://www.phpmyadmin.net
--
-- Client : 127.0.0.1
-- Généré le : Dim 22 Mai 2016 à 09:49
-- Version du serveur : 5.7.9
-- Version de PHP : 5.6.16
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CL... | true |
23d299e71089e8365cc848527ec231884e7601b9 | SQL | briannadickman/pet_hotel | /server/pet_hotel.sql | UTF-8 | 443 | 3.1875 | 3 | [] | no_license | CREATE TABLE owner (
id SERIAL PRIMARY KEY,
first_name character varying(60),
last_name character varying(80)
);
CREATE TABLE pets (
pet_id SERIAL PRIMARY KEY,
name character varying(60),
breed character varying(60),
color character varying(40),
owner_id integer REFERENCES owner
);
CRE... | true |
3de7b26bf3bffd5c371bfbca84e594e8257d5ec8 | SQL | SoilingRogue/FDS-Backend | /database1.sql | UTF-8 | 7,628 | 3.046875 | 3 | [] | no_license | -- Add data for restaurant and food
insert into Restaurants(rName, minOrderCost) values('tian tian', 7);
insert into Restaurants(rName, minOrderCost) values('a1 bakkutteh place', 20);
insert into Restaurants(rName, minOrderCost) values('koi', 5);
insert into Restaurants(rName, minOrderCost) values('ameens', 15);
insert... | true |
490e0cb128fc2ecfebac2f55850386f27e6c20dc | SQL | alexappelt/ecommercestore | /loja.sql | UTF-8 | 2,468 | 3.078125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.9.0.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Tempo de geração: 12-Nov-2019 às 00:21
-- Versão do servidor: 10.4.6-MariaDB
-- versão do PHP: 7.3.9
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET ... | true |
800f1f2fedd59501837aaa86a92fb0520d5409ac | SQL | lus860/grabit | /grabit (2).sql | UTF-8 | 432,591 | 3.109375 | 3 | [
"MIT"
] | permissive | -- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Хост: 127.0.0.1:3306
-- Время создания: Авг 31 2020 г., 17:17
-- Версия сервера: 10.3.22-MariaDB
-- Версия PHP: 7.3.17
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIE... | true |
fa021f347542b8abed08d5f9ef593f2ec1064719 | SQL | LiuXin9527/shopping | /SQL/shopping_salesorder01.sql | UTF-8 | 2,640 | 2.734375 | 3 | [
"Apache-2.0"
] | permissive | -- MySQL dump 10.13 Distrib 5.7.17, for Win64 (x86_64)
--
-- Host: localhost Database: shopping
-- ------------------------------------------------------
-- Server version 5.7.19-log
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RES... | true |
b1e935398946fd8c6de7a99eef1640818ee0d15b | SQL | KBKBalu/applicant-tracker | /ApplicantTracker/ApplicantTracker.Data/DbScript/AppTrackDBScript.sql | UTF-8 | 15,119 | 3.3125 | 3 | [] | no_license | --/*
--SQLyog Ultimate v11.11 (64 bit)
--MySQL - 5.6.17 : Database - apptrack
--*********************************************************************
--*/
--/*!40101 SET NAMES utf8 */;
--/*!40101 SET SQL_MODE=''*/;
--/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
--/*!40014 SET @OLD_FOREIGN_KE... | true |
1c78709d9f2bc02605ab5c9abe6ce2dd08327611 | SQL | LeoAki/nodats | /describeregistro.sql | UTF-8 | 2,078 | 3.09375 | 3 | [] | no_license | CREATE VIEW `describeregistro`
AS
select
`r`.`codigo` AS `codigo`,
`se`.`grado` AS `grado`,
`se`.`nombreseccion` AS `nombreseccion`,
`se`.`nomnivel` AS `nomnivel`,
`doc`.`paterno` AS `paterno`,
`doc`.`materno` AS `materno`,
`doc`.`nombres` AS `nombres`,
`doc`.`dni` AS `dni`,
`sina`.`codigo` AS `CODEASINA`,
`sina`.`... | true |
57ce865e1e6ce6bd4742f6e491af6936391b5abc | SQL | gamefortech123/cheat-admin | /DATABASE.sql | UTF-8 | 4,730 | 2.953125 | 3 | [
"MIT"
] | permissive | -- phpMyAdmin SQL Dump
-- version 5.0.4
-- https://www.phpmyadmin.net/
--
-- Хост: 127.0.0.1:3306
-- Время создания: Май 11 2021 г., 22:45
-- Версия сервера: 5.6.47
-- Версия PHP: 7.1.33
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHAR... | true |
82af9a30619e43e0aa09431aee37f6b8784812c6 | SQL | Isacoro/HiberlibrosV2 | /src/main/resources/basedatos/schema.sql | UTF-8 | 364 | 3.1875 | 3 | [] | no_license |
create table editoriales (
id int auto_increment primary key,
nombre_editorial Varchar(100)
);
create table libro_autor (
id int auto_increment primary key,
id_libro int,
id_autor int,
CONSTRAINT FK_libro_autor_libro FOREIGN KEY (id_libro) REFERENCES libros(id),
CONSTRAINT FK_libro_autor_autor FOREIGN KEY (i... | true |
847995152884f73f8f45f7a01fbb1d331d93213f | SQL | aldianfn/PR7_1700635_AldianFN | /kereta_join.sql | UTF-8 | 3,543 | 3.453125 | 3 | [
"LicenseRef-scancode-unknown-license-reference",
"MIT"
] | permissive | /*
Navicat Premium Data Transfer
Source Server : connect
Source Server Type : MySQL
Source Server Version : 100130
Source Host : localhost:3306
Source Schema : kereta_join
Target Server Type : MySQL
Target Server Version : 100130
File Encoding : 65001
Date: 15/04/201... | true |
65290e6c590ab3986457421872b7c9deb49b8eda | SQL | akrom23/FrostberryFixHistory | /Kalimdor/Desolace/2014_03_14_quest_the_emerging_threat.sql | UTF-8 | 2,690 | 2.671875 | 3 | [] | no_license | -- desolace quest The emerging threat (ID: 14256)
-- creature 490 16777216
UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 35773;
UPDATE `creature_template` SET `AIName` = 'SmartAI', `iconName` = 'vehichleCursor', `vehicleID` = 837, `unit_flags` = 16777988, `dynamicflags` = 2048, `InhabitType` = 5, ... | true |
7c497eccb19bd8700744c225187e4c58fe0c55c9 | SQL | VenYy/code | /sqls/area_info.sql | UTF-8 | 1,243 | 2.90625 | 3 | [] | no_license | /*
Navicat Premium Data Transfer
Source Server : mysql
Source Server Type : MySQL
Source Server Version : 80025
Source Host : 127.0.0.1:3306
Source Schema : infos
Target Server Type : MySQL
Target Server Version : 80025
File Encoding : 65001
Date: 30/06/2021 20:32:02... | true |
5a7b34dcc818b768661e0a2206839655a6080440 | SQL | yifeng2019uwb/DataCampAndCodePractice | /Data-Analyst-with-SQL-Server/07-Hierarchical-and-Recursive-Queries-in-SQL-Server/01-Recursion-and-Common-Table-Expression/02-A-CTE-is.sql | UTF-8 | 548 | 2.875 | 3 | [] | no_license | /*
A CTE is ... Find the wrong fact!
In this exercise, we want to refresh your knowledge of CTEs (Common Table Expressions). The statements below are about basic characteristics of CTEs and why it is beneficial to use them.
Please find the statement that is NOT true about CTEs.
A CTE never returns a result set.
True... | true |
24614d6f75f157eb44a4a8a96b6341b2193269fe | SQL | CuturaM/EDUNOVA | /SQL/Skripta Muzej/skriptamuzej.sql | UTF-8 | 2,244 | 3.6875 | 4 | [] | no_license | /*
Ova datoteka se nalazi na
mysql -ucuturam -p --default_character_set=utf8 < "d:\skriptamuzej.sql"
*/
drop database if exists muzej1862;
create database muzej1862 default character set utf8;
use muzej1862;
create table izlozba(
sifra int not null primary key auto_increment,
naziv varchar(100) not null,
cijenaulaz... | true |
0d3e1aa614de286da61679de8c0a3f70a2e62d77 | SQL | coding-eval-platform/playground-service | /playground-service-application/src/main/resources/db/migrations/V0_0_1_1__New_execution_results.sql | UTF-8 | 770 | 3.296875 | 3 | [
"Apache-2.0"
] | permissive | CREATE TABLE compile_error_execution_results
(
result_id BIGINT NOT NULL,
PRIMARY KEY (result_id),
FOREIGN KEY (result_id) REFERENCES execution_results (id)
);
CREATE TABLE compile_error_execution_results_errors
(
result_id BIGINT,
error VARCHAR,
error_order INT,
FOREIGN KEY (result... | true |
4c2adc322b6f1cf19e4148fa2547c1d8b282ef82 | SQL | asw-westleycheung/Aggregate_layer | /temp_sales_aggregate_wk v3.sql | UTF-8 | 3,375 | 3.171875 | 3 | [] | no_license | spark.sql("""
------3.6 mins-------
SELECT
i.product_key
,i.store_key
,i.bu_key
,d.fiscal_year
,d.fiscal_month
,d.fiscal_week_of_year
,d.fiscal_year_week
,d.max_fiscal_date
,d.vs_max_sales_year
,d.vs_max_sales_month
,d.vs_max_sales_week
,SUM(CASE WHEN inve... | true |
dac3a5cf8821e4bd3686da9774b2d84d0def0e7a | SQL | JavaZenTeam/IgorBot | /src/main/resources/db/migration/common/V2__Add_Users_and_Chats.sql | UTF-8 | 847 | 3.734375 | 4 | [] | no_license | --Add user_entity
CREATE TABLE user_entity (
user_id INTEGER PRIMARY KEY,
first_name VARCHAR(255) NULL,
last_name VARCHAR(255) NULL,
username VARCHAR(255) NULL
);
INSERT INTO user_entity (user_id)
SELECT DISTINCT user_id
FROM message_entity;
ALTER TABLE message_entity
ADD CONSTRAINT message_to_user_... | true |
0c39fcb282db3079bf8e8f0abfdbadd306c381fe | SQL | silence-do-good/stress-test-Postgres-and-MySQL | /dump/high/day13/select2048.sql | UTF-8 | 191 | 2.78125 | 3 | [] | no_license |
SELECT timeStamp, temperature
FROM ThermometerObservation
WHERE timestamp>'2017-11-12T20:48:00Z' AND timestamp<'2017-11-13T20:48:00Z' AND SENSOR_ID='6bc7d8be_19d7_4fda_be4d_5b01fae668dc'
| true |
1c453f44fd6db3e6cda39d5f6d4ff95845ddc449 | SQL | lionyoungys/JavaWeb | /love.sql | UTF-8 | 3,473 | 3.765625 | 4 | [] | no_license | CREATE TABLE user(
id INT UNSIGNED PRIMARY KEY AUTO_INCREMENT,
avatar VARCHAR(255) NOT NULL DEFAULT '' COMMENT '头像照片文件路径',
name CHAR(8) NOT NULL DEFAULT '' COMMENT '姓名',
sex TINYINT UNSIGNED NOT NULL default 1 COMMENT '性别:1-男,2-女',
height TINYINT UNSIGNED NOT NULL COMMENT '身高:单位cm,最大255',
birthday ... | true |
0e884af0ff3f3ff23cd0e9149eb7706b207ead24 | SQL | chikarayoshinari/kadai10 | /gs_db48.sql | UTF-8 | 11,226 | 2.8125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.2.11
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: 2017 年 10 朁E30 日 15:41
-- サーバのバージョン: 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 */;
/*!4010... | true |
d2896bef7ec62bd5b1907eef7499a5bcd7adf402 | SQL | MegaColorBoy/calculator | /tables.sql | UTF-8 | 207 | 2.828125 | 3 | [] | no_license | CREATE TABLE IF NOT EXISTS calculator_logs
(
cl_id int unsigned NOT NULL auto_increment,
expression varchar(255) NULL,
created_at timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY(cl_id)
); | true |
758dd736663734b862138fdce373949ced33c66c | SQL | kotilai/clojure-twitter-clone | /resources/migrations/20170805161600-add-tweets.up.sql | UTF-8 | 257 | 2.65625 | 3 | [] | no_license | CREATE TABLE tweet
(id BIGSERIAL PRIMARY KEY,
-- user_id VARCHAR(20),
posted_date TIMESTAMP,
-- reply_to_id VARCHAR(20),
text VARCHAR(140)
-- FOREIGN KEY (user_id)
-- REFERENCES user(id),
--FOREIGN KEY (reply_to_id)
-- REFERENCES tweet(id));
);
| true |
1a427b9258cece4f84369b9ee2a38a855e002768 | SQL | tomofumi-run/p_mysql | /branch.sql | UTF-8 | 823 | 3.90625 | 4 | [] | no_license | DROP TABLE IF EXISTS japan_handball_teams;
CREATE TABLE japan_handball_teams (
id INT NOT NULL AUTO_INCREMENT,
name VARCHAR(20),
score INT,
position VARCHAR(5),
PRIMARY KEY (id)
);
INSERT INTO japan_handball_teams (name, score, position) VALUES
('KASAHARA', 4, 'PV'),
('BAIG', 5, 'LB'),
('NARITA', 0, 'L... | true |
83dd9b9904edb2ca91fd80257e6973ddfc69e9e4 | SQL | hunter9000/savage-rifts-gen | /sql/4.sql | UTF-8 | 6,477 | 3.375 | 3 | [] | no_license | USE savage_rifts;
CREATE TABLE `framework` (
`id` BIGINT(20) NOT NULL AUTO_INCREMENT,
`type` VARCHAR(255) NOT NULL,
`starting_attribute_points` INT(11) NULL DEFAULT NULL,
`can_select_race` BIT(1) NOT NULL DEFAULT b'1',
`max_agility` BIGINT(20) NULL DEFAULT NULL,
`max_smarts` BIGINT(20) NULL DEFAULT NULL,... | true |
93bf6b834a745b508e3c79a2acd9f044a897cf31 | SQL | arellanoemilio/MyPhoneCompany | /DataGenerationCode/addDropTables.ddl | UTF-8 | 4,344 | 3.6875 | 4 | [] | no_license | drop table Customer cascade constraints;
drop table Account cascade constraints;
drop table PhoneNumber cascade constraints;
drop table contains;
drop table BillingPlan cascade constraints;
drop table soldPhone cascade constraints;
drop table Activity;
drop table store cascade constraints;
drop table stock;
dr... | true |
c2330362c6083a9171a4e29a64fd9f38ae6a7aae | SQL | kresller/desafio | /src/main/resources/schema.sql | UTF-8 | 623 | 3.03125 | 3 | [] | no_license | DROP TABLE IF EXISTS USER;
CREATE TABLE USER (
ID INT AUTO_INCREMENT PRIMARY KEY,
FIRST_NAME VARCHAR(250) NOT NULL,
LAST_NAME VARCHAR(250) NULL,
EMAIL VARCHAR(250) NULL,
BIRTHDAY DATE NULL,
LOGIN VARCHAR(250) NULL,
PASSWORD VARCHAR(250) NULL,
PHONE VARCHAR(250) NULL,
CREATED_AT DATE NULL DEFAULT GE... | true |
a47538396aa6c77524982ef2737b0928d2bdcbd3 | SQL | mryklis/IS362 | /Assignment_1.sql | UTF-8 | 4,056 | 3.8125 | 4 | [] | no_license | -- 1.1 How many airplanes have listed speeds?
SELECT COUNT(*)
FROM flights.planes
WHERE speed IS NOT NULL
-- '23'
INTO OUTFILE 'C:/ProgramData/MySQL/MySQL Server 5.7/Uploads/assignment_1_1.csv'
FIELDS ENCLOSED BY '"'
TERMINATED BY ';'
ESCAPED BY '"'
LINES TERMINATED BY '\r\n';
-- 1.2 What is the minimum listed s... | true |
ea42cf7712b74577aae97ea0224d0065708bafb0 | SQL | AndreiRubino/oracle | /Instalação Oracle 12c no Linux e Explicações Básicas/20-Functions.sql | UTF-8 | 1,144 | 3.6875 | 4 | [] | no_license | FUNCTIONS
Parecidas com Stored Procedures
Diferenças
São Obrigadas a retornar valores
Somente aceitam parametros IN
Podem ser utilizadas em clausulas SQL where, order by, group by, etc.
Restrições a alguns comando SQL
Cancelar Transações, Alter system etc.
Não aceia comandos DML, CREATE, ALTER, DELETE.
... | true |
916582210f732abd8bf5c09893c0c78761ec2ef9 | SQL | easypanda/Hadoop | /json/ccaa.sql | UTF-8 | 841 | 2.8125 | 3 | [] | no_license | -- hadoop fs -mkdir /ingest/ComunidadesAutonomas
-- hadoop fs -put ComunidadesAutonomas.json /ingest/ComunidadesAutonomas
-- https://bigdatadevelop.wordpress.com/2015/01/02/working-with-json-files-in-hive/
-- https://github.com/rcongiu/Hive-JSON-Serde
-- /usr/lib/hive/lib/
-- sudo mv json-serde-1.3.6-SNAPSHOT-jar-wi... | true |
86f1d6f9d86381ca1ae2fe9d2731831c920eaab7 | SQL | zuevval/source | /sql/selectQuery3_dropped.sql | UTF-8 | 373 | 3.640625 | 4 | [] | no_license | #dropped students by session
SELECT gr_id, students.stud_id, stud_surn, stud_name, stud_name2, stud_status
FROM university.students
JOIN university.stud_to_grps
ON university.students.stud_id = university.stud_to_grps.stud_id
WHERE year_study = 2016 AND stud_semester = 1 #0 in first session, 1 in second
ORDER BY gr_id,... | true |
7865bbd9c93f16963ca8af95357b31f4eb882da4 | SQL | heartshare/runimg | /webroot/protected/data/runimg.sql | UTF-8 | 2,275 | 3.484375 | 3 | [] | no_license | CREATE TABLE IF NOT EXISTS `img` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`hash_code` varchar(32) NOT NULL,
`file_path` varchar(64) NOT NULL,
`expire_time` int(11) NOT NULL COMMENT '过期时间戳',
`width` mediumint(6) NOT NULL DEFAULT '0' COMMENT '图片宽度',
`height` mediumint(6) NOT NULL DEFAULT '0' COMMENT '图片高度',
... | true |
412965bed9e498dfd06ed85281b1ff3d1b15ccd3 | SQL | ksjtop03/voicek | /PPAS/조회/파티션테이블_조회.sql | UTF-8 | 5,293 | 4.15625 | 4 | [] | no_license | #######################################################################################################
######################################### PARTITION 테이블 조회 #######################################
#######################################################################################################
/* ---------... | true |
36ed18d3b8f5cfd0c8a531f14f3d3dca873f7c60 | SQL | postgrespro/tsexact | /sql/tsexact.sql | UTF-8 | 1,738 | 2.890625 | 3 | [
"PostgreSQL"
] | permissive | CREATE EXTENSION tsexact;
SELECT ts_exact_match('a:2 b:3 c:5'::tsvector, 'a:1 b:2 c:4'::tsvector);
SELECT ts_exact_match('a:2 b:3 c:4'::tsvector, 'a:1 b:2 c:4'::tsvector);
SELECT ts_exact_match('a:2 b:3 c:4'::tsvector, 'a:1 b:2 c:3'::tsvector);
SELECT ts_exact_match('a:1,2,6,7,8 b:3,4,5,9,10'::tsvector, 'a:1,2,3 b:4,5... | true |
093466d1a4706113a7a48c60724ec8f310a894a3 | SQL | Erdiko/users | /sql/updates/003-create-user.sql | UTF-8 | 737 | 3.171875 | 3 | [
"MIT"
] | permissive | SET NAMES utf8;
SET FOREIGN_KEY_CHECKS = 0;
-- ----------------------------
-- Table structure for `users`
-- ----------------------------
DROP TABLE IF EXISTS `users`;
CREATE TABLE `users` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`email` varchar(255) NOT NULL,
`password` varchar(40) NOT NULL,
`role` ... | true |
83cbd6fcb9add398b6e88e1f7e567e61e312d601 | SQL | AlexanderOnbysh/edu | /bachelor/OLAP/tasks/task5/script(create_scheme).sql | UTF-8 | 558 | 2.53125 | 3 | [] | no_license | -- Create the user
create user TASK5
identified by "OLAP"
default tablespace USERS
temporary tablespace TEMP
profile DEFAULT;
-- Grant/Revoke role privileges
grant connect to TASK5;
grant resource to TASK5;
-- Grant/Revoke system privileges
grant unlimited tablespace to TASK5;
create user TASK5_2
identified by ... | true |
4910ed40c1227f8521d9eef78eb6319814dd8a8e | SQL | dbillue/AV | /AV/SQL Scripts/PLSQL/Alter_Session_Stmnts.sql | UTF-8 | 1,291 | 2.75 | 3 | [] | no_license | /*****************************
Author: Duane Billue
Date: 2019-10-31
Description: ALTER Session Statements
*****************************/
SET SERVEROUTPUT ON;
SET AUTOPRINT ON;
SET TIMING ON;
/*==========================--
Alter Users Password
--==========================*/
--SHOW user;
-- *Change pass... | true |
17f96a03b83172aa7de08870ff9d8f73c90bb25a | SQL | heerman7737/Bambazon | /bamazon.sql | UTF-8 | 1,414 | 3.234375 | 3 | [] | no_license | DROP DATABASE IF EXISTS Bamazon;
CREATE DATABASE Bamazon;
USE Bamazon;
-- Create a table called 'products' which will contain the store inventory --
CREATE TABLE products (
item_id INTEGER(11) AUTO_INCREMENT NOT NULL,
product_name VARCHAR(30) NOT NULL,
department_name VARCHAR(30) NOT NULL,
price DECIMAL(10,2) NOT ... | true |
8cabc0f32244d5e7e522e623bdcc261f2f5b6523 | SQL | ecomerciar/Prestashop-Enviopack | /install/install.sql | UTF-8 | 1,947 | 3.390625 | 3 | [] | no_license | /* Relaciona el ID local del carrier con el ID remoto */
CREATE TABLE IF NOT EXISTS `PREFIX_enviopack_carrier` (
`id_carrier` INT NOT NULL AUTO_INCREMENT,
`id_local_carrier` INT NOT NULL,
`id_remote_carrier` VARCHAR(100) NOT NULL,
`has_relaypoint` TINYINT,
`description` VARCHAR(200) NOT NULL,
`service_type`... | true |
04ac537067621a1e6d6f1992d28ac864c21b4d8e | SQL | Atelierex/QuestionsAPI | /scripts/schema.sql | UTF-8 | 2,472 | 3.984375 | 4 | [] | no_license | DROP DATABASE IF EXISTS questions;
CREATE DATABASE questions;
USE questions;
CREATE TABLE product (
/* Describe your table here.*/
id INT NOT NULL AUTO_INCREMENT,
name VARCHAR (50) NOT NULL,
PRIMARY KEY (id)
);
/* Create other tables and define schemas for them here! */
CREATE TABLE question (
id INT NOT ... | true |
6495cd367442e07d83c761433c778282883933f3 | SQL | appsmambo/base-aerea | /docs/base.sql | UTF-8 | 117,994 | 2.8125 | 3 | [
"MIT"
] | permissive | -- phpMyAdmin SQL Dump
-- version 4.2.11
-- http://www.phpmyadmin.net
--
-- Servidor: 127.0.0.1
-- Tiempo de generación: 13-11-2015 a las 22:52:15
-- Versión del servidor: 5.6.21
-- Versión de PHP: 5.6.3
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARAC... | true |
a43db072609c6a12680e67f604a3dce8d89167ec | SQL | karroni/Roforbund | /databaseSkript/lagdatabasen.sql | UTF-8 | 4,468 | 3.609375 | 4 | [] | no_license |
# Dette trenger kun å kjøre om dere ikke har en schema (en database partisjon.)
#lager databasen om den ikke finnes. navnet er bare tilfeldig.
CREATE DATABASE if not EXISTS otra;
# hei
#denne må dere kjøre for at skript filen skal skjønne at
# <otra> er databasen dere vil lage tables og inserte data i.
USE otra;
... | true |
092b94c2979f77bc1f93b585ebad7e9ebf7a7eb5 | SQL | shevelevandrey/com.gb.database.base_cource | /query/geodata.sql | UTF-8 | 525 | 3.515625 | 4 | [] | no_license | # 1. Сделать запрос, в котором мы выберем все данные о городе – регион, страна.
select ctr.title, reg.title, cit.title
from geodata._cities cit
left join geodata._regions reg on cit.region_id = reg.id
left join geodata._countries ctr on reg.country_id = ctr.id;
# 2. Выбрать все города из Московской области.
select r... | true |
53b019efa2d1ce788f9caeedb222ed37442f0311 | SQL | PierreAndreis/yulp | /prisma/migrations/20210426052701_init/migration.sql | UTF-8 | 1,847 | 4.125 | 4 | [
"MIT"
] | permissive | -- CreateEnum
CREATE TYPE "Role" AS ENUM ('ADMIN', 'OWNER', 'USER');
-- CreateTable
CREATE TABLE "Users" (
"id" TEXT NOT NULL,
"email" TEXT NOT NULL,
"name" TEXT NOT NULL,
"password" TEXT NOT NULL,
"created_at" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
"role" "Role" NOT NULL DEFAULT E'US... | true |
7b190c4c25588acf5ed4f0d4cdc75d903fc06b61 | SQL | iceramqq/biz_506_2020_07_DBMS | /오라클/성적처리(2020-07-15-STUDENT-SCORE).sql | UTF-8 | 2,842 | 4.71875 | 5 | [] | no_license | -- 여기는 grade 화면
-----------------------------------
-- 성적일람표 출력
-----------------------------------
-- 성적정보 Table(tbl_score)에는 학번과 각 과목별 점수가 저장되어 있다.
-- 학생정보 Table(tbl_student)에는 학번과 이름등이 저장되어 있다.
-- 성적일람표를 보고 싶은데, 학생의 학번과 이름이 포함된 리스트를 보고싶다.
-- 두개 Table, tbl_score, tbl_student을 연동하여 리스트를 조회해야 한다.
-- 이러한 기법을 JOIN 이라고 ... | true |
f9cf7422fb866419cfdf6d8da3fc2150f3191446 | SQL | geijutsuka/MIS531 | /Chapter3-Appendix.sql | UTF-8 | 11,154 | 3.375 | 3 | [] | no_license | drop table AREAS CASCADE CONSTRAINTS;
drop table AREA_ZIP CASCADE CONSTRAINTS;
drop table BRANCHES CASCADE CONSTRAINTS;
drop table MAIN_BRANCHES CASCADE CONSTRAINTS;
drop table CAN_SERVICE_AREA CASCADE CONSTRAINTS;
drop table CAN_SERVICE_CLIENT CASCADE CONSTRAINTS;
drop table CLIENT_SITES CASCADE CONSTRAINTS;
drop tabl... | true |
9c56b8270bb00cf4c6b3d70bcbdd64cac4a5f217 | SQL | janelchumley/Superstore_Orders_Query_Interface | /final_project/extend_database.sql | UTF-8 | 1,154 | 4.3125 | 4 | [] | no_license | --creating a table of products that are calculators or keyboards; exclude 'Acco' due to unicode error
drop table if exists Calculators_Keyboards;
create table Calculators_Keyboards AS select p.product_id, p.product_name, psc.product_subcategory_name
from products p INNER JOIN product_subcategory psc ON
p.product_subcat... | true |
702e368bf8ed3a0999b87f753ccc0653c864a809 | SQL | varshantdhar/Databases-SQL-Java- | /hws/hw2/answers/3.sql | UTF-8 | 85 | 2.640625 | 3 | [] | no_license | select c_id, count(g_id) as cnt from gamecat group by c_id having count(g_id) >= 15;
| true |
bff66e0cac62fedf5fc2539b22a3c0c7e11ce7ec | SQL | eigilhs/thesis-experiments | /src/postgres/queries/base/query1.sql | UTF-8 | 411 | 4.09375 | 4 | [] | no_license | SELECT
name,
avg(outcome::int) AS rate,
count(*) AS total
FROM events
JOIN qualifiers ON events.id = qualifiers.event_id
JOIN players ON player_id = players.id
JOIN matches ON match_id = matches.id
AND competition_id = 90
AND season_id = 2016
WHERE type_id = 1 AND qualifier_id = 1
GR... | true |
c7c8df5991f3b334e2d8dee1b8e45226837fe23b | SQL | ahmadtechcampus2/ahmad4 | /برنامج الامين المحاسبي/Bin/System/prcGetRoleChildRoles.sql | UTF-8 | 640 | 3.921875 | 4 | [] | no_license | #########################################################
CREATE PROC prcGetRoleChildRoles
@roleGUID [UNIQUEIDENTIFIER]
AS
SELECT * FROM [fnGetRoleChildRoles](@roleGUID)
#########################################################
CREATE PROC prcGetUserGroups
@UserGUID UNIQUEIDENTIFIER,
@GroupGUID UNIQUEIDENTIFIER
AS... | true |
8d6a4bc767db11cc8cc1319d7722451ce6195d09 | SQL | konosp/adobe-clickstream-dbt | /models/segmentation/top_pages_by_segment.sql | UTF-8 | 2,167 | 4.5625 | 5 | [] | no_license | WITH home_page_data AS (
SELECT
ROW_NUMBER() OVER(ORDER BY count(t1.post_page_url) DESC) as order_d
, t1.post_page_url
, t1.{{ var('url_path') }}
, count(t1.post_page_url) as page_views
FROM
{{ ref('clickstream_clean') }} AS t1
INNER JOIN
{{ ref('seg_visit_ho... | true |
b6be124813c4c9a4ebbccb7bff50df551f670c4e | SQL | nelmsal/assignment-02-postgis-analytics | /query10.sql | UTF-8 | 1,156 | 4 | 4 | [] | no_license | /*
You're tasked with giving more contextual information to rail stops
to fill the `stop_desc` field in a GTFS feed. Using any of the data sets above,
PostGIS functions (e.g., `ST_Distance`, `ST_Azimuth`, etc.), and PostgreSQL string functions,
build a description (alias as `stop_desc`) for each stop.
Feel fre... | true |
0990f353e9159215d9376b1c7acbd8db7d8bb818 | SQL | lxorc/TitanDataOperationSystem | /代码/hive建表语句/hiveSql/dws/dws_apl_itv_agu.sql | UTF-8 | 636 | 2.75 | 3 | [] | no_license | use titan;
DROP TABLE IF EXISTS dws_apl_uca_rec;
CREATE TABLE dws_apl_uca_rec(
guid string COMMENT '用户全局标识',
version string COMMENT '应用版本',
channel string COMMENT '发售渠道',
firstLoginDate string COMMENT '首次登录日期',
startDate string COMMENT '活跃区间起始',
endDate string COMMENT '活跃区间结束'
) COMMENT '连续活跃区间记... | true |
de1d06c585ce49baee77ae7935a7ef373dc4c3f7 | SQL | wellsofthewest/sql | /processing/SQL/PL_SQL/Maintain_And_Post/SDO_Metadata.sql | UTF-8 | 1,596 | 3.65625 | 4 | [] | no_license | /*
============================
Database restore using IMPDP
http://ss64.com/ora/impdp.html
============================
*/
--1. Insert entry into the USER_SDO_GEOM_METDATA view
/*
VALUES REQUIRED:
----------------
TABLENAME
SPATIALCOLUMN
SRID
*/
INSERT
INTO USER_SDO_GEOM_METDATA
VALUES
(
'<TABLENAME>',
... | true |
75d381c554d0a2ccef6f3793028b0219c739ed00 | SQL | jacoor/sew | /configs/tables.sql | UTF-8 | 6,668 | 3.5625 | 4 | [] | no_license | # ************************************************************
# Sequel Pro SQL dump
# Version 4096
#
# http://www.sequelpro.com/
# http://code.google.com/p/sequel-pro/
#
# Host: 127.0.0.1 (MySQL 5.6.21)
# Database: sew
# Generation Time: 2014-11-28 18:13:36 +0000
# *****************************************************... | true |
da5f31bfad34b92f4ba67c492dad5447d0b09a94 | SQL | Igor-Kazak/DI_Bootcamp | /Week6/Day2/exerciseXPGold2.sql | UTF-8 | 1,031 | 4.03125 | 4 | [] | no_license | --1
UPDATE students
SET birth_date = '1998-11-02'
WHERE last_name = 'Benichou'
RETURNING *;
--2
UPDATE students
SET last_name = 'Guez'
WHERE first_name = 'David'
RETURNING *;
--1
DELETE FROM students
WHERE first_name = 'Lea' AND last_name = 'Benichou'
RETURNING *;
--1
SELECT COUNT(first_name)
FROM students;
--2
SEL... | true |
ec7e124fd0d659f6fd97c3c9971b1a2da62dca55 | SQL | glf134/ruoyi | /routerMenu.sql | UTF-8 | 1,784 | 2.65625 | 3 | [] | no_license | -- 菜单 SQL
insert into sys_menu (menu_name, parent_id, order_num, url, menu_type, visible, perms, icon, create_by, create_time, update_by, update_time, remark)
values('路由器', '2000', '1', '/datasync/router', 'C', '0', 'datasync:router:view', '#', 'admin', sysdate(), '', null, '路由器菜单');
-- 按钮父菜单ID
SELECT @parentId := LAS... | true |
a55ea14af93625d0108f5a88299d5fd48ab5d45d | SQL | BIFWIG/eshop | /建表语句/WMS中心.sql | UTF-8 | 15,055 | 3.390625 | 3 | [] | no_license | /*==============================================================*/
/* DBMS name: MySQL 5.0 */
/* Created on: 2018/2/23 9:55:34 */
/*==============================================================*/
drop table if exists wms_goods_allocation;
drop t... | true |
006961d53a3a6c3b3f823baafe99a93b2dbf3aed | SQL | cphdat2sem2017-B/Week10-Test | /TestingDB/cupcakeshop.sql | UTF-8 | 7,405 | 3.3125 | 3 | [] | no_license | -- MySQL dump 10.13 Distrib 5.7.12, for Win64 (x86_64)
--
-- Host: localhost Database: cupcakeshop
-- ------------------------------------------------------
-- Server version 5.6.26-log
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS... | true |
c81796183383a36561a435f13cc9ec392f2f2194 | SQL | DimitrisKandylis/Vacation-Portal | /Database Dump/vacation_portal_db_dump.sql | UTF-8 | 3,141 | 3.53125 | 4 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Sep 09, 2020 at 09:14 AM
-- Server version: 10.4.11-MariaDB
-- PHP Version: 7.4.6
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIEN... | true |
34e7e3b639dacaa21b420805ddcefe7428a2f432 | SQL | erptestteam/ERP2_0_test | /db_T_V_SP_F_T_E/f_get_component_used_storage.sql | UTF-8 | 721 | 3.671875 | 4 | [] | no_license | DELIMITER $$
USE `erp`$$
DROP FUNCTION IF EXISTS `f_get_component_used_storage`$$
CREATE DEFINER=`root`@`%` FUNCTION `f_get_component_used_storage`(_useExpand INT,comp_id VARCHAR(255)) RETURNS INT(11)
BEGIN
DECLARE total INT;
IF comp_id IS NOT NULL THEN
IF _useExpand = 0 THEN
SET total = ... | true |
f0fa508f0900c85b91c039e502a347fc67545827 | SQL | sbDevelopments/coyote2 | /module/install/data.sql | UTF-8 | 13,502 | 2.671875 | 3 | [] | no_license | SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
TRUNCATE `adm_menu`;
ALTER TABLE `adm_menu` AUTO_INCREMENT = 1;
INSERT INTO `adm_menu` (`menu_id`, `menu_parent`, `menu_text`, `menu_auth`, `menu_controller`, `menu_action`, `menu_order`) VALUES
(1, 0, 'Strony', 'a_', 'page', 'main', 1),
(2, 1, 'Raport', 'a_', 'report', 'main', 1... | true |
3312012937c1feecc2a7314775877d84fcf94fce | SQL | carlosSploit/trabajofim | /bd/tiendavirtual (11).sql | UTF-8 | 47,651 | 3.578125 | 4 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 5.0.3
-- https://www.phpmyadmin.net/
--
-- Servidor: 127.0.0.1
-- Tiempo de generación: 23-11-2020 a las 01:30:21
-- Versión del servidor: 10.4.14-MariaDB
-- Versión de PHP: 7.4.11
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD... | true |
e84790927436a26130dd42ce91390fed2d893da2 | SQL | ashugandhi/Business-Analytics-Nanodegree | /2. Intro to SQL/Lesson 3- SQL Aggregations/122-case-q4-group_by-top-spending-customers-between-2016-and-2017.sql | UTF-8 | 2,279 | 4.375 | 4 | [] | no_license | /* INCOMPLETE / DOUBT
Udacity's certified program > Business Analytics Nanodegree
SQL practice > Lesson 3 : SQL Aggregations
We would like to understand 3 different levels of customers based on the amount
associated with their purchases. The top level includes anyone with a Lifetime
Value (total sales of all orders) g... | true |
4261d509a835bc287b5b812278abc70ba1058583 | SQL | JEonjinwon/Oracle | /0216.sql | UTF-8 | 2,498 | 3.59375 | 4 | [] | no_license | SELECT A.DEP_NAME
FROM MEMBER B, DEPARTMENT A
WHERE A.DEP_NO = B.DEP_NO
AND B.MEM_ID='1911005'
;
SELECT
A.PAY_EXCPECT,
B.SFUND_VALUE,
A.PAY_CHECK,
A.PAY_DIVISION
FROM PAY_TUITION A, SCHAR_FUND B
WHERE A.MEM_ID = #{memId}
AND A.PAY_NUMBER ='1'
AND B.SFUND_STUDENT =A.MEM_ID
AND A.SMST = ... | true |
a432629b35941e449a03ae27434d176dbe4ea862 | SQL | mallett002/postgresql-learnings | /movie_data_db/null_vals.sql | UTF-8 | 482 | 3.546875 | 4 | [] | no_license | -- Dealing with NULL values
/*
SELECT * FROM tablename
WHERE columname IS NULL;
SELECT * FROM tablename
WHERE columnname IS NOT NULL;
*/
SELECT * FROM actors
WHERE date_of_birth IS NULL;
SELECT * FROM actors
WHERE date_of_birth IS NOT NULL;
-- Get highest takings (remove null vals) ordered from highest to lowest:
S... | true |
00df57c1beec3cb6678e776c00a02e0481c73b77 | SQL | parryjos1/sei35-homework | /hasan-aliyev/w4/d4/databases/animals-sql-site/animals.sql | UTF-8 | 1,185 | 3.125 | 3 | [] | no_license | DROP TABLE IF EXISTS animals; -- nuke the table! start again
CREATE TABLE animals (
id INTEGER PRIMARY KEY AUTOINCREMENT, -- take care of IDs for us
name TEXT,
species TEXT,
description TEXT,
roundness INTEGER,
alive BOOLEAN,
age INTEGER,
image_url TEXT
);
INSERT INTO animals ( name, species, descrip... | true |
d2386287e9a87fdc009d2c9f130fb5481e008e42 | SQL | Squalalah/projetphp | /database.sql | UTF-8 | 7,324 | 3.234375 | 3 | [] | no_license | -- noinspection SqlNoDataSourceInspectionForFile
-- noinspection SqlDialectInspectionForFile
-- phpMyAdmin SQL Dump
-- version 5.1.1
-- https://www.phpmyadmin.net/
--
-- Hôte : localhost:8889
-- Généré le : mar. 22 juin 2021 à 09:17
-- Version du serveur : 5.7.32
-- Version de PHP : 8.0.0
SET SQL_MODE = "NO_AUTO_VAL... | true |
4770fca57daf537e8ed7d840ba7ff23c7dba3bb9 | SQL | Garafutdinov102/sql_lessons | /lesson_2_homework.sql | UTF-8 | 1,848 | 3.1875 | 3 | [] | no_license | --схема БД: https://docs.google.com/document/d/1NVORWgdwlKepKq_b8SPRaSpraltxoMg2SIusTEN6mEQ/edit?usp=sharing
--colab/jupyter: https://colab.research.google.com/drive/1j4XdGIU__NYPVpv74vQa9HUOAkxsgUez?usp=sharing
-- Задание 1: Вывести name, class по кораблям, выпущенным после 1920
--
-- Задание 2: Вывести name, class ... | true |
7297d556637fcd25457e6c16deca4f496f5865c3 | SQL | liuqx0717/archives | /online-survey-website/sql/aborted.sql | UTF-8 | 294 | 3.609375 | 4 | [] | no_license | --create view ipgroup as
--select ip as ip,count(*) as c from answers where dateend is null group by ip;
--go
select count(*) from ipgroup inner join requests on ipgroup.ip=requests.ip where
cnt>c and
ipgroup.ip not in (select ip from answers where dateend is not null);
| true |
95326d156035e5a52b251e4f6ab3eddb25bfbbd8 | SQL | tigerrepo/corporate_admin | /tiger_admin/mysql/corporate.sql | UTF-8 | 8,299 | 3.28125 | 3 | [] | no_license | -- MySQL dump 10.13 Distrib 5.5.45, for Linux (x86_64)
--
-- Host: localhost Database: corporate
-- ------------------------------------------------------
-- Server version 5.5.45
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/... | true |
aac4f62f000c7d0895ffadea73c1d0f3f08cb479 | SQL | kxjl168/an | /video2.sql | UTF-8 | 28,664 | 2.90625 | 3 | [] | no_license | /*
Navicat MySQL Data Transfer
Source Server : 192.168.100.126-kaifa-test
Source Server Version : 50726
Source Host : 192.168.100.126:3306
Source Database : video
Target Server Type : MYSQL
Target Server Version : 50726
File Encoding : 65001
Date: 2019-07-19 17:04:53
*/
SET FOREIG... | true |
ad1e603b518e931ad8046370764ca823b2eb00cb | SQL | Talador12/cause-effect | /Documentation/MiscDocumentation/MySQLtest.sql | UTF-8 | 4,287 | 3.796875 | 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 SCHEMA IF NOT EXISTS `mydb` DEFAULT CHARACTER SET latin1 COLLATE latin1_swedish_ci ;
USE `mydb` ;
-- -------... | true |
89acd1100d2294aa5569d0cebdae41fb99b42c8a | SQL | hany7u/tempsql | /修订以前的运输单1.sql | UTF-8 | 968 | 3.203125 | 3 | [] | no_license | select b.cdelivbill_bid, b.cdelivbill_hid, orgs.name 物流组织,
h.vbillcode 运输单号,
b.dbilldate 运输单日期,
b.vbdef10 应收运费,
b.vbdef17 本币运费,
b.vbdef18 "原币运费/应付平台运费",
b.vbdef12 应付司机运费,
b.vbdef15 里程数,b.vbdef11,
b.vbdef19 汇率
from dm_delivbill_b b
left joi... | true |
d6a2d36eecf1193a03c5fa4908502fa65ba50173 | SQL | eliblurr/full-stack-app-skeleton | /db/data.sql | UTF-8 | 3,144 | 2.828125 | 3 | [] | no_license | --
-- PostgreSQL database dump
--
-- Dumped from database version 9.6.10
-- Dumped by pg_dump version 9.6.10
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', '',... | true |
4c82c5540c483d513259fcdf992a6ee5891a4ebe | SQL | nicolaskennof/12-Bamazon | /bamazon.sql | UTF-8 | 1,794 | 3.5625 | 4 | [] | no_license | -- Drops the bamazon if it exists currently --
DROP DATABASE IF EXISTS bamazon;
-- Creates the "bamazon" database --
CREATE DATABASE bamazon;
-- Makes it so all of the following code will affect bamazon --
USE bamazon;
-- Creates the table "products" within bamazon database --
CREATE TABLE products (
item_id INTEG... | true |
2f90a7ddb08c9c1bb08b4bec83a978f47d1459d4 | SQL | amardipnaik/ontology | /ontology-Demo.sql | UTF-8 | 1,890 | 3.125 | 3 | [] | no_license | /*
SQLyog Community v12.4.0 (64 bit)
MySQL - 5.6.26-log : Database - libarary-management
*********************************************************************
*/
/*!40101 SET NAMES utf8 */;
/*!40101 SET SQL_MODE=''*/;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_... | true |
a7033375497f693e56c609382a191497ced01ce1 | SQL | VladNazarov/BellIntegratorPractice | /src/main/resources/schema.sql | UTF-8 | 5,298 | 3.75 | 4 | [] | no_license | CREATE TABLE IF NOT EXISTS country
(
id INTEGER COMMENT 'Уникальный идентификатор' PRIMARY KEY AUTO_INCREMENT ,
version INTEGER NOT NULL COMMENT 'Служебное поле Hibernate',
code INTEGER NOT NULL COMMENT 'Код страны',
name VARCHAR(70) NOT NULL COMMENT 'Название страны'
);
... | true |
5b6feb03495e4fe2a975ffd057113f20ac9dbafa | SQL | jigar288/CloudVOD | /sql-code/table-schemas/VideoTableSchemaV4.sql | UTF-8 | 597 | 3.5 | 4 | [] | no_license | CREATE EXTENSION IF NOT EXISTS "uuid-ossp";
DROP TABLE IF EXISTS video;
CREATE TABLE video(
id SERIAL PRIMARY KEY,
title VARCHAR (100) NOT NULL,
description VARCHAR (5000),
streaming_url VARCHAR (160) UNIQUE,
output_asset_name UUID UNIQUE NOT NULL,
upload_date DATE NOT NULL DEFAULT CURRENT_DATE... | true |
8806e265a599714d8614d175969802e768cc795b | SQL | stefanMinch3v/SoftUni | /T-SQL-DbBasics2016-2017/8.Functions, Triggers, Transactions and Procedures/27.DisplayAll-ItemsAboutForbiddenGameType.sql | UTF-8 | 254 | 4.125 | 4 | [] | no_license | SELECT i.Name AS [Item],
i.Price,
i.MinLevel,
gt.Name AS [Forbidden Game Type]
FROM Items AS i
LEFT JOIN GameTypeForbiddenItems AS gtfi
ON i.Id = gtfi.ItemId
LEFT JOIN GameTypes AS gt
ON gtfi.GameTypeId = gt.Id
ORDER BY gt.Name DESC, i.Name | true |
d59687dbb2cdd488f5b36976807942c295a42a97 | SQL | paulalcabasa/Oracle-SQL-Files | /AP/AP - PO Query.sql | UTF-8 | 3,724 | 3.53125 | 4 | [] | no_license | select
aila.PO_LINE_ID,
xah.period_name,
aia.invoice_num,
aia.doc_sequence_value voucher_no,
gjh.je_source,
xah.je_category_name,
to_char(gjh.doc_sequence_value) gl_voucher_no,
-- gjl.je_line_num,
to_char(g... | true |
9f55a41751031764510523729e88adab13efd561 | SQL | hyperturing/SQLZoo | /SQLZoo/2_select_from_nobel.sql | UTF-8 | 1,322 | 4.125 | 4 | [] | no_license | /* Exercises at https://sqlzoo.net/wiki/SELECT_from_Nobel_Tutorial */
/* 2 - SELECT Nobel Tutorial */
SELECT yr, subject, winner FROM nobel
WHERE yr = 1950;
SELECT winner FROM nobel
WHERE yr = 1962 AND subject = 'Literature';
SELECT yr, subject FROM nobel
WHERE winner = 'Albert Einstein';
SELECT winner F... | true |
e095fdfb9d0d50b34812943fe9b3a9d015907813 | SQL | Zeata/Zenbot | /bot/data/db/build.sql | UTF-8 | 366 | 2.890625 | 3 | [] | no_license | CREATE TABLE IF NOT EXISTS exp (
UserID INTEGER PRIMARY KEY,
XP INTEGER DEFAULT 0,
Level INTEGER DEFAULT 0,
XPLock TEXT DEFAULT CURRENT_TIMESTAMP
);
CREATE TABLE IF NOT EXISTS guilds (
GuildID integer PRIMARY KEY,
Prefix text DEFAULT "!zb"
);
CREATE TABLE IF NOT EXISTS quotes (
QuouteID INTEGER ... | true |
75b11967d93fa16e7484990ad796b55ee224af20 | SQL | lazydeveloperprabir/LeetCode-Sol-Res | /src/main/java/com/freetymekiyan/database/medium/FriendRequests2.sql | UTF-8 | 1,685 | 4.46875 | 4 | [
"MIT"
] | permissive | /*
* 602. Friend Requests II: Who Has the Most Friends
* In social network like Facebook or Twitter, people send friend requests and accept others' requests as well.
*
* Table request_accepted holds the data of friend acceptance, while requester_id and accepter_id both are the id of a person.
* | requester_id | a... | true |
93726a55ef7d6c64a68d6a8b8cbf1d74c08f63db | SQL | Varad-VK/SuperMart-Online-Grocery-Shop | /database/supermart.sql | UTF-8 | 6,979 | 3.125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 5.1.0
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Jun 28, 2021 at 10:06 AM
-- Server version: 10.4.18-MariaDB
-- PHP Version: 8.0.3
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIEN... | true |
509a0ec6c2f1300d0139abc9a63b1b52716ead88 | SQL | sanei-dengyo-jyoho/SQL-Server | /リース物件数レポート_Q.sql | UTF-8 | 7,193 | 3.4375 | 3 | [] | no_license | with
x0 as
(
select
[コンピュータ分類№]
, コンピュータ分類
, [コンピュータタイプ№]
, コンピュータタイプ
, [機器名№]
, 機器名
, メーカ名
, 機器の停止
, 保守
, 資産
, 種類の停止
from
コンピュータ機器一覧_Q as x00
where
( [コンピュータ分類№] >= 0 )
and ( [コンピュータタイプ№] >= 0 )
and ( [機器名№] >= 0 )
)
,
q0 as
(
select
[コンピュータ管理№]
, min(ネットワーク数) as ネットワーク数
from
コンピュータ異動_T as q00
group by
[... | true |
39f2ed52e16f78dd40fdad981234bc1499e7ecf6 | SQL | jkstill/oracle-script-lib | /sql/index-col-use-ratios.sql | UTF-8 | 2,308 | 4.40625 | 4 | [
"MIT",
"LicenseRef-scancode-proprietary-license"
] | permissive | -- index-col-use-ratios.sql
-- Jared Still jkstill@gmail.com
-- 2016-12-07
set linesize 200 trimspool on
set pagesize 60
col table_name format a30
col index_name format a30
col column_name format a20
col tab_column_count format 9999 head 'TAB|COL|COUNT'
col ind_column_count_unq format 9999 head 'IND|COL|COUNT|UNIQ'... | true |
22975f4f99777186bfda101fc206e50f98992c18 | SQL | amityazdan/BlueRibbon | /src/main/resources/data.sql | UTF-8 | 817 | 3.4375 | 3 | [] | no_license | DROP ALL OBJECTS;
CREATE TABLE ticket
(
id INT AUTO_INCREMENT PRIMARY KEY,
available boolean
);
CREATE TABLE destination
(
id INT AUTO_INCREMENT PRIMARY KEY,
name VARCHAR(250) NOT NULL
);
CREATE TABLE baggage
(
id INT AUTO_INCREMENT PRIMARY KEY,
baggage_id VARCHAR(250) NOT NULL,
c... | true |
674f99cab0cd61b7cd6bc9037c131e8a081e8963 | SQL | kirtigupta13/ContinousFramework | /sql/schema/admins.sql | UTF-8 | 668 | 3.203125 | 3 | [] | no_license | DROP TABLE IF EXISTS admins CASCADE;
CREATE TABLE admins (
user_id character varying(8) NOT NULL,
first_name character varying(300),
last_name character varying(300),
email_id character varying(200),
role character varying(60),
auth_level integer,
isdeleted boolean DEFAULT false NOT NULL,
... | true |
5a60a9667acc32ded907b261487a8db3f2352f32 | SQL | emanuelanechei/Oracle-Email-Reports | /sql/assembly-Assembly_Jobs.sql | UTF-8 | 1,562 | 3.3125 | 3 | [] | no_license | select project_number "Project"
, wip_entity_name "Job"
, msi.segment1 "Item"
, substr(msi.description,0,20) "Description"
, status_type_disp "Status"
, wdj.attribute1 ||'.'|| wdj.attribute2 ||'.'|| wdj.attribute3 DFF
, line_code "Line"
, start_quantity "Start QTY"
, to_number(quantity_remaining) "Open QTY"
, ... | true |
04f54ef12b6319567976cb0c786b0fc5b32aa9e9 | SQL | divya-varshini-arumugam/product-app | /practice 1.sql | UTF-8 | 314 | 2.515625 | 3 | [] | no_license | drop table product;
create table product_2592(id number,name varchar(200),expiry_date date);
insert into product_2592 values(1,'Pen',DATE '2023-01-01');
insert into product_2592 values(2,'Pencil',DATE '2023-01-01');
insert into product_2592 values(3,'Milk',DATE '2023-01-01');
commit;
select * from product_2592;
| true |
b013a31398ca3fa07d1278a4342078ae1e9f8648 | SQL | thebravoman/elsys-db-practices | /exam2016/exam20160218/b/Kaloyan_Nikov_B_19/inserts.sql | UTF-8 | 1,517 | 2.8125 | 3 | [] | no_license |
#Inserting into table Category
INSERT INTO Category
(description,created_by)
VALUES
('Az naistina prodavam liutenica','PRODAVAM LIUTENICA'),
('Az naistina prodavam liutenica','PRODAVAM LIUTENICA'),
('Az naistina prodavam liutenica','PRODAVAM LIUTENICA'),
('Az naistina prodavam liutenica','PRODAVAM LIUTENICA'),
(... | true |
b6113a1e043152d6caec31f637751f9e2fc208b9 | SQL | gladiopeace/digital-data-syn | /documents/oms/TB_SERCA.sql | UTF-8 | 1,794 | 3.28125 | 3 | [] | no_license | /*
================================================================================
表结构代码:TB_SERCA
表结构名称:解决方式表
表结构目的:局部表
================================================================================
*/
drop sequence SEQ_TB_SERCA;
drop index AK_TB_SERCA;
drop table TB_SERCA;
create table TB_SERCA (
SERCA_ID ... | true |
13cadb3489f124afb5abad7b2264feaacdf1d4e1 | SQL | LeandroSilvaPaiva/Exercicios_MySQL | /Ecommerce.sql | UTF-8 | 861 | 3.015625 | 3 | [] | no_license | create database db_rh;
use db_rh;
create table if not exists tb_produto (
id int primary key auto_increment,
nome varchar(100),
cor varchar(45),
tipo varchar(45),
tamanho varchar(45),
valor double (10,2)
);
insert into tb_produto (nome, cor, tipo, tamanho, valor) values
("Nike", "Branco", "Tênis", "40", 500.00),
("N... | true |
7dcb50a0dbc6ee36c2323337ebc7b6178d069cb3 | SQL | ysegura/RestServices | /src/main/resources/db/migration/commons/V0_1__Model_Creation.sql | UTF-8 | 2,296 | 3.984375 | 4 | [] | no_license | #Definición de la base de datos
use restservice;
#Eliminación de las tablas
drop table if exists style;
drop table if exists song;
drop table if exists album;
drop table if exists artist;
drop table if exists user_access_level;
drop table if exists user;
drop table if exists access_level;
#Creación de las tablas
CREA... | true |
c5605ea91d370dcba5725c09a20623a242bd2116 | SQL | miyl/Lufthavn | /design/lufthavn.sql | UTF-8 | 3,626 | 3.46875 | 3 | [] | no_license | DROP DATABASE IF EXISTS lufthavn;
CREATE DATABASE lufthavn;
USE lufthavn;
CREATE TABLE Standpladser (
standplads_id int(10) NOT NULL AUTO_INCREMENT,
terminal_id int(10) NOT NULL,
PRIMARY KEY (standplads_id));
CREATE TABLE Terminaler (
terminal_id int(10) NOT NULL AUTO_INCREMENT,
PRIMARY KEY (te... | true |
f142d1ad2df1b2916851bec4bc1d592ead53adff | SQL | jodiehoh/databases | /public_html/gender_distribution.sql | UTF-8 | 610 | 3.984375 | 4 | [] | no_license | /* 11. Which countries in Asia had more females than males in a given time frame?
List the year and the female and male population. Do not include years past 2021. */
DELIMITER //
DROP PROCEDURE IF EXISTS GenderDistribution //
CREATE PROCEDURE GenderDistribution(IN conti VARCHAR(255), year INT)
BEGIN
SELEC... | true |
1f0ef8a43a4b20390967ba711a1a82fabb8bf98b | SQL | derrabus/slb2019-workshop | /scripts/schema.sqlite.sql | UTF-8 | 3,001 | 3.515625 | 4 | [] | no_license | CREATE TABLE user
(
id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL,
username VARCHAR(50) UNIQUE NOT NULL,
password VARCHAR(32) DEFAULT NULL,
password_salt VARCHAR(32) DEFAULT NULL,
full_name VARCHAR(150) NOT NULL,
locale VARCHAR(... | true |
80db14216750cb54169155eac88480ac284d8b5d | SQL | uvalib/booktraces-public | /backend/db/migrations/000004_convert_event_string_to_date.up.sql | UTF-8 | 589 | 3.03125 | 3 | [] | no_license | START TRANSACTION;
update events set event_date='April 6, 2017' where event_date='April 6-7, 2017';
update events set event_date='November 10, 2016' where event_date='November 10-11, 2016';
update events set event_date='February 4, 2016' where event_date='February 4-5, 2016';
update events set event_date='February 4, ... | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.