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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
d8dc3c3703f3b070f84fe533e9998574853447d9 | SQL | hongson97/v-store | /v_store.sql | UTF-8 | 2,496 | 3.734375 | 4 | [] | no_license | CREATE DATABASE v_store;
use v_store;
CREATE TABLE `user` (
`user_name` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL,
`password` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL,
`name` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL,
`age` int(3) NOT NULL,
`wallet` int not null,
`email` varchar(100) ... | true |
c32cc929087b44f45dd1de82f412f8e1d9fc4897 | SQL | okkisatriar/Ujian-backend-tanggal20 | /wisemonkey (3).sql | UTF-8 | 12,887 | 3.046875 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.8.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Jul 20, 2018 at 01:50 PM
-- Server version: 10.1.33-MariaDB
-- PHP Version: 7.2.6
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD... | true |
5cfbccb725c2710ca23b943231cedf22701e8ce5 | SQL | lee-dk/SQL | /05_JOIN.sql | UHC | 5,244 | 4.625 | 5 | [] | no_license | --05_JOIN.sql
--JOIN : 踦 ̺ ϴ ȸϴ
SELECT * FROM emp; -- ̺
SELECT * FROM dept; --μ ̺ (deptno:μȣ/dname:μ/loc:)
--CROSS JOIN : ̺ ȸϴ (ǹִ ã )
SELECT * FROM emp, dept;
--CROSS JOINδ ƹǹ
--JOIN ǹ̸ ؼ CROSS JOIN ؾѴ
SELECT ename, emp.deptno, dept.deptno, dname, dept.loc FROM emp, dept;
--÷ ġ ̺ ÷... | true |
c22209f3f7b68f05effe3dfc366843b2252b9698 | SQL | Cayman2312/landing_my_moscow | /project1.sql | UTF-8 | 3,256 | 3.078125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 5.0.1
-- https://www.phpmyadmin.net/
--
-- Хост: 127.0.0.1
-- Время создания: Фев 22 2020 г., 07:14
-- Версия сервера: 10.4.11-MariaDB
-- Версия PHP: 7.4.2
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHAR... | true |
dbd09b9949526b0f72b02ccd5e567da3f38263c5 | SQL | mbraimniotis/ddl_monitor_util | /01-TRG-DDL_MONITOR.trg.sql | UTF-8 | 490 | 3.109375 | 3 | [] | no_license | CREATE OR REPLACE TRIGGER system.ddl_monitor AFTER CREATE OR DROP OR TRUNCATE OR ALTER ON database
declare
BEGIN
if ora_dict_obj_owner = 'FCC' and ora_dict_obj_type not in ('SEQUENCE')
then
insert into fcc.ddl_monitor("DDL_EVENT") values ('Username: (' || ora_login_user || ') ' || 'Action: (' || ora_sysevent || ')... | true |
cd3f369969b07ba6c2b1e6cbb3776917ddd0ad92 | SQL | cuzik/flask-web-service | /db.sql | UTF-8 | 517 | 3.265625 | 3 | [] | no_license | -- Comandos de Criação de um Banco de Dados com os principais comados do mysql
-- Criação do Banco de Dados:
drop database store;
create database store DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci;
-- Abrir um BD
use store
-- Criar tabelas dentro do BD aberto
-- Criar a tabela dos Usuários
create table produc... | true |
1fe86c4e0b20d0955f4a882adcbd4fb6e9b2b570 | SQL | chrde/pgexercises | /answers/aggregation.sql | UTF-8 | 4,415 | 4.34375 | 4 | [] | no_license | select count(*) from cd.facilities;
select count(*) from cd.facilities
where guestcost >= 10;
select recommendedby, count(*) from cd.members
where recommendedby is not null
group by recommendedby
order by recommendedby;
select facid, sum(slots)
from cd.bookings
group by facid
order by facid;
select facid, sum(slots... | true |
3d520a402f1b2ee5f27c0119500c579bbe7d7ee4 | SQL | cchenxi/leetcode | /database/solution.sql | UTF-8 | 4,820 | 4.28125 | 4 | [] | no_license | -- db 181
Create table If Not Exists Employee (Id int, Name varchar(255), Salary int, ManagerId int);
Truncate table Employee;
insert into Employee (Id, Name, Salary, ManagerId) values ('1', 'Joe', '70000', '3');
insert into Employee (Id, Name, Salary, ManagerId) values ('2', 'Henry', '80000', '4');
insert into Employe... | true |
ad8cfac4fc2b404c765e28caee1b610710aecd44 | SQL | SrShark/api-platform-crud | /sql/datos.sql | UTF-8 | 3,055 | 3.046875 | 3 | [] | no_license | CREATE DATABASE pokedex;
USE pokedex;
CREATE TABLE pokemons (
id int(11) NOT NULL AUTO_INCREMENT,
num_pokedex int(11) NOT NULL UNIQUE,
name varchar(50) NOT NULL,
description text,
type varchar(50) NOT NULL,
url varchar(255) NOT NULL,
createdAt datetime NOT NULL,
updatedAt datetime NOT NULL,
Usuari... | true |
f71ac96c81e74bc10ce42b750e8c0e36d5fbc040 | SQL | rajirkp25/fullstack-nanodegree-vm | /vagrant/Project-Log-Analysis/create_views.sql | UTF-8 | 1,182 | 4 | 4 | [] | no_license | --materialized views and indexes for project log analysis
create materialized view log_count_status_path as
select path, count(path) , status ,
substr(upper(replace(substring(path, position('e/' in path)+2, char_length(path) ), '-',' ')),1,3) TITLE_UPPER,
upper(substring(path, position('e/' in path)+2, char_leng... | true |
c1afac31fb97a82844a4567aaa91829954b5000c | SQL | imjch/LeetCodeProblems | /database/Exchange_Seats.sql | UTF-8 | 225 | 3.046875 | 3 | [] | no_license | # Write your MySQL query statement below
# Write your MySQL query statement below
SELECT
IF(id < (SELECT count(1) FROM seat), IF(id mod 2 = 0, id - 1, id + 1), IF(id mod 2 = 1, id, id - 1)) id,
student
FROM seat
ORDER BY id
| true |
0ee389920ef5607517713bd1ff4d28b9b1f898e1 | SQL | rmirville/webauto | /samples/files/setup.sql | UTF-8 | 702 | 3.546875 | 4 | [
"Apache-2.0"
] | permissive | drop table if exists webauto_files;
create table webauto_files (
file_id MEDIUMINT NOT NULL KEY AUTO_INCREMENT,
file_sha256 CHAR(64) NOT NULL,
context_id MEDIUMINT NULL,
deleted TINYINT(1),
content BLOB NULL,
path VARCHAR(2048) NULL,
json TEXT NULL,
c... | true |
882438cfc06e5f03554d3ec0c0d16558296643bd | SQL | Aprilianti02/skripsi | /db/anemia.sql | UTF-8 | 9,262 | 2.984375 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | -- phpMyAdmin SQL Dump
-- version 4.9.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Mar 22, 2021 at 01:10 PM
-- Server version: 10.4.8-MariaDB
-- PHP Version: 7.3.10
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD... | true |
f90d989eb223a16587eb9ba330fe2e1a424c498b | SQL | CodeWindProgram/Group--7 | /testdbschema.sql | UTF-8 | 11,400 | 2.984375 | 3 | [] | no_license | --
-- PostgreSQL database dump
--
-- Dumped from database version 13.3
-- Dumped by pg_dump version 13.3
-- Started on 2021-07-15 16:12:20
SET statement_timeout = 0;
SET lock_timeout = 0;
SET idle_in_transaction_session_timeout = 0;
SET client_encoding = 'UTF8';
SET standard_conforming_strings = on;
SELECT pg_catalo... | true |
17d120268fb851c68c619805f704ea0fd2298f27 | SQL | michaeladuarte/CS602-Node | /module6/CS602_Module6Samples/CS602_Module6Samples/part2_sessions/sessioninfo.sql | UTF-8 | 197 | 2.609375 | 3 | [] | no_license | CREATE TABLE session (
session_id CHAR(32) NOT NULL,
session_data TEXT NOT NULL,
session_lastaccesstime TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (session_id)
); | true |
f095d6ff3a20ef198fe8343e794d293558613776 | SQL | suragch/Suryaa | /app/src/main/assets/databases/suryaa/from_1_to_2.sql | UTF-8 | 1,356 | 3.671875 | 4 | [] | no_license | -- version 1 of the database vocab table was
--
-- CREATE TABLE vocab
-- ( _id INTEGER PRIMARY KEY,
-- date INTEGER,
-- list_id TEXT NOT NULL, -- this should have been INTEGER
-- mongol TEXT NOT NULL,
-- definition TEXT,
-- pronunciation TEXT,
-- audio TEXT,
-- FOREIGN KEY(list_id) REFERENCES lists(_id)
-... | true |
7e586263100ac9e4116e3405c2bcb73fa691a3c9 | SQL | SnurnicynKonstantin/planner | /src/main/resources/db/migration/V40__RequestCategory_Table.sql | UTF-8 | 617 | 3.328125 | 3 | [] | no_license | DROP TABLE IF EXISTS "request_category" CASCADE;
CREATE TABLE "request_category"
(
"id" int8 NOT NULL PRIMARY KEY,
"name" varchar(255) NOT NULL UNIQUE,
"description" varchar(255)
);
insert into request_category(id, name, description)
values
(1, 'UNDEFINED', 'Не определено'),
(2, 'TECHS... | true |
9807ebbaba4390746d2505bd626704d2cc7f1688 | SQL | sergiowalls/SocialBank-API | /src/main/resources/db/migration/V2_3__Make_event_id_autoincrement.sql | UTF-8 | 425 | 3.328125 | 3 | [
"MIT"
] | permissive | DROP TABLE "event";
CREATE TABLE "event" (
id SERIAL PRIMARY KEY,
creatorEmail VARCHAR(255) NOT NULL,
iniDate DATE NOT NULL,
endDate DATE NOT NULL,
hours INT NOT NULL,
location VARCHAR(255) NOT NULL,
title VARCHAR(255) NOT NULL,
description TEXT
);
ALTER TABLE "event"
ADD CONSTRAINT CHK_DATE_INI_LT_E... | true |
9ecd0e8f8ad8e781879e70ab14d7bcc0b5de7fe6 | SQL | regmipreety/Backend | /cms.sql | UTF-8 | 12,125 | 3.171875 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.8.3
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Jan 28, 2019 at 06:27 AM
-- Server version: 10.1.35-MariaDB
-- PHP Version: 7.2.9
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD... | true |
59d1baab72ac4fcade4913ed65aadcd4c8f48a74 | SQL | Techkrunch/tumaini | /knh.sql | UTF-8 | 8,269 | 3.140625 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.4.14
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Jun 02, 2019 at 11:41 PM
-- Server version: 5.6.26
-- PHP Version: 5.6.12
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;... | true |
90f41df7546614d11a47cf344df6034a6945b95d | SQL | cedricoumbe/logi | /sales (1).sql | UTF-8 | 7,547 | 3.078125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 3.3.9
-- http://www.phpmyadmin.net
--
-- Serveur: localhost
-- Généré le : Mer 14 Avril 2021 à 10:33
-- Version du serveur: 5.5.8
-- Version de PHP: 5.3.5
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARAC... | true |
012d8878772d7ce2f8ecf69fbb1aecfbd7acd308 | SQL | renxiaobin/Java-advanced | /Chart/tradinginfo.sql | UTF-8 | 862 | 2.890625 | 3 | [] | no_license | /*
Navicat MySQL Data Transfer
Source Server : mysql
Source Server Version : 50709
Source Host : localhost:3306
Source Database : chart
Target Server Type : MYSQL
Target Server Version : 50709
File Encoding : 65001
Date: 2015-12-30 14:55:09
*/
SET FOREIGN_KEY_CHECKS=0;
-- -------... | true |
578df8e02f8208e2f0a7125d44e7adb70c9998dd | SQL | benoutram/explore-education-statistics | /src/GovUk.Education.ExploreEducationStatistics.Data.Model/Migrations/20200703122015_Routine_DropAndCreateRelease.sql | UTF-8 | 1,378 | 3.265625 | 3 | [
"MIT"
] | permissive | CREATE OR ALTER PROCEDURE DropAndCreateRelease @Release dbo.ReleaseType READONLY
AS
BEGIN
DELETE FROM dbo.ReleaseFootnote WHERE dbo.ReleaseFootnote.ReleaseId IN (SELECT R.Id FROM @Release R);
DELETE FROM dbo.ReleaseSubject WHERE dbo.ReleaseSubject.ReleaseId IN (SELECT R.Id FROM @Release R);
DELETE FROM dbo.... | true |
4a4742c4bbf175a33568573541edae01d8a84ff0 | SQL | DataViva/dataviva-etl | /ies/extract/ddl_load/CREATE_LOAD_IES_2011_LOCAL_OFERTA_POLO.sql | UTF-8 | 857 | 3.203125 | 3 | [] | no_license | use dataviva_raw;
rename table IES_2011_LOCAL_OFERTA_POLO to IES_2011_LOCAL_OFERTA_POLO_T1;
drop table if exists IES_2011_LOCAL_OFERTA_POLO_BLOCO;
create table IES_2011_LOCAL_OFERTA_POLO_BLOCO( dados varchar(2000) not null);
load data local infile 'H:/HEDU/Dados/2011/DADOS/LOCAL_OFERTA_POLO.txt'
into table IES_2011_... | true |
bd16ffc239b725df901f9c20eaa14332ecadd1e5 | SQL | swissgerman/DuetschAuftrag | /hoteldb.sql | UTF-8 | 114,999 | 3.078125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.2.11
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: May 19, 2016 at 03:18 PM
-- Server version: 5.6.21
-- PHP Version: 5.6.3
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
... | true |
4b4af2788cc662f1ba9f3a85e6c7f4add455ac40 | SQL | S0L4/BancoDeDados | /Execícios/ExercícioSSolve/SQLQueryT_SSolve_DDL.sql | IBM852 | 1,226 | 3.3125 | 3 | [
"MIT"
] | permissive | CREATE DATABASE T_SSolve
USE T_SSolve
CREATE TABLE Clientes
(
IdCliente INT PRIMARY KEY IDENTITY NOT NULL
,NomeFatasia VARCHAR(255) NOT NULL
,CNPJ VARCHAR(14) NOT NULL UNIQUE
,RazaoSocial VARCHAR(255) NOT NULL UNIQUE
,Endereo VARCHAR(255) NOT NULL UNIQUE
);
ALTER TABLE Clientes
ALTER COLUMN CNPJ VARCHAR(... | true |
55da1e3389a1ce19c8cead30b61239820c0ac9c7 | SQL | CBailey589/chinook-ConnorBailey | /SQLqueries/line_item_track.sql | UTF-8 | 100 | 3.234375 | 3 | [] | no_license | SELECT il.*, t.Name
FROM InvoiceLine il
JOIN Track t
ON il.TrackId = t.TrackId
ORDER BY il.InvoiceId | true |
52d20bb465a93f27504d7dc5be19b34ff20eecde | SQL | dinuone/WFMCountruction | /DB/project.sql | UTF-8 | 2,057 | 3.25 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 5.0.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Jan 30, 2021 at 06:18 PM
-- Server version: 10.4.16-MariaDB
-- PHP Version: 7.4.12
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIE... | true |
a5f9599a8b058b0ef9a0cd2073cf73e858d83662 | SQL | silence-do-good/stress-test-Postgres-and-MySQL | /dump/low/day23/select0421.sql | UTF-8 | 178 | 2.671875 | 3 | [] | no_license |
SELECT timeStamp, temperature FROM ThermometerOBSERVATION o
WHERE timestamp>'2017-11-22T04:21:00Z' AND timestamp<'2017-11-23T04:21:00Z' AND temperature>=42 AND temperature<=99
| true |
25b7975aed694b3d42e14ab5caa1742f8d4abacc | SQL | maxpolun/go-weightlog | /db/migrations/20130302221632_CreateSessionTable.sql | UTF-8 | 340 | 3.203125 | 3 | [] | no_license |
-- +goose Up
-- SQL in section 'Up' is executed when this migration is applied
CREATE TABLE sessions (
id CHAR(88) PRIMARY KEY,
user_id serial references users(id),
created_at TIMESTAMP WITH TIME ZONE DEFAULT CURRENT_TIMESTAMP
);
-- +goose Down
-- SQL section 'Down' is executed when this migration is rolled back
D... | true |
dd8fb0d4c9c4c4b7da1b8c4705140329f55f6736 | SQL | ahayek84/metrics | /metrics_db.sql | UTF-8 | 7,991 | 2.96875 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.7.9
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1:3306
-- Generation Time: Aug 31, 2019 at 03:12 PM
-- Server version: 5.7.21
-- PHP Version: 7.2.4
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHA... | true |
1bf3c10102a47f46e4a51067a479f6b2bfd0ffcd | SQL | TweakBox/ITS | /jsla.sql.bak.sql | UTF-8 | 11,715 | 3.296875 | 3 | [] | no_license | /*
Navicat MySQL Data Transfer
Source Server : localhost
Source Server Version : 50505
Source Host : 127.0.0.1:3306
Source Database : jsla
Target Server Type : MYSQL
Target Server Version : 50505
File Encoding : 65001
Date: 2016-09-11 12:21:04
*/
SET FOREIGN_KEY_CHECKS=0;
-- ----... | true |
5de3526fa037fa6e960bf61ab7f8b6552238262a | SQL | stanislaviv/Databases-Basics---MS-SQL-Server---2017 | /6_Table_Relations/6_Table_Relations/TableRelations_Exercise/4.Self_Referencing.sql | UTF-8 | 444 | 3.5 | 4 | [
"MIT"
] | permissive | CREATE TABLE Teachers
(
TeacherID int NOT NULL,
Name varchar(50),
ManagerID int
)
INSERT INTO Teachers(TeacherID, Name, ManagerID)
VALUES
(101, 'John', NULL),
(102, 'Maya', 106),
(103, 'Silvia', 106),
(104, 'Ted', 105),
(105, 'Mark', 101),
(106, 'Greta', 101)
ALTER TABLE Teachers
ADD CONSTRAINT PK_Teachers PRIMARY KE... | true |
1b6dde920418c15d68f283b7d4e322053231b476 | SQL | RoJeJJ/yinfeng | /manager-server/src/main/resources/sql/schema.sql | UTF-8 | 570 | 2.71875 | 3 | [] | no_license | -- manager.sys_user definition
CREATE TABLE IF NOT EXISTS `sys_user` (
`id` bigint NOT NULL AUTO_INCREMENT,
`gmt_create` datetime NOT NULL,
`gmt_modify` datetime NOT NULL,
`password` varchar(255) DEFAULT NUL... | true |
3b2383e5cb65ff89c5e915a0c037eba1cf29db68 | SQL | FrancescoGiraud0/EserciziPython | /api/chat_api/v1/server/db/creation_queries/messages.sql | UTF-8 | 658 | 3.703125 | 4 | [] | no_license | CREATE TABLE IF NOT EXISTS 'messages'(
'id' INTEGER UNIQUE PRIMARY KEY AUTOINCREMENT NOT NULL,
'msg_timestamp' DATETIME NOT NULL,
'id_dest' INT NOT NULL,
'id_mitt' INT NOT NULL,
'message' VARCHAR(250) NOT NULL,
'len' INT NOT NULL,
'type' VARCHAR(10) NOT NULL DEFAULT 'text',
'received' IN... | true |
3d61f4ae46e1f8a7019592b14fd50b6aaa2ad316 | SQL | txvoz/getionlibros | /target/classes/data/db_libros_v1_27082019.sql | UTF-8 | 3,646 | 3.21875 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.8.3
-- https://www.phpmyadmin.net/
--
-- Servidor: 127.0.0.1
-- Tiempo de generación: 28-08-2019 a las 01:59:05
-- Versión del servidor: 10.1.37-MariaDB
-- Versión de PHP: 7.2.12
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";... | true |
d5cc6453378903c5437c4841bbff6833e47cf6cc | SQL | radtek/abs3 | /sql/mmfo/bars/Table/firewall_user_module.sql | WINDOWS-1251 | 4,553 | 3.296875 | 3 | [] | no_license |
PROMPT =====================================================================================
PROMPT *** Run *** ========== Scripts /Sql/BARS/Table/FIREWALL_USER_MODULE.sql =========***
PROMPT =====================================================================================
PROMPT *** ALTER_POLICY_INFO... | true |
56ccc68fe587d9f9629a8e44aff5b8ce2be4243c | SQL | paulkern/ncaa-coaching-analysis | /database/coach.sql | UTF-8 | 752 | 3.46875 | 3 | [] | no_license | drop table if exists warehouse;
drop table if exists warehouse_schools;
drop table if exists wiki;
create table warehouse(name text, school text, position text, start_year int, end_year int,
PRIMARY KEY (name, school, start_year) );
create table warehouse_schools(coach text, year int, school text, win int, l... | true |
5d46d6c9d9a7ac3cb509b7af12b4dac95f6e3718 | SQL | rshane7/SQL-Challenge | /2 - SQL-Challenge - Table Schemata - SQL Script - RSL1.sql | UTF-8 | 3,148 | 4.125 | 4 | [] | no_license | -- Exported from QuickDBD: https://www.quickdatabasediagrams.com/
-- Link to schema: https://app.quickdatabasediagrams.com/#/d/x9UEu3
-- NOTE! If you have used non-SQL datatypes in your design, you will have to change these here.
--Create Database Employees DB
create database employees_db
-- Validate tables do not e... | true |
90630d57f872eb1e448d5289f4be62cc45217b10 | SQL | Songmu/im.kayac.com | /sql/Im-Schema-1-SQLite.sql | UTF-8 | 661 | 3.109375 | 3 | [] | no_license | --
-- Created by SQL::Translator::Producer::SQLite
-- Created on Fri Sep 4 11:47:50 2009
--
BEGIN TRANSACTION;
--
-- Table: im_account
--
DROP TABLE im_account;
CREATE TABLE im_account (
id INTEGER PRIMARY KEY NOT NULL,
service VARCHAR(255),
username VARCHAR(255),
valid INTEGER(1) NOT NULL DEFAULT '0',
... | true |
c861e8993d35cdba4b7eab7298761c41563df316 | SQL | dearaujobruno/sistemaVoto-1 | /vot.sql | UTF-8 | 7,560 | 3.125 | 3 | [
"MIT"
] | permissive | -- phpMyAdmin SQL Dump
-- version 4.8.0.1
-- https://www.phpmyadmin.net/
--teste
-- Host: 127.0.0.1
-- Generation Time: Dec 13, 2018 at 12:05 AM
-- Server version: 10.1.32-MariaDB
-- PHP Version: 7.2.5
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 S... | true |
d7c8331e27e7e8810ea231f66ae15097918dcaf2 | SQL | slambert67/techAndTools | /oracle/sql/pivot/pivot.sql | UTF-8 | 1,696 | 4.09375 | 4 | [] | no_license | CREATE TABLE orders_to_pivot
( order_id integer NOT NULL,
customer_ref varchar2(50) NOT NULL,
order_date date,
product_id integer,
quantity integer,
CONSTRAINT orders_to_pivot_pk PRIMARY KEY (order_id)
);
insert into orders_to_pivot values(50001,'SMITH',NULL,10,0);
insert into orders_to_pivot values(50002,'S... | true |
5aeca7a2c17c7ef0b79757c083af0a9c8e085fb7 | SQL | Juuro/Dreamapp-Website | /sites/ajaxComment/ajaxComments.sql | UTF-8 | 2,106 | 2.9375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 2.11.7.1
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Nov 06, 2009 at 04:29 AM
-- Server version: 5.0.41
-- PHP Version: 5.2.6
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTE... | true |
ff29a011837c999f936f70387d57e1bd67d4798d | SQL | SunGitShine/share_doctor | /src/main/resources/sql/share_doctor.sql | UTF-8 | 11,376 | 3.1875 | 3 | [] | no_license | /*
Navicat MySQL Data Transfer
Source Server : localhost
Source Server Version : 50717
Source Host : 127.0.0.1:3306
Source Database : share_doctor
Target Server Type : MYSQL
Target Server Version : 50717
File Encoding : 65001
Date: 2018-04-10 18:58:39
*/
SET FOREIGN... | true |
eecb1f402a7d9498a0583c773cb9798f3021354d | SQL | nobruss10/RestWithASP-NETUdemy | /RestWithASPNETUdemy/RestWithASPNETUdemy/db/migrations/V1_0_3__Create_Table_Books.sql | UTF-8 | 192 | 2.71875 | 3 | [] | no_license | CREATE TABLE IF NOT EXISTS books(
Id INT UNSIGNED AUTO_INCREMENT NOT NULL,
Title LONGTEXT,
Author LONGTEXT,
LaunchDate DATETIME(6) NOT NULL,
Price DECIMAL,
PRIMARY KEY(Id)
) | true |
11bf88dba908da7e876b47015d93212d0c6cd2e9 | SQL | radtek/abs3 | /sql/mmfo/bars/Procedure/p_revdat.sql | WINDOWS-1251 | 2,527 | 3.1875 | 3 | [] | no_license |
PROMPT =====================================================================================
PROMPT *** Run *** ========== Scripts /Sql/BARS/Procedure/P_REVDAT.sql =========*** Run ***
PROMPT =====================================================================================
PROMPT *** Create procedure... | true |
7cc901af9356d767e755bd2980dcb79c19ca681d | SQL | MYCourseWorks/softuni-hw | /SoftUniHomeWorks_DBs/01.SqlBasics/06.SubqueriesAndJoins/15.HardSubqueriesAndJoin.sql | UTF-8 | 930 | 4.375 | 4 | [] | no_license | select B.ContinentCode, C.CurrencyCode, C.CurrencyUsage
from (select A.ContinentCode, max(A.CurrencyUsage) as MaxUsage
from (select CON.ContinentCode, CUR.CurrencyCode, count(COU.CountryCode) as CurrencyUsage
from Countries as COU
join Currencies as CUR on CUR.CurrencyCode = COU.CurrencyCode
join Continen... | true |
ce878a169b1a54354b50dc0531ded6485a447328 | SQL | OHDSI/CdmAtlasCutover | /inst/sql/sql_server/networkAchillesResults.sql | UTF-8 | 497 | 3.34375 | 3 | [
"Apache-2.0"
] | permissive | IF OBJECT_ID('@networkDatabaseSchema.achilles_results', 'U') IS NOT NULL drop table @networkDatabaseSchema.achilles_results;
--HINT DISTRIBUTE_ON_KEY(analysis_id)
with count_analyses as
(
@analysisIds
),
sql_union as
(
@sqlUnions
)
select
analysis_id,
stratum_1,
stratum_2,
stratum_3,
stratum_4,
stra... | true |
f45e4922e33bbef6e32e7ecf620a76c619bdc8b6 | SQL | RashmiJenamani/FCUBS143_PROD | /MAIN/DATABASE/UPGRADE/INC/CSTB_FID_DATA_SOURCES_HOST.INC | UTF-8 | 3,905 | 2.59375 | 3 | [] | no_license | UPDATE CSTB_FID_DATA_SOURCES
SET FUNCTION_ID='ISDCTMEX',
NODE_NAME='CSTB_UI_COLUMNS',
NODE_NO=2,TABLE_NAME='CSTB_UI_COLUMNS',
NODE_TYPE='NORMAL',
NODE_MANDATORY='N',
PARENT_NODE='ISTMS_CLEARING_CODE',
RELATION_WITH_PARENT='ISTMS_CLEARING_CODE.NETWORK_CODE = CSTB_UI_COLUMNS.CHAR_FIELD44 AND ISTMS_CLEARING_CODE.CLEARING... | true |
978ba5bf3bb92e40fa080605d79a6d5c0d215900 | SQL | pelos6/miCarpeta | /serviciosMiCarpetaCtSec/baseDatos/serviciosMiCarpetaCtSecTablasVistasDatos1_0_2.sql | UTF-8 | 10,812 | 2.90625 | 3 | [
"BSD-3-Clause"
] | permissive | -- --------------------------------------------------------
-- Host: 127.0.0.1
-- Versión del servidor: 5.6.23 - MySQL Community Server (GPL)
-- SO del servidor: Win32
-- HeidiSQL Versión: 9.1.0.4867
-- --------------------------------------------------------
/*... | true |
8d2a3f301351c5b34fce3b1b749794653886096c | SQL | CristianN0906/SQL-project | /company_db.sql | UTF-8 | 9,186 | 3.640625 | 4 | [] | no_license |
/* CREARE BAZA DE DATE, TABELE SI LEGATURILE DINTRE ACESTEA */
DROP DATABASE IF EXISTS company_db;
CREATE DATABASE IF NOT EXISTS company_db;
USE company_db;
CREATE TABLE departamente(
id INT PRIMARY KEY NOT NULL AUTO_INCREMENT,
denumire VARCHAR(40) NOT NULL
);
CREATE TABLE angajati(
id INT PRIMARY KEY NOT NU... | true |
0d3de80df50cbd04faca619632d29f0df8ed12a7 | SQL | kiezmor/piscine_php | /RUSH00/db.sql | UTF-8 | 6,410 | 3.140625 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.7.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1:3306
-- Generation Time: Jan 13, 2018 at 10:20 AM
-- Server version: 5.7.19
-- PHP Version: 5.6.31
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHA... | true |
69701ad608af11552e4e99baf0d9bab509a7976b | SQL | AnnotatedBooksOnline/AnnotatedBooksOnline | /application/sqlscripts/updates/update62_63.sql | UTF-8 | 560 | 3.640625 | 4 | [] | no_license | BEGIN TRANSACTION;
ALTER TABLE "Annotations" ADD COLUMN "changedUserId" integer;
ALTER TABLE "Annotations" ADD COLUMN "timeChanged" timestamp without time zone;
UPDATE "Annotations" SET "changedUserId" = "userId";
ALTER TABLE "Annotations" ALTER COLUMN "changedUserId" SET NOT NULL;
ALTER TABLE "Annotations" RENAME CO... | true |
c3622de8e1452e2888c80e4d9b05bd8d22e5444a | SQL | hannibal60/PP | /Implementación/codigo-copia/Proyecto Historial Clinico_ORIGINAL V3/BD_gestorclinico.sql | UTF-8 | 5,214 | 3.875 | 4 | [] | no_license | CREATE DATABASE gestorclinico;
USE gestorclinico;
CREATE TABLE centros_medicos(
id_centromedico INT AUTO_INCREMENT,
nombre_centromedico VARCHAR(100) NOT NULL,
especialidad_centromedico VARCHAR(100) DEFAULT 'SE',
direccion VARCHAR(100) NOT NULL,
telefono VARCHAR(15) NOT NULL,
PRIMARY KEY(id_centromedico)
);
#Tod... | true |
baf5c9a6123622e7424f8d23a8a82a43cd0a14ce | SQL | nomanHasan/sql_workspace | /tsql_fund/chapter3/1.2exe.sql | UTF-8 | 228 | 3.640625 | 4 | [] | no_license | SELECT E.empid, DATEDIFF(dd, '20160612', '20160616') as DIFF, DATEADD(DD, N.n - 1, '20160612')
FROM HR.Employees as E
CROSS JOIN dbo.Nums as N
WHERE N.n <= DATEDIFF(dd, '20160612', '20160616') + 1
ORDER BY empid
| true |
ac43935170bc0018280681aeeecf3250810a42b3 | SQL | ghostidentity/coronahealthtrackerbackend | /account/src/main/resources/db/migration/V0.3__photos.sql | UTF-8 | 324 | 3.171875 | 3 | [] | no_license | create table photos (
photoId bigint GENERATED BY DEFAULT AS IDENTITY PRIMARY KEY,
photo varchar(255) NOT NULL,
userId int NOT NULL,
uploadedOn date DEFAULT CURRENT_DATE NOT NULL
);
create unique index photos_index on photos (userI... | true |
7f838c8d97aafad13072ad1d064614c68dc1da32 | SQL | KonstantinFrank01/deleteme2 | /erd-test.sql | UTF-8 | 1,086 | 3.609375 | 4 | [] | no_license | drop table azortzuweisung;
drop table ort;
drop table fahrt;
create table ort(
ortid number(3) constraint pk_ort primary key,
ortname varchar2(300) not null
);
create table fahrt(
fahrtid number(5) constraint pk_fahrt primary key,
fahrtdauer_min number(6) not null
);
create table azortzuweisung(
... | true |
7377dbd431e9d96b373a8889ca58db539ea6ddec | SQL | go2suresh1979/MyRepo | /Personal/Ticketing/main/oracle/sql/tom/views/tm8200_helpdesk.sql | UTF-8 | 16,827 | 2.640625 | 3 | [] | no_license | /*
**---------------------------------------------------------------------------#
**
** Component: $Id: //remedy7/main/oracle/sql/tom/views/tm8200_helpdesk.sql#2 $
** Author: K. J. LeGro
** Copyright: Totality Corporation, 2005.
**
** This file contains the Helpdesk view used by Totalview.
**
*---------------... | true |
8fad1e5d8243044667620a40a33b1773bfe5f94f | SQL | spark-2020/utils | /MySQL/scripts-and-random-code/update-database-structure-blank.sql | UTF-8 | 1,569 | 3.609375 | 4 | [
"Apache-2.0"
] | permissive | # For any question about this script - Ask Franck
#
# Pre-requisite:
# - you have a table `db_schema_versions` in your database that stores versioning information about the database.
#
###################################################
# CHANGE THESE VARIABLES ACCORDING TO YOUR NEEDS
################################... | true |
d23299682777404dd4307220b7d1041dedff9628 | SQL | sebasalgado402/ProyectoVikingSSoft | /ProyectoVikingsV2/Base de Datos/vikingssoft.sql | UTF-8 | 7,593 | 3.28125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.8.5
-- https://www.phpmyadmin.net/
--
-- Servidor: 127.0.0.1:3306
-- Tiempo de generación: 17-10-2019 a las 20:10:30
-- Versión del servidor: 5.7.26
-- Versión de PHP: 7.2.18
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/... | true |
0a4591c918679c886ee5b0be977496844577f7a0 | SQL | gctv01/BD1Project | /Reporte 27 - Enunciado.sql | UTF-8 | 839 | 3.625 | 4 | [] | no_license | Select b."Placa", s."Nombre", to_char(Max(m."FechaFinal"),'DD-MM-YYYY') as fin, 'Barco' as tipo
From "Barco" b, "Mantenimiento" m, "Sucursal" s, "Puerto" p
Where b."Placa"=m."PlacaB" and b."FK-PuertoB"=p."COD" and p."FK-Sucursal"=s."COD"
group by b."Placa", s."COD", s."Nombre"
UNION
Select b."Placa", s."Nombre", to_c... | true |
a2d7325b99e62c8da302b8b5c7a9de6344cb9cca | SQL | Interns14/EVAL-A-Group-Peer-Based-Quizzing-System | /Server/Database.sql | UTF-8 | 6,948 | 3.109375 | 3 | [] | no_license | -- MySQL dump 10.13 Distrib 5.5.31, for debian-linux-gnu (x86_64)
--
-- Host: localhost Database: peer01
-- ------------------------------------------------------
-- Server version 5.5.31-0ubuntu0.12.04.1
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CH... | true |
99c15f3e0d4b41c7b6195ecaa20a40dd48d4435d | SQL | LeonovEgor/Database | /HomeTask3/Task5_query.sql | WINDOWS-1251 | 959 | 3.484375 | 3 | [] | no_license | -- 5. ( ) catalogs .
-- SELECT * FROM catalogs WHERE id IN (5, 1, 2); , IN.
USE shop;
--
TRUNCATE TABLE catalogs;
--
INSERT INTO catalogs VALUES
(DEFAULT, ''),
(DEFAULT, '.'),
(DEFAULT, ''),
(DEFAULT, ' '),
(DEFAULT, ''),
(DEFAULT, ''),
(DEFAULT, ''),
(DEFAULT, ' ');
-- id ... | true |
71ba709cdc84106c2572895de2e0d43dfb0a59e8 | SQL | JcGaara/SGA-PLSQL-OPE | /SGA-OPERACION/PackageBodies/PQ_MASIVASOT.sql | ISO-8859-3 | 5,879 | 3.265625 | 3 | [] | no_license | create or replace package body operacion.pq_masivasot is
/*******************************************************************************************************
NOMBRE: PQ_MASIVA_SOT
PROPOSITO: Agrupacion de funcionalidades adicionales de administracion de Proyectos para procesos masivos
REVISIONES... | true |
9ec7f66c8196076175929e1ac176b1d2429c595a | SQL | ktaeho14/KH_Aduino | /work02_Oracle/Day2.sql | UTF-8 | 10,865 | 4.4375 | 4 | [] | no_license | SELECT * FROM EMPLOYEE;
-- 데이터 베이스에서 실행하고자 하는 명령 종류
-- CRUD : 데이터 기본 사항 처리 로직
-- CREATE : 데이터 추가 / INSERT
-- READ : 데이터 조회 / SELECT
-- UPDATE : 데이터 수정 / UPDATE
-- DELETE : 데이터 삭제 / DELETE
--컬럼 값을 사용하여 계산식을 적용한 정보 조회하기
--컬럼의 값이 만약 NULL 이라면 어떠한 연산 처리를 해도 결과는 NULL!!!
SELECT EMP_NAME "사원명",
(SALARY ... | true |
8cea6a4fa9079d00bb69d7b3d121c3427ef6eb11 | SQL | Vya-cheslav/geek | /1_quarter/mysql/lesson_12/booking.sql | UTF-8 | 15,576 | 3.265625 | 3 | [] | no_license | -- MySQL dump 10.13 Distrib 8.0.17, for macos10.14 (x86_64)
--
-- Host: localhost Database: booking
-- ------------------------------------------------------
-- Server version 8.0.17
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */... | true |
bc921f83ede714dbacf49d4afdf9ad58c2a010fd | SQL | vijaydairyf/TimelyFish | /PigChamp/caredata/Views/caredata.CFV_SowFarrowEvent_Delete.sql | UTF-8 | 1,533 | 3.4375 | 3 | [] | no_license |
CREATE VIEW [caredata].[CFV_SowFarrowEvent_Delete]
AS
select ev.Event_Id as EventID
, SUBSTRING(farm.[farm_name],1,8) AS FarmID
, SUBSTRING(IH.[primary_identity],1,12) as SowID
, ev.[eventdate] as Eventdate
,(farrow.[liveborn_gilts] + farrow.[liveborn_boars]) as QtyBornAlive
,farrow.[stillb... | true |
406c63e17046ddd3889a04387e8651119d947607 | SQL | msredhotero/despachadordeaduana | /sql/consultas/puntos_cooperativas_por_funcion_obra.sql | UTF-8 | 558 | 3.734375 | 4 | [] | no_license | SELECT
sum(cp.puntos)
FROM
dbpersonal p
INNER JOIN
dbpersonalcooperativas cp ON p.idpersonal = cp.refpersonal
INNER JOIN
dbcooperativas c ON c.idcooperativa = cp.refcooperativas
INNER JOIN
dbobrascooperativas oc ON oc.refcooperativas = c.idcooperativa
INNER JOIN
... | true |
60ac7e80101c315d87ad98a00ddf7faf96fdbf43 | SQL | rajibcuetcse/fam | /chtl_fam.sql | UTF-8 | 54,520 | 3.1875 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.0.10.18
-- https://www.phpmyadmin.net
--
-- Host: localhost:3306
-- Generation Time: Jun 16, 2017 at 11:47 AM
-- Server version: 5.6.35-cll-lve
-- PHP Version: 5.6.30
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACT... | true |
25ce7d65da526603450fedb9da9081fdbfbf6d41 | SQL | unhappydepig/NutzWx | /src/main/resources/菜单调整.sql | UTF-8 | 9,320 | 2.609375 | 3 | [] | no_license | /*
SQLyog Ultimate v8.32
MySQL - 5.6.0-m4 : Database - weixin
*********************************************************************
*/
/*!40101 SET NAMES utf8 */;
/*!40101 SET SQL_MODE=''*/;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_M... | true |
c625a23719891f6598bcf7797fc6304d6dbfb483 | SQL | radoslavmihalus/dfs | /www/admin2/db/rcrud.sql | UTF-8 | 50,430 | 2.78125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.5.4.1deb2ubuntu2
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Nov 29, 2016 at 07:53 AM
-- Server version: 5.7.15-0ubuntu0.16.04.1
-- PHP Version: 7.0.8-0ubuntu0.16.04.3
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CH... | true |
9be7f4bd265d32c09794e61a940eb406f3d60456 | SQL | Rohed/test_repo_rohed | /models/base-stitch/ga/timetrade/ga_proc_timetrade.sql | UTF-8 | 828 | 3.21875 | 3 | [] | no_license | select *
from (
SELECT
'www.timetrade.com - external only' as account,
'TimeTrade' as client,
lower(trim(regexp_replace(replace(replace(replace(replace(CONCAT(hostname,landingpagepath),'www.',''),'http://',''),'https://',''),'.html',''),r'\?.*$',''),'/')) as url,
cast(date as date) date,
lower(source) source,
lowe... | true |
9f95aa8a6d40bace4c4cb07402f1fd2ce8330a5b | SQL | jaketf/bigquery-utils | /udfs/migration/teradata/instr.sql | UTF-8 | 1,012 | 3.171875 | 3 | [
"Apache-2.0"
] | permissive | /*
* Copyright 2019 Google LLC
*
* 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/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to i... | true |
66fd8d755003d8e0e662724092cbc8df2942c1be | SQL | 0NightBot0/DevDatabase | /assignment 1/build/classes/devdatabase/assignment _1script.sql | UTF-8 | 3,726 | 3.703125 | 4 | [] | no_license |
drop table if exists position_employee;
drop table if exists degree_employee;
drop table if exists address_employee;
drop table if exists position_project;
drop table if exists address cascade;
drop table if exists degree cascade;
drop table if exists employee cascade;
drop table if exists headquarters cascade;
drop ... | true |
43857886fceb552609e31354c87f0f57f55ab515 | SQL | rajesh241/libtech | /src/pds/schema/fpsShops.sql | UTF-8 | 505 | 2.65625 | 3 | [] | no_license | CREATE TABLE `fpsShops` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`stateName` varchar(40) DEFAULT NULL,
`districtName` varchar(40) DEFAULT NULL,
`blockName` varchar(40) DEFAULT NULL,
`fpsName` varchar(256) DEFAULT NULL,
`stateCode` varchar(2) DEFAULT NULL,
`districtCode` varchar(20) DEFAULT NULL,
`blockCo... | true |
4abfa9a129e6ae46f25d4458fc80215c3e7cea50 | SQL | openforis/fra-platform | /src/server/db/migration/migrations/sqls/20170929075633-create-table-area-of-permanent-forest-estate-up.sql | UTF-8 | 294 | 2.765625 | 3 | [] | no_license | CREATE TABLE area_of_permanent_forest_estate
(
"country_iso" VARCHAR(3) REFERENCES country(country_iso) NOT NULL,
"row_name" varchar,
"1990" numeric,
"2000" numeric,
"2010" numeric,
"2015" numeric,
"2020" numeric,
"not_applicable" text,
PRIMARY KEY (country_iso, row_name)
);
| true |
2f8cc093ef1906e4202bd2d6f8614d2b63893d89 | SQL | lucidsoftware/cashy | /conf/evolutions/default/2.sql | UTF-8 | 757 | 3.5 | 4 | [
"Apache-2.0"
] | permissive | # patch 2
# assets and audits
# --- !Ups
CREATE TABLE `assets` (
`id` bigint NOT NULL AUTO_INCREMENT,
`bucket` varchar(100) NOT NULL,
`key` varchar(255) NOT NULL,
`user_id` bigint NOT NULL,
`created` datetime NOT NULL,
PRIMARY KEY (`id`),
FOREIGN KEY (`user_id`) REFERENCES users(`id`) ON DELETE RESTRICT... | true |
530ca930427d1f6782ea8ddf14abf35abd07d5b9 | SQL | mrbratchenko/PHP_bootcamp | /d05/ex03/ex03.sql | UTF-8 | 234 | 2.796875 | 3 | [] | no_license | INSERT INTO ft_table (login, `group`, creation_date)
SELECT last_name AS login, 'other' AS `group`, birthdate AS creation_date
FROM user_card
WHERE LENGTH (last_name) < 9 AND last_name LIKE '%a%'
ORDER BY last_name ASC
LIMIT 10; | true |
5928d1b6899c27138305323a46524f2cca434422 | SQL | esmith78/Medicare-Annual-Wellness-Visits | /Code/Smith_Analytics_Exercise_Queries.sql | UTF-8 | 3,413 | 4.125 | 4 | [] | no_license |
# For each practice, only use the primary care specialty providers, otherwise bring in radiologists, etc.
# Make a fact table to source the research questions
DROP TABLE IF EXISTS tmp_pc;
CREATE TABLE tmp_pc AS
SELECT
t1.group_practice,
t1.practice_name,
t1.npi,
t3.total_unique_benes,
t2... | true |
fa250620977ba143cc62455957f16b4d93cbf2f0 | SQL | guancgsuccess/spring_security | /src/main/resources/user.sql | UTF-8 | 1,568 | 3.1875 | 3 | [
"Apache-2.0"
] | permissive | drop table user_role;
drop table user;
drop table role;
drop table permission;
drop table role_permission;
create table role_permission(
id int(7) PRIMARY KEY AUTO_INCREMENT,
role_id int(7),
permission_id int(7)
);
insert into role_permission values(1,1,1);
insert into role_permission values(2,1,2);
insert into r... | true |
e52f0e167c2d6bf6f9a7921d5503340adaa5f4d0 | SQL | Jacques-Fry/sensitive-field-encrypt | /sensitive-field-encrypt-demo/sql/sensitive数据库语句.sql | UTF-8 | 1,182 | 3.015625 | 3 | [] | no_license | /*
SQLyog Ultimate v12.08 (64 bit)
MySQL - 5.5.27 : Database - sensitive
*********************************************************************
*/
/*!40101 SET NAMES utf8 */;
/*!40101 SET SQL_MODE=''*/;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIG... | true |
ee0c936c497ce0cf581aa3244f2235ff1045102c | SQL | VeraAPACS3000/2020-05-otus-spring-project-work-mrykina | /FinancialDistribution/src/main/resources/data.sql | UTF-8 | 1,554 | 2.625 | 3 | [] | no_license | insert into CATEGORIES (id, `name`,BALANCE, PERCENT, PURPOSEAMOUNT, COMMENT, ACTIVE)
values (1, 'Financial cushion', 50000.00, 10.00,800000.00,'For my financial cushion', 1);
insert into CATEGORIES (id, `name`,BALANCE, PERCENT, PURPOSEAMOUNT, COMMENT, ACTIVE)
values (3, 'OTUS', 0.00, 5.00,800000.00,'OTUS', 1);
insert ... | true |
e256537437118247c4e0f3a9dd7a513dcc36ade0 | SQL | achugr/goods-review-ng | /goods-review-core/src/main/sql/entity.sql | UTF-8 | 410 | 3.015625 | 3 | [] | no_license | use gr_db;
DROP TABLE if EXISTS ENTITY;
CREATE TABLE ENTITY(
ID INT PRIMARY KEY NOT NULL auto_increment,
ENTITY_TYPE_ID INT NOT NULL,
ENTITY_ID INT NOT NULL,
ENTITY_ATTRS longtext NOT NULL,
ENTITY_HASH tinytext NOT NULL,
WATCH_DATE TIMESTAMP NOT NULL
);
DROP TABLE if EXISTS ENTITY_TYPE;
CREATE TABLE ENTITY_T... | true |
a703af120870d5f670fe787454e959253ad7c40d | SQL | syamti-dev/dbsicaping | /DDL/dataBaseIngresos2018_create.ddl | UTF-8 | 23,843 | 3.125 | 3 | [] | no_license | /*================================================================================*/
/* DDL SCRIPT */
/*================================================================================*/
/* Title : ... | true |
f9d987d91f16578310deb31ba7d27508fc80fe54 | SQL | ciproSi/cbc-exercises | /day-27/my-sql/select.sql | UTF-8 | 364 | 2.78125 | 3 | [] | no_license | SELECT *
FROM `countries`
SELECT *
FROM `countries`
WHERE `population` > 200000000
SELECT *
FROM `countries`
WHERE `population` > 20000000
ORDER BY `population` --default is acending order
SELECT *
FROM `countries`
WHERE `population` > 20000000
ORDER BY `population` DESC
SELECT *
FROM `countries`
WHERE `population... | true |
42acce129a4847d16d4e1f2d930e704f4dd1023a | SQL | wuchong/streaming_benchmark | /flink/query/q2.sql | UTF-8 | 242 | 3.390625 | 3 | [] | no_license | SELECT
strategy, site, pos_id, TUMBLE_START(rowtime, INTERVAL '10' SECOND), TUMBLE_END(rowtime, INTERVAL '10' SECOND), count(*) click_count
FROM
click
GROUP BY
strategy, site, pos_id, TUMBLE(rowtime, INTERVAL '10' SECOND) | true |
18c582e6413be40a2017a3b69e0a82aa6e680c60 | SQL | telunyang/mysql_edu | /SQL/my_db_with_data.sql | UTF-8 | 5,865 | 3.5 | 4 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.9.1
-- https://www.phpmyadmin.net/
--
-- 主機: 127.0.0.1
-- 產生時間:
-- 伺服器版本: 10.4.8-MariaDB
-- PHP 版本: 7.3.11
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*... | true |
816526e6f9cf7d873d00adea1f0725fec835baf7 | SQL | seanoughton/sql-library-lab-v-000 | /lib/insert.sql | UTF-8 | 1,180 | 2.65625 | 3 | [
"LicenseRef-scancode-unknown-license-reference",
"LicenseRef-scancode-public-domain"
] | permissive | INSERT INTO series (title,author_id,subgenre_id) VALUES
("The Hobbit",1,1),
("Lord of the Rings",2,2);
INSERT INTO books (title,year,series_id) VALUES
("The Hobbit",1937,1),
("Lord of the Rings", 1939,2),
("Jaws", 1971,3),
("Blood Meridian", 1989,3),
("The bible",0,777),
("Paradise Lost",1900,666);
INSERT INTO charac... | true |
bf2402bd80c3b4f854ae7ff3abe1f50165a150da | SQL | tuanemtv/eibdp | /org.eib.application.ui/Script/Query to Excel/LN/LN - 24. Doanh so thu goc trong ngay (Tong hop, USD, VND).sql | UTF-8 | 908 | 3.890625 | 4 | [] | no_license | -- DEFINE h_trdt = '20100405'
SELECT
&h_trdt TRDT, KHACH_HANG, CCYCD, SUM(DUNG_HAN) DUNG_HAN, SUM(TRUOC_HAN) TRUOC_HAN, SUM(TRE_HAN) TRE_HAN
FROM
(
SELECT /*+ INDEX (A PKLN_RPMT) */
DECODE(LN1.CHK_LNCUSTTP(A.BRCDDSBS, A.DSBSID, A.DSBSSEQ, A.CUSTSEQLN, 'IND'), 'Y', 'CA NHAN', 'DOANH NGHIEP') KHACH_HANG,
C... | true |
47835e43683a0e162da1005279cf546db2b73647 | SQL | SaranjeetSingh/project-morning | /db/seeds.sql | UTF-8 | 3,949 | 3.03125 | 3 | [] | no_license |
INSERT INTO users (userNumber,name,city,long,latitude)
VALUES(10154,'tom','san diego, ca',98.7,98.7);
INSERT INTO users (userNumber,name,city,longitude,latitude)
VALUES(10154,'tom','san diego, ca',99888989.777777777,777777777.99888989);
-- >>>>>>> a041970f58f7fcc85e8daa853b9ca699e988caf3
INSERT INTO users (userNumbe... | true |
6d12faaadce2b5d052bb4da22d9bda1f7710e156 | SQL | powersjcb/notes | /assessment-prep/a03-practice-sql-soln/data/import_db.sql | UTF-8 | 540 | 3.359375 | 3 | [] | no_license | CREATE TABLE movie (
id INTEGER PRIMARY KEY,
title VARCHAR(255) NOT NULL,
yr INTEGER NOT NULL,
director INTEGER NOT NULL
);
CREATE TABLE actor (
id INTEGER PRIMARY KEY,
name VARCHAR(255) NOT NULL
);
CREATE TABLE casting (
movieid INTEGER NOT NULL,
actorid INTEGER NOT NULL,
ord INTEGER NOT NULL,
... | true |
9b9ff4766d0466574321f2598d70e443523c3984 | SQL | Djamil17/ERNIE | /P2_studies/Permutation_Testing/Postgres/uzzi_datasource_queries.sql | UTF-8 | 2,130 | 3.96875 | 4 | [
"MIT"
] | permissive | \set ON_ERROR_STOP on
\set ECHO all
-- DataGrip: start execution from here
SET TIMEZONE = 'US/Eastern';
CREATE TABLE stg_uz_ds3 AS
SELECT
article_wp.source_id,
article_wp.publication_year AS source_year,
wr.cited_source_uid,
reference_wp.publication_year AS reference_year
FROM wos_publications article_wp
JOIN... | true |
d446dd8c2b0e25c3024b9e67a9bd616e62902ade | SQL | fadilxcoder/pdf-search | /replace_api_data.sql | UTF-8 | 1,793 | 3.03125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 5.0.0
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Generation Time: Jan 05, 2021 at 06:18 PM
-- Server version: 5.7.14
-- 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_CHARACTE... | true |
f23229daeeda8ec5c3e2a51f7df868045a08c655 | SQL | tuykin/09-215_2014 | /db/Ahmetshin_Robert/create enddates.sql | UTF-8 | 446 | 3.28125 | 3 | [] | no_license | create table enddates(
client_id int not null,
section_id int not null,
endDate date not null,
typeOfSub_id int not null,
constraint fk_client_id_end_cli
foreign key(client_id)
references clients(id)
on delete cascade
on update cascade,
constraint fk_section_id_end_sec
foreign key(section_id)
references sections(id)
o... | true |
d562344f2de667193416e02e256a7b20e15b5d8a | SQL | Devipurwita24/belajar-bootstrap | /peternakan.sql | UTF-8 | 1,403 | 2.84375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.9.0.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Waktu pembuatan: 22 Mar 2020 pada 08.21
-- 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 |
1ae231e74a84e5ff9b0dafe2582c2ff377252f1b | SQL | spring-projects/spring-boot | /spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-jpa/src/main/resources/import.sql | UTF-8 | 1,271 | 2.609375 | 3 | [
"Apache-2.0"
] | permissive | insert into tag(id, name) values (1, 'Spring projects')
insert into tag(id, name) values (2, 'Apache projects')
insert into tag(id, name) values (3, 'Open source')
insert into note(id, title, body) values (1, 'Spring Boot', 'Takes an opinionated view of building production-ready Spring applications.')
insert into note... | true |
a64bf882a41cb215924326a859744642ebf3aeba | SQL | Kaushik098/Oracle_sql_files | /sql_files/2.) Functions/Quotes.sql | UTF-8 | 2,876 | 3.59375 | 4 | [] | no_license | 1 Steven's last name is King and his salary is 24000. Today is 24-oct-2017. 17-06-03 is Steven King's hire date
SELECT first_name || '''s last name is ' || last_name || ' and his salary is ' || salary || '. Today is '|| SYSDATE || '. '|| hire_date || ' is ' ||
first_name || ' ' || last_name || '''s hire date... | true |
f38bdca14e18984e487536a70860d4a5377a1026 | SQL | Aaron-Usher/Capstone-2017 | /SnackOverFlowDB/Old Stuff/Scripts/BackorderPreorder/sp_create_backorder_preorder.prc | UTF-8 | 901 | 3.234375 | 3 | [] | no_license | USE [SnackOverflowDB]
GO
IF EXISTS(SELECT * FROM sys.objects WHERE type = 'P' AND name = 'sp_create_backorder_preorder')
BEGIN
DROP PROCEDURE sp_create_backorder_preorder
Print '' print ' *** dropping procedure sp_create_backorder_preorder'
End
GO
Print '' print ' *** creating procedure sp_create_backorder_preorder... | true |
cd1c84d0085ecafe8a4bba76920b8bd9f8fd32ef | SQL | DataViva/dataviva-etl | /secex/extract/select/Recodificacao_HS/2016/Recodificacao_hs_16.sql | UTF-8 | 1,585 | 3.28125 | 3 | [] | no_license | use dataviva_raw;
-- Recodificando HS1996 para HS2007:
select distinct CO_SH4 from SECEX_2016_EXP;
select distinct CO_SH4 from SECEX_2016_IMP;
-- Conforme resultado do R, apenas os codigos 9991, 9992, 9997 e 9998 não aparecem na lista de hs 2007, e devem ser recodificados
drop table if exists SECEX_2016_EXP_STEP1;
... | true |
f1ec39223552fa0a661a84581ddc4eb7666da7a3 | SQL | dgquintero/holbertonschool-higher_level_programming | /0x0E-SQL_more_queries/7-cities.sql | UTF-8 | 577 | 4.21875 | 4 | [] | no_license | -- Write a script that creates the database hbtn_0d_usa and the table cities
-- cities description:
-- id INT unique, auto generated, can’t be null and is a primary key
-- state_id INT, can’t be null and must be a FOREIGN KEY that references to
-- id of the states table name VARCHAR(256) can’t be null
CREATE DATABASE ... | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.