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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
13a62c4de55aab9a10ebd99e98fbb27c6d00f475 | SQL | CodyGirl/Settlement-Project | /exportreport.sql | UTF-8 | 1,823 | 3.28125 | 3 | [] | no_license | --------------------------------------------------------
-- File created - Sunday-September-08-2019
--------------------------------------------------------
--------------------------------------------------------
-- DDL for Table REPORT
--------------------------------------------------------
CREATE TABL... | true |
6815421a120306ed8df3b951df6600c62d620d2a | SQL | jamesjonesmath/canvancement | /canvas-data/mysql/create_canvas_data.sql | UTF-8 | 69,930 | 3.390625 | 3 | [
"ISC"
] | permissive | # MySQL script to create database for Canvas Data schema version 4.2.2
SET default_storage_engine=InnoDB;
SET GLOBAL innodb_file_per_table=1;
DROP DATABASE IF EXISTS canvas_data;
CREATE DATABASE IF NOT EXISTS canvas_data DEFAULT CHARACTER SET utf8mb4;
USE canvas_data;
SET NAMES utf8mb4;
CREATE TABLE IF NOT EXISTS cours... | true |
e009304b07a70502cb3a32cce7dc3ae462edc273 | SQL | iDale2141/TCA_IS | /users.sql | UTF-8 | 5,561 | 3.140625 | 3 | [
"LicenseRef-scancode-unknown-license-reference",
"MIT"
] | permissive | /*
Navicat MySQL Data Transfer
Source Server : localhost
Source Server Version : 50724
Source Host : 127.0.0.1:3306
Source Database : tca_sis
Target Server Type : MYSQL
Target Server Version : 50724
File Encoding : 65001
Date: 2019-12-02 08:31:47
*/
SET FOREIGN_KEY_CHECKS=0;
-- -... | true |
c7e62d85bd36192f8eb4b39e5f5198049026fa0f | SQL | ReDisKaRed/Hometasks_Artezio | /Lesson_9/task_3.sql | UTF-8 | 432 | 3.921875 | 4 | [] | no_license | CREATE TABLE IF NOT EXISTS communication (
chief_id INT,
inferior_id INT
);
INSERT INTO communication(chief_id, inferior_id) VALUES (1, 2), (1, 3), (3, 1), (4, 3);
SELECT chief.first_name AS chief_name, chief.last_name, inf.first_name AS inferior_name, inf.last_name
FROM people AS chief
INNER JOIN communication ON chie... | true |
164b678e1052e0d153430ef19ab03149ed84c9fe | SQL | alenaswann/Pewlett-Hackard-Analysis | /schema.sql | UTF-8 | 4,132 | 4.46875 | 4 | [] | no_license | -- Creating tables for PH-EmployeesDB
CREATE TABLE departments (
dept_no VARCHAR(4) NOT NULL,
dept_name VARCHAR(40) NOT NULL,
PRIMARY KEY (dept_no),
UNIQUE (dept_name)
);
CREATE TABLE employees (
emp_no INT NOT NULL,
birth_date DATE NOT NULL,
first_name VARCHAR NOT NULL,
last_name VARCHAR NOT NULL,
gender VAR... | true |
793e1cae75458d3f9bc74268b6dac7bd4030b6bb | SQL | yunsite/prophet-pku-eecs | /db_script.sql | UTF-8 | 398 | 2.84375 | 3 | [] | no_license | delimiter //
set names utf8 //
create database if not exists Weibo_DB default CHARSET=utf8 //
use Weibo_DB //
# weiboInfo
# Use index when needed
create table if not exists weiboInfo (w_id varchar(50) not null, time datetime, text varchar(300),
u_id varchar(20), u_name varchar(40), rep_cnt int, cmt_cnt... | true |
0f644f68c02f4a1cc259820c6822516ff042a4ff | SQL | AndrewEastwood/mpws | /schema/patch/6.sql | UTF-8 | 5,551 | 2.859375 | 3 | [] | no_license | ALTER TABLE `shop_products` CHANGE `ExternalKey` `ExternalKey` VARCHAR(600) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL;
ALTER TABLE `shop_products` CHANGE `Model` `Model` VARCHAR(50) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL;
ALTER TABLE `shop_products` CHANGE `SKU` `SKU` VARCHAR(50) CHARACTER SET utf8 CO... | true |
28d41bb1dd59cb3eaebd52f633daf093ba879da4 | SQL | prokawsar/HomoeoRemedy | /HomoeoRemedy/database.sql | UTF-8 | 5,002 | 3.3125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.7.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Nov 14, 2017 at 08:12 AM
-- Server version: 10.1.28-MariaDB
-- PHP Version: 7.1.11
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OL... | true |
408d625509caaf0ffa06fddb0c6dcdbbf3ebc831 | SQL | TheChanec/mcs.repository | /Database/dbo/Stored Procedures/Procs3/sp_Templates_TemplateFields_GetByTemplateID.sql | UTF-8 | 453 | 3.078125 | 3 | [] | no_license |
CREATE procedure dbo.sp_Templates_TemplateFields_GetByTemplateID
@Template_id bigint
as
set transaction isolation level read uncommitted
select *
from dbo.Templates with (nolock)
where template_id = @Template_id
select TemplateFields.*,maint_codes.[desc] maintenancecode
from dbo.TemplateFields with (nolo... | true |
e7ae1bc4088e37f8abd64c5eea03d2873547c0f8 | SQL | JianshenZhu/CS3380Group14 | /group14/CreateTables_G14.sql | UTF-8 | 4,592 | 3.703125 | 4 | [] | no_license | -- Group 14 CREATE TABLE statements
DROP TABLE IF EXISTS Destination;
DROP TABLE IF EXISTS Departure;
DROP TABLE IF EXISTS Location;
DROP TABLE IF EXISTS EngineHistory;
DROP TABLE IF EXISTS Reservation;
DROP TABLE IF EXISTS Equipment;
DROP TABLE IF EXISTS ConductorHistory;
DROP TABLE IF EXISTS EngineerHistory;
DROP TA... | true |
5692a789fa1e8a66dc8e065371be15bdb4114318 | SQL | rwbk/acmewidgetco | /sql/awc_dev.sql | UTF-8 | 2,863 | 3.25 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.9.7deb1
-- https://www.phpmyadmin.net/
--
-- Host: localhost:3306
-- Generation Time: Oct 15, 2021 at 03:04 PM
-- Server version: 10.5.12-MariaDB-0ubuntu0.21.04.1
-- PHP Version: 8.0.11
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+... | true |
06d647fd96066b41d321329742c1fc4934287fef | SQL | gqgonzales/daily-journal-server | /dailyjournal.sql | UTF-8 | 1,584 | 3.46875 | 3 | [] | no_license | CREATE TABLE IF NOT EXISTS `Entries` (
`id` INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
`entry_date` DATE NOT NULL,
`concept` TEXT NOT NULL,
`body` TEXT NOT NULL,
`mood_id` INTEGER NOT NULL,
FOREIGN KEY(`mood_id`) REFERENCES `Moods`(`id`)
);
CREATE TABLE IF NOT EXISTS `Moods` (
`id` INTEGER ... | true |
2d25858897696f1fb0fb7510f1885d5c2e463bed | SQL | Lowari/merise | /partie3.sql | UTF-8 | 4,317 | 3.5 | 4 | [] | no_license | CREATE TABLE Specialite(
id Int Auto_increment NOT NULL ,
specialite Varchar (50) NOT NULL
,CONSTRAINT Specialite_PK PRIMARY KEY (id)
)ENGINE=InnoDB;
#------------------------------------------------------------
# Table: Medecins
#------------------------------------------------------------... | true |
71a319b3fc1c2003fde57b8ac41e16d7d9ebfe2c | SQL | ichaeeun/javaexp | /javaexp/database/a20_db_modeling.sql | UTF-8 | 7,799 | 4.03125 | 4 | [] | no_license | /*
# 데이터베이스 modeling(설계)
1. 생각해봅시다.
1) 설계란 어떤 작업을 하는 것인가?
건축, 물품 제작의 기초 작업으로 뼈대를 구성한다.
database 설계도 화면에 나타날 데이터를 효과적으로 처리하기 위한
기본 구성 처리 작업..
2) DATABASE 설계가 프로그램에서 어떤 역할을 하는가?
웹프로그래밍
- front end
- back end
프로그래밍
- app
- db연동해서 데이터 출력 처리 (**)
데이터를 효과적으로 출력하고, 저장 관리를 위한 것이 DB설계이다.
... | true |
75b6f2f2838cfdc640bf8dff87cba98e11a60464 | SQL | ViktorOhrberg/FroSidanSolution | /FrosidanDB/AccessoriesData.sql | UTF-8 | 1,935 | 2.953125 | 3 | [] | no_license | insert into Products ([Quantity], [SubCategory], [Category], [Description], [ThumbRef], [ImgRef], [Balance], [TempPrice], [Price], [Name])
values
(
6,
'Miniväxthus',
'Accessories',
'Ett enkelt, men stabilt miniväxthus till ett mycket bra pris.',
'minivaxthus-liten-svartsmall.jpg',
'minivaxthus-liten-svart.jpg',
... | true |
aa459c561f2b26f6024d43176de5716ce6e59e2a | SQL | ywnswdza/maven_project | /core-web/src/main/java/com/losy/userinfo/sql/UserInfoRolesCreateTable.sql | UTF-8 | 221 | 2.6875 | 3 | [] | no_license | DROP TABLE IF EXISTS `t_sys_user_roles`;
CREATE TABLE `t_sys_user_roles` (
id INT(11) NOT NULL PRIMARY KEY AUTO_INCREMENT,
roleId INTEGER(11) comment '角色名称',
userId INTEGER(11) comment '用户名称'
); | true |
58bac114e9fe84833d5c576ed0be63a3ef0c1433 | SQL | MichaelErichsen/Java_tools | /Gedcom/src/net/myerichsen/dbutil/gedcomDerby.ddl | UTF-8 | 2,033 | 3.625 | 4 | [] | no_license | -- ============================
-- This file was created using Derby's dblook utility.
-- Timestamp: 2011-11-19 11:02:54.913
-- Source database is: C:\DerbyDB\gedcom
-- Connection URL is: jdbc:derby:C:\DerbyDB\gedcom
-- appendLogs: false
-- set DERBY_HOME="C:\Program Files\Apache\db-derby-10.8.2.2-bin"
-- ja... | true |
d5b58509db10811d1e09968507638c70bceaad9f | SQL | johnbcable/UoB | /SQL/Oracle/ALTAHRN/AnalyseWorkLink.sql | UTF-8 | 7,235 | 3.46875 | 3 | [] | no_license | CREATE OR REPLACE FUNCTION AnalyseWorkLink
RETURN NUMBER
IS
-- Declare cursor to fetch each matched Worklink record in sequence
-- Matched record will have a non-null AltaPersonCode
CURSOR c1 is
SELECT STUDENTID, TRIM(STUDENTFORENAME), TRIM(STUDENTSURNAME), TRIM(STUDENTNINO), TRUNC(STUDENTDOB), TRIM(STUD... | true |
2883c2f94d099078b5d3632d6c608f919fcbc80f | SQL | RohithaS/W205 | /Final_Project/Analysis/pears.sql | UTF-8 | 146 | 2.828125 | 3 | [] | no_license | # correlation between distance and arrival delay
SELECT CORR(CAST(DISTANCE AS DOUBLE),
CAST(ARR_DELAY AS DOUBLE))
FROM airline;
| true |
74be2fb7ef6c725bde91637498263f7688bc7029 | SQL | redhotpenguin/HSLF | /private/sql/alter_44.sql | UTF-8 | 371 | 2.625 | 3 | [] | no_license | ALTER TABLE push_message ADD FOREIGN KEY (tenant_id) REFERENCES tenant (id) ON UPDATE CASCADE ON DELETE CASCADE;
ALTER TABLE push_message DROP CONSTRAINT push_message_payload_id_fkey1;
ALTER TABLE payload DROP CONSTRAINT share_payload_tenant_id_fkey CASCADE;
ALTER TABLE payload DROP CONSTRAINT share_payload_pkey CAS... | true |
8576f9fb7e32f99a1dcb51a36669e55136763a41 | SQL | nedvelkov/Csharp_SoftUni | /Database/Ex.3/Problem.1.sql | UTF-8 | 473 | 3.828125 | 4 | [] | no_license | CREATE DATABASE TableRelations
USE TableRelations
CREATE TABLE Persons
(
Id int IDENTITY NOT NULL,
FirstName NVARCHAR(50) NOT NULL,
Salary DECIMAL(8,2) NOT NULL,
PassportID INT UNIQUE,
CONSTRAINT PK_Persons PRIMARY KEY (Id)
)
CREATE TABLE Passports(
PassportID int IDENTITY(101,1) NOT NULL,
PassportNumber VARC... | true |
364c13ca2668f8b23a55c6d3b8f119ec7565227b | SQL | gregmanco/Bamazon | /Bamazon.sql | UTF-8 | 1,403 | 3.953125 | 4 | [] | no_license | -- Drops the bamazon_db if it exist currently. --
DROP DATABASE IF EXISTS bamazon_db;
-- Creates new database called bamazon_db --
CREATE DATABASE bamazon_db;
-- Iniates use of the bamazon_db
USE bamazon_db;
-- Creates a table called products
CREATE TABLE products (
item_id INTEGER(10) AUTO_INCREMENT NOT NULL,
-- M... | true |
17282fef602752332b1bf3c4b7e057727d4a7c6d | SQL | Jroa/php | /garage/scripts/03_usp_reservasdeusuario.sql | UTF-8 | 670 | 3.71875 | 4 | [] | no_license | -- --------------------------------------------------------------------------------
-- Routine DDL
-- Note: comments before and after the routine body will not be stored by the server
-- --------------------------------------------------------------------------------
DELIMITER $$
CREATE DEFINER=`root`@`localhost` PROC... | true |
53ab934af248c071df4504250205410db7259fb8 | SQL | SirCaptainMitch/pytest_samples | /sql/select_by_transaction_dates.sql | UTF-8 | 908 | 4.59375 | 5 | [] | no_license | -- FIRST / LAST
SELECT DISTINCT ct.CustomerId
,FIRST_VALUE(ct.TransactionDate) OVER ( ORDER BY ct.CustomerId ) FirstTransaction
,LAST_VALUE(ct.TransactionDate) OVER ( ORDER BY ct.CustomerId ) LastTransaction
FROM sales.CustomerTransactions ct
WHERE 1=1
-- AND ct.CustomerId = 925
-- MIN / MAX
SELECT DISTINCT... | true |
4160ffcf021a8d79c9dcf6265f2017a927673bd9 | SQL | 4Science/DSpace | /dspace-api/src/main/resources/org/dspace/storage/rdbms/sqlmigration/oracle/V6.0_2015_03_06_01__DS_3378_lost_oracle_indexes.sql | UTF-8 | 811 | 2.6875 | 3 | [
"LicenseRef-scancode-unknown-license-reference",
"BSD-3-Clause",
"MPL-1.0",
"W3C",
"GPL-1.0-or-later",
"LicenseRef-scancode-unicode",
"LGPL-2.1-or-later",
"LGPL-2.0-or-later",
"CDDL-1.0",
"MIT",
"Apache-2.0",
"JSON",
"EPL-1.0",
"LicenseRef-scancode-public-domain",
"LicenseRef-scancode-un... | permissive | --
-- The contents of this file are subject to the license and copyright
-- detailed in the LICENSE and NOTICE files at the root of the source
-- tree and available online at
--
-- http://www.dspace.org/license/
--
------------------------------------------------------
-- DS_3378 Lost oracle indexes
------------------... | true |
3a7d6444cf35693c631106cf0df620f1c206b5aa | SQL | tetsuo-asano/calico | /service/migration/db/scripts/20141229013730_create_customer_family.sql | UTF-8 | 552 | 3.75 | 4 | [
"Apache-2.0",
"BSD-3-Clause"
] | permissive | -- // create customer_family
-- Migration SQL that makes the change goes here.
CREATE TABLE customer_family (
id SERIAL NOT NULL,
customer_id INTEGER NOT NULL,
family_type INTEGER,
name TEXT NOT NULL,
sex INTEGER,
favorite_number INTEGER,
birthday DATE,
PRIMARY KEY(id)
);
CREATE INDEX customer_family_... | true |
d5a112cdb08365870c2e95a4786609378a107823 | SQL | dnorum/hack_cville | /energy/sql/setup_and_load/tables/energy_raw/create_table.sql | UTF-8 | 580 | 2.5625 | 3 | [] | no_license | -- Make sure that the table will be created with the desired format
DROP TABLE IF EXISTS
load.energy_raw;
-- The csv fields will be pulled in as straight text to start with
CREATE TABLE load.energy_raw
( tagname TEXT
, "timestamp" TEXT
, min_value TEXT
, min_status_str TEXT
, min_timestamp TEXT
, max_value TEXT... | true |
90c817ec7a2426df14d270a2216e578da35827e5 | SQL | cesarmcuellar/GestionContactosWebPython | /BD/gestioncontactos.sql | UTF-8 | 2,195 | 3.125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.7.4
-- https://www.phpmyadmin.net/
--
-- Servidor: 127.0.0.1
-- Tiempo de generación: 28-09-2020 a las 18:17:40
-- 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 |
ff69de6ab867ee2fd0e67efbf3b7e01867797b95 | SQL | lionel-es/evasql | /eval.sql | UTF-8 | 8,407 | 3.9375 | 4 | [] | no_license | -- connexion à la base --
mysql -h localhost:8889 -u root -p root
-- afficher les base de données --
SHOW databases;
-- Creation de la base de données --
CREATE DATABASE IF NOT EXISTS eval_cine;
-- on essai de s'y connecter --
USE eval_cine
-- Creation des tables --
CREATE TABLE IF NOT EXISTS cinema(
id I... | true |
0c30a35d39354112edc48e76fb1c0933f5fc0618 | SQL | nils-emil/Bonly | /src/main/resources/config/liquibase/changelog/20201280003025_image_rework.sql | UTF-8 | 774 | 2.953125 | 3 | [] | no_license | --liquibase formatted sql
--changeset Nils-Emil:20201280003025>
CREATE TABLE image
(
id bigint PRIMARY KEY,
content bytea NOT NULL
);
ALTER TABLE prize
DROP COLUMN image;
ALTER TABLE prize
DROP COLUMN image_content_type;
ALTER TABLE prize
DROP COLUMN winner_chosen_at;
ALTER TABLE prize
AD... | true |
9ae8277837b2fabc82d08fd3348b9e7f29e85f79 | SQL | NeotomaDB/Neotoma_SQL | /function/ti/getisobiomarkers.sql | UTF-8 | 442 | 3.0625 | 3 | [
"MIT"
] | permissive | CREATE OR REPLACE FUNCTION ti.getisobiomarkers()
RETURNS TABLE(isobiomarkertype character varying, isobiomarkerbandtype character varying)
LANGUAGE sql
AS $function$
select ibmt.isobiomarkertype, ibbt.isobiomarkerbandtype
from ndb.isobiomarkertypes ibmt inner join
ndb.isobiomarkerbandtypes ibbt on... | true |
2b91b1062847cb3a6aa9fb8dba6df33a5456ee60 | SQL | harakonan/misc-codes | /SQL/SQL_Puzzle_2nd_Ed/p23/SELECT1.sql | UTF-8 | 965 | 4.0625 | 4 | [] | no_license | CREATE VIEW MagazineSales(stand_name, magazine_sku, net_sold_qty)
AS SELECT Newsstands.stand_name, Titles.magazine_sku,
net_sold_qty
FROM Titles, Sales, Newsstands
WHERE Sales.stand_nbr = Newsstands.stand_nbr
AND Titles.product_id = Sales.product_id;
SELECT stand_name
FROM MagazineSales M0... | true |
35126ef8d4b76dd184a37283600bf7107026297d | SQL | thecrazzycourses/sql | /cats_app.sql | UTF-8 | 444 | 3.1875 | 3 | [
"MIT"
] | permissive | DROP DATABASE cat_app;
CREATE DATABASE cat_app;
USE cat_app;
CREATE TABLE cats (
cat_id INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
name VARCHAR(100),
breed VARCHAR(100),
age INT
);
INSERT INTO cats (name, breed, age)
VALUES ('Ringo', ... | true |
2e0f44ad5d499c47637ce77d352a64bfeea967f8 | SQL | becarevicmarko/Becarevic.M_Camping | /Becarevic_Camping.sql | UTF-8 | 989 | 3.28125 | 3 | [] | no_license | create database db_reservierung collate utf8_general_ci;
use db_reservierung;
create table reservations(
id int not null auto_increment,
firstname varchar(100),
lastname varchar(100) not null,
gender varchar(100) not null,
birthdate DATETIME not null,
username DATETIME not null,
password INT not nul... | true |
2ce1f776f51640707c451b43de877c574cbc04ff | SQL | amaldonado1215/DataWarehouse | /NNHIS Interface/vwSHS_ClaimCharges.sql | UTF-8 | 917 | 3.5 | 4 | [] | no_license | ALTER VIEW vwSHS_ClaimCharges AS
SELECT TOP (100) PERCENT CC.claim_seq,
CC.patient_id,
CC.proc_code AS CPT,
CC.units AS Units,
CC.Unit_Charge * CC.units AS Charged,
CC.Unit_Charge,
CLAIMS.DateSubmittedToCarrier,
CAST(CC.claim_seq AS varchar(15)) + CAST(CC.patient_id AS varchar(15)) + CC.pro... | true |
bc50ff8a62c94b4097695ca993844288ada8f785 | SQL | j7ng/CLFY_SA | /SA/Procedures/SP_GET_IVR_PROMO_SERVICE.sql | UTF-8 | 6,474 | 2.75 | 3 | [] | no_license | CREATE OR REPLACE PROCEDURE sa.sp_get_ivr_promo_service(
promo_id IN VARCHAR2,
p_act_type IN VARCHAR2,
source_system IN VARCHAR2,
script OUT VARCHAR2,
startphrase OUT VARCHAR2,
endphrase OUT VARCHAR2,
r_promo OUT VARCHAR2,
c_promo OUT VARCHAR2,
e_promo OUT VARCHAR2,
n_options OUT NUMBER,
... | true |
28a13422959b08d08d2ecace8baf6415c361e002 | SQL | benfonty/repo_perso | /stock/jeu de données/export_gencods.sql | UTF-8 | 417 | 3.375 | 3 | [] | no_license | select art.gencod, clacar.codcla, clacar.libcla,famart.codfam, famart.libfam, typpdt.codtyppdt, typpdt.libtyppdt
from
art inner join mod on mod.codmod = art.codmod
inner join clacar on mod.codcla = clacar.codcla
inner join famart on art.codfam = famart.codfam
inner join typpdt on famart.codt... | true |
c9d0c9244793d339541ac18b6843be00d50ffae9 | SQL | AHPC1993/Fruteria | /base de datos/db_fruteria (1).sql | UTF-8 | 4,533 | 3.09375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.0.10deb1
-- http://www.phpmyadmin.net
--
-- Servidor: localhost
-- Tiempo de generación: 08-11-2016 a las 10:03:07
-- Versión del servidor: 5.5.50-0ubuntu0.14.04.1
-- Versión de PHP: 5.5.9-1ubuntu4.17
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @... | true |
71dd023e965d912816501671819ad83d2ceec2b3 | SQL | codeigniterpower/codeigniter2-pos | /database/database_10.5-10.6.sql | UTF-8 | 2,817 | 3.5 | 4 | [] | no_license | CREATE TABLE `phppos_inventory` (
`trans_id` int(11) NOT NULL auto_increment,
`trans_items` int(11) NOT NULL default '0',
`trans_user` int(11) NOT NULL default '0',
`trans_date` timestamp NOT NULL default CURRENT_TIMESTAMP,
`trans_comment` text NOT NULL,
`trans_inventory` int(11) NOT NULL default '0',
PRI... | true |
56fc1f62ba6e9f46e85b657e959c954ea48f9aad | SQL | Naoufal-Rhioui/Assignements | /week_4/Wednesday_SQL_Answers.sql | UTF-8 | 1,521 | 4.15625 | 4 | [] | no_license | --Question 1:
select c.first_name, c.last_name, a.district
from customer as c
inner join address as a
on c.address_id = a.address_id
where district = 'Texas'
--Question 2:
select first_name, last_name, amount
from customer as c
inner join payment as p
on c.customer_id = p.customer_id
where amount > 6.99
--Question 3:... | true |
35252db7c99971d6bd4dd196f214ed19f90fbb67 | SQL | unicornette/SQLServer | /Teaching Examples (For SQL Server Classes)/delay.sql | UTF-8 | 658 | 3.609375 | 4 | [] | no_license | /*
Query Window 1
-- Execute the below code before starting:
CREATE TABLE DelayTable(
ID SMALLINT IDENTITY(1,1),
Name VARCHAR(100)
)
INSERT INTO DelayTable (Name)
VALUES ('John')
, ('Joe')
, ('Jennifer')
, ('Jessica')
SELECT *
FROM DelayTable
*/
-- Start this first, after executing it, immediately start Q... | true |
59ddc5d20a739c4328953569933f09d2265b9d70 | SQL | meldig/SQL | /analyse/evaluation_absence_ilot.sql | UTF-8 | 1,276 | 4.15625 | 4 | [] | no_license | /*
permet l'identification des secteurs n'étant pas couvert par des ilôts
*/
WITH
-- récupération des limites communales (non-nettoyées)
a AS (
SELECT
LM_COMMUNES."GEOM"
FROM "GEO"."LM_COMMUNES"
),
-- intersection des limites de communes avec les tronçons de voirie
c AS(
SELECT
SDO_GEOM.SDO_INTERSECTION(a."GEOM",... | true |
bb72cccd7900abc9c5774d4313759d4921cd9169 | SQL | BodeleAshish/Simple-Home-Solution | /simple_home_solutions.sql | UTF-8 | 10,623 | 3.15625 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.8.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Apr 08, 2019 at 08:21 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 |
68d317b0a2162aca150596d383fab5c11ba0da1a | SQL | shiseni/Auction | /Database.sql | UTF-8 | 28,314 | 3.203125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Хост: 127.0.0.1:3306
-- Время создания: Сен 20 2021 г., 17:44
-- Версия сервера: 5.7.29
-- Версия PHP: 7.4.5
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARA... | true |
8c8b192e7eea390e64b76ae573cc48110d96f845 | SQL | maxant/kafka-data-consistency | /mf/pricing/src/main/resources/db/migration/V1.001__createTablePrices.sql | UTF-8 | 555 | 3.015625 | 3 | [
"MIT"
] | permissive | CREATE TABLE T_PRICES (
ID VARCHAR(36),
CONTRACT_ID VARCHAR(36) NOT NULL,
STARTTIME DATETIME(3) NOT NULL, -- valid from, inclusive
ENDTIME DATETIME(3) NOT NULL, -- valid to, inclusive
COMPONENT_ID VARCHAR(36) NOT NULL, -- this is the price of which component?
PRICING... | true |
fe65be9ed30e5fd662a18e062f745b394bccca57 | SQL | hugomrj/sirfe | /web/WEB-INF/str/RendicionVerificacion/list.sql | UTF-8 | 478 | 3.453125 | 3 | [] | no_license |
SELECT
rendiciones_verificacion.*
FROM
aplicacion.rendiciones_verificacion,
aplicacion.rendiciones_gastos,
aplicacion.consejos_salud,
aplicacion.departamentos
WHERE
rendiciones_gastos.rendicion = rendiciones_verificacion.rendicion AND
rendiciones_gastos.consejo = consejos_salud.co... | true |
40d205340b79ba8a813c8e86577437d583171941 | SQL | niyonx/off-work | /LMSWORKS.sql | UTF-8 | 41,449 | 3.59375 | 4 | [] | no_license | drop database if exists hrm;
create database hrm;
use hrm;
SET SQL_SAFE_UPDATES = 0;
drop table if exists tbl_department;
create table tbl_department(
id int(11) auto_increment primary key,
dept_code varchar(10),
dept_name varchar(50),
dept_head int(11),
date_created datetime,
created_by int(11),
date_updated datetim... | true |
0a626e985d3c1eb9b7dc4a6f4a24048047641f4f | SQL | de-bkg/deegree-workspace-dlm250-inspire | /_sql/setup_hypw.sql | UTF-8 | 65,582 | 2.875 | 3 | [
"MIT"
] | permissive | --
-- PostgreSQL database dump
--
-- Dumped from database version 9.2.9
-- Dumped by pg_dump version 9.5.1
-- Started on 2017-07-25 15:47:55
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 ... | true |
90f05925a001363da8ea1e00e3fd06f18f3bc4c9 | SQL | dmo11/syracuse_public | /etl/road_ratings/road_ratings_import.sql | UTF-8 | 619 | 2.8125 | 3 | [] | no_license | create schema if not exists roads;
drop table if exists roads.road_ratings;
create table roads.road_ratings (
street_name varchar(100),
street_from varchar(100),
street_to varchar(100),
block_number float,
ward_number float,
overall_rating float,
... | true |
8c7c16ac0825afac9e930ae414c04f7d1e92404b | SQL | fishmanwang/jubi-monitor-java | /doc/sql/init_tables.sql | UTF-8 | 1,400 | 3.84375 | 4 | [] | no_license | CREATE TABLE `zx_user` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`username` varchar(32) NOT NULL,
`password` char(64) NOT NULL,
`salt` char(6) NOT NULL,
`frozen` int(11) NOT NULL DEFAULT '0' COMMENT '冻结时间,单位秒。0:不冻结, -1:永远冻结。',
`last_login_ip` varchar(16) NOT NULL DEFAULT '' COMMENT '上次登录IP',
`last_login_tim... | true |
08b9ae5442f4ef594c1224da726b5a6f9d17adca | SQL | kong5000/BootcampX | /4_queries/avg_total_cohort_assist_time.sql | UTF-8 | 279 | 3.78125 | 4 | [] | no_license |
SELECT avg(duration) as average_total_duration
FROM(
SELECT SUM(completed_at - started_at) as duration
FROM cohorts
JOIN students ON students.cohort_id = cohorts.id
JOIN assistance_requests ON students.id = assistance_requests.student_id
GROUP BY cohorts.name
) temp
| true |
f45784aa3f2461ff22b5ce8df6841c99d238e25e | SQL | wysiwygORGANIZATION/wysiwygREPO | /EW_RadioMEI1/DBScripts/Acs_140411_163631.sql | UTF-8 | 1,778 | 2.59375 | 3 | [] | no_license | -- Group_DefaultModule [Group2DefaultModule_DefaultModule2Group]
alter table `group` add column `module_oid` integer;
alter table `group` add index fk_group_module_2 (`module_oid`), add constraint fk_group_module_2 foreign key (`module_oid`) references `module` (`module_id`);
-- User_DefaultGroup [User2DefaultGr... | true |
643825d10e114d6230ce6393d4b86a3e99e7b697 | SQL | stenmr/tott | /Tott-2_drop.sql | UTF-8 | 563 | 2.59375 | 3 | [
"MIT"
] | permissive | -- Created by Vertabelo (http://vertabelo.com)
-- Last modification date: 2020-06-16 09:52:50.832
-- foreign keys
ALTER TABLE ARVE
DROP FOREIGN KEY ARVE_ISIK;
ALTER TABLE ARVE_RIDA
DROP FOREIGN KEY ARVE_RIDA_ARVE;
ALTER TABLE ARVE_RIDA
DROP FOREIGN KEY ARVE_RIDA_TALU_TOODE;
ALTER TABLE TALU_TOODE
DR... | true |
a8e8facb80633986a80c5e31b9176ec7802c5234 | SQL | ztepsic/Web-CMS | /source/packages/simplepages/database/simplepages.sql | UTF-8 | 1,520 | 3.6875 | 4 | [] | no_license | CREATE TABLE IF NOT EXISTS zt_simple_pages (
simple_page_id int(11) NOT NULL auto_increment COMMENT 'Identifikator jednostavne stranice.',
simple_page_alias varchar(100) collate utf8_unicode_ci NOT NULL COMMENT 'Alias stranice',
simple_page_name varchar(100) collate utf8_unicode_ci NOT NULL COMMENT 'Naziv jednost... | true |
2e05163f889ca734d11561b298c675f175bfa96e | SQL | suarezluis/DB_ClassRepo | /fkumi/ITSE2309 - Oracle Database Programming/SQL Examples/Chapter 11 - Group Functions/Cube And Rollup/GroupBy2.sql | UTF-8 | 122 | 3.015625 | 3 | [] | no_license | Select Country, Gender, Sum(Salary) as "Total Salary"
From Employee
Group By Country, Gender
Order By Country, Gender;
| true |
2d82f8752587b6bee77c28c2decde19b3245fb4f | SQL | ganeshsankaran/Climb | /backend/database.sql | UTF-8 | 392 | 3.28125 | 3 | [
"LicenseRef-scancode-unknown-license-reference",
"MIT"
] | permissive | CREATE TYPE COMPLETED AS(
problem INTEGER,
attempts INTEGER
);
CREATE TABLE scores(
user_name CHAR(50) NOT NULL,
comp CHAR(50) NOT NULL,
problems COMPLETED[] NOT NULL
);
CREATE TABLE users(
user_name CHAR(50) NOT NULL UNIQUE,
password CHAR(50) NOT NULL,
current_comp CHAR(50)
);
CREATE TABLE competitions(
comp_... | true |
fc27471e7ec521dd1a166b56bd9d4c15af886040 | SQL | inuitviking/parkeringsafgift | /cron/reset.sql | UTF-8 | 473 | 3.078125 | 3 | [] | no_license | -- Slet fra tabellen regPlates hvor userID er lige med NULL
DELETE FROM `regPlates` WHERE userId IS NULL;
-- Opdater tabellen regPlates, sæt timeParked lige med Null, confirmed lige med 0, confirmationTime lige med NULL, og ticketType lige med NULL
-- hvor userId er IKKE NULL
UPDATE `regPlates` SET `timeParked`=NULL,`c... | true |
2a2818bb79b0c255c1d7eb777dd675f1728ed568 | SQL | Onlyzhoudechao/myBBS | /sql/book.sql | UTF-8 | 1,249 | 3.125 | 3 | [] | no_license | /*
Navicat MySQL Data Transfer
Source Server : fly
Source Server Version : 50528
Source Host : localhost:3306
Source Database : test
Target Server Type : MYSQL
Target Server Version : 50528
File Encoding : 65001
Date: 2017-09-20 14:53:08
*/
SET FOREIGN_KEY_CHECKS=0;
-- ----------... | true |
b655407094231644591a23cd3b1f054d1a9f5157 | SQL | yemiooxxoo/OnlineAttendanceSystem | /system/OnlineAttendanceSystem/build/classes/schema.sql | UTF-8 | 2,303 | 3.671875 | 4 | [] | no_license |
create table AbsenceType(
id int not null primary key auto_increment,
type varchar(20),
delect int not null
);
create table Department(
id int not null primary key auto_increment,
department varchar(20),
upperDepartment_id int not null
);
create table Manager(
id int not null primary key auto_increment,
username va... | true |
ef3a726a3f3db06971330d1b35267dc71c191cd2 | SQL | luisomoreau/projet_POO | /telephone.sql | UTF-8 | 1,997 | 3.296875 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.2.0
-- http://www.phpmyadmin.net
--
-- Client : localhost
-- Généré le : Mar 23 Décembre 2014 à 00:31
-- Version du serveur : 5.6.17
-- Version de PHP : 5.4.28
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_... | true |
852dcf828d158c5ef1a50a6e5af1bbe60e1251ce | SQL | VenciNanov/C-DB-Fundametals | /Database Basics – MS SQL/07.DatabaseProgrammabilityAndTransactions/07.DatabaseProgrammabilityAndTransactions/16.DepositMoney.sql | UTF-8 | 160 | 2.796875 | 3 | [] | no_license | CREATE PROC usp_DepositMoney(@AccountId INT,@MoneyAmount MONEY)
AS
BEGIN TRANSACTION
UPDATE Accounts
SET Balance +=@MoneyAmount
WHERE Id = @AccountId
COMMIT | true |
fd930d2d2f201542404e1333ed9ce9cb6b2fe8c6 | SQL | salescube/SalesCube | /WEB/SalesCube/src/main/java/jp/co/arkinfosys/entity/sql/estimate/FindEstimateLinesBySheetId.sql | UTF-8 | 546 | 2.90625 | 3 | [] | no_license | SELECT E.ESTIMATE_LINE_ID
,E.ESTIMATE_SHEET_ID
,E.LINE_NO
,E.PRODUCT_CODE
,E.CUSTOMER_PCODE
,E.PRODUCT_ABSTRACT
,E.QUANTITY
,E.UNIT_COST
,E.UNIT_RETAIL_PRICE
,E.COST
,E.RETAIL_PRICE
,E.REMARKS
,E.UPD_FUNC
,E.UPD_DATETM
,E.UPD_USER
,P.SUPPLIER_PCODE
... | true |
73e18620889952418b1334d286d4895cdba3088a | SQL | LabKey/MacCossLabModules | /testresults/resources/schemas/dbscripts/postgresql/testresults-13.20-13.21.sql | UTF-8 | 2,067 | 3.203125 | 3 | [] | no_license | /*
* Copyright (c) 2011 LabKey Corporation
*
* 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 |
48603c7de15230187313abd1543c612aa1f33a74 | SQL | conradoqg/meajudafi-workers | /migrations/0000004-create-fbcdata_sgs_1i_fbcdata_sgs_21619i.up.sql | UTF-8 | 606 | 3.265625 | 3 | [
"MIT"
] | permissive | CREATE TABLE fbcdata_sgs_1i (
id UUID NOT NULL UNIQUE,
DATA DATE NOT NULL,
VALOR DOUBLE PRECISION,
PRIMARY KEY(id, DATA),
CONSTRAINT fbcdata_sgs_1i_DATA UNIQUE (DATA)
);
CREATE INDEX fbcdata_sgs_1i_data_index
ON fbcdata_sgs_1i USING btree
(DATA ASC NULLS LAST);
CREATE TABLE fbcdata_sgs... | true |
23915abd07c0a8c751541a68e4a71b48bf705f1f | SQL | InnovateUKGitHub/innovation-funding-service | /ifs-data-layer/ifs-data-service/src/main/resources/db/migration/V134_2_1__Migrate_live_projects_to_new_project_docs_functionality.sql | UTF-8 | 5,659 | 3.65625 | 4 | [
"MIT"
] | permissive | -- IFS-4631 Migrate all competitions to new configurable documents excluding Expression of interest
INSERT INTO document_config
(competition_id, title, guidance, editable, enabled, type)
SELECT c.id AS competition_id,
'Collaboration agreement' AS title,
'<p>The collaboration agreement covers how the consortium will wo... | true |
2a35321053ebcce4ec7d7f1ef4d6759da6c0d621 | SQL | AgResearch/brdf | /schema/agrbrdf/tbl.labresourcelist.sql | UTF-8 | 353 | 2.703125 | 3 | [] | no_license | --
-- Name: labresourcelist; Type: TABLE; Schema: public; Owner: agrbrdf; Tablespace:
--
CREATE TABLE labresourcelist (
listname character varying(256) NOT NULL,
maxmembership integer,
listcomment character varying(1024),
CONSTRAINT "$1" CHECK ((obtypeid = 75))
)
INHERITS (ob);
ALTER TABLE public.la... | true |
10791cde4b9d95329af7bc9350a5a85413b8ec9d | SQL | NABEEL-AHMED-JAMIL/my-calculator | /model_sql/supplier.sql | UTF-8 | 7,374 | 2.78125 | 3 | [] | no_license | /* INSERT QUERY NO: 1 */
INSERT INTO supplier(supplier_id, supplier_name, contact_name, address, city, postal_code, country, phone)
VALUES
(
1, 'Exotic Liquid', 'Charlotte Cooper', '49 Gilbert St.', 'Londona', 'EC1 4SD', 'UK', '(171) 555-2222'
);
/* INSERT QUERY NO: 2 */
INSERT INTO supplier(supplier_id, suppl... | true |
2c7c202ac599b77ed93fd593f4a8bded35f3545b | SQL | samuelstrom93/Kmom10-htmlphp | /db/init.sqlite.sql | UTF-8 | 156,791 | 3.34375 | 3 | [] | no_license | BEGIN TRANSACTION;
CREATE TABLE IF NOT EXISTS "article" (
"id" INTEGER NOT NULL,
"name" TEXT NOT NULL UNIQUE,
"title" TEXT NOT NULL,
"data" TEXT NOT NULL,
"author" TEXT NOT NULL,
"gps" TEXT,
"mapImage" TEXT,
"image1" TEXT,
"image1Alt" TEXT,
"image1Text" ,
"TEXT" ,
"image2" TEXT,
"image2Alt" TEXT,
"image2T... | true |
710874b8f387feb23e80203652cf3502e96e3d69 | SQL | elliottbolzan/Fermi | /backend/queries/suggested_referers.sql | UTF-8 | 257 | 3.703125 | 4 | [] | no_license | --6 people with same university as user
with view1 AS (SELECT university,person
FROM education
WHERE person = '1')
SELECT education.person
FROM education,view1
WHERE (education.university=view1.university AND education.person<>view1.person)
LIMIT 6; | true |
ef463dcacf4c814704bd45e13b199739ef15cd76 | SQL | heeropunjabikogx/SpringbootProjectH2 | /src/main/resources/data.sql | UTF-8 | 2,144 | 2.546875 | 3 | [] | no_license | DROP TABLE IF EXISTS offer;
CREATE TABLE offer (
OFFER_ID INT AUTO_INCREMENT PRIMARY KEY,
OFFER_LOCATION VARCHAR(250) NOT NULL,
OFFER_NAME VARCHAR(250) NOT NULL,
OFFER_VALID_FROM TIMESTAMP DEFAULT NULL,
OFFER_VALID_TILL TIMESTAMP DEFAULT NULL,
IMAGES VARCHAR(250) null
);
INSERT INTO offer ( OFFER_L... | true |
00886e76e797781ed1c78347a9b735272033d962 | SQL | AMMing/KcvPluginsPage | /php/backup/kcvp_db.sql | UTF-8 | 6,648 | 2.796875 | 3 | [
"MIT"
] | permissive | -- phpMyAdmin SQL Dump
-- version 4.3.4
-- http://www.phpmyadmin.net
--
-- Host: pmamysql-green.smartgslb.com
-- Generation Time: 2015-02-04 20:41:58
-- 服务器版本: 5.5.41-debug-log
-- PHP Version: 5.4.34
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_... | true |
e930775546cd7427ac954c513a7fdb3e75fe0e30 | SQL | OHDSI/WebAPI | /src/main/resources/db/migration/postgresql/V2.8.0.20200127101702__restore_rest_endpoint_perms.sql | UTF-8 | 768 | 3.015625 | 3 | [
"Apache-2.0"
] | permissive | INSERT INTO ${ohdsiSchema}.sec_permission (id, value, description)
SELECT nextval('${ohdsiSchema}.sec_permission_id_seq'), 'source:priorityVocabulary:get', 'Get source with highest priority vocabulary daimon'
;
INSERT INTO ${ohdsiSchema}.sec_permission (id, value, description)
SELECT nextval('${ohdsiSchema}.sec_permis... | true |
62f5911712a1ac6b8e23c539d689529d53b8db5b | SQL | imuble/node-seed | /src/resources/db/v2.sql | UTF-8 | 316 | 3.421875 | 3 | [] | no_license | CREATE TABLE transaction (
id serial,
amount float NOT NULL,
type text NOT NULL,
category text NOT NULL,
user_id uuid NOT NULL,
transaction_date TIMESTAMP DEFAULT NOW(),
created_at TIMESTAMP DEFAULT NOW(),
PRIMARY KEY (id),
FOREIGN KEY (user_id) REFERENCES user_credentials(id)
); | true |
f323d38c09984e1af3873d76df4bd8943ebbf5bc | SQL | ToborTheGreat/Repository01 | /dw_voice.sam_voice_bts_sector_parm_aud_ff.sql | UTF-8 | 1,715 | 2.8125 | 3 | [] | no_license | --
-- PostgreSQL database dump
--
SET statement_timeout = 0;
SET client_encoding = 'UTF8';
SET standard_conforming_strings = off;
SET check_function_bodies = false;
SET client_min_messages = warning;
SET escape_string_warning = off;
SET search_path = dw_voice, pg_catalog;
DROP TRIGGER dw_voice_sam_voice_bts_sector_p... | true |
20522cccd1df317489e2908f7d263179ddfbe43e | SQL | ingokuba/planningapp | /test/mysql/000_create_database.sql | UTF-8 | 846 | 3.3125 | 3 | [] | no_license | CREATE DATABASE planningdb CHARACTER SET utf8;
USE planningdb;
CREATE TABLE User (
id INT UNSIGNED NOT NULL AUTO_INCREMENT,
givenName varchar(512) NOT NULL,
surname varchar(512) NOT NULL,
email varchar(254) NOT NULL UNIQUE,
password varchar(254) NOT NULL,
createdAt timestamp DEFAULT CURRENT_TIMESTAMP,
token varchar(2... | true |
c3ad4e024fc8b4e547db6ff1d854a662d4fd6b53 | SQL | scrumdidillyumptious/myFridgedb | /testQuery.sql | UTF-8 | 196 | 2.703125 | 3 | [] | no_license | use myfridgedb;
select iname, expDate, rdesc, instructions
from ingredients_has_recipie as a, ingredients as b, recipie as c
where b.ingID=a.ingredients_ingID and c.recipieID=a.recipie_recipieID;
| true |
31bbd43c2a31a1eb661dbd28b77c57a0c6c328f0 | SQL | 929359291/demo-springboot | /initsql/initsql-demo.sql | UTF-8 | 3,940 | 3.015625 | 3 | [] | no_license | CREATE SCHEMA IF NOT EXISTS druid_demo_1;
CREATE SCHEMA IF NOT EXISTS druid_demo_1_slave;
CREATE SCHEMA IF NOT EXISTS druid_demo_1_slave_2;
CREATE SCHEMA IF NOT EXISTS druid_demo_2;
CREATE SCHEMA IF NOT EXISTS jiguang;
use druid_demo_1;
DROP TABLE IF EXISTS `ORDER1`;
CREATE TABLE `ORDER1` (
`ID` bigint(20) NOT NULL... | true |
cb261d1eee5f0b6d9f30693837edc96a7e925d1f | SQL | mrdiio/layanan-bpn | /database/layanan_bpn.sql | UTF-8 | 7,994 | 3.125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.8.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Jul 09, 2019 at 03:50 AM
-- 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 |
8aa5653ac70539040d9cbbb7a877e19b7fc13a09 | SQL | dunglh/MyProject | /Database/Postgresql/AAS/0001/2.sql | UTF-8 | 908 | 3.125 | 3 | [] | no_license | CREATE TABLE public."Application"
(
"Id" numeric(19) NOT NULL,
"ApplicationCode" character varying(3) NOT NULL,
"ApplicationName" character varying(500) NOT NULL,
"CreateTime" numeric(14),
"Creator" character varying(50),
"ModifyTime" numeric(14),
"Modifier" character varying(50),
"IsAct... | true |
d1d9cc81d10c030ce3d2e70518597f9ab3c3ec3e | SQL | jha359/Past-Work | /CSE 111/Lab6/jaeha-hwang/test/7.sql | UTF-8 | 494 | 3.859375 | 4 | [] | no_license | SELECT COUNT(DISTINCT l_suppkey) FROM lineitem
INNER JOIN orders ON orders.o_orderkey = lineitem.l_orderkey
INNER JOIN customer ON customer.c_custkey = orders.o_custkey
WHERE (c_nationkey = 6 OR c_nationkey = 7) AND l_suppkey IN (
SELECT l_suppkey FROM lineitem
INNER JOIN orders ON orders.o_orderkey = lineitem.l_o... | true |
8dcf01e3877559f2bb0fdb12fc2fb1b45af93c8a | SQL | allwaysoft/Oracle-1 | /Database performance tuning/Scripts/Capitulo5/04_Configurando_result_cache.sql | UTF-8 | 3,847 | 3.8125 | 4 | [] | no_license | -- Result cache pode ser habilitado via 3 caminhos: alter session, alter system e hint em sql. Para habilita-lo vc pode usar os parametros:
-- result_cache_mode: MANUAL (default) ou FORCE
-- result_cache_max_size: valor em bytes do tamanho da result cache
-- result_cache_max_result: valor percentual q um u... | true |
77c0ca4efda7b0d373b487568d56d81d9c744488 | SQL | qq502361472/mysql-learning | /document/mysql_learning/mysql优化数据准备.sql.bak | UTF-8 | 4,133 | 3.46875 | 3 | [] | no_license | drop TABLE if EXISTS dept;
create table `dept`(
`id` INT(11) not null auto_increment,
`deptName` VARCHAR(30) default null,
`address` VARCHAR(40) default null,
ceo int null,
PRIMARY key (`id`)
)ENGINE = INNODB AUTO_INCREMENT = 1 DEFAULT CHARSET = utf8;
CREATE TABLE `emp` (
`id` INT (11) NOT NULL auto_increment,
`name... | true |
b1ba2b3fc553ff86760eb712f63958ad1c421e11 | SQL | NaturesProphet/venha-para-es-palma-mao | /BancoDeDados/QUERYS.sql | UTF-8 | 2,315 | 3.796875 | 4 | [] | no_license |
/* Esta query mostra as profissoes que o candidato selecionou */
SELECT Profissao.IdProfissao FROM Profissao JOIN CandidatoXProfissao ON Profissao.IdProfissao = CandidatoXProfissao.IdProfissao
JOIN Candidato ON CandidatoXProfissao.IdCandidato = Candidato.IdCandidato WHERE Candidato.CPF = '551.235.392-12';
/* Esta que... | true |
69b0bddbc66bc6e1e1c7b90798f4738002c7af6f | SQL | gordonpn/soen-363 | /phase-1/queries_results/queries/Q3-A-Group01.sql | UTF-8 | 116 | 2.9375 | 3 | [
"MIT"
] | permissive | SELECT
m.title
FROM
movies AS m,
actors AS a
WHERE
m.mid = a.mid
AND a.name = 'Daniel Craig'
ORDER BY
title;
| true |
f1e7ff40d667b5f918dad8c97094663f543097e2 | SQL | mahmoud-gawad/DAND | /Explore Weather Trends/sql_commands.sql | UTF-8 | 291 | 3.6875 | 4 | [] | no_license | SELECT
*
FROM
city_data
WHERE
country LIKE 'Eg%';
SELECT
c.year,
c.city,
c.country,
c.avg_temp AS local_avg_temp,
g.avg_temp AS global_avg_temp
FROM
city_data c
JOIN global_data g ON g.year = c.year
WHERE
c.city = 'Cairo'
AND c.country = 'Egypt';
| true |
6051d9001a727b33fc8aa0607f9b7e3eb3dcc18a | SQL | nisarg291/Training-Aug-21 | /SQL/Deep Parmar/Day7/Assignment Query_Derived Tables.sql | MacCentralEurope | 3,834 | 4.34375 | 4 | [] | no_license | -- Day4 and Day5 Exercises with Derived Tables
-- Day4:
--Assignment:
--[1] Write a query to rank employees based on their salary for a month
SELECT * FROM (SELECT DENSE_RANK() OVER(ORDER BY SALARY DESC) AS [RANK],* FROM Employees) AS EMP
--[2] Select 4th Highest salary from employee table using ranking functi... | true |
9fc2d5e980f2a65dd6d7a24a24b45255d3908d7b | SQL | Raghuvorkady/DBMS-LAB-Programs | /Programs/program2/Q3.sql | UTF-8 | 393 | 3.953125 | 4 | [] | no_license | /* 3. List all salesmen and indicate those who have and don’t have customers in their cities (Use UNION operation.) */
SELECT SALESMAN.SALESMAN_ID, NAME, CUST_NAME, COMMISSION
FROM SALESMAN, CUSTOMER
WHERE SALESMAN.CITY = CUSTOMER.CITY
UNION
SELECT SALESMAN_ID, NAME, 'NO MATCH', COMMISSION
FROM SALESMAN
WHERE NOT SALE... | true |
bbe81af459ccf0b3a8dbd31e03337d95cee88ea7 | SQL | thanh-phong-dev/api-golang | /database/migration/000001_init_schema.up.sql | UTF-8 | 541 | 3.359375 | 3 | [] | no_license | CREATE TABLE public.accounts (
id serial NOT NULL,
username text NOT NULL,
"password" text NOT NULL,
email text NULL,
fullname text NOT NULL,
phonenumber text NOT NULL,
"role" text NOT NULL,
sex text NOT NULL,
address text NULL,
date_of_birth text NULL,
is_deleted bool NOT NULL DEFAULT false,
created_at tim... | true |
88d7ce4f7784d7862c08ba068339e269134519f2 | SQL | davewofcp/FrontDesk | /app/install/schema/0410.user_roles.sql | UTF-8 | 326 | 2.84375 | 3 | [
"LicenseRef-scancode-warranty-disclaimer"
] | no_license | CREATE TABLE `user_roles` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`title` varchar(50) DEFAULT NULL,
`app_levels__id` int(10) unsigned DEFAULT NULL,
PRIMARY KEY (`id`),
FOREIGN KEY (`app_levels__id`) REFERENCES `app_levels` (`id`) ON DELETE SET NULL ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=ut... | true |
f8075c07cf9e85682b29bbac2eb6aa115bb791aa | SQL | basil-ladder/basil | /src/main/resources/db/migration/V21__not_null.sql | UTF-8 | 424 | 2.734375 | 3 | [] | no_license | update game_result set frame_timeout = false where frame_timeout is null;
ALTER TABLE game_result
ALTER COLUMN time SET NOT NULL,
ALTER COLUMN bota_id SET NOT NULL,
ALTER COLUMN botb_id SET NOT NULL,
ALTER COLUMN game_hash SET NOT NULL,
ALTER COLUMN map_pool SET NOT NULL,
ALTER COLUMN frame_tim... | true |
1f6e937ae0727e8c0a532989779a79804e06c973 | SQL | chesszhou/CSYE7200-Project-Team-3 | /TripPlanning_V1/conf/evolutions/default/1.sql | UTF-8 | 828 | 3.140625 | 3 | [] | no_license | # --- !Ups
create table user (
id int not null AUTO_INCREMENT,
name varchar(255) not null,
password varchar(225) not null,
email varchar(225) not null,
primary key (id)
);
insert into user (name, password,email) values ( 'admin','admi... | true |
013d72ce94614bcefdb35fd4c60753f1582b42f9 | SQL | nestorcolt/ubi_api_core | /data.sql | UTF-8 | 585 | 3.03125 | 3 | [] | no_license | /*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
/**
* Author: fonsito
* Created: 7 jun. 2020
*/
CREATE TABLE SEQUENCE (SEQ_NAME VARCHAR(50) NOT NULL, SEQ_COUNT NUMERIC(38), PRIM... | true |
f2f874b352ed49e99f47dc4f4a6853206b10710b | SQL | BRIANKAIVA1110/SEMINARIO_1_v1 | /tiendapepe.sql | UTF-8 | 7,653 | 3.21875 | 3 | [] | permissive | -- phpMyAdmin SQL Dump
-- version 4.9.0.1
-- https://www.phpmyadmin.net/
--
-- Servidor: 127.0.0.1
-- Tiempo de generación: 21-10-2019 a las 09:14:20
-- Versión del servidor: 10.4.6-MariaDB
-- Versión de PHP: 7.3.9
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";... | true |
0e3732285c389c5d684a092ccd790dd0ba25ea6c | SQL | sd253/Phoenix | /queries/6 compare datasets.sql | UTF-8 | 3,944 | 3.96875 | 4 | [
"MIT"
] | permissive | with openMaps as(
select
*
FROM
ways_addresses
),
cityOfPhoenix as(
select
*,
trim(replace(replace(replace(upper(substr("ADDRESS",1,instr("ADDRESS",' ')-1)),' ',' '),' ',' '),' ',' ')) as "joinAddress",
substr("zip_code",1,5) as "shortCityZip"
FRO... | true |
eaa82abf713e2c7206797ec51c5870d8f8f43bc8 | SQL | victorcommit/ETL-Project | /spotifyqueries.sql | UTF-8 | 661 | 3.390625 | 3 | [] | no_license | -- Create tables for raw data to be loaded into
DROP TABLE IF EXISTS spotify_list;
DROP TABLE IF EXISTS hotstuff;
CREATE TABLE spotify_list (
id INT PRIMARY KEY,
title VARCHAR,
artist VARCHAR,
top_genre VARCHAR,
year INT
);
CREATE TABLE hotstuff (
url VARCHAR,
weekID DATE ,
week_pos... | true |
2ae960bb94d904e86164cfbaf1f8fe58fae48891 | SQL | antoniofurone/cy-urbanbot | /cy-urbanbot/dist/cy-urbanbot/DataBase/01_setup.sql | UTF-8 | 4,048 | 2.5625 | 3 | [
"MIT"
] | permissive | delete from BSST_APA_APP_PARAM;
delete from BSST_APP_APP;
insert into BSST_APP_APP(APP_S_NAME,APP_S_DESC) values ('UrbanBot','UrbanBot');
insert into BSST_APA_APP_PARAM(APP_N_APP_ID,APA_S_NAME,APA_S_VALUE,APA_C_TYPE)
values (
(select APP_N_APP_ID from BSST_APP_APP where APP_S_NAME='UrbanBot'),
'bot_url','https://api.... | true |
eb1c335407980521b9fd0e0d651d63bd8a548458 | SQL | kabircse/sage | /app/db/demo_data.sql | UTF-8 | 2,380 | 3.03125 | 3 | [
"MIT"
] | permissive | -- phpMyAdmin SQL Dump
-- version 4.7.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1:3306
-- Generation Time: Nov 22, 2018 at 06:30 AM
-- Server version: 10.1.29-MariaDB
-- PHP Version: 7.2.0
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET... | true |
19699877e2ce7ea7b12fcf5109c9e36ca8c9378f | SQL | PluemJIR/Homework_codecamp_8 | /hw_database/ข้อที่ 5/sql-selectStatementAdv-4.sql | UTF-8 | 168 | 3.1875 | 3 | [] | no_license | use banking;
select customer_name,sum(balance) from depositor D left join account A on D.account_number = A.account_number group by d.customer_name having count(*) > 1; | true |
d014662a8e205d3be1c35d03934e8dabc15b45dc | SQL | Pkotova/your-face-sounds-familiar | /createFunc.sql | UTF-8 | 4,808 | 4.4375 | 4 | [] | no_license | -- Scalar function for Participant - returns the name of the participant by ID
SET SCHEMA FN71866;
CREATE FUNCTION GET_PERSON_NAME(V_ID INTEGER)
RETURNS VARCHAR(64)
SPECIFIC GET_PERSON_NAME
BEGIN ATOMIC
DECLARE V_PERSON_NAME VARCHAR(64);
DECLARE V_ERR VARCHAR(70);
SET V_PERSON_NAME=( SELECT NAME FROM PEOPL... | true |
52361b57a2ed00075bb9cdfe33f705c901fae4a4 | SQL | dev-with-dave/hello-immo-crud | /database/create_db.sql | UTF-8 | 5,678 | 3.28125 | 3 | [] | no_license | DROP DATABASE IF EXISTS `hello_immo`;
CREATE DATABASE `hello_immo`;
USE `hello_immo`;
CREATE TABLE `users` (
`id` INTEGER AUTO_INCREMENT PRIMARY KEY,
`name` VARCHAR(255) NOT NULL,
`email` VARCHAR(255) NOT NULL,
`password` VARCHAR(255) NOT NULL,
`type` ENUM('user', 'admin') DEFAULT 'admin',
`created_at` D... | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.