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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
9de4bae54cfa352f0d883716cb9c43516147e630 | SQL | zhouquanq/phpNotes | /message/message.sql | UTF-8 | 918 | 2.640625 | 3 | [] | no_license | /*
Navicat MySQL Data Transfer
Source Server : wamp3
Source Server Version : 50709
Source Host : 127.0.0.1:3306
Source Database : bbs
Target Server Type : MYSQL
Target Server Version : 50709
File Encoding : 65001
Date: 2018-08-30 10:03:29
*/
SET FOREIGN_KEY_CHECKS=0;
-- ---------... | true |
dda8fe81cb18065cdeca4dcb7bfaedc7af1c767e | SQL | mihkell/aproject | /src/main/sql/etsydbbackup.sql | UTF-8 | 5,778 | 2.8125 | 3 | [] | no_license | --
-- PostgreSQL database dump
--
-- Dumped from database version 9.3.0
-- Dumped by pg_dump version 9.3.0
-- Started on 2014-04-24 15:31:08
SET statement_timeout = 0;
SET lock_timeout = 0;
SET client_encoding = 'UTF8';
SET standard_conforming_strings = on;
SET check_function_bodies = false;
SET client_min_messages =... | true |
3be1dbf45d5f0a7bf850612cc96d89c26bc2f731 | SQL | marin-zaimov/4475project | /db/first-4-15-13.sql | UTF-8 | 2,559 | 3.859375 | 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';
-- -----------------------------------------------------
-- Table `4475project`.`projects`
-- -----------------------------------------... | true |
4d73bda3878bb8aacf19a4307953dd89e45741cc | SQL | hyejin000112/portfolio | /src/main/java/com/zerostress/controller/QnA.sql | UTF-8 | 555 | 3.328125 | 3 | [] | no_license | create table QnA(
bno number(10,0),
writer varchar2(50),
title varchar2(100),
content varchar2(1000),
regDate date default sysdate,
updateDate date default sysdate
);
create sequence QnA_seq INCREMENT by 1 start with 1 NOCACHE;
alter table QnA add CONSTRAINT QnA_pk PRIMARY KEY(bno);
select * ... | true |
a2839d879176b6fb6a153312ae2ef083f3a1dba5 | SQL | Bastienmmc/AppPunissements | /BDD/sql.sql | UTF-8 | 2,582 | 3.5 | 4 | [] | no_license | #------------------------------------------------------------
# Script MySQL.
#------------------------------------------------------------
#------------------------------------------------------------
# Table: stagiaire
#------------------------------------------------------------
CREATE TABLE stagiaire(
... | true |
a7cac8919b1cfbe7058db720070c3cbb5473d277 | SQL | Duncan-Britt/LS180-Database-Foundations | /lesson_2/films.sql | UTF-8 | 1,137 | 3.96875 | 4 | [] | no_license | DROP TABLE IF EXISTS public.films;
CREATE TABLE films (title varchar(255), "year" integer, genre varchar(100));
INSERT INTO films(title, "year", genre) VALUES ('Die Hard', 1988, 'action');
INSERT INTO films(title, "year", genre) VALUES ('Casablanca', 1942, 'drama');
INSERT INTO films(title, "year", genre) VALUES ('The... | true |
7b7e284a459434a368ef9c0e00786dad155ae49b | SQL | yeto1991/test1 | /tags/rel_20140331/tags/rel_20130920/jmesse/schema/jm_fair_detail_cnt.sql | UTF-8 | 456 | 2.578125 | 3 | [] | no_license | create table jmesse.jm_fair_detail_cnt(
i_kbn_2 varchar (3) not null
, i_kbn_3 varchar (3) not null
, i_kbn_4 varchar (3) not null
, v_kbn_2 varchar (3) not null
, v_kbn_3 varchar (3) not null
, v_kbn_4 varchar (3) not null
, site_kbn char (1) not null
, fair_cnt int not null
, primary key ... | true |
3fa713f805ffe1681b6b5993b35156375a4e0da3 | SQL | albertkrdoyan/reg_log | /SQL/sql3.sql | UTF-8 | 296 | 2.625 | 3 | [] | no_license | use `mydb`;
-- UPDATE users SET uid = 'd257bf3219d6355ec1b3a9300a23f1ae' WHERE ID = 1;
-- DELETE FROM users WHERE id = 1;
-- ALTER TABLE users AUTO_INCREMENT=1;
-- DROP TABLE IF EXISTS `a0b53923da36b35102584347297bd656c`;
select * from users
-- select * from a0b53923da36b35102584347297bd656c | true |
ab466575b4642e9c7c387cf4fca5b1d02ec6a07b | SQL | OlafMd/MedCon1.0 | /mm-libs/dbaccess/Level 3/CL3_Projects/Atomic/Retrieval/SQL/cls_Get_RightPackages_for_ProjectMemberID.sql | UTF-8 | 943 | 3.359375 | 3 | [] | no_license |
Select
tms_pro_members_2_rightpackage.AssignmentID,
tms_pro_acc_rightspackages.Name_DictID,
tms_pro_acc_rightspackages.TMS_PRO_ACC_RightsPackageID,
usr_accounts.USR_AccountID
From
usr_accounts Inner Join
tms_pro_projectmembers On tms_pro_projectmembers.USR_Account_RefID =
usr_accounts.USR_AccountID... | true |
457854f09b2fc122c343c79c58904efa917fe895 | SQL | 6thom6/Centre_d_entrainement_projet_tic_netcore_2020 | /SQLQuery_Cheval_vaccin.sql | UTF-8 | 214 | 2.953125 | 3 | [] | no_license | SELECT *
FROm Vaccination v
JOIN mym_Vaccination_Cheval m
ON m.VaccinationId_Vaccination = v.Id_vaccination
WHERE m.ChevalId_Cheval = (SELECT Id_Cheval FROM Cheval WHERE Nom_cheval = 'khani')
Select *
From
| true |
046111d2fdb56f6655aa74498db3ce2c97a50904 | SQL | Tenb8/projectG | /users.sql | UTF-8 | 5,397 | 2.75 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.1.14
-- http://www.phpmyadmin.net
--
-- Client : 127.0.0.1
-- Généré le : Mer 18 Septembre 2019 à 19:15
-- Version du serveur : 5.6.17
-- Version de PHP : 5.5.12
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTE... | true |
0017ac4997dbfc6aa10de551106296b0310dfbdb | SQL | whdtx111/Java_softeem | /DataBase/作业答案.sql | UTF-8 | 6,572 | 4.5 | 4 | [] | no_license | #列出至少有一个员工的所有部门。
SELECT
*
FROM
dept
WHERE
deptno IN ( SELECT deptno FROM emp GROUP BY deptno );#IN === = any
SELECT
*
FROM
emp
WHERE
empno IN ( 7369, 7499, 7566 );#列出薪金比"刘一"多的所有员工。
SELECT
*
FROM
emp
WHERE
sal > ( SELECT sal FROM emp WHERE ename = '刘一' );# 列出所有员工的姓名及其直接上级的姓名。
SELECT
... | true |
b93531c8d9e182e20d128c40d2469dd757381ab4 | SQL | vladimirpetukhov/Soft_Uni_Studies | /C#_Data_Base_MS_SQL/Database Basics – MS SQL – май 2018/Table Realations/Table Realations/02. One-To-Many Relationship.sql | UTF-8 | 655 | 3.59375 | 4 | [
"MIT"
] | permissive | CREATE TABLE Manufacturers
(
ManufacturerID INT CONSTRAINT PK_ManufacturerID
PRIMARY KEY,
[Name] NVARCHAR(50) NOT NULL,
EstablishedOn DATE NOT NULL
)
CREATE TABLE Models
(
ModelID INT CONSTRAINT PK_ModelID
PRIMARY KEY,
[Name] NVARCHAR(30) NOT NULL,
ManufacturerID INT NOT NULL
)
INSERT INTO Models
VALUES
(10... | true |
8f3229d194adb54aad1bd2ab5eff007836e5da48 | SQL | Izazul-Haque/Izazul-Haque-BloodLink | /bloodlink/sql/bloodlink.sql | UTF-8 | 4,413 | 3.078125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 5.1.0
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Apr 11, 2021 at 09:47 PM
-- 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 |
af2bf4fe2e165a82c311517fb4fb50d42f49bcf6 | SQL | normrothwell/TechElevator | /Golf Tracker/mvc_java/database/user.sql | UTF-8 | 623 | 2.875 | 3 | [] | no_license | -- ********************************************************************************
-- This script creates the database users and grants them the necessary permissions
-- ********************************************************************************
CREATE USER capstone_owner WITH PASSWORD 'capstone_owner1';
GRANT ... | true |
cb7add22b48dd7a76660b961399f788b8828997a | SQL | andreixhz/ProjetoFC-Squad7 | /bancodeDados/inserts_ProjetoFcamara.sql | UTF-8 | 7,623 | 2.84375 | 3 | [] | no_license | -- Inserts da tabela Categorias
INSERT INTO Categorias (CategoriaImg, CategoriaNome) values ('/static/media/alimentacao.052b2c80.svg', 'Alimentação');
INSERT INTO Categorias (CategoriaImg, CategoriaNome) values ('/static/media/artesanato.8e5a59e2.svg', 'Artesanato');
INSERT INTO Categorias (CategoriaImg, CategoriaNome)... | true |
bafbd7d5e75422c8aeb0aa44bd0d381e73b58279 | SQL | Mywaying/sdc | /sdc/order_flow_trans/script/order_flow_trans.sql | UTF-8 | 5,250 | 3.28125 | 3 | [] | no_license | use ods;
drop table if exists ods.odstmp_bpms_biz_order_flow_common;
CREATE TABLE ods.odstmp_bpms_biz_order_flow_common (
id STRING COMMENT '主键id',
apply_no STRING COMMENT '订单编号',
flow_type STRING COMMENT '流转类型',
flow_type_name STRING COMMENT '流转类型名称',
handle_time TIMESTAMP COMMENT '办理时间',
handle_user_id STRING COMMEN... | true |
4fbba7061900c9d74d70215b2e3efae94f926ea0 | SQL | kinkay17/beasiswalp3i.github.io | /biodata.sql | UTF-8 | 10,243 | 2.765625 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | -- phpMyAdmin SQL Dump
-- version 5.0.3
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Feb 06, 2021 at 12:56 AM
-- Server version: 10.4.14-MariaDB
-- PHP Version: 7.2.34
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIE... | true |
f507fde00ed41b67dd41ecaaa2c6d89eee035bec | SQL | MaximIkonnikov/bd | /modify.sql | UTF-8 | 1,005 | 3.484375 | 3 | [] | no_license | connect 'C:\SCLUB'
user 'SYSDBA' password 'masterkey';
alter table Clients drop ID_TICKET;
alter table Accounting add ID_TICKET int not null;
alter table Accounting add constraint acc_to_tickets foreign key (ID_TICKET)
references SeasonTickets (ID_TICKET);
create table Visits(
ID_CLIENT int not null
,NumberO... | true |
814ae18548ca7d1a716a012ec2b6821a0014cf0d | SQL | jefflee/leetcode_mssql | /TripsAndUsers.sql | UTF-8 | 1,057 | 4.375 | 4 | [] | no_license | -- https://leetcode.com/problems/trips-and-users/
WITH cancel_cte as (
SELECT Request_at, cast(count(1) as decimal(6,4)) as num
FROM Users as u WITH (nolock)
JOIN Trips AS t WITH (nolock) on u.Users_Id = t.Client_Id
WHERE u.Role = 'client' and u.Banned = 'No'
AND CAST(t.Request_at AS datetim... | true |
66b6a82af20ef7ad13c79f262a1d44537c4e061e | SQL | sarbpreetboparai/sqlCodes | /q07-1.sql | UTF-8 | 537 | 3.640625 | 4 | [] | no_license | -- Sarbpreet Boparai
-- Print the mailing label formatted name, full address, car make and model of
-- the person who purchased the most expensive car from us.
SELECT cu.cname || CHR(10) ||
cstreet || CHR(10) ||
TRIM(ccity) || ', ' || TRIM(cprov) || ' ' || cpostal || CHR(10) ||
'Make: ' || c.... | true |
7393da637d5c2b0f1b2e5ccab7087508bfda6591 | SQL | Everson-Menezes/Sistema_Loja_JSP | /banco/sistema_loja_noturno.sql | UTF-8 | 14,956 | 3.078125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.6.0
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: 08-Jun-2021 às 18:55
-- Versão do servidor: 5.7.12
-- PHP Version: 5.6.20
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
... | true |
048ee6f9903b0f2d6d60230c84d8cd54e41520b9 | SQL | drewitzmax/WF-Java-DrewitzMax-CodeReview-06 | /sql/cr6_student.sql | UTF-8 | 2,358 | 3.015625 | 3 | [] | no_license | -- MySQL dump 10.13 Distrib 8.0.18, for Win64 (x86_64)
--
-- Host: localhost Database: cr6
-- ------------------------------------------------------
-- Server version 8.0.18
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!4010... | true |
572d91472d3b70dd1d49513e122613eefd306387 | SQL | jcurtiswebb/sql-dividend-analyzer | /SQLFinance/Year_Table_Initalization.sql | UTF-8 | 146 | 2.859375 | 3 | [
"MIT"
] | permissive | INSERT INTO SQLFinance.ref.Yr
SELECT TRY_CAST(N AS varchar(4))
FROM SQLFinance.ref.Tally
WHERE N > 1999
AND N < (YEAR(GETDATE()) + 1)
| true |
460c93cbfc90e3759d4af07bf45361904c307458 | SQL | CiSigep/storefrontdb | /bamazonSeed.sql | UTF-8 | 2,418 | 3.8125 | 4 | [] | no_license | DROP DATABASE IF EXISTS bamazon;
CREATE DATABASE bamazon;
USE bamazon;
CREATE TABLE departments(
department_id INTEGER(100) NOT NULL AUTO_INCREMENT,
department_name VARCHAR(50),
over_head_costs FLOAT(20,2),
PRIMARY KEY (department_id)
);
CREATE TABLE products(
item_id INTEGER(100) NOT NULL AUTO_I... | true |
084eeb6fd666b1256d7d740092523404e12667dc | SQL | leixiang-A/vux-cm | /dangdang_client_mysql/user.sql | UTF-8 | 2,302 | 3.15625 | 3 | [] | no_license | -- --------------------------------------------------------
-- 主机: 192.168.3.234
-- 服务器版本: 5.5.53 - MySQL Community Server (GPL)
-- 服务器操作系统: Win32
-- HeidiSQL 版本: 9.5.0.5220
-- --------------------------------------------------------... | true |
85aff592386acde5ba25604fa838b35918d60dbf | SQL | joannalimbaga/DoOrDie | /db_quiz.sql | UTF-8 | 17,210 | 3.09375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.1.12
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Aug 26, 2014 at 11:41 PM
-- Server version: 5.6.16
-- PHP Version: 5.5.11
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;... | true |
520fb618d2cd8f7079baa642f7b5b53bfb42571b | SQL | dbmdz/cudami | /dc-cudami-server/dc-cudami-server-backend-jdbi/src/main/resources/de/digitalcollections/cudami/server/backend/impl/database/migration/V11.02.00__DML_Update_identifiableObjectType_for_all_Identifiables.sql | UTF-8 | 3,222 | 2.65625 | 3 | [
"MIT"
] | permissive | ALTER TABLE identifiables DISABLE TRIGGER ALL;
UPDATE identifiables SET identifiable_objecttype = 'IDENTIFIABLE';
ALTER TABLE identifiables ENABLE TRIGGER ALL;
ALTER TABLE entities DISABLE TRIGGER ALL;
UPDATE entities SET identifiable_objecttype = 'ENTITY';
ALTER TABLE entities ENABLE TRIGGER ALL;
UPDATE articles SET... | true |
3a1f3ec5acd75962b3ed91ba70755ff5ed4d75a1 | SQL | Bookmonkey/IntraLite | /documentation/sql/createtable.sql | UTF-8 | 331 | 2.734375 | 3 | [] | no_license | -- using PostgreSQL
create database quicklinksintranet;
use quicklinksintranet;
create table settings (
title text,
logo_image text,
);
create table link (
id serial PRIMARY KEY,
link text not null,
link_name text not null,
is_external_link boolean not null
);
insert into settings (title) VALUES ('Qui... | true |
ef90ac6fe505690bf057f77abd80f55ac5d82c38 | SQL | MAMATJ/bank | /bank.sql | UTF-8 | 3,096 | 2.671875 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.1.12
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Dec 29, 2015 at 08:25 AM
-- Server version: 5.6.16
-- PHP Version: 5.5.11
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;... | true |
2caabce30c06b6b0da4615f410cc96c3f7a58e54 | SQL | Guiroc/forumg | /forum_sql.sql | UTF-8 | 2,447 | 3.640625 | 4 | [] | no_license | create table utilisateur(
utilisateur_id serial;
utilisateur_pseudo varchar(50),
utilisateur_E_mail varchar(50),
utilisateur_mot_de_passe varchar(50),
constraint pk_utilisateur_id primary key (utilisateur_id));
create table categorie(
categorie_id int,
categorie_titre varchar(50),
constraint pk_categorie_id primary... | true |
0d24cd84d1c8a7701dcf2a0054f43c1cc543228a | SQL | kfr2359/prac_webapp | /insert.sql | UTF-8 | 2,691 | 2.9375 | 3 | [] | no_license | use prac_db;
-- service_type
insert into service_type (name) values ("Создание документов"),
("Восстановление документов"),
("Сопровождение документов"),
("Банкротсво"),
("Эмиссия акций"),
("Сопрвождение сделок"),
("Судебное представительство"),
("К... | true |
3f4d36b527e90e026acd5538547e256d5989313f | SQL | johnspart/api-jdbc | /api-jdbc/src/co/edu/beans/instituciones.sql | UTF-8 | 381 | 2.84375 | 3 | [] | no_license | -- Table: instituciones
-- DROP TABLE instituciones;
CREATE TABLE instituciones
(
id_institucion bigserial NOT NULL,
nombre character varying,
direccion character varying,
comentario character varying,
estado boolean,
CONSTRAINT pk_id_institucion PRIMARY KEY (id_institucion )
)
WITH (
OIDS... | true |
2efa2baaf2604f7ad34c6bef6f0d240a7619dadc | SQL | blenz3/leetcode | /ex183_customers_who_never_order/solution.sql | UTF-8 | 161 | 3.484375 | 3 | [] | no_license | /* Write your T-SQL query statement below */
SELECT
c.Name as Customers
FROM
Customers c LEFT JOIN Orders o ON c.Id = o.CustomerId
WHERE
o.Id is NULL | true |
3f57633f152a99472e8a76661946b05d972c9a21 | SQL | Neprincessa/Data-science | /лаба1/window_functions/2/B/report_2_2B.sql | UTF-8 | 618 | 4.09375 | 4 | [] | no_license | select CountryRegion, StateProvince,
count([SalesLT].[Customer].CustomerID) as AmountOfClients,
dense_rank ()
OVER (partition by CountryRegion order by count([SalesLT].[Customer].CustomerID) ) as DenseRank
from [SalesLT].[Customer]
left join [SalesLT].[CustomerAddress] on [SalesLT].[Customer].CustomerID = [Sale... | true |
ddad9a4a0ece2ba40c3e4e3036c24b341857e5aa | SQL | bcgov/mds | /migrations/sql/V2020.11.09.08.27__updated_now_progress_status_codes.sql | UTF-8 | 637 | 2.546875 | 3 | [
"Apache-2.0"
] | permissive | update now_application_progress_status set description='Referral' where application_progress_status_code='REF';
delete from now_application_progress_status where application_progress_status_code='VER';
delete from now_application_progress_status where application_progress_status_code='DEC';
INSERT INTO now_applicatio... | true |
761fb62d5238f7f48c9f4ee1a80e06f0f90acb05 | SQL | darklight721/roofster | /roofster.sql | UTF-8 | 2,019 | 3 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 3.5.2
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Aug 21, 2012 at 03:50 PM
-- Server version: 5.5.25a
-- PHP Version: 5.4.4
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*... | true |
d94baf3519a5b17251d6ba1ab3157a6f47ff7d79 | SQL | ruchira088/chirper-api | /user-service/conf/evolutions/default/2.sql | UTF-8 | 294 | 2.53125 | 3 | [] | no_license | -- !Ups
create table authentication_tokens(
session_token varchar(255),
user_id uuid not null,
secret_token varchar(255) not null,
created_at timestamp not null,
expires_at timestamp not null,
primary key (secret_token)
);
-- !Downs
drop table authentication_tokens;
| true |
aa238ab65e2b294ed976b515f60a124522b54852 | SQL | ItAllCanW8/SUBD | /5/task1.sql | UTF-8 | 611 | 3.625 | 4 | [] | no_license | use laba;
SET foreign_key_checks =0;
TRUNCATE TABLE student;
SET foreign_key_checks =1;
INSERT INTO student (id_first_name, id_surname, id_fathername,
id_personal_data)
WITH
temp_first_name AS
(SELECT id FROM first_name ORDER BY rand() LIMIT 100),
temp_surname AS
(SELECT id FROM surname ORDER BY rand() LIMIT 100),
te... | true |
bad6a606e5af36d1ecd91258daeccf67caee2f04 | SQL | bkramak/baseline | /OADB_JNB/sql/.ipynb_checkpoints/make_tables-checkpoint.sql | UTF-8 | 3,832 | 3.5625 | 4 | [] | no_license | /*
2020 Oct create database for operational assessments
author: brian kramak 518-925-9030
unlicensed and unwarranted
create OADB tables
*/
CREATE SCHEMA IF NOT EXISTS sandbox; -- for importing raw data
CREATE SCHEMA IF NOT EXISTS bl; -- baseline for the main tables
CREATE SCHEMA IF NOT EXISTS ats; -- f... | true |
992abc685d52323acbcd12140b810882a8e8518b | SQL | VeselinAtanasov/mysql-database-demos | /mysql-database-demos/06_SubqueriesAndJoins/lab/tasks/07_EmployeesWithProjects.sql | UTF-8 | 322 | 3.765625 | 4 | [] | no_license | SELECT e.`employee_id`, e.`first_name`, b.`name` AS 'project_name'
FROM `employees` AS e
JOIN `employees_projects` AS p
ON e.`employee_id` = p.`employee_id`
JOIN `projects` as b
ON b.`project_id` = p.`project_id`
WHERE DATE(b.`start_date`) > '2002-08-13' AND b.`end_date` IS NULL
ORDER BY e.`first_name`, b.`name`
LIMIT ... | true |
7ffc96bb016504783be564c3c0a2e0d73ed8fd52 | SQL | robgalicia/katsa_php | /Database/Tablas/GRADOESCOLARIDAD.sql | UTF-8 | 736 | 2.65625 | 3 | [] | no_license | /*==============================================================*/
/* DBMS name: MySQL 5.0 */
/* Created on: 30/12/2020 11:29:39 a. m. */
/*==============================================================*/
/*================================================... | true |
29d8d0e39e65dcd89fbefb313e0ca6f430e90e0f | SQL | Hoverbear/CSC-370 | /Assignment4/dump.sql | UTF-8 | 23,182 | 3.203125 | 3 | [] | no_license | --
-- PostgreSQL database dump
--
SET statement_timeout = 0;
SET client_encoding = 'UTF8';
SET standard_conforming_strings = on;
SET check_function_bodies = false;
SET client_min_messages = warning;
--
-- Name: plpgsql; Type: EXTENSION; Schema: -; Owner:
--
CREATE EXTENSION IF NOT EXISTS plpgsql WITH SCHEMA pg_cata... | true |
5dde0e78bcc53fe6c55d1e4029c16d39ad260775 | SQL | RaeChen07/SteamDataAnalysis | /production/data/sql/get_100_games.sql | UTF-8 | 228 | 3.421875 | 3 | [
"MIT"
] | permissive | -- Randomly selects 100 games from all apps.
-- Filter out non-game apps, order by random, and pick first 100.
USE steam;
CREATE TABLE app_id_info_100
SELECT *
FROM app_id_info A
WHERE A.type = "game"
ORDER BY rand()
LIMIT 100; | true |
fd044e03b53da0d362b9ab384c2350e5ebb3a6c6 | SQL | kiln/cartograms | /maps/usa.sql | UTF-8 | 3,065 | 3.25 | 3 | [] | no_license | -- US States
-- $ curl -LO http://geocommons.com/overlays/21424.zip
-- $ (mkdir 21424 && cd 21424 && unzip ../21424.zip)
-- $ shp2pgsql -s 4326 21424/usa_state_shapefile.shx | psql
-- http://spatialreference.org/ref/esri/102003/postgis/
INSERT into spatial_ref_sys (srid, auth_name, auth_srid, proj4text, srtext) value... | true |
39ea6878d7164f5f4f0525085edd572f992cd926 | SQL | AlexSh-l/Projects_JavaScript | /ImageGallery/db/imageviewdb.sql | UTF-8 | 1,684 | 3.0625 | 3 | [] | no_license | -- MySQL Script generated by MySQL Workbench
-- Sat May 8 13:34:08 2021
-- 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 |
4734f81644e7aafa0cf4a0eafb2193bafbafea8b | SQL | praisenoa/si-php-crud | /databasesi.sql | UTF-8 | 4,661 | 3.359375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.7.4
-- https://www.phpmyadmin.net/
--
-- Hôte : 127.0.0.1:3306
-- Généré le : jeu. 15 fév. 2018 à 12:48
-- Version du serveur : 5.7.19
-- Version de PHP : 7.1.9
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET... | true |
d4d68a006aadaa63894c2730f72d9610aa1d18d1 | SQL | BolderBrighterExperience/playground | /intern04/Proiect02/PACKAGES/pkg_unit_testing_body.sql | UTF-8 | 11,615 | 2.53125 | 3 | [] | no_license | CREATE OR REPLACE PACKAGE BODY pkg_unit_testing
AS
PROCEDURE prc_ut_add_department
IS
BEGIN
BEGIN
pkg_hr_departments.prc_add_department('Internship', 200, 1700);
dbms_output.put_line('Success on insert department.');
COMMIT;
EXCEPTION
WHEN OTHERS THEN
d... | true |
91a33c62d64ee448d0a6aaa3f7aaaa7c452080e3 | SQL | MLClark/Bookmarks | /Benefit Specific/HSA/BEK/Eligibility/BEK_HSA_elig_demo.sql | UTF-8 | 5,346 | 3.015625 | 3 | [] | no_license | select distinct
-- Only employees enrolled in the HDHP plan should be included with hsa eligibility
pi.personid
,'2' ::char(1) as sort_seq
,pbemed.benefitplanid
-- 1 - Demographic Information
,'146534' ::char(7) as employer_id
,' ' ::char(10) as division
,pi.identity ::char(9) as member_number
,pi.identity ::c... | true |
e00773daa508dcec31f93e139af446b203c9ca30 | SQL | niraj125/Training-Jan-2021 | /Modules/SQL/Day6/Niraj-Sapra/View/viewextraquery.sql | UTF-8 | 4,435 | 4.46875 | 4 | [] | no_license | USE DAY6SQLMore;
/* View Task */
-- 1. Write a query to find the addresses (location_id, street_address,
--city, state_province, country_name) of all the departments.
CREATE VIEW ViewDepartments
AS
SELECT d.DepartmentName,l.LocationID,l.StreetAddress,l.City,l.StateProvince,c.CountryName
FROM Countries c
JOIN Locat... | true |
e770220e71677459fedba8b0a2187beba2bb0638 | SQL | nivertech/Olive | /Database/Schema Objects/Schemas/Bitcoin/Programmability/Stored Procedures/GetLastProcessedTransationId.proc.sql | UTF-8 | 200 | 2.75 | 3 | [] | no_license | CREATE PROCEDURE [Bitcoin].[GetLastProcessedTransactionId]
@TransactionId VARCHAR(64) OUTPUT
AS
SELECT TOP 1 @TransactionId = TransactionId FROM Bitcoin.[Transaction]
ORDER BY CreatedAt DESC;
| true |
a8e1af7c3435f696a21f288f818dc3b7ba1fe627 | SQL | xycpand/my-lemon | /src/main/resources/dbmigrate/mysql/disk/V0_0_0_3__disk_acl.sql | UTF-8 | 467 | 3.15625 | 3 | [
"Apache-2.0"
] | permissive |
-------------------------------------------------------------------------------
-- disk acl
-------------------------------------------------------------------------------
CREATE TABLE DISK_ACL(
ID BIGINT AUTO_INCREMENT,
TYPE VARCHAR(50),
REF VARCHAR(64),
SHARE_ID BIGINT,
CONSTRAINT ... | true |
20a87046f82bea9bdfff67f07fbdbc8f71d2d268 | SQL | NelliMarliana/pw2020_193040165 | /Praktikum/P5_SENIN08_193040165/pw_193040165.sql | UTF-8 | 2,574 | 3.234375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.8.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Apr 17, 2020 at 12:36 PM
-- Server version: 10.1.37-MariaDB
-- PHP Version: 7.3.0
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD... | true |
2c684dc47a0e7ec2a04067d217415b8194b32674 | SQL | MauryaSrishti/NextecAssignments | /Day4_03Jan2020/PL_SQL_ExceptionHandlingPractice.sql | UTF-8 | 1,964 | 3.84375 | 4 | [] | no_license | SET serveroutput ON;
SET verify OFF;
--NAmed System Defined Exception
DECLARE
vname employees.last_name%TYPE;
vsal employees.salary%TYPE;
BEGIN
SELECT last_name, salary
INTO vname, vsal
FROM employees
WHERE employee_id IN (&empid);
dbms_output.put_line(vname||' '||vsal);
EX... | true |
693dfdb47f94625300d4d207a2c91f05f15ac89e | SQL | neel4software/PizzaAppRepo | /sql_test_db.sql | UTF-8 | 2,668 | 3.328125 | 3 | [] | no_license | -- --------------------------------------------------------
-- Host: 127.0.0.1
-- Server version: 5.5.29-MariaDB - mariadb.org binary distribution
-- Server OS: Win32
-- HeidiSQL version: 7.0.0.4053
-- Date/time: 2014-02-11 04:35:03... | true |
628bda2a978f928819e85565803452801ee9cbaa | SQL | itsdanny/SQL | /Sage/Planning/ITCR10019 Update SecurityRefs.sql | UTF-8 | 593 | 3.21875 | 3 | [] | no_license | -- this script is to update the security ref for IT change 10019
-- back up data
select * into scheme.bmwohm_10019 from scheme.bmwohm
select security_reference AS REF, CASE security_reference WHEN 'AM' THEN '1' WHEN 'PM' THEN '2' WHEN 'NS' THEN '3' WHEN '' THEN '' END, *
from scheme.bmwohm
WHERE order_date > '2016-0... | true |
6ee71ff13afbce44700865e936b81908d62ded45 | SQL | wuhuizhong/oracle.os_tools | /dbtools/OS_DIR_FIX.sql | UTF-8 | 830 | 2.625 | 3 | [
"MIT"
] | permissive | REM
REM This script must be run as SYS on CDB (Container level) and will spool out a script
REM for setup etcdba and DBTOOLS in all PDB's
REM
REM Then run the run_me_<CDB>.sql script to setup etcdba and DBTOOLS in all PDB's on a container.
REM The run_me script will be created in the same folder as this script is sta... | true |
952d296b56c964d4828195350b5cb35c7e37902c | SQL | sebhani/RestaurantOrderingSystem | /restaurant-ordering-system-api/src/main/resources/restaurantorderingsystem_db.sql | UTF-8 | 898 | 3.046875 | 3 | [] | no_license | CREATE DATABASE restaurantorderingsystem_db;
USE restaurantorderingsystem_db;
DROP TABLE IF EXISTS `item`;
CREATE TABLE `item` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(45) NOT NULL,
`description` varchar(200) NOT NULL,
`price` double NOT NULL,
`availability` tinyint(1) NOT NULL,
PRIMARY KEY (... | true |
f2a4ba6ce6606b877a76e63cfc242cabf1810649 | SQL | wudc5/LeetCode | /bytedance/TopN-sql/Solution.sql | UTF-8 | 185 | 3.390625 | 3 | [] | no_license | select a.*
from (
select country,city,visitors, row_number() over (partition by city order by visitors desc ) rank
from tripdata
order by country,city,visitors desc
) a
where a.rank<=3; | true |
9b7d07c35f030ff7c195afc4118c64c6eff5680b | SQL | temasarkisov/BMSTU-Data-Bases | /lab01/create_tables/create_table_lap_time.sql | UTF-8 | 241 | 2.90625 | 3 | [] | no_license | CREATE TABLE Lap_time(
race_id INTEGER,
driver_id INTEGER,
lap INTEGER,
position INTEGER,
time TIME,
FOREIGN KEY (race_id) REFERENCES race (race_id),
FOREIGN KEY (driver_id) REFERENCES driver (driver_id)
);
| true |
8864700eb5f6f056abac383979770235172b4907 | SQL | CityofToronto/anchorTO_DB | /CreateTables_R2.sql | UTF-8 | 1,745 | 3.265625 | 3 | [] | no_license | ALTER TABLE network.base_centreline
ADD COLUMN shape_length numeric(38, 3);
--drop table network.DMN_PLAN_TYPE_EXT;
CREATE TABLE network.DMN_PLAN_TYPE_EXT
(EXT_NAME varchar(12) NOT NULL ,
EXT_TYPE varchar(6) NOT NULL ,
DESCRIPTION varchar(500) NOT NULL ,
PLAN_TYPE varchar(50) NOT NULL ,
SORT_SEQUENCE n... | true |
bea03ac85a012d6233d7eea4109d499cdf74fb98 | SQL | voatarc/voatarc | /submission-tables.sql | UTF-8 | 1,369 | 3.3125 | 3 | [
"MIT"
] | permissive |
START TRANSACTION;
SET time_zone = "+00:00";
-- --------------------------------------------------------
-- --------------------------------------------------------
CREATE TABLE submission
(
auto_id INT NOT NULL AUTO_INCREMENT
, submission_id INT NOT NULL
, title VARCHAR( 200 ) NULL
, time... | true |
3c78ac6acda6a662a5374992f499d4181675c877 | SQL | evrimulgen/Sapia_Oracle | /bi/postpago/sql/2_vf2_015.sql | UTF-8 | 928 | 3.328125 | 3 | [] | no_license | WHENEVER SQLERROR EXIT 1;
SET ECHO ON;
SET SERVEROUTPUT ON;
SET TIMING ON;
WHENEVER SQLERROR EXIT 1;
BEGIN
DM.PKG_MGR_DWO_UTIL.PRC_DROP_TABLE(X_DES_TABLA => 'DM.DW_SPSS2_VF2_015');
END;
/
ALTER SESSION SET NLS_DATE_FORMAT='DD/MM/RRRR';
CREATE TABLE DM.DW_SPSS2_VF2_015 AS
SELECT PERIODO, MSISDN, VF2_015 FROM (
SELE... | true |
5447deabeb957a200941429a3d6ef69eb08944de | SQL | goran-erhartic-devtech/puphet_mongodb_app | /database/quickMySQL.sql | UTF-8 | 799 | 2.75 | 3 | [] | no_license | CREATE SCHEMA `guest` ;
CREATE TABLE `guest`.`employees` (
`id` INT NOT NULL AUTO_INCREMENT,
`Name` VARCHAR(45) NOT NULL,
`Age` INT NOT NULL,
`Project` VARCHAR(45) NULL,
`Department` VARCHAR(45) NULL,
`isActive` TINYINT(1) NULL,
PRIMARY KEY (`id`));
INSERT INTO `guest`.`employees` (`Name`, `Age`, `Proj... | true |
a4aad360838ac0b2e25593be5810c3c2d447f73a | SQL | ralungei/OneClickWeb | /Debugging/prueba.sql | UTF-8 | 1,911 | 3.3125 | 3 | [] | no_license |
CREATE DATABASE Gestion;
USE Gestion;
CREATE TABLE IF NOT EXISTS Cliente
(
DNI INTEGER NOT NULL,
nombre CHAR(20) NOT NULL,
apellidos CHAR(20) NOT NULL,
fechaNac DATE NULL,
direccion CHAR(20) NULL,
PRIMARY KEY (DNI));
CREATE TABLE IF NOT E... | true |
f72a9ec3f145ea9c5f8a8bb4c62aa9693e903248 | SQL | sumit4myself/Esykart | /esykart-service/store-service/src/main/resources/sql/h2-setup.sql | UTF-8 | 780 | 2.90625 | 3 | [
"CC0-1.0",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | INSERT INTO banner(name,status) VALUES ('Home Page Banner','A');
-- INSERT INTO banner_item (action_url,desc,image_url, title, banner_id) VALUES('');
INSERT INTO nav_menu (name,status) VALUES('Default Menu','A')
-- INSERT INTO nav_menu_item (name, category_id,page_id, parent_id, menu_id )
INSERT INTO page (name,... | true |
8d50d78f9896ebe4d901a83aee7fed863bbf163d | SQL | alexfdz/meetme | /meetme-openfire/src/database/meetme_mysql.sql | UTF-8 | 770 | 3.328125 | 3 | [] | no_license | INSERT INTO ofVersion (name, version) VALUES ('meetme', 0);
CREATE TABLE ofMeeting (
id BIGINT NOT NULL,
owner VARCHAR(32) NOT NULL,
description VARCHAR(255),
position VARCHAR(255),
start_time DATETIME,
status INTEGER NOT NULL,
PRIMARY KEY (id... | true |
79b493d165b78ff77c6c5ddba3819054fcd6809f | SQL | radtek/Telecommunication | /SIM_TRADE/DataBase/SCRIPTS_FROM_DB/SIM_TRADE/TRIGGER/TIU_CONTRACTS.SQL | UTF-8 | 8,168 | 3.125 | 3 | [] | no_license |
CREATE OR REPLACE TRIGGER "SIM_TRADE"."TIU_CONTRACTS"
BEFORE INSERT OR UPDATE ON CONTRACTS
REFERENCING NEW AS NEW OLD AS OLD FOR EACH ROW
declare
vSTART integer;
vEND integer;
BEGIN
IF INSERTING THEN
IF NVL(:NEW.CONTRACT_ID, 0) = 0 then
:NEW.CONTRACT_ID := NEW_CONTRACT_ID;
END IF;
:NEW.U... | true |
8fe62a0e3b9af77eba1772a1aa3ad32ae497285c | SQL | Ramonrune/database-sample | /20171004/EXERCICIOS_FUNCOES.sql | WINDOWS-1252 | 11,588 | 3.703125 | 4 | [] | no_license | /* -------------------------------------------------------
Algumas funes:
-----------------------------------
CONVERSO DE TIPOS: http://www.firebirdsql.org/refdocs/langrefupd20-cast.html
-----------------------------------
CAST (<atributo> AS <tipo>)
------------------------------------------------------- */
-- 02.01. ... | true |
3a641d3f62059da1c61dd9eb19a9c825c90d62ab | SQL | rishi871/MyCheatSheet | /sqlscript/grades.sql | UTF-8 | 506 | 3.40625 | 3 | [] | no_license | --explain explained
-- make sure to run the container with at least 1gb shared memory
-- docker run --name pg —shm-size=1g -e POSTGRES_PASSWORD=postgres —name pg postgres
create table grades (
id serial primary key,
g int,
name text
);
insert into grades (g,
name )
select
random()*100,
substring(md5(rando... | true |
532faa48e6bb3a5fb2e5b1b79dc526e972fe901d | SQL | veromejia/holbertonschool-higher_level_programming | /0x0D-SQL_introduction/103-max_state.sql | UTF-8 | 244 | 3.421875 | 3 | [] | no_license | -- Write a script that displays the max temperature of each state (ordered by State name).
-- Results should display the state and the max_temp (in this order)
SELECT state, MAX(value) max_temp FROM temperatures GROUP BY state ORDER BY state;
| true |
73573af5531ec02e0c0870438380225797847cca | SQL | Leonarden/research | /emorobots/src/main/resources/sql/create_REV1.sql | UTF-8 | 15,586 | 3.890625 | 4 | [] | no_license | drop database if exists emorobots;
create database emorobots;
use emorobots;
##123456789-TOKEN-12
drop table if exists WeightNorm;
##123456789-TOKEN-13
create table WeightNorm(
/*weightNormId BIGINT UNSIGNED NOT NULL AUTO_INCREMENT,*/
entityNormId BIGINT UNSIGNED NOT NULL,
entityName Varchar(30) NOT NULL,
f... | true |
203ae2b099b431e34082345bdf37bd8e3a0f4fda | SQL | CrystleJ/QueryBooksDatabase | /Booksdatabase/Booksdatabase_authors.sql | UTF-8 | 2,292 | 2.96875 | 3 | [] | no_license | -- MySQL dump 10.13 Distrib 8.0.12, for macos10.13 (x86_64)
--
-- Host: 127.0.0.1 Database: Booksdatabase
-- ------------------------------------------------------
-- Server version 8.0.12
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESU... | true |
ef858e82aed4093aecc6ea80ced8fe66caf667b5 | SQL | mishellscripts/Cat-Adoption-Center | /sql/procedures.sql | UTF-8 | 3,416 | 4.125 | 4 | [] | no_license | DROP PROCEDURE IF EXISTS adopt_cat;
delimiter //
CREATE PROCEDURE adopt_cat(IN personID INT, IN catID INT)
BEGIN
INSERT INTO adoption(pID, cID) VALUES(personID, catID);
END;
//
delimiter ;
DROP PROCEDURE IF EXISTS donate_cat;
delimiter //
CREATE PROCEDURE donate_cat(IN age INT, IN gender CHAR, IN breed VARCHAR(20), IN... | true |
f91998dba79952bf3a156cc3f37f890a5a2f2e43 | SQL | deflaux/bigquery-examples | /1000genomes/sql/reproducing-vcfstats/snp-variant-counts-brca1.sql | UTF-8 | 358 | 3.375 | 3 | [
"Apache-2.0"
] | permissive | # Count SNPs by base pair transition across BRCA1.
SELECT
reference_bases,
alternate_bases AS allele,
COUNT(alternate_bases) AS num_snps
FROM
[genomics-public-data:1000_genomes.variants]
WHERE
reference_name = '17'
AND start BETWEEN 41196311
AND 41277499
AND vt ='SNP'
GROUP BY
reference_bases,
allel... | true |
ed579d3f2898a31cc8f3b5daa91610075a180205 | SQL | imanojkumar/mortgage-dashboard | /postgresql.sql | UTF-8 | 3,452 | 3 | 3 | [
"MIT"
] | permissive | CREATE TABLE "Acct_perf" (
"ACCT_NUM" int NOT NULL,
"PRD_CD" int NOT NULL,
"CREDIT_RISK_INDICATOR" varchar(20),
"TM_ON_BOOK" int,
"DAY_PST_DUE" int,
"RMNG_AMORT_PERIOD" int,
"DEFLT_INSUR_CD" varchar(20),
"CRNT_AUTH_LIMIT_AMT" decimal,
"OS_BAL_AMT" decimal,
"PRPTY_TYPE_CD" varchar(20),
"PRPTY_POSTAL_CD" char(... | true |
258528bda62f976b350316930702c06316d82b44 | SQL | cmu-delphi/github-deploy-repo | /src/ddl/github_deploy_repo.sql | UTF-8 | 1,381 | 3.625 | 4 | [
"MIT"
] | permissive | /*
`github_deploy_repo` is the table where repo information is stored.
+----------+--------------+------+-----+---------------+----------------+
| Field | Type | Null | Key | Default | Extra |
+----------+--------------+------+-----+---------------+----------------+
| id | int(11) |... | true |
ee66c90917f986acc5b1fcf320cded7b32992c64 | SQL | cjx1996/Java_Learning | /2_MySQL/2_代码/day02/8. 【案例讲解】分组查询.sql | UTF-8 | 1,003 | 4.1875 | 4 | [] | no_license | USE myemployees;
#1. 查询各job_id的员工工资的最大值、最小值、平均值、总和,并按job_id升序
SELECT
MAX(salary) maximum,
MIN(salary) minimum,
AVG(salary) average,
SUM(salary) 'sum' ,
job_id
FROM
employees
GROUP BY job_id
ORDER BY job_id ASC ;
#2. 查询员工最高工资和最低工资的差距
SELECT
MAX(salary) - MIN(salary) difference
FROM
employees ;
#3... | true |
f20035522da202c84dbd148e507f6b3b964e0ef2 | SQL | MartinHolding/CodecademyProjects | /Twitch Data Project/sqlQueries.sql | UTF-8 | 1,756 | 4.4375 | 4 | [] | no_license | /* Check what data we have */
SELECT *
FROM stream
LIMIT 20;
SELECT *
FROM chat
LIMIT 20;
/* What distinct games do we have */
SELECT DISTINCT game
FROM stream;
SELECT DISTINCT channel
FROM stream;
/* Get a count of the viewers for each game */
SELECT game, COUNT(*)
FROM stream
GROUP BY game
ORDER BY COUNT(*) DESC... | true |
0b869cd322b51e09b13288e61ceeae1435a90a12 | SQL | qingyuan1017/emory_hw | /EMORY_CS_HW/cs377/project5/5.sql | UTF-8 | 103 | 2.796875 | 3 | [] | no_license | select distinct jnum A
from spj
where pnum in
(select pnum
from spj
where spj.snum = 's4')
order by A
| true |
879ffd07894cddc2a7ae2271d23f1301fb00d15d | SQL | glennoph/mysql-data-analytics | /sql/storedprocedure/02-storedprocedure-with-output.sql | UTF-8 | 789 | 3.890625 | 4 | [] | no_license | -- storedprocedure-with-output
use employees;
select * from employees;
select emp_no
from employees
where first_name = 'Mary'
and last_name = 'Sluis';
-- Create a procedure called ‘emp_info’
-- that uses as parameters the first and the last name of an individual, and
-- returns their employee number.
drop proce... | true |
8d4117ef45f52be8467e807b7086f09d332bd9a1 | SQL | chosemove/University-of-homework | /数据库大实习/数据库代码/animalSystem/procedure/create_procedure_pr_insert_into_animal.sql | GB18030 | 899 | 2.984375 | 3 | [] | no_license | CREATE OR REPLACE
PROCEDURE pr_insert_into_animal
/*
洢pr_insert_into_animal
ڶANIMALв룬ͼƬǷƶطţڴ˴
룺
P_ANIMAL_ID in VARCHAR2,
P_ANIMAL_NAME in VARCHAR2,
p_ANIMAL_SPECIES in VARCHAR2,
P_ANIMAL_AGE in Number,
P_SHELTER_ID in VARCHAR2,
p_out_resulutΪʾǷɹ
*/
(
P_ANIMAL_ID in VARCHAR2,
P_ANIMAL_NAME in VARCHAR2,
p_ANIM... | true |
122d53fe9a964e27a553a93fb7fb5da0129344a6 | SQL | amandar8/killbase | /killbase.sql | UTF-8 | 2,905 | 3.78125 | 4 | [] | no_license | DROP DATABASE IF EXISTS killbase;
CREATE DATABASE killbase;
\c killbase
CREATE TABLE assassins (id serial primary key, full_name text, weapon text, age integer, price integer, rating numeric (2,1), kills integer);
INSERT INTO assassins (full_name, weapon, age, price, rating, kills)
VALUES
('Alexander Duggan','Sniper... | true |
05425e041733ea39ca1dd22010cffd3a343a08e1 | SQL | Devipurwita24/belajar-bootstrap | /belajarbootstrap.sql | UTF-8 | 2,451 | 2.84375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.9.0.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Waktu pembuatan: 21 Mar 2020 pada 07.05
-- Versi server: 10.4.6-MariaDB
-- Versi PHP: 7.3.9
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHAR... | true |
669271421667a06a644d25ad17022e319170b5aa | SQL | zhaoy1992/xtbg-whtjy-new | /db/公文管理/更新记录/word模板管理表.sql | UTF-8 | 5,758 | 3.8125 | 4 | [] | no_license | -- Add/modify columns
alter table OA_FLOW_BASEINFO add flow_tyle CHAR(1) default '1';
alter table OA_FLOW_BASEINFO add TEMPLATE_ID VARCHAR2(50);
-- Add comments to the columns
comment on column OA_FLOW_BASEINFO.flow_tyle
is '流程类型(1:表单 ,2: word)';
comment on column OA_FLOW_BASEINFO.TEMPLATE_ID
is 'word模板ID'... | true |
df6d9fe64180f3070c2d9fde73942e4590508b92 | SQL | sbmorvant/EPBI414 | /EPBI414/Week 6/sql_Examples.sql | UTF-8 | 2,545 | 4.40625 | 4 | [] | no_license | -- +--------------------------------+
-- | |
-- | EPBI414 Unit 6 SQL Examples |
-- | sql_EPBI414_Unit6_Examples.sql |
-- | |
-- | Author: Thomas A. Rehman |
-- | tar9@case.edu |
-- | |
-- +------------... | true |
63577cf233a162661a99450a14836293cdab02a6 | SQL | labradorsabrina/SQL | /Pets/PetrescueQueries.sql | UTF-8 | 1,980 | 4.6875 | 5 | [] | no_license | --function that calculates the total cost of all animal rescues in the PETRESCUE table
SELECT SUM(cost)
FROM PETRESCUE;
--function that displays the total cost of all animal rescues in the PETRESCUE table in a column called SUM_OF_COST
SELECT SUM(cost) as SUM_OF_COST
FROM PETRESCUE;
--function that displays the maxim... | true |
ce1ebc765bd5bdc7b1d47c99e1b8f1ca79f30876 | SQL | Mighty-Mesquite/Reviews_Api | /schemas/schema.sql | UTF-8 | 1,477 | 3.8125 | 4 | [] | no_license | DROP DATABASE IF EXISTS reviewsapi;
CREATE DATABASE reviewsapi;
USE reviewsapi;
CREATE TABLE reviewer (
id int NOT NULL AUTO_INCREMENT PRIMARY KEY,
reviewer_name varchar(50) NOT NULL
);
CREATE TABLE products (
product_id INT NOT NULL PRIMARY KEY
);
CREATE TABLE reviews (
review_id int NOT NULL PRIMARY KEY,... | true |
853d4bae3da76f439c18970dca97887cb1adbd46 | SQL | gmicheva/SoftUni | /MsSQL/04.Built-in-Functions-Exercises/07.Find-Towns-Not-Starting-With.sql | UTF-8 | 127 | 3.390625 | 3 | [] | no_license | --Problem 7. Find Towns Not Starting With
SELECT * FROM Towns
WHERE LEFT(Name, 1) NOT IN ('R', 'B', 'D')
ORDER BY Name ASC | true |
480349e058a1d22cd2b30e6ad150457f9fe6429f | SQL | Alxbry28/AhrisPH | /ahrisph.sql | UTF-8 | 13,790 | 3 | 3 | [
"MIT"
] | permissive | -- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Oct 07, 2020 at 07:13 PM
-- Server version: 10.4.14-MariaDB
-- PHP Version: 7.4.10
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIE... | true |
50d9d5b5dafa387ca724834f9c6f766096669e5a | SQL | tim0dd/PassTheBomb-Backend | /src/main/resources/data.sql | UTF-8 | 6,248 | 2.578125 | 3 | [] | no_license | insert into PUBLIC.CHALLENGE (ID, CREATED_DATE, TEXT, TIME_LIMIT)
values ('cc4cd298-a49e-4043-bea0-eaa5ec3a5a1f', '2020-12-15 16:23:17.661000', 'Make loud monkey noises!', 60);
insert into PUBLIC.CHALLENGE (ID, CREATED_DATE, TEXT, TIME_LIMIT)
values ('79c74f97-d902-4d68-86b6-4df02a38e067', '2020-12-15 16:24:31.834000',... | true |
adb8c9a57dbbf8f0533327fed018f27f213f58ab | SQL | SOLA-TONGA/database_tonga | /extension/business_rules.sql | UTF-8 | 5,993 | 3.71875 | 4 | [] | no_license | -- Survey Fee Calculation Business Rules
INSERT INTO system.br (id, display_name, technical_type_code, feedback, description, technical_description)
SELECT 'calculate-survey-fee', 'Calculate Survey Fee', 'sql', null,
'Calculates the fee appliciable for the survey service based on the area of the parcel(s) to be surv... | true |
9de780a66de4c2fd874ec370ed5f5f08a0af832c | SQL | claudiomed/CursoPHP | /Practica/AprendiendoSQL/07- Ejercicios/Ejercicio25.sql | UTF-8 | 336 | 3.84375 | 4 | [] | no_license | #OBTENER UNA LISTA DE LOS NOMBRES DE LOS CLIENTES CON EL IMPORTE DE SUS ENCARGOS ACUMULADO#
SELECT cl.id AS 'ID CLIENTE', cl.nombre AS 'NOMBRE CLIENTE', (e.cantidad*co.precio) AS 'TOTAL DE COMPRA'
FROM clientes cl
INNER JOIN encargos e ON cl.id=e.cliente_id
INNER JOIN coches co ON co.id=e.coche_id
ORDER BY (e.cantidad... | true |
446faec258105fda7106850adb1cb26b3b61a3a0 | SQL | jsbxyyx/seata_example | /script/init.sql | UTF-8 | 2,925 | 3.859375 | 4 | [] | no_license | CREATE DATABASE `test`;
CREATE TABLE `t_order` (
`user_id` int(11) NOT NULL,
`amount` decimal(10,2) NOT NULL,
`create_time` datetime NOT NULL,
PRIMARY KEY (`user_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
CREATE TABLE `t_user` (
`id` int(11) NOT NULL,
`name` varchar(20) NOT NULL,
`create_time` dateti... | true |
c24fc66ade5d3e3ccfb5ca8a3cf122cd163234c8 | SQL | winjune/photo-map | /photo-map.sql | UTF-8 | 2,905 | 3.5 | 4 | [
"MIT"
] | permissive | /*
Navicat Premium Data Transfer
Source Server :
Source Server Type : MySQL
Source Server Version : 50646
Source Host :
Source Schema : photo_map
Target Server Type : MySQL
Target Server Version : 50646
File Encoding : 65001
Date: 12/12/2019 12:00:59
*/
SET NAMES ut... | true |
5ab9a51e91f3283aaf3a8439e268cd6787ed92c8 | SQL | kimkahunja/Inventory2 | /sql/20160429/post_adjustment.sql | UTF-8 | 1,066 | 3.125 | 3 | [] | no_license | DROP PROCEDURE IF EXISTS inventory.post_adjustment;
CREATE PROCEDURE inventory.`post_adjustment`(v_pdt_code INT,v_qty DOUBLE,v_location INT,OUT v_rtnVal VARCHAR(1000))
BEGIN
DECLARE v_prod_description VARCHAR(400);
DECLARE v_count_stock INTEGER;
SET autocommit = 0;
SELECT COUNT(*... | true |
1a2456b63ca6949ecf6dfd6be1aa06d82df8c879 | SQL | deniwerikmartins/financeiro | /financeiro.sql | UTF-8 | 3,188 | 3.171875 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | -- phpMyAdmin SQL Dump
-- version 4.4.15.10
-- https://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: 18-Jan-2019 às 10:31
-- Versão do servidor: 5.5.60-MariaDB
-- PHP Version: 7.2.11
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SE... | true |
8fab09120c9cfbdb522a7afa0e1bc4e6dfb098d9 | SQL | oehrlis/oradba | /sql/create_password_hash.sql | UTF-8 | 4,330 | 3.453125 | 3 | [
"UPL-1.0",
"Apache-2.0"
] | permissive | --------------------------------------------------------------------------------
-- OraDBA - Oracle Database Infrastructur and Security, 5630 Muri, Switzerland
--------------------------------------------------------------------------------
-- Name......: create_password_hash.sql
-- Author....: Stefan Oehrli (oe... | true |
23cef0a596256fb464a86848ab8ace7158940779 | SQL | juheon97/cs313-JS-node | /data/teamdata.sql | UTF-8 | 449 | 3.03125 | 3 | [] | no_license | DROP TABLE child;
DROP TABLE person;
CREATE TABLE person (
person_id SERIAL PRIMARY KEY,
person_first_name VARCHAR(30) NOT NULL,
person_last_name VARCHAR(30) NOT NULL,
birth DATE NOT NULL
);
CREATE TABLE child (
child_id SERIAL PRIMARY KEY,
child_first VARCHAR(30) NOT NULL,
... | true |
31d311cc04d5532ffe10432f7ceb4c7a43471835 | SQL | DesarrolladorHeber/PruebaCodigo | /listas_proveedores/Docs/2.tabla_lista_precios_proveedores.sql | UTF-8 | 1,461 | 3.46875 | 3 | [
"Apache-2.0"
] | permissive | CREATE TABLE lista_precios_proveedores (
cod_lista integer NOT NULL,
codigo_producto character varying(40) NOT NULL,
precio_bruto numeric(12,0) DEFAULT 0 NOT NULL,
iva numeric(3,0) DEFAULT 0,
precio_neto numeric(12,0) DEFAULT 0 NOT NULL,
unidad_empaque numeric(12,0) DEFAULT 0 NOT NULL
);
COMME... | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.