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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
a66fc5f91d7f8e2975402800f71b435435b1a694 | SQL | Chewbacca96/Moto_project | /motodb.sql | UTF-8 | 3,156 | 3.5 | 4 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.6.4
-- https://www.phpmyadmin.net/
--
-- Хост: localhost
-- Время создания: Ноя 10 2016 г., 08:04
-- Версия сервера: 5.5.53
-- Версия PHP: 5.6.27
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!... | true |
bd4623c0b67cd2d125e4799161fd15ab0b85df15 | SQL | shekharpuneet/ang-exp-mysql | /db/db_scripts.sql | UTF-8 | 590 | 3.109375 | 3 | [] | no_license | SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
CREATE SCHEMA `angwebapp` ;
CREATE TABLE IF NOT EXISTS `USERS` (
`USER_ID` INT(11) NOT NULL AUTO_INCREMENT,
`FIRST_NAME` VARCHAR(100) NOT NULL,
`MIDDLE_NAME` VARCHAR(100) ,
`LAST_NAME` VARCHAR(100),
`EMAIL` VARCHAR(100) NOT NULL,
PRIMARY KE... | true |
09570fd7782a85571e9285639fc2387f6fc9cc62 | SQL | alanzhang211/classmanager | /classmanager/docs/sql/classmanager.sql | UTF-8 | 10,675 | 2.796875 | 3 | [] | no_license | /*
Navicat MySQL Data Transfer
Source Server : mysql
Source Server Version : 50018
Source Host : localhost:3306
Source Database : classmanager
Target Server Type : MYSQL
Target Server Version : 50018
File Encoding : 65001
Date: 2014-12-21 23:20:00
*/
SET FOREIGN_KEY... | true |
7f652c80d97bcf5a585cbf62f43e1a0cbff8efe4 | SQL | ZiyaaddinYaramis/winter2021sql | /day04_update.sql | ISO-8859-3 | 7,296 | 3.578125 | 4 | [] | no_license | /* ============================== UPDATE SET ===================================
ilk olarak asagidaki gibi tedarikciler adinda bir tablo olusturunun ve
vergi_no sutununu primary key yapiniz.Ayrica asagidaki verileri tabloya giriniz.
vergi_no NUMBER(3),
firma_ismi VARCHAR2(50),
irtibat... | true |
ca36a932b178bf0bdf0392c5a0983d9353de2f90 | SQL | fikriramadani/perpustakaan | /teh-ira-project/perpustakaan.sql | UTF-8 | 2,300 | 3.1875 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.8.5
-- https://www.phpmyadmin.net/
--
-- Host: localhost:3306
-- Generation Time: Jan 20, 2021 at 10:14 AM
-- Server version: 5.7.24
-- PHP Version: 7.2.19
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CH... | true |
8870100cb9999afbe38eed7b0535f0adba6c1a69 | SQL | edgarcobos/ride-share | /sql/updateUser.sql | UTF-8 | 327 | 3.109375 | 3 | [] | no_license | DROP PROCEDURE IF EXISTS updateUser;
DELIMITER //
CREATE PROCEDURE updateUser(IN user_id_in VARCHAR(50), IN first_name_in VARCHAR(50), IN last_name_in VARCHAR(50))
BEGIN
UPDATE users
SET first_name=first_name_in, last_name=last_name_in
WHERE user_id=user_id_in;
SELECT * FROM users WHERE user_id=user_id_in;
END//
DELIM... | true |
3e38bc79558fb36de3c4385c9185a716964ed3c4 | SQL | marcellovleoratti/iosys_desafio | /IOSYS/IOSYS/src/main/resources/db/migration/V001__Tabela_FIlmes.sql | UTF-8 | 523 | 3.140625 | 3 | [] | no_license | create table filmes(
id bigint not null auto_increment,
titulo_filme varchar(70) not null,
genero_filme varchar(90) not null,
duracao decimal(2,2) not null,
atores varchar(88) not null,
diretores_filme varchar(90) not null,
observacoes varchar(255) not null,
usuario_nome varchar(150) not null,
usuario_senha ... | true |
b40e8e4f8b2c16cfc4959edb13c71d6f2e101cd5 | SQL | Macuacua1/ProjectoPW | /db_locacao .sql | UTF-8 | 19,039 | 3.078125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.5.0.2
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Jun 15, 2016 at 02:37 AM
-- Server version: 10.0.17-MariaDB
-- PHP Version: 5.6.14
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_... | true |
1a1d464442d10ca9560acd559d1c8a9f27ba293f | SQL | JeonMinSeoung/adjective | /practice07.txt | UTF-8 | 6,620 | 3.9375 | 4 | [] | no_license | -- Ex 1
CREATE DATABASE college;
use college;
CREATE TABLE student(
student_id integer not null primary key,
name varchar(10) not null,
year tinyint default 1 not null,
dept_no integer not null,
major varchar(20)
);
CREATE TABLE department(
dept_no integer not null primary key auto_increment,
dept_name varchar(2... | true |
cfe81999b476729ce7b185fcaea2c576d57556d8 | SQL | mr-Deviant/chat-2 | /_db/structure.sql | UTF-8 | 710 | 3.59375 | 4 | [] | no_license | CREATE DATABASE IF NOT EXISTS `chat` DEFAULT CHARSET=utf8 DEFAULT COLLATE=utf8_general_ci;
CREATE TABLE IF NOT EXISTS `users` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`username` varchar(255) NOT NULL,
`password` varchar(255) NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `username_uk` (`username`)
) ENGIN... | true |
cdae35126085946fce36170515da716cb6893342 | SQL | nlowe31/camagru | /config/setup.sql | UTF-8 | 2,313 | 3.625 | 4 | [] | no_license | CREATE DATABASE IF NOT EXISTS camagru;
USE camagru;
CREATE TABLE IF NOT EXISTS users (
`uid` int(11) PRIMARY KEY AUTO_INCREMENT NOT NULL,
`username` varchar(255) UNIQUE COLLATE utf8_unicode_ci NOT NULL,
`email` varchar(255) UNIQUE COLLATE utf8_unicode_ci NOT NULL,
`firstName` varchar(255) COLLATE ... | true |
9c9e5375bc2df2815f4ec13954a3ab0ba4b44382 | SQL | lowleveldesign/debug-recipes | /databases/mssqlserver/find-top20-inefficient-queries/Duration.sql | UTF-8 | 1,164 | 3.859375 | 4 | [
"MIT"
] | permissive | ;with long_queries as
(
select top 20
query_hash,
sum(total_elapsed_time) elapsed_time
from sys.dm_exec_query_stats
where query_hash <> 0x0
group by query_hash
order by sum(total_elapsed_time) desc
)
select @@servername as server_name,
db_name(st.dbid) as database_name,
ob... | true |
87751a45438795865e52ef1bbf15df335dbb4922 | SQL | Bebyno/Progmatic | /Module3/DataBase/Blog.sql | UTF-8 | 3,196 | 4.375 | 4 | [] | no_license | DROP DATABASE IF EXISTS Blog;
CREATE DATABASE Blog;
USE Blog;
CREATE TABLE users(
RegID INT UNSIGNED AUTO_INCREMENT,
name VARCHAR(50),
password VARCHAR(50),
email VARCHAR(30) UNIQUE,
birth DATE,
role ENUM(
'USER',
'MODERATOR',
'ADMIN')
DEFAULT 'USER',
PRIMARY KEY(RegID) -- email cím legyen??--
);
CREATE T... | true |
f69cec02c6d4469d8857f4dbbcfd1a0e1bca734b | SQL | mferoc/UniProjecao-Linguagem-Tecnica-de-Programacao-Web | /Trabalho2/database/db atividade 2.sql | UTF-8 | 332 | 2.859375 | 3 | [
"MIT"
] | permissive | CREATE DATABASE DB_ltpw;
USE DB_ltpw;
CREATE TABLE IF NOT EXISTS TB_cursos (
cod INT ,
nome VARCHAR(128),
categoria VARCHAR(64),
carga VARCHAR(16),
preco VARCHAR(16),
PRIMARY KEY(cod)
);
SELECT * FROM TB_cursos;
select * from TB_cursos where cod=111;
DELETE FROM TB_cursos WHERE cod=111;
DROP TABL... | true |
a3a2a63df677dd9b852252ab5264819a54809c40 | SQL | hrr36-sdc-t2/scootify | /services/recommends/server/schema.sql | UTF-8 | 287 | 3.265625 | 3 | [
"MIT"
] | permissive | CREATE DATABASE IF NOT EXISTS hrr;
USE hrr;
DROP TABLE IF EXISTS tracks;
CREATE TABLE tracks (
`_id` INTEGER NOT NULL AUTO_INCREMENT,
`track_id` VARCHAR(255) NOT NULL UNIQUE,
`title` VARCHAR(255) NOT NULL,
`artist` VARCHAR(255),
`album` VARCHAR(255),
PRIMARY KEY (_id)
);
| true |
daaeddfc614a3aaf39c5fed182bb85211df831e5 | SQL | silence-do-good/stress-test-Postgres-and-MySQL | /dump/high/day20/select2220.sql | UTF-8 | 266 | 2.875 | 3 | [] | no_license |
SELECT sen.name
FROM SENSOR sen, SENSOR_TYPE st, COVERAGE_INFRASTRUCTURE ci
WHERE sen.SENSOR_TYPE_ID=st.id AND st.name='WiFiAP' AND sen.id=ci.SENSOR_ID AND ci.INFRASTRUCTURE_ID=ANY(array['4032','2089','6039','2084','4048','4100_8','2088','4100_3','5048','3048'])
| true |
8f2186cad67e5be71f39aea6d880bec4d5ebdf0a | SQL | Neda-Sal/pair_problems | /SQL/hackerrank_new_companies.sql | UTF-8 | 606 | 4.25 | 4 | [] | no_license | -- https://www.hackerrank.com/challenges/the-company/problem
SELECT Company.company_code, Company.founder, COUNT(DISTINCT(Employee.lead_manager_code)),
COUNT(DISTINCT(Employee.senior_manager_code)),
COUNT(DISTINCT(Employee.manager_code)),
COUNT(DISTINCT(Employee.employee_code))
FROM Company
JOIN Lead_Manager
ON Compa... | true |
01bdf65af8348b971dccdcd04fea052a55025f24 | SQL | radtek/abs3 | /sql/mmfo/bars/Function/f_nls6.sql | WINDOWS-1251 | 2,108 | 3.25 | 3 | [] | no_license |
PROMPT =====================================================================================
PROMPT *** Run *** ========== Scripts /Sql/BARS/function/f_nls6.sql =========*** Run *** ===
PROMPT =====================================================================================
CREATE OR REPLACE FUNCTION BA... | true |
db3e3da82cf48322d79a321e9bac18edd3d41a44 | SQL | AntonyJDinesh/java-graphql-demo | /src/main/resources/data.sql | UTF-8 | 369 | 2.75 | 3 | [] | no_license | DROP TABLE IF EXISTS `employee`;
CREATE TABLE `employee` (
id INT AUTO_INCREMENT PRIMARY KEY,
name VARCHAR(250) NOT NULL,
age INT NOT NULL,
gender VARCHAR(10) NOT NULL,
yoj INT NOT NULL
);
INSERT INTO `employee` (name, age, gender, yoj) VALUES
('Senkodi', 28, 'F', 2019),
('Muguran', 29, 'M', 2020),
('Muthuk... | true |
ea3d79c9254cac7c3e16d77a45694b84ed540bf7 | SQL | MmahdiM79/tutiter | /SQL queries/unblock_procedure.sql | UTF-8 | 892 | 3.3125 | 3 | [] | no_license |
DELIMITER //
CREATE PROCEDURE `unblock`(IN `username` VARCHAR(20), OUT res BOOL)
`scope`:
BEGIN
-- check that given username is valid or not
IF username NOT IN (SELECT u.username FROM users u)
THEN
SELECT 'the given username is invalid!' as `status`;
SELECT FALSE INTO res;
LEAV... | true |
9826ff3e7094df2d6e566d609f7ce1c3d2e11211 | SQL | JimmyJLin/M-vie-Haus-3.0 | /db/schema.sql | UTF-8 | 527 | 3.328125 | 3 | [] | no_license | DROP TABLE IF EXISTS movies;
CREATE TABLE movies (
movie_id SERIAL PRIMARY KEY UNIQUE,
poster text,
title text,
year integer,
rated text,
director text,
actors text,
plot text,
showtime_id text
);
CREATE TABLE showtime (
showtime_id SERIAL PRIMARY K... | true |
28e3b6ba905c3c693273561326ceb0b779f9dcdd | SQL | sdj012/coursework_SQL | /lab_07.sql | UTF-8 | 2,461 | 4.5625 | 5 | [] | no_license | -----------------------------------------------------------------------------------
-- Date: March 11 th 2019
-- Purpose: Submission for Lab 7 DBS301
-- Description: This file includes SQL scripts that apply set operator methods
------------------------------------------------------------------------------------
--QUES... | true |
a193f876bd2a68a43770049e6594be8c8e23e0c4 | SQL | Mojolagbe2014/mojoeniesiti | /php_api/dump.sql | UTF-8 | 497 | 2.640625 | 3 | [
"LicenseRef-scancode-public-domain"
] | permissive | CREATE TABLE `api_currency_rate` (
`from` varchar(3) NOT NULL,
`to` varchar(3) NOT NULL,
`rate` decimal(16,8) unsigned NOT NULL,
`update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (`from`,`to`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE `api_currency_stat` (... | true |
c0aef7dd14b607197844b7b673685accab277fc7 | SQL | lyk2017php/quiz | /lyk2017_quiz.sql | UTF-8 | 2,079 | 3.0625 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.7.1
-- https://www.phpmyadmin.net/
--
-- Host: localhost:3306
-- Generation Time: Jul 31, 2017 at 08:23 PM
-- Server version: 5.6.35
-- PHP Version: 5.6.30
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIE... | true |
2d90b118690b2d2bcdec2ca8af7a4ebbae7e457d | SQL | wlh320/cyanit | /db/init.sql | UTF-8 | 8,676 | 3.859375 | 4 | [] | no_license | ############################### CYANIT DATABASE #######################################
DROP DATABASE IF EXISTS `cyanit`;
CREATE DATABASE `cyanit`;
USE `cyanit`;
#######################################################################################
############################### TABLE ###############################... | true |
e4fe78da909ba5001088fba137de8a56a7d80534 | SQL | lianzf/baseFramework | /doc/flow_management_2017-03-14.sql | UTF-8 | 6,185 | 3.21875 | 3 | [] | no_license | # ************************************************************
# Sequel Pro SQL dump
# Version 4541
#
# http://www.sequelpro.com/
# https://github.com/sequelpro/sequelpro
#
# Host: 192.168.20.15 (MySQL 5.5.40-36.1-log)
# Database: flow_management
# Generation Time: 2017-03-14 12:11:18 +0000
# **************************... | true |
30fc446b42444dc837f8b32fe337ace8e0e8ad7e | SQL | harsh159357/contacts | /phpbackend/contacts.sql | UTF-8 | 1,898 | 2.984375 | 3 | [
"Apache-2.0"
] | permissive |
-- phpMyAdmin SQL Dump
-- version 3.5.2.2
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Jun 20, 2018 at 04:11 PM
-- Server version: 10.1.24-MariaDB
-- PHP Version: 5.2.17
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_C... | true |
b359a71259eebd8fd0aee0e01b2fb8d0ec73ec60 | SQL | xxdoc/vb6-winpricing400 | /scripts/2_product_type.sql | UTF-8 | 354 | 2.65625 | 3 | [] | no_license | CREATE TABLE PRODUCT_TYPE
(
PRODUCT_TYPE_ID ID_TYPE NOT NULL,
PRODUCT_TYPE_NO CODE_TYPE NOT NULL UNIQUE,
PRODUCT_TYPE_NAME CODE_TYPE NOT NULL UNIQUE,
CREATE_DATE DATE_TYPE NOT NULL,
CREATE_BY ID_TYPE NOT NULL,
MODIFY_DATE DATE_TYPE NOT NULL,
MODIFY_B... | true |
18d6487fc38fff859b6cef58a125f30c8d95a3da | SQL | fdblender/13-Oracle-SQL | /counting things.sql | UTF-8 | 1,091 | 4.75 | 5 | [] | no_license | -- Now I want to know how many people in the database are named Smith?
-- Example: select count(distinct company) as "Distinct Companies" from customers;
select count(*) from customers
where lastname = 'Smith';
-- How many people have last names beginning with S?
-- Select * from customers where LastName like 'S%';
s... | true |
43ada2793d28bd0a2655123184735b52c99640c6 | SQL | zhanxp/enuo-start-kit | /server-yii/db/mysql.sql | UTF-8 | 1,307 | 2.921875 | 3 | [
"BSD-3-Clause"
] | permissive | CREATE TABLE `admin` (
`id` INT NOT NULL AUTO_INCREMENT,
`name` VARCHAR(45) NOT NULL,
`ent_types` INT NOT NULL,
`ent_status` INT NOT NULL,
`creater` INT NOT NULL,
`updater` INT NOT NULL,
`create_date` DATETIME NOT NULL,
`update_date` DATETIME NOT NULL,
`password` VARCHAR(45) NOT NULL,
`auth_key` VAR... | true |
120f6faf248e800e08c2c7cb92419b45c3954241 | SQL | lorencianodramayo/adValidator | /adValidator.sql | UTF-8 | 1,687 | 2.9375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.8.3
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Generation Time: Apr 30, 2020 at 02:31 PM
-- Server version: 10.1.36-MariaDB
-- PHP Version: 5.6.38
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OL... | true |
f2af1e8c27c96e8b62bce30df29564c5f265035a | SQL | a370814014/ack_sys | /ack_sys.sql | UTF-8 | 16,760 | 3.0625 | 3 | [] | no_license | /*
Navicat MySQL Data Transfer
Source Server : 127.0.0.1
Source Server Version : 50155
Source Host : localhost:3306
Source Database : ack_sys
Target Server Type : MYSQL
Target Server Version : 50155
File Encoding : 65001
Date: 2017-05-23 15:30:21
*/
SET FOREIGN_KEY_... | true |
b3589908756705772e1951f56e0de801bad31522 | SQL | bellmit/MSFM | /domain/sql/ddl/Receipient.sql | UTF-8 | 538 | 3.109375 | 3 | [] | no_license | whenever sqlerror continue
drop table Receipient;
create table Receipient
(
databaseIdentifier number(20) not null,
receipient varchar2(50) not null,
receipientType number(20) not null
)
/* tablespace sbtg_sm_data01 */
;
alter table Receipient
add constraint rcp_pk
primary key (databaseIdentifier)
/* using ind... | true |
bd0feb8c03b1c85d07cf10568d56fc9444533de6 | SQL | KevinWM/bayes_R | /BaseDatos.sql | UTF-8 | 2,306 | 3.984375 | 4 | [] | no_license |
create table clasificacion(
id serial not null,
nombre varchar(30) not null,
CONSTRAINT clasificacion_key PRIMARY KEY (id)
);
create table documento(
id serial not null,
nombre varchar(30) not null,
id_Clasificacion integer,
CONSTRAINT documento_key PRIMARY KEY (id),
CONSTRAINT clasificacion_docu... | true |
65fd8af3171c5d2a778d7133a4ee7f5592aba1f5 | SQL | JonathanMcDonagh/Distributed-Systems-Assignments | /Assignment2/students.sql | UTF-8 | 1,330 | 3.03125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.9.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1:3306
-- Generation Time: Mar 24, 2020 at 07:42 PM
-- Server version: 10.4.10-MariaDB
-- PHP Version: 7.3.12
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SE... | true |
5f974257acfc516e95cf1c860e13afb70a30c614 | SQL | zfz/datasci-001 | /assignment2/multiply.sql | UTF-8 | 400 | 3.765625 | 4 | [] | no_license | create table x(
row_num int,
col_num int,
value int,
primary key(row_num, col_num)
);
create table y(
row_num int,
col_num int,
value int,
primary key(row_num, col_num)
);
insert into x select * from a where row_num=2;
insert into y select * from b where col_num=3;
select sum(x.value ... | true |
580edd3bbbf7cfba8d125992e826c5b747ced3a1 | SQL | dimagordon/app | /migrations/20191119151017_users.sql | UTF-8 | 369 | 2.796875 | 3 | [] | no_license | -- +goose Up
-- SQL in this section is executed when the migration is applied.
create table if not exists users(
id SERIAL PRIMARY KEY,
user_id UUID UNIQUE not null,
username varchar(100) not null unique,
password varchar(100) not null
);
-- +goose Down
-- SQL in this section is executed when the migra... | true |
83608b6a887665fcfecd340d843997675cea9758 | SQL | ShafayetZim/ajkerbazar | /CMS/foodbank(2).sql | UTF-8 | 4,568 | 3.140625 | 3 | [
"CC-BY-4.0",
"CC-BY-3.0"
] | permissive | -- phpMyAdmin SQL Dump
-- version 4.8.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Jul 29, 2019 at 09:21 AM
-- Server version: 10.1.33-MariaDB
-- PHP Version: 7.2.6
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD... | true |
f7639480f679f90eadc21a3a5f16e882236463dc | SQL | adkunkel/TEAM5_560 | /DataAccess/FantasyData/SQL/query6.sql | UTF-8 | 561 | 3.640625 | 4 | [] | no_license | --Query 6
--Displays Defenses ordered by pass yards, rush yards, touchdowns, and safeties.
SELECT T.TeamName, TG.Week, D.PassYardsAllowed, D.RushYardsAllowed, D.Touchdowns, D.Safeties, D.Interceptions, D.Fumbles
FROM NFL.Teams T
INNER JOIN Players.DefenseStats D On D.PlayerID = T.TeamID
INNER JOIN Games.TeamGame TG O... | true |
4b803eecd5e56b167ea41a7e8181488f2ec5b3a3 | SQL | J-AugustoManzano/livro_MySQL-5.5-Interativo | /Fontes/C09MYSQL.sql | WINDOWS-1250 | 8,686 | 3.65625 | 4 | [] | no_license | USE virtual;
CREATE PROCEDURE sp_saudacao()
SELECT 'Alo, Mundo!'
;
CALL sp_saudacao();
CREATE PROCEDURE sp_dados()
SELECT NOME, SALARIO FROM cadfun
;
CALL sp_dados();
DELIMITER |
CREATE PROCEDURE sp_sauda()
BEGIN
DECLARE Mensagem VARCHAR(11);
SET Mensagem = 'Alo, Mundo!';
SELECT Men... | true |
e097ac08de78e2922898dfd6a2f10b1b5382d197 | SQL | achalshahp/TwitterIntuit | /scripts/populate_twitter_intuit.sql | UTF-8 | 6,403 | 3.078125 | 3 | [] | no_license | USE twitterintuit;
-- ADD USERS TO THE DATABASE
INSERT INTO users (username, password, enabled) VALUES ('jdoe', 'test', 1);
INSERT INTO users (username, password, enabled) VALUES ('jdoe1', 'admin', 1);
INSERT INTO users (username, password, enabled) VALUES ('user1', 'pass', 1);
INSERT INTO users (username, password, e... | true |
daa9037ac666cd1c57754e0691a45c33d18562e4 | SQL | DavidBenko/gateway | /src/gateway/sql/static/sqlite3/v11/migrate.sql | UTF-8 | 3,112 | 4.1875 | 4 | [
"Apache-2.0"
] | permissive | CREATE TABLE IF NOT EXISTS `_proxy_endpoint_components` (
`id` INTEGER PRIMARY KEY AUTOINCREMENT,
`endpoint_id` INTEGER NOT NULL,
`conditional` TEXT,
`conditional_positive` BOOLEAN DEFAULT 1,
`position` INTEGER NOT NULL,
`type` TEXT NOT NULL,
`data` TEXT,
`type_discriminator` TEXT,
`name` TEXT,
`des... | true |
4daa69dd22ca2860e61241ec431a8d212491703b | SQL | Zaaraah/CredibilityAssessment | /application/config/respondent.sql | UTF-8 | 1,075 | 3.1875 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | CREATE TABLE respondent (
respondent_id int(11) NOT NULL AUTO_INCREMENT,
gender varchar(1) NOT NULL,
age int(2) NOT NULL,
educational_attainment varchar(300) NOT NULL,
occupation varchar(300) NOT NULL,
web_hours int(3) NOT NULL,
gov_informed varchar(1) NOT NULL,
ngo_id varchar(1) NOT NULL,
PRIMARY KEY... | true |
90871f0686887a5db09e6cf5e5d5cf70d8da9e2f | SQL | Devopriya-Tirtho/Distributed-Database-Lab | /Codes/Codes/null.sql | UTF-8 | 205 | 3.015625 | 3 | [] | no_license | select fName from FACULTY
where Fid =(select Fid from COURSE
where room ='R126' AND cnum IN (select cnum from ENROLLED
where snum =(select snum from STUDENT
where slevel='1' AND major='ME' AND age=19))); | true |
4f6c0e936d737a802cb69bbad70e51ec05ef6983 | SQL | Katsarov/DB | /07.Subqueries_And_Joins_Excersise/13_CountMountainRanges.sql | UTF-8 | 295 | 3.765625 | 4 | [
"MIT"
] | permissive | SELECT
c.CountryCode,
COUNT(m.MountainRange) AS MountainRanges
FROM Countries c
LEFT JOIN MountainsCountries mc ON mc.CountryCode = c.CountryCode
LEFT JOIN Mountains m ON m.Id = mc.MountainId
WHERE c.CountryCode IN ('US', 'RU', 'BG')
GROUP BY c.CountryCode
| true |
9fe3041eff525c4d90dd93cd802c289680ca0583 | SQL | hosaka-io/keychain | /resources/db/migration/V7__created_by.sql | UTF-8 | 251 | 2.921875 | 3 | [] | no_license | ALTER TABLE keychain.keys
ADD COLUMN IF NOT EXISTS created_by uuid;
UPDATE keychain.keys
SET created_by = CAST('00000000-0000-0000-0000-000000000000' AS UUID)
WHERE created_by IS NULL;
ALTER TABLE keychain.keys
ALTER COLUMN created_by SET NOT NULL
| true |
58cd2de3ac81de393d98ff70b4ff961a09e5d5e9 | SQL | ClaudiaRivas/Ecommerce | /FINDINMAP.sql | UTF-8 | 2,304 | 3.5625 | 4 | [] | no_license | CREATE DATABASE FINDINMAP;
USE FINDINMAP;
CREATE TABLE ROL_USERS(
ID_ROLUSER INT PRIMARY KEY NOT NULL AUTO_INCREMENT,
ROL VARCHAR(45)
)ENGINE=INNODB;
CREATE TABLE USERS(
ID_USER INT PRIMARY KEY NOT NULL AUTO_INCREMENT,
USER_NAME VARCHAR(45),
USER_EMAIL VARCHAR(30),
USER_PASSWORD VARCHAR(45),
ID_... | true |
8d792e7d6e0bea29b56776c59a237a38fb2333f0 | SQL | zz0733/op-gbsql | /history/sql_back/mainsite/V1.0.1.0199__C_v_sys_site_info.sql | UTF-8 | 747 | 3.484375 | 3 | [] | no_license | -- auto gen by cheery 2015-12-30 11:30:15
--更新站点相关基础信息
DROP VIEW IF EXISTS v_sys_site_info;
CREATE OR REPLACE VIEW "v_sys_site_info" AS
SELECT s.id AS siteid,
s.name AS sitename,
u.id AS masterid,
u.username AS mastername,
u.user_type AS usertype,
u.subsys_code AS subsyscode,
s.parent_id AS ope... | true |
d18aa37ac90690a569eca68d029caa95052ad910 | SQL | Matt0912/Databases | /dbvm/sql/uni/unidata.sql | UTF-8 | 6,479 | 2.875 | 3 | [] | no_license | INSERT INTO RGroup (id, name) VALUES (81, 'Hardware');
INSERT INTO RGroup (id, name) VALUES (82, 'Software');
INSERT INTO Lecturer (id, name, username, office, rgroup) VALUES (31, 'Sarah', 'csxss', '1.5', 82);
INSERT INTO Lecturer (id, name, username, office, rgroup) VALUES (32, 'Charles', 'cscw', '0.3', 81);
INSERT I... | true |
d8be99787104dfbfe337bb13a41d3172e98f2a0f | SQL | EreminArtem/database-course-project | /foreign-keys.sql | UTF-8 | 806 | 3.46875 | 3 | [] | no_license | USE study_journal;
ALTER TABLE students
ADD CONSTRAINT student_group_id_fk
FOREIGN KEY (group_id) REFERENCES study_groups (number);
ALTER TABLE courses
ADD CONSTRAINT courses_group_id_fk
FOREIGN KEY (group_id) REFERENCES study_groups (number);
ALTER TABLE lessons
ADD CONSTRAINT lessons_gr... | true |
aae29ad35fc70130198a42d09061e2de72cacd1b | SQL | lanaflonform/Developper-la-persistance-des-donnees | /3 - Développer des composants/3 - Programmer des procédures stockées/Exercice 1/exercice1.sql | UTF-8 | 370 | 2.90625 | 3 | [] | no_license | DELIMITER |
-- Drops the procedure if it already exists
DROP PROCEDURE IF EXISTS Lst_fournis;
-- Creates a procedure without arguments
CREATE PROCEDURE Lst_fournis()
BEGIN
SELECT DISTINCT numfou FROM entcom;
END |
DELIMITER ;
-- Call the procedure without arguments
CALL Lst_fournis;
-- Shows info about the crea... | true |
64874482726a47a1cb0e3ae2aab3c95c4a100a32 | SQL | MattWroclaw/Bazy_Danych | /Cwiczenia5.sql | UTF-8 | 780 | 3.375 | 3 | [] | no_license | -- Ćwiczenie 5.1
-- Proszę utworzyć użytkownika u1a z haslem abc i nadac uprawneinia do slectowania tablicy pasazer
-- DROP USER u1a;
CREATE USER 'u1a'@'localhost' IDENTIFIED BY 'abc';
GRANT SELECT ON pasazer TO 'u1a'@'localhost';
-- Przyklad uzycia GRANT do nadawania uprawnnien do UPDATE jednej kolumny
CREATE... | true |
dd330fff8dbf4530a81ffae3981b3a197b0b6aa0 | SQL | Idrking/rally | /express-back-end/db/queries/tasks/03_all_signups.sql | UTF-8 | 148 | 2.8125 | 3 | [] | no_license | SELECT users.*
FROM users
JOIN approved_users ON users.id = user_id
JOIN signups ON approved_users.id = approved_user_id
WHERE signsup.task_id = $1; | true |
ce317187def6b91f321c78332e347df4bed20aa9 | SQL | YooDongGi/dbSql | /20200918.sql | UTF-8 | 14,234 | 4.15625 | 4 | [] | no_license | DML : Data Manipulate Language
1. SELECT ***
2. INSERT
3. UPDATE
4. DELETE
DDL : Data Defination Language
데이터와 관련된 객체를 생성, 수정, 삭제하는 명령
오라클 객체 생성, 삭제 명령
CREATE 객체타입 객체이름(개발자가 부여){
}.....
DROP 객체타입 객체이름;
****
테이블을 생성하는 문법
CREATE TABLE [오라클사용자명].테이블명 (
컬럼명 컬럼의 데이터타입,
컬럼명2 컬럼의 데이터타입2,.......
);
테이블 ... | true |
775afabbb2c8701e09549403d7005c8b9008d13c | SQL | fauxl/CultureSpot | /luoghimm.sql | UTF-8 | 436,630 | 2.84375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.8.5
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Creato il: Giu 18, 2019 alle 15:08
-- Versione del server: 10.1.38-MariaDB
-- Versione PHP: 7.3.3
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_... | true |
a529fdf65d194ccd2758a5fb04e4dcd3ea13bfa2 | SQL | markwu53/data | /logdata/src/com/nationwide/data/log/sql/logdata.sql | UTF-8 | 5,150 | 2.609375 | 3 | [] | no_license | --add jar /home/biadmin/mylib/csv-serde-1.1.2.jar;
--add jar /home/biadmin/mylib/ihs-log-serde.jar;
create schema logdata;
use logdata;
create table logdata.netflow_log (
Flow_Type string
, First_Packet_Time string
, Storage_Time string
, Source_IP string
, Source_Port string
, Destinatio... | true |
b3ab96b6bed62248fa7c6b853f6cf85ceee18cd9 | SQL | ducthanh512/MusicAppServer | /MySQLScripts/sample_data2.sql | UTF-8 | 7,705 | 2.78125 | 3 | [] | no_license |
/* album table */
insert into album set id = 1, name = 'Taylor Swift',singer ='Taylor Swift',
image ='https://farm1.staticflickr.com/838/28271260637_32979ef46a_b.jpg';
insert into album set id = 2, name = 'Christina Aguilera',singer ='Christina Aguilera',
image ='https://farm1.staticflickr.com/914/29269097078_c6e3c... | true |
75c7eb02b4b58668b85420981fa56464407cf593 | SQL | kayfour/Project_povertyRural | /db_schema/queryGather/executeHierarchy.sql | UTF-8 | 3,443 | 3.8125 | 4 | [] | no_license | -- id, depth, parent name, child name
SELECT node.SRVC_ID, parent.SRVC_CTGR_NM parentNM, node.SRVC_CTGR_NM childNM, (COUNT(parent.SRVC_CTGR_NM) - 1) AS depth
FROM TB_UAST_SRVC_CTGR AS node,
TB_UAST_SRVC_CTGR AS parent
WHERE node.LEFT_SRVC_ID BETWEEN parent.LEFT_SRVC_ID AND parent.RIGHT_SRVC_ID
-- AND node.SRVC_ID... | true |
dea7781aa9dc2fd240a31e9db0c6fd4e89be1bac | SQL | zs425/accommfzf2 | /sql/centralDB/roam_free_tables.sql | UTF-8 | 1,242 | 2.953125 | 3 | [] | no_license | DROP TABLE IF EXISTS `roamfree_countries`;
CREATE TABLE `roamfree_countries` (
`id` int(255) NOT NULL AUTO_INCREMENT,
`roamfreeName` varchar(255) DEFAULT NULL,
`liveHotels` int(10) DEFAULT NULL,
`roamfreeId` int(10) DEFAULT NULL,
`isoCode` varchar(10) DEFAULT NULL,
`added` varchar(20) DEFAULT NULL,
`modif... | true |
0e4306134137cc7e1ec794a5d53f3a0e32ef9ea8 | SQL | Geomit92/Messenger | /MessengerDB.sql | UTF-8 | 914 | 3.03125 | 3 | [] | no_license | CREATE DATABASE Private_Messenger;
CREATE TABLE Users(
UsernameID INT IDENTITY (1,1),
Username NVARCHAR(30) NOT NULL,
Password NVARCHAR (max) NOT NULL,
Role NVARCHAR(15) NOT NULL,
Deleted bit NOT NULL,
PRIMARY KEY(UsernameID)
);
CREATE TABLE Messages(
MessageID INT IDENTITY(1000,1),
Date DateTime NOT NUL... | true |
16bff5bdd34566e49f219ce927784d0e7752b43b | SQL | RadioJackie/Employee_Tracker | /db/seed.sql | UTF-8 | 1,122 | 3.125 | 3 | [
"ISC"
] | permissive |
INSERT INTO department (d_name) values ('Sales'),('Engineering'),('Finance'),('Legal');
INSERT INTO employee_role (title, salary, department_id) values ('Sales Lead', 100000, 1);
INSERT INTO employee_role (title, salary, department_id) values ('Sales Person', 80000, 1);
INSERT INTO employee_role (title, salary, depa... | true |
da2941387fa37d0115f94a58dba9e12f52bd5ff7 | SQL | wenx999/ytex | /projects/i2b2.2008/exp/imputed/insert_hotspot.sql | UTF-8 | 8,308 | 3.9375 | 4 | [] | no_license | delete ho
from hotspot ho
inner join feature_rank r
on r.feature_rank_id = ho.feature_rank_id
inner join feature_eval e
on e.feature_eval_id = r.feature_eval_id
and e.corpus_name = 'i2b2.2008'
and e.type = 'infogain-imputed-filt'
and e.featureset_name = 'ctakes'
and e.param1 = 'rbpar'
and e.cv_fold_i... | true |
d0ee68b2c4d367cf7e32549f6df599f6bc0bf3a3 | SQL | ganisdwpr/PraktikumTCC | /multipledatabase.sql | UTF-8 | 2,359 | 3 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 5.0.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Waktu pembuatan: 09 Jul 2021 pada 17.39
-- Versi server: 10.4.17-MariaDB
-- Versi PHP: 7.3.27
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@C... | true |
5dc82cf0673b441acf25795d75073b0cd5d3ea1f | SQL | ariafajarr14/TUBES_WAD | /tubes_wad/klinikkuu.sql | UTF-8 | 9,244 | 2.84375 | 3 | [
"MIT"
] | permissive | -- phpMyAdmin SQL Dump
-- version 5.0.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Jan 16, 2021 at 05:45 PM
-- Server version: 10.4.16-MariaDB
-- PHP Version: 7.4.12
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIE... | true |
dd4a5095ab9e478f0fe5f3188e7f6579b992764e | SQL | essennejaye/hi-biscus | /db/schema.sql | UTF-8 | 963 | 3.90625 | 4 | [] | no_license | -- DROP DATABASE IF EXISTS company_db;
-- CREATE DATABASE company_db;
USE company_db;
DROP TABLE IF EXISTS departments;
DROP TABLE IF EXISTS roles;
DROP TABLE IF EXISTS employees;
CREATE TABLE departments (
dept_id INT UNSIGNED NOT NULL AUTO_INCREMENT,
dept_name VARCHAR(30) UNIQUE NOT NULL,
PRI... | true |
05aeca6b95e06b5cbecbb189e9388ec8e6db7f9b | SQL | lmarina/sqlserver | /Solucion2-2.sql | UTF-8 | 2,939 | 4.03125 | 4 | [] | no_license | with
db as (
select [Instance] = 'CPDEWBD12',
[Database] = name,
[RecoveryMode] = DATABASEPROPERTYEX(name, 'Recovery'),
[CreationTime] = crdate,
[Status] = DATABASEPROPERTYEX(name, 'Status')
from master..sysdatabases
where NAME NOT IN ('tempdb','model')
),
lastfull as (
se... | true |
fdffed367a5339c9e0fd3c3cff20bbf2300fd9d4 | SQL | sylviama/learning-sql-individual-assignment-sylviama | /23.sql | UTF-8 | 97 | 3.078125 | 3 | [] | no_license | SELECT BillingCountry, SUM(Total) FROM Invoice
GROUP BY BillingCountry
ORDER BY SUM(Total) DESC; | true |
2d3c2e761d574697b5ab0b92f0461dfa5dfc667f | SQL | mysql-oracle/Mastering-Oracle-SQL-and-SQLPlus | /answers-ch04/a04-08b.sql | UTF-8 | 211 | 2.65625 | 3 | [] | no_license | select distinct attendee -- Wrong solution 1
from registrations
where attendee not in (select attendee
from registrations
where course = 'JAV');
| true |
e810a7476c9e049b7e7cba37a09b69a35acf489c | SQL | cyvation/hubei_zlpc | /src/数据库更新/190115办结视图兼容专项/1.sql | UTF-8 | 3,997 | 2.953125 | 3 | [] | no_license | CREATE OR REPLACE VIEW V_BJAJXX
(pcflbm, bmsah, tysah, ajmc, ajlb_bm, ajlb_mc, cbdwbm, cbdwmc, cbbmbm, cbbmmc, cbrgh, cbrmc, slrq, wcrq, way, ywtx, ywtx_mc, sfldba, wcrq_nf, stajbs, gzbm, gzmc, fgzbm)
AS
SELECT b.pcflbm,
b.bmsah,
b.tysah,
b.ajmc,
b.ajlb_bm,
b.ajlb_mc,
b.cb_dwbm... | true |
b832cea0e8754330c45ada0de43e99698aa0c98a | SQL | gavinswan/BootcampX | /4_queries/11_total_assignments_and_duration.sql | UTF-8 | 114 | 2.796875 | 3 | [] | no_license | SELECT day, count(*) as number_of_assignments, sum(duration) duration
FROM assignments
GROUP BY day
ORDER BY day; | true |
b659539c1d184046e5834cdd822f5bdd1700de8a | SQL | ValeriiSielikhov/db_coursework | /scripts/tasks/task_12.sql | UTF-8 | 1,467 | 3.96875 | 4 | [] | no_license | USE theater;
DROP PROCEDURE IF EXISTS money_for_performance;
delimiter $$
CREATE PROCEDURE money_for_performance(IN t TEXT)
BEGIN
SELECT stagings.name_ AS 'name', COUNT(tickets.id_performance) AS 'number of tickets sold',
SUM(tickets.price) AS 'sum', performances.date_ FROM tickets, performances, staging... | true |
83e0443015ded30155ff0288db0ab1bee6f835ce | SQL | redZmortallancer/car_company_database | /top2_sellers_by_price.sql | UTF-8 | 426 | 4.3125 | 4 | [] | no_license | /* Finds the top sellers by purchase price for the past year */
SELECT B.brand_name, SUM(CO.purchase_price)
FROM Customer_Ownership as CO
LEFT OUTER JOIN Car_Vins as CV on (CO.vin = CV.vin)
LEFT OUTER JOIN Models as M on (CV.model_id = M.model_id)
LEFT OUTER JOIN Brands as B on (B.brand_id = M.brand_id)
WHERE CO.... | true |
b7efd428127a719d81ae90f9b3ab9f694fbf129e | SQL | aleksa2285/SpringStarter | /SpitterApplication/spittrapp_postgres.sql | UTF-8 | 4,376 | 3.796875 | 4 | [] | no_license | /*==============================================================*/
/* DBMS name: PostgreSQL 9.x */
/* Created on: 2/21/2018 6:42:36 PM */
/*==============================================================*/
drop index RELATIONSHIP_2_FK;
drop index COMMENTS... | true |
4e7c88e886757135661c60cd55c4950a184c03df | SQL | rlminers/rick | /sql/traceon.sql | UTF-8 | 947 | 3.046875 | 3 | [] | no_license |
undef username
undef sid
undef session_id
undef serial_num
undef module
col os_pid for a7
col username for a15
SELECT s.username
, s.sid
, s.serial#
, p.spid os_pid
, s.module
FROM V$SESSION S, v$process p
where p.addr = s.paddr
and s.username LIKE UPPER( NVL( '&username', s.username ) )
and s.sid = NVL( '&sid', s.s... | true |
a7b4a7208a76407b1acafcf3e642676a16d1d953 | SQL | SirenOfOludeniz/edyachkova | /chapter_006/src/main/java/ru/job4j/sql/car_store.sql | UTF-8 | 2,003 | 3.78125 | 4 | [
"Apache-2.0"
] | permissive | create table transmission (
id serial primary key,
name varchar(50)
);
insert into transmission values (1, 'suzuki_transmission');
insert into transmission values(2, 'nissan_transmission');
insert into transmission values(3, 'toyota_transmission');
insert into transmission values (4, 'hyundai_transmission');
insert... | true |
945521dad2f2aefde725c23ea8e5edfc01db2a50 | SQL | song33ztpgg/01_sql | /day04.sql | UHC | 17,417 | 4.375 | 4 | [] | no_license | -- day04 : ǽ 4
--(6) 2.
-- ڴSELECT Ҽ
-- WTERE, HAVING Ҽ .
-- 22) 2000 Ѵ ,̸ , ȸ
SELECT e.empno
, e.ename ̸
, e.sal
FROM emp e
WHERE e.sal > 2000
;
/*
, ̸,
---------------------
7566 JONES 2975
7698 BLAKE 2850
7782 CLARK 2450
7839 KING 5000
7902 FORD 3000
*/
-- 1000 ... | true |
e46175c867f3f5131659f814288cec59cf9d3611 | SQL | Cobda/cobda-web | /src/prisma/migrations/20210427131440_third/migration.sql | UTF-8 | 2,173 | 3.609375 | 4 | [
"MIT"
] | permissive | /*
Warnings:
- Added the required column `color` to the `Product` table without a default value. This is not possible if the table is not empty.
- Added the required column `category` to the `Product` table without a default value. This is not possible if the table is not empty.
- Made the column `description`... | true |
2ab650e1e39de5736f806ac9e122840f3494d45e | SQL | cristianadinea/Oracle.PL-SQL | /pcconfig/tables/mobo.sql | UTF-8 | 1,757 | 2.859375 | 3 | [] | no_license | DROP TABLE MOBO;
CREATE TABLE MOBO
(
NAME VARCHAR2(50) NOT NULL
, CHIPSET VARCHAR2(50) NOT NULL
, DDRCLK NUMBER NOT NULL
, USB3 NUMBER NOT NULL
, PRICE NUMBER NOT NULL
, QUANTITY NUMBER NOT NULL
, CONSTRAINT MOBO_PK PRIMARY KEY (NAME) ENABLE
);
ALTER TABLE MOBO
ADD CONSTRAINT MOBO_CHIPSET_FK1 FOREIGN KEY (C... | true |
08d6272673595a2d4d2ebe752a127fa5209c148d | SQL | alldatacenter/alldata | /olap/ByConity/tests/queries/4_cnch_stateless/01495_attach_from_other.sql | UTF-8 | 3,577 | 3.25 | 3 | [
"Apache-2.0",
"BSD-3-Clause",
"MIT"
] | permissive |
-- Test Attach other table's detached partition
DROP TABLE IF EXISTS test_attach_other_tbl_detached_src;
DROP TABLE IF EXISTS test_attach_other_tbl_detached_dest;
CREATE TABLE test_attach_other_tbl_detached_src (key Int, value Int) ENGINE = CnchMergeTree() PARTITION BY (key) ORDER BY (key, value);
CREATE TABLE test_... | true |
427f1db73ec305aed6c134bf91959dba904f88db | SQL | ariqrm/B11K4-B | /7/7a.sql | UTF-8 | 1,148 | 3.890625 | 4 | [] | no_license | -- bikin database
CREATE DATABASE `arkademy`;
-- tabel kategori
CREATE TABLE `Kategori` ( `id` int(11) NOT NULL PRIMARY KEY AUTO_INCREMENT, `salary` varchar(25) DEFAULT NULL );
-- tabel work
CREATE TABLE `Work` ( `id` int(11) NOT NULL PRIMARY KEY AUTO_INCREMENT, `name` varchar(25) DEFAULT NULL, `id_salary` int(11), FOR... | true |
3f86539dbef24440266abd6059c895119dd89c29 | SQL | harambase/Harambase_Project | /Phase3/Create_Harambase.sql | UTF-8 | 5,337 | 3.46875 | 3 | [] | no_license | DROP TABLE HARAMBASE_ADMIN CASCADE CONSTRAINTS;
CREATE TABLE HARAMBASE_ADMIN(
USERID INTEGER PRIMARY KEY,
UNAME VARCHAR(10) UNIQUE,
EMAIL VARCHAR(20),
FNAME VARCHAR(15),
LNAME VARCHAR(15),
PASSWORD VARCHAR(16),
CREATORID Integer,
FOREIGN KEY (CREATORID) REFERENCES HARAMBASE_ADMIN(USERID)
ON D... | true |
080f7abd3555059dfb26e67dee2b353b2383bf69 | SQL | goelalex/cqf-exercises | /input/cql/Exercises09Key.cql | UTF-8 | 2,453 | 3.609375 | 4 | [
"LicenseRef-scancode-fujion-exception-to-apache-2.0",
"Apache-2.0"
] | permissive | /*
Patterns
Primitives
Choices
Slices
Simple Extensions
Complex Extensions
QI Core Patterns
Negation Patterns
CPG Patterns
NOTE: Test data for these is located under the Exercises09 library, so
copy these examples into that library to run them.
*/
library Exercises09Key
using FHIR version '4.0.1'
include FHIRHelper... | true |
c96f9a6dd688bfc634b2f634f5ef41e498c88880 | SQL | radtek/ICS5200 | /src/sql/Runtime/TPC-DS/tpcds100/Query/query_52.sql | UTF-8 | 537 | 3.8125 | 4 | [] | no_license | select * from (select dt.d_year
,item.i_brand_id brand_id
,item.i_brand brand
,sum(ss_ext_sales_price) ext_price
from date_dim dt
,store_sales
,item
where dt.d_date_sk = store_sales.ss_sold_date_sk
and store_sales.ss_item_sk = item.i_item_sk
and d_Date_sk between 2415522 and 2425522
and i... | true |
6f860d92543f41141b4bb93121bd2cb9b28a779b | SQL | alexnguyen1606/CoffeeZone | /coffeezone.sql | UTF-8 | 1,651 | 3.078125 | 3 | [] | no_license | -- MySQL Script generated by MySQL Workbench
-- Fri Aug 16 18:21:36 2019
-- Model: New Model Version: 1.0
-- MySQL Workbench Forward Engineering
SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0;
SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0;
SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='ON... | true |
7aa514f0d18f44a0f4dcb738026233ae6853c334 | SQL | RicksLWilliams/list | /SQL/setup.sql | UTF-8 | 1,196 | 3.109375 | 3 | [] | no_license | use librarya;
-- CREATE TABLE blogs (
-- id INT NOT NULL AUTO_INCREMENT,
-- title VARCHAR(80) NOT NULL,
-- body VARCHAR(255),
-- description VARCHAR(255),
-- isPublished TINYINT NOT NULL,
-- PRIMARY KEY (id)
-- )
-- CREATE TABLE cars (
-- id INT NOT NULL AUTO_INCREMENT,
-- make VARCHAR(80) NOT NULL,
--... | true |
cb7d1d7be9743840baf6a2bfab1692d27dc0bb20 | SQL | chsaey/Library_Management_CLI | /renamedsql/borrower_book_loans.sql | UTF-8 | 175 | 2.515625 | 3 | [] | no_license | CREATE DEFINER=`root`@`localhost` PROCEDURE `borrower_book_loans`(IN cardNo int)
BEGIN
Select * from tbl_book_loans bl where bl.cardNo = cardNo and bl.bookReturned = 'n';
END | true |
8f02b6ee6d931a1c72c944ca64e82e54992ff7a4 | SQL | guoyu07/ommu-core | /database/ommu_core_authors.sql | UTF-8 | 8,363 | 3.390625 | 3 | [
"Apache-2.0"
] | permissive | /*
SQLyog Ultimate v12.09 (64 bit)
MySQL - 10.1.16-MariaDB : Database - _project_db_ommu_opensource
*********************************************************************
*/
/*!40101 SET NAMES utf8 */;
/*!40101 SET SQL_MODE=''*/;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!4001... | true |
8111dbd3ccdf9fdc1cdfbe4459ddeb701a70a87c | SQL | ase40/sandbox | /path/to/procs/intraweek_pcs_dist.sql | UTF-8 | 2,838 | 3.5 | 4 | [] | no_license | create procedure "Decisioning_Procs"."Intraweek_PCs_Dist"( in "Forecast_Start_Week" integer,in "Hist_Wks" integer )
sql security invoker
begin
drop table if exists #Acc_PC_Events_Same_Week;
select "subs_week_and_year",
"event_dt",
"event_dt"-"datepart"("weekday","event_dt"+2) as "PC_Event_End_Dt",
... | true |
974afe4b2e43d3439b25b38ad0cb2d0a3a60bd23 | SQL | sajp/lims2 | /packages/LIMS2-Model/ddl/templates/roles.sql | UTF-8 | 752 | 3.015625 | 3 | [] | no_license | CREATE ROLE "[% admin_role %]" NOLOGIN NOINHERIT;
CREATE ROLE "[% rw_role %]" NOLOGIN NOINHERIT;
CREATE ROLE "[% ro_role %]" NOLOGIN NOINHERIT;
CREATE ROLE "[% webapp_role %]" WITH ENCRYPTED PASSWORD '[% webapp_passwd %]' LOGIN NOINHERIT IN ROLE "[% ro_role %]";
CREATE ROLE "[% task_role %]" WITH ENCRYPTED P... | true |
6b0861a78d1f2b64c9878f484ad7ab165c386c50 | SQL | kookkk13/DieDie | /web/files/board/service/201903061727421.sql | UTF-8 | 19,181 | 3.3125 | 3 | [] | no_license | CREATE TABLE "TB_BD_INFO" (
"INFO_NO" NUMBER NOT NULL,
"INFO_TITLE" VARCHAR2(100) NULL,
"INFO_CONTENTS" VARCHAR2(3000) NULL,
"INFO_DATE" DATE DEFAULT SYSDATE NULL,
"INFO_UP" NUMBER DEFAULT 0 NULL,
"INFO_HITS" NUMBER DEFAULT 0 NULL,
"INFO_FILE1" VARCHAR2(1000) NULL,
"INFO_FILE2" VARCHAR2(1000) NULL,
"INFO... | true |
af25e88731f0201f2cc998785263c07a91cf35cb | SQL | pekkao/opixmanager | /db/create-database-with-data.sql | UTF-8 | 26,270 | 3.234375 | 3 | [
"LicenseRef-scancode-unknown-license-reference",
"MIT"
] | permissive | DROP DATABASE IF EXISTS opixmanager;
CREATE DATABASE IF NOT EXISTS opixmanager;
USE opixmanager;
-- phpMyAdmin SQL Dump
-- version 3.5.2.2
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Jun 07, 2014 at 09:52 PM
-- Server version: 5.5.27
-- PHP Version: 5.4.7
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO... | true |
f779645afc118fcdf0240870d8e3e6c454340e9d | SQL | KangDokyun/SQL-OJ | /public/db/User&Problem.sql | UTF-8 | 1,447 | 3.453125 | 3 | [] | no_license | drop database if exists SQLSYS;
create database if not exists SQLSYS;
use SQLSYS;
create table User(
UID int primary key auto_increment,
Account varchar(12) unique,
Password varchar(12)
);
create table Admin(
UID int primary key
);
create table Problem(
PID int primary key auto_increment,
Title text,
Detai... | true |
f160714220121b4bf143a48a0b077b954992fc9c | SQL | Smallflyfly/jeecg-boot-demo | /jeecg-boot/db/增量升级SQL/2.1.3升级到2.1.4mysq.sql | UTF-8 | 11,482 | 3.03125 | 3 | [
"MIT",
"Apache-2.0"
] | permissive | -- 多数据源表
DROP TABLE IF EXISTS `sys_data_source`;
CREATE TABLE `sys_data_source`
(
`id` varchar(36) NOT NULL,
`name` varchar(100) DEFAULT NULL COMMENT '数据源名称',
`remark` varchar(200) DEFAULT NULL COMMENT '备注',
`db_type` varchar(10) DEFAULT NULL COMMENT '数据库类型',
`db_driver... | true |
6af560e9e73a81b1dab2d171cb458fd54ba48953 | SQL | rentsoftSAS/rentsoft | /RentSoft/scriptsBD/v_sucursal.sql | UTF-8 | 322 | 3.25 | 3 | [] | no_license | use rentsoftbd;
create view v_sucursal as
select
sucursal.id,
sucursal.Nombre,
sucursal.Direccion,
sucursal.IdCiudad,
ciudad.Nombre as ciudadnombre,
ciudad.IdPais,
pais.Nombre as paisnombre
from sucursal
inner join ciudad on ciudad.id=sucursal.idciudad
inner join pais on ciudad.idpais= pais.id
where
sucursal.activo... | true |
2b993cfef692b8233ddeeee583fc5dbd1cf8a5c3 | SQL | Mel0ne/classicdb_ruRU | /Updates/0165_mangos-classic_update.sql | UTF-8 | 20,685 | 2.609375 | 3 | [] | no_license | -- 3282_news_for_fizzle
UPDATE `dbscript_string` SET
`content_loc8`='%s слушает, как $N рассказывает ему о своих приключениях в Бесплодных землях.'
WHERE `entry` = 2000003320;
UPDATE `dbscript_string` SET
`content_loc8`='Поразительно! Выходит, ключ всему – индарилий!'
WHERE `entry` = 2000003321;
-- 3281_indurium
U... | true |
11901aba089d4489fcea59fc82bb659980c179d2 | SQL | ryanwit/homework_12_employee_management_system | /employee_tracker_sql.sql | UTF-8 | 3,162 | 4.25 | 4 | [] | no_license | DROP DATABASE IF EXISTS employee_tracker_db;
CREATE DATABASE employee_tracker_db;
USE employee_tracker_db;
CREATE TABLE employees(
id INT AUTO_INCREMENT NOT NULL PRIMARY KEY,
firstName VARCHAR(30),
lastName VARCHAR(30),
roleId INTEGER(11),
managerId INTEGER(11)
);
CREATE TABLE role(
id INT AUTO_INCREMENT ... | true |
2db87a4c16cdc3d78baee0393e783a5747f1b3c9 | SQL | RkayBhaker/Nature-s-Gift_.Vegetables-D-Mart | /shopingcart.sql | UTF-8 | 7,302 | 3 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Sep 07, 2020 at 02:06 PM
-- 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 |
0fa41bbab26b47ed5b6383fe9d4909c215630811 | SQL | HeZhanHong/My | /hive-table.sql | UTF-8 | 1,630 | 2.578125 | 3 | [] | no_license | CREATE TABLE `ibsdb.t_cdr_k_uli`(
`c_uli` string,
`c_areacode` string,
`c_lng` string,
`c_lat` string,
`c_uli_addr` string)
PARTITIONED BY (
`day` string,
`hour` string)
ROW FORMAT SERDE
'org.apache.hadoop.hive.ql.io.parquet.serde.ParquetHiveSerDe'
STORED AS INPUTFORMAT
'org.apache... | true |
cd1c87cbf227c93732515969922e67594495fcf8 | SQL | jrjr-randy/backoffice | /sql/table/commission_leveraged_matrix.table.sql | UTF-8 | 557 | 3.078125 | 3 | [] | no_license | DROP PROCEDURE IF EXISTS commission_leveraged_matrix_schema;
DELIMITER //
CREATE PROCEDURE commission_leveraged_matrix_schema()
BEGIN
IF NOT EXISTS(SELECT * FROM information_schema.columns WHERE table_schema=(SELECT DATABASE()) AND table_name='commission_leveraged_matrix' AND column_name='country_id') THEN
AL... | true |
b18a6a3d5ab5324392bcf0e77325dc40f8bc9510 | SQL | sushantkr16/spring-webflux-reactive-cassandra | /schema.cql | UTF-8 | 761 | 3.234375 | 3 | [] | no_license | CREATE KEYSPACE IF NOT EXISTS spring_reactive WITH replication = {'class': 'SimpleStrategy', 'replication_factor': 1};
CREATE TABLE spring_reactive.hackathon (
team_name text,
idea text,
contact_email text,
contact_phone text,
registration_date timestamp,
PRIMARY KEY ((name), registration_date)
) WITH CLUS... | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.