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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
2e85e6544fff21c57c6ba84f293f34a3d1514de8 | SQL | agbrothers/Solve-Database-Build | /schema.sql | UTF-8 | 9,297 | 3.75 | 4 | [] | no_license | -- Define all tables and relations in the Solve Database (MySQL)
create database solve;
-- ROOT TABLE
create table users(
user_id char(36) not null,
user_creation_time datetime not null,
language varchar(30),
retention_id int,
ab_test_id int,
location_id int,
gender_id int,
device_id int,
primary key... | true |
a49f8ac91950967b9a0c9bbfefc4fcfe70f08754 | SQL | carlespoles/DSCI6010-student | /SQL-03.sql | UTF-8 | 1,188 | 3.984375 | 4 | [] | no_license | -- Example of creating custom size bins for histograms.
WITH
temp_recipes AS (
SELECT
t1.*
FROM
`firebase-wellio.recipes.imported_recipes` t1
INNER JOIN (
SELECT
MAX(updated_at) AS last_update,
id
FROM
`firebase-wellio.recipes.imported_recipes`
GROUP BY
id) t2
ON
... | true |
c769e20122f97e239864b77b16ac4dd3fe123d3d | SQL | theboocock/OtagoGalaxy | /src/ensembl-variation/sql/patch_55_56_b.sql | UTF-8 | 877 | 2.53125 | 3 | [] | no_license | # added subsnp_id in the variation_synonym, allele, population_genotype, tmp_individual_genotype_single_bp, individual_genotype_multiple_bp table
##################
alter table variation_synonym add subsnp_id int(15) unsigned after variation_id, add key subsnp_idx(subsnp_id);
alter table allele add subsnp_id int(15) u... | true |
a723e422d00beb57c9420e5c945d01f4b481b01d | SQL | brianpacia/CS-122-Pure-Detail | /Dummy Data.sql | UTF-8 | 5,321 | 2.828125 | 3 | [] | no_license | //product
insertProduct("Pancit Bihon", "cooked food", 35.00, "1 cup per order");
insertProduct("Adobong Manok", "cooked food", 50.00, "3 pieces of meat per order");
insertProduct("Sinigang na Baboy", "cooked food", 50.00, "3 pieces of meat per order");
insertProduct("Plain Rice", "cooked food", 15.00, "1 cup per order... | true |
bbc3dc54cd86f4a19662506cfd958299244ee4dd | SQL | geert-timmermans/sql | /php-pdo/sql_dump/weatherapp.sql | UTF-8 | 1,216 | 2.84375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.6.6deb5
-- https://www.phpmyadmin.net/
--
-- Host: localhost:3306
-- Generation Time: Apr 23, 2019 at 02:49 PM
-- Server version: 5.7.25-0ubuntu0.18.04.2
-- PHP Version: 7.2.15-0ubuntu0.18.04.2
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHA... | true |
203ae0ebb61188bb35feb2bc717265cdafd0f695 | SQL | jsonlog/sqlserver | /9/22/SQLQuery.sql | WINDOWS-1252 | 167 | 3.40625 | 3 | [] | no_license | USE db_2012
SELECT student.Sno,student.Sex,student.Sage,Sc.Grade
FROM student JOIN Sc ON student.Sno = Sc.Sno
WHERE student.Sex = ''
ORDER BY student.Sage DESC
| true |
bcaec9fecdbca6a2d40185420c88f4ffb77afe25 | SQL | suomenriistakeskus/oma-riista-web | /scripts/database/reference-data/import/harvest_season.sql | UTF-8 | 1,028 | 3.640625 | 4 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | CREATE TABLE import_harvest_season (
hunting_year INTEGER NOT NULL,
game_species_official_code INTEGER NOT NULL,
name_finnish VARCHAR(255) NOT NULL,
name_swedish VARCHAR(255) NOT NULL,
begin_date DATE NOT NULL,
end_date DATE NOT NULL,
end_of_reporting_date DATE NOT NULL,
begin_date2 DATE,
end_date2 DA... | true |
85261527c14ba9ab11c88e513abdcd51c4a0716a | SQL | efrozo23/crud-valid | /valid-test/src/main/resources/schema-all.sql | UTF-8 | 408 | 2.890625 | 3 | [] | no_license | SET MODE MySql;
DROP TABLE usuarios IF EXISTS;
CREATE TABLE usuarios (
id INT AUTO_INCREMENT PRIMARY KEY,
name VARCHAR(80) NOT null,
lastname VARCHAR(30) NOT null,
status BOOLEAN not null default 0
);
CREATE SEQUENCE id_user_key;
insert into usuarios (id,name,lastname) values (100,'Elkin','Rozo'... | true |
440169d56ab8a5caff224c6e5f0ba20c0088b712 | SQL | RCMAS-2018-21-Projects/Online-Gym-Management-System | /gym.sql | UTF-8 | 8,735 | 3.390625 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 3.4.10.1
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Nov 26, 2020 at 04:57 PM
-- Server version: 5.5.20
-- PHP Version: 5.3.10
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;... | true |
3a680983eb824596af721ca538cf43efe115d2f0 | SQL | raymondelooff/profmos | /profmos_2015-09-18.sql | UTF-8 | 31,225 | 3.078125 | 3 | [] | no_license | # ************************************************************
# Sequel Pro SQL dump
# Version 4135
#
# http://www.sequelpro.com/
# http://code.google.com/p/sequel-pro/
#
# Host: delooff.synology.me (MySQL 5.5.43-MariaDB)
# Database: profmos
# Generation Time: 2015-09-18 12:46:53 +0000
# *******************************... | true |
d900349aa32f72ddbc3cb62f7b62d4b3977b827f | SQL | JuliaSlipchuk/DB-WindowsForm | /SQLQuery1.sql | UTF-8 | 372 | 2.921875 | 3 | [] | no_license | USE BeautySalo
CREATE TABLE ServiceBS
(
ID INT PRIMARY KEY IDENTITY,
FirstName NVARCHAR(100) NOT NULL,
SurName NVARCHAR(200) NOT NULL,
DirectionID INT NOT NULL,
ExhibitNumber INT NOT NULL,
FOREIGN KEY (DirectionID) REFERENCES Category(ID)
)
CREATE TABLE Category
(
ID INT PRIMARY KEY IDENTITY,
NameC NVARCHAR(1... | true |
9be8dfbd2c64f8bbec1f4c21a3e3ca7ce6362459 | SQL | JasmineBreeze/ToDoBackend | /todos_db.sql | UTF-8 | 2,017 | 2.859375 | 3 | [] | no_license | -- MySQL dump 10.13 Distrib 8.0.18, for osx10.14 (x86_64)
--
-- Host: techreturnersdb.c51zfs9re5y0.eu-west-1.rds.amazonaws.com Database: todos
-- ------------------------------------------------------
-- Server version 5.7.26-log
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_C... | true |
4fddd8c621e28ec5a8afc151685737bd9ce82b40 | SQL | bhavsarvishwa/DreamHome | /sql/property_types.sql | UTF-8 | 565 | 2.984375 | 3 | [] | no_license |
DROP TABLE IF EXISTS property_types;
CREATE TABLE property_types(
value INT PRIMARY KEY,
property VARCHAR(30) NOT NULL
);
ALTER TABLE property_types OWNER TO group17_admin;
INSERT INTO property_types (value, property) VALUES (1, 'Detached ');
INSERT INTO property_types (value, property) VALUES (2, 'Townhouse');
I... | true |
efda36e92b64643bd4b14e564a058f2e3675d269 | SQL | XingXing2019/LeetCode | /Database/LeetCode 1193 - MonthlyTransactionsI/MonthlyTransactionsI_SQLServer.sql | UTF-8 | 312 | 3.734375 | 4 | [] | no_license | SELECT LEFT(trans_date, 7) AS month, country,
COUNT(*) AS trans_count,
SUM(CASE state WHEN 'approved' THEN 1 ELSE 0 END) AS approved_count,
SUM(amount) AS trans_total_amount,
SUM(CASE state WHEN 'approved' THEN amount ELSE 0 END) AS approved_total_amount
FROM transactions GROUP BY country, LEFT(trans_date, 7); | true |
d9cbe17dfdbd360ca2f5021d59d217fbc8117db7 | SQL | OscarAnza/Sistema-de-Informacion | /Base de datos de Pedidos.sql | UTF-8 | 2,146 | 3.546875 | 4 | [] | no_license | -- MySQL Script generated by MySQL Workbench
-- Sat Jun 2 20:44:09 2018
-- 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='TR... | true |
c55e2f6401cbf765043f152bfb3ef5be6b27e011 | SQL | AlifyaFebriana/data-analyst-101 | /Progate/sql_dojo_1/page9/exercise2.sql | UTF-8 | 186 | 3.203125 | 3 | [] | no_license | -- dapatkan id dan nama pengguna yang membeli "sandal"
SELECT users.id, users.name
FROM sales_records
JOIN users
ON sales_records.user_id = users.id
WHERE item_id = 18
GROUP BY users.id; | true |
b94dbf5c24c0a764ee1cafb669c3b31a65bdb47f | SQL | patrickwensel/denver-campaign-finance-back-final-staging | /UserManagementApi.DataCore/DBScripts/Schema/Tables/contact.sql | UTF-8 | 1,815 | 3.1875 | 3 | [] | no_license | -- Table: public.contact
-- DROP TABLE public.contact;
CREATE TABLE public.contact
(
contact_id integer NOT NULL DEFAULT nextval('contact_contact_id_seq'::regclass),
contact_type character varying(10) COLLATE pg_catalog."default" NOT NULL,
first_name character varying(150) COLLATE pg_catalog."default",
... | true |
19d133c47c7f3f5f4cfda65cf58db5bafd85831b | SQL | Direct-Entry-Program-Dulanga/JDBC-Assignmet | /db-script.sql | UTF-8 | 1,641 | 4.1875 | 4 | [] | no_license | DROP DATABASE IF EXISTS DEP_master;
CREATE DATABASE DEP_master;
USE DEP_master;
DROP TABLE IF EXISTS student;
CREATE TABLE student (
id INT PRIMARY KEY AUTO_INCREMENT,
name VARCHAR(50) NOT NULL
);
ALTER TABLE student ADD COLUMN contact VARCHAR(25);
DROP TABLE IF EXISTS contact;
CREATE TABLE contact(... | true |
8e04faa80e7dbfcf478de134b723034c63218a9e | SQL | Joohan-Park/sql | /practice01/연습문제4.sql | UTF-8 | 1,052 | 4.5 | 4 | [] | no_license | --연습문제
--1번
select count(*)
from employees
where salary <(select avg(salary) from employees);
--2번
select employee_id, last_name, salary
from employees
where(department_id, salary)
in (select department_id, max(salary)
from employees group by department_id)
order by salary desc;
--3번
... | true |
2941d552dcd29aee13e1a07cc9561d470d295177 | SQL | JannatulMorium/Project | /Hotel_Management_System/CODES/Database Table/Server Database Table.sql | UTF-8 | 3,581 | 3.4375 | 3 | [] | no_license | clear screen;
drop table Customer cascade constraints;
drop table Admin cascade constraints;
drop table RoomDetails cascade constraints;
drop table Reservation cascade constraints;
drop table Employee cascade constraints;
drop table Food cascade constraints;
drop table Bill cascade constraints;
create table Customer
... | true |
231699ae9f147e4232552b7b806cee8395414ef0 | SQL | QUANWEIRU/ErpOracleLibrary | /Xoa du lieu/Tool xoa giao dich Gui EVN/Code tool xoa du lieu/View/evn_udd_ap_payments_v.sql | UTF-8 | 354 | 2.953125 | 3 | [] | no_license | create view evn_udd_ap_payments_v as
select ac.check_id,
ac.check_number,
ac.description,
ap_checks_pkg.get_posting_status(ac.check_id) as posting_status,
ac.check_date,
c.branch_code
from ap.ap_checks_all ac, FPT_branches_v c
where ac.org_id = c.org_id
and ap_checks_pkg.get_po... | true |
0405d46a0bb8cfd9d756dd29b061b63fe1bf7e40 | SQL | voxelv/sQuire_kw | /Database/02 Create Messages.sql | UTF-8 | 735 | 3.765625 | 4 | [] | no_license |
use squire;
create table Channels (
channelID integer unsigned not null primary key auto_increment,
channelName varchar(30) unique
);
create table Messages (
MID integer unsigned not null primary key auto_increment,
timeSent timestamp,
fromID integer unsigned DEFAULT NULL,
channelID integer unsigned D... | true |
94f41c033d096f828e24d535ffc60e170baa51ca | SQL | redpulse96/Gateway | /db-scripts/external_service_logs.sql | UTF-8 | 635 | 2.578125 | 3 | [] | no_license | CREATE TABLE `external_service_logs` (
`external_service_log_id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`path` varchar(100) COLLATE utf8mb4_bin DEFAULT NULL,
`request_headers` text,
`request_body` text,
`response_code` varchar(100) COLLATE utf8mb4_bin DEFAULT NULL,
`response` text,
`status` varchar(... | true |
af330ec355c60e9c50783aa0cec08bb93125fa9c | SQL | OscOkt021/Praktikum-Pemrograman-Web-dan-Mobile-I | /Modul 3/modul3pemweb.sql | UTF-8 | 3,574 | 3.234375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Apr 11, 2021 at 07:14 AM
-- 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 |
683c51dca2511f434a0cb1351f581a8932e79318 | SQL | nocturaf/rc-practice-backend | /sql/tokopedia_remote_config.sql | UTF-8 | 325 | 2.765625 | 3 | [] | no_license | CREATE TABLE public.users (
id serial NOT NULL,
first_name character varying(255) NOT NULL,
last_name character varying(255),
email character varying(255) NOT NULL,
password text NOT NULL,
CONSTRAINT users_pkey PRIMARY KEY (id),
CONSTRAINT email_unique UNIQUE (email)
)
WITH (
OIDS = FAL... | true |
46c7ac25d9ceb612ab025582c94ba02bf88103df | SQL | kradwhite/migration | /tests/_data/my.sql | UTF-8 | 1,965 | 2.96875 | 3 | [] | no_license | DROP TABLE IF EXISTS `migrations-create-table`;
DROP TABLE IF EXISTS `migrations-load`;
DROP TABLE IF EXISTS `migrations-add`;
DROP TABLE IF EXISTS `migrations-remove-by-id`;
DROP TABLE IF EXISTS `command-table`;
DROP TABLE IF EXISTS `command-migrate`;
DROP TABLE IF EXISTS `command-rollback`;
CREATE TABLE `migrations-... | true |
9ee64c4dce536f81ca7cd8681abaf8d791e5f48e | SQL | sumitgupta19/Aws_Migration | /Automation_pyScripts/param/EventTypeCategoryDim.sql | UTF-8 | 282 | 2.59375 | 3 | [] | no_license | select
EventTypeCategoryDimKey
,SummaryCategory
,DetailCategory
,IsNull(Convert(VARCHAR(24),EffectiveFrom,120),'Null')
,IsNull(Convert(VARCHAR(24),EffectiveTo,120),'Null')
,EventClass
from Marketing.tblEventTypeCategoryDim
where EventTypeCategoryDimKey between -1 and 70
order by 1
| true |
c2c158124740c92b596fd942ca8432d62fc54978 | SQL | probro899/probro | /packages/server/build/db/migrations/0011-addCardAttachmentAndTangTable.sql | UTF-8 | 340 | 3.0625 | 3 | [] | no_license | --Up
ALTER TABLE BoardColumnCard ADD COLUMN Deadline INTEGER;
CREATE TABLE IF NOT EXISTS BoardColumnCardTag(
id INTEGER PRIMARY KEY,
tag TEXT NOT NULL,
boardColumnCardId INTEGER NOT NULL,
--CONSTRAINTS
CONSTRAINT BoardColumnCardTag_fk_boardColumnCardId FOREIGN KEY (boardColumnCardId) REFERENCES BoardColumnC... | true |
976277015769265be51d8703b5eee2ee16d0fd88 | SQL | AlexBoeira/MigradorUnicooTotvs | /Progress/migracao/_scripts_migracao_gps/setar_NR_PROPOSTA_e_CD_USUARIO_em_IMPORT_BNFCIAR.sql | UTF-8 | 1,046 | 3.28125 | 3 | [] | no_license | --preencher NR_PROPOSTA e CD_USUARIO (NUM_LIVRE_6) em IMPORT_BNFCIAR
declare
ct_codigo number := 0;
ult_contrato number := 0;
begin
for x in (select ip.num_livre_10, ib.nr_contrato_antigo, ib.progress_recid from import_propost ip, import_bnfciar ib
where ib.nr_contrato_antigo = ip.nr_contrato_a... | true |
038c984c811ee42ede1a0f39dd53be3d0386da04 | SQL | wikimedia/labs-tools-connectivity | /isolated/iwikispy.sql | UTF-8 | 21,382 | 3.3125 | 3 | [] | no_license | --
-- Authors: [[:ru:user:Mashiah Davidson]]
--
-- Caution: PROCEDUREs defined here may have output designed for handle.sh.
--
-- Shared procedures: inter_langs
--
-- <pre>
############################################################
delimiter //
#
# Prepare interwiki based linking suggestions for one languag... | true |
938fe46e573abd662b3d9827058780b77272c3fe | SQL | lammia/nhap | /nhahangcuatoi.sql | UTF-8 | 13,954 | 2.8125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.5.1
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: May 25, 2017 at 09:31 AM
-- Server version: 10.1.16-MariaDB
-- PHP Version: 7.0.9
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLI... | true |
c7a0910aa64a1aa1f3a1bfeb16d42d857e11c301 | SQL | bellmit/dbSmellsData | /data/open-source/extracted_sql/unepwcmc_ProtectedPlanet.sql | UTF-8 | 1,007 | 2.9375 | 3 | [
"MIT"
] | permissive | SELECT count(*) FROM #{std_table_name}
SELECT * FROM #{view_name_point}
SELECT * FROM #{view_name_poly}
SELECT * FROM #{args.table} WHERE continent = '#{regionName}'
SELECT wdpaid FROM poly LIMIT 100 OFFSET 100\" #{filename}
SELECT * FROM #{geometry_tables["polygons"]}
SELECT * FROM <%= original_table_name %>
SELECT * ... | true |
6139e249cb0a3f632bb57c8ac21514678275c951 | SQL | pavel-voinov/oracle-dba-workspace | /scripts/reports/public_synonyms.sql | UTF-8 | 390 | 2.796875 | 3 | [
"MIT"
] | permissive | /*
*/
@@reports.inc
column db_link format a60 heading "Link name"
column synonym_name format a30 heading "Synonym"
column table_name format a30 heading "Object name"
column table_owner format a30 heading "Object owner"
SELECT synonym_name, table_owner, table_name, db_link
FROM dba_synonyms
WHERE owner = 'PUBLIC'
AN... | true |
eb02272353505a69d6de594d14576d5d4fdda9b8 | SQL | Sathishgreatvines/LiquorWarehouse | /LiquorWarehouseStage_1_0/SFOut/Tables/gvp__RAD__c.sql | UTF-8 | 1,815 | 2.796875 | 3 | [] | no_license | CREATE TABLE [SFOut].[gvp__RAD__c]
(
[Id] char(18) NULL,
IsDeleted varchar(10) NOT null DEFAULT 'false',
Name nvarchar(100) null,
CreatedDate datetime null,
CreatedById char(18) null,
LastModifiedDate datetime null,
LastModifiedById char(18) null,
SystemModstamp datetime null,
LastViewedDate datetime null,
... | true |
2848b647f1e7005fa33e89cbbe933366d01db936 | SQL | landodn/tratamento-vip_dev | /sql-scripts/script.sql | UTF-8 | 5,758 | 2.609375 | 3 | [] | no_license | --tipo usuario
INSERT INTO tipo_usuario(id_tipo_usuario,descricao) VALUES (nextval('tipousuario_sequence'),'CLIENTE');
INSERT INTO tipo_usuario(id_tipo_usuario,descricao) VALUES (nextval('tipousuario_sequence'),'PROFISSIONAL');
INSERT INTO tipo_usuario(id_tipo_usuario,descricao) VALUES (nextval('tipousuario_seque... | true |
511e44726a2a1fac45300ce970403b2ae69ff404 | SQL | idrinksprite1234567/outback | /public/api/data/sqldump06042019.sql | UTF-8 | 4,625 | 3.46875 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.8.5
-- https://www.phpmyadmin.net/
--
-- Host: localhost:8889
-- Generation Time: Jun 04, 2019 at 09:14 PM
-- Server version: 5.7.25
-- PHP Version: 7.3.1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
--
-- Database: `outback`
--
-- ----------------------------... | true |
b18bd164a4f08ba37f45e95b8dbe12cdf86ff0ce | SQL | marielle1022/mass_charities_project | /additional_files/population_procedures.sql | UTF-8 | 3,745 | 3.625 | 4 | [] | no_license | /*
* Population procedures
*/
USE mass_nonprofits;
/*
* Procedure to list all populations
*/
DROP PROCEDURE IF EXISTS list_populations;
DELIMITER $$
CREATE PROCEDURE list_populations()
BEGIN
SELECT description FROM populations ORDER BY description asc;
END $$
DELIMITER ;
/*
* Procedure to add a population to the ... | true |
b2b195958e005854a1911348b800618d203f8da7 | SQL | bmkim621/coffee_exam | /Scripts/InsertData.sql | UTF-8 | 466 | 2.59375 | 3 | [] | no_license | insert into product values
('A001', '아메리카노'), ('A002', '카푸치노'),
('A003', '헤이즐넛'), ('A004', '에스프레소'),
('B001', '딸기쉐이크'), ('B002', '후르츠와인'),
('B003', '팥빙수'), ('B004', '아이스초코');
select * from product;
select * from sale;
insert into sale(code, price, saleCnt, marginRate) values
('A001', 4500, 150, 10),
('A0... | true |
1d94d78e05f96869a06f5af4bb30f8a19f601b52 | SQL | Shaposhnikov/country-code-to-emoji-flag | /update-table-flags.sql | UTF-8 | 15,630 | 2.84375 | 3 | [
"Apache-2.0"
] | permissive | --
-- Emoji Flags in Your MySQL Database
--
--
-- Copyright 2017 Peter Kahl <peter.kahl@colossalmind.com>
--
-- Licensed under the Apache License, Version 2.0 (the "License");
-- you may not use this file except in compliance with the License.
-- You may obtain a copy of the License at
--
-- <http://www.apache.org... | true |
7ac18b9c65f63deaf9c74ce7c826bc5848ba7b98 | SQL | DmitriySh/rdbms-course | /09-dml-data-filling/data_postgresql.sql | UTF-8 | 1,942 | 3.40625 | 3 | [
"MIT"
] | permissive | -- DML: use PostgreSQL
-- account: client, store_employee and manager
INSERT INTO otus.account (id, pwd_hash, phone, email, type, first_name, surname, deleted, birthdate)
VALUES (1, 'pwd_hash1', '+71021110022', 'dmitriy@invalid.test', 'client', 'dmitriy', 'shishmakov', false, '1960-06-03'),
(2, 'pwd_hash2', '+7... | true |
02988042419fcda34f71497a408706f3cdea919c | SQL | cgman64/mobile-case-study | /create_database.sql | UTF-8 | 2,384 | 3.546875 | 4 | [] | no_license | -- *************************************************************
-- This script creates sample database (MG)
-- Data Analyst
-- *************************************************************
-- ********************************************
-- CREATE THE MG DATABASE
-- *******************************************
-- cre... | true |
3cd4443450fdb97abf1c6ad3836cb8db38597ef3 | SQL | vmuchui/Organisational-API | /create.sql | UTF-8 | 4,888 | 2.859375 | 3 | [
"MIT"
] | permissive | --
-- PostgreSQL database dump
--
-- Dumped from database version 10.9 (Ubuntu 10.9-0ubuntu0.18.10.1)
-- Dumped by pg_dump version 10.9 (Ubuntu 10.9-0ubuntu0.18.10.1)
SET statement_timeout = 0;
SET lock_timeout = 0;
SET idle_in_transaction_session_timeout = 0;
SET client_encoding = 'UTF8';
SET standard_conforming_str... | true |
4ef83dddc1204d879a93352dbe49ced30c34cf9d | SQL | hnjogu/membersite | /database/dump.sql | UTF-8 | 34,440 | 3.03125 | 3 | [] | no_license | --
-- PostgreSQL database dump
--
-- Dumped from database version 9.6.1
-- Dumped by pg_dump version 9.6.1
SET statement_timeout = 0;
SET lock_timeout = 0;
SET idle_in_transaction_session_timeout = 0;
SET client_encoding = 'UTF8';
SET standard_conforming_strings = on;
SET check_function_bodies = false;
SET client_min... | true |
ad477da9a211001cd7c6a63c80f65ab8f01ad6ad | SQL | icylydia/PlayWithLeetCode | /262. Trips and Users/solution.sql | UTF-8 | 444 | 4.375 | 4 | [
"MIT"
] | permissive | SELECT DAY,
ROUND((Total - Completed) / Total, 2) AS `Cancellation Rate`
FROM
(SELECT T.Request_at AS DAY,
COUNT(T.Id) AS Total,
SUM(CASE WHEN T.Status = 'completed' THEN 1 ELSE 0 END) AS Completed
FROM Trips T
INNER JOIN Users U ON T.Client_Id = U.Users_Id
AND U.Role = 'client'
... | true |
847aa1a8ba20c7ffab4e91e82283f1a6401ac5b2 | SQL | ghforlang/DataBase | /src/main/java/com/edu/nbu/mysql/sql/practise/courses.sql | UTF-8 | 343 | 3.28125 | 3 | [] | no_license | CREATE TABLE `courses` (
`id` INT(11) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '自增id',
`student` VARCHAR(255) DEFAULT NULL COMMENT '学生',
`class` VARCHAR(255) DEFAULT NULL COMMENT '课程',
`score` INT(255) DEFAULT NULL COMMENT '分数',
PRIMARY KEY (`id`),
UNIQUE KEY `course` (`student`, `class`)
) ENGINE=InnoDB DEFAULT CHARSE... | true |
13cdc00dee1159d67bbfc53a7f3f8e540396e955 | SQL | dssg/cincinnati_ems_public | /etl/pipeline/convert_mapxy_to_geom.sql | UTF-8 | 697 | 3.171875 | 3 | [] | no_license | -- First, make a new `geom` column for QGIS
alter table
@TABLE drop
column if exists geom;
alter table
@TABLE add column geom geometry(Point, 4326);
update
@TABLE
set
geom = ST_Transform(ST_SetSRID(ST_Point(i_mapx, i_mapy), 3735), 4326);
-- Now do the same for longitude and latitude using the g... | true |
d7429529c6c9f57d7bcea05fc6c7e8bf24ad5abd | SQL | manuellena5/TpJavaModWeb | /src/biblioteca.sql | ISO-8859-10 | 5,947 | 3.90625 | 4 | [] | no_license | # SQL Manager 2005 Lite for MySQL 3.7.0.1
# ---------------------------------------
# Host : localhost
# Port : 3306
# Database : biblioteca
SET FOREIGN_KEY_CHECKS=0;
DROP DATABASE IF EXISTS `biblioteca`;
CREATE DATABASE `biblioteca`
CHARACTER SET 'latin1'
COLLATE 'latin1_swedish_ci';
... | true |
0120751634142ded816b82f1195d502fcb037994 | SQL | yacineak97/agent-api | /config/migration.sql | UTF-8 | 3,678 | 3.921875 | 4 | [] | no_license | -- DO $$
-- begin
-- IF EXISTS (SELECT FROM pg_database WHERE datname = 'beacon') THEN
-- RAISE NOTICE 'Database already exists'; -- optional
-- ELSE
-- PERFORM dblink_exec('dbname=' || current_database() -- current db
-- , 'CREATE DATABASE ' || quote_ident('beacon'));
-- END IF;
-- end $$;... | true |
5d942d12c21d2e06399e5cf5b7107ebafe082719 | SQL | kennethtsai0/ubiquitous-lamp | /Project1/SQL/reimbursementDCL.sql | UTF-8 | 619 | 2.90625 | 3 | [] | no_license | drop user reimbursementapp cascade;
create user reimbursementapp
identified by p4ssw0rd
default tablespace users
temporary tablespace temp
quota 10m on users;
-- we need to be able to connect to another user from bookapp
grant connect to reimbursementapp;
-- we want the ability to create types
grant resource to reimb... | true |
5d60aa7cff05ca7d473316da59b9b714d9ac0caa | SQL | ichoukou/Bigdata | /main/law/sql/sql_2018_10_09/192.168.12.34/laws_doc2/34-laws_doc2-创建法条临时表.sql | UTF-8 | 2,367 | 3.53125 | 4 | [] | no_license | CREATE table judgment2_etl_lawlist as SELECT a.id,a.uuid,b.lawlist,a.casedate from judgment2 a,tmp_weiwenchao b where a.uuid = b.uuid
SELECT id,province,city,district,court,court_cate from tmp_raolu where id < 100;
GRANT ALL PRIVILEGES ON *.* TO 'caitinggui'@'%' IDENTIFIED BY '123456' WITH GRANT OPTION;
GRANT ALL P... | true |
85a12eb546fb873df5e2bc869e5f8c921ecfb7f6 | SQL | Arshad-Ahmed/DataSciencePortfolio | /Dataquest/sql-databases-beginner/Challenge_ Practice expressing complex SQL queries-130.sql | UTF-8 | 485 | 3.9375 | 4 | [] | no_license | ## 2. Select and Limit ##
select College_jobs, Median, Unemployment_rate
from recent_grads
LIMIT 20;
## 3. Where ##
select Major
FROM recent_grads
where Major_category= 'Arts'
limit 5;
## 4. Operators ##
select Major, Total, Median, Unemployment_rate
from recent_grads
where Major_category != 'Engineering' AND ((Me... | true |
dfd883ed1499ed2042456facc2dc3cd673a3e72f | SQL | tinyshop603/tinymall | /doc/db/tinymall_delivery_detail.sql | UTF-8 | 770 | 3.03125 | 3 | [] | no_license | drop table tinymall_delivery_detail;
CREATE TABLE `tinymall_delivery_detail` (
delivery_id varchar(50) not null COMMENT'订单Id',
client_id varchar(50) COMMENT'返回达达运单号,默认为空',
dm_id varchar(50) COMMENT '达达配送员id,接单以后会传',
dm_name varchar(50) COMMENT '达达配送员名字',
dm_mobile varchar(20) COMMENT '配送员手机号,接单以后会传',
update... | true |
9d002873d8f8e86fe3c516261c4aaac5f016fc7d | SQL | yunius/Agenda | /db/AgendaDatabase.sql | UTF-8 | 14,543 | 3.109375 | 3 | [] | no_license | DROP DATABASE if exists Agenda;
CREATE DATABASE if not exists Agenda CHARACTER SET utf8 COLLATE utf8_general_ci;
USE Agenda;
CREATE TABLE Type_de_materiel(
IDtypeMat Int NOT NULL auto_increment ,
typeMatLibelle Varchar (45) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL ,
PRIMARY KE... | true |
e4e8a64810815cf7ce1d8d1d8290b001d9d6b1af | SQL | blackie1019/dotnet-mariadb-lab | /db-scripts/Lab/Transaction/CreateSP_AddNewProduct.sql | UTF-8 | 146 | 2.859375 | 3 | [] | no_license | DELIMITER //
CREATE PROCEDURE AddNewUser(IN userName NVARCHAR(40))
BEGIN
INSERT INTO User(User.Name) VALUES (userName);
END
//
DELIMITER ; | true |
cd84f6b85f130a4dc9b82ed28e43cdaac8eb83d3 | SQL | Sebastianch7/Android_distribution | /base.sql | UTF-8 | 7,431 | 3.328125 | 3 | [] | no_license | -- --------------------------------------------------------
-- Host: 127.0.0.1
-- Versión del servidor: 5.6.24 - MySQL Community Server (GPL)
-- SO del servidor: Win32
-- HeidiSQL Versión: 9.3.0.4984
-- --------------------------------------------------------
/*... | true |
2e89acf89f9f13885e818cb930478c6a3e1fa84e | SQL | quuhua911/AiCompetitions | /CarsSalesForecast/src/SQL/CAIJUN/time_window/caijun_0313_feature_1_avg_2m3m6m12m.sql | UTF-8 | 814 | 2.5625 | 3 | [] | no_license | -- CHNAGELOH:
-- 18.3.6 caijun init.
-- <= ycc_sales_caijun0313_feature_basewindow
-- => ycc_sales_caijun0313_feature_avg_2m3m6m12m
--
DROP TABLE IF EXISTS ycc_sales_caijun0313_feature_avg_2m3m6m12m ;
CREATE TABLE ycc_sales_caijun0313_feature_avg_2m3m6m12m
as
select sale_date,province_id,city_id,... | true |
6fc454a9266afc4a470584c2c7cb0f9001d49564 | SQL | fandashtic/arc_chennai | /Sivabalan-SQL/SQL_STORED_PROCEDURE/sp_list_InvoiceDocs.sql | UTF-8 | 739 | 3.4375 | 3 | [] | no_license | CREATE PROCEDURE sp_list_InvoiceDocs(@CUSTOMERID NVARCHAR(15), @FROMDATE DATETIME,
@TODATE DATETIME, @STATUS INT)
AS
SELECT InvoiceID, InvoiceDate,
Status = dbo.LookupDictionaryItem(CASE Status & 32 WHEN 32 THEN 'Sent' ELSE 'Not Sent' END, Default),
Customer.Company_Name, InvoiceAbstract.CustomerID
InvoiceType , Docu... | true |
100676594447ed18a709f32ab3c2b24345a38764 | SQL | Davidcparrar/dsa4_week4 | /scripts.sql | UTF-8 | 460 | 2.625 | 3 | [] | no_license | create database strategy;
create table trades ("Number" int not null, "Trade type" varchar(5), "Entry time" varchar(20), "Exposure" varchar(40),
"Entry balance" float, "Exit balance" float, "Profit" float, "Pnl (incl fees)" float, "Exchange" varchar(10),
"Margin" int, "BTC Price" float);
psql -h week-4-case.cgadet6... | true |
2a827f640414dbf0fd9abf61f692ccb2cf6b6725 | SQL | gtang31/algorithms | /sql/zipcodes/zipcodes.sql | UTF-8 | 358 | 2.5625 | 3 | [] | no_license | -- Practice create tables, copy, alter, update, insert, de-dupes
-- Create table for zip codes
create table zipcodes(
id integer primary key not null auto_increment
, zip char(5) not null
, city varchar(50)
, state varchar(20)
, state_abbrv char(2)
, county varchar(30)
, latitude numeric(6,4... | true |
b428a960a8b6f2dea5b203451e9bddb66bd600b0 | SQL | PinchenCui/test-mysql | /1022-normal (copy)/2019-10-30-12:01:47.806022.sql | UTF-8 | 550 | 2.875 | 3 | [] | no_license | use db;
CREATE TABLE gPWFc (id smallint unsigned not null auto_increment, name varchar(32) not null, pwd varchar(32) not null, constraint pk_example primary key (id));
SELECT * FROM gPWFc;
INSERT INTO gPWFc (id,name,pwd) VALUES (null, 'qV', 'TNgZDrq9cqMtIisuO2QtqAe5U');
SELECT table_name FROM information_schema.tables ... | true |
c5d7f97bb3eca8bf7a620eb7e434ba95c735f60b | SQL | alexanderturinske/rentme | /server/schemas.sql | UTF-8 | 6,623 | 4 | 4 | [] | no_license | DROP DATABASE IF EXISTS ecommerce;
CREATE DATABASE ecommerce;
USE ecommerce;
CREATE TABLE items (
id int NOT NULL AUTO_INCREMENT,
name varchar(50) NOT NULL,
description varchar(200) NOT NULL,
photo varchar(120) NOT NULL DEFAULT '../../assets/images/questionMark.jpg',
price int NOT NULL,
availability bool... | true |
822f6501b02fb9d024af5ac7bb0693fc4baa1d18 | SQL | anandeka/my-project | /DBScripts/MasterScripts/Master_Scripts_636.sql | UTF-8 | 6,652 | 2.859375 | 3 | [] | no_license |
Insert into GMC_GRID_MENU_CONFIGURATION
(MENU_ID, GRID_ID, MENU_DISPLAY_NAME, DISPLAY_SEQ_NO, MENU_LEVEL_NO,
FEATURE_ID, LINK_CALLED, ICON_CLASS, MENU_PARENT_ID, ACL_ID)
Values
('LOG_DG_SL', 'LOG', 'Sampling Label Document', 15, 2,
'APP-PFL-N-182', 'function(){generateDocumentForSelectedGMR();... | true |
13808d8b18734bbecb8a61ae437feb611e1d2744 | SQL | team30pythian/diag_collect | /grant_privs.sql | UTF-8 | 1,318 | 2.578125 | 3 | [] | no_license | ----------------------------------------------------------
--
-- SQL to grant privileges to DIAG_COLLECT
--
-- History
--
-- Version 1.0 Created 11th Oct 2017 - Luke
--
-- Version 1.1 Added on 13th Nov 2017 - Luke
-- Added provs for
-- gv_$latchholder
-- gv_$m... | true |
f1a24a033a0c52910c5f7731cc09b77ca8cf7c27 | SQL | yuanfanqi/check_out | /src/main/resources/mysql/sell_his.sql | UTF-8 | 1,020 | 2.90625 | 3 | [] | no_license | /*
Navicat MySQL Data Transfer
Source Server : loc
Source Server Version : 80012
Source Host : localhost:3306
Source Database : check_out
Target Server Type : MYSQL
Target Server Version : 80012
File Encoding : 65001
Date: 2018-10-11 10:54:29
*/
SET FOREIGN_KEY_CHEC... | true |
ad18135ae5fc8451e043f861fbf51fe3fe9c65e5 | SQL | drubervany/paraconsistente | /src/main/resources/import.sql | UTF-8 | 1,430 | 2.765625 | 3 | [] | no_license | --
-- Dados iniciais
--
insert into GERENTE(cpf, email, nome)values('33937256881', 'gerente@teste.com', 'Gerente Teste')
insert into CLIENTE(cnpj, email, nome)values('45578205000197', 'cliente@teste.com', 'Cliente Teste')
insert into CFPS(cpf, cnpj, email, nome, numeroPontos, contador)values('33937256881', '... | true |
c3cdf897a9bcab47ee64b946e0969b0228b13d37 | SQL | CraryPrimitiveMan/simple-framework | /migrations/init.sql | UTF-8 | 573 | 3.640625 | 4 | [
"MIT"
] | permissive | /*创建新用户*/
CREATE USER jun@localhost IDENTIFIED BY 'jun';
/*用户授权 授权jun用户拥有sf数据库的所有权限*/
GRANT ALL PRIVILEGES ON sf.* TO jun@'%' IDENTIFIED BY 'jun';
/*刷新授权*/
FLUSH PRIVILEGES;
/*创建数据库*/
CREATE DATABASE IF NOT EXISTS `sf`;
/*选择数据库*/
USE `sf`;
/*创建表*/
CREATE TABLE IF NOT EXISTS `user` (
id INT(20) NOT NULL AUTO_IN... | true |
70e5c210260e4b0c5f45d03273e0d4320de45d39 | SQL | KaelinStephens/SQL-Introduction-Exercise | /SQLIntroductionExercise.sql | UTF-8 | 688 | 3.828125 | 4 | [] | no_license |
SELECT * FROM products;
SELECT * FROM products
WHERE Price=1400;
SELECT * FROM products
WHERE Price NOT IN(11.99, 13.99);
SELECT * FROM products
WHERE Price NOT LIKE 11.99;
SELECT * FROM products
ORDER BY Price DESC;
SELECT * FROM employees
WHERE MiddleInitial IS NULL;
SELECT DISTINCT Price
FROM pr... | true |
845749f5cffb0c73efe493ffef8dd416786d391a | SQL | haileyan/biz_504_12_DB | /USER22(2018-12-11-01).sql | UHC | 3,864 | 3.796875 | 4 | [] | no_license | -- user22 ȭԴϴ.
CREATE TABLE tbl_grade(
str_num CHAR(3) PRIMARY KEY,
intKor NUMBER(3),
intEng NUMBER(3),
intMath NUMBER(3)
);
INSERT INTO tbl_grade
VALUES ('001', 85, 100, 90);
INSERT INTO tbl_grade
VALUES ('002', 95, 98, 100);
INSERT INTO tbl_grade
VALUES ('003', 88, 78, 96);
INSERT INTO tbl_grade
... | true |
5829547413590ade6164cb61e2b1bad7b1597918 | SQL | radtek/abs3 | /sql/mmfo/bars/Script/Ins_customer_field_f2k.sql | WINDOWS-1251 | 3,000 | 3.21875 | 3 | [] | no_license | -- 13/06/2017
-- #2K
-- 5872 볺
-- ( )
-- 볺 . .:
--1. SANKC - () -
--2. RNBOR - .
--3. RNBOU - , .
--4. RNBOS -
--5. RNBOD - .
exec bc.home;
Prompt INSERT INTO CUSTOMER_FIELD TAG LIKE 'SANKC';
BEGIN
Insert into BARS.CUSTOMER_FIELD
... | true |
504007c540b13ffa88a144777538a266508dc00f | SQL | Tangorn3x3/gestsup | /_SQL/update_3.0.11_to_3.1.20.sql | UTF-8 | 36,003 | 3.515625 | 4 | [] | no_license | -- SQL Update for GestSup !!! If you are not in lastest version, all previous scripts must be passed before !!! ;
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
-- fix bug empty availability_condition_type value
UPDATE tparameters SET availability_condition_type="4" WHERE availability_condition_type="";
-- add dashboard colu... | true |
8b0d6ddfd52ef03c40582cf7771f78187768c679 | SQL | evgdugin/pgReport | /SCHEMA/refbook/SEQUENCE/gi_statuses_status_id_seq.sql | UTF-8 | 357 | 2.796875 | 3 | [] | no_license | CREATE SEQUENCE refbook.gi_statuses_status_id_seq
AS smallint
START WITH 1
INCREMENT BY 1
NO MAXVALUE
NO MINVALUE
CACHE 1;
ALTER SEQUENCE refbook.gi_statuses_status_id_seq OWNER TO postgres;
GRANT ALL ON SEQUENCE refbook.gi_statuses_status_id_seq TO user1c;
ALTER SEQUENCE refbook.gi_statuses_status_id_seq
OWN... | true |
1539db5bde948b988fbb82e1a6f6f62de219848a | SQL | pqshawn/sparrowPHP | /application/dbcheme/ldos.sql | UTF-8 | 1,624 | 3.171875 | 3 | [] | no_license | /*
MySQL Data Transfer
Date: 2015-01-13 11:31:49
*/
/*
文章表
*/
DROP TABLE IF EXISTS `dos_posts`;
CREATE TABLE `dos_posts` (
`post_id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`post_author` bigint(20) unsigned NOT NULL DEFAULT '0',
`post_cdate` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
`p... | true |
ced6f285eabf27fbabe29e10080d929d83cb893d | SQL | threecrm/order | /OrderProject/src/main/resources/weixin.sql | UTF-8 | 9,389 | 3.25 | 3 | [] | no_license | /*
Navicat MySQL Data Transfer
Source Server : root
Source Server Version : 50710
Source Host : localhost:3306
Source Database : weixin
Target Server Type : MYSQL
Target Server Version : 50710
File Encoding : 65001
Date: 2019-09-21 13:59:30
*/
SET FOREIGN_KEY_CHECKS=0;
-- -------... | true |
188f52d91deeaf418d5390282567eab626624a14 | SQL | 1241545483/terrace-cloud | /sql/20190122-category-dml.sql | UTF-8 | 2,688 | 2.734375 | 3 | [] | no_license |
/*推荐栏目*/
INSERT INTO base_system_parameter
(REC_ID,PARAMETER_TYPE, PARAMETER_KEY, PARAMETER_NAME, PARAMETER_VALUE, WEIGHT, CREATE_TIME, UPDATE_TIME)
VALUES ('111','menu', '1', '推荐栏目', '高考必备书目', 25, now(),now());
INSERT INTO base_system_parameter
(REC_ID,PARAMETER_TYPE, PARAMETER_KEY, PARAMETER_NAME, PARAMETER_VALUE, W... | true |
21c30b931287c211f70e0809dffcc44e013b8011 | SQL | rin-nas/postgresql-patterns-library | /dba/pg_constraints.sql | UTF-8 | 976 | 4.375 | 4 | [
"MIT"
] | permissive | --Find the Constraints in your Database
--source: https://www.crunchydata.com/blog/postgres-constraints-for-newbies
SELECT * FROM (
SELECT
c.connamespace::regnamespace::text as table_schema,
c.conrelid::regclass::text as table_name,
con.column_name,
c.conname as constraint_name,
p... | true |
3f395c7418730e93b3a96d2926f036933abcc281 | SQL | krithika2802/Taiho-R3 | /ccdm/TAS3681_101/layer5/sitemilestone.sql | UTF-8 | 2,070 | 3.9375 | 4 | [] | no_license | /*
CCDM SiteMilestone mapping
Notes: Standard mapping to CCDM SiteMilestone table
*/
WITH included_sites AS (
SELECT DISTINCT studyid, siteid FROM site),
sitemilestone_data AS (
select studyid,
siteid,
row_number() over (partition by studyid,siteid order by expecteddate,milestonelabel) a... | true |
be5fe7636d7808eaf1a4e9ec915a32c5e74d91bd | SQL | ThinkUpLLC/callbax | /sql/2012-02-24_followercount.sql | UTF-8 | 334 | 2.796875 | 3 | [] | no_license | ALTER TABLE cb_users ADD follower_count INT NOT NULL DEFAULT 0
COMMENT 'Total number of user followers/subscribers/friends.' AFTER username;
ALTER TABLE cb_users ADD last_follower_count TIMESTAMP NOT NULL
COMMENT 'Last time the user follower count was updated.';
UPDATE cb_users SET last_follower_count='2010-01... | true |
f0ac842fc781be20b58fb1179237d591077c5147 | SQL | Blazeker/holbertonschool-higher_level_programming | /0x0D-SQL_introduction/11-best_score.sql | UTF-8 | 238 | 2.875 | 3 | [] | no_license | -- script that lists all records with a score >= 10 in the table second_table of the database hbtn_0c_0 in your MySQL server.
-- list all records with score >= 10
SELECT score, name FROM second_table WHERE score >= 10 ORDER BY score DESC; | true |
5d1eb5801e2491183e059db540413858d54752ca | SQL | didizhou25/VerkeersschoolVrijenburg | /loginsystem/loginsystem.sql | UTF-8 | 3,271 | 2.859375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.8.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Gegenereerd op: 03 jul 2018 om 09:04
-- Serverversie: 10.1.33-MariaDB
-- PHP-versie: 7.2.6
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACT... | true |
c32023792441cb7b7bd9d2971e445baa4eaa158d | SQL | Robertgaraban/projeto-toti-final-adtime | /database/db.sql | UTF-8 | 337 | 2.953125 | 3 | [] | no_license | -- to create a new database
--CREATE DATABASE adtime;
-- to use database
use adtime;
-- creating a new table
--CREATE TABLE adtime (
--id INT(6) UNSIGNED AUTO_INCREMENT PRIMARY KEY,
-- pessoa VARCHAR(50) NOT NULL,
-- tarefa VARCHAR(100) NOT NULL,
--);
-- to show all tables
--show tables;
-- to describe table
--... | true |
e020a819ddf42236d86d415babf340435ff99fba | SQL | carollavecchiadba/ScriptsSQL | /Script Complete Process.sql | UTF-8 | 466 | 3.0625 | 3 | [] | no_license | /*
Script: Script Complete Process.SQL
Description: How to see process pending
Reference: Unknow
Author: Unknow
*/
SELECT session_id as SPID, command, a.text AS Query, start_time, percent_complete, dateadd(second,estimated_completion_time/1000, getdate()) as estimated_completion_time
FROM sys.dm_exec_r... | true |
b407a6a66c20404a04efd3f4d870195ba762c956 | SQL | JhoanLT/mis-recetas | /_install/BD.sql | UTF-8 | 3,902 | 3.53125 | 4 | [] | no_license | /*
Navicat MySQL Data Transfer
Source Server : localhost
Source Server Version : 50505
Source Host : localhost:3306
Source Database : recetas
Target Server Type : MYSQL
Target Server Version : 50505
File Encoding : 65001
Date: 2018-11-28 15:22:38
*/
SET FOREIGN_KEY_CHECKS=0;
-- -... | true |
b916010136a6c7897b33ca4ebdfbce749e0d5858 | SQL | Leo-Lvl/PPE-Ok-Boomer | /BDD_membre.sql | UTF-8 | 1,730 | 2.75 | 3 | [] | no_license | <<<<<<< HEAD
drop database if exists OkBoomer;
create database OkBoomer;
use OkBoomer;
drop table if exists Membre;
create table Membre
(idMembre int not null,
prenom varchar (15),
nom varchar (20),
pseudonyme varchar (20),
jourNaissance int,
moisNaissance int,
anneeNaissance int,
email varchar (30),
mdp v... | true |
c8fa3074e65ff3544925c60441b171ece0d9b5d1 | SQL | dijkstra2003/docker-luc-dijkstra | /opdracht2/opdrachtC/demo-joel.sql | UTF-8 | 1,232 | 3.8125 | 4 | [] | no_license | DROP TABLE IF EXISTS `movies`;
CREATE TABLE `movies` (
`id` int(10) NOT NULL AUTO_INCREMENT,
`title` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
`genre` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
PRIMARY KEY (`id`)
);
DROP TABLE IF EXISTS `actors`;
CREATE TABLE `actors` (
`id` int(10) ... | true |
cd6c3e1580b52e4bb2b9155993f797c339b3022a | SQL | chege-maina/php-erp | /database/DBS needed/tbl_asset.sql | UTF-8 | 2,324 | 3.1875 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 5.0.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Apr 28, 2021 at 11:53 AM
-- Server version: 10.4.17-MariaDB
-- PHP Version: 7.4.14
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIE... | true |
64b6c5d09983b08420697eea1bb39a14a71cbee9 | SQL | loonix/university | /PHP/Sistema_Registo/inscricoes.sql | UTF-8 | 1,593 | 3 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 5.0.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Jun 26, 2021 at 04:58 PM
-- Server version: 10.4.17-MariaDB
-- PHP Version: 8.0.2
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIEN... | true |
760e0b911a296054b64ecec795b9ddf75306849c | SQL | sena-joaovictor/BancodeDados-Mysql | /dbinfox.sql | UTF-8 | 2,642 | 3.859375 | 4 | [
"MIT"
] | permissive | /**
Atividade 3 Banco de dados DBINFOX
@autor: João Victor S. Sena
Data da Criação 01/09/2021
*/
-- Pesquisar databases disponiveis
show databases;
-- Criando um banco de dados
create database dbinfox;
-- Selecionar o banco de dados
use dbinfox;
-- Criando uma tabela no banco de dados
-- tabela de funcionarios (... | true |
4a441315ed8d20b21a1440f490f15e9efd271f18 | SQL | CharH/AnimaLuvApp | /AnimaLuvData/Script.PostDeployment1.sql | UTF-8 | 2,194 | 3.546875 | 4 | [] | no_license | MERGE INTO Color AS Target
USING (VALUES
(1, 'Red'),
(2, 'Orange'),
(3, 'Yellow'),
(4, 'Green'),
(5, 'Blue'),
(6, 'Purple'),
(7, 'Rainbow')
)
AS Source (ColorID, Name)
ON Target.ColorID = Source.ColorID
WHEN NOT MATCHED BY TARGET THEN
INSERT (Name)
VALUES (Name);
MERGE INTO Ma... | true |
d82616e400ef8cad5daeff15be18729f47fe1a37 | SQL | dieka2501/salesnav | /sales_nav.sql | UTF-8 | 3,100 | 3.078125 | 3 | [
"MIT"
] | permissive | -- phpMyAdmin SQL Dump
-- version 4.4.3
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Sep 27, 2016 at 03:46
-- Server version: 5.6.24
-- PHP Version: 5.6.8
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!... | true |
89b16faa6a6c1cbfc81e702250f21651304d94da | SQL | Insight-Services-APAC/powerbi-workspace-automation | /Subscriber/PowerBITelemetryDB/CEN/Views/vw_Workspaces.sql | UTF-8 | 994 | 3.546875 | 4 | [] | no_license |
CREATE View [CEN].[vw_Workspaces]
AS
WITH DashboardApps AS
(
SELECT Distinct Workspace_ID
FROM CEN.Dashboards
WHERE SUBSTRING(TRIM([DisplayName]),1,5) = '[App]'
)
,ReportApps as
(
SELECT Distinct Workspace_ID
FROM CEN.Reports
WHERE SUBSTRING(TRIM([Name]),1,5) = '[App]'
)
,Apps as
(
SELECT DISTINCT Workspa... | true |
c6b0d491175b878f8eae1b1e08f1f134bc2e64eb | SQL | Q-Adorable/tw_grad_traim | /practice/thirdWeeks/tw_mall_orderserver/src/main/resources/db/migration/V201808021011__init_table.sql | UTF-8 | 451 | 2.96875 | 3 | [] | no_license |
CREATE TABLE `tw_order` (
`id` int(20) NOT NULL AUTO_INCREMENT,
`user_id` int(20) NOT NULL,
`create_time` datetime NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;
CREATE TABLE `order_item` (
`id` int(20) NOT NULL AUTO_INCREMENT,
`order_id` int(20) NOT NULL,
`product_i... | true |
dc2bb2dc4531c1313dbb6c021a48ec0aa3d95f1d | SQL | vrattant/followup | /followup/followup.sql | UTF-8 | 9,611 | 2.859375 | 3 | [
"Apache-2.0",
"MIT"
] | permissive | -- phpMyAdmin SQL Dump
-- version 4.5.1
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Aug 10, 2017 at 02:16 AM
-- Server version: 10.1.13-MariaDB
-- PHP Version: 7.0.5
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLI... | true |
aa3c208d077e47f92fd0c0138c2aa0ecbfd1f88d | SQL | asouzab/oracle_plsql | /GOLIVEELO/TOPSQL/VEWCARTEIRASAP.sql | UTF-8 | 1,367 | 3.234375 | 3 | [] | no_license |
CREATE OR REPLACE FORCE VIEW VND.VW_ELO_CARTEIRA_SAP_SALESGROUP
(ID, NU_CARTEIRA_VERSION,CD_SALES_ORG, CD_SALES_DISTRICT,NO_SALES_DISTRICT,CD_SALES_OFFICE,NO_SALES_OFFICE,
CD_SALES_GROUP,NO_SALES_GROUP)
AS
(
SELECT
CTX.ID,
CTX.CD_SALES_ORG,
CTX.NU_CARTEIRA_VERSION,
... | true |
77d67455ec1f5f0b7c1e0fc3a70e625675bb0bc8 | SQL | ajcfood/WORKDESK | /tables/ow_template.sql | UTF-8 | 1,732 | 3.625 | 4 | [] | no_license | DROP TABLE WORKDESK.OW_TEMPLATE CASCADE CONSTRAINTS;
CREATE TABLE WORKDESK.OW_TEMPLATE
(
TK_OW NUMBER(7) NOT NULL
)
TABLESPACE WORKDESK_DATA
PCTUSED 40
PCTFREE 10
INITRANS 1
MAXTRANS 255
STORAGE (
INITIAL 1M
NEXT 40K
... | true |
ad5528a8b09134c23acf7b9ed46c9551ec2b492c | SQL | manusoler/code-challenges | /hackerrank/sql/advanced_select/5_new_companies.sql | UTF-8 | 2,535 | 4.3125 | 4 | [] | no_license | -- Amber's conglomerate corporation just acquired some new companies. Each of the companies follows this hierarchy:
-- Given the table schemas below, write a query to print the company_code, founder name, total number of lead managers, total number of senior managers, total number of managers, and total number of empl... | true |
41586f0d970fa17c34b29b3b2a1d459dbfa82cd4 | SQL | Nev-Iva/ITFB-group-test | /selpo_q.sql | UTF-8 | 1,361 | 3.96875 | 4 | [] | no_license | use selpo;
-- 3.1 Выбрать все марки гречки;
select * from goods where catalog_id in (select id from catalogs where name = 'Гречка');
-- 3.2 Выбрать все транзакции с суммой менее 1 рубля;
select * from full_purchase where sum_purch < 1;
-- 3.3 Выбрать все транзакции постоянного покупателя Иванова;
select * from full_... | true |
6c4b3cae5dc63e2e18e596bc2b55ebabeb90a3f6 | SQL | axadn/app-academy-projects | /W3D2/aa_questions/import_db.sql | UTF-8 | 1,972 | 3.65625 | 4 | [] | no_license | CREATE table users(
user integer PRIMARY KEY AUTOINCREMENT,
fname varchar(64) NOT NULL,
lname varchar(128) NOT NULL
);
INSERT into users (fname,lname) VALUES ('Tyler','Wood');
INSERT into users (fname,lname) VALUES ('Adan','Marrufo');
CREATE table questions(
question integer PRIMARY KEY autoincrement,
titl... | true |
96fad593dea67d3cb7369bdd9f32df37696139f4 | SQL | SpongePowered/Ore | /ore/conf/evolutions/default/40.sql | UTF-8 | 453 | 2.734375 | 3 | [
"MIT"
] | permissive | # --- !Ups
drop table notifications;
create table notifications (
id bigserial not null primary key,
created_at timestamp not null,
user_id bigint not null references users on delete cascade,
notification_type int not null,
message ... | true |
feae36aa9284284f2f436e0c37662ccf938ef4f1 | SQL | AlishaTech/N18_warmups | /N18-classwork.sql | UTF-8 | 168 | 3.484375 | 3 | [] | no_license | SELECT order_details, products, customers_table,
RANK() OVER (PARTITION BY order_details)
AS rank
FROM northwind
WHERE country = 'USA'
limit 3; | true |
710487e7a3e8b47d63e105e6af1d0bf1f18a9a4c | SQL | Seosamhoc/Csharp-Basics | /CGDatabase/Mock Test/Request6.sql | UTF-8 | 303 | 3.59375 | 4 | [] | no_license | --Which jobs are found in the Marketing and Accounting departments?
--*HINT* JOIN Employees JOIN Jobs OR
SELECT Job_Title
FROM Jobs
WHERE Job_ID IN (SELECT Job_ID FROM Employees WHERE Department_No IN
(SELECT Department_No FROM Departments WHERE Department_Name IN ('Marketing', 'Accounting'))) | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.