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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
f9af1029204b8c55af0ada756dc934558c5b2a86 | SQL | fatihayaz78/udacity-programming-for-datascience-with-python | /dvdrental/second_query.sql | UTF-8 | 219 | 3.78125 | 4 | [] | no_license | SELECT title,
COUNT(title) inventory_cnt
FROM film
JOIN inventory
ON film.film_id = inventory.film_id
JOIN rental
ON inventory.inventory_id = rental.inventory_id
GROUP BY title
ORDER BY inventory_cnt desc
LIMIT 10; | true |
d77da955014ac9a2953926719440678595e3ef4e | SQL | dmitriykotov333/PostgreSQL | /tutorial14.sql | UTF-8 | 2,509 | 4.21875 | 4 | [] | no_license | --create table smart_notes (
-- id serial primary key not null,
-- title varchar(100),
-- description text,
-- create_date timestamp NOT NULL,
-- update_date timestamp NOT NULL,
-- fixed_note boolean default(false)
--);
--create table images (
-- id serial primary key not null,
-- image bytea NOT NULL,
-- create_date... | true |
c577ea58e4654411239f1d846f6c3e3e1d43fd2a | SQL | jonamuen/sql-reduce | /test/sqlsmith/sqlite/5515.sql | UTF-8 | 281 | 3.1875 | 3 | [
"MIT"
] | permissive | select
(select name from main.t0 limit 1 offset 3)
as c0,
ref_1.id as c1,
ref_0.id as c2,
(select id from main.t0 limit 1 offset 6)
as c3
from
main.t0 as ref_0
left join main.t0 as ref_1
on (ref_0.id = ref_1.id )
where ref_0.id is NULL
limit 143;
| true |
f6ddc0e91c34dc7c7105fc84d303780cd73c5966 | SQL | Julianjuyo/Aloha_Andes | /data/LimpiezaAlohAndes.sql | UTF-8 | 647 | 2.640625 | 3 | [] | no_license | --- Sentencias SQL para la creaci�n del esquema de parranderos
--- Las tablas tienen prefijo A_ para facilitar su acceso desde SQL Developer
DROP TABLE "ALOJAMIENTOS" CASCADE CONSTRAINTS;
DROP SEQUENCE ID_ALOJAMIENTO;
DROP SEQUENCE ID_RESERVA;
DROP SEQUENCE ID_SERVICIOS;
DROP TABLE "OPERADORES" CASCADE CONSTRAINTS;
D... | true |
9fdf2ea949e8093ed1d85a959c232ab374aa945b | SQL | daniiel/ora-scripts | /job.sql | UTF-8 | 1,320 | 3.125 | 3 | [] | no_license | set verify off
--------------------------------------------------------------------------------------------------------------
-- Script: Job | Show infomation of jobs.
-- Author: Orlando Olguin Olvera | oranswer.wordpress.com | orlandoolguin.wordpress.com
-- Dates: 27/11/2014 | Creation
-- Params: owner job_name
-----... | true |
0c3a6470104d97fd0d89b4dc8d92e02eebffb43f | SQL | jfong701/mybnb | /sql/QUERIES-TO-ADD-TO-JAVA.sql | UTF-8 | 3,403 | 4.34375 | 4 | [] | no_license | -----------------------------------------------------------------------------
-- Create a booking
-- Given a listingId, a RenterId, A check in date, and a checkout date, add a new booking if the calendar allows it.
START TRANSACTION;
SET @RenterId = 1;
SET @ListingId = 2;
SET @CheckInDate = CURDATE();
Set @CheckOutDat... | true |
c98b62263854c4ec7a0d49831adf0ed626d516c6 | SQL | NewFL/EDIBO | /SQL/script_1.sql | UTF-8 | 478 | 2.875 | 3 | [] | no_license | USE db24;
CREATE TABLE `MyTBL_3b` (
`Id` int(11) NOT NULL AUTO_INCREMENT,
`Title` varchar(20) NOT NULL,
PRIMARY KEY (`Id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
/* DELIMITER $$
CREATE TRGIGGER MyTBL_3a_guard1 BEFORE INSERT ON MyTBL_3a
FOR EACH TOW
BEGIN
declare a v... | true |
3087b2300b2efcafa08ecb4000fb618d62cd8d4e | SQL | annabellamint/zzzz.mebel.ru | /mebelanna_2020-07-09.sql | UTF-8 | 7,931 | 2.96875 | 3 | [] | no_license | # ************************************************************
# Sequel Pro SQL dump
# Версия 4541
#
# http://www.sequelpro.com/
# https://github.com/sequelpro/sequelpro
#
# Адрес: 127.0.0.1 (MySQL 5.5.5-10.4.11-MariaDB)
# Схема: mebelanna
# Время создания: 2020-07-09 17:53:34 +0000
# **********************************... | true |
9a4d9792a3eaa3a836683adc6452acfea794fa5d | SQL | muzir/softwareLabs | /spring-boot-containers/src/test/resources/db/embedded-postgres-init.sql | UTF-8 | 1,569 | 3.6875 | 4 | [] | no_license | -- noinspection SqlNoDataSourceInspectionForFile
create table if not exists product
(
id bigint not null
constraint product_pkey primary key,
name varchar(255) UNIQUE
);
create table if not exists orders
(
id varchar(255) not null
constraint orders_pkey primary key,
name ... | true |
6a692b884c435a61e430856d932a6f05e34b757c | SQL | cherna5/Database-Systems | /Project/SQL3/submission/Q11.sql | UTF-8 | 334 | 3.625 | 4 | [] | no_license | -- 11. For each recipe list the amount of cheese required. Include the name of the recipe
-- For recipes that don't require cheese, leave the quantity and quantity type null.
SELECT b.RecipeName, a.Quantity, a.QuantityType
FROM IngredientList AS a
LEFT JOIN Recipes AS b
ON b.RecipeID = a.RecipeID
WHERE a.Ingredi... | true |
80dc3e505309e2af6db32f4546808b7b7954ef53 | SQL | ansurakin/project-builder-old | /src/main/resources/sql/public.sql | UTF-8 | 20,081 | 2.609375 | 3 | [] | no_license | /*
Navicat Premium Data Transfer
Source Server : PostgreSQL localhost
Source Server Type : PostgreSQL
Source Server Version : 90603
Source Host : localhost:5432
Source Catalog : project-builder
Source Schema : public
Target Server Type : PostgreSQL
Target Server Version... | true |
b385f324799b19528df33418956ea6b2eecf6a46 | SQL | FrankMyatThu/ApacheSvr | /Mysql.Data.sql | UTF-8 | 618 | 2.65625 | 3 | [] | no_license | INSERT INTO products (ProductName, Description, ProductImage, Price, Active)
VALUE ('Amazon Fire TV Stick', 'Fire TV Stick connects to your TV''s HDMI port. It''s an easy way to enjoy over 250,000 TV episodes and movies on Netflix, Amazon Video, HBO GO, and Hulu, plus games, music, and more', '', 39.99, 1);
INSERT INT... | true |
027ab885cf76ef7f0894f0849a2fae3c6be4e548 | SQL | harshit-test-org/prisma-issue-5969 | /prisma/migrations/20210310144017_inint/migration.sql | UTF-8 | 7,570 | 3 | 3 | [] | no_license | -- CreateTable
CREATE TABLE "Project" (
"id" SERIAL NOT NULL,
"name" TEXT NOT NULL,
"description" TEXT NOT NULL,
"created" TEXT NOT NULL,
"createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
"updatedAt" TIMESTAMP(3) NOT NULL,
PRIMARY KEY ("id")
);
-- CreateTable
CREATE TABLE "List"... | true |
d188bfe8874a5ecb8e7038aec75f3be162aa91dc | SQL | schpidi2015/lifyo-live-map | /mysql_objects/$lt_t_substance_list.sql | UTF-8 | 6,368 | 3.0625 | 3 | [] | no_license | -- --------------------------------------------------------
-- Host: mariadb01.nitrado.net
-- Server Version: 5.5.43-MariaDB-1ubuntu0.14.04.2 - (Ubuntu)
-- Server Betriebssystem: debian-linux-gnu
-- HeidiSQL Version: 8.3.0.4694
-- --------------------------------... | true |
4fba48ed59ce589091f2ceec34b2b08cd29c67ac | SQL | KristinnGodfrey/API-Webservice | /sql/schema.sql | UTF-8 | 1,598 | 3.328125 | 3 | [] | no_license | DROP TABLE IF EXISTS genres;
DROP TABLE IF EXISTS series;
CREATE TABLE genres (
id serial primary key,
title character varying(255) NOT NULL UNIQUE
);
CREATE TABLE series (
id serial primary key,
name varchar(255) NOT NULL,
airDate date,
inProduction boolean,
tagline varchar(255),
image varchar(255) N... | true |
8161bbdfaad5605a10c12db1c80f8c6586349043 | SQL | Nick20017/db | /lab6.sql | UTF-8 | 3,495 | 4.21875 | 4 | [] | no_license | use lab1;
--1
select name.book_name, meta.book_cost, meta.publishing_house
from BookName name, BookMeta meta
where name.book_code = meta.book_code;
--2
select name.book_name, b_cath.book_cathegory
from BooksCathegorised b_cath inner join BookName name
on name.book_code = b_cath.book_code;
--3
select name.book_... | true |
ba2a4f2d126132ab2384bdf5c243d3f2b2575562 | SQL | aniverb/Reformatting-data-with-SQL | /getting_overview.sql | UTF-8 | 931 | 3.9375 | 4 | [] | no_license | #look at the column names in each table
SELECT table_name, column_name
FROM information_schema.columns
where table_name like 'sgua_cl%' or table_name like 'erasmus_cl%' or table_name like 'sgup_cl%' or table_name like 'sgur_cl%' or table_name like 'ulmu_cl%'
#nested query to only show column names that appear more th... | true |
b6eddf6532b7c1407a377f42900228a6d76ee65d | SQL | MaxKuzminov/Kuzminov_Praktika | /queries.sql | UTF-8 | 3,118 | 3.84375 | 4 | [] | no_license | -- заполнение таблицы users
INSERT INTO users (reg_date, email, name, password, avatar, contacts)
VALUES
('2020-01-01', 'ivan@mail.ru', 'Ivan', 'u)uUKypyIO34', 'img/user.jpg', '+79032231232'),
('2020-01-01', 'petr@mail.ru', 'Petr', 'kyk*TAftIP11', 'img/user.jpg', '+79035328439');
-- заполнение таблицы categories --
INS... | true |
df9c061a3cc5d5a33fada55479fee42ac214de80 | SQL | delphi1977/NewDicomPACS | /Database/oracle/constraints/asu.trecipe_by_id.sql | UTF-8 | 200 | 3.015625 | 3 | [] | no_license | ALTER TABLE ASU.TRECIPE
DROP CONSTRAINT TRECIPE_BY_ID
/
--
-- Non Foreign Key Constraints for Table TRECIPE
--
ALTER TABLE ASU.TRECIPE ADD (
CONSTRAINT TRECIPE_BY_ID
PRIMARY KEY
(FK_ID))
/
| true |
09a0b5b3489cd574d744ef708ec6e36595c653a2 | SQL | apfundst/Forager-Front-end | /includes/stored_procedures.sql | UTF-8 | 3,334 | 3.53125 | 4 | [] | no_license | DELIMITER $$
CREATE PROCEDURE url_check(IN url_table varchar(1000), IN link_rel_table varchar(1000),
IN this_source varchar(1000), IN this_link varchar(1000),
IN this_url varchar(1000), IN this_domain varchar(1000),
IN this_dest_id int(11), INOUT inserted_url_id int(11) )
BEGIN
... | true |
22590ec422a9264ed08e8bd0b43d73c2e28b97b4 | SQL | github-ek/e-connect-data | /ttcwmsprd/dbo/Views/rplsts_view.sql | UTF-8 | 3,861 | 2.890625 | 3 | [] | no_license | create view dbo.rplsts_view as
select rplwrk.parref,
rplwrk.rplref,
shipment_line.ship_id,
rplwrk.ship_line_id,
shipment_line.ordnum,
shipment_line.ordlin,
cast(null as nvarchar(20) ) wkonum,
shipment_line.client_id,
shipment_line.wh_id,
... | true |
ffc588b3d010d0cd33e3b2846a969f1c9ec8088c | SQL | WWBN/AVideo | /plugin/Cache/install/install.sql | UTF-8 | 934 | 3.125 | 3 | [
"Apache-2.0",
"JSON"
] | permissive | CREATE TABLE IF NOT EXISTS `CachesInDB` (
`id` INT NOT NULL AUTO_INCREMENT,
`created` DATETIME NULL,
`modified` DATETIME NULL,
`content` BLOB NULL,
`domain` VARCHAR(255) NULL,
`ishttps` TINYINT NULL,
`loggedType` ENUM('n', 'l', 'a') NULL DEFAULT 'n' COMMENT 'n=not logged\nl=logged\na=admin',
`user_locat... | true |
a69b2a550544f4badda7cd258282d7fbc21a90b3 | SQL | btx2015/taobaoke | /hsrj.sql | UTF-8 | 146,737 | 3.140625 | 3 | [] | no_license | /*
Navicat MySQL Data Transfer
Source Server : localhost
Source Server Version : 50553
Source Host : localhost:3306
Source Database : hsrj
Target Server Type : MYSQL
Target Server Version : 50553
File Encoding : 65001
Date: 2019-07-11 16:32:14
*/
SET FOREIGN_KEY_CHECKS=0;
-- ----... | true |
99375ecf0381a696cd7e5f6bf0caeb72188d4b3d | SQL | paulaCoelhoo/sql | /curso_join.sql | UTF-8 | 3,858 | 3.828125 | 4 | [] | no_license | CREATE TABLE videos(
id_video int AUTO_INCREMENT PRIMARY KEY,
author varchar (30),
title varchar (30),
likes int (10),
dislikes int (10)
);
INSERT INTO videos (author, title, likes, dislikes) VALUES ('Maria', 'MySQL', '10', '2');
INSERT INTO videos (author, title, likes, dislikes) VALUES (... | true |
11ee1d8f347687cc8608fb1d099abb21615a4e5c | SQL | brandonsu1729/Data-Homework | /sql-challenge/EmployeeSQL/queries.sql | UTF-8 | 2,446 | 4.3125 | 4 | [] | no_license | -- 1 List the following details of each employee: employee number, first name, last name, gender, and salary
select employees.emp_no, last_name, first_name, sex, salaries.salary from employees
join salaries
on employees.emp_no = salaries.emp_no;
-- 2 List employees who were hired in 1986.
select * from employees
whe... | true |
7b991ad624696bea050bad6e71f5e5f9b4f3569b | SQL | woworks/otus-spring-2018 | /hw6-dao-springjdbc/src/main/resources/schema.sql | UTF-8 | 755 | 3.8125 | 4 | [] | no_license | CREATE TABLE IF NOT EXISTS books (
id SERIAL PRIMARY KEY,
title VARCHAR(450) NOT NULL
);
CREATE TABLE IF NOT EXISTS genres (
id SERIAL PRIMARY KEY,
name VARCHAR(100) NOT NULL
);
CREATE TABLE IF NOT EXISTS authors (
id SERIAL PRIMARY KEY,
name VARCHAR(255) NOT NULL
);
CREATE TABLE books_genres ... | true |
d308cc2de01c1a2066ad57e2835cc1ea92131762 | SQL | CUBRID/cubrid-testcases | /sql/_27_banana_qa/issue_5765_timezone_support/_00_dev_cases/_02_operator/_18_day_of_week_with_tz/cases/dayofweek_009.sql | UTF-8 | 1,674 | 2.984375 | 3 | [
"BSD-3-Clause"
] | permissive | --pass exceptional data of timestamptz/datetimetz type to the parameter
--1. [error] exceptional argument of timestamptz type
--select dayofweek(timestamptz'23:00:00 11/001 Asia/Seoul');
select if(dayofweek(timestampltz'23:00:00 11/001/2014')=dayofweek(timestamptz '23:00:00 11/001/2014'),'ok','nok');
select dayofwe... | true |
2ce6d2fe7101ad4be00838d8308ba9035bbb9938 | SQL | nelkenjosef/talking | /data/posts.sql | UTF-8 | 346 | 2.78125 | 3 | [] | no_license | CREATE TABLE posts (
id INTEGER NOT NULL PRIMARY KEY autoincrement ,
user_id INTEGER NOT NULL,
title VARCHAR(255) NOT NULL,
content TEXT NOT NULL
);
INSERT INTO
posts (user_id, title, content)
VALUES
(1, 'First Title', 'First Content'),
(2, 'Second Title', 'Second Content'),
(1, 'Third ... | true |
2b52fa7956600eb31b24e20eeaefd821d25a2a0f | SQL | obaydullah-ewu/Inventory-Management-System | /projectdb.sql | UTF-8 | 5,751 | 3.171875 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1:3307
-- Generation Time: Oct 25, 2020 at 05:20 PM
-- Server version: 10.4.13-MariaDB
-- PHP Version: 7.4.8
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_... | true |
a0a59bb3d4c04dedeb4e8e9fdedc9905d8f8cd4e | SQL | elangokp/shiny-octo-dangerzone | /Content Syndicator/URL Management/DB Scripts/create Tables.sql | UTF-8 | 593 | 2.78125 | 3 | [] | no_license | drop table `urlmanagement`.`urls`;
CREATE TABLE `urlmanagement`.`urls` (
`project_name` varchar(100) NOT NULL,
`url_id` int(9) NOT NULL AUTO_INCREMENT,
`url` varchar(10000) NOT NULL,
`domain` varchar(5000) NOT NULL,
`primary_keyword` varchar(500) NOT NULL,
`phrase_match_anchor` varchar(5000) NOT NULL,
`l... | true |
778884f2bf56052504f390368040b2e4b7133e7c | SQL | fpbarthel/GLASS | /sql/pyclone/pyclone_cluster_pairs_anno_drivers.sql | UTF-8 | 2,289 | 4 | 4 | [
"MIT"
] | permissive | WITH
selected_tumor_pairs AS
(
SELECT tumor_pair_barcode, tumor_barcode_a, tumor_barcode_b, ss.case_barcode, idh_codel_subtype
FROM analysis.gold_set ss
INNER JOIN clinical.subtypes st ON st.case_barcode = ss.case_barcode
),
pyclone_clusters AS
(
SELECT stp.case_barcode, stp.idh_codel_subtype, pc1.clust... | true |
de5ed4561a198319614bccabff131860c8ae8a4d | SQL | u-ashikov/DB-Basics | /Data aggregation/15.Employees_Maximum_Salaries.sql | UTF-8 | 180 | 3.609375 | 4 | [] | no_license | SELECT
empl.DepartmentID AS department_id,
MAX(empl.Salary) AS max_salary
FROM Employees AS empl
GROUP BY empl.DepartmentID
HAVING MAX(empl.Salary) NOT BETWEEN 30000 AND 70000 | true |
068d7f8f7a6e8e9692f51069516f23feb8500feb | SQL | WeiyiDeng/Dataset_code | /create_full_weeks_lenient_adopt_all_users_4061_bands.sql | UTF-8 | 454 | 3.078125 | 3 | [] | no_license | create table full_weeks_lenient_adopt_all_users_4061_bands(BAND_ID integer, WEEK_ID integer, adopt integer);
insert into full_weeks_lenient_adopt_all_users_4061_bands(BAND_ID, WEEK_ID, adopt)
select band_names_prep, weeks_prep, adopt
from dbr.full_weeks_mat4061
left join adopt_lenient_all_users_4061_bands
on BAND_ID ... | true |
a545666fe402a177c88dbf82f3c32cf96e7d033c | SQL | zaheridor/artofpostgres | /geonames/2.top10_query_per_feature.sql | UTF-8 | 241 | 3.3125 | 3 | [] | no_license | --top-10 query per feature.
select class, feature, description, count(*)
from geoname.feature
left join raw.geonames on class = feature_class and feature = feature_code
group by class, feature
order by count desc
limit 10; | true |
a72c1bad7b7a469d13e627276cdb81c3879b451e | SQL | ivan-kopylove/sandbox-sql | /sql-crossjoin.sql | UTF-8 | 150 | 2.53125 | 3 | [] | no_license | -- Cartesian product (also called cross join)
SELECT * FROM parenttable, childtable;
SELECT * FROM parenttable CROSS JOIN childtable; -- same result | true |
5997eb6c3b4a36ee232f9514901f33b7517553aa | SQL | RameshGollamandala/TELS | /RCRM/Database/query RCRM-PPE MOC Standalone.sql | UTF-8 | 13,651 | 3.015625 | 3 | [] | no_license | WITH ATTRIBUTES AS(
SELECT D.FILENAME, D.RECORDNUMBER, D.ORDER_NUMBER, D.ROW_ID ATTRIBUTE_OWNER_ROW_ID, D.ATTRIBUTE_ROW_ID, D.ATTRIBUTE_ACTION_CODE, D.ATTRIBUTE_DISPLAY_NAME, D.ATTRIBUTE_VALUE
FROM TELS_RCRM_ATTRIBUTES_VIEW D
WHERE D.ATTRIBUTE_ROW_ID IS NOT NULL)
, MP_OLI AS(
SELECT * FROM TELS_RCRM_ORD... | true |
ed3dbe99f51727a84761f192c401198d9747ab2c | SQL | parkseoeun5322/Class_Example | /Oracle/2020_06_17_DB.sql | UHC | 6,740 | 4.6875 | 5 | [] | no_license | --μ Marketing μ
--, , μڵ, ڵ ȸ
SELECT employee_id, first_name || ' ' || last_name name,
department_id, job_id
FROM employees
WHERE department_id = (SELECT department_id
FROM departments
WHERE department_name = 'Mar... | true |
0a39c0bab265068aa608597c6a62a459a48964c2 | SQL | shivanijoshi2171998/edac-may2021 | /DBMS/Assignment3.sql | UTF-8 | 1,073 | 3.4375 | 3 | [] | no_license | show databases;
use database1;
#1.Display all the Supplier names with the initial letter capital
select concat(upper(substring(sname,1,1)),lower(substring(sname,2))) from s;
#2.Display all the Supplier names in upper case.
select upper(sname) from s;
#3.Display all the Supplier names in lower case.
select lower(snam... | true |
5fec997cdc1a342f4f4b052f109d46cc23220120 | SQL | unf911/Unicorn | /metadata/inc_140721_06_sebest4_REP_SEBEST4_PC.sql | WINDOWS-1251 | 8,209 | 3.109375 | 3 | [] | no_license | SET TERM ^ ;
CREATE or alter PROCEDURE REP_SEBEST4_PC(
DAT_FROM TIMESTAMP,
DAT_TO TIMESTAMP,
ID_IZG_IN INTEGER,
ID_ZAK_IN INTEGER,
ID_MANAGER_IN INTEGER)
RETURNS (
ID VARCHAR(20),
DAT TIMESTAMP,
ID_NAKL INTEGER,
ID_IZG INTEGER,
ID_ZAK INTEGER,
ID_MANAGER INTEGER,
KURS2 D... | true |
ca54ce9e1892d3a4a367e5a50ed374ff90f935bd | SQL | AndreuMad/node_complete_api | /src/features/sqlBooks/sql/__forSettingEnvironment/createOrderBooksTable.sql | UTF-8 | 359 | 3.234375 | 3 | [] | no_license | CREATE TABLE order_books
(
id INT NOT NULL IDENTITY PRIMARY KEY,
order_id INT,
FOREIGN KEY(order_id) REFERENCES orders(id) ON DELETE CASCADE,
book_id INT,
FOREIGN KEY(book_id) REFERENCES books(id) ON DELETE SET NULL,
amount INT NOT NULL DEFAULT 1,
price DECIMAL(8, 2)
);
--INSERT INTO order_... | true |
4cb40038660f7f2a3ce81b70117f793758b9cc6d | SQL | darega/siguelloviendo | /docs/mydb export/mydb_projects.sql | UTF-8 | 2,726 | 3.171875 | 3 | [] | no_license | CREATE DATABASE IF NOT EXISTS `mydb` /*!40100 DEFAULT CHARACTER SET utf8 */;
USE `mydb`;
-- MySQL dump 10.13 Distrib 5.6.13, for Win32 (x86)
--
-- Host: 127.0.0.1 Database: mydb
-- ------------------------------------------------------
-- Server version 5.5.34
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SE... | true |
1764ac84a05c595f35ad5996634a86de4cb40447 | SQL | Lovsan/SKlone | /Database/Functions/Similarities4.sql | UTF-8 | 260 | 2.765625 | 3 | [
"MIT"
] | permissive | /****** Object: User Defined Function dbo.Similarities4 Script Date: 5/1/2004 6:12:44 PM ******/
CREATE FUNCTION dbo.Similarities4
(
@Name nvarchar(24)
)
RETURNS int
BEGIN
RETURN(SELECT COUNT(*) FROM Accounts WHERE [Password] = @Name)
END
| true |
24c685b23f76c2734a332f4bece692469b231949 | SQL | atussupbekov/assignment4 | /bookonline.sql | UTF-8 | 3,157 | 3.34375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.9.0.1
-- https://www.phpmyadmin.net/
--
-- Хост: 127.0.0.1
-- Время создания: Окт 18 2020 г., 13:19
-- Версия сервера: 10.4.6-MariaDB
-- Версия 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_CHA... | true |
286b5cadc0e3cbba6d649fb78dc16b2d2b2225da | SQL | azakimi123/helo-skills-check3 | /db/posts/get_one_post.sql | UTF-8 | 186 | 3.0625 | 3 | [] | no_license | SELECT posts.title, posts.img, posts.post_id, posts.content, users.username, users.profile_pic, users.id
FROM posts
JOIN users ON posts.author_id = users.id
WHERE posts.post_id = ${id}; | true |
a39147df8bbaaec9054e02438a22d8ed58bbba22 | SQL | yudantoanas/tanijoy-api | /db/migrations/20181102230527_update_data_petani_revisi.sql | UTF-8 | 1,689 | 3.109375 | 3 | [] | no_license |
-- +goose Up
-- SQL in section 'Up' is executed when this migration is applied
TRUNCATE TABLE farmer_commodity RESTART IDENTITY;
DELETE FROM proposals WHERE id = 7;
INSERT INTO farmers (farmer_type, name, year_of_experiences, specializations, profpic_src) VALUES
('Petani Utama', 'Pak Parna Djawak', 5, 'Kentang Grano... | true |
41956b22f30b5202ead5d0e9cca53afeb2c34dc3 | SQL | kosenMN/kosen | /kosentest.sql | UTF-8 | 15,366 | 2.890625 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.0.4.1
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Oct 12, 2013 at 05:56 AM
-- Server version: 5.6.11
-- PHP Version: 5.5.1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;... | true |
385858717b7c1d9c94621dab92d037a2e16e5b3c | SQL | Galagarzza/Xampp_flights | /xamppPrueba.sql | WINDOWS-1252 | 2,766 | 3.96875 | 4 | [] | no_license |
/*crear tabla*/
CREATE TABLE flights (
id INT AUTO_INCREMENT PRIMARY KEY,
origin VARCHAR(255) NOT NULL,
destination VARCHAR(255) NOT NULL,
duration INT NOT NULL
)
/*ingresando datos en la tabla*/
INSERT INTO flights(origin,destination,duration)values("New York","London",415);
INSERT INTO fli... | true |
98937cac1131a8f8ab37a40d4fe42d3d6c9ba2c4 | SQL | eskoviak/myhealth | /sql/Generate Favorites Report.sql | UTF-8 | 391 | 3.4375 | 3 | [] | no_license | SELECT DISTINCT fg.FdGrp_Desc, fd.NDB_No, fd.Long_Desc
FROM Health.DailyDetail dd, SR28.FOOD_DES fd, SR28.FD_GROUP fg
WHERE dd.NDB_No = fd.NDB_no
AND fd.FdGrp_Cd = fg.FdGrp_Cd
UNION
SELECT DISTINCT fg.FdGrp_Desc, fd.NDB_No, rd.Long_Desc
FROM Health.RecipeDetail rd, SR28.FOOD_DES fd, SR28.FD_GROUP fg
WHERE fd.... | true |
d6300545fed4b471e9302a26c6fe320c1e51088a | SQL | HuangChenning/oracle_dba_scripts | /oracle脚本/客户资源.sql | UTF-8 | 1,437 | 2.578125 | 3 | [] | no_license |
select '89868888220474'||trim(a.region_code)||trim(to_char(rownum,'0000')),'468888480'||trim(a.region_code)||trim(to_char(rownum,'0000')),'15888'||trim(a.region_code),'10650','0',
b.group_id,a.region_code,'99','999','zzzzzz','2212',sysdate,'uadmin',
'60384798702','20080115','',a.sm_code ,c.INLAND_TOLL ,c.innet_nam... | true |
8f0359268a31fffb548523a88aeaa643c92550ec | SQL | ardelingga/api-mobile-pocket-app-laravel5.8 | /db_mobile_pocket_app.sql | UTF-8 | 6,093 | 3.03125 | 3 | [
"MIT"
] | permissive | -- phpMyAdmin SQL Dump
-- version 5.1.0
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Oct 14, 2021 at 04:26 AM
-- Server version: 10.4.18-MariaDB
-- PHP Version: 7.4.16
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIE... | true |
c2fcb52194b379de594ded40cb9f6b668f0a949b | SQL | ajemily96/sql-challenge-hw | /SQLQueries.sql | UTF-8 | 2,112 | 4.65625 | 5 | [] | no_license | -- List the following details of each employee: employee number, last name, first name, sex, and salary.
SELECT
e.emp_no,
e.last_name,
e.first_name,
e.sex,
s.salary
FROM EMPLOYEES e
LEFT JOIN SALARIES s
ON e.emp_no = s.emp_no;
-- List first name, last name, and hire date for employees who were hired in 1986.
SEL... | true |
6909c982638790482004117857122c31d793400a | SQL | skyebook/OSMGenerator | /sql/create_osm.sql | UTF-8 | 1,967 | 3.515625 | 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';
CREATE SCHEMA IF NOT EXISTS `osm` DEFAULT CHARACTER SET utf8 ;
USE `osm` ;
-- -----------------------------------------------------
-- ... | true |
bc3dedc67b04b7817c47ddfecf21a3df352a6916 | SQL | eudaimonent/opensim.modules | /Profile/sql/osprofile.sql | UTF-8 | 2,409 | 3.328125 | 3 | [] | no_license | --
--
--
CREATE TABLE IF NOT EXISTS `classifieds` (
`classifieduuid` char(36) NOT NULL,
`creatoruuid` char(36) NOT NULL,
`creationdate` int(20) NOT NULL,
`expirationdate` int(20) NOT NULL,
`category` varchar(20) NOT NULL,
`name` varchar(255) NOT NULL,
`description` text NOT NULL,
`parceluuid... | true |
eb440877484e6efb56ed4694f2001ec5833afaee | SQL | melitza/Enfermedades_vF | /documentos/bd_diagnostico.sql | UTF-8 | 6,919 | 3.34375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.5.1
-- http://www.phpmyadmin.net
--
-- Servidor: 127.0.0.1
-- Tiempo de generación: 13-06-2017 a las 06:43:49
-- Versión del servidor: 10.1.9-MariaDB
-- Versión de PHP: 5.6.15
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=... | true |
155deb564172e1beee43dae685653976991833ec | SQL | BenHabermeyer/food-drink-pair-recommendations | /ddl.sql | UTF-8 | 2,552 | 3.984375 | 4 | [] | no_license | CREATE TABLE wine_review ( ---- cardinality: 116814
id int NOT NULL,
title varchar(200) NOT NULL,
points int,
PRIMARY KEY (id, title),
FOREIGN KEY (title) REFERENCES wine_origin(title)
);
select count(*)
from wine_review;
CREATE TABLE location ( ---cardinality: 447
province varchar(35) NOT NULL,
country v... | true |
573783ca0e1e994903f77287d6d628f225961286 | SQL | jauteixeira/senai-backend-inlock-Joao-Fabio | /BD/InLock_BD_DDL_01.sql | UTF-8 | 719 | 3.296875 | 3 | [] | no_license | CREATE DATABASE Inlock_Games_Manha
USE Inlock_Games_Manha
CREATE TABLE Estudios
(
IdEstudio INT PRIMARY KEY IDENTITY,
NomeEstudio VARCHAR(255) NOT NULL UNIQUE
);
CREATE TABLE Jogos
(
IdJogo INT PRIMARY KEY IDENTITY,
NomeJogo VARCHAR(255) NOT NULL,
Descricao VARCHAR(255),
DataLancamento DATE,
... | true |
85570e2b9f56f2a933a0049862d4f7089220dce9 | SQL | ferenckovacsx/Week8A_SQL_HR_DB_FerencKovacs | /joins.sql | UTF-8 | 1,479 | 4.5 | 4 | [] | no_license | /*Write a query to find the addresses (location_id, street_address, city, state_province, country_name)
of all the departments.SELECT location_id, street_address, city, state_province, country_name */
FROM locations
NATURAL JOIN countries;
-- Write a query to find the names (first_name, last name), department ID a... | true |
4a03a10f82980293268ba624020f50158f4b4710 | SQL | gsiems/tasker-schema | /schema/tasker/view/dv_activity.sql | UTF-8 | 6,768 | 3.859375 | 4 | [
"MIT"
] | permissive | CREATE OR REPLACE VIEW tasker.dv_activity
AS
SELECT base.id,
base.parent_id,
tree.parents,
tree.activity_depth,
tree.activity_path,
tree.outline_label,
base.edition,
base.task_name AS activity_name,
base.owner_id,
t006.username AS owner,
ba... | true |
b9b76614873a4d32f5628b1efb08a10e84a15de3 | SQL | MITLibraries/topichub | /conf/evolutions/default/9.sql | UTF-8 | 1,194 | 3.453125 | 3 | [
"Apache-2.0"
] | permissive | # core model types
# --- !Ups
DROP TABLE interest;
DROP SEQUENCE interest_id_seq;
CREATE SEQUENCE interest_id_seq;
CREATE TABLE interest (
id integer NOT NULL DEFAULT nextval('interest_id_seq'),
subscriber_id integer,
scheme_tag varchar,
int_value varchar,
template boolean,
created timestamp,
FOREIGN KE... | true |
4c2db70d34f844a0e4bc677cb2d1e3c76c5e1c7e | SQL | nguio/SIINCO_web | /FormasOracleForms/Repautw95/SQL/Docs/PlVnCmPr.sql | ISO-8859-2 | 2,115 | 2.953125 | 3 | [] | no_license | SET TERMOUT ON
set underline =
col men heading '|||Generando Plano de Venta y Compra por Proveedor (&&1..csv)|Espere por favor|' format a100
select '....................................' men from dual
/
SET TERMOUT OFF
SET SPACE 0
SET LINESIZE 250
SET PAGESIZE 52
SET ECHO OFF
SET FEEDBACK OFF
SET VERIFY OFF
SET UNDER... | true |
671cdefcb7615cd1cd94d07bc885bf0c6b95c59f | SQL | magicznykacpur/CodeTube | /src/main/resources/db/migration/V1__create_schema.sql | UTF-8 | 4,452 | 3.453125 | 3 | [] | no_license | CREATE SCHEMA IF NOT EXISTS codetube;
-- DROP TABLE IF EXISTS codetube.settings;
CREATE TABLE IF NOT EXISTS codetube.settings(
id SERIAL PRIMARY KEY,
black_theme BOOLEAN NOT NULL,
codetube_red BOOLEAN NOT NULL,
partnership BOOLEAN NOT NULL,
streaming BOOLEAN NOT NULL,
... | true |
629b4d1a57b3246f7afae45d06dd2e457ad13782 | SQL | montblancwhtevr/SIA_yaumi | /mawi.sql | UTF-8 | 15,650 | 3.296875 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.2.11
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: 10 Des 2016 pada 07.02
-- Versi Server: 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 */;
/*!4... | true |
22d47c52dbc4323d86b5ad007789be5d00f66378 | SQL | james-zimu/SnowcarnivalPhone | /SnowcarnivalPhone.sql | UTF-8 | 9,914 | 3.5 | 4 | [] | no_license | /*
Navicat Premium Data Transfer
Source Server : localhost_3306
Source Server Type : MySQL
Source Server Version : 100128
Source Host : localhost:3306
Source Schema : sc
Target Server Type : MySQL
Target Server Version : 100128
File Encoding : 65001
Date: 22/02/2021 ... | true |
b9fdadd05af2a0e2a06c3bc10b4be6c763175384 | SQL | zhangbing123/simple-job | /sql/t_execute_job.sql | UTF-8 | 1,129 | 3.28125 | 3 | [] | no_license | /*
Navicat Premium Data Transfer
Source Server : localhost
Source Server Type : MySQL
Source Server Version : 80019
Source Host : localhost:3306
Source Schema : simple-job
Target Server Type : MySQL
Target Server Version : 80019
File Encoding : 65001
Date: 06/09/2020... | true |
88d0f9f7e45b88db1a20fec87ac3c01d874fc245 | SQL | EkSemenovaE/Periodicals_Semenova | /src/main/resources/sql/periodicals.sql | UTF-8 | 867 | 3.625 | 4 | [] | no_license | CREATE SCHEMA IF NOT EXISTS periodicals;
CREATE TABLE IF NOT EXISTS periodicals.users
(
id SERIAL NOT NULL PRIMARY KEY,
firstname TEXT NOT NULL,
surname TEXT NOT NULL,
email TEXT NOT NULL,
phone TEXT NOT NULL
);
CREATE TABLE IF... | true |
336af129676f856b45aaea15457e340a1f4189b9 | SQL | chaesiong/rtp-database | /production/PIBICSDM2/tables/fs_finesdetail.sql | UTF-8 | 2,727 | 2.734375 | 3 | [] | no_license | CREATE TABLE "PIBICSDM2"."FS_FINESDETAIL"
( "FINESDETAIL_SEQNO" NUMBER,
"FINES_SEQNO" NUMBER,
"PRATE_SEQNO" NUMBER,
"FINESLIPAMOUNT" NUMBER(10,2),
"OVERSTAYDAY" NUMBER,
"CREATE_BY" VARCHAR2(20 CHAR),
"CREATE_DATE" TIMESTAMP (6),
"CREATE_IP" VARCHAR2(20 CHAR),
"UPDATE_BY" VARCHAR2(20 CHAR), ... | true |
e1eee7527ca67cce6e83a526537e899033bfb696 | SQL | pok1800/Navision-SQL-Queries | /Sql/PurchaseInvoiceLineQuery.sql | UTF-8 | 12,007 | 3.328125 | 3 | [
"MIT"
] | permissive | WITH
PINV AS
( SELECT PIL.[Document No_] + '-I-' + CAST(PIL.[Line No_] AS VARCHAR(16)) AS PURCHASE_INVOICE_ITEM_ID,
NULLIF(PIH.[Purchaser Code], '') AS BUYER_ID,
ISNULL(NULLIF(PIH.[Currency Code], N''), GLS.[LCY Code]) AS CURRENCY_ID,
PIL.No_ AS ITEM_ID,
PIL.[Location ... | true |
09ec1b1eb20df013c24a5448af07b208504375d7 | SQL | tortong91/MiniDynamic | /miniDynamic/conf/evolutions/default/1.sql | UTF-8 | 3,320 | 3.125 | 3 | [] | no_license | # --- Created by Ebean DDL
# To stop Ebean DDL generation, remove this comment and start using Evolutions
# --- !Ups
create table tbBarnd (
id varchar(255) not null,
name varchar(255),
picture varchar(255),
constraint pk_tbBarnd primary key (id))
;... | true |
002a4df4e88dcf881f3ce8de2419a6a0e0443235 | SQL | yuzucha01/EAT-SHOP | /SQL/gs_an_table.sql | UTF-8 | 2,026 | 2.734375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.9.7
-- https://www.phpmyadmin.net/
--
-- Host: localhost:3306
-- Generation Time: Mar 25, 2021 at 12:51 PM
-- Server version: 5.7.32
-- PHP Version: 7.4.12
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIE... | true |
f3764f2bdcfbfcba4ea40a6a18c6303ae079a5bd | SQL | mansik95/New-York-Police-Arrests-Analysis | /NewYorkPoliceArrestsAnalysis-master/SQL files/NYPDComplaints.sql | UTF-8 | 6,706 | 2.96875 | 3 | [] | no_license | --
-- ER/Studio Data Architect SQL Code Generation
-- Project : Model-NYPDDIMMODEL.DM1
--
-- Date Created : Thursday, April 02, 2020 23:26:53
-- Target DBMS : MySQL 5.x
--
--
-- TABLE: DIM_AGE_GROUPS
--
CREATE TABLE DIM_AGE_GROUPS(
AGE_SK INT NOT NULL,
AGE_GROUP LONGTEXT,
DI... | true |
f252718edd45800da8c958e52faf9c19f031f36b | SQL | nandorodpires2/homemakes | /public/docs/database/sql_lista_saloes_mala_direta_bh.sql | UTF-8 | 276 | 2.953125 | 3 | [] | no_license | select sl.salao_lista_nome,
sl.salao_lista_endereco,
sl.salao_lista_numero,
sl.salao_lista_complemento,
sl.salao_lista_bairro,
sl.salao_lista_cep
from salao_lista sl
where sl.salao_lista_numero is not null
and sl.salao_lista_cidade = 'Belo Horizonte'
| true |
790445d750cb575ce06a6aa3e156784f8e37f6bd | SQL | danilodesouzapereira/plataformasinap_exportaopendss | /Fontes/BD/Rede/BaseAccess/Consultas/SPSNP_rdBateria_p02.sql | UTF-8 | 3,839 | 2.9375 | 3 | [] | no_license | SELECT
Equipamento.strCodigo AS Codigo,
Equipamento.strExtId AS ExtId,
IIF(ISNULL(Equipamento.intDxComentario), -1, Equipamento.intDxComentario) AS DxComentario,
IIF(ISNULL(Equipamento.in... | true |
27ec2646174d4312a4e1194011ecb3416e576766 | SQL | oggy-kim/teamoksemi | /query/191107_create_QLIST.sql | UTF-8 | 277 | 3.34375 | 3 | [] | no_license | -- VIEW QLIST 추가 구문 (수정 19.11.10.)
CREATE OR REPLACE VIEW QLIST
AS SELECT ROWNUM RNUM, A.*
FROM(SELECT QNA_NO, MEMBER_NICK, ENROLL_DATE, QNA_TITLE, QNA_CONTENTS, ANSWER_STATUS, ANSWER_CONTENTS
FROM QNA
JOIN MEMBER USING (MEMBER_NO)
ORDER BY QNA_NO DESC)A;
| true |
f632b9e42c2f0412c7278e629f117cb0120f42ee | SQL | waudvdl4567/preteaching | /6IT-TSO-MySql3-orderbeheer/opdracht_23.sql | UTF-8 | 347 | 3.328125 | 3 | [] | no_license | DELIMITER $$
create procedure toonOpenOrdersPeriode(startDatum date , eindDatum date)
begin
select orders.orderID, orders.klantID, klanten.klantNaam
from orders
inner join klanten on (orders.klantID=klanten.klantID)
where orders.bestelDatum > startDatum and orders.bestelDatum < eindDatum
order by bestelDatum; ... | true |
52efe9a75e04ccd4377d0f824bb598aa17229d01 | SQL | oguemon/daily-rta | /setup/setup.sql | UTF-8 | 421 | 3.171875 | 3 | [] | no_license | -- このSQL文を、使用したいデータベース上で読み込ませる!
CREATE TABLE `daily-rta` (
`id` int(11) NOT NULL,
`time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`label` varchar(15) NOT NULL,
`state` varchar(5) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
ALTER TABLE `daily-rta` ADD PRIMARY KEY (`id`);
ALTER TABLE `daily-rta`
M... | true |
8c8708bec06ce74b9ab23150c0d1c99b2c4252e0 | SQL | lvhkhanh/SQL | /0130_using_arithmetic_operation.sql | UTF-8 | 248 | 3.15625 | 3 | [] | no_license | SELECT prod_id,cust_id,time_id FROM sales WHERE time_id+10 = '20-JAN-98';
SELECT prod_id,cust_id,time_id FROM sales WHERE time_id = '10-JAN-98';
SELECT prod_id, cust_id, time_id FROM sales
WHERE time_id = TO_DATE('20-JAN-98', 'DD-MON-RR')-10;
| true |
5cb5860e616e2558717bd0a844f0e47326ed5766 | SQL | ecolburn20/SQL_Exercises | /terminate_student_enrollment.sql | UTF-8 | 433 | 3.3125 | 3 | [] | no_license | CREATE PROCEDURE `terminate_student_enrollment` (
course_code_in varchar(45),
section_in varchar(45),
student_id_in varchar(45),
eff_date_in date)
BEGIN
UPDATE classparticipant
SET EndDate = eff_date_in
WHERE ID_Student = student_id_in
AND
ID_Class =
(
SELECT ID_Class
FROM class c
INNER JOIN Course co
... | true |
08fb5dd5a60b76d23f6d87c3c3223d086b69acaa | SQL | waffiqaziz/prak_pbo_responsi | /barang.sql | UTF-8 | 1,541 | 3.109375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Jun 29, 2021 at 05:08 PM
-- Server version: 10.4.14-MariaDB
-- PHP Version: 7.4.10
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIE... | true |
992564e32a9c6e5a7f521748a3d8eae875ca0359 | SQL | OAGi/Score | /score-http/score-http/src/main/resources/schemas/app_oauth2_user.ddl | UTF-8 | 1,640 | 3.453125 | 3 | [
"MIT"
] | permissive | CREATE TABLE `app_oauth2_user`
(
`app_oauth2_user_id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Primary key.',
`app_user_id` bigint(20) unsigned DEFAULT NULL COMMENT 'A reference to the record in `app_user`. If it is not set, this is treated as a pending record.',
`oauth2_app_id` bigi... | true |
94c891ada0cefc1cad895a35c5900c27878d7a63 | SQL | fredi12345/kuefa-karben | /init.sql | UTF-8 | 2,484 | 3.671875 | 4 | [] | no_license | #TODO Remove Drop Table after testing
DROP TABLE IF EXISTS kuefa_karben.participant;
DROP TABLE IF EXISTS kuefa_karben.comment;
DROP TABLE IF EXISTS kuefa_karben.images;
DROP TABLE IF EXISTS kuefa_karben.user;
DROP TABLE IF EXISTS kuefa_karben.event;
CREATE TABLE IF NOT EXISTS event (
event_id INT NOT NULL AUTO_... | true |
1e4fef9613a238912acce14eed0e9547e9bba786 | SQL | kasramp/active-jdbc-example | /src/migrations/20190503131110_create_tables.sql | UTF-8 | 1,315 | 4.1875 | 4 | [] | no_license | CREATE TABLE IF NOT EXISTS users (
id INTEGER AUTO_INCREMENT PRIMARY KEY,
email_address VARCHAR(512) NOT NULL,
first_name VARCHAR(512) NOT NULL,
last_name VARCHAR(512) NOT NULL,
CONSTRAINT uc_user_email_address UNIQUE(email_address),
INDEX idx_user_email_address (email_address)
) engine=InnoDB;
CREATE TABL... | true |
a1605faec9e66f3f4a5ab98ace50c9193244b0a2 | SQL | ahmadhanis/FlutterA201 | /food_ninja/food_ninjav2/foodninjav2.sql | UTF-8 | 8,826 | 3 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.9.5
-- https://www.phpmyadmin.net/
--
-- Host: localhost:3306
-- Generation Time: Dec 18, 2020 at 09:46 PM
-- Server version: 10.3.27-MariaDB-cll-lve
-- PHP Version: 7.3.6
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!4... | true |
7dd5146fa9e82b0e4af13fb1931963b5c72696c6 | SQL | Yamilla/Projeto_MTP2.0 | /MODELO USAVEL.sql | UTF-8 | 3,242 | 3.390625 | 3 | [] | no_license |
CREATE SEQUENCE public.idproduto_seq;
CREATE TABLE public.produto (
idProduto BIGINT NOT NULL DEFAULT nextval('public.idproduto_seq'),
nome VARCHAR(200),
descricao VARCHAR(1000),
preco_custo NUMERIC,
preco_venda NUMERIC,
... | true |
1c060426dcdfa828b8bee8cad0bbf8a010dd214d | SQL | aldroidsystem/hormid | /target/classes/Database/DDL/tb_kuli_timbang.sql | UTF-8 | 201 | 3.0625 | 3 | [] | no_license | drop table tb_kuli_timbang;
create table tb_kuli_timbang (
no_slip number(38) not null,
kuli number(30),
CONSTRAINT ct_kuli_timbangl_fk FOREIGN KEY (no_slip) REFERENCES tb_timbang (no_slip)
); | true |
45d3c421863fe90c974d324c4705978e46dcee1e | SQL | SERG-Delft/evosql | /instrumented-hsqldb/testrun/sqltool/dsv-trimming.sql | UTF-8 | 1,812 | 3.65625 | 4 | [
"Apache-2.0"
] | permissive | /*
* $Id: dsv-trimming.sql 5406 2014-10-13 20:53:18Z unsaved $
*
* Tests trimming in DSV imports
*/
CREATE TABLE t (i INT, r REAL, d DATE, t TIMESTAMP, v VARCHAR(80), b BOOLEAN);
\m dsv-trimming.dsv
SELECT count(*) FROM t WHERE i = 31;
*if (*? != 1) \q Import of space-embedded INT failed
SELECT count(*) FROM ... | true |
3a5883f7c0c7827859153faed615c3ec1ee71e06 | SQL | radtek/abs3 | /sql/mmfo/bars/Table/finmon_reft_wf.sql | UTF-8 | 3,386 | 3.046875 | 3 | [] | no_license |
PROMPT =====================================================================================
PROMPT *** Run *** ========== Scripts /Sql/BARS/Table/FINMON_REFT_WF.sql =========*** Run **
PROMPT =====================================================================================
PROMPT *** ALTER_POLICY_INFO... | true |
09c3c9299355f55690e52401b692d46b85b624f0 | SQL | mobius29/simple_page | /schema/users.sql | UTF-8 | 397 | 2.921875 | 3 | [] | no_license | CREATE TABLE `users` (
`ID` INT NOT NULL AUTO_INCREMENT,
`userName` VARCHAR(16) NOT NULL UNIQUE,
`password` VARCHAR(160) NOT NULL,
`displayName` VARCHAR(32) NOT NULL UNIQUE,
`introduce` TEXT NOT NULL,
`gender` CHAR(1) NOT NULL,
`dateJoined` TIMESTAMP NOT NULL DEFAULT current_timestamp(),
`isActive` TINYINT(1) N... | true |
42750d8472d8ea79c40949155220395f148c5553 | SQL | frengkys/LibraryApp | /src/main/resources/db/migration/V2__add__table__booking.sql | UTF-8 | 463 | 3.140625 | 3 | [] | no_license | drop table if exists booking cascade;
drop table if exists booking_detail cascade;
create table booking
(
id bigserial primary key,
member_id int8,
booking_status varchar,
created_at timestamp,
updated_at timestamp
);
create table booking_detail
(
id bigserial,
book_id int8,
booking_i... | true |
f89036f4eb23c1b0e6054369d6bb12154d11c114 | SQL | lopezignacio0091/AngularJs | /nueva.sql | UTF-8 | 7,041 | 3.25 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.7.4
-- https://www.phpmyadmin.net/
--
-- Servidor: 127.0.0.1
-- Tiempo de generación: 27-07-2020 a las 22:43:35
-- Versión del servidor: 10.1.30-MariaDB
-- Versión de PHP: 7.2.1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
... | true |
4c21f7b5f9f7558fef3d42116fd5e20d3d528c6e | SQL | hackohackob/TelerikAcademy | /Databases/Exam/Problem 4 - SQL Queries/2. Species and products.sql | UTF-8 | 221 | 4.09375 | 4 | [
"MIT"
] | permissive | USE PetStore
SELECT s.Name,COUNT(p.Id) AS 'Total Number Of Products'
FROM Species s
INNER JOIN ProductSpecies ps ON s.Id = ps.SpeciesId
INNER JOIN Products p ON p.Id = ps.ProductId
GROUP BY s.Name
ORDER BY COUNT(p.ID) | true |
7478af18f410ed57b031bee8f4801345c83359a2 | SQL | Gervalos/Curso-111k | /Bases de Datos/Clases/Clase 1/Scripts Trabajo.sql | UTF-8 | 2,046 | 3.84375 | 4 | [] | no_license | -- 1 - Crear Base de Datos
CREATE DATABASE DB111k;
-- 2 - Crear Tabla en la Base de datos -- No es AUTO_INCREMET por el DNI
CREATE TABLE Alumnos (
Dni INTEGER UNSIGNED UNIQUE NOT NULL PRIMARY KEY,
Nombre VARCHAR(20) NOT NULL,
Apellido VARCHAR(20) NOT NULL,
Telefono VARCHAR(20) DEFAULT 0,
Email VARCHAR... | true |
0183da8b46e1cc7101c65d8c90299a9876326d09 | SQL | gkruiz/BaseDatos_BlockBuster | /Borrador_Usado.sql | UTF-8 | 43,303 | 3.390625 | 3 | [] | no_license |
CREATE TABLE actor (
id_actor INTEGER GENERATED ALWAYS as IDENTITY(START with 1 INCREMENT by 1) NOT NULL ,
nombre VARCHAR2(255)
);
ALTER TABLE actor ADD CONSTRAINT actor_pk PRIMARY KEY ( id_actor );
CREATE TABLE categoria (
id_categoria INTEGER GENERATED ALWAYS as IDENTITY(START with 1 INCREMENT by 1... | true |
13330432d4a44b8fe71c23f2e249d137a10050d0 | SQL | aman4mi/SQL-STORE | /JOURNAL_NEW_201119.sql | UTF-8 | 4,831 | 3.609375 | 4 | [] | no_license | SELECT t_journal.voucher_no voucherno
, t_journal.journal_no postedVoucherNo
, to_char(t_journal.posting_date, 'DD/MM/YYYY') posted_date
, to_char(t_journal.date, 'DD/MM/YYY... | true |
a85035cf8e0191eaed83d5388b0f6e5321df7c30 | SQL | silence-do-good/stress-test-Postgres-and-MySQL | /dump/low/day09/select1831.sql | UTF-8 | 271 | 3.15625 | 3 | [] | no_license |
SELECT sen.name
FROM SENSOR sen, SENSOR_TYPE st, COVERAGE_INFRASTRUCTURE ci
WHERE sen.SENSOR_TYPE_ID=st.id AND st.name='Thermometer' AND sen.id=ci.SENSOR_ID AND ci.INFRASTRUCTURE_ID=ANY(array['4100_1','4208','5019','2100_9','3004','5028','3065','5224','1423','4064'])
| true |
f4b3f2e66cd52930da0aab2ba1cf251a12c09e58 | SQL | lsimmonds44/JCrisisHotline | /JCrisis_Creation_Script.sql | UTF-8 | 30,254 | 4.03125 | 4 | [] | no_license |
DROP DATABASE IF EXISTS JCrisis_Hotline_DB;
CREATE DATABASE JCrisis_Hotline_DB;
USE JCrisis_Hotline_DB;
Create Table Call_Record (
Call_Record_ID INT AUTO_INCREMENT NOT NULL COMMENT 'ID of the call record',
Start_Time VARCHAR(100) NOT NULL COMMENT 'Start time of the comment',
Counselor_ID INT NOT NULL C... | true |
0c885002346d774b3d1a81d3138f78436ed14d3b | SQL | JIAZHEN/test-factorygirl | /create.sql | UTF-8 | 1,117 | 3.4375 | 3 | [] | no_license |
1.table
CREATE TABLE Gradereport
(
studentID VARCHAR(20) NOT NULL PRIMARY KEY,
STUDENTNAME VARCHAR(25) NOT NULL,
CourseID VARCHAR(30) NOT NULL,
Grade NUMBER(10) NOT NULL,
Lecture VARCHAR(20) NOT NULL,
Room CHAR,
Title VARCHAR(20)
)
-... | true |
996ee41be34496a0b8834af64b4440be49fdaf2a | SQL | vasiliykulik/Signal-Deviation-Analysis | /src/main/resources/database/initDB.sql | UTF-8 | 1,458 | 3.546875 | 4 | [] | no_license | CREATE TABLE IF NOT EXISTS modems (
id BIGINT NOT NULL PRIMARY KEY,
street VARCHAR(45) NULL,
houseNumber VARCHAR NULL,
linkToMAC VARCHAR NULL
);
CREATE TABLE IF NOT EXISTS measurements (
id BIGINT NOT NULL PRIMARY KEY,
dateTime DATETIME NULL,
usTXP... | true |
f06b3f2fed582d3aeb61dbf21f03e1d4117166cf | SQL | apunko/DB_labs | /1/old_employee_query.sql | UTF-8 | 219 | 3.0625 | 3 | [] | no_license | USE AdventureWorks2012;
SELECT BusinessEntityID,JobTitle,Gender,datediff(year,HireDate,CAST(GETDATE() AS DATE)) as 'YearsWorked'
FROM HumanResources.Employee
WHERE datediff(year,BirthDate,CAST(GETDATE() AS DATE)) >= 65; | true |
1bedce4699be838f045d20bcab1e10ffab7793c3 | SQL | Zhengzhibo1/SQL-practice | /04_查找所有已经分配部门的员工的last_name和first_name/solution.sql | UTF-8 | 877 | 4.28125 | 4 | [] | no_license | /*
查找所有已经分配部门的员工的last_name和first_name以及dept_no(请注意输出描述里各个列的前后顺序)
CREATE TABLE `dept_emp` (
`emp_no` int(11) NOT NULL,
`dept_no` char(4) NOT NULL,
`from_date` date NOT NULL,
`to_date` date NOT NULL,
PRIMARY KEY (`emp_no`,`dept_no`));
CREATE TABLE `employees` (
`emp_no` int(11) NOT NULL,
`birth_date` date NOT NULL,
`firs... | true |
2183129e65a990d66a1da8e55cebb313b83f7199 | SQL | salsabila05/bpwl | /chart/penerimaan.sql | UTF-8 | 366 | 2.703125 | 3 | [] | no_license | CREATE DATABASE cc;
use cc;
create table `penerimaan` (
`bulan` date not null,
`jumlahPendaftar` int(11) not null,
`jumlahDiterima` int(11) not null
) ENGINE=InnoDB;
insert into `penerimaan`(`bulan`,`jumlahPendaftar`,`jumlahDiterima`) values
('2020-01-31', 150, 15),
('2020-02-29', 200, 25),
('2020-03-31'... | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.