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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
66bbf03a40f4c4ec71801fc5b9d858ff5ed3c073 | SQL | bidhan-sd/ecommerce_project | /shop/db_shop.sql | UTF-8 | 12,782 | 3.140625 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.5.1
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Apr 03, 2017 at 06:38 AM
-- Server version: 10.1.13-MariaDB
-- PHP Version: 5.5.37
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CL... | true |
e6df0fbc56cc2564dbb429668415e470b9e061ee | SQL | wallacepontes/code-o-share | /jdbc-example/model/create-table-livro.sql | UTF-8 | 361 | 2.84375 | 3 | [] | no_license | USE cos_jdbcexampledb ;
CREATE TABLE Livro (
id BIGINT NOT NULL AUTO_INCREMENT ,
titulo VARCHAR (255) NOT NULL ,
preco DOUBLE NOT NULL ,
editora_id BIGINT NOT NULL ,
PRIMARY KEY (id),
CONSTRAINT fk_editora FOREIGN KEY fk_editora ( editora_id )
REFERENCES Editora (id)
ON DELETE RESTRICT
... | true |
e6e39b7089fb3dac35e2477124076e5d372994c9 | SQL | thaednevol/SoccerTournamentWebCake | /setup/SoccerTournament.sql | UTF-8 | 4,707 | 3.25 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.2.6deb1
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Nov 28, 2014 at 03:00 PM
-- Server version: 5.5.40-0ubuntu1
-- PHP Version: 5.5.12-2ubuntu4.1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@C... | true |
5eb00c631d3aadc459dd7ed511f6abfe3721fb6b | SQL | logogin/CoursesWorks | /Databases/Work2/progNewPrice.sql | UTF-8 | 550 | 3.3125 | 3 | [] | no_license | drop table newprice;
create table newprice(
supplier_name varchar2(30),
model varchar2(30),
price number(10,2)
);
DECLARE
sname item.supplier_name%TYPE;
imodel item.model%TYPE;
price item.price%TYPE;
cursor prices(type varchar2) is select item.supplier_name,item.model,item.price from
item where item.type... | true |
c872b9114430a39b834606cef7e771cd4597547a | SQL | Caroll1889/holbertonschool-higher_level_programming | /0x0E-SQL_more_queries/12-no_genre.sql | UTF-8 | 229 | 3.4375 | 3 | [] | no_license | -- tv shows
SELECT tv_shows.title, tv_show_genres.genre_id
FROM tv_shows
LEFT OUTER JOIN tv_show_genres
ON tv_shows.id=tv_show_genres.show_id
WHERE tv_show_genres.genre_id IS NULL
ORDER BY tv_shows.title, tv_show_genres.genre_id
| true |
82fd60892dc7d44c19919b484c518dda8f64e4dc | SQL | reynlds-illinois/SQL-for-BbLearn | /show-retention-center-accesses.sql | UTF-8 | 700 | 3.390625 | 3 | [] | no_license | /* This query looks at the number of accesses of the Retention Center
pages within the activity accumulator. You can filter by date range,
user, course and content PK1.
contributed by reynlds@illinois.edu */
/* the following line adds additional details to the timestamp */
alter session set nls_date_forma... | true |
4f8331598df31c0c9807d2015e691e275c05e0c9 | SQL | afinebojangle/market | /queries.sql | UTF-8 | 18,445 | 3.3125 | 3 | [] | no_license | /* Create Training and Analysis Datasets. To switch from analysis to training, comment out the where clauses that restrict date ranges and check the "TO" clause at the end for file output options */
COPY (
--long call
(SELECT oh.ticker as ticker
, capmc.alpha as alpha
, capmc.beta as beta
, 'Long Call' as trade_... | true |
3cf6f7eff408a2ec42b03f5aa48337d39af7ff3b | SQL | carsondavies/personal-project | /db/userCtrl/disconnect_video.sql | UTF-8 | 345 | 3.4375 | 3 | [] | no_license | DELETE FROM subscriptions
WHERE user_id = $1 AND video_id = $2;
-- DELETE FROM subscriptions
-- WHERE video_id = $2;
-- ALTER TABLE subscriptions
-- SET video_id = null
-- WHERE user_id = $1;
SELECT u.id, v.video_id, v.video_url FROM videos v
JOIN subscriptions s ON s.video_id = v.video_id
JOIN users u ON u.id = s.... | true |
d05a1387668701ea7de8a8f9b7192815c266b239 | SQL | kupsar/kursas | /DB/db4/uzduotis.sql | UTF-8 | 1,715 | 4.15625 | 4 | [] | no_license | CREATE TABLE `customer` (
`id` integer PRIMARY KEY,
`f_name` string,
`l_name` string,
`email` string
);
CREATE TABLE `status` (
`id` integer PRIMARY KEY,
`name` string
);
CREATE TABLE `product` (
`id` integer PRIMARY KEY,
`name` string,
`price` float
);
CREATE TABLE `order_` (
`id` integer PRIMAR... | true |
32e9a36788a06abbebb1f67ae56e4f812aa39ecf | SQL | jefferdo/Material-flow-with-quality-module | /sql/queries.sql | UTF-8 | 1,328 | 3.390625 | 3 | [] | no_license | use mFlow;
select * from woht;
SELECT id from woht ORDER BY id desc LIMIT 1;
SELECT id from umf ORDER BY id desc LIMIT 1;
INSERT INTO umf (id, priLev, passwd, name, lsl) VALUES ('001', '0', 'passwd1', 'name', CURRENT_TIMESTAMP()) ON DUPLICATE KEY UPDATE priLev = '0', passwd ='passwd2', name = 'name', lsl = CURRENT_TIME... | true |
e4d5c89d9059b50042f346477c3e2ef856b69865 | SQL | rarmand/project_dbPSQL | /files/sql/raporty.sql | UTF-8 | 4,279 | 3.859375 | 4 | [] | no_license |
/* widok w celu bezproblemowego wyświetlenia danych */
/* raport z kursów na najbliższe 3 dni na PIERWSZEJ STRONIE */
/* dane do konkretnego kursu: do wydruku dla kierowców i ogólnie */
/* widok kurs - kierowca I */
create view projekt.KursKierowca as select kurs_id, imie, nazwisko from projekt.kurs, projekt.kiero... | true |
029a64c2e1a2d184fb806cfc7cc5172235fbaaa1 | SQL | plawtr/emplary | /db/structure.sql | UTF-8 | 10,575 | 3.09375 | 3 | [] | no_license | --
-- 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;
--
-- Name: plpgsql; Type: EXTENSION; Schema: -; Owner: -
--
CREATE EXTENSION IF NOT EXISTS plpg... | true |
11d5fafbd249df9f766f9a324517f9e452362de7 | SQL | ZiyangJiao/JavaDev | /newsSite/tables.sql | UTF-8 | 4,555 | 3.359375 | 3 | [] | no_license | mysql> SHOW CREATE TABLE Comments;
+----------+-----------------------------------------------------------------------------+
| Table | Create Table |
+----------+-----------------------------------------------------------------------------+
| Comments |... | true |
314b4501f56c2a4d032d6029720d3521f04ec8fb | SQL | hieutrandn9889/DatabaseTesting | /testdb.sql | UTF-8 | 1,704 | 3.234375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.8.0
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Apr 20, 2018 at 01:57 AM
-- Server version: 10.1.31-MariaDB
-- PHP Version: 7.2.4
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD... | true |
c59d9ee05d7994734b2cc0b06e37444951c0a63e | SQL | chanchangxing/cityseletor | /selector/src/main/assets/district.sql | UTF-8 | 440,711 | 2.75 | 3 | [] | no_license | CREATE TABLE IF NOT EXISTS `district` (
`_id` tinytext,
`ParentId` tinytext,
`FullName` tinytext,
`Level` int(11) DEFAULT NULL
);
INSERT INTO `district` (`_id`, `ParentId`, `FullName`, `Level`) VALUES ('0','-1','中华人民共和国',0);
INSERT INTO `district` (`_id`, `ParentId`, `FullName`, `Level`) VALUES ('110000','0','... | true |
ad6aac2349a00bd12e14d02dc49ac7e2d63ffc2a | SQL | mertnuhoglu/study | /problem/data_generation/data/ddl_to_data_data_02.sql | UTF-8 | 708 | 2.578125 | 3 | [
"Apache-2.0"
] | permissive |
-- data generated by /usr/local/bin/datafiller version 2.0.0 (r792 on 2014-03-23) for postgresql
-- fill table order_line (2)
\echo # filling table order_line (2)
COPY order_line (shipment_date,irsaliye_kg,tesis,yas_toz) FROM STDIN (ENCODING 'utf-8');
2018-03-19 09:30:30 irsaliye_k tesis_1_ TRUE
2018-03-19 09:31:30 i... | true |
ff82eb5390c723d065dd8930fa04bc12f1e28945 | SQL | fernandoaurelio/ProjetoTwitter | /SQL/twitter.sql | UTF-8 | 4,689 | 2.890625 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.7.0
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: 02-Set-2017 às 18:53
-- Versão do servidor: 10.1.25-MariaDB
-- PHP Version: 7.1.7
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD... | true |
36edc0bfba2ee55d26e5dcc0dbba2c21c91dafa8 | SQL | channingbreeze/phaser-china | /table.sql | UTF-8 | 5,578 | 3.34375 | 3 | [] | no_license | CREATE TABLE `pc_example` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键',
`gmt_create` datetime DEFAULT NULL COMMENT '创建时间',
`gmt_modify` datetime DEFAULT NULL COMMENT '修改时间',
`type_id` bigint(20) DEFAULT NULL COMMENT '实例类型id',
`ex_name` varchar(128) DEFAULT NULL COMMENT '实例名字',
`pic_url` v... | true |
179d4bd2adc0ed767a42f9e4c09b80a11e4ac3bd | SQL | giovannicandido/audit-mq-collector | /src/main/resources/db/migration/V1__InitTables.sql | UTF-8 | 454 | 2.65625 | 3 | [
"Apache-2.0"
] | permissive | CREATE SEQUENCE audit_seq MINVALUE 1 INCREMENT 1;
CREATE TABLE audit_event
(
id BIGINT PRIMARY KEY DEFAULT nextval('audit_seq') NOT NULL,
action VARCHAR(200) NOT NULL,
application_name VARCHAR(50) NOT NULL,
date_time TIMESTAMP NOT NULL,
description VARCHAR(255),
ip VARCHAR(46),
resource_id V... | true |
0930602374d6b5b7c32ddcca485c0512d4937f56 | SQL | PaulSabia/Docker_Cassandra_FastAPI | /db-schema/init.cql | UTF-8 | 1,221 | 3.78125 | 4 | [] | no_license | -- Exécuter les commandes suivante dans le terminale depuis le repertoire parent pour copier les fichiers csv dans notre conteneur :
-- docker cp db-schema/restaurants.csv cassandra-c01:/restaurants.csv
-- docker cp db-schema/restaurants_inspections.csv cassandra-c01:/restaurants_inspections.csv
CREATE KEYSPACE IF NOT... | true |
9d4456599cea632cfb9b2ea2c82511c1b8d0d436 | SQL | rizal476/infomateri | /u5714801_infomateri.sql | UTF-8 | 9,484 | 3.28125 | 3 | [
"LicenseRef-scancode-unknown-license-reference",
"MIT"
] | permissive | -- phpMyAdmin SQL Dump
-- version 4.9.0.1
-- https://www.phpmyadmin.net/
--
-- Host: localhost:3306
-- Generation Time: Jan 22, 2020 at 06:34 PM
-- Server version: 10.2.30-MariaDB
-- PHP Version: 7.3.6
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 S... | true |
18ebfa32978894ca5d03c0f019c92836c61a718c | SQL | vasilyukleonid/otus_sql | /HW06/SQLQuery002.sql | WINDOWS-1251 | 1,093 | 4.125 | 4 | [] | no_license | -- ver 1
SELECT si.StockItemName
,SUM(il.Quantity) AS [AllQuantity]
,DATEPART(mm,i.InvoiceDate) AS InvM
FROM [Sales].[InvoiceLines] il
JOIN [Sales].[Invoices] i ON il.InvoiceID = i.InvoiceID AND DATEPART(yyyy,i.InvoiceDate) = 2016
JOIN Warehouse.StockItems si ON il.StockItemID = si.Sto... | true |
3d42bf9d49f78650c10dbd99c24290cf6e5a333f | SQL | Shengjie-Sun/LeetCode | /Database/1082-Easy-Sales Analysis I.sql | UTF-8 | 434 | 3.9375 | 4 | [] | no_license | # Write your MySQL query statement below
SELECT seller_id
FROM Sales
GROUP BY seller_id
HAVING SUM(price) = (SELECT SUM(price) AS price_sum
FROM Sales
GROUP BY seller_id
ORDER BY price_sum DESC
LIMIT 1)
/* Write your T-SQL qu... | true |
ee571dcd9728f88c717988b3b7926fd25fa2378f | SQL | samuelmoorec/database-exercises | /functions_exercises.sql | UTF-8 | 758 | 3.625 | 4 | [] | no_license | USE employees;
SELECT * FROM employees;
SELECT * FROM employees WHERE first_name = 'Irena' AND gender = 'm' OR first_name = 'Vidya' AND gender = 'm' OR first_name = 'Maya' AND gender = 'm' ORDER BY last_name ASC, first_name ASC;
SELECT CONCAT(first_name,' ',last_name) AS Emp_Names FROM employees WHERE last_name LIKE... | true |
a037239b2dbb115a0848a5c7fe8062c0e6a3cc7a | SQL | AnastasiaSakhno/lunchtime | /src/main/resources/db/migration/V11__create_days.sql | UTF-8 | 155 | 3.015625 | 3 | [] | no_license | CREATE TABLE days (
id BIGSERIAL PRIMARY KEY,
date DATE,
closed BOOL NOT NULL DEFAULT FALSE
);
CREATE UNIQUE INDEX days_date_uindex ON days (date);
| true |
fd8e2f268e14fad314dc30605ff9e7ad0ad2925e | SQL | ctopher-vargas/Bughound | /public/uploadfiles/bugs-2.sql | UTF-8 | 3,776 | 3.0625 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.9.2
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Generation Time: Apr 29, 2020 at 07:40 AM
-- Server version: 10.4.11-MariaDB
-- PHP Version: 7.2.26
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OL... | true |
c2f8a80cb491afe7bb6ab1b5f823ec82255a458b | SQL | anselmomgois/ControleEstoque | /Instalador Banco/Arquivos/101 - Gerar FK FK_INFM_PRO_FK_PRODCO_INFM_PRO.sql | UTF-8 | 398 | 2.6875 | 3 | [] | no_license | QUERYVALIDACAO select 1 from sys.sysreferences r join sys.sysobjects o on (o.id = r.constid and o.type = 'F') where r.fkeyid = object_id('INFM_PRODUTOFILIAL') and o.name = 'FK_INFM_PRO_FK_PRODCO_INFM_PRO'
BANCODEDADOS INFORMATIZ
alter table INFM_PRODUTOFILIAL
add constraint FK_INFM_PRO_FK_PRODCO_INFM_PRO foreign key... | true |
471c7ff1ca1ff57cc7321a6496e68fe74d2a2baa | SQL | rabieja/baza_i_hurtowania_danych | /03-zapytania/Okna/zapytanie_hurtownia2.sql | UTF-8 | 308 | 3.296875 | 3 | [] | no_license | SELECT DISTINCT zabieg_wymiar.nazwa, typ_zabiegu_wymiar.nazwa, salon_wymiar.nazwa, Count(id_zabieg) OVER (PARTITION BY typ_zabiegu_wymiar.id_typ_zabiegu, salon_wymiar.nazwa)
AS ile
FROM zabieg_wymiar, typ_zabiegu_wymiar, salon_wymiar
WHERE typ_zabiegu_wymiar.id_typ_zabiegu = zabieg_wymiar.id_typ_zabiegu | true |
00d2f06ab16c337f57bfc9ae4ec25493bce6e2b2 | SQL | DatuPuti/GenericSQL | /misc/PivotTable_example1.sql | UTF-8 | 1,192 | 4.1875 | 4 | [] | no_license | SELECT
OwnerID
, AnimalType
, Pet1Name = MAX([PetName1])
, Pet1Gender = MAX([Gender1])
, Pet1Breed = MAX([Breed1])
, Pet2Name = MAX([PetName2])
, Pet2Gender = MAX([Gender2])
, Pet2Breed = MAX([Breed2])
, Pet3Name = MAX([PetName3])
, Pet3Gen... | true |
90f85f5c4b496c1c6f76500e25500e5febd4fb59 | SQL | thananajem13/ajax- | /demo.sql | UTF-8 | 3,301 | 3.4375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 5.1.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Sep 18, 2021 at 06:31 PM
-- Server version: 10.4.19-MariaDB
-- PHP Version: 7.4.20
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIE... | true |
5457e64e739db44b23353841f65791a99ab33905 | SQL | Ankit281096/team-aniket | /health_centre.sql | UTF-8 | 2,723 | 2.96875 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.5.1
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Feb 05, 2017 at 10:35 AM
-- Server version: 10.1.16-MariaDB
-- PHP Version: 7.0.9
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLI... | true |
8499b99ab6836504ea4c76773c6b99891e388537 | SQL | geralddzx/genie-old | /genie.sql | UTF-8 | 761 | 3.765625 | 4 | [] | no_license | CREATE DATABASE genie;
\c genie;
CREATE TABLE public.articles(
id character varying PRIMARY KEY NOT NULL,
filename character varying NOT NULL,
published_at timestamp without time zone NOT NULL,
processed boolean NOT NULL DEFAULT false,
created_at timestamp without time zone NOT NULL,
updated_at timestamp ... | true |
f0b283a43cc6bf775915f48d99cb23a3317ca8e4 | SQL | elenst/mariadb-toolbox | /leveldb/storage_engine/type_int.inc | UTF-8 | 3,085 | 3.421875 | 3 | [] | no_license | #
# INT column types
#
--disable_query_log
let $db = `SELECT UUID_SHORT()`;
eval CREATE DATABASE `$db`;
eval USE `$db`;
--enable_query_log
--disable_warnings
# DROP TABLE IF EXISTS t1;
--enable_warnings
let $create_definition =
i INT $col_opts,
i0 INT(0) $col_opts,
i1 INT(1) $col_opts,
i20 INT(20) $col_opts,... | true |
9f19b0f534a06083d0031fe630fc9a1d22cab944 | SQL | AntoineCremel/ING4Files | /DB/ML1/database.sql | UTF-8 | 9,032 | 3.421875 | 3 | [] | no_license | USE ML1;
-- drop table CERTIFIED;
-- drop table EMPLOYEES;
-- drop table AIRCRAFTS;
-- drop table FLIGHTS;
create table FLIGHTS (
FLNO integer,
ORIGIN varchar(30),
DESTINATION varchar(30),
DISTANCE integer,
DEPARTS datetime,
ARRIVES datetime,
PRICE integer,
constraint FLIGHTS_PK prim... | true |
3815779bc3bab0bef942da487368df697bc8d428 | SQL | gxa/gxa | /atlas-updates/src/test/resources/uk/ac/ebi/gxa/db/TestOracleScriptSplitter-package_with_body.sql | UTF-8 | 743 | 3.078125 | 3 | [
"Apache-2.0"
] | permissive | CREATE OR REPLACE PACKAGE ATLASMGR IS
PROCEDURE DisableConstraints;
PROCEDURE EnableConstraints;
PROCEDURE DisableTriggers;
PROCEDURE EnableTriggers;
PROCEDURE RebuildSequence(seq_name varchar2);
PROCEDURE RebuildSequences;
PROCEDURE RebuildIndex;
PROCEDURE fix_sequence(tbl VARCHAR2, field VARCHAR2, seq... | true |
75ebb0d1f2e2671e25f6d0972c7a581b75b272dc | SQL | SoareClaudiu-Florin98/HomeworksCegeka | /Homework05_Car_Dealership_Part1/SQL_POPULATE_DATABASE.sql | UTF-8 | 2,912 | 2.53125 | 3 | [] | no_license | insert into CUSTOMER(Email, First_Name, Last_Name) VALUES ('soareclaudiuflorin@gmail.com', 'Claudiu-Florin','Soare') ;
insert into CUSTOMER(Email, First_Name, Last_Name) VALUES ('ilieadrian@gmail.com', 'Adrian','Ilie') ;
insert into CUSTOMER(Email, First_Name, Last_Name) VALUES ('creangaelena@gmail.com', 'Elena','Cre... | true |
3814a29867065bf816ece97ac131f73b73c30596 | SQL | htonus/cy.re | /db/user.sql | UTF-8 | 2,307 | 4.0625 | 4 | [] | no_license | CREATE TABLE "resource_type" (
"id" INTEGER NOT NULL,
"name" CHARACTER VARYING(16) NULL,
PRIMARY KEY("id")
);
CREATE SEQUENCE "resource_id";
CREATE TABLE "resource" (
"id" INTEGER NOT NULL default nextval('resource_id'),
"name" CHARACTER VARYING(16) NOT NULL,
"type_id" INTEGER NULL REFERENCES "... | true |
bb2f3c6e4cdafa888d69e72a6bdfd77e315be4a1 | SQL | zhiyu-co-ltd/dsp-web | /src/main/resources/sql/T_User.sql | UTF-8 | 1,880 | 3.265625 | 3 | [] | no_license | /*
Navicat MySQL Data Transfer
Source Server : localhost
Source Server Type : MySQL
Source Server Version : 50163
Source Host : localhost
Source Database : zhiyu
Target Server Type : MySQL
Target Server Version : 50163
File Encoding : utf-8
Date: 12/26/2016 16:07:11 PM... | true |
c8429a6f8c1fd8e995d8baac213567ec1ee9a2f1 | SQL | xzhonour/dsm_info | /localhost.sql | UTF-8 | 12,310 | 2.796875 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.7.3
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Generation Time: 2018-05-18 19:09:00
-- 服务器版本: 5.5.56-log
-- PHP Version: 7.1.12
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLI... | true |
c612b7cb67ed58bde69fdf1c876411f7eb449de9 | SQL | ANumbersGame/anumbersgame | /tests/attendance/0607.sql | UTF-8 | 1,821 | 3.640625 | 4 | [] | no_license | use DebateResults0607;
alter table MasterTournaments
drop column DistrictQual;
alter table MasterTournaments
add column DistrictQual
int null
default null
unique key
comment 'Not null if tournament is district NDT qualifier';
update MasterTournaments
set DistrictQual = 1
where TourneyName = 'NDT D1 Qualifer & Califi... | true |
277893239c271be1b3567a377c4d655246ea12bd | SQL | sshambar/jinzora3 | /install/jinzora.sql | UTF-8 | 8,595 | 3.5625 | 4 | [] | no_license | -- Database: `jinzora3`
--
--
-- Table structure for table `jz_discussions`
--
CREATE TABLE
jz_discussions
(
my_id int NOT NULL default 0,
date_added int default NULL,
my_user varchar(32) default NULL,
comment text,
path varchar(255) default NULL,
PRIMARY KEY (my_id)
);
--
--... | true |
ec4a4ff9a97af4fed028a2e1d580a441e08b02cd | SQL | Chris-Mk/MySQL-Database | /minions.sql | UTF-8 | 782 | 3.6875 | 4 | [] | no_license | CREATE SCHEMA minions;
USE minions;
CREATE TABLE Minions (
id INT NOT NULL PRIMARY KEY AUTO_INCREMENT,
name VARCHAR(50),
age INT
);
CREATE TABLE Towns (
id INT NOT NULL PRIMARY KEY AUTO_INCREMENT,
name VARCHAR(50)
);
ALTER TABLE Minions ADD COLUMN town_id INT;
ALTER TABLE Minions ADD FOREIGN KEY (town_... | true |
e096906e1f04798b2fd9e788b189349a61979442 | SQL | leebyron/alasql | /test-sql/chinook/test006.sql | UTF-8 | 166 | 3.4375 | 3 | [
"MIT",
"MS-PL"
] | permissive | SELECT VALUE COUNT(*) FROM (
SELECT * from TableA
FULL OUTER JOIN TableB
ON TableA.name = TableB.name
WHERE TableA.id IS null
OR TableB.id IS null;
);
ASSERT 1;
| true |
3084a664de4c0ef6199d8a905f16ec93bf6da792 | SQL | truonghoangthuan/web-technologies | /lab04/books.sql | UTF-8 | 2,758 | 3.359375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.9.7
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Generation Time: Sep 14, 2021 at 03:01 AM
-- Server version: 8.0.22
-- PHP Version: 7.4.16
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACT... | true |
bd99be990ebc6b77946f1de4c9b566bdcc452e1e | SQL | adamrotal/SaleProject | /database/onlineShop.sql | UTF-8 | 6,054 | 2.71875 | 3 | [] | no_license | -- MySQL dump 10.13 Distrib 5.7.15, for Linux (x86_64)
--
-- Host: localhost Database: onlineshop
-- ------------------------------------------------------
-- Server version 5.7.15-0ubuntu0.16.04.1
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER... | true |
1b66c0bff1af052f7fc3dbd5e493705e9b5a31c7 | SQL | Donahuec/Archives-Projects | /INDEX_SEARCH/sql_implementation/get_revision_history.sql | UTF-8 | 1,487 | 4.03125 | 4 | [] | no_license | DROP PROCEDURE IF EXISTS get_revision_history;
DELIMITER //
CREATE PROCEDURE get_revision_history(collectionNumber INT)
BEGIN
/*
Create a temporary table that holds the information from revision history.
A temporary table is a table that does not actually get stored in/ modify the database.
It gets deleted ... | true |
784c39347c6c358f984b733f683f2f5a9d71de9d | SQL | Leedayoung/airticketDB | /sqlScripts/check1.sql | UTF-8 | 389 | 4.03125 | 4 | [] | no_license | Select CName from client where CID IN
(Select A.CID from (
Select * from airticket where LID IN
( Select LID from airline where LUnion = 'SKYTEAM')
) A GROUP BY CID having sum(TMileage) >=150
);
Select CName from airline, airticket, client where
airline.LUnion = 'SKYTEAM' AND airticket.LID = airline.LID
AND airticket... | true |
422f9ffef226a039dfac6d09d9a4973d5bbc05ec | SQL | crondon421/TimeClock | /WebContent/sql/SQLQueries.sql | UTF-8 | 1,113 | 4.03125 | 4 | [] | no_license |
/*
* returns clock in/out times with hours worked for each shift
* */
SELECT i.EmployeeId as "Employee ID",
e.FirstName as "First Name",
e.LastName as "Last Name",
i.PunchTime as "PunchIn",
o.PunchTime as "PunchOut",
TIMEDIFF(o.punchTime ,i.punchTime) as "hours worked"
FROM clock as i... | true |
df9ef3abaea9abff9edfe73980b5873b2eb5fead | SQL | nguyenducmanh99/SQL- | /Trainning SQL/test4.sql | UTF-8 | 994 | 3 | 3 | [] | no_license | -- Baitap1
DROP DATABASE IF EXISTS Fresher ;
CREATE DATABASE Fresher ;
USE Fresher ;
-- Tao bang TRAINEE
CREATE TABLE `TRAINEE` (
Trainee_ID INT AUTO_INCREMENT PRIMARY KEY,
Full_Name VARCHAR (50) NOT NULL,
Birth_Date DATETIME,
Gender ENUM('MALE','FEMALE','UNKNOW'),
ET_IQ ... | true |
114994c804b1cb8f61d8624a777566f802d87461 | SQL | joebm2018/nuevoRepo | /semana 13/dia 6/script generarBD y Tablas.sql | UTF-8 | 1,920 | 3.390625 | 3 | [] | no_license | create database registroAccidentes;
use registroAccidentes;
create table Policia(
idPolicia int not null auto_increment primary key,
nombre varchar(45) not null,
grado varchar(20) not null,
inicioActividad date not null);
-- Agregar datos a la tabla
insert into registroAccidentes.policia
(idPolicia,nombre,grado,inicio... | true |
1efdb14c3b5c67a9705ff78353a34bbd41bdf7d0 | SQL | Kathiana/Docker_compose | /mysql/sql/lampdb.sql | UTF-8 | 893 | 3.375 | 3 | [] | no_license | -- tworzymy nową bazę danych `lampdb`
CREATE database IF NOT EXISTS lampdb CHARACTER SET utf8;
USE lampdb;
-- tworzymy tabelę `users` do przechowywania przykładowych użytkowników
CREATE TABLE IF NOT EXISTS users(
id INT AUTO_INCREMENT PRIMARY KEY,
username VARCHAR(255) NOT NULL,
password VARCHAR(255) NOT NU... | true |
8e8f968d4f97faa95693c4f2086bd5e32a7245d4 | SQL | MariyaKaramatova/Warehouse-Manager | /warehouseDB.sql | UTF-8 | 3,252 | 3.53125 | 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 mydb
-- -... | true |
2912f61275576d17acf10dabcd3749ee3023f3c9 | SQL | radtek/abs3 | /sql/mmfo/bars/Table/ebk_queue_updatecard.sql | WINDOWS-1251 | 3,800 | 3.015625 | 3 | [] | no_license |
PROMPT =====================================================================================
PROMPT *** Run *** ========== Scripts /Sql/BARS/Table/EBK_QUEUE_UPDATECARD.sql =========***
PROMPT =====================================================================================
PROMPT *** ALTER_POLICY_INFO... | true |
e5c8830ccc6a9d0d456b5b1da6418bb6339f0023 | SQL | barbalex/apf2 | /sql/apflora/one_offs/2019-11-29_tpop_sums.sql | UTF-8 | 2,477 | 3.90625 | 4 | [
"ISC"
] | permissive | select
tax.artname,
pop.nr as pop_nr,
tpop.nr as tpop_nr,
anzahl.*
from crosstab($$
select tpop_id, zaehleinheit, anzahl
from
(select distinct on (apflora.tpop.id, apflora.tpopkontrzaehl_einheit_werte.text)
apflora.tpop.id as tpop_id,
apflora.tpopkontrzaehl_einheit_werte.text as zaehleinhe... | true |
d5db6a3ae5fb1db2f8e1da763ebece36ac462ba2 | SQL | ronyfrias05/Programacion2019_RonyF | /modulo_3/app2.sql | UTF-8 | 4,099 | 2.78125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.8.4
-- https://www.phpmyadmin.net/
--
-- Servidor: 127.0.0.1
-- Tiempo de generación: 17-09-2019 a las 18:14:09
-- Versión del servidor: 10.1.37-MariaDB
-- Versión de PHP: 7.2.13
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";... | true |
8af94280a822c7ff32d0a86f336ebd11fdfd220e | SQL | Datawalke/Coordino | /app/config/sql/coordino.sql | UTF-8 | 9,783 | 3.453125 | 3 | [
"MIT"
] | permissive | --
-- Table structure for table `badges`
--
CREATE TABLE IF NOT EXISTS `badges` (
`id` int(10) NOT NULL AUTO_INCREMENT,
`title` varchar(255) NOT NULL,
`description` text NOT NULL,
`timestamp` int(12) NOT NULL,
`user_id` int(12) NOT NULL,
`image` varchar(100) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM D... | true |
f3106a259462a51177b60639228da63ba8569083 | SQL | daniels600/Prison_Breakers | /sql/EKD02792022.sql | UTF-8 | 3,774 | 3.4375 | 3 | [] | no_license | create database EKD02792022;
use EKD02792022;
CREATE TABLE ADMIN_LOGIN (admin_id int auto_increment primary key, email varchar(60) not null, password varchar(80) not null);
insert into ADMIN_LOGIN(email,password) values('admin@gov.com',"$2y$10$c7CFSjKUkXm8DVRFD.0jqufuNXt7modU/9aZjO6z7AY4xR/T32KPi");
CREATE TABLE ... | true |
cd7891492013b2ef766318cbf9d24e1ab8837c99 | SQL | jianfengWork/my-react | /project/manager.sql | UTF-8 | 1,389 | 3.1875 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.8.3
-- https://www.phpmyadmin.net/
--
-- 主机: 127.0.0.1:3306
-- 生成日期: 2018-12-22 14:15:49
-- 服务器版本: 5.7.23
-- PHP 版本: 7.2.10
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_S... | true |
f2049c07a09031d26b9aea2f3a159183460dd55b | SQL | pjflameboy/phprecipebook | /sql/upgrade/recipedb-3.00-4.00.sql | UTF-8 | 4,822 | 3.671875 | 4 | [] | no_license | DROP TABLE security_members;
DROP TABLE security_groups;
ALTER TABLE security_users DROP PRIMARY KEY;
ALTER TABLE security_users ADD user_id INT NOT NULL AUTO_INCREMENT Key;
CREATE TABLE security_providers (
provider_id INT NOT NULL AUTO_INCREMENT,
provider_name VARCHAR(64) NOT NULL UNIQUE,
PRIMARY KEY (provider_id... | true |
151518faa41015d73d791b6f1308d23750b213f0 | SQL | rong9x/Module-2-Java-Web-Back-end | /session9/Work_with_table/script.sql | UTF-8 | 560 | 3.5 | 4 | [] | no_license | CREATE TABLE contacts
(
contact_id INT(11) NOT NULL AUTO_INCREMENT,
last_name VARCHAR(30) NOT NULL,
first_name VARCHAR(25),
birthday DATE,
CONSTRAINT contacts_pk PRIMARY KEY (contact_id)
);
create table suppliers
(
supplier_id int(11) not null auto_increment,
supplier_name varchar(50) not null,
account_rep varchar(30)... | true |
87093c248f4aad68fc58c8d429e11f9c10d58e0d | SQL | Himanshu396/SQL-_Go | /procedure.sql | UTF-8 | 533 | 3.46875 | 3 | [] | no_license | DELIMITER $$
CREATE FUNCTION loan_branch(
amt int
)
RETURNS VARCHAR(20)
DETERMINISTIC
BEGIN
DECLARE loan_branch VARCHAR(20);
IF amt > 40 THEN
SET loan_branch = 'b5';
ELSEIF (amt <= 40 AND
amt >= 30) THEN
SET loan_branch = 'b7';
ELS... | true |
a8e625f35fba20cb08cc9aabdc4ac6e179ff162e | SQL | vokhotnikov/sevstone-play | /conf/evolutions/default/1.sql | UTF-8 | 3,801 | 3.3125 | 3 | [
"MIT"
] | permissive | # --- !Ups
create table "articles" ("title" VARCHAR(254) NOT NULL,"summary" text NOT NULL,"text" text NOT NULL,"image_id" BIGINT NOT NULL,"added_at" TIMESTAMP NOT NULL,"id" SERIAL NOT NULL PRIMARY KEY);
create table "categories" ("parent_id" BIGINT,"title" VARCHAR(254) NOT NULL,"is_hidden" BOOLEAN NOT NULL,"sort_prior... | true |
989d49a897e24a10201cb3472034c1507f72b39d | SQL | ysh3718/com | /WebContent/board/boardr.sql | UTF-8 | 463 | 3.171875 | 3 | [] | no_license |
create database jspdb;
create user 'jspbook'@'localhost' identified by '1234';
use jspdb;
create table BoardR (
id int not null auto_increment,
category varchar(10),
userName varchar(20),
title varchar(20),
ddate VARCHAR(50),
ppasswd VARCHAR(50),
content varchar(100),
groupId int,
primary key (id)
) cha... | true |
84610833a87e7c6259bf829a9716d0335d93e93f | SQL | MikeAcesse/mybatis-demo | /src/mysql.sql | UTF-8 | 770 | 2.921875 | 3 | [] | no_license | CREATE DATABASE ssmdemo;
DROP TABLE IF EXISTS tb_user;
CREATE TABLE tb_user (
id char(32) NOT NULL,
user_name varchar(32) DEFAULT NULL,
password varchar(32) DEFAULT NULL,
name varchar(32) DEFAULT NULL,
age int(10) DEFAULT NULL,
sex int(2) DEFAULT NULL,
birthday date DEFAULT NULL,
created datetime DEFAULT NULL,
updated... | true |
e53a3478c756cb3078fb5fb265de3967e53fe469 | SQL | shukerski/MoreEachDay | /src/com/resources/create_database.sql | UTF-8 | 951 | 3.640625 | 4 | [] | no_license | CREATE DATABASE IF NOT EXISTS more_each_day;
USE more_each_day;
CREATE TABLE `users` (
`id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
`username` VARCHAR(255) NOT NULL,
`email` VARCHAR(255) NOT NULL,
`password` VARCHAR(255) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE `tasks` (
`id`... | true |
56da4998bf104a00d0f9aba6d78d69ebf6a70b7e | SQL | leeshtao/learngit | /springboot-employee/springboot-employee.sql | UTF-8 | 762 | 3.328125 | 3 | [] | no_license | SET FOREIGN_KEY_CHECKS=0;
DROP database IF EXISTS springboot_employee;
create database springboot_employee;
use springboot_employee;
-- ----------------------------
-- Table structure for employee
-- ----------------------------
DROP TABLE IF EXISTS `employee`;
CREATE TABLE `employee` (
ID bigint(20) not null auto_... | true |
67714dee7ba3918fa365ad6acc0cb18b9c53b743 | SQL | wilsonyanez/afcmov | /03 db/postgres/181006_MAG-POS-crear-db_mov-afc.sql | UTF-8 | 38,900 | 3.671875 | 4 | [] | no_license | /*==============================================================*/
/* DBMS name: PostgreSQL 8 */
/* Created on: 16/10/2018 14:14:40 */
/*==============================================================*/
/*
drop table public.dpa;
drop table public.cialco... | true |
9c3b234e338e7df23ac42b5a15ee71a1ac9093ad | SQL | cheetboy159/employee-tracker | /db/employeeSeeds.sql | UTF-8 | 1,058 | 2.9375 | 3 | [] | no_license | USE employee_db;
INSERT INTO department (name) VALUES ("Clinical Engineering");
INSERT INTO department (name) VALUES ("Facilities");
INSERT INTO department (name) VALUES ("HR");
INSERT INTO department (name) VALUES ("IT");
INSERT INTO role (title, salary, department_id) VALUES ("Clinical Engineer Tech", 70000, 1);
IN... | true |
c0c2741d934d7ea3447e0f92f0931a83760f7569 | SQL | twebb667/AMChecks | /mixed_prod_nonprod_servers.sql | UTF-8 | 1,053 | 3.921875 | 4 | [] | no_license | --
-- Noddy report showing servers that have a mix of production and non-production databases on them
--
-- Tony Webb 03 May 2017
--
SET LINES 120
SET PAGES 1000
COL database_name HEADING "DB"
COL physical_server_abbrev FORMAT a20 HEADING "SERVER"
COL production_ind FORMAT a6 HEADING "PROD?"
BREAK ON physical_server_a... | true |
fff46cfa90989e6a9112b5b6771041d68d23ce3e | SQL | sayurimatsumoto/Gerenciamento-de-Estoque | /sqlScripts/insertItemProduto.sql | UTF-8 | 5,974 | 2.8125 | 3 | [] | no_license | CREATE TABLE itemProduto (
codProduto SERIAL NOT NULL,
dataValidade DATE NOT NULL,
dataCompra TIMESTAMP DEFAULT CURRENT_TIMESTAMP NOT NULL,
quantidadeItem INT NOT NULL DEFAULT 0,
precoItem REAL,
unidade VARCHAR(50) NOT NULL,
FOREIGN KEY (unidade) REFERENCES unidadeMedida(unidade),
FOREIGN KEY (codProduto) RE... | true |
25d65167d9f0c6dafc58ac6b7f6a1f1f66f4c2cc | SQL | jupmorenor/201220-padv-proyectofinal | /Bingo/src/db/ConsultatabladePuntuacionGlobal.sql | UTF-8 | 199 | 3.5625 | 4 | [] | no_license | SELECT u.nombreUsuario, COUNT(p.descPartida)
FROM personabingo u, partidasganadas p, tipopersona t
WHERE t.idTipoPersona=u.fk_idTipoPersona AND
u.idUsuario=p.fk_idUsuario
GROUP BY u.nombreUsuario | true |
d5678f2a43e141f7cb603b1503f95235a54e6c8f | SQL | minhngo1701/C0421G1_NgoNhatMinh_Module | /module_3/case_study_sql/query.sql | UTF-8 | 15,766 | 4.3125 | 4 | [] | no_license | USE furama_management;
SET SQL_SAFE_UPDATES = 0;
-- 2. Hiển thị thông tin của tất cả nhân viên có trong hệ thống có tên bắt đầu là một trong các ký tự “H”, “T” hoặc “K” và có tối đa 15 ký tự.
SELECT *
FROM employee
WHERE (substring_index(employee_name, ' ', -1) LIKE 't%' or substring_index(employee_name, ' ', -1) LIKE... | true |
89a1ca241a37222334904beb99ac0c803570ba6d | SQL | MCPutro/pinjaman | /tubespbo.sql | UTF-8 | 2,828 | 3.015625 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.6.5.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: May 01, 2017 at 06:50 PM
-- Server version: 10.1.21-MariaDB
-- PHP Version: 5.6.30
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SE... | true |
82195306feca3a92aea00d60060430f87ee0a02a | SQL | DGolovorushko/1030217-yeticave-9 | /schema.sql | UTF-8 | 1,678 | 3.859375 | 4 | [] | no_license | CREATE DATABASE yeticave
DEFAULT CHARACTER SET utf8
DEFAULT COLLATE utf8_general_ci;
USE yeticave;
CREATE TABLE categories (
id_category int (10) AUTO_INCREMENT,
name varchar(20),
symbol_code varchar(20),
PRIMARY KEY (id_category)
);
CREATE TABLE users (
id_user int (10) AUTO_INCREMENT,
registration_date datet... | true |
100742999870931b0d91f5e1c5587b3775a5d876 | SQL | Hyderabad2017/team-19 | /DatabaseSchema/learningcurve.sql | UTF-8 | 5,075 | 2.734375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.4.14
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Jul 15, 2017 at 03:43 PM
-- Server version: 5.6.26
-- PHP Version: 5.5.28
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;... | true |
3d657d90c0d7642999a579d426e1601977625cbd | SQL | jinyoung1704/WebBasic | /WebBasic/Oracle/day2.sql | UTF-8 | 1,610 | 3.75 | 4 | [] | no_license | select sysdate
from dual;
-- 하루 뒤 , 한시간 뒤, 1초뒤
select a.insert_Datetime +1, a.insert_datetime + 1/24 , a.insert_datetime + 1/24/60
from employee a;
--한 달 후 , 날짜만 , 오늘 이후 수요일
select add_months(a.insert_Datetime, 1),trunc(add_months(a.insert_Datetime, 1)), next_day(sysdate,'수')
from employee a;
--날짜를 문자열타... | true |
cea57dbcb1f240a3bb474ba096212593e5f5669e | SQL | hello-sources/Coding-Training | /LeetCode/2066账户余额.sql | UTF-8 | 248 | 3.5625 | 4 | [] | no_license | # Write your MySQL query statement below
select account_id, day, sum(case when type = 'Deposit' then amount
when type = 'Withdraw' then -amount end) over (partition by account_id order by day) balance
from Transactions
order by account_id, day; | true |
576eb15901c35808c26b2774291ff6a5372272e2 | SQL | fstanchese/corporativo | /corporativo/sql/CurrOfe/CurrOfe_qPLetivo.sql | UTF-8 | 284 | 3.03125 | 3 | [] | no_license | select
Distinct(Curso.Nome) as Curso
from
curso,
curr,
currofe
where
Curso.CursoNivel_Id = nvl( p_CursoNivel_Id ,0)
and
Curso.Id = Curr.Curso_Id
and
Curr.Id = CurrOfe.Curr_Id
and
CurrOfe.Campus_Id = nvl( p_Campus_Id ,0)
and
CurrOfe.PLetivo_Id = nvl( p_PLetivo_Id ,0) | true |
0c1fe6342a19339b30414a0ec3016e05d381d29b | SQL | caweinshenker/Stock-Picker | /db/make-stock-picker.sql | UTF-8 | 1,961 | 4.40625 | 4 | [] | no_license | /* Drop tables with foreign keys first to
maintain referential integrity
*/
delete from stock_prices;
drop table stock_prices;
delete from stock_dividends;
drop table stock_dividends;
delete from stock_volumes;
drop table stock_volumes;
delete from stocks;
drop table stocks;
delete from text;
drop table text;
... | true |
d3deb0af1caf6bd77a5208971fa8534896faafb2 | SQL | java-plus/gestion-des-transports | /GenerationDB_GDT.sql | UTF-8 | 4,553 | 3.171875 | 3 | [] | no_license | CREATE DATABASE gestion_transport;
USE gestion_transport;
CREATE TABLE `UTILISATEUR` (
`uti_id` int(11) PRIMARY KEY NOT NULL AUTO_INCREMENT,
`uti_statut` enum('collaborateur','chauffeur','admin') NOT NULL,
`uti_nom` varchar(45) NOT NULL,
`uti_prenom` varchar(45) NOT NULL,
`uti_email` varchar(100) NOT NULL UNIQUE ... | true |
50fa8e6856d82c82283d50609d922852167d4cba | SQL | shobhit-nigam/mass_anime | /sql/day2/13.sql | UTF-8 | 152 | 3.125 | 3 | [] | no_license | SELECT
lastname,
firstname,
jobtitle,
officeCode,
reportsTo
FROM
employees
WHERE
(officeCode = 6
AND reportsTo = 1088)
OR firstName LIKe 'Ge%'
| true |
ae845ba7a545f9a030ded34ceef3d3ec7772cda4 | SQL | otaiwo10000/FintrakRevoMerg9----KeyStone | /Database/Fintrak.Database.Main/SPP/MPR/MPR_BS/spp_upload_mpr_gl_mapping.sql | UTF-8 | 895 | 3.65625 | 4 | [] | no_license | Create proc spp_upload_mpr_gl_mapping
( @GLCode varchar(50),
@Caption varchar(200),
@CompanyCode varchar(50),
@username varchar(50)
)
as
If @CompanyCode is null or @CompanyCode = ''
Begin
Set @CompanyCode = (Select top 1 code from cor_company order by CompanyId )
End
If Not Exists (Select * from mpr_gl_mapp... | true |
b1adee1a362e5047f029510298d410a13630c2ad | SQL | Manish-Pandya/USC | /db/migrations/1013.3_apply_room_types_dml.sql | UTF-8 | 189 | 2.65625 | 3 | [] | no_license | -- Set all Rooms as research labs
UPDATE `room` SET `room_type` = 'RESEARCH_LAB'
WHERE `room_type` IS NULL;
select concat ("Updated ", row_count(), " room as RESEARCH_LAB type") as '';
| true |
881ec1a8af692a5749bb283bd3430fb5285cd3b8 | SQL | aysussozenn/MSSQL-Practices | /TransactionPractice5.sql | UTF-8 | 226 | 3.390625 | 3 | [] | no_license | SET STATISTICS IO ON
SELECT
ProductID
, MAX(Quantity) AS TotalQuantity
, MIN(TransactionId) AS MinTransactionId
FROM Production.TransactionHistory
WHERE TransactionType = 'P'
GROUP BY ProductID
ORDER BY ProductID DESC | true |
387e524cf02a07aa69d51b09785e8d0a1e4a8090 | SQL | Noilty/fis-php-test-task | /dump_fis.sql | UTF-8 | 15,002 | 3.421875 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Хост: 127.0.0.1:3306
-- Время создания: Ноя 09 2020 г., 18:42
-- Версия сервера: 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 |
a27d65f93a36b59869a22d6c440611e84c8b9bc0 | SQL | MrBearTW/TCFST | /SQL/Ch7.sql | UTF-8 | 952 | 3.265625 | 3 | [] | no_license | use company;
use id2909570_tcfst;
select * from 員工資料表 where 員工編號=8;
select 員工編號 ,姓名, 薪水
from 員工資料表
where 薪水 > 15000;
select *
from 員工資料表
where 姓名 like "陳%" and 薪水 > 10000
order by 員工編號 desc;
select avg(薪水)
from 員工資料表
where 員工編號 > 11 and 員工編號 < 17;
select *
from 員工資料表
inner join 親屬資料表 on 員工資料表.員工編號 = 親屬資料表.員工編號
whe... | true |
4c3644755e93875d3ae7fa0aee02fb45291a6d85 | SQL | josepitteloud/VESPA | /ad_hoc/BB Churn process/Original code/Proc_FORECAST_TA_PC_Conversion.sql | UTF-8 | 2,918 | 3.640625 | 4 | [] | no_license | /*Create variable Y3W52 integer;
Set Y3W52 = 201624;
-- First you need to impersonate CITeam
Setuser CITeam;
*/
Drop procedure if exists Forecast_PC_Conversion_Rates;
Create procedure Forecast_PC_Conversion_Rates(In Y3W52 integer)
Result(CusCan_Forecast_Segment varchar(50)
,Total_TA_DTV_PC integer,Total_TA_SkyPlus_S... | true |
90521f0e5bd9c11443b07119ec67fd954e269489 | SQL | n0ir1/dream | /prisma/migrations/20210622170439_added_host/migration.sql | UTF-8 | 203 | 2.515625 | 3 | [
"MIT"
] | permissive | -- AlterTable
ALTER TABLE "SpotifyMode" ADD COLUMN "hostId" TEXT;
-- AddForeignKey
ALTER TABLE "SpotifyMode" ADD FOREIGN KEY ("hostId") REFERENCES "User"("id") ON DELETE SET NULL ON UPDATE CASCADE;
| true |
aff1aafd046d7d31d0aff995c3f1f0214733113b | SQL | keremdincer/workflow | /prisma/migrations/20210506095151_init/migration.sql | UTF-8 | 3,960 | 3.984375 | 4 | [] | no_license | -- CreateTable
CREATE TABLE "User" (
"id" INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
"email" TEXT NOT NULL,
"firstName" TEXT NOT NULL,
"lastName" TEXT NOT NULL,
"password" TEXT NOT NULL,
"active" BOOLEAN NOT NULL
);
-- CreateTable
CREATE TABLE "RefreshToken" (
"id" INTEGER NOT NULL PRIMARY... | true |
ad82106181fc314ae21fc9d9e1ceb4b59fea3611 | SQL | hortonworks/cloudbreak | /secret-rotation/src/main/resources/schema/rotation/20230729163000_CB-21512_add_secretrotationstepprogress.sql | UTF-8 | 501 | 2.8125 | 3 | [
"LicenseRef-scancode-warranty-disclaimer",
"ANTLR-PD",
"CDDL-1.0",
"bzip2-1.0.6",
"Zlib",
"BSD-3-Clause",
"MIT",
"EPL-1.0",
"LicenseRef-scancode-proprietary-license",
"LicenseRef-scancode-jdbm-1.00",
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | -- // secret rotation step progress
-- Migration SQL that makes the change goes here.
CREATE TABLE IF NOT EXISTS secretrotationstepprogress (
id bigserial NOT NULL,
created bigint,
finished bigint,
resourcecrn character varying(255),
secrettype character varying(255),
secretrotationstep charact... | true |
39b9a9965a33f7849f392b2534c0b4d03e7dcef4 | SQL | enamba/janamesa | /application/data/update/done/2011/upgrade-1.01-done.sql | UTF-8 | 9,629 | 3.1875 | 3 | [] | no_license | /**
* Increase version
*/
INSERT INTO `version` VALUES (NULL, NULL);
/**
* Database upgrade v1.1
*
* @author vpriem
*/
ALTER TABLE `admin_access_rights`
ADD INDEX `fkGroupId` (`groupId`),
DROP INDEX `resourceId`,
ADD INDEX `fkResourceId` (`resourceId`);
ALTER TABLE `admin_access_users`
ADD INDEX... | true |
305a0d87919725826e4450578d9ae24cbf69e27a | SQL | aus/coderloop | /university/university/newstudent.sql | WINDOWS-1250 | 1,397 | 3.578125 | 4 | [] | no_license | INSERT INTO students (name, surname, email, faculty, matriculation, sid) VALUES (?, ?, ?, ?, ?, ?);
-- Notes: GOOD.
-- Add a new student
--
-- Write a query to add a new student into the database. The query has 6 parameters.
-- 1. query: name, surname, email, faculty, year, student id
-- E.g.: (query, mark, bl... | true |
7880a36cedd4505b3d3c8d0da6b7c335e426124d | SQL | sh/fragments-user | /migrations/20150721180909-invites.sql | UTF-8 | 298 | 3.09375 | 3 | [
"MIT"
] | permissive | -- invite requests
CREATE TABLE waitlist(
id BIGSERIAL PRIMARY KEY,
email citext UNIQUE NOT NULL CHECK (email <> ''),
created_at timestamptz NOT NULL
);
CREATE TABLE invite(
id BIGSERIAL PRIMARY KEY,
waitlist_id BIGINT NULL REFERENCES waitlist(id),
created_at timestamptz NOT NULL
);
| true |
ed12b52e38c9e480fe33ad2925919ce7e1930265 | SQL | Paulo-Sergio/trilhaJavaWebProjetoSpringMVC4 | /WebContent/resources/aluraprojetospringmvc4.sql | UTF-8 | 1,901 | 3.03125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.1.14
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: 04-Maio-2016 às 22:17
-- Versão do servidor: 5.6.17
-- PHP Version: 5.5.12
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */... | true |
a6aca1ddb6343226a06c0ec672ec08b163acdf9f | SQL | autumnalkitty/spring_work | /Spring03_MyBatis/src/main/webapp/WEB-INF/table.sql | UTF-8 | 1,207 | 3.578125 | 4 | [] | no_license | -- 상품 테이블
CREATE TABLE shop(
num NUMBER PRIMARY KEY, --상품번호
name VARCHAR2(30), --상품이름
price NUMBER, --상품가격
stock NUMBER CHECK(stock >= 0) --재고 개수
);
-- 고객 계좌 테이블
CREATE TABLE client_account(
id VARCHAR2(30) PRIMARY KEY, --고객의 id
money NUMBER CHECK(money >= 0), --고객의 잔고
point NUMBER
);
-- 주문 테이... | true |
b9f88435f1d38d65f76e92edc89feeb9e250c12d | SQL | Armsign/PLTravers | /DB_001.sql | UTF-8 | 5,075 | 3.78125 | 4 | [] | no_license | --
-- Table structure for table LOGIN
--
DROP TABLE IF EXISTS LOGINS;
CREATE TABLE LOGINS (
ID bigint(20) UNSIGNED ZEROFILL NOT NULL AUTO_INCREMENT,
EMAIL varchar(254) NOT NULL,
IS_ACTIVE int(11) NOT NULL DEFAULT 0,
PREFERRED_NAME varchar(1024) NOT NULL,
PASSWORD varchar(1024) NOT NULL,
SESSION ... | true |
b42132325fc57f5b13a661c864385b07eafa567a | SQL | TrifShterev/MS-SQL | /ExamPrep2706/27.06EXAM.sql | UTF-8 | 1,841 | 3.984375 | 4 | [] | no_license |
CREATE TABLE Clients
(
ClientId INT PRIMARY KEY Identity,
FirstName VARCHAR(50) NOT NULL,
LastName VARCHAR(50) NOT NULL,
Phone CHAR(12) CHECK(LEN(Phone)=12) NOT NULL
)
CREATE TABLE Mechanics
(
MechanicID INT PRIMARY KEY IDENTITY,
FirstName VARCHAR(50) NOT NULL,
LastName VARCHAR(50) NOT NULL,
Address VARCHAR(255) NOT... | true |
958f885082b102da8f7b3194fc3b7af73178a608 | SQL | FerDev97/SICA | /pages/myphp-backup-files/respaldo-sica-18012019-075649-am.sql | UTF-8 | 14,953 | 2.96875 | 3 | [] | no_license | CREATE DATABASE IF NOT EXISTS `sica`;
USE `sica`;
SET foreign_key_checks = 0;
DROP TABLE IF EXISTS `estadoinscrip`;
CREATE TABLE `estadoinscrip` (
`id_estadoinscrip` int(11) NOT NULL AUTO_INCREMENT,
`estado` int(11) NOT NULL,
PRIMARY KEY (`id_estadoinscrip`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=la... | true |
7a1343ebf848a1dd621165a0664c1630cc7544ea | SQL | fangngng/CIA2017changes | /Staging_test.sql | UTF-8 | 9,920 | 3.734375 | 4 | [] | no_license |
SELECT * FROM dbo.WebChartTitle
where LinkChartCode = 'c120'
SELECT * FROM dbo.OUTPUT
select c.*,p.chartIdx,p.IsShow,wp.Code as SectionTitle
from webpagechart p
inner join WebChart c on p.LinkChartCode=c.Code
left join WebPage wp on p.SectionId=wp.Id
where p.LinkPageId=11 and p.IsShow='y' and p.LinkChartCode in (s... | true |
5801b052ea3e2c369e68a53109fe4d145966aa1f | SQL | CUBRID/cubrid-testcases | /sql/_14_mysql_compatibility_2/_04_table_related/_02_alter_change_column/_37_type_int_strict/cases/int_to_char_nchar.sql | UTF-8 | 4,158 | 3.46875 | 3 | [
"BSD-3-Clause"
] | permissive | --+ holdcas on;
---- ALTER TABLE ... CHANGE COLUMN , type change : INT to CHAR
-- constraints : no constraints
-- ordering : no order defined
-- name : same name or changed
set system parameters 'alter_table_change_type_strict=yes';
set system parameters 'error_log_level=warning';
set system parameters 'error_log_wa... | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.