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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
5de644d0a8e3de0d08cb95a9e0abf31b87d6a916 | SQL | TagawaTakuto/SQL | /Q1.sql | SHIFT_JIS | 1,427 | 3.890625 | 4 | [] | no_license | 1
CREATE TABLE item_category(
category_id int PRIMARY KEY,
category_name varchar(256) NOT NULL,
);
2
CREATE TABLE item(
item_id int PRIMARY KEY,
item_name varchar(256) NOT NULL,
item_price int NOT NULL,
category_id int,
);
3
INSERT INTO item_category VALUES(1,'Ƌ');
INSERT INTO item_category VALUES(... | true |
31049ecbede7bb05cef4fb865ed5989931850bdb | SQL | mister33221/MySQL-script | /petpei/petpei_epost.sql | UTF-8 | 3,762 | 3.09375 | 3 | [] | no_license | CREATE DATABASE IF NOT EXISTS `petpei` /*!40100 DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci */ /*!80016 DEFAULT ENCRYPTION='N' */;
USE `petpei`;
-- MySQL dump 10.13 Distrib 8.0.26, for Win64 (x86_64)
--
-- Host: localhost Database: petpei
-- ------------------------------------------------------
-- Se... | true |
f98914464d5d632f92505c6b28f5b3a2d66da07e | SQL | shailesh-satariya/Push-Notification-Php-Website | /push_notification/push_notification.sql | UTF-8 | 8,800 | 2.75 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 3.5.2.2
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Jan 14, 2013 at 08:28 AM
-- Server version: 5.5.27
-- PHP Version: 5.4.7
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/... | true |
246ac1d9c43b98fb7fe522aa725a30f072f4ba0a | SQL | saulhoward/haddock-cms | /plug-ins/shop/trunk/sql/create-hpi_shop_product_text_links.sql | UTF-8 | 405 | 2.734375 | 3 | [] | no_license | --
-- Table structure for table `hpi_shop_product_text_links`
--
CREATE TABLE `hpi_shop_product_text_links` (
`id` int(10) unsigned NOT NULL auto_increment,
`product_id` int(10) unsigned NOT NULL,
`language_id` int(10) unsigned NOT NULL,
`name_text_id` int(10) unsigned NOT NULL,
`description_text_id` int(1... | true |
def54bf836520cd5caec0ee3dae272a62c4afc59 | SQL | DarkoBorojevic/PHP-Bootstrap-multiple-regex-validation-Register-Login-script | /pdologreg.sql | UTF-8 | 1,651 | 2.765625 | 3 | [
"LicenseRef-scancode-unknown-license-reference",
"CC0-1.0",
"CC-BY-3.0"
] | permissive | -- phpMyAdmin SQL Dump
-- version 4.5.1
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: May 27, 2017 at 01:35 PM
-- Server version: 10.1.19-MariaDB
-- PHP Version: 7.0.13
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CL... | true |
de1430e3e4bc1a1c734e5d11fce839c247310171 | SQL | mikkelrev22/checkmeout | /Schema.sql | UTF-8 | 501 | 2.78125 | 3 | [] | no_license | -- CREATE database Checkout;
USE Checkout;
Create TABLE Account(
id INT NOT NULL AUTO_INCREMENT,
name VARCHAR(30) NOT NULL,
email VARCHAR(30) NOT NULL,
password VARCHAR(30) NOT NULL,
address1 VARCHAR(100) NOT NULL,
address2 VARCHAR(100) NOT NULL,
city VARCHAR(30) NOT NULL,
state VARCHAR(30) NOT NULL,
... | true |
0b0953b2fe3a57b4c8c6c29d6090be22325753fb | SQL | wsjk/looker_date_tools | /bq_udf/fp_fm.sql | UTF-8 | 266 | 2.640625 | 3 | [] | no_license | create or replace function dataset.cal_tools_fp_fm(fy int64, fm int64, delta int64)
options(description="Get 454 month number after adding/subtracting months from current month")
as ((
select
extract(month from dataset.cal_tools_delta_month_date(fy, fm, delta))
));
| true |
e9f36b87fc29e2e73c7ddf58acea21e814fb7677 | SQL | JACM11/DBColegio | /Reporte_aprobados_y_reprobados.sql | UTF-8 | 1,855 | 3.578125 | 4 | [] | no_license | --Reporte de estudiantes aprobados en las materias del periodo
select
Periodo_Academico.Periodo_fecha_fin,
Periodo_Academico.Periodo_fecha_inicio,
Estudiante.Estudiante_nombres,
Estudiante.Estudiante_apellidos,
Curso.Curso_nombre,
Curso.Curso_paralelo,
Asignatura.Asignatura_nombre,
Profesor.Profesor_nombres,
Profesor.... | true |
c7538ba82d2518bdd64db13094e3464b0c578b76 | SQL | arsight/XXI | /post.sql | UTF-8 | 8,672 | 3.21875 | 3 | [] | no_license | --post_rassilka
select
CCDAAGRMNT,
DCDASIGNDATE,
ccusname,
CUS_UTIL.GET_CUS_ADDRESS (icusnum,adrnum) adr,
CUS_UTIL.GET_CUS_ADDRESS_INDEX (icusnum,adrnum) ind,
adrnum,
(SELECT ' '||';'||POST_INDEX||';'||UPPER(REG_NAME)||';'||UPPER(AREA)||';'|| UPPER(CITY)||';;'|| CUS_UTIL.GET_CUS_NAME(ICDACLIENT)||';0... | true |
02d6523b8578d7c44cbb91b9e35a54879be9c171 | SQL | lrana-227/RBootCamp | /cw/0-7SQL/19/05-Stu_Making_IDs/making_id.sql | UTF-8 | 820 | 3.640625 | 4 | [] | no_license | SELECT * FROM people;
INSERT INTO people(full_name, has_pet, pet_type,pet_name, pet_age)
VALUES
('Name1',false, 'lion','pet5',10)
DELETE from people WHERE full_name = 'Name1' and pet_type='lion'
DROP TABLE people;
CREATE TABLE public.people
(
id SERIAL PRIMARY KEY,
full_name VARCHAR(30) NOT NULL,
has_pet ... | true |
321a692efbedc7fe6745211b5bf1b9ae3b75fecb | SQL | danieldiamond/gitlab-analytics | /transform/snowflake-dbt/models/sources/greenhouse/greenhouse_employments_source.sql | UTF-8 | 805 | 3.171875 | 3 | [
"LicenseRef-scancode-unknown-license-reference",
"MIT"
] | permissive | WITH source as (
SELECT *
FROM {{ source('greenhouse', 'employments') }}
), renamed as (
SELECT
--key
candidate_id::NUMBER AS candidate_id,
--info
company_name::varchar AS candidate_company_name,
title::varchar ... | true |
d0c33c20bfe9180ac168a6986b8b59932b646540 | SQL | admartin/Hindsight | /SqlScripts/RawDataSchema.sql | UTF-8 | 2,267 | 3.59375 | 4 | [] | no_license | -- 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='TRADITIONAL,ALLOW_INVALID_DATES';
-- -----------------------------------------------------
-- Schema Ra... | true |
c7104e70b16a6500ce4ffce08952e29841d6b9e1 | SQL | sierra073/gsheet-service-layer | /scripts/2019/id2026_who_cant_meet_w_future_pricing.sql | UTF-8 | 6,163 | 3.71875 | 4 | [] | no_license | with not_meeting_w_cost as (
SELECT
dbc.funding_year,
dbc.district_id,
d.num_students,
d.num_schools,
d.locale,
d.size,
d.c1_discount_rate,
d.discount_rate_assumed,
dbc.ia_monthly_cost_total,
dbc.meeting_2018_g... | true |
5d40469340f8a0a539cccfba0d9d095079a952b3 | SQL | JennyWang95/MSCA | /Data Engineering/Assignment/SakilaSnowflakeDW-DDL.sql | UTF-8 | 14,505 | 3.5 | 4 | [] | no_license | /***********************************************
** MSc ANALYTICS
** DATA ENGINEERING PLATFORMS (MSCA 31012)
** File: Sakila Snowflake DDL - Assignment 3
** Desc: Creating the Sakila Snowflake Dimensional model
** Auth: Shreenidhi Bharadwaj, Ashish Pujari
** Date: 04/08/2018
****************... | true |
c7c00c519fe7a614a157fe6759e4dc6539c61d7f | SQL | so-glad/factors | /src/main/plpgsql/so/glad/wechat/test_media.sql | UTF-8 | 1,131 | 3.5 | 4 | [
"MIT"
] | permissive | CREATE SEQUENCE wechat.table_test_media_id_seq
INCREMENT 1 START 1 MINVALUE 1
MAXVALUE 9223372036854775807 CACHE 1;
ALTER SEQUENCE wechat.table_test_media_id_seq OWNER TO soglad;
CREATE TYPE wechat.MEDIATYPE AS ENUM ('image', 'voice', 'vedio', 'news');
ALTER TYPE wechat.MEDIATYPE OWNER TO soglad;
CREATE TABLE IF NOT... | true |
9dc4773b9c3f8390364045a6bd9edc838e1b9dc3 | SQL | Earlo/Tyhammaam | /initialD/salmariEntry.sql | UTF-8 | 4,608 | 3.0625 | 3 | [] | no_license | /*sisältää*/
INSERT INTO Sisaltaa
VALUES ('Vaan nää renkaat', 'Eturenkaat');
INSERT INTO Sisaltaa
VALUES ('Vaan nää renkaat', 'Takarenkaat');
INSERT INTO Sisaltaa
VALUES ('Nesteet uusiks', 'Kauppareissu');
INSERT INTO Sisaltaa
VALUES ('Nesteet uusiks', 'Jäähdytysnesteen vaihto');
INSERT INTO Sisaltaa
VALUES ('Nest... | true |
9906ffc8486d1500763318ace5d59b5fd2dd19c6 | SQL | PhilViel/Database1 | /Database1/dbo/Stored Procedures/Procs2/SUn_ExternalPromoSearch.sql | UTF-8 | 305 | 2.765625 | 3 | [] | no_license |
-- Optimisé version 26
--Voir Upd_Mo_9999-99_Un_9999-99.sql
CREATE PROC SUn_ExternalPromoSearch (
@ConnectID MoID)
AS
BEGIN
SELECT EP.ExternalPromoID,CO.CompanyName
FROM Un_ExternalPromo EP
JOIN Mo_Company CO ON (CO.CompanyID = EP.ExternalPromoID)
ORDER BY CO.CompanyName
RETURN(1);
END;
| true |
26c4704f40ac73ad02ceb9932e3d04bc35c2941d | SQL | ShiamMisbah/CSE-470-Project | /Code/Model/form.sql | UTF-8 | 4,622 | 3.078125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Feb 26, 2021 at 09:07 PM
-- Server version: 10.4.13-MariaDB
-- PHP Version: 7.4.7
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIEN... | true |
1987197669a1512796a0ed6f4e2d6178c5899dc3 | SQL | GStout17/sql-challenge | /Epilogue.sql | UTF-8 | 380 | 3.640625 | 4 | [] | no_license | -- find employee 499942 information
SELECT first_name,last_name, e.emp_no AS employee_id,
to_char(hire_date, 'MM/DD/YYYY'),
d.dept_name,
d.dept_no,
title,
salary
FROM employees e JOIN dept_emp de ON e.emp_no = de.emp_no
JOIN departments d ON d.dept_no = de.dept_no
JOIN titles t ON t.title_id = e.emp_title_id
JOIN ... | true |
b20c076093de83003c57bb261909882357985ab3 | SQL | cdesmarais/WebDB-Test | /WebDB/StoredProcedures/Common/dbo.Admin_Caller_Update.PRC | UTF-8 | 1,762 | 3.625 | 4 | [] | no_license | if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[Admin_Caller_Update]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
drop procedure [dbo].[Admin_Caller_Update]
GO
CREATE PROCEDURE dbo.Admin_Caller_Update
(
@UserID int,
@FirstName nvarchar(255),
@LastName nvarchar(255),
@login nvarchar(255)... | true |
b2f9bad4b925ed3e0ea88e3b7dbfbca134387dba | SQL | mariodavid/cuba-example-immigration-processing | /modules/core/db/init/hsql/10.create-db.sql | UTF-8 | 3,284 | 2.96875 | 3 | [] | no_license | -- begin CEIP_CLIENT
create table CEIP_CLIENT (
ID varchar(36) not null,
VERSION integer not null,
CREATE_TS timestamp,
CREATED_BY varchar(50),
UPDATE_TS timestamp,
UPDATED_BY varchar(50),
DELETE_TS timestamp,
DELETED_BY varchar(50),
--
NAME varchar(255) not null,
--
prim... | true |
7148857fb3f6dd89082555dd208601ea4a5af500 | SQL | herirustandi/herirustandi | /db_apotek.sql | UTF-8 | 1,535 | 3 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 5.0.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Waktu pembuatan: 13 Feb 2021 pada 16.52
-- Versi server: 10.4.17-MariaDB
-- Versi PHP: 7.3.27
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@C... | true |
36e4c4c8f4ca9db046a9b1b5092256b0560cff19 | SQL | Kennydao/sql-challenge | /EmployeeSQL/[schema] Employees_db.sql | UTF-8 | 4,199 | 3.703125 | 4 | [] | no_license | -- Exported from QuickDBD: https://www.quickdatabasediagrams.com/
-- Link to schema: https://app.quickdatabasediagrams.com/#/d/7hPtMz
-- NOTE! If you have used non-SQL datatypes in your design, you will have to change these here.
-- DROP DATABASE IF EXISTS Employees_db;
-- CREATE DATABASE Employees_db;
-- USE Employee... | true |
5d565985d6782d9d091f312ae9f212a804ef34c0 | SQL | rohit-nair/neuralist | /scripts/queries.sql | UTF-8 | 1,405 | 3.015625 | 3 | [] | no_license | ########## TABLES
# similars_src
# similars_dest_tmp
# similars_dest
# idx_src
# idx_dest
# songs
# billboard
# top2009
# foo
# top100
# dupes
# uniq_songs
# top100_similars
# top100_similars_mapped
# CLeanup special characters
SELECT YOUR_COLUMN FROM YOUR_TABLE WHERE replace(replace(replace(replace(replace(replace(re... | true |
3902382691e12a6166b1a3481dd73bea2e1e2db5 | SQL | partys88/Manicure | /WebRoot/WEB-INF/sql/test.sql | UTF-8 | 3,165 | 3.328125 | 3 | [] | no_license | /*
Navicat MySQL Data Transfer
Source Server : chenli
Source Server Version : 50624
Source Host : localhost:3306
Source Database : test
Target Server Type : MYSQL
Target Server Version : 50624
File Encoding : 65001
Date: 2015-07-19 21:31:20
*/
SET FOREIGN_KEY_CHECKS... | true |
b2e9e7f342fc034c17a14fdf0e2f693f890ef8e8 | SQL | zelcakok/HMSP | /HMSP/09_MAR/MySql/schema_incident_patient_staff.sql | UTF-8 | 3,040 | 3 | 3 | [] | no_license | -- MySQL dump 10.13 Distrib 5.6.28, for debian-linux-gnu (x86_64)
--
-- Host: localhost Database: hmsp
-- ------------------------------------------------------
-- Server version 5.6.28-0ubuntu0.15.10.1
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHAR... | true |
8fb4c8ae6a10db9bb82cb02e9588ef00c226ee41 | SQL | glaphil/flushit | /conf/evolutions/default/1.sql | UTF-8 | 653 | 3.0625 | 3 | [] | no_license | # --- Created by Ebean DDL
# To stop Ebean DDL generation, remove this comment and start using Evolutions
# --- !Ups
create table spot (
id bigint not null,
label varchar(255),
gender varchar(255),
last_update timestamp,
status ... | true |
99a7b9aadd311eecba491fd4b6048cadd757f6e5 | SQL | Robertosoft10/loja-virual | /Private/banco.sql | UTF-8 | 2,191 | 3.375 | 3 | [
"MIT"
] | permissive | CREATE DATABASE lojavirtual;
USE lojavirtual;
CREATE TABLE tb_login(
idUser int not null auto_increment primary key,
username varchar(255),
user_email varchar(255),
password varchar(255)
);
CREATE TABLE tb_categorias(
idCateg int not null auto_increment primary key,
categoria varchar(30)
);
CREATE TABLE tb_itens(
idI... | true |
fe5be2fd17e6dfa32f92ce4da34f1f865bd4b1a2 | SQL | dmitry-weirdo/vaadin-demo | /src/main/resources/data.sql | UTF-8 | 916 | 3.234375 | 3 | [] | no_license | -- magic of execution this field automatically is done by Spring Boot, @see https://docs.spring.io/spring-boot/docs/current/reference/html/howto-database-initialization.html#howto-initialize-a-database-using-spring-jdbc
drop table if exists todo;
-- create table if not exists todo(id bigint auto_increment primary k... | true |
81ca03c979e628c836c3fa90383512765a555c95 | SQL | paul-rogers/drill-test-framework | /framework/resources/Datasources/parquet_storage/filter/pushdown/varchar_decimal/create_hive_tables.ddl | UTF-8 | 934 | 2.859375 | 3 | [
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | create database if not exists filter_pushdown;
drop table if exists filter_pushdown.customer;
create external table filter_pushdown.customer(
c_custkey int,
c_name string,
c_address string,
c_nationkey int,
c_phone string,
c_acctbal decimal(6,2),
c_mktsegment string,
c_comment string
)
stored as parque... | true |
a4d055ba21467e8136b4022a34a7a4992bea251b | SQL | kapsali29/cassandra-assignment | /Queries/cassandra4devs/multi-row-partitions.cql | UTF-8 | 2,176 | 3.71875 | 4 | [
"MIT"
] | permissive | create keyspace pluralsight with replication = {'class':'SimpleStrategy', 'replication_factor':1};
use pluralsight;
CREATE TABLE IF NOT EXISTS courses (
id varchar,
name varchar,
author varchar,
audience int,
duration int,
cc boolean,
released timestamp,
module_id int,
module_name varchar,
module_d... | true |
f208da25778a2f8cc51240865ab25d9e3fc234d4 | SQL | rishabjain321/SQL-start | /SQLQuery1.sql | UTF-8 | 1,505 | 4 | 4 | [] | no_license | /*Q1*/
SELECT VendorName, VendorCity, VendorState
FROM AP.dbo.Vendors;
/*Q2*/
SELECT InvoiceNumber AS Number, InvoiceTotal AS Total,
PaymentTotal + CreditTotal AS Credits
FROM AP.dbo.Invoices
WHERE InvoiceTotal <= 200;
/*Q3*/
SELECT VendorContactLName + ',' + VendorContactFName AS [Full Name]
FROM AP.dbo.Vendors
ORD... | true |
931990eba05d7fd81f45bbf05096726996c1ba49 | SQL | warhamabdullah/simple-selection-employees-dss-ahp | /database.sql | UTF-8 | 17,716 | 2.828125 | 3 | [
"MIT"
] | permissive | -- phpMyAdmin SQL Dump
-- version 4.7.1
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Generation Time: Jul 09, 2017 at 02:54 PM
-- Server version: 10.1.23-MariaDB
-- PHP Version: 7.1.5
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD... | true |
d684bbe5fb6032c1d50e43a4319491795d0b5c0b | SQL | flexberry-app-sandbox/Flexberry.HardwareAndSoftwareAccounting | /src/SQL/Oracle.create.sql | UTF-8 | 6,830 | 2.65625 | 3 | [] | no_license |
CREATE TABLE "Vendor"
(
"primaryKey" RAW(16) NOT NULL,
"Name" NVARCHAR2(255) NULL,
PRIMARY KEY ("primaryKey")
) ;
CREATE TABLE "User"
(
"primaryKey" RAW(16) NOT NULL,
"Name" NVARCHAR2(255) NULL,
"Surname" NVARCHAR2(255) NULL,
"isAdmin" NUMBER(1) NULL,
PRIMARY KEY ("primaryKey")
)... | true |
88f8e93aade05636716527d907179044aa9f95f5 | SQL | Adithya009/datamodel | /mysql/tables/user_.sql | UTF-8 | 456 | 2.90625 | 3 | [
"MIT"
] | permissive | DROP TABLE IF EXISTS `user_`;
CREATE TABLE `user_` (
`id` INTEGER NOT NULL AUTO_INCREMENT,
`username` VARCHAR(64) NOT NULL,
`secret` VARCHAR(64) NOT NULL,
`fullname` VARCHAR(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
`accesslist` VARCHAR(256) NOT NULL,
`is_admin` INTEGER NOT NULL DEFAULT 0,
... | true |
8fdbb5a23955db5f2d6a5397b5195519e1952a83 | SQL | Jakubstroinski/ZSK | /PWI 4/Zadanie_na_ocene/baza/eksport.sql | UTF-8 | 1,772 | 3.125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Czas generowania: 22 Mar 2021, 09:39
-- Wersja serwera: 10.4.14-MariaDB
-- Wersja PHP: 7.4.10
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@C... | true |
4af3626b99f15dade9222dbd57a25fbd3b0e505c | SQL | Petretooo/Databases | /MySQL/Subqueries and JOINS/geography Continents and Currencies.sql | UTF-8 | 863 | 4.15625 | 4 | [] | no_license | SELECT c_usdg.`continent_code`, c_usdg.`currency_code`, c_usdg.`cur_usage` AS 'currency_usage'
FROM
(SELECT con.`continent_code`, c.`currency_code`, COUNT(*) AS 'cur_usage'
FROM `continents`AS con
INNER JOIN `countries` As c
ON con.`continent_code` = c.`continent_code`
GROUP BY con.`continent_code`, c.`currency_code`) ... | true |
a5ae7630e7f6f5148ed903b07f9fa5b5b1f2a1bb | SQL | lucaburatti7/A00-Training-plan | /讲义最终版_编撰中/00待整理资源/ZLJPj/SQL文样本/D783SHR_TBL.Sql | SHIFT_JIS | 4,019 | 2.765625 | 3 | [] | no_license | DROP TABLE D783SHR_TBL ;
CREATE TABLE D783SHR_TBL (
R[h CHAR(9) NOT NULL,
xR[h CHAR(5) NOT NULL,
x於 VARCHAR2(80) NOT NULL,
xZ VARCHAR2(16) NOT NULL,
喼 ... | true |
c111cd15e3903581876d9c1df6856df4f678bd67 | SQL | parasjoshua/queue | /db/db_queue.sql | UTF-8 | 13,964 | 2.703125 | 3 | [] | permissive | -- phpMyAdmin SQL Dump
-- version 4.8.3
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Aug 11, 2019 at 07:51 AM
-- Server version: 10.1.36-MariaDB
-- PHP Version: 5.6.38
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OL... | true |
bfc3c369d9ff5d7183d9797ff2fb583cb4130150 | SQL | BartoszDabrowski00/ClinicDatabase | /Insert.sql | WINDOWS-1250 | 4,590 | 3.03125 | 3 | [] | no_license | use BD_2020
INSERT INTO Lekarze (Nr_licencji, Specjalizacja, Imi, Nazwisko)
VALUES (1111111, 'Kardiologia', 'Jan', 'Kowalski'),
(1111112, 'Neurologia', 'Jacek', 'Soplica'),
(1111113, 'Alergologia', 'Henryk', 'Sienkiewicz'),
(1111114, 'Diabetologia', 'Adam', 'Mickiewicz'),
(2222222, 'Endokrynologia', 'Zbi... | true |
b9f94afaccb450ed632d0644c8fd15bf80b93034 | SQL | pranavgoelcs/nepalmap_app | /sql/literacy.sql | UTF-8 | 23,899 | 2.90625 | 3 | [
"MIT"
] | permissive | --
-- PostgreSQL database dump
--
SET statement_timeout = 0;
SET lock_timeout = 0;
SET client_encoding = 'UTF8';
SET standard_conforming_strings = on;
SET check_function_bodies = false;
SET client_min_messages = warning;
SET search_path = public, pg_catalog;
ALTER TABLE IF EXISTS ONLY public.literacy_sex DROP CONSTR... | true |
0c79c43954145e8f941e7f9c231e3e52e09c8366 | SQL | jxdong1013/fish | /db/数据库脚本v1.4/v1.4/t_funcode_data.sql | UTF-8 | 16,564 | 3.015625 | 3 | [] | no_license | /*
Navicat MySQL Data Transfer
Source Server : 127.0.0.1
Source Server Version : 50624
Source Host : 127.0.0.1:3306
Source Database : fish
Target Server Type : MYSQL
Target Server Version : 50624
File Encoding : 65001
Date: 2015-08-16 10:35:44
*/
SET FOREIGN_KEY_CHECKS=0;
-- ----... | true |
abf8be1f3507e8f47000077b9d72a7116612af1d | SQL | ytxyt/xui | /db/schema/sqlite.sql | UTF-8 | 8,610 | 3.171875 | 3 | [] | no_license | -- XUI tables
CREATE TABLE routes (
id INTEGER PRIMARY KEY,
name VARCHAR NOT NULL,
description VARCHAR,
prefix VARCHAR,
length, INTEGER,
context VARCHAR,
dnc VARCHAR,
sdnc VARCHAR,
dest_type VARCHAR,
dest_uuid VARCHAR,
body TEXT,
created_epoch INTEGER DEFAULT (DATETIME('now', 'localtime')),
updated_epoch ... | true |
0e0802655aa790c6b0e4783614d83ede5094da12 | SQL | thiagozampieri/devPortal | /src/main/resources/db/migration/V20190108124026__execution_user.sql | UTF-8 | 862 | 3.34375 | 3 | [] | no_license | CREATE TABLE `execution_user` (
`id` BIGINT(20) NOT NULL AUTO_INCREMENT,
`uuid` varchar(42) NOT NULL,
`created_at` datetime NOT NULL,
`updated_at` datetime NULL,
`removed_at` datetime NULL,
`invoice_id` BIGINT(20) NULL,
`execution_id` BIGINT(20) NOT NULL,
`status_id` int(3) NOT NULL,
... | true |
4c62ccfa2c32009b7af8609e81a92996a4f0c132 | SQL | sejalv/customer_analytics_dwh_and_queries | /Customer_Analytics_Insights.sql | UTF-8 | 8,408 | 4.40625 | 4 | [] | no_license | -- Average Revenue Per User
WITH monthly_ARPM AS
(
SELECT
m.visit_month,
AVG(m.revenue) AS ARPU
FROM
(SELECT
uspm.user_id,
DATE_PART('MONTH', AGE('2014-03-01', transaction_ts)) AS visit_month,
SUM(amount) AS revenue
FROM transactions_fact tf
INNER JOIN User... | true |
a64349df5bb88028ada54c7af00db833d5e6079f | SQL | uriguri/class2020 | /SQL/2020-11-11.sql | UTF-8 | 8,584 | 4.5 | 4 | [] | no_license | -- 2020.11.11
-- JOIN
-- CROSS JOIN : 조건 없이 테이블과 테이블을 붙여준다
SELECT *
FROM emp, dept
;
-- ANSI JOIN : CROSS JOIN
SELECT *
FROM emp CROSS JOIN dept
;
-- Equi Join
select *
from emp, dept
where emp.deptno=dept.deptno
;
-- ANSI ->T1 Inner Join T2 ON 조인의 조건
SELECT *
FROM emp INNER JOIN dept
ON emp.deptno = dept.deptno
... | true |
248db8fad045fc3a3fa6954e2db7b2ba38023835 | SQL | hammadar/ECE656ProjectHRTScpp | /database_creation.sql | UTF-8 | 4,392 | 3.625 | 4 | [] | no_license |
DROP TABLE IF EXISTS connections;
DROP TABLE IF EXISTS contributors;
DROP TABLE IF EXISTS forum;
DROP TABLE IF EXISTS nameBasics;
DROP TABLE IF EXISTS posts;
DROP TABLE IF EXISTS principals;
DROP TABLE IF EXISTS ratings;
DROP TABLE IF EXISTS threads;
DROP TABLE IF EXISTS titleBasics;
DROP TABLE IF EXISTS t... | true |
4671175b46d70e803f5c6a6d8af3b4b14d0d4cb5 | SQL | Rodolphecordier/reservsalles | /sql/reservation.sql | UTF-8 | 1,848 | 3.484375 | 3 | [] | no_license | -- MySQL Script generated by MySQL Workbench
-- Tue Feb 6 10:09:25 2018
-- Model: New Model Version: 1.0
-- MySQL Workbench Forward Engineering
SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0;
SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0;
SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='TR... | true |
f855e7d2537a30b5ae2e7f4c7fc0ed4917fabc74 | SQL | aestasit/groupdo | /conf/evolutions/default/1.sql | UTF-8 | 2,564 | 3.484375 | 3 | [] | no_license | # --- Created by Ebean DDL
# To stop Ebean DDL generation, remove this comment and start using Evolutions
# --- !Ups
create table project (
id bigint not null,
name varchar(255),
creator_id bigint,
constraint pk_project primary key (id))
;
cre... | true |
60e2930d6ac0c84d4183b0ae6c6f5c47021047ce | SQL | hristinak97/webshop | /WebApplication2/database/SQLQuery1.sql | UTF-8 | 1,263 | 3.46875 | 3 | [] | no_license | create table kategorija(
id integer primary key,
ime varchar(50)
);
insert into kategorija(id,ime)values
(1,'Casual'),
(2,'Formal');
create table products(
id_image integer primary key,
content varchar(100),
cena integer,
id_kat integer,
constraint fk_products_to_kategorija foreign key (id_kat) references kate... | true |
4d33cad21dad053a410a5853a7562c08ddbb7f0c | SQL | tapdevops/custodian-web | /bps/public/logs/2018-09-25/4DARMAPRIHARTONI_20180925145043_ymwmtQxCl8g.sql | UTF-8 | 2,531 | 3.25 | 3 | [] | no_license | START : 2018-09-25 14:50:43
MERGE INTO TR_RKT_VRA_DISTRIBUSI VD
USING (
SELECT
R.PERIOD_BUDGET, HS.BA_CODE, R.ACTIVITY_CODE, I.SUB_COST_ELEMENT VRA_CODE, HS.AFD_CODE,
SUM(R.TOTAL_RP_SETAHUN/VS.VALUE) HM_KM,
MAX(VS.VALUE) PRICE_QTY_VRA,
SUM(R.TOTAL_RP_SETAHUN) PRICE... | true |
6e06485ecfedcdb7259069ecab601d4fdd76fe1a | SQL | fc2blog/blog | /app/db/0_initialize.sql | UTF-8 | 15,987 | 3.015625 | 3 | [
"MIT"
] | permissive | -- MySQL dump 10.18 Distrib 10.3.27-MariaDB, for debian-linux-gnu (x86_64)
--
-- Host: db Database: dev_fc2blog
-- ------------------------------------------------------
-- Server version 5.7.31
/*!40101 SET @OLD_CHARACTER_SET_CLIENT = @@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS = @@CHARACTE... | true |
405ccb3b28a4d32667b7174c7bdf26da5209d223 | SQL | hodoor6/MarlinOOPintensiv | /Components/testing/marlinoopcomponetsdatabase.sql | UTF-8 | 3,024 | 2.765625 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.8.5
-- https://www.phpmyadmin.net/
--
-- Хост: 127.0.0.1:3306
-- Время создания: Мар 05 2020 г., 20:32
-- Версия сервера: 5.6.43
-- Версия PHP: 7.3.2
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTE... | true |
6735927c8d5ea3d8d3806b2c36c0222110c5d35a | SQL | broach44/Northwind | /sales_figures_byCategory_TotalAmt_TotalItemsSold.sql | UTF-8 | 365 | 3.9375 | 4 | [] | no_license | select Categories.CategoryName, sum([Order Details].Quantity) as totalItemsSold, sum([Order Details].UnitPrice - ([Order Details].UnitPrice * [Order Details].Discount)) as totalSales
from Categories
join Products on Categories.CategoryID = Products.CategoryID
join [Order Details] on Products.ProductID = [Order Detail... | true |
f27eb768d97bb8d5e7b66499fd7db45ad3f2ff0f | SQL | saumya81/restromanagement | /restrodb.sql | UTF-8 | 7,191 | 3.046875 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Aug 28, 2020 at 11:04 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_CLIEN... | true |
0ca4bbf54d7ed43959bcf47958af8712914a7a6c | SQL | iathanasy/basement | /basement.sql | UTF-8 | 14,455 | 2.921875 | 3 | [] | no_license | /*
Navicat MySQL Data Transfer
Source Server : 111.231.205.82
Source Server Version : 50727
Source Host : 111.231.205.82:3306
Source Database : basement
Target Server Type : MYSQL
Target Server Version : 50727
File Encoding : 65001
Date: 2020-08-19 14:19:17
*/
SET FOREIGN_KEY_CHEC... | true |
1d30bc448e36a2e9e1e5c9d6bc145f8eaf8c6d1c | SQL | linoyohandybr/laravel-test-github | /lino-test/sql/lino_test 20170516 1642.sql | UTF-8 | 2,992 | 3.203125 | 3 | [
"MIT"
] | permissive | --
-- Script was generated by Devart dbForge Studio for MySQL, Version 7.2.58.0
-- Product home page: http://www.devart.com/dbforge/mysql/studio
-- Script date 5/16/2017 4:42:35 PM
-- Server version: 5.7.14
-- Client version: 4.1
--
--
-- Disable foreign keys
--
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_C... | true |
61a01aefde2446ebd49ea606aa564fdf31c2d26a | SQL | reale-nicolas/debondi | /resources/mysql_stored_procedures/sp_get_stops.sql | UTF-8 | 6,833 | 3.59375 | 4 | [
"MIT"
] | permissive | CREATE DEFINER=`homestead`@`%` PROCEDURE `get_stops_sp`(
IN p_latFrom FLOAT,
IN p_lngFrom FLOAT,
IN p_latTo FLOAT,
IN p_lngTo FLOAT,
IN p_distance DECIMAL(6,2))
BEGIN
-- Variables de control
DECLARE v_exist INT;
DECLARE v_continue INT;
DECLARE v_replace ... | true |
dabf6913f9b05843ecec7c002f2dc05bf3763170 | SQL | dheerajchand/designatedlands | /sql/create_outputs_prelim.sql | UTF-8 | 2,116 | 3.296875 | 3 | [
"Apache-2.0"
] | permissive | -- Copyright 2017 Province of British Columbia
--
-- Licensed under the Apache License, Version 2.0 (the "License");
-- you may not use this file except in compliance with the License.
-- You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or ... | true |
84b2fe2516b9e855ab20a115200ec627aa47029c | SQL | unirui/web | /Применение SQL/query19.sql | UTF-8 | 775 | 3.625 | 4 | [] | no_license | select
yemets_course.name as course_name,
yemets_course.hours,
yemets_special.name as special_name,
yemets_otdel.name as otdel_name,
yemets_day.name as day_name
from college.yemets_otdel
inner join college.yemets_special on yemets_otdel.otdel_id = yemets_special.otdel_id
inner join college.yemets_course on yemets_spec... | true |
e869727826224fedf54d3f1b4993fd204ada4e64 | SQL | markchen7788/LibraryManager | /源码/SQL脚本文件/源码.sql | UTF-8 | 5,368 | 4.21875 | 4 | [] | no_license | CREATE TABLE reader (
reader_id INT ( 10 ) PRIMARY KEY CHECK(reader_id LIKE '____%'),/*读者号必须大于4位*/
pwd VARCHAR ( 20 ) CHECK(pwd LIKE '____%')NOT NULL,/*密码必须大于4位*/
reader_name VARCHAR ( 10 ) NOT NULL,
reader_sex VARCHAR ( 2 ) NOT NULL CHECK (
reader_sex IN ( "男", "女" )),/*性别男或女*/
reader_tel VARCHAR ( 11 ) CHECK(re... | true |
291248bedb5c2c8c50a078c418e63f3e08008d5c | SQL | marusheep/sql-course | /249-Case_statement.sql | UTF-8 | 2,064 | 4.875 | 5 | [] | no_license | /* Exercise 1:
Similar to the exercises done in the lecture, obtain a result set containing the employee number,
first name, and last name of all employees with a number higher than 109990. Create a fourth column in the query,
indicating whether this employee is also a manager,
according to the data provided in the ... | true |
a597bc966665d54769a6256a7402ae6fccb5ac61 | SQL | RobRoseKnows/umbc-cs-projects | /umbc/CMSC/4XX/461/hws/hw3/hw3p6.sql | UTF-8 | 3,549 | 3.890625 | 4 | [] | no_license | create table book
(
`ISBN` varchar(13) not null,
`title` varchar(32) not null,
`year` numeric(4,0) not null,
`price` decimal(3,2) not null, check(`price` > 0),
`written_by` varchar(32) not null,
`published_by` varchar(32) not null... | true |
673bc397c6b5e778f3776c41f7b1fbff43eacc99 | SQL | marcosyamashita/SisVendas | /Database/migrations/1593605143_cria_tabela_de_empresas.sql | UTF-8 | 308 | 2.703125 | 3 | [] | no_license |
-- Copiando estrutura para tabela syst.empresas
CREATE TABLE IF NOT EXISTS `empresas` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`nome` varchar(50) NOT NULL,
`created_at` timestamp NOT NULL,
`updated_at` timestamp NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1;
| true |
46962c18d9f42ee266ad97e3886cf725e8a1b2a8 | SQL | alaandho/Car-Dealership-SQL-Project | /insert-car-dealership-database.sql | UTF-8 | 2,222 | 2.84375 | 3 | [] | no_license | INSERT INTO salesperson(
salesperson_id,
first_name,
last_name,
office_number,
email
)VALUES
(101,
'Dave',
'Shin',
111-222-3333,
'daveshin@temple.com'),
(102,
'Aaron',
'Abar',
222-333-4444,
'aaronabar@temple.com'),
(103,
'Richie',
'Robles',
333-444-5555,
'richierob@temple.com');
INSERT INTO cust... | true |
0349e0f5ca1119f6a3b40e6156ddb8c415feb898 | SQL | CrisDimacali/sql-challenge | /queries.sql | UTF-8 | 2,588 | 4.5625 | 5 | [] | no_license | --Create Tables
CREATE TABLE departments(
dept_no VARCHAR(5) NOT NULL,
dept_name VARCHAR(20) NOT NULL
);
CREATE TABLE titles(
title_id VARCHAR(5) NOT NULL,
title VARCHAR(20) NOT NULL);
CREATE TABLE employees(
emp_no INT,
emp_title_id VARCHAR(6) NOT NULL,
birth_date DATE,
first_name VARCHAR(20) NOT NULL,
las... | true |
5d3eb49a394de31f88c12114cca113836a3199fc | SQL | kensodemann/car-show-ballot-box-api | /scripts/create-car-classes.sql | UTF-8 | 2,225 | 3.578125 | 4 | [] | no_license | CREATE TABLE IF NOT EXISTS car_classes (
ID INTEGER NOT NULL,
NAME TEXT NOT NULL,
DESCRIPTION TEXT NOT NULL,
ACTIVE BOOLEAN NOT NULL,
CONSTRAINT car_classes_pk PRIMARY KEY (ID)
);
WITH data AS (
SELECT 1 AS ID, 'A' AS NAME, 'Antique through 1954, Cars & Trucks' AS DESCRIPTION, true AS ACTIVE
UNION ALL
... | true |
52ddcd8a385819828a30bcda425961ecb070252c | SQL | aikawarazu/eclipseGit | /New folder/SqlScript/CreateScript.sql | UTF-8 | 1,243 | 3.265625 | 3 | [] | no_license | --<ScriptOptions statementTerminator=";"/>
CREATE TABLE classes (
classId INT NOT NULL,
className VARCHAR(255) NOT NULL,
PRIMARY KEY (classId)
) ENGINE=InnoDB;
CREATE TABLE student_course (
stuId INT NOT NULL,
course_id INT NOT NULL,
PRIMARY KEY (stuId,course_id)
) ENGINE=InnoDB;
CREATE TABLE person (
PERSON_... | true |
f6d9b0e2bcd0ab6e39db39cff4e307bf13e40d65 | SQL | kyleyu23/Movies-and-Fiftyville | /fiftyville/log.sql | UTF-8 | 4,505 | 3.796875 | 4 | [] | no_license | -- Keep a log of any SQL queries you execute as you solve the mystery.
select description from crime_scene_reports where year = 2020 and month = 7 and day = 28 and street = "Chamberlin Street";
--Theft of the CS50 duck took place at 10:15am at the Chamberlin Street courthouse. Interviews were conducted today with thre... | true |
d6a05791e6a0e2a778d933bcdae9b92fd2696158 | SQL | kino0104/mygallery | /sql/20140803_create_users.sql | UTF-8 | 697 | 3.609375 | 4 | [] | no_license | CREATE TABLE users (
id VARCHAR(100) PRIMARY KEY,
username VARCHAR(100) NOT NULL UNIQUE,
password VARCHAR(32) NOT NULL,
salt VARCHAR(32) NOT NULL,
sid VARCHAR(32) NOT NULL UNIQUE,
session_expires_at DATETIME NOT NULL,
created_at DATETIME NOT NULL,
updated_at TIMESTAMP NOT NULL
);
ALTER TABLE photos ADD... | true |
067ecbe8e14f682f16b159aa48b57c97957a1824 | SQL | molokovskikh/af_admininterface | /migrations/701_00_addWaybillExclude.sql | UTF-8 | 383 | 3.375 | 3 | [] | no_license |
create table usersettings.WaybillExcludeFile (
Id INTEGER UNSIGNED NOT NULL AUTO_INCREMENT,
Mask VARCHAR(255),
Supplier INTEGER UNSIGNED,
primary key (Id)
);
alter table usersettings.WaybillExcludeFile add index (Supplier), add constraint FK_usersettings_WaybillExcludeFile_Supplie... | true |
77709c7b180a228cec142893a555f51a9e2cb4c0 | SQL | anggerari/data-mining-decision-tree | /datasets (2).sql | UTF-8 | 230,409 | 2.828125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.8.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Aug 03, 2019 at 04:25 PM
-- Server version: 10.1.37-MariaDB
-- PHP Version: 7.3.1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD... | true |
0e9a76980372725fa9589983294c338ff8a844f5 | SQL | ahmadtechcampus2/ahmad4 | /برنامج الامين المحاسبي/Bin/System/prcGetChildCost.sql | UTF-8 | 357 | 2.859375 | 3 | [] | no_license | #########################################################
CREATE PROCEDURE prcGetChildCost
@CostPtr AS [UNIQUEIDENTIFIER]
AS
SET NOCOUNT ON
SELECT
[CoGUID] AS [Number],
[CoCode] As [Code],
[CoName] AS [Name],
[CoParent] AS [Parent]
FROM
[vwCo]
WHERE
[CoParent] = @CostPtr
#########################... | true |
237f963acdca5faf9f088c243c4089780bf7de49 | SQL | swarm64/s64da-benchmark-toolkit | /benchmarks/tpch/schemas/psql_native_partitioned_date_week/foreign-keys.sql | UTF-8 | 1,075 | 2.9375 | 3 | [
"MIT"
] | permissive | ALTER TABLE ONLY customer
ADD CONSTRAINT customer_nation_fk FOREIGN KEY (c_nationkey) REFERENCES nation(n_nationkey);
ALTER TABLE lineitem
ADD CONSTRAINT lineitem_partsupp_fk FOREIGN KEY (l_partkey, l_suppkey) REFERENCES partsupp(ps_partkey, ps_suppkey);
ALTER TABLE lineitem
ADD CONSTRAINT lineitem_part_fk ... | true |
2e435b8339fc89936789d8ed03f550ff22ea38e1 | SQL | GunterMueller/Dimensional_Data_Warehousing | /scripts/production_regular_23.sql | UTF-8 | 1,943 | 3.75 | 4 | [] | no_license | /*********************************************************************/
/* */
/* production_regular_23.sql */
/* */
/***********... | true |
18ab77065d43d790f2b5455870a379837819f033 | SQL | masonsherbondy/database-exercises | /joins_exercise.sql | UTF-8 | 6,891 | 4.46875 | 4 | [] | no_license | /*
Create a file named join_exercises.sql to do your work in.
Join Example Database
1. Use the join_example_db. Select all the records from both the users and roles tables.
2. Use join, left join, and right join to combine results from the users and roles tables as we did in the lesson. Before you run each query, gu... | true |
00303deed0fcfd0c52335c6dc10273f0cbf0a568 | SQL | WereDouglas/weather | /DB/weather(8).sql | UTF-8 | 4,008 | 2.734375 | 3 | [
"LicenseRef-scancode-unknown-license-reference",
"MIT"
] | permissive | -- phpMyAdmin SQL Dump
-- version 3.5.1
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Jan 04, 2016 at 10:30 AM
-- Server version: 5.5.24-log
-- PHP Version: 5.4.3
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;... | true |
5e4020a64539c9e93ebdf7ce977b0953d082dc6f | SQL | mayur-suryawanshi/Railway-Management-System | /project.sql | UTF-8 | 7,465 | 3.3125 | 3 | [] | no_license | create database Project;
use Project;
CREATE TABLE `Account` (
`Username` varchar(15) NOT NULL,
`Password` varchar(20) NOT NULL,
`Email_Id` varchar(35) NOT NULL,
`Address` varchar(50) DEFAULT NULL,
PRIMARY KEY (`Username`)
);
INSERT INTO `Account` VALUES ('ajitesh','eba094d4d15bc478cdc9','ajitesh@pes.edu','Ol... | true |
7d5c24acc2a580814b16582bfb0c0b667897969a | SQL | misdanwijaya/PenilaianKapabilitas | /sql/nillai.sql | UTF-8 | 313 | 2.59375 | 3 | [] | no_license | CREATE TABLE IF NOT EXISTS `nilai` (
`id` int(11) NOT NULL,
`type` varchar(1) NOT NULL,
`nilai` int(1) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=latin1;
INSERT INTO `nilai` (`id`, `type`, `nilai`) VALUES
(1, 'A', 5),
(2, 'B', 4),
(3, 'C', 3),
(4, 'D', 2),
(5, 'E', 1); | true |
0af23a9c263808eb044e3ce985b05f3f7e727b7c | SQL | code-pride/DailyAdvisor-API | /src/main/resources/static/db/create_tables.sql | UTF-8 | 22,173 | 3.265625 | 3 | [] | no_license | -- MySQL dump 10.13 Distrib 5.7.17, for Win64 (x86_64)
--
-- Host: localhost Database: daily_advisor
-- ------------------------------------------------------
-- Server version 5.7.20-log
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESUL... | true |
c1ff1c5dc1fb4b5faa25f436c22328b316798abe | SQL | jangocheng/workweixin | /services/todosrv/DDL/todo_event.sql | UTF-8 | 613 | 3.75 | 4 | [] | no_license | CREATE TABLE `todo_list` (
`id` bigint unsigned NOT NULL AUTO_INCREMENT,
`user_id` varchar(256) NOT NULL DEFAULT '0' COMMENT 'users 表关联',
`todo_name` varchar(512) NOT NULL DEFAULT '' COMMENT 'todo事件',
`create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
`finish_time` datetime NOT NULL DEFAULT ... | true |
96ed9f924a4f5af227a3b281239a35a209496424 | SQL | carlossm50/SoporteDistrital | /Data Base/de0707.sql | UTF-8 | 17,470 | 3.171875 | 3 | [] | no_license | /*
SQLyog Community Edition- MySQL GUI v8.01
MySQL - 5.1.30-community : Database - de0707
*********************************************************************
*/
/*!40101 SET NAMES utf8 */;
/*!40101 SET SQL_MODE=''*/;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/... | true |
c99cefe6cbc04c43b4d5a3ec6962ec98338b6095 | SQL | OHDSI/WebAPI | /src/main/resources/resources/cohortresults/sql/raw/getTotalDistinctPeople.sql | UTF-8 | 111 | 2.65625 | 3 | [
"Apache-2.0"
] | permissive | select count(distinct SUBJECT_ID) total_people
from @tableQualifier.cohort
where cohort_definition_id in (@id)
| true |
7cf7b2bc23c231120ae6c4b0673e59e8b3691326 | SQL | complitex/complitex | /osznconnection/osznconnection-db/update/0.1/20110422_661_0.1.14.sql | UTF-8 | 859 | 3.53125 | 4 | [] | no_license | -- Deletes dublicate street corrections
CREATE TABLE `dublicate_street_correction`(
`id` BIGINT(20) NOT NULL
) ENGINE=InnoDB CHARSET=utf8 COLLATE=utf8_unicode_ci;
INSERT INTO dublicate_street_correction SELECT s1.`id` FROM `street_correction` s1
JOIN `street_correction` s2 ON (s1.`parent_id` = s2.`parent_id` AND ... | true |
6f635dcc10ed5759a892ae151777d668cef50075 | SQL | KTingLee/Python100D | /100D_SQL/Day36-40/MySQL_Learning/DataBase/DB_School.sql | UTF-8 | 5,168 | 4.1875 | 4 | [] | no_license | -- 判斷是否存在 school 的資料庫,若有則刪除
DROP Database if exists school;
-- 建立 school 資料庫,預設其編碼為 utf-8,而排序方式為 utf8_bin
-- utf8_bin 是讓字串能以二進制方式判斷,這樣搜尋字串時便可以區分大小寫
CREATE Database school DEFAULT CHARSET utf8 COLLATE utf8_bin;
-- 切換到 school 資料庫
USE school;
-- 建立學院資料表
CREATE Table tb_college
(
collid int not null auto_increment comme... | true |
c503537b640488c1afcaa2038cb81bed78b7a6e0 | SQL | freeman9998/MyCoding | /Itwill/99.PROJECT/00.프로젝트자료/FINAL_PROJECT/[2020-10]-JAVA-PYTHON/국밥부장관/DOC/2.projectGukbap.ddl | UTF-8 | 8,129 | 3.171875 | 3 | [] | no_license | DROP TABLE chat_content CASCADE CONSTRAINTS;
DROP TABLE chat CASCADE CONSTRAINTS;
DROP TABLE wishlist CASCADE CONSTRAINTS;
DROP TABLE review CASCADE CONSTRAINTS;
DROP TABLE order_detail CASCADE CONSTRAINTS;
DROP TABLE gukbap_order CASCADE CONSTRAINTS;
DROP TABLE userAddress CASCADE CONSTRAINTS;
DROP TABLE address CASCA... | true |
aa23d0f9780298b8183293717aaaf879d8ab6561 | SQL | jo-soomin/Kh-SemiProject | /SEMI_1team/src/member/mentee/exercise/total/db/Total.sql | UTF-8 | 2,360 | 4.1875 | 4 | [] | no_license | DROP TABLE MENTEE_EXERCISE_TOTAL;
--ID가 유니크이면 데이터 한 행 밖에 저장 안됨
CREATE TABLE MENTEE_EXERCISE_TOTAL(
TOTAL_DATE VARCHAR2(200) NOT NULL,
ID VARCHAR2(200) NOT NULL,
TOTAL_DAYOFWEEK VARCHAR2(200) ,
TOTAL_TIME VARCHAR2(200) ,
TOTAL_CALORY NUMBER ,
T... | true |
c62048370225f4940f5d1d7def1613939893cfb7 | SQL | akshay-madar/codestack | /Leetcode/Database/average_selling_price.sql | UTF-8 | 454 | 4.3125 | 4 | [] | no_license | select a.product_id,
round(sum(a.units*b.price)/sum(a.units),2) as average_price
from unitssold a, prices b
where a.product_id = b.product_id and
a.purchase_date between b.start_date and b.end_date
group by a.product_id;
select unitssold.product_id,
round(sum(units*price)/sum(units), 2) average_price
from unitssold, p... | true |
72a01eef53283cdeac69548679f05332a37dbf71 | SQL | Shogun89/LeetCode | /SQL/Delete Duplicate Emails.sql | UTF-8 | 132 | 3.03125 | 3 | [] | no_license | # Write your MySQL query statement below
Delete E1 FROM Person E1 INNER JOIN Person E2
Where E1.Email=E2.Email and E1.Id > E2.Id
| true |
58d89a55e3f55b81cdd263e047f96bd691a58d3d | SQL | fireflyg/TestMyBlog | /db/myblog.sql | UTF-8 | 3,720 | 3.65625 | 4 | [] | no_license | /*
Navicat Premium Data Transfer
Source Server : localhost
Source Server Type : MySQL
Source Server Version : 50731
Source Host : localhost:3306
Source Schema : myblog
Target Server Type : MySQL
Target Server Version : 50731
File Encoding : 65001
Date: 30/10/2020 20:... | true |
b6805ddb55c580832b243cb80ec5bc9f518cfceb | SQL | DpadamsX/DpadamsX | /types_plus/domo_passthrough_v2/domo_passthrough_v2_view.sql | UTF-8 | 699 | 2.59375 | 3 | [] | no_license | -- Create a view onto domo_passthrough formatted as domo_passthrough_v2.
-- If domo_passthrough changes, you can update the view to handle the modification smoothly.
-- Note: This view is automatically a custom type, with an array type to match. See types_plus.insert_domo_passthrough_v2.
DROP VIEW IF EXISTS types_plus... | true |
2ba65bdd94bcc0ae50a5f5c8ac2623290241ba15 | SQL | marvinamorim/apexei_test | /ddl/TABLE_ENDERECO_ARMAZENAGEM.sql | UTF-8 | 505 | 2.828125 | 3 | [] | no_license | CREATE TABLE "WMS"."ENDERECO_ARMAZENAGEM"
( "ID" NUMBER NOT NULL ENABLE,
"ENDERECO_ID" NUMBER,
"ARMAZENAGEM_ID" NUMBER,
CONSTRAINT "ENDERECO_ARMAZENAG_ID_PK" PRIMARY KEY ("ID")
USING INDEX ENABLE,
CONSTRAINT "ENDERECO_ARMAZE_ENDERECO_ID_FK" FOREIGN KEY ("ENDERECO_ID")
REFERENCES "WMS"."ENDERECO" ("I... | true |
3ff5b1f721afbe90eebf8e675643563682ca6206 | SQL | khalil-hassayoun/holbertonschool-higher_level_programming | /0x0E-SQL_more_queries/12-no_genre.sql | UTF-8 | 272 | 3.640625 | 4 | [] | no_license | -- grabs titles with no genre linked
SELECT tv_shows.title, tv_show_genres.genre_id FROM tv_shows
LEFT JOIN tv_show_genres
ON tv_shows.id = tv_show_genres.show_id
WHERE genre_id IS NULL
ORDER BY tv_shows.title ASC, tv_show_genres.genre_id ASC;
| true |
4ae26c6329bd4132a86920a45df5f71c9f7d298f | SQL | RyanTech/yueji | /tools/db/yueji/rman.sql | UTF-8 | 2,958 | 2.78125 | 3 | [] | no_license | -----------------------------------------------------------------
--rman 备份脚本
-----------------------------------------------------------------
--启用块更改跟踪文件,提高RMAN增量备份性能
alter database enable block change tracking using file '/opt/oracle_11/app/block_change/yueji_block_change.bctf';
CONFIGURE BACKUP OPTIMIZATION ON;
CO... | true |
a356492227936261f5b8602943fd05ec4d33dc1d | SQL | maritskode/Oppdatert-personaldata | /SQL/SQLQueryGetAdressByPostnumber.sql | ISO-8859-15 | 708 | 3.5625 | 4 | [] | no_license | -- =============================================
-- Author: <Author, Marit Irene Sandanger,>
-- Create Date: <Create Date, 24.10.2018, >
-- Description: <Description, Denne prosedyren soeker
-- gjennom tabellen dbo.Adressetabell og returnerer alle kolonnene tilhrende
-- dette Postnummeret som er lik innpar... | true |
a6973374f21e745e49eb41f241182302f253cf46 | SQL | TsvetomirAleksandrov/Software-University | /Databases Basics - MS SQL Server - May 2020/05.DataAggregation/05.DataAggregation/06.DepositsSumForOllivanderFamily.sql | UTF-8 | 163 | 2.953125 | 3 | [] | no_license | SELECT wd.DepositGroup,
SUM(wd.DepositAmount) AS [TotalSum]
FROM WizzardDeposits wd
WHERE wd.MagicWandCreator = 'Ollivander family'
GROUP BY wd.DepositGroup | true |
94308db78d8580e2dd8bada53e3d3c451000ab95 | SQL | Misbah-Swaleheen/Ecommerce-Website | /mydatabase (1).sql | UTF-8 | 4,921 | 3.21875 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 5.0.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Jul 08, 2021 at 10:48 PM
-- Server version: 10.4.17-MariaDB
-- PHP Version: 7.3.25
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIE... | true |
c57b2424a76a4a60e58577380d5327f1a36dab4a | SQL | alefa-digital/cnc | /sql/adherents_sas_to_postgres.sql | UTF-8 | 1,520 | 3.078125 | 3 | [] | no_license | /*
Script d'importation du fichier CSV : ADHERENTS.csv
- Création de la table des adhérents
*/
DROP TABLE IF EXISTS public.ADHERENTS ;
CREATE TABLE public.ADHERENTS (
"NUMADHER" integer NOT NULL PRIMARY KEY,
"NOM1" text DEFAULT NULL,
"NOM2" text DEFAULT NULL,
"ADR1" text DEFAULT NULL,
"ADR2" text DEFAU... | true |
2179fbff1f40cbea4f1bf5aa3ed757956ffce00c | SQL | ieiayaobb/leetcode | /176.第二高的薪水.sql | UTF-8 | 236 | 2.96875 | 3 | [] | no_license | --
-- @lc app=leetcode.cn id=176 lang=mysql
--
-- [176] 第二高的薪水
--
# Write your MySQL query statement below
select IFNULL((select distinct(Salary)
from Employee
order by Salary desc
limit 1,1),null) as SecondHighestSalary
| true |
a129003cc6ec753743457417b949f2f56e5d1f9f | SQL | mirostanchev/SoftUni-Software-Engineering | /Databases-Basics/Functions and Procedures/10. People with Balance Higher Than.sql | UTF-8 | 257 | 3.625 | 4 | [] | no_license | CREATE PROC usp_GetHoldersWithBalanceHigherThan @Number DECIMAL(15,2)
AS
BEGIN
SELECT ah.FirstName,ah.LastName FROM Accounts AS a
JOIN AccountHolders AS ah
ON ah.Id = a.AccountHolderId
GROUP BY ah.FirstName,ah.LastName
HAVING SUM(Balance) > @Number
END | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.