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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
ce96820fb753bee4e57fb77a175be2a79c9424e4 | SQL | yanxuanshaozhu/sqlcodes | /MySQL_Crash_Course/ch22.sql | UTF-8 | 1,221 | 3.453125 | 3 | [] | no_license | select cust_name, cust_contact from customers, orders, orderitems where customers.cust_id = orders.cust_id and orderitems.order_num = orders.order_num and prod_id = 'TNT2';
create view productcustomers as select cust_name, cust_contact, prod_id from customers, orders, orderitems where customers.cust_id = orders.cust_i... | true |
6194dc0a6d25e58f5c470f796e166fda2536ff37 | SQL | pritamk94/spring-boot-basic-auth-mysql-jdbc | /src/main/resources/springadmin.sql | UTF-8 | 3,039 | 3.109375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.8.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Apr 29, 2020 at 08:14 PM
-- Server version: 10.1.37-MariaDB
-- PHP Version: 5.6.40
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OL... | true |
d1d35ee398bb09a80495786f8d43a7d7b080c1ff | SQL | ccarstens/ChildBotProject | /2017_10_31-15-38_CHILDBOT LOCAL_db.sql | UTF-8 | 20,183 | 3.125 | 3 | [] | no_license | # ************************************************************
# Sequel Pro SQL dump
# Version 4541
#
# http://www.sequelpro.com/
# https://github.com/sequelpro/sequelpro
#
# Host: localhost (MySQL 5.6.25)
# Datenbank: childbot
# Erstellt am: 2017-10-31 14:38:37 +0000
# *************************************************... | true |
3966b24e54c3114354e4dccef948de68593211d5 | SQL | Jackson-eu/Primeiro | /DataBase/DB.sql | UTF-8 | 3,729 | 3.265625 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.0.4
-- http://www.phpmyadmin.net
--
-- Máquina: localhost
-- Data de Criação: 19-Fev-2014 às 00:55
-- Versão do servidor: 5.6.12-log
-- versão do PHP: 5.4.12
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CL... | true |
9c2d9dd308acd2e3568a1a44127dbbb78aab5255 | SQL | arshadnahid/masterProject | /kustiageneralerp_db.sql | UTF-8 | 1,314,011 | 3.203125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.2.11
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Apr 17, 2020 at 04:58 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 |
c1fffe0c5530014b6983fd4c3bda093d15386594 | SQL | akashgoyal119/MLB_Machine_Learning_Project | /sql_scripts/populate_db.sql | UTF-8 | 1,129 | 2.65625 | 3 | [] | no_license | USE mlb;
LOAD DATA
LOCAL INFILE "Users/t2/Desktop/github/GD2_Baseball_Project/practicum/txt_output_files/ballparkOutput.txt"
REPLACE INTO TABLE Ballpark
FIELDS TERMINATED BY ','
LINES TERMINATED BY '\n'
(parkID,parkName,openDate,closeDate);
LOAD DATA
LOCAL INFILE "Users/t2/Desktop/github/GD2_Basebal... | true |
8c368cdf4fd72c39f377dcba03b5631705499029 | SQL | farras13/PosMini | /db/db_majoo.sql | UTF-8 | 4,625 | 2.96875 | 3 | [
"MIT"
] | permissive | -- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Nov 01, 2021 at 12:14 AM
-- Server version: 10.4.14-MariaDB
-- PHP Version: 7.3.21
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIE... | true |
52aa76cf3665258b591441b2c4713ad889eb57aa | SQL | psontra/nabcodechallenge | /db/init.sql | UTF-8 | 9,508 | 2.796875 | 3 | [] | no_license | --
-- PostgreSQL database dump
--
-- Dumped from database version 13.4 (Debian 13.4-1.pgdg100+1)
-- Dumped by pg_dump version 13.4
-- Started on 2021-08-23 23:17:44
SET statement_timeout = 0;
SET lock_timeout = 0;
SET idle_in_transaction_session_timeout = 0;
SET client_encoding = 'UTF8';
SET standard_co... | true |
c57bf09c410cdd3fbe85195328bb9485f02f760a | SQL | anacreon/cs320 | /lab3-query.sql | UTF-8 | 1,002 | 3.765625 | 4 | [] | no_license | -- 1.
select r.content, concat(u.first_name,' ',u.last_name) as author, r.date from revisions r
left join wiki_pages w on(r.page = w.id)
left join users u on (r.author = u.id)
where (r.date = (select max(r.date) from revisions r) and w.path ='/wiki/index');
-- 2.
select r.id, concat(u.first_name,' ',u.last_name) as aut... | true |
228388999316a6bfd62fb2ff78a6102c6bc614bf | SQL | r0lan2/MyTAsks | /Code/DatabaseInstaller.Resources/Procedures/Elmah_LogError.sql | UTF-8 | 821 | 2.671875 | 3 | [
"Apache-2.0"
] | permissive | drop procedure if exists elmah_LogError;
CREATE PROCEDURE `elmah_LogError` (
IN ErrorId CHAR(36),
IN Application varchar(60),
IN Host VARCHAR(30),
IN Type VARCHAR(100),
IN Source VARCHAR(60),
IN Message VARCHAR(500),
IN User VARCHAR(50),
IN AllXml TEXT,
IN StatusCode INT(1... | true |
fac839c377aab7008db8e9183eae966b8d5ccab1 | SQL | datacode09/data-pipeline-pocket-reference | /ch6/incorrect_incremental_refresh_1.sql | UTF-8 | 1,060 | 3.765625 | 4 | [] | no_license | INSERT INTO PageViews VALUES(102,'2020-06-02 12:03:42', '/home', 'NULL');
INSERT INTO PageViews VALUES(101,'2020-06-03 12:25:01', '/product/567','social');
CREATE TABLE pageviews_daily_2 AS
SELECT * FROM pageviews_daily;
-- showing incorrect approach to implement incremental refresh
INSERT INTO pageviews_daily_2 (vie... | true |
02be9ffe8388e8f0ff7c8afd1ccddf66b97608f0 | SQL | Mark-Hansen/snipets | /SQL_DBM_generate/_types_diagram_keys_add.sql | UTF-8 | 1,617 | 2.53125 | 3 | [] | no_license | -- ****************** SqlDBM: MySQL ******************;
-- ***************************************************;
-- ************************************** `contact_address_types`
-- ************************************** `contact_detail_types`
-- ************************************** `object_types`
-- ... | true |
1dd036bc4f23473f7067320d4764a48f35782a25 | SQL | mgmc-git/sql-practices | /2019/CASEstatement_examples.sql | UTF-8 | 676 | 4.40625 | 4 | [] | no_license | USE employees;
SELECT
emp_no,
first_name,
last_name,
CASE gender
WHEN 'M' THEN 'Male'
ELSE 'Female'
END AS gender
FROM
employees;
/* Example CASE statement with NULL/NOT NULL */
SELECT
e.emp_no,
e.first_name,
e.last_name,
CASE
WHEN dm.emp_no IS NOT N... | true |
198ec20dec07d8188a44564eb3961e1e3c7f2004 | SQL | pallavishinde87/template-collection-api | /postgresql_commands.sql | UTF-8 | 1,661 | 2.96875 | 3 | [] | no_license | 1) Command to create table template_collection in database
create table template_collection(type character varying(500), entity character varying(500), customerId integer, law character varying(500), fields json []);
2) Command to insert template in table template_collection
insert into template_collection (type, ... | true |
3f6e69f5cdf5f046803f4ad567a57c36d00f094e | SQL | pedrooliveira23/mineiro | /src/main/resources/sql/migrations/V8__create_login.sql | UTF-8 | 2,026 | 3.953125 | 4 | [] | no_license | SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0;
SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0;
SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='TRADITIONAL,ALLOW_INVALID_DATES';
-- -----------------------------------------------------
-- Schema mineiro
-- --------------------------------------... | true |
c4cbbba79b75d3fb40afac0b70a80e33bce860d6 | SQL | F0ssette/formation-aston | /BDD/base.sql | UTF-8 | 984 | 4.28125 | 4 | [] | no_license | SHOW DATABASES;
USE blogger;
SHOW TABLES;
SELECT * FROM user;
DESCRIBE roles;
-- Pour ajouter des valeurs dans une table
INSERT INTO roles(name) VALUES('User');
SELECT name FROM roles;
SELECT role_id, name, 1+1 AS result FROM roles;
-- Pour actualiser un élément de la table
UPDATE roles SET name="Contributor" WHERE rol... | true |
dd4abb1d290ca1678121d2d4307be63af85c2314 | SQL | hoseinbadri/web | /p5/bookstore.sql | UTF-8 | 1,478 | 3.78125 | 4 | [] | no_license | CREATE TABLE `admins` (
`email` varchar(255) NOT NULL,
`password` varchar(255) NULL,
`last_login` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (`email`)
);
CREATE TABLE `books` (
`id` int NOT NULL AUTO_INCREMENT,
`title` varchar(255) NOT NULL,
`author` var... | true |
f5d42918ea15fd406bd8caa380b6046b138c884d | SQL | nakigao/nakigaos-trpg-room-web | /src/sql/replay/create_table_replay_part_gm_pl.sql | UTF-8 | 28,773 | 2.734375 | 3 | [
"MIT"
] | permissive | -- リプレイの各パートに紐づいてるプレイヤー
DROP TABLE IF EXISTS `replay_part_gm_pl`;
CREATE TABLE IF NOT EXISTS `replay_part_gm_pl` (
id BIGINT NOT NULL AUTO_INCREMENT PRIMARY KEY,
rule_unique_id TEXT NOT NULL,
series_id BIGINT NOT NULL,
episode_sequence_number BIGINT NOT NULL... | true |
e403ca2a41defcae69a8417513cf21fc11777dca | SQL | Luc-BuiTien/Railway12 | /MySQL/Assignment 3_2/day4_DB_FRESHER.sql | UTF-8 | 7,061 | 3.8125 | 4 | [] | no_license | -- Ôn tập mở rộng: Tạo vào thao tác với DB: fresher --
DROP DATABASE IF EXISTS Fresher;
CREATE DATABASE Fresher;
USE Fresher;
DROP TABLE IF EXISTS Trainee;
CREATE TABLE Trainee (
TraineeID MEDIUMINT AUTO_INCREMENT PRIMARY KEY,
Full_Name NVARCHAR(100) NOT NULL,
Birth_Date DATETIME DEFAULT NOW(),
Gender ENUM('MALE','FEM... | true |
8187abc3c0dfb3cbd7fb17c673303b34f719d1e0 | SQL | JahnDavis27/cs342 | /02modeling/lab02_1.sql | UTF-8 | 3,865 | 4.40625 | 4 | [] | no_license | -- This command file loads a simple movies database, dropping any existing tables
-- with the same names, rebuilding the schema and loading the data fresh.
--
-- CS 342, Spring, 2015
-- kvlinden
-- Drop current database
DROP TABLE Casting;
DROP TABLE Movie;
DROP TABLE Performer;
-- Create database schema
CREATE SEQUE... | true |
db631f54d0ccc85bcf89215166fc011d4a129fd0 | SQL | irohan98/Disease-Management-System-COVID-19- | /TESTING.sql | UTF-8 | 3,681 | 3.3125 | 3 | [] | no_license | USE covid19;
-- CREATING TABLE 'TESTING' WITH PRIMARY KEY 'TID' (TESTING ID)
CREATE TABLE Testing(
TID INT NOT NULL AUTO_INCREMENT,
LabName VARCHAR(255),
LabType VARCHAR(45),
T_Address VARCHAR(255),
T_City VARCHAR(45),
T_State VARCHAR(45),
SampleDate DATETIME,
Result CHAR(1),
PRIMARY KEY (TID));
-- STARTING 'PID' VALU... | true |
0466c020b56ba5587f899f205c422f67928e6403 | SQL | fischer1983/choose-lunch-api | /src/main/resources/db/migration/V01__script.sql | UTF-8 | 1,243 | 3.34375 | 3 | [] | no_license | drop table if exists oportunidade;
drop table if exists restaurante;
drop table if exists colaborador;
drop table if exists votacao;
create table oportunidade (
id bigint auto_increment not null,
nome_prospecto varchar(80) not null,
descricao varchar(200) not null,
valor decimal(10,2),
primary key (id)
);
... | true |
accc61456bc03539a144af9df7e701e4dc7058fb | SQL | 8968sam/Php_assignments | /pizza_palace/orders.sql | UTF-8 | 1,807 | 3.1875 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Generation Time: Nov 16, 2020 at 01:43 AM
-- Server version: 10.4.14-MariaDB
-- PHP Version: 7.4.9
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIEN... | true |
7dc23ae7fef4c66d81a6e2139073ecce4e7adf5f | SQL | Gareth-hub/SecureApplicationCA | /Staff/src/main/resources/com/example/staff/exportdb_x18382503.sql | UTF-8 | 2,059 | 3.203125 | 3 | [] | no_license | CREATE TABLE `demo_db`.`staff` (
`id` INT NOT NULL,
`name` VARCHAR(45) NOT NULL,
`email` VARCHAR(45) NOT NULL,
`age` VARCHAR(45) NOT NULL,
`salary` VARCHAR(45) NOT NULL,
PRIMARY KEY (`id`));
INSERT INTO staff (id, name, email, age, salary) VALUES ("1", "mark", "theceo@gmail.com", "50", "110000000000");... | true |
e11edefa347d61cfae88e95a2c56dc4cb88ab767 | SQL | jhellinckx/INFO-H303_Horeca | /src/eureka/create_db_eureka.sql | UTF-8 | 3,474 | 3.96875 | 4 | [] | no_license | CREATE TABLE "User"(
name VARCHAR(16) NOT NULL PRIMARY KEY,
email VARCHAR(255) NOT NULL UNIQUE,
password VARCHAR(128) NOT NULL,
signup_date TIMESTAMP NOT NULL,
is_admin BOOLEAN NOT NULL
);
CREATE TABLE "Establishment"(
id SERIAL NOT NULL CHECK (id>=0),
name VARCHAR(64) NOT NULL,
address_street VARCHAR(64) NOT ... | true |
71603380da35923dfccbbd59f4d9ed553e4d597f | SQL | CFsitesClients/CF2m | /datas/cf2m.sql | UTF-8 | 7,121 | 3.46875 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.1.14
-- http://www.phpmyadmin.net
--
-- Client : 127.0.0.1
-- Généré le : Ven 12 Juin 2015 à 15:19
-- Version du serveur : 5.6.17
-- Version de PHP : 5.5.12
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET... | true |
4a20febb33af32b65cef05963b6aa670ecb3ab5d | SQL | b4tm444n/Content-Management-Systeme-Studienarbeit | /Datenbankexporte/Daten_1.0.sql | UTF-8 | 1,951 | 2.9375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.8.3
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Erstellungszeit: 13. Nov 2018 um 08:22
-- Server-Version: 10.1.36-MariaDB
-- PHP-Version: 7.2.11
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_C... | true |
bedf0adf6e3c0de1d785e5635ccc80caab75eae9 | SQL | bellmit/flexdb | /2.HOST/5.Package/cspks_system.sql | UTF-8 | 36,493 | 2.765625 | 3 | [] | no_license | CREATE OR REPLACE PACKAGE "CSPKS_SYSTEM"
IS
/*----------------------------------------------------------------------------------------------------
** Module : COMMODITY SYSTEM
** and is copyrighted by FSS.
**
** All rights reserved. No part of this work may be reproduced, stored in a retr... | true |
5bc49505914d1bd4af1bbc1b00185dbf363ec5f3 | SQL | longphu753951/phongKhamTu | /phongKhamTu.sql | UTF-8 | 5,847 | 2.96875 | 3 | [] | no_license | -- MySQL dump 10.13 Distrib 8.0.21, for Win64 (x86_64)
--
-- Host: localhost Database: phongtu
-- ------------------------------------------------------
-- Server version 8.0.23
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!... | true |
5b90421b0b97f1e170c128f3fcd65d14d1c05c6f | SQL | santig19/DBT | /models/business/m_territory.sql | UTF-8 | 6,521 | 2.890625 | 3 | [] | no_license | {{ config(
post_hook="grant all privileges on {{ this }} to {{ var('snowflake_user_grant_privileges') }}")
}}
SELECT
t.ID as territory_id
,t.NAME as territory
,CASE
WHEN t1.NAME LIKE 'L1%' THEN t1.NAME
WHEN t.NAME LIKE 'L1%' THEN t.NAME
END as territory_EMEA
,CASE
WHEN t1.NAME LIKE 'L1%' OR t... | true |
f753831aba92e7c633cdcf75f86b37425b199e83 | SQL | java-fkd/Frame-Home | /mybatis-case/mybatis-batch/file/mybatis-batch.sql | UTF-8 | 937 | 3.171875 | 3 | [
"MIT"
] | permissive |
DROP TABLE IF EXISTS `user_info_batch`;
CREATE TABLE `user_info_batch` (
`id` bigint(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键id',
`user_name` varchar(100) NOT NULL COMMENT '账户名称',
`pass_word` varchar(100) NOT NULL COMMENT '登录密码',
... | true |
25bdcc3eced5d6b4aa5fa9ebc06a820509f29c13 | SQL | manuGarciaMons/PHP | /AprendiendoSQL/Ejercicios/ejercicio10.sql | UTF-8 | 208 | 2.78125 | 3 | [
"MIT"
] | permissive | /*
Visualizar los apellidos de los vendedores, su fecha y su numero de grupo,
ordenado por fecha descendente, mostrar los 4 ultimos
*/
SELECT apellidos, fecha, id FROM vendedores ORDER BY fecha DESC LIMIT 4; | true |
6c66565ed8b9a0882d3d9f3432ef31d70bb1ad34 | SQL | fpsetd/project-templates | /thymeleaf-spring-mybatis/src/main/resources/sql/init.sql | UTF-8 | 581 | 3.265625 | 3 | [] | no_license | drop table if exists test;
create table test (
id int primary key auto_increment,
name varchar(30) not null,
sex enum('MALE', 'FEMALE') not null,
birth date,
vip bit default false,
price decimal(8, 2) not null default 0,
createTime timestamp not null
) engine=InnoDB default charset=utf8;
insert into test
(nam... | true |
b6585340d1d5a47d0440f177cfdbf384a67b993f | SQL | thirdeyesoftware/thirdeye | /iobeam/etc/portal/db/table_invoice.sql | UTF-8 | 1,000 | 3.453125 | 3 | [] | no_license | DROP TABLE INVOICE CASCADE CONSTRAINTS;
DROP PUBLIC SYNONYM INVOICE;
DROP SEQUENCE INVOICE_SEQ;
DROP PUBLIC SYNONYM INVOICE_SEQ;
CREATE TABLE INVOICE (
INVOICEID NUMBER NOT NULL,
INVOICENUMBER VARCHAR(20) NOT NULL,
ACCOUNTID NUMBER NOT NULL,
FOREIGN KEY(ACCOUNTID) REFERENCES ACCOUNT(ACCOUNTID),
AMOUNTDUE NUMB... | true |
14a4823615d4b0b545c1de4ecbeda147e3943a9e | SQL | gromniki/zernov-course-modx | /db/dbstructure/modx_ms2_products.sql | UTF-8 | 1,756 | 3.34375 | 3 | [] | no_license | /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
DROP TABLE IF EXISTS `modx_ms2_pro... | true |
25ddf8c2452e2e20654584de78379d6400e6c6b2 | SQL | jabautista/GeniisysSCA | /src/main/resources/sql/procedures/changes_in_par_status2.prc | UTF-8 | 3,936 | 2.875 | 3 | [] | no_license | DROP PROCEDURE CPI.CHANGES_IN_PAR_STATUS2;
CREATE OR REPLACE PROCEDURE CPI.CHANGES_IN_PAR_STATUS2 (
p_par_id IN gipi_parlist.par_id%TYPE,
p_dist_no IN giuw_pol_dist.dist_no%TYPE,
p_line_cd IN gipi_parlist.line_cd%TYPE,
p_iss_cd IN gipi_parlist.iss_cd%TYPE,
p_invoice_sw IN VARCHAR2,
p_item_grp IN gipi_witem.item_... | true |
322a7c48614439c6400a6a65a512803b38cd5ccc | SQL | jmvillaveces/miabisConfig | /config/db/db-schema.sql | UTF-8 | 1,168 | 2.875 | 3 | [] | no_license | CONNECT 'jdbc:derby:derbyDB;create=true';
CREATE TABLE CONTACT_INFORMATION (
ID VARCHAR(100) NOT NULL PRIMARY KEY,
FIRST_NAME VARCHAR(100),
LAST_NAME VARCHAR(100),
EMAIL VARCHAR(100),
ADDRESS VARCHAR(100),
ZIP VARCHAR(100),
COUNTRY VARCHAR(100)
) ;
CREATE TABLE SAMPLE_COLLECTION (
ID VARCHAR(100) NOT NULL P... | true |
e9d0488d9ac5b8de098387bca98dfad8ab4512f6 | SQL | hhalisa/practice-tables | /reports/vehicle-service-history.sql | UTF-8 | 251 | 3.265625 | 3 | [] | no_license | SELECT DISTINCT v.vid, v.make, v.model, v.year, a.date, s.type
FROM vehicle v, appointment a, service s, app_service ap
WHERE v.vid = a.vid
AND a.appid = ap.appid
AND ap.sid = s.sid
AND v.vid IN(
SELECT v.vid
FROM vehicle v
WHERE v.vid = '6756'
);
| true |
2b13397970b2eee8c1165c9761c912044b2cb765 | SQL | thisisnohi/nohi-notes | /docs/zh/notes/分库分表/mariadb/adnc_usr_dev.sql | UTF-8 | 23,041 | 2.984375 | 3 | [
"MIT"
] | permissive | /*
SQLyog Community v13.1.6 (64 bit)
MySQL - 10.5.8-MariaDB-1:10.5.8+maria~focal : Database - adnc_usr_dev
*********************************************************************
*/
/*!40101 SET NAMES utf8 */;
/*!40101 SET SQL_MODE=''*/;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET... | true |
e91419f5dcb79aa8933a6d48092756fd322d1bd5 | SQL | radtek/abs3 | /sql/mmfo/bars/Data/tts/et_101.sql | WINDOWS-1251 | 29,454 | 2.875 | 3 | [] | no_license | set lines 1000
set trimspool on
set serveroutput on size 1000000
prompt / 101
prompt : 101-ii i ( ii)
declare
cnt_ number;
begin
--------------------------------
-- --
--------------------------------
begin
insert into tts(tt, name, dk, nlsm, kv, nlsk, kvk, nlss, nlsa, nlsb, mfob,... | true |
754feb5209d09fcff51487e7837e856c1472c6e0 | SQL | AAUPF/BES_R | /mysql.sql | UTF-8 | 1,493,465 | 3.046875 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.7.7
-- https://www.phpmyadmin.net/
--
-- Host: localhost:3306
-- Generation Time: Feb 21, 2019 at 08:15 AM
-- Server version: 5.6.38
-- PHP Version: 7.2.1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
--
-- Database: `bihar_survey`
--
CREATE DATABASE IF NOT EXIS... | true |
06c6e95ad89860e9659d0cf745bae06bbf84e6c7 | SQL | amacleod-onalytica/SqlServerUtilities | /Save-SqlHistory/Queries/Server - Memory Clerk Usage.sql | UTF-8 | 773 | 3.3125 | 3 | [] | no_license | -- Memory Clerk Usage for instance (Query 31)
-- Look for high value for CACHESTORE_SQLCP (Ad-hoc query plans)
SELECT TOP(10) @@ServerName as [Server Name], getdate() as [Poll Date],
[type] AS [Memory Clerk Type],
SUM(pages_kb) AS [SPA Mem, Kb]
FROM sys.dm_os_memory_clerks WITH (NOLOCK)
GROUP BY [type]... | true |
32dfd6d0a132aee66162ee89dc39ce681a2932a1 | SQL | david-firdaus/catalog-service | /src/main/resources/db/migration/V20171114002__destination.sql | UTF-8 | 383 | 2.9375 | 3 | [] | no_license | CREATE TABLE IF NOT EXISTS destination
(
id BIGINT PRIMARY KEY NOT NULL,
entity_key VARCHAR(100) NOT NULL,
version BIGINT NOT NULL,
name VARCHAR(100) NOT NULL,
city VARCHAR(100),
country VARCHAR(100),
note VARCHAR(200)
);
CREATE INDEX destination_id_index ON public.destination (id);
CREATE UNIQUE INDEX d... | true |
6c2246dc3ded039ca8522ddb1c6ff2e0de897753 | SQL | scandrews/beerfinder | /db/schema_users.sql | UTF-8 | 343 | 3.125 | 3 | [] | no_license | CREATE DATABASE beer_db;
USE beer_db;
CREATE TABLE users(
id int auto_increment not null,
firstname varchar(255),
lastname varchar(255),
username text,
about text,
email varchar(255),
password varchar(255),
last_login datetime,
status enum('active','inactive'),
createdAt TIMESTAMP NOT null,
updatedAt time... | true |
f6890653004e307d5aa447cef5136ce9ffbf48b8 | SQL | HellotalkXJP/LZGRDB | /LZGRDB/Resources/SQL/defaultSql.sql | UTF-8 | 252 | 2.796875 | 3 | [] | no_license | CREATE TABLE player (
id integer NOT NULL PRIMARY KEY AUTOINCREMENT DEFAULT 0,
name TEXT NOT NULL,
score INT);
CREATE TABLE student (
id integer NOT NULL PRIMARY KEY AUTOINCREMENT DEFAULT 0,
name TEXT NOT NULL,
nick_name TEXT,
age INT,
gender INT);
| true |
7f5def706daf49f3f3e220789833e9cfa9dfcc2b | SQL | thiagonf/TF-BD2 | /TF_Projeto44_Fisico.sql | UTF-8 | 2,991 | 3.46875 | 3 | [] | no_license | -- ------------------------------------------------------
-- Projeto Final - Banco MySQL
-- Aluno: Thiago Nogueira Freire
-- Matricula: 15/0047142
-- Base de Dados = TF_PRONATEC
-- 01 = Base de Dados
-- 04 = Tabelas
-- ------------------------------------------------------
--
-- Create database tf_pronat... | true |
0cd5197759ad6f4971849a48dd85d782fd836b3c | SQL | BiserHristov/SoftUni | /05. C# DataBase/01. MS SQL/01. Databases Introduction/Homework- DB Introduction/Problem 3. Alter Minions Table.sql | UTF-8 | 196 | 2.515625 | 3 | [
"MIT"
] | permissive |
INSERT INTO Towns VALUES
(1,'Sofia'),
(2,'Plovdiv'),
(3,'Varna')
INSERT INTO Minions VALUES
(1,'Kevin', 22,1),
(2,'Bob', 15,3),
(3,'Steward', NULL,2)
SELECT * FROM Minions
Select * FROM Towns | true |
9265269bd5b1bdde0dae044bff35694c97b61fff | SQL | adhiyudanas/FullStackEngineerChallenge | /database/sql-scripts/003-create_employees.sql | UTF-8 | 508 | 3.046875 | 3 | [] | no_license | DROP TABLE IF EXISTS `employees`;
-- we separate employees into different tables
CREATE TABLE `employees` (
`user_id` varchar(128) NOT NULL,
`created_at` datetime DEFAULT NULL,
`updated_at` datetime DEFAULT NULL,
`name` varchar(128) NOT NULL,
`bod` varchar(128) NOT N... | true |
285f806b2c4cd13117c78f6be2ac4834ff9e20c4 | SQL | bdmlai/analytics_engineering_marts | /models/Redshift/fds_kntr/aggregate_intermediate/intm_kntr_monthly_india_tv_final.sql | UTF-8 | 3,591 | 3.140625 | 3 | [] | no_license | {{
config({
"materialized": 'ephemeral'
})
}}
SELECT a.src_country,
a.series_name,
a.broadcast_network_prem_type,
a.rpt_yr,
a.rpt_mn,
a.live_flag,
a.AWCA,
b.telecast_hours,
b.viewer_hours
FROM
(
(
(
... | true |
9352aca4d9f92bd3ccd611043a2aae95c41a323f | SQL | felzek/cars | /db/migrations/sqls/20210114093812-initial-up.sql | UTF-8 | 732 | 2.796875 | 3 | [
"MIT"
] | permissive | /* Replace with your SQL commands */
CREATE TABLE IF NOT EXISTS cars (
id text UNIQUE PRIMARY KEY NOT NULL,
make text NOT NULL,
model text NOT NULL,
package text NOT NULL,
color text NOT NULL,
year INTEGER NOT NULL,
category text NOT NULL,
millege real NOT null,
price real not null
)... | true |
cc3959d9bc800dfd8db5b7dceced6259064e2788 | SQL | davidyuqiwei/davidyu_stock | /scripts/sql/db/baostock/create_table_baostock_byyear.sql | UTF-8 | 884 | 2.890625 | 3 | [
"MIT"
] | permissive |
use stock_dev;
drop table if exists baostock_byyear;
create table if not exists baostock_byyear(
dates string comment 'date',
code string comment 'code',
open decimal(38,2) comment 'open',
high decimal(38,2) comment 'high',
low decimal(38,2) comment 'low',
close decimal(38,2) comment 'close',
volume int comme... | true |
563049aefd5bab034686038c96c47bd694e778f1 | SQL | giovanyrosales/mainadmin | /maindb.sql | UTF-8 | 29,301 | 3.078125 | 3 | [
"MIT"
] | permissive | CREATE DATABASE IF NOT EXISTS `maindb` /*!40100 DEFAULT CHARACTER SET latin1 */;
USE `maindb`;
-- MySQL dump 10.13 Distrib 5.7.12, for Win64 (x86_64)
--
-- Host: 127.0.0.1 Database: maindb
-- ------------------------------------------------------
-- Server version 5.7.24
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@C... | true |
9df758af98c594c9391097b74e530a367f90f5f1 | SQL | MercantecData/portfolio-poulbl | /MySQL/VirksomhedDatabase/poulsemporium.sql | UTF-8 | 7,766 | 3.515625 | 4 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.9.1
-- https://www.phpmyadmin.net/
--
-- Vært: 127.0.0.1
-- Genereringstid: 29. 11 2019 kl. 10:46:59
-- Serverversion: 10.4.8-MariaDB
-- PHP-version: 7.3.11
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_C... | true |
b0a4397973d054b60877beb5da8d91f536e3ed0b | SQL | LassazVegaz/book-shop | /book_shop - database.sql | UTF-8 | 21,652 | 2.90625 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Apr 15, 2021 at 10:12 PM
-- Server version: 10.4.14-MariaDB
-- PHP Version: 7.4.9
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIEN... | true |
76f192f0c19f0ea4d26146e11273d69077821520 | SQL | 8jclxbl/sqlLearning | /180-consecutive-num.sql | UTF-8 | 872 | 4.4375 | 4 | [] | no_license | select distinct
l1.Num as ConsecutiveNums
from
Logs as l1,Logs as l2,Logs as l3
where
l1.Num = l2.Num and l2.Num = l3.Num and l1.Id = l2.Id -1 and l2.Id = l3.Id -1
SELECT t1.Num as ConsecutiveNums
FROM logs AS t1, logs AS t2, logs AS t3
WHERE t1.Id = t2.Id-1 and t2.Id = t3.Id-1 and t1.Num = t2.Num and t2.... | true |
177eea9591c2203d2d8343e4974df773b2f5ca73 | SQL | radtek/BarsGL_Online | /barsgl/barsgl-ejbparent/barsgl-ejb/src/main/resources/ru/rbt/barsgl/ejb/controller/operday/task/stamt/stamt_flex_ttab.sql | UTF-8 | 1,236 | 2.9375 | 3 | [] | no_license | -- представление со счетами по которым были обороты в закрытом дне
declare global temporary table tmp_stmflx_ledger_bsass as (
select *
from (
select distinct ac.bsaacid cbaccount, p.pdt statdate
from gl_acc ac
join gl_balacc bc on ac.acctype = bc.acctype
join (select nvl(?, current ... | true |
8784592dc04d3870b325c5c71bb023c977b782cb | SQL | joan1971/twitter-community-detection | /sql/createUserEntitiesTables.sql | UTF-8 | 480 | 3 | 3 | [] | no_license | USE DATABASE twitterdb;
CREATE TABLE user_hashtag(
id serial primary key,
uid varchar(100) not null,
hashtag varchar(50) not null
);
CREATE TABLE user_url(
id serial primary key,
uid varchar(100) not null,
url varchar(255)
);
CREATE TABLE user_mention(
id serial primary key,
uid varchar(100) not null... | true |
12bd175239126adce2246906c5fe0f36464ec626 | SQL | topfreegames/maestro | /internal/service/migrations/0002_CreateUserTable.up.sql | UTF-8 | 662 | 2.859375 | 3 | [
"MIT"
] | permissive | -- maestro
-- https://github.com/topfreegames/maestro
--
-- Licensed under the MIT license:
-- http://www.opensource.org/licenses/mit-license
-- Copyright © 2017 Top Free Games <backend@tfgco.com>
CREATE TABLE IF NOT EXISTS users (
key_access_token varchar(255) PRIMARY KEY CHECK (key_access_token <> ''),
acces... | true |
0f0a824da3a22bc1b070529b9de7df93bca97ba1 | SQL | gpdoud/sql-tutorial-dnbc8 | /sproc-sales-by-city-sales-range.sql | UTF-8 | 242 | 3.296875 | 3 | [] | no_license | alter procedure SalesRangeByCity
@city varchar(30) = 'Cleveland',
@lowsales decimal(8,2) = 30000,
@highsales decimal (8,2) = 85000
as
BEGIN
select * from customers
where city = @city AND
sales between @lowsales and @highsales;
END | true |
dfc895532472831743a28e165931e250c95062fc | SQL | Foysalmeazi/Second | /SQL File/Export To Self-Contained File/new_schema_custodian.sql | UTF-8 | 2,328 | 2.90625 | 3 | [] | no_license | -- MySQL dump 10.13 Distrib 8.0.11, for Win64 (x86_64)
--
-- Host: 127.0.0.1 Database: new_schema
-- ------------------------------------------------------
-- Server version 8.0.11
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
... | true |
839b1b47a3494d225df978d6e57fb770dae71aaa | SQL | natashkela/SQL | /SELECT_QUERY_2.sql | UTF-8 | 189 | 2.796875 | 3 | [] | no_license | /*
Problem Description: https://www.hackerrank.com/challenges/revising-the-select-query-2?h_r=next-challenge&h_v=zen
*/
SELECT NAME FROM CITY WHERE POPULATION>120000 AND COUNTRYCODE='USA'
| true |
a31c4f7f3f2f9ea46069c547610a8021e6d6f669 | SQL | amyDing629/RandomCodeSnippets2020 | /u1.sql | UTF-8 | 2,235 | 4.1875 | 4 | [] | no_license | -- You must not change the next 2 lines or the table definition.
SET SEARCH_PATH TO Library, public;
-- Do this for each of the views that define your intermediate steps.
-- (But give them better names!) The IF EXISTS avoids generating an error
-- the first time this file is imported.DROP VIEW IF EXISTS intermedia... | true |
861c77b8c97e882949f90f421d37eff16fe16dc1 | SQL | PaoloDarienzo/strumenti_database | /Creazione db/5_create_strumentiProfessionali.sql | UTF-8 | 267 | 2.78125 | 3 | [
"MIT"
] | permissive | CREATE TABLE StrumentiProfessionali(
strumento int PRIMARY KEY
REFERENCES Strumento(id)
ON UPDATE CASCADE ON DELETE CASCADE,
scontoPraticabile int NOT NULL DEFAULT 0
CHECK (scontoPraticabile >= 0 AND scontoPraticabile <= 100),
usato BOOL DEFAULT NULL
); | true |
4c0faa3c2f43cf6b66b50bc6899585d569bd1886 | SQL | momons/hateru_server | /ddl/index/characters_index.sql | UTF-8 | 126 | 2.515625 | 3 | [] | no_license | -- キャラテーブル ユニークインデックス
CREATE UNIQUE INDEX characters_index ON characters (
user_code
);
| true |
096ecf5f8959b4812b75ea89a859e467e76202fc | SQL | ngthuc/TSV2017-12 | /documents/database/diemdanh_nckh (5).sql | UTF-8 | 11,336 | 3.15625 | 3 | [
"LicenseRef-scancode-unknown-license-reference",
"MIT"
] | permissive | -- phpMyAdmin SQL Dump
-- version 4.7.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Dec 17, 2017 at 09:54 AM
-- Server version: 10.1.28-MariaDB
-- PHP Version: 7.1.10
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OL... | true |
31f718fa0ec54022a7bd533c619d7a23bbfa2b87 | SQL | fgaparini/late | /bukup/alojamientos-08-02-2013.sql | UTF-8 | 2,080 | 3.015625 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 3.5.1
-- http://www.phpmyadmin.net
--
-- Servidor: localhost
-- Tiempo de generación: 08-02-2013 a las 22:07:06
-- Versión del servidor: 5.5.24-log
-- Versión de PHP: 5.4.3
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARA... | true |
20d395f7fa82bee1079b3a031ab9dd3cd4346c9c | SQL | JagpreetBath/Pewlett-Hackard-Analysis | /Queries/queries.sql | UTF-8 | 4,890 | 4.1875 | 4 | [] | no_license | Select * from departments;
Select * from dept_emp;
Select * from dept_manager;
Select * from employees;
Select * from salaries;
Select * from titles;
SELECT first_name, last_name
FROM employees
WHERE birth_date BETWEEN '1952-01-01' AND '1955-12-31';
-- Retirement eligibility
SELECT first_name, last_name
FROM emp... | true |
5556c4289a9835c1cb2282557d091099858dedd9 | SQL | BaltoClem/Travaux_DWWM | /MERISE/cas_JO.sql | UTF-8 | 7,467 | 3.484375 | 3 | [] | no_license | /*==============================================================*/
/* DBMS name: MySQL 5.0 */
/* Created on: 31/01/2020 10:39:53 */
/*==============================================================*/
drop table if exists AFFECTER;
drop table if exis... | true |
a00627a44a6563bac13277b1cc0ccb4afc1a99d4 | SQL | i-ruby/course | /src/main/resources/db/migration/V1__Create_account_table.sql | UTF-8 | 2,011 | 3.71875 | 4 | [] | no_license | CREATE TABLE account
(
id SERIAL PRIMARY KEY,
username TEXT UNIQUE NOT NULL,
encrypted_password TEXT NOT NULL,
status TEXT NOT NULL DEFAULT 'OK',
created_at TIMESTAMP NOT NULL DEFAULT now(),
updated_at TIMESTAMP NOT NULL DEF... | true |
81782916ff2ebf6fe225a3f01c743c9d67132e25 | SQL | vaishnavi-sr/SQL-exercise | /Bonus.sql | UTF-8 | 233 | 2.765625 | 3 | [] | no_license | SELECT crop
FROM seeds
WHERE (use_by = 2020) AND (crop = "Rice");
SELECT *
FROM seeds
WHERE (encourages = "IS NOT null");
SELECT crop
FROM seeds
WHERE (expired = "IS NOT null");
SELECT * FROM seeds
WHERE expired = "IS NOT null"; | true |
289b3996607cdf516caa3dffcfdabb0c6393c428 | SQL | pbs-software/pbs-tools | /PBStools/inst/sql/fos_rrf_trf_catch.sql | UTF-8 | 1,022 | 3.828125 | 4 | [
"LicenseRef-scancode-warranty-disclaimer"
] | no_license | -- Query to determine catch weight of RRF compared to TRF for statement in TOR (started with WWR 2019)
SELECT
Year(MC.BEST_DATE) AS 'YEAR',
SUM(CASE
WHEN MC.SPECIES_CODE IN (@sppcode) THEN ISNULL(MC.LANDED_KG,0) + ISNULL(MC.DISCARDED_KG,0)
ELSE 0 END)/1000. as RRF,
SUM(CASE
WHEN S.Rockfish IN (1) THEN... | true |
c33851de16d86ef3d1518b71af602aced3cd05ac | SQL | raulmarinol/BaseDatos | /Proyecto_BD/ProyectoCargaCompleta.sql | UTF-8 | 177,271 | 3.28125 | 3 | [] | no_license | -- --------------------------------------------------------
-- Host: 127.0.0.1
-- Versión del servidor: 8.0.23 - MySQL Community Server - GPL
-- SO del servidor: Win64
-- HeidiSQL Versión: 11.1.0.6116
-- --------------------------------------------------------
/... | true |
f88c3b20b13fbdc2770ec8abcea3d7836f94458c | SQL | ZVlad1980/excel_api | /sql/Views/sp_quarters_v.sql | UTF-8 | 378 | 2.703125 | 3 | [] | no_license | create or replace view sp_quarters_v as
with quarters(code, quarter, month_start, month_end) as (
select 21, 1, 1, 3 from dual union all
select 31, 2, 4, 6 from dual union all
select 33, 3, 7, 9 from dual union all
select 34, 4, 10, 12 from dual
)
select q.code,
q.quarter,
... | true |
62fae0b401a6fe238f4641df28dcddb3ae036e68 | SQL | sayimpusaichandana/Full-Stack-1 | /day29(29-06-2020)mysql with nodejs/usingnodejs.sql | UTF-8 | 430 | 2.96875 | 3 | [] | no_license | create database testDb;
alter user 'root'@'localhost' identified with mysql_native_password by 'spandana*18';
flush privileges;
use testDb;
create table userData(Id int auto_increment, Username varchar(100) not null,Password varchar(100) not null, primary key(Id));
select * from userData;
update userData set Use... | true |
54040ae457ddc73c6f125f88de94bc9344144688 | SQL | vincentbattez/friendzone | /facebook.sql | UTF-8 | 4,991 | 3.109375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.5.5.1
-- http://www.phpmyadmin.net
--
-- Client : 127.0.0.1
-- Généré le : Dim 23 Octobre 2016 à 20:52
-- Version du serveur : 5.7.11
-- Version de PHP : 5.6.19
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER... | true |
09f20724408d3976c1d83f023a61f446bc2ecde1 | SQL | minimalpk/Python-REST | /migrations/2017_09_12_22_22.sql | UTF-8 | 639 | 3.375 | 3 | [] | no_license | CREATE TABLE "public"."users" (
"id" SERIAL PRIMARY KEY,
"name" VARCHAR(100) NOT NULL,
"email" VARCHAR(100) NOT NULL UNIQUE,
"password" VARCHAR(40) NOT NULL,
"created" TIMESTAMP WITH TIME ZONE DEFAULT NOW() NOT NULL,
"updated" TIMESTAMP WITH TIME ZONE,
"enabled" BOOLEAN DEFAU... | true |
d3993fe10953da4eed3a953c1c9d59ae11260624 | SQL | franjorub/practica-plsql | /ACTIVADORES.sql | UTF-8 | 201 | 2.5625 | 3 | [] | no_license | CREATE OR REPLACE TRIGGER HISTORIAL_SUELDOS
AFTER UPDATE OF SALARIO ON EMPLEADOS
FOR EACH ROW
WHEN (OLD.SALARIO <> NEW.SALARIO)
BEGIN
REGISTRAR_SALARIO (:OLD.EMPLEADO_ID,:NEW.SALARIO,SYSDATE);
END;
/ | true |
423b04c9f86a7475fdfaeef6017ed67d46325dc7 | SQL | xdc0209/java-code | /springInAction/RoadRantz/db/create-tables.sql | UTF-8 | 1,022 | 3.5 | 4 | [
"CC-BY-3.0"
] | permissive | drop table Rant if exists
drop table Vehicle if exists
drop table Motorist_Privileges if exists
drop table Motorist if exists
create table Rant (
id integer identity primary key,
vehicle_id integer not null,
rantText varchar(2000) not null,
postedDate date not null
);
create table Motorist (
id integer iden... | true |
23f3aaa5a9667514328214429ac0809dd0e02c94 | SQL | samaidaslam-iqra/Fyp | /testInk.sql | UTF-8 | 4,489 | 3.625 | 4 | [] | no_license |
use TestInk;
-- inkUser -- data required to create user
create Table inkUser (UserId INT PRIMARY KEY, UserFirstName VARCHAR(30) NOT NULL, UserLastName VARCHAR(30) NOT NULL,
UserEmail VARCHAR(45) NOT NULL, UserPassword VARCHAR(45) NOT NULL, UserGender VARCHAR(10) NOT NULL,
UserCountry VARCHAR(45) NOT NUL... | true |
60c581dcbd6d0e1407d8510276f61be99c4fc85c | SQL | rafael-sousa/stn-accounts | /pkg/repository/mysql/migrations/1_initial_schema.up.sql | UTF-8 | 593 | 3.53125 | 4 | [
"MIT"
] | permissive | CREATE TABLE account(
id INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
name VARCHAR(255) NOT NULL,
cpf CHAR(11) NOT NULL UNIQUE,
secret CHAR(64) NOT NULL,
balance BIGINT DEFAULT '0',
created_at DATETIME NOT NULL
);
CREATE TABLE transfer(
id INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
account_or... | true |
4372e63724a13174728c71cd42d981b234284b42 | SQL | nujcharee/YAHUAS | /sql/overdue.sql | UTF-8 | 1,279 | 2.734375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 5.1.0
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Jul 26, 2021 at 10:52 PM
-- Server version: 10.4.19-MariaDB
-- PHP Version: 8.0.6
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIEN... | true |
64b88c5e5dc31641f7d460b41c637df2c2ed0f5f | SQL | danielBingham/peerreview | /database/backup/fields.sql | UTF-8 | 39,506 | 3.5 | 4 | [
"MIT"
] | permissive | /**
* Iinitialize the fields table with the base set of academic fields we want to
* have available at launch. We're going to base these off of the outlines on
* wikipedia, however, it's going to be messy because those outlines aren't
* even self consistent.
*
* Once we launch, these will evolve through suggest... | true |
24a02c607e916f95ab8a7f49dae0a98e1fb22eb9 | SQL | Orgrick/SnakeGame | /snake.sql | UTF-8 | 3,277 | 3.359375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 5.0.4
-- https://www.phpmyadmin.net/
--
-- Хост: localhost
-- Время создания: Ноя 22 2020 г., 16:06
-- Версия сервера: 8.0.19
-- Версия PHP: 7.3.17
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET GLOBAL sql_mode=(SELECT REPLACE(@@sql_mode,'ONLY_FULL_GROUP_BY',''));
START TRANSACTION;
SET ... | true |
8ab99be2b3aa4064e2da6d0eb05f8980b5efd753 | SQL | juliazhigaryova/Migrations | /migrations/up/000_base.sql | UTF-8 | 284 | 2.84375 | 3 | [] | no_license | CREATE TABLE IF NOT EXISTS `migration` (
`id` INT(11) UNSIGNED NOT NULL auto_increment,
`filename` VARCHAR(255) NOT NULL,
`created_at` TIMESTAMP DEFAULT current_timestamp,
PRIMARY KEY (id)
)
ENGINE = innodb
AUTO_INCREMENT = 1
CHARACTER SET utf8
COLLATE utf8_general_ci | true |
7e29dd509d1a7e8a5ce70770e72ce3a674e47809 | SQL | dombrooks/Oracle-Monitoring-Scripts | /ash.sql | UTF-8 | 718 | 2.90625 | 3 | [] | no_license | select count(*) over (partition by h.sample_time) sess_cnt
, h.user_id
, (select username from dba_users u where u.user_id = h.user_id) u, h.service_hash
, xid, sample_id, sample_time, session_state, session_id, session_serial#,sql_id, sql_exec_id, sql_exec_start, event, p1, mod(p1,16), blocking_session,... | true |
46163f3a5782cd05383d228580fcebe07d3f409d | SQL | Christian16/busquedas | /ilpiatto_clientes.sql | UTF-8 | 3,087 | 2.8125 | 3 | [] | no_license | -- MySQL dump 10.13 Distrib 5.7.17, for Win64 (x86_64)
--
-- Host: 127.0.0.1 Database: ilpiatto
-- ------------------------------------------------------
-- Server version 5.7.20-log
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */... | true |
17c0bb3dd6602b9edb1e4e0d6e62da24d3017b88 | SQL | rench/tx-parent | /tx-components/tx-component-rule/dbscript/oracle/01basisScript/00rule/tables/RU_RULE_DEF.sql | GB18030 | 734 | 3.109375 | 3 | [] | no_license | --****************************************************************************
-- ru_rule_defʵϢ
--****************************************************************************
create table ru_rule_def
(
id varchar2(64) not null, --id
rule varchar2(64) not null, --Ψһ
ruleType varchar2(32... | true |
2db5c7f47038f56250865302d3c5f5e9fc7941f0 | SQL | KynanTLy/UniversityWork | /Database/SQL Query/3.sql | UTF-8 | 556 | 3.46875 | 3 | [] | no_license | prompt Question 3 - kynan
(select s.name, l.licence_no
from people s, drive_licence l, owner o, vehicle v
where s.sin = l.sin and
l.sin = o.owner_id and
s.sin = o.owner_id and
l.class not like '%nondriving' and
o.vehicle_id = v.serial_no and
o.is_primary_owner like '%y'
) minus
(select s.name, l.licence_no
from peop... | true |
abbb23c6f60bf2080885e0e5b6e20589aa3cbd8a | SQL | marissapels/classNotes | /06-27-2017/tables.sql | UTF-8 | 645 | 3.203125 | 3 | [] | no_license | create table people(
id integer(11) auto_increment not null primary key,
name varchar(30) not null,
has_pet boolean not null,
pet_name varchar(30),
pet_age integer(10)
);
insert into people (name, has_pet, pet_name, pet_age)
values ("Marissa",TRUE, "Jagger",4);
select*from people;
insert into people ... | true |
c29ffeb08af161a09fe8c1f8a7fc4101e71a979c | SQL | maximklakov/Mercury_php | /SQL/tables.sql | UTF-8 | 17,257 | 3.109375 | 3 | [] | no_license | CREATE SCHEMA IF NOT EXISTS main;
--- Drop All
/*
Drop Table IF EXISTS main.objects cascade;
Drop Table IF EXISTS main.materials cascade;
Drop Table IF EXISTS main.flat_Types cascade;
Drop Table IF EXISTS main.clients cascade;
Drop Table IF EXISTS main.streets cascade;
Drop Table IF EXISTS main.regions cascade;
Drop T... | true |
d21db7e5cf21be7057f524ca9c88e3f6b3eceef4 | SQL | messi10goat/Faculty_Leave_and_Project_Management_Portal | /database/dbms10.sql | UTF-8 | 26,943 | 3.421875 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 5.1.0
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Apr 22, 2021 at 03:16 PM
-- Server version: 10.4.18-MariaDB
-- PHP Version: 8.0.3
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIEN... | true |
be403c779c50eb930dd971764d24c47acc4e0704 | SQL | bwan-nan/Piscine_PHP | /j05/ex18/ex18.sql | UTF-8 | 212 | 2.859375 | 3 | [] | no_license | SELECT `name`
FROM `distrib`
WHERE id_distrib = 42
OR id_distrib BETWEEN 62 AND 69
OR id_distrib = 71
OR id_distrib BETWEEN 88 AND 90
OR length(lower(name)) - length(replace(lower(name), 'y', '')) = 2
LIMIT 2,5;
| true |
758dec6c9fd0eea5108c4c4e95ecc915d957245c | SQL | abhishek639/RossmanSales | /Rossmann.sql | UTF-8 | 2,396 | 4.03125 | 4 | [] | no_license | show databases;
DROP DATABASE IF EXISTS Rossmann_Store;
CREATE DATABASE IF NOT EXISTS Rossmann_Store;
USE Rossmann_Store;
show tables;
CREATE TABLE IF NOT EXISTS Store(
Store INT,
StoreType varchar(64),
Assortment varchar(64),
CompetitionDistance varchar(64),
CompetitionOpenSinceMonth varchar(64),
Competit... | true |
227567c4510656fbd23639c4287c359535ae5c96 | SQL | slmoloch/db-keeper | /SampleDatabases/MicrosoftDatabaseProject/AdventureWorks2008/Schema Objects/Tables/Sales.SalesTerritoryHistory.table.sql | UTF-8 | 369 | 2.625 | 3 | [] | no_license | CREATE TABLE [Sales].[SalesTerritoryHistory] (
[BusinessEntityID] INT NOT NULL,
[TerritoryID] INT NOT NULL,
[StartDate] DATETIME NOT NULL,
[EndDate] DATETIME NULL,
[rowguid] UNIQUEIDENTIFIER ROWGUIDCOL NOT NULL,
[Modi... | true |
82ea644903ed0a1c51e9b4beced82618524f7a57 | SQL | rsoaresgouveia/Ansihe---Android-Sick-Helper | /Database/ANSIHE.sql | UTF-8 | 1,949 | 3.375 | 3 | [] | no_license | -- MySQL Script generated by MySQL Workbench
-- 08/04/15 00:03:24
-- 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='TRADITION... | true |
3c5159a0667426c33742705ea3f64179977f6d9e | SQL | soon14/isap-parent | /isap-dao/dao/1.CreateTable/t_menu_authdef.sql | UTF-8 | 524 | 3.125 | 3 | [] | no_license | -- t_menu_authdef
DROP TABLE IF EXISTS t_menu_authdef;
CREATE TABLE t_menu_authdef
(
id bigint NOT NULL AUTO_INCREMENT,
name varchar(128) NOT NULL COMMENT '菜单权限名称',
parent bigint NOT NULL default 0 COMMENT '父权限',
permission varchar(50) NOT NULL COMMENT '权限标识',
add_time timestamp NOT NULL default CURRENT_TIME... | true |
458ecf8b5b9ce17ad86f8622cefed40242f710d6 | SQL | IrvingDeLaGarza/Laboratorio-2 | /scriptBD.sql | UTF-8 | 370 | 3.015625 | 3 | [] | no_license | CREATE DATABASE tienda;
create table video(
idVideo int primary key,
titulo varchar(100),
repro int,
url varchar(100)
);
create procedure sp_Video_insertar
@idVideo int ,
@titulo varchar(100),
@repro int,
@url varchar(100)
as
begin
insert into video values (@idVideo, @titulo,@repro,@url)
end
select *from video;
... | true |
aad7fa011794d731895f65cf1a60ee4fbbbbc6a8 | SQL | AMPATH/etl | /etl-scripts/stored-procedures/generate_flat_hiv_transfer_in.sql | UTF-8 | 14,357 | 3.5625 | 4 | [] | no_license | DELIMITER $$
CREATE PROCEDURE `generate_flat_hiv_transfer_in`(IN query_type varchar(50), IN queue_number int, IN queue_size int, IN cycle_size int, IN log BOOLEAN)
BEGIN
set @primary_table := "flat_hiv_transfer_in";
set @query_type = query_type;
set @queue_tab... | true |
42e731fcb0b9cea0508ae38e2c3457ca7656f888 | SQL | ericksonnascimento/mestre-dos-codigos-sql | /3.sql | UTF-8 | 616 | 3.671875 | 4 | [] | no_license | /*3. Extrair um relatório do modelo de dados criado no item 1, utilizando 3 funções de agregação diferentes,
e filtrando por pelo menos uma função agregadora;*/
SELECT COUNT(*) FROM Requisicao; --Quantidade de Requisicoes
SELECT MIN(DataAdmissao) FROM Funcionario; -- Data de adminissao do funcionario mais antigo
S... | true |
b9736b31043c4ba4abc24c1a84e2e16576b0a3d1 | SQL | Kentico/KInspector | /KenticoInspector.Reports/ApplicationRestartAnalysis/Scripts/GetCmsEventLogsWithStartOrEndCode.sql | UTF-8 | 192 | 2.84375 | 3 | [
"MIT"
] | permissive | SELECT
EventID,
EventCode,
EventTime,
EventMachineName
FROM
CMS_EventLog
WHERE
EventCode = 'ENDAPP'
OR EventCode = 'STARTAPP'
ORDER BY
EventTime DESC,
EventMachineName | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.