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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
ea92be6a1067f0b43d6ea89f67bba92a59085995 | SQL | yungblud/flutter-shop | /server/mysql/dbInfos.sql | UTF-8 | 2,329 | 3.25 | 3 | [] | no_license | CREATE USER 'flutter_shop'@'localhost' identified by 'flutter_shop';
GRANT ALL PRIVILEGES ON FLUTTER_SHOP.* TO 'flutter_shop'@'%' identified by 'flutter_shop';
flush privileges;
CREATE DATABASE FLUTTER_SHOP;
DROP TABLE FLUTTER_SHOP.USER;
CREATE TABLE FLUTTER_SHOP.USER (
id INT NOT NULL AUTO_INCREMENT PRIMARY KE... | true |
927b6314c89a4958d115be0d1a257c0d5d1606d7 | SQL | AnnabelleEllis/KFCSystem | /src/Database/customerdatabase.sql | UTF-8 | 2,404 | 2.9375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1:3306
-- Generation Time: Apr 16, 2021 at 01:27 AM
-- Server version: 5.7.31
-- PHP Version: 7.3.21
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@... | true |
42d68d6240dea9590ff995b5ef5adc79d4a35e77 | SQL | flexagon9/flextest | /APEXV2/Bug Tracking/application/pages/page_00018.sql | UTF-8 | 10,195 | 2.90625 | 3 | [] | no_license | prompt --application/pages/page_00018
begin
wwv_flow_api.create_page(
p_id=>18
,p_user_interface_id=>wwv_flow_api.id(2333082129878819730)
,p_name=>'Product Administration'
,p_page_mode=>'MODAL'
,p_step_title=>'Product Administration'
,p_reload_on_submit=>'A'
,p_warn_on_unsaved_changes=>'N'
,p_first_item=>'AUTO_FIRST_I... | true |
1ff5b9fd155179b9614429d24396420159883575 | SQL | Alejandroid101/lab-14 | /data/migrations/1569538748767 database migration.sql | UTF-8 | 673 | 3.78125 | 4 | [
"MIT"
] | permissive | CREATE TABLE BOOKSHELVES (id SERIAL PRIMARY KEY, name VARCHAR(255));
//created a second table named bookshelves inside of lab14_normal
INSERT INTO bookshelves(name) SELECT DISTINCT bookshelf FROM books;
//retrieved bookshelf values from books table in name column.
ALTER TABLE books ADD COLUMN bookshelf_id INT;
//adde... | true |
ad4d88dd38ac0e4838bf3124f19f02bb57fb92dc | SQL | tsorelle/scym | /lib/sql/views/attenderCountsView.sql | UTF-8 | 1,634 | 4.21875 | 4 | [] | no_license | CREATE OR REPLACE VIEW housingCountsDetailView AS
SELECT a.attenderId, a.lastName, a.firstName, a.generationId, hu.unitname, ht.category,
IF (ht.category=1,'Dorm','Cabin/Motel') AS CampCategory,
COUNT(h.housingAssignmentId) AS nights -- h.day,
FROM housingassignments h
JOIN attenders a ON h.attenderId = a.attenderId
J... | true |
8fc17df906fa56bdd850ecc362d6dd4d21b0f91c | SQL | IrvinZheng/easycrm | /mysql.sql | UTF-8 | 720 | 2.578125 | 3 | [] | no_license | /*
Navicat MySQL Data Transfer
Source Server : test
Source Server Version : 50087
Source Host : localhost:3306
Source Database : easycrm
Target Server Type : MYSQL
Target Server Version : 50087
File Encoding : 65001
Date: 2019-04-09 22:32:13
*/
SET FOREIGN_KEY_CHECKS=0;
-- ------... | true |
22e1f99263dcc9b4e2767b13131964072bb1873c | SQL | MrudulaBharadwaj/hotel_booking_system | /hotel.sql | UTF-8 | 6,286 | 3.328125 | 3 | [
"MIT"
] | permissive | -- phpMyAdmin SQL Dump
-- version 4.8.3
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1:3306
-- Generation Time: Feb 19, 2019 at 06:44 AM
-- Server version: 5.7.23
-- PHP Version: 7.2.10
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CH... | true |
27de3af1adef162f841c7c83f20d06c03c88821c | SQL | Ares7/2013-JUL-Module-7 | /Task 04/Anton Tserakhau/test_data/test_t_dish_cuisines.sql | UTF-8 | 449 | 2.6875 | 3 | [] | no_license |
( ( SELECT dish_cuisine_name
, dish_cuisine_desc
FROM t_dish_cuisines )
MINUS
( SELECT dish_cuisine_name
, 'Cuisine of dish - ' || dish_cuisine_name
FROM u_dw_ext_references.cls_dishes ) )
UNION ALL
( ( SELECT dish_cuisine_name
, 'Cuisine of dish - ' || dish_cuisine_name
FR... | true |
87b39aa53ca0783f77099e305b80c6159d478e15 | SQL | resonate/resonate-core-postgres | /schema/workflow/script/ddl/workflow_schema.sql | UTF-8 | 1,684 | 3.171875 | 3 | [
"Apache-2.0"
] | permissive | /***********************************************************************************************************************************
WORKFLOW Schema
***********************************************************************************************************************************/
create schema _workflow;
--- PERMISSI... | true |
0048e323e29952b844405b61cd20d85df3cc25a9 | SQL | vdstr/rabbits | /sql/create.sql | UTF-8 | 33,182 | 3.0625 | 3 | [] | no_license | --
-- PostgreSQL database dump
--
-- Dumped from database version 13.0
-- Dumped by pg_dump version 13.0
SET statement_timeout = 0;
SET lock_timeout = 0;
SET idle_in_transaction_session_timeout = 0;
SET client_encoding = 'UTF8';
SET standard_conforming_strings = on;
SELECT pg_catalog.set_config('search_path', '', fal... | true |
ed1bed3a79e3ad5e6767e55aa330196d6b2fc567 | SQL | jani-jarvinen-itt/KymenlaaksoBootcamp2020WebDemo | /SQL-kyselyitä.sql | UTF-8 | 1,052 | 3.859375 | 4 | [] | no_license | -----------------------------
-- SQL-harjoitukset 7.8.2020:
-----------------------------
-- Tehtävä 1, kohta 1:
SELECT *
FROM Customers
WHERE Country = 'Finland'
-- Tehtävä 1, kohta 2:
SELECT *
FROM Customers
WHERE CompanyName = 'Que Delícia'
SELECT *
FROM Orders
WHERE CustomerID = 'QUEDE'
-- tai:
SELECT *
FROM Or... | true |
f16d1758ac40b8715a4f594265563722fb4c31fe | SQL | radtek/abs3 | /sql/mmfo/bars/View/v_bank_mon.sql | UTF-8 | 1,654 | 3.078125 | 3 | [] | no_license |
PROMPT =====================================================================================
PROMPT *** Run *** ========== Scripts /Sql/BARS/View/V_BANK_MON.sql =========*** Run *** ===
PROMPT =====================================================================================
PROMPT *** Create view V_BA... | true |
1d1345acf8f1356ac7aeeb042be094924fa832ac | SQL | zhizunbaoSEVEN/MIS | /stacarinf.sql | UTF-8 | 4,338 | 3.140625 | 3 | [] | no_license | /*
Navicat MySQL Data Transfer
Source Server : datamining
Source Server Version : 50709
Source Host : localhost:3306
Source Database : stacarinf
Target Server Type : MYSQL
Target Server Version : 50709
File Encoding : 65001
Date: 2016-12-29 15:02:33
*/
SET FOREIGN_K... | true |
e3494c63abee324a5f0c74b569d5248e95543d65 | SQL | zorro-del-caribe/ship-hold | /src/doc/performances/snippets/performances-cte.sql | UTF-8 | 675 | 3.796875 | 4 | [
"MIT"
] | permissive | WITH
"Posts" AS (SELECT * FROM "posts" WHERE "user_id" = 42 ORDER BY "published_at" DESC LIMIT 5),
"comments" AS (SELECT * FROM "comments" WHERE "comments"."post_id" IN (SELECT "post_id" FROM "Posts")),
"author" AS (SELECT * FROM "users" WHERE "users"."user_id" IN (SELECT "user_id" FROM "Posts"))
SELECT
... | true |
020a84d23b37fc244e4a172980bf791e6e984842 | SQL | vgoel38/PQET | /inputs/really_final_outputs/original/original/3c.sql | UTF-8 | 2,666 | 2.828125 | 3 | [] | no_license | QUERY PLAN
----------------------------------------------------------------------------------------------------------------------------------------------------
Aggregate (cost=1838... | true |
6be02ae3478cd696f0b758f970fe3fd7ec7f9817 | SQL | ingenious-m18/ocf | /ocf/p-ejb/src/main/resources/sql/proc/ocf_get_cusdisc.sql | UTF-8 | 2,374 | 4.03125 | 4 | [] | no_license | drop procedure if exists ocf_get_cusdisc;
#call ocf_get_cusdisc(1, 1, '(`proId`,`unitId`,`qty`) values (3.0,3.0,1.0),(1.0,1.0,1.0)', 4, '2021-01-15', '');
DELIMITER $$
CREATE PROCEDURE ocf_get_cusdisc(
IN beId bigint,
IN cusId bigint,
IN sxml longtext,
IN transAccId bigint,
IN asAt date,
IN zipCode varchar(10)
)... | true |
db26408f1ce1f20dff679f377b29e20a3aba0dfb | SQL | zhilien-tech/juyo-new-visa | /src/main/resources/sql/appevents.sql | UTF-8 | 2,516 | 3.125 | 3 | [] | no_license | /*appevents_detail_by_eventId*/
SELECT
tae.id eventId,
tae.eventsNum,
tae.eventsName,
tae.pictureUrl,
tae.detailsUrl,
tae.dueDate,
tae.departureDate,
tae.returnDate,
tae.visaCountry,
tae.visitCity,
tae.attentions,
tae.descriptions,
( SELECT count( * ) FROM t_app_staff_events tase WHERE tase.e... | true |
8f8a7cd3fbf80a36df1c933fe5cd9c093436bb3c | SQL | weblabux/wluxui | /extras/config_and_init/Old/db_def_study_variations.sql | UTF-8 | 1,228 | 3.09375 | 3 | [
"MIT"
] | permissive | -- phpMyAdmin SQL Dump
-- version 3.5.2.2
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Jan 04, 2014 at 07:21 PM
-- Server version: 5.5.28-log
-- PHP Version: 5.4.7
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+08:00";
--
-- Database: 'study_variations'
--
-- ----------------------... | true |
f736b72359ad73f0796fe6d1c3e55e874e3d0afe | SQL | AaleeyahIvy/IT2351 | /Assignment 2/Assignment2F.sql | UTF-8 | 284 | 3.296875 | 3 | [] | no_license | -- Join the three tables then get the data from each table and then display --
-- Aaleeyah Ivy 9/12/2021 --
SELECT CONCAT(customer_first_name ,', ', customer_last_name) AS customer, order_qty, artist, unit_price
FROM customers c
JOIN order_details od
JOIN items i
ON i.item_id = od.item_id | true |
a758514bbaf26a7830c2688bf2de901188239125 | SQL | fogmorn/sql-dev-2 | /Task4.sql | UTF-8 | 984 | 3.875 | 4 | [] | no_license | -- Задание 4. При помощи SQL-запросов исправить данные в базе.
-- 4.1 Все продажи за январь 2019 года для аптек города Ставрополя сохранились в базе со знаком минус.
-- Необходимо написать запрос, который исправит кол-во на положительное значение только для данных продаж.
UPDATE sale SET quantity=quantity*-1
WHE... | true |
91e91ccbfeec998d89d29c4c4c5e247340d9358c | SQL | kennyjoseph/twitter_matching | /mySQL_load_retrieve/db3.2.sql | UTF-8 | 7,321 | 3.609375 | 4 | [] | no_license | ## to get in:
% mysql twitterusers -u twitterusers -h achtung-db -p --local-infile=1
(it asks for password, which is same as username and database name)
(the flag local-infile is needed if we want to use "load data local infile" during the session)
# reminder: if need to write to an outfile, use mysql -e
# increase... | true |
d93e50d70ce443fd10ef9f09afc4283d27808eb3 | SQL | jampaniuday/dba_new | /MS-DBA/citi exports/prepare_citi_uat_daily_tables.sql | UTF-8 | 1,506 | 2.890625 | 3 | [] | no_license | drop table A_TA;
drop table A_OA;
drop table M_FX_NOE;
drop table A_TA_TA_REL;
drop table M_FX_OPTION_NOE;
drop table A_ORGANIZATION;
drop table A_PERSON;
drop table A_VAL_MD_CURRENCY;
drop table A_ROLE;
drop table A_SECURITY_GROUP;
drop table A_SECURITY_PRINCIPAL_GROUP;
drop table A_SECURITY_PRINCIPAL_ROLE;
drop table... | true |
7c397b15d9cc7c061ce8e667f3bd00266564f495 | SQL | zhilangtaosha/BBG | /Task/2016-06-14劵不记销售/RA_劵不计销售_历史数据补全.sql | GB18030 | 5,371 | 2.859375 | 3 | [] | no_license | --2016-06-21ʼʹÄ
--Χ2016-06-12~~~2016-07-26
--********************************************
--SDE
--********************************************
--1.BBG_RA_ITEM_LOC_SOH_VΪص
SELECT * FROM RA_RMS.BBG_RA_ITEM_LOC_SOH_V;
SELECT * FROM RADM.BBG_RA_SLS_TRX_JL_FIX_V
--2.BBG_XTERN_RDWT
TRUNCATE TABLE RA_RMS.BBG_XTERN_RDWT;... | true |
ec61b8f6250be7900fcd0183fa2fe25dfa0d7094 | SQL | Akhiljithk/MySql | /Procedure and Function/query.sql | UTF-8 | 2,458 | 4.3125 | 4 | [] | no_license | USE bank;
-- 1. Write a function to find the number of customers who have loan.
SET GLOBAL log_bin_trust_function_creators = 1;
DELIMITER $$
CREATE FUNCTION loan_count()
RETURNS INT
BEGIN
DECLARE count INT;
SELECT count(DISTINCT customer.c_id) AS "count" FROM customer
JOIN borrow ON customer.c_id = borrow.c_id
I... | true |
2969e790b8cbb06ec5caa5601a2303e7a34f10d8 | SQL | gladwinms/userregistration | /userform_db.sql | UTF-8 | 9,243 | 2.578125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.9.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Jan 03, 2020 at 08:11 AM
-- Server version: 10.4.11-MariaDB
-- PHP Version: 7.4.1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD... | true |
4bb5d6144a351515baf4c24bcc2d7c8cd30eb5fc | SQL | AdrianRico98/POBLACION-MUNDIAL-SQL | /Parte2.sql | ISO-8859-1 | 1,590 | 4.1875 | 4 | [] | no_license | -- Pregunta 1: Cuntas entradas de la tabla de pases son de frica?
SELECT
COUNT (ID) as numero_registros
FROM
countries
WHERE
continent = 'Africa'
-- Pregunta 2: Cul era la poblacin total del continente de Oceana en 2005?
SELECT
SUM(P.population) AS poblacion_total
FROM countries as C
left join population_years as P
on... | true |
280129afb66de818d2b1fbd484815c7c8af1ae05 | SQL | silence-do-good/stress-test-Postgres-and-MySQL | /dump/high/day19/select1059.sql | UTF-8 | 177 | 2.625 | 3 | [] | no_license |
SELECT timeStamp, temperature FROM ThermometerOBSERVATION o
WHERE timestamp>'2017-11-18T10:59:00Z' AND timestamp<'2017-11-19T10:59:00Z' AND temperature>=3 AND temperature<=37
| true |
83ba74f8c95444ba772a49c81a3797fa0f63fce4 | SQL | chi3fsteve/DatabaseLabs2020 | /lab05.sql | UTF-8 | 2,572 | 4.0625 | 4 | [] | no_license | --1
SELECT a.Name, a.Position, a.Branch, b.Name AS BranchName
FROM Employees a
INNER JOIN Branches b ON a.Branch = b.ID
ORDER BY Name
--2
SELECT a.Name, a.Position, a.Branch, b.Name AS BranchName
FROM Employees a
INNER JOIN Branches b ON a.Branch = b.ID
WHERE b.Name='WARSZAWA'
ORDER BY Name
--3
SELECT a... | true |
4b103ce78983a100bfaf10319629ba6eb01050e5 | SQL | shaan06/ProjectRepository | /Airline Database Management System/SQLQueriesAirline.sql | UTF-8 | 2,204 | 3.609375 | 4 | [] | no_license | select * from Transactions;
select * from passengers;
select * from employee;
use airline;
select * from aircrafts;
select * from flight_schedule;
insert into flight_schedule(FlID, FlightDate, Departure, Arrival, afid, acid) values (5, '20-01-15 00:00:00' , '06:20:15' , '10:22:00' , 5, 4);
select * from transactions;
... | true |
2cd98e72b7e51d6d86560a3b7c594f07ae0cc486 | SQL | NeotomaDB/Neotoma_SQL | /function/ts/updatechronology.sql | UTF-8 | 1,425 | 2.8125 | 3 | [
"MIT"
] | permissive | CREATE OR REPLACE FUNCTION ts.updatechronology(_chronologyid integer,
_agetype character varying,
_isdefault boolean,
_contactid integer DEFAULT NULL::integer,
... | true |
f6403da7f1db4bb45357df6693403e6342fa0705 | SQL | nikolas511/ssmBookStore | /ssm.sql | UTF-8 | 5,899 | 3.484375 | 3 | [] | no_license | /*
Navicat MySQL Data Transfer
Source Server : 本地
Source Server Version : 50534
Source Host : 127.0.0.1:3306
Source Database : ssm
Target Server Type : MYSQL
Target Server Version : 50534
File Encoding : 65001
Date: 2018-08-25 11:05:51
*/
SET FOREIGN_KEY_CHECKS=0;
... | true |
a209e8eccd05288d9c61e217df069c7ab41d053f | SQL | ekelseya/DatabaseClasswork | /MySQL/IPPS/ipps1.sql | UTF-8 | 1,155 | 3.703125 | 4 | [] | no_license | -- ipps.sql
-- Database Assignment 02
-- Author Eryn Kelsey-Adkins
-- Date 10/27/19
-- create database ipps
CREATE DATABASE ipps;
USE ipps;
-- create table DiagnosisGroups
CREATE TABLE DiagnosisGroups (
code INTEGER PRIMARY KEY,
description VARCHAR(70)
);
-- create table ReferralRegions
CREATE TABLE ReferralReg... | true |
01306a9f4987e63f7ab9ea6494ad1de0efbac057 | SQL | salsabilafnp/pw2021_203040104 | /tubes/pw_tubes_203040104.sql | UTF-8 | 3,010 | 3.203125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 5.1.0
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: May 28, 2021 at 10:05 AM
-- Server version: 10.4.18-MariaDB
-- PHP Version: 8.0.3
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIEN... | true |
23c3923be2e1f3e5a2057bf22a7d56fd44d1c5bb | SQL | supermy/mybigdata | /src/main/resources/c_db/database-schema.sql | UTF-8 | 982 | 3.171875 | 3 | [] | no_license | -- 数据自动初始化
-- 配置数据库
drop table config;
create table config (
id integer not null,
key varchar(80) not null,
value varchar(800) not null,
constraint pk_config primary key (id)
);
-- 雇员测试数据库
drop table employees;
create table employees (
id integer not null,
name varchar(80) not ... | true |
5f7670a2f89e8656aabb8f39088fd21b76c9e90e | SQL | kichitano/CcambioFx | /BD/Script de llenado.sql | UTF-8 | 2,195 | 3.28125 | 3 | [] | no_license | /* LLENADO DE DATOS DE OCUPACION INICIO */
INSERT INTO `dbcasacambioforex`.`ocupacion`
(`IdOcupacion`,
`DescripcionOcupacion`)
VALUES
('001','Ama De Casa'),
('002','Desempleado'),
('003','Empleado'),
('004','Empleador(A)'),
('005','Estudiante'),
('006','Jubilado(A)'),
('007','Miembro De Las Fuerzas Armadas / Miembro... | true |
9135b81a89abbadbc5db36156f96be85c6423736 | SQL | Fr4nc3/oracle-db-samples | /sql/checks_status/check_freespace.sql | UTF-8 | 418 | 3.078125 | 3 | [
"MIT"
] | permissive |
--------------------------------------------------------
-- SHOW TABLESPACE FREE SPACE
--------------------------------------------------------
SELECT TABLESPACE_NAME,SUM(BYTES)/1024/1024/1024 "FREE SPACE(GB)" FROM DBA_FREE_SPACE GROUP BY TABLESPACE_NAME;
-- Displaying the Free Space (Extents) in a Tablespace
SELE... | true |
cc0ce93b324173a5fc70191bda34e28a04e0320d | SQL | TrangLe1007/Grab-Analysis | /Code/PnL.sql | UTF-8 | 1,228 | 4.03125 | 4 | [] | no_license | -- select * from datahub.grab_vn_booking_tab gvbt limit 10;
with temp as(
select driver_id ,
completed_date as order_day,
count(booking_id) * 10 as total_point
from datahub.grab_vn_booking_tab gvbt
group by 1,2)
,temp2 as(
select
driver_id,
order_day,
CASE
when total_point < 50 then 0
when total_point between 50 ... | true |
866c349f7f54bf323f8cd7f2af129f2ca794cc54 | SQL | billydevInGitHub/38000 | /38000ExpXXX/Exp010_SetupForBPOT2114Overall/DBSchemaSetup.sql | UTF-8 | 3,600 | 2.84375 | 3 | [] | no_license | ---------------------------create table RT_appl_info--------------
drop table RT_appl_info
create table RT_appl_info (
RT_appl_id BIGINT NOT NULL auto_increment,
DT_Application_Name varchar(200),
Application_Name varchar(120),
generation_number BIGINT ,
trigger_time timestamp,
trigger_user_id varchar(30),
Sta... | true |
42741198a3f4af7038719d16b7d27d903ea3b421 | SQL | snower/syncany | /examples/warehouse/sql/driver_daily.sql | UTF-8 | 3,117 | 4.3125 | 4 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | SELECT
CONCAT(a.site_id,
'-',
a.personnel_id,
'-',
a.delivery_date) AS personnel_date_id,
a.delivery_date,
a.site_id,
a.personnel_id,
a.team_cnt,
a.vip_team_cnt,
a.delivery_cnt,
a.vip_delivery_cnt,
a.abnormal_sign_cnt,
... | true |
4b1860794fa05a399c6bd9965121ff18955c406f | SQL | DragFAQ/todolist | /ddl.sql | UTF-8 | 266 | 2.859375 | 3 | [] | no_license | drop table if exists todolist;
CREATE TABLE todolist
(
id INT(8) unsigned PRIMARY KEY NOT NULL AUTO_INCREMENT,
title VARCHAR(255) NOT NULL,
description VARCHAR(2048),
done TINYINT(1) DEFAULT '0' NOT NULL
);
CREATE UNIQUE INDEX id ON todolist (id);
| true |
362b2223f402654364056d1a51f107ded47c7bd7 | SQL | JorgeAndresQuintero/DB-Wahlinformationssystem | /WIS/backend/queries/stimmkreis/direktkandidatengewinner.sql | UTF-8 | 4,309 | 3.984375 | 4 | [] | no_license | /*
* Ermittelt die Gewinner der Erststimmen für jeden Stimmkreis.
* Gewinner ist derjenige Kandidat, der die meisten Erststimmen erreicht hat,
* solange die Partei, die er oder sie angehört, die 5%-Hürde geschafft hat.
* Die 5%-Hürde errechnet sich auf Wahlkreisebene.
* Falls die zugehörige Partei die 5%-Hürde nic... | true |
54f47fb44132f99769c0dee488c18456e28562ce | SQL | lycantropos/seek-well | /test_scripts/views/v_profit_balances.sql | UTF-8 | 502 | 3.328125 | 3 | [
"MIT"
] | permissive | CREATE OR REPLACE VIEW v_profit_balances AS (
SELECT DISTINCT ON (player_id, stamp::DATE)
player_id AS f_player_id,
stamp::DATE as f_date,
total_profit::NUMERIC / 100 AS f_total_profit,
balance_profit::NUMERIC / 100 AS f_balance_profit,
deposit_profit::NUMERIC / 100 AS f_dep... | true |
ac31f0871eb697ec8f2c8884e509d16767fabc74 | SQL | ccarmellia/Ball-Scrolling | /src/cn/edu/ncu/java/otherfiles/bowlingballsys.sql | UTF-8 | 1,596 | 3.796875 | 4 | [] | no_license | -- 创建表
-- 球员基本信息表
create table player(
name varchar(20),
age int,
team varchar(20),
numbers varchar(20),
gender varchar(20),
position varchar(20) check(position in('队长','队员')),
height varchar(20),
weight varchar(20),
birthdate timestamp,
primary key(team,numbers)
);
-- 球队基本信息表
create table team(
name varc... | true |
bb3865d7359824ec6614d2ace282572e0a79bc68 | SQL | ssian2/TeamCAgile_BE | /dump.sql | UTF-8 | 11,512 | 2.640625 | 3 | [] | no_license | -- MySQL dump 10.13 Distrib 8.0.25, for macos11.3 (x86_64)
--
-- Host: academy2020.cpc8rvmbbd9k.eu-west-2.rds.amazonaws.com Database: TeamCWebApp
-- ------------------------------------------------------
-- Server version 8.0.21
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CH... | true |
4c2a9f8f33fcf3ac5396d5b3956af45fc2a0da8a | SQL | mchrusciel/DataManagementProjects | /Data Management Projects/mchrusciel-homework04/queries.sql | UTF-8 | 1,617 | 4.25 | 4 | [] | no_license | -- write your queries underneath each number:
-- 1. the total number of rows in the database
SELECT COUNT(*)
FROM uniqlostocks;
-- 2. show the first 15 rows, but only display 3 columns (your choice)
SELECT dates, high, low
FROM uniqlostocks
LIMIT 15;
-- 3. do the same as above, but chose a column to sort on, an... | true |
41b149ff511748ca27f544051097797bd3f90cde | SQL | HealerJeanTeam/HealerJean.github.io | /_posts/DDKJ/8、开发不错的经验/1、权限/java和sql/sys_menu.sql | UTF-8 | 1,012 | 2.75 | 3 | [
"MIT"
] | permissive | /*
Navicat Premium Data Transfer
Source Server : duodian
Source Server Type : MySQL
Source Server Version : 50634
Source Host : rds7b1n6yxdvko77nhv6o.mysql.rds.aliyuncs.com
Source Database : admore
Target Server Type : MySQL
Target Server Version : 50634
File Encoding : ... | true |
a444ea31d524095f1e89a14a1b9c6932bb716e00 | SQL | PisaCoderDojo/PisaCoderDojo-site | /legacy_api/db/update-resource.sql | UTF-8 | 420 | 3.515625 | 4 | [] | no_license | DROP TABLE IF EXISTS RESOURCE;
DROP TABLE IF EXISTS CATEGORY;
CREATE TABLE CATEGORY (
id integer PRIMARY KEY AUTOINCREMENT,
name varchar(30) NOT NULL
);
CREATE TABLE RESOURCE (
id integer PRIMARY KEY AUTOINCREMENT,
title varchar(30) NOT NULL,
description text NOT NULL,
resource text,
category_id intege... | true |
5121e8fe4899b293e7a4bb22cd05c03d8050a83a | SQL | murari-goswami/bi | /ETL/DataVirtuality/views/tableau/tableau.treasury_arvato_orders_retail_price_to_cc.sql | UTF-8 | 1,723 | 3.734375 | 4 | [] | no_license | -- Name: tableau.treasury_arvato_orders_retail_price_to_cc
-- Created: 2015-04-24 18:24:54
-- Updated: 2015-04-24 18:24:54
CREATE view tableau.treasury_arvato_orders_retail_price_to_cc
AS
SELECT
co.id,
co.payment_method,
co.date_created,
co.date_shipped,
co.date_returned,
co.invoice_date_created,
a.date_created... | true |
1207e925fa471ff157871a379387752464496cf0 | SQL | guitarmind/datasci_course_materials | /assignment2/prob3_h.sql | UTF-8 | 297 | 3.734375 | 4 | [] | no_license | SELECT sum(result) FROM (
SELECT f1.term AS term1,f1.count, f2.term AS term2, f2.count, (f1.count * f2.count) AS result
FROM frequency f1, frequency f2
WHERE f1.term = f2.term
AND f1.docid < f2.docid
AND f1.docid = '10080_txt_crude' AND f2.docid = '17035_txt_earn'
GROUP BY f1.term, f2.term
) R;
| true |
e643d15416d59a3d4a358c92e0242d022a705ab6 | SQL | ArekBielecki/MySQL-school-database-exercise | /school_data.sql | UTF-8 | 18,529 | 3.125 | 3 | [] | no_license | USE school;
-- SCHOOL DATA
INSERT INTO school(school_name, school_adress) VALUES ('Beahan, McKenzie and Upton School', '693 Merry Parkway');
-- TEACHER DATA
INSERT INTO teacher(first_name, last_name, school_id) VALUES ('Rosemonde', 'Crookall', 1);
INSERT INTO teacher(first_name, last_name, school_id) VALUES ('Morton'... | true |
1872c73bf0cbc010d888a605b5d842d555691379 | SQL | meast/citycodeinchina | /areas.sql | UTF-8 | 598 | 2.6875 | 3 | [] | no_license | /*
Navicat SQLite Data Transfer
Source Server : areas
Source Server Version : 30714
Source Host : :0
Target Server Type : SQLite
Target Server Version : 30714
File Encoding : 65001
Date: 2014-09-19 01:47:13
*/
PRAGMA foreign_keys = OFF;
-- ----------------------------
-- Table structur... | true |
ddeaa4286b4efe0e0a289f8327477e4229ff477e | SQL | Kandejianer/ResumeGen | /src/main/java/team/ftg/resumegen/db/db.sql | UTF-8 | 3,059 | 3.34375 | 3 | [] | no_license | /*
Navicat Premium Data Transfer
Source Server : test
Source Server Type : MySQL
Source Server Version : 50721
Source Host : localhost:3306
Source Schema : testdb
Target Server Type : MySQL
Target Server Version : 50721
File Encoding : 65001
Date: 20/07/2018 16:06:53... | true |
ec4874195228e9efa0a055fd15cd9b48342926b4 | SQL | bcgov/gcpe-hub | /Hub.Legacy/Gcpe.Hub.Database/calendar/Tables/ActivityFilter.sql | UTF-8 | 1,188 | 3.4375 | 3 | [
"Apache-2.0"
] | permissive | CREATE TABLE [calendar].[ActivityFilter] (
[Id] INT IDENTITY (1, 1) NOT NULL,
[QueryString] NVARCHAR (300) NULL,
[Name] NVARCHAR (200) NULL,
[SortOrder] INT NULL,
[IsActive] BIT CONSTRAINT [DF_Ac... | true |
2a4b16a566345231cacd88ff4c6c4efd90b18526 | SQL | d40cht/StackFlyOver | /playsite/conf/evolutions/default/3.sql | UTF-8 | 1,600 | 3.09375 | 3 | [] | no_license | # --- !Ups
CREATE INDEX "DataHierarchy_lon" ON "DataHierarchy"("longitude");
CREATE INDEX "DataHierarchy_lat" ON "DataHierarchy"("latitude");
CREATE INDEX "RoleSOTags_role_id" ON "RoleSOTags"("role_id");
CREATE INDEX "RoleSectorTags_role_id" ON "RoleSectorTags"("role_id");
CREATE INDEX "TagMap_dh_id" ON "TagMap"("dh_... | true |
924d947ed5caab31e0be7ebd04b8a55e3e01938d | SQL | vesahajdari/Projekti_ProgramimiNeInternet | /db/food_to_your_heart.sql | UTF-8 | 5,421 | 3.0625 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 5.1.0
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: May 21, 2021 at 11:43 PM
-- Server version: 10.4.19-MariaDB
-- PHP Version: 8.0.6
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIEN... | true |
bf369623a5f6bde19e91493462bec31d3b988a92 | SQL | coelhoadler/dockernode | /db-volume/init.sql | UTF-8 | 4,468 | 3.359375 | 3 | [] | no_license | drop database if exists amazondb;
create database amazondb;
use amazondb;
create table User (
UserId smallint unsigned not null auto_increment,
UserName varchar(100) not null,
UserLogin varchar(10) not null,
UserPassword varchar(8) not null,
UserEmail varchar(30) not null,
UserAddress varchar(200) no... | true |
eb8c5ed067752de921629d04cc7c09579651e271 | SQL | RobervaldSidrome/ProvaAnalise | /ScriptsBD/obra.sql | UTF-8 | 1,943 | 3.40625 | 3 | [] | no_license | -- Created by Robervald Sidrome 15/05/2018
-- Table: public.obra
-- DROP TABLE public.obra;
CREATE TABLE public.obra
(
id_obra integer NOT NULL DEFAULT nextval('obra_id_obra_seq'::regclass),
codigo_obra character varying(10) NOT NULL,
id_subobra integer NOT NULL DEFAULT nextval('obra_id_subobra_seq'::regclass... | true |
8b9c58e877afae7abd67565ad6352460a85f920c | SQL | tommygaessler/SQL_CRUD_REST | /dml/teachers.sql | UTF-8 | 291 | 2.609375 | 3 | [] | no_license | -- delete existing rows
TRUNCATE teachers CASCADE;
-- create teachers
INSERT INTO teachers (first_name, last_name)
VALUES
('Michael', 'Herman'),
('Wes', 'Reid'),
('Robby', 'Hajek'),
('Ben', 'Hassara');
-- INSERT INTO teachers (first_name, last_name) VALUES ('Matthew', 'Leach');
| true |
f74d1574ef68d0e4d891f67b7dfc26f96d44d315 | SQL | RenanRB/Agenda-estudantil | /agenda.sql | UTF-8 | 8,220 | 3.15625 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.5.1
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: 21-Jun-2016 às 00:03
-- Versão do servidor: 10.1.10-MariaDB
-- PHP Version: 5.6.19
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CL... | true |
b22fb339505ad5a023399419b71a724eafed88fe | SQL | JimFowler/books | /Books20/Tools/database/sql_scripts/DeleteTables.sql | UTF-8 | 584 | 2.53125 | 3 | [] | no_license | --
-- DeleteTables.sql
--
-- Created 24 November 2015 for the Collections database
-- James R. Fowler
--
-- Modified 25 April 2020 for Journal database
--
-- Delete the basic tables from the journals database.
--
-- To Use:
-- sqlite3 journals.db3
-- sqlite> .read DeleteTables.sql
--
--
--
-- Drop the tables..... | true |
3464a99b5d25387642a909482edba655c26071ce | SQL | nrpeterson/mathstackexpert | /schema.sql | UTF-8 | 1,797 | 3.75 | 4 | [] | no_license | -- MySQL schemas
-- To import your schemas into your database, run:
-- `mysql -u username -p database < schema.sql`
-- where username is your MySQL username
CREATE TABLE IF NOT EXISTS answers (
id INT NOT NULL,
author_id INT,
body_html TEXT NOT NULL,
body_markdown TEXT NOT NULL,
creation_date DATET... | true |
69630d5c511b6986a8d2573e9f2b77351d39ef56 | SQL | matthaws/xanthus | /test.sql | UTF-8 | 820 | 3.421875 | 3 | [
"MIT"
] | permissive | CREATE TABLE droids (
id INTEGER PRIMARY KEY,
name VARCHAR(255) NOT NULL,
owner_id INTEGER,
FOREIGN KEY(owner_id) REFERENCES human(id)
);
CREATE TABLE humans (
id INTEGER PRIMARY KEY,
fname VARCHAR(255) NOT NULL,
lname VARCHAR(255) NOT NULL,
house_id INTEGER,
FOREIGN KEY(planet_id) REFERENCES plane... | true |
2ed8283bae98e16c80a16665ddbcaaa252b02ad7 | SQL | jean11301/sist4_team4_pnt | /WebContent/sql/Member.sql | UTF-8 | 1,307 | 3.015625 | 3 | [] | no_license | rem 1. 로그인 프로세스
CREATE OR REPLACE PROCEDURE sp_member_login
(
v_userid IN USERINFO.user_id%TYPE,
login_record OUT SYS_REFCURSOR
)
IS
BEGIN
OPEN login_record FOR
SELECT user_password FROM USERINFO
WHERE user_id = v_userid;
END;
rem 2.user_id 가져오기
CREATE OR REPLACE PROCEDURE ... | true |
63655dbe796589e8061209629e21932aa355d5b2 | SQL | rebider/Fgame | /sql/create_game.sql | UTF-8 | 113,327 | 3.515625 | 4 | [
"MIT"
] | permissive | -- ----------------------------
-- Table structure for t_player 玩家表
-- ----------------------------
CREATE TABLE `t_player` (
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT "id",
`userId` bigint(20) NOT NULL COMMENT "用户id",
`serverId` int(11) NOT NULL COMMENT "服务器id",
`originServerId` int(11) NOT NULL COMMENT ... | true |
a20df16f3331ce48924175c11e87615e3fbf5b5c | SQL | altamira/visualstudio | /Sistema de Informação Altamira/EGISSQL.Database/dbo/Stored Procedures/Procs2/pr_programacao_importacao.sql | UTF-8 | 23,124 | 3.125 | 3 | [] | no_license |
create procedure pr_programacao_importacao
@dt_inicial datetime,
@dt_final datetime,
@cd_pedido_importacao int,
@nm_identificacao_pedido VarChar(20),
@cd_produto int,
@cd_cliente int,
@cd_fornecedor int,
@cd_pais int,
@ic_data_filtro int, -- D... | true |
7a21a55d80f21b366a3eb81c6440422876d949dd | SQL | dianamajek7/gamesreview_microservice_architecture | /server/mysql-prescripts/comments/docker-entrypoint-initdb.d/db.sql | UTF-8 | 1,667 | 3.0625 | 3 | [] | no_license | grant all privileges on *.* to 'root'@'%' identified by 'password';
flush privileges;
CREATE TABLE IF NOT EXISTS Comment (
Id INT NOT NULL AUTO_INCREMENT,
userId INT,
reviewId INT,
Title TEXT,
content TEXT,
dateAdded DATETIME,
PRIMARY KEY (Id)
);
CREATE TABLE I... | true |
457be5c14f5c8aa6755fc7eff9179e4d0af4fe20 | SQL | JulesWulms/database-technology | /Queries/test_o=50_a=1.sql | UTF-8 | 1,003 | 3.078125 | 3 | [] | no_license | SELECT edge1x9."1"
FROM edge1x9, edge15x19, edge9x15, edge4x15, edge5x17, edge13x17, edge4x16, edge5x14, edge14x19, edge1x12
WHERE (1=1)
-- edge1x9 --
AND edge1x9."1" = edge1x12."1"
AND edge1x9."9" = edge9x15."9"
-- edge15x19 --
AND edge15x19."15" = edge9x15."15" AND edge15x19."15" = edge4x15."15"
AND edge15x1... | true |
22ed6e191b472cdec00be65109057434b2d15c7b | SQL | CoderDojo/cp-dojos-service | /scripts/database/pg/migrations/026.do.change-coalesce-v-dojolead.sql | UTF-8 | 615 | 3.46875 | 3 | [
"MIT"
] | permissive | DO $$
BEGIN
CREATE OR REPLACE VIEW v_dojoleads AS (
SELECT lead.id, lead.email,
lead.completed,
lead.deleted, dojo.verified,
COALESCE(dojo.alpha2, (lead.application->'venue')->'country'->>'alpha2')::text as "alpha2",
COALESCE(dojo.id, (lead.application->'dojo')->>'id')::tex... | true |
530be566806524e00e8a47b388a70818e00b4718 | SQL | aidanr67/wazimap-za | /sql/youth_victims_population_group.sql | UTF-8 | 51,927 | 2.90625 | 3 | [
"MIT"
] | permissive | --
-- PostgreSQL database dump
--
SET statement_timeout = 0;
SET lock_timeout = 0;
SET client_encoding = 'UTF8';
SET standard_conforming_strings = on;
SET check_function_bodies = false;
SET client_min_messages = warning;
SET search_path = public, pg_catalog;
ALTER TABLE IF EXISTS ONLY public.youth_victims_population... | true |
dabd9c322de9198ec8d0680e117187b873069547 | SQL | amajor/HomeschoolTrackerDatabase | /INSERT_INTO_user_tasks.sql | UTF-8 | 992 | 3.703125 | 4 | [] | no_license | -- Add Ewan's Tasks
INSERT INTO `homeschool`.`user_tasks` (`user_id`,`task_id`, `last_modified`)
SELECT
user_id,
task_id,
CURRENT_TIMESTAMP
FROM homeschool.user_subjects
JOIN homeschool.subject_lessons
ON user_subjects.subject_id = subject_lessons.subject_id
JOIN homeschool.lesson_tasks
ON subject_les... | true |
04613861b04ecdaaf4bb9c2bf3650924d0941591 | SQL | Baidoolot/exam | /itacademy.sql | UTF-8 | 5,693 | 3.265625 | 3 | [] | no_license | -- MySQL dump 10.13 Distrib 5.7.28, for Linux (x86_64)
--
-- Host: localhost Database: itacademy
-- ------------------------------------------------------
-- Server version 5.7.28-0ubuntu0.18.04.4
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_... | true |
31f875dd6ca258632c74b8737c4b411bd93cb4aa | SQL | KRHero03/College_Labwork | /2nd_Year/DBMS/Work_From_Home/PLSQL_Assignment_4/PLSQL_Assignment_4.sql | UTF-8 | 1,369 | 3.796875 | 4 | [] | no_license | set serveroutput on size 30000;
CREATE TABLE Students(
ID NUMBER(3) PRIMARY KEY,
Name VARCHAR(50),
Age NUMBER(2),
Stream VARCHAR(50),
Marks NUMBER(3)
);
INSERT INTO Students VALUES(1,'Arun',21,'BSc',55);
INSERT INTO Students VALUES(2,'Nisarg',22,'BTech',65);
INSERT INTO Students VALUES(3,'Aarav'... | true |
2c88be5b52172a637735c0ce0b24cb26267ea268 | SQL | simtk/src | /fusionforge/cronjobs/db/getProjectDownloadStats.sql | UTF-8 | 1,778 | 3.265625 | 3 | [] | no_license | --
SELECT *
FROM (
SELECT g.unix_group_name AS unix_group_name
,g.group_id
,COALESCE(MAX(d_total.num_downloads),0) AS total_file_downloads
,COUNT(d_unique.*) AS unique_downloaders
FROM groups as g
LEFT OUTER JOIN (
SELECT fp.group_id AS group_id
,COUNT(*) AS num_downloads
FROM frs_dlstats_f... | true |
ea9c03342ad00c7eae858d6eeed20faedb3cdf19 | SQL | villdimova/SoftUni-MicrosoftSQLServer | /Exam 28.06.2020/07. Count Colonists.sql | UTF-8 | 164 | 3.34375 | 3 | [
"MIT"
] | permissive | SELECT COUNT(*)
FROM Colonists c
JOIN TravelCards tc ON c.Id=tc.ColonistId
JOIN Journeys j ON j.Id=tc.JourneyId
WHERE j.Purpose='Technical'
GROUP BY j.Purpose | true |
bbf786545937dcaf280dd50b1a9a04e763f245cd | SQL | sw2020/new-start | /MyProject2/myshop (2).sql | UTF-8 | 6,819 | 3.171875 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.1.14
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: 2017-05-04 12:21:20
-- 服务器版本: 5.6.17-log
-- 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 */;
/*!40101 ... | true |
01ad7a14dd3fd214799c731859aa4fd6346aa30b | SQL | olivierberthomme/sqlsrvscripts | /SQLWaitStats/src/Analyze_wait_stats.sql | UTF-8 | 1,369 | 4.25 | 4 | [] | no_license | WITH sum_wait as (
SELECT SUM(end_sp.wait_s)-sum(start_sp.wait_s) as sum_wait_s
, MIN(start_sp.date) as start_date
, MAX(end_sp.date) as end_date
from [msdb].[monitoring].[wait_stats] start_sp inner join
[msdb].[monitoring].[wait_stats] end_sp on start_sp.wait_type=end_sp.wait_type
WHERE CONVERT(nvarchar(M... | true |
364e10f051c272ac92181900b9d5f72d34adc0a9 | SQL | simila/Yunxuebang_autoanswerer | /items.sql | UTF-8 | 1,270 | 2.890625 | 3 | [
"MIT"
] | permissive | -- phpMyAdmin SQL Dump
-- version 4.8.3
-- https://www.phpmyadmin.net/
--
-- 主机: 100.67.90.31:8597
-- 生成日期: 2020-05-22 19:23:01
-- 服务器版本: 5.6.28-cdb2016-log
-- PHP 版本: 5.6.30
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIEN... | true |
b5ade6eef6a0e492286a4585c4eb928645725c3b | SQL | malikov-yurii/java-developer-course-tasks | /src/developer/sql/2.sql | UTF-8 | 597 | 4.34375 | 4 | [] | no_license | SELECT
projects.name AS name_of_most_expensive_project,
t1.salary_sum_of_project AS salary_sum_of_most_expensive_project
FROM
projects
INNER JOIN (SELECT
projects_developers.project_id,
sum(developers.salary) AS salary_sum_of_project
FROM projects... | true |
8b0c57fa290ea9a3412347d10c58536b81275446 | SQL | osundiranay/SQL | /Basics/Weather Observation Station 5.sql | UTF-8 | 232 | 3.171875 | 3 | [] | no_license | SELECT * FROM
(SELECT city, length(city)
FROM station
ORDER BY length(city) asc, city)
WHERE rownum = 1;
SELECT * FROM
(SELECT city, length(city)
FROM station
ORDER BY length(city) desc, city)
WHERE rownum = 1; | true |
2a8a9312427ba8f757ed0c1c5a3c1225b605f4bb | SQL | weirane/bank-management | /sql/sp.sql | UTF-8 | 856 | 3.234375 | 3 | [
"MIT"
] | permissive | drop procedure if exists add_save_account;
drop procedure if exists add_check_account;
create procedure add_save_account(
in account_id char(6), in bank varchar(32), in balance decimal(12, 2),
in currency char(3), in interest_rate decimal(5, 2)
) begin
insert into account(account_id, balance, open_date, ty... | true |
1845f7d266a19606c046831fb8a60e36fa24283a | SQL | splicemachine/htap-benchmark | /src/com/oltpbenchmark/benchmarks/chbenchmark/queries/query6.sql | UTF-8 | 190 | 2.8125 | 3 | [
"Apache-2.0"
] | permissive | SELECT sum(ol_amount) AS revenue
FROM order_line
WHERE ol_delivery_d >= '1999-01-01 00:00:00.000000'
AND ol_delivery_d < '2020-01-01 00:00:00.000000'
AND ol_quantity BETWEEN 1 AND 100000 | true |
8e46d7c04f5aee0b545cd45002e76923620bf430 | SQL | MAF1984/UNLZ-Consulting | /ABM/extras/facultad_Programacion_III-master/facultad_Programacion_III-master/Clase_08/ejerciciosSQL_resultosCompletos/castFloatAsInt.sql | UTF-8 | 122 | 3 | 3 | [
"MIT"
] | permissive | SELECT CAST(ROUND(SalesYTD/CommissionPct,0) AS INT) AS Calculo
FROM Sales.SalesPerson
WHERE CommissionPct != 0 | true |
a9bf3c197c89a782db0b7de5b255e70801a886df | SQL | PopovychMykhailo/TrainingInCyberBionicSystematics | /SQL/SQL Materials (Бояров)/003 Bases DDL/003_ClassWork.sql | WINDOWS-1251 | 383 | 2.609375 | 3 | [] | no_license | -- :
-- 1. ShopDB
-- 2. Employees ( 003_ClassWork_CREATE_TABLE.jpg).
-- 3. 003_ClassWork_Constraints.jpg
-- 4. : Employees, Customers, Orders.
| true |
afe79a94f9622f450ca01aad478e8459ca3e5a3f | SQL | sprokushev/Delphi | /MASTER/_DATABASE/Views/V_PARUS_REQUEST.sql | ISO-8859-7 | 1,207 | 3.46875 | 3 | [] | no_license | --
-- V_PARUS_REQUEST (View)
--
CREATE OR REPLACE FORCE VIEW MASTER.V_PARUS_REQUEST
(ACCNUMB, SACCDOC, ACCDOC, ACCDATE, SFACEACC,
NFACEACC, SAGENT, NAGENT, STARIF, NTARIF,
SPAY_TYPE, NPAY_TYPE, SACC_AGENT, NEXECUTIVE, SSUBDIV,
NSUBDIV, SJUR_PERS, NJUR_PERS, NNOM_MODIF, SNOM_MODIF,
NNOMEN, SNOMEN, DOG_NUMBER, ... | true |
da7d45b9e50054711dddaec4fcef2e7f0f916142 | SQL | senasistencia/senasistencia-productivo | /app_data/base de datos/scriptInsercionBD.sql | UTF-8 | 7,319 | 2.609375 | 3 | [] | no_license | #datos de la base de datos senasistencia
#
# Data for table "aprendiz"
#
INSERT INTO `aprendiz`
(`FK_TipoDeDocumento`,`Documento_Aprendiz`,`PrimerNombre_Aprendiz`,`SegundoNombre_Aprendiz`,`PrimerApellido_Aprendiz`,`SegundoApellido_Aprendiz`,`Correo_Aprendiz`,`Telefono_Aprendiz`,`FK_Ficha`,`Estado_Aprendiz`... | true |
88aba46bb29db3de9330c9d719b0cfca65326adb | SQL | liu-dong/myProject | /sql/sys_menu.sql | UTF-8 | 1,320 | 3.25 | 3 | [
"MIT"
] | permissive | /*
Navicat MySQL Data Transfer
Source Server : LD
Source Server Version : 50720
Source Host : localhost:3306
Source Database : my_data
Target Server Type : MYSQL
Target Server Version : 50720
File Encoding : 65001
Date: 2019-09-23 23:15:18
*/
SET FOREIGN_KEY_CHECKS=0;
-- --------... | true |
4d97d1b903d99cce0e226645edcfd7a91f4f05e6 | SQL | VijayMVC/JCC-Data-Warehouse | /SQLDB/dbo/Views/AA_SL_ANAL_TRANSACTION_HEADER_SIMPLE_VIEW.sql | UTF-8 | 3,622 | 3.453125 | 3 | [] | no_license | create view AA_SL_ANAL_TRANSACTION_HEADER_SIMPLE_VIEW
/*
**
** Written :
** Last Amended: 21/02/2005 SR, 08/03/2005 SR, 11/07/2005 SH, 23/08/2005 SH, 13/10/2005 NC, 20/09/2006 DB, 20/07/07 NC
**
*/
as
select
cast(DET_PRIMARY as int) as [PRIMARY]
, DET_ANALYSIS
, isnull(SANAME,'') ... | true |
df0dbf21c46a4741c515c01f992a62f033a9a62d | SQL | vilhjalmur12/Project5 | /Prj5_scripts/FDQUERIES_42.sql | UTF-8 | 192 | 3.296875 | 3 | [] | no_license | SELECT 'customers: CID-->CN' AS FD, CASE WHEN COUNT(*)=0 THEN 'Gildir' ELSE 'Gildir ekki' END AS VALIDITY
FROM(
SELECT CID
FROM customers
GROUP BY CID
HAVING COUNT(DISTINCT CN) > 1
) X;
| true |
500749c68f49625f70e0b0dbcd05fdd5bb98fb49 | SQL | lionbest77/testyii | /protected/yii2advanced.sql | UTF-8 | 4,870 | 3.078125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.7.7
-- https://www.phpmyadmin.net/
--
-- Хост: 127.0.0.1:3306
-- Время создания: Июл 22 2018 г., 20:54
-- Версия сервера: 5.6.38-log
-- Версия PHP: 5.5.38
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHA... | true |
7c74be1d399236fefb40443872c54473c759f19f | SQL | Ezefalcon/Web2 | /skin_rocket.sql | UTF-8 | 5,563 | 3.140625 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.8.0.1
-- https://www.phpmyadmin.net/
--
-- Servidor: 127.0.0.1
-- Tiempo de generación: 19-11-2018 a las 17:27:27
-- Versión del servidor: 10.1.32-MariaDB
-- Versión de PHP: 7.2.5
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00"... | true |
1b30dbbb2a2c8d3aff42c6c08890301e7254a4e6 | SQL | rpau/planes | /src/test/resources/loaders/db-loader-edges.ddl | UTF-8 | 2,161 | 3.109375 | 3 | [] | no_license | use dbgraph flights into 'flights.dex'
LOAD EDGES '${generated}/flights-date-formatted-final.csv'
COLUMNS src,*,*,*,*,*,*,*,*,*,*,target
INTO FlightPlan_Flights
ignore src
WHERE TAIL src = FlightPlan.flightNr HEAD target = Flights.id
FIELDS TERMINATED ';'
mode rows
LOAD EDGES '${generated}/flightplan-final.csv'
COLUM... | true |
c7316965c44d936e79a0ee7584f85721fdf0332e | SQL | ashvin777/learning | /api/sql/create_tables.sql | UTF-8 | 921 | 3.65625 | 4 | [] | no_license | CREATE TABLE frames (
id bigserial NOT NULL,
name text NOT NULL,
number text,
serial text,
address int,
serialstart text,
PRIMARY KEY (ID)
);
CREATE TABLE components (
id bigserial NOT NULL,
number text,
name text NOT NULL,
frameid bigserial REFERENCES frames(id),
PRIMARY KEY (ID)
);
CREATE TABL... | true |
ea682adb097e7cdd4392ddea9972d3c5e3c237ed | SQL | dgonzalo05/dam | /M2/tablas/JUGADOR.sql | UTF-8 | 483 | 2.5625 | 3 | [] | no_license | create table JUGADOR (
IdJugador smallint(2)zerofill auto_increment,
NombreJugador varchar (20) charset 'utf8' default 'jugador',
AliasJugador varchar(20) charset 'latin1' collate 'latin1_bin' unique,
FechaIncorporación timestamp,
Sueldo smallint(2)zerofill default '00',
PosicionesJugador set('portero','defensa','med... | true |
060632625fbc84ac61fb7c41bfdbed67852b1ff6 | SQL | kedziorGHST/VidMe | /laravel_akedzior.sql | UTF-8 | 9,008 | 3.046875 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.2.12deb2+deb8u2
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Czas generowania: 09 Cze 2017, 10:50
-- Wersja serwera: 10.0.29-MariaDB-0+deb8u1
-- Wersja PHP: 5.6.30-0+deb8u1
use vidme
--
-- Baza danych: `laravel_akedzior`
--
-- ---------------------------------------------... | true |
9e8208ffaad03219788980e3da8ce6017bca486d | SQL | pedrovasconcellos/fipe-table-library | /Vasconcellos.FipeTable/Vasconcellos.FipeTable.Database/Tables/6-FipeVehicleInformation.sql | UTF-8 | 1,000 | 3.140625 | 3 | [
"MIT"
] | permissive | CREATE TABLE FipeVehicleInformation
(
Id VARCHAR(45) NOT NULL PRIMARY KEY,
FipeCode VARCHAR(30) NOT NULL,
FipeVehicleModelId BIGINT NOT NULL,
[Year] SMALLINT NOT NULL,
VehicleFuelTypeId SMALLINT NOT NULL,
[Authentication] VARCHAR(30) NOT NULL,
FipeVehicleFuelTypeId SMALLINT NOT NULL,
IsV... | true |
b65bfb17eabbd6bec1ccff2e9143d2efc5d88290 | SQL | jmontes50/Codigo10 | /Backend/VirtualBack/Dia5/JOIN.sql | UTF-8 | 1,592 | 4.03125 | 4 | [] | no_license | # CREACION DE LA BASE DE DATOS
create database restauranteCodigo10;
# USAR LA BASE DE DATOS
use restauranteCodigo10;
# CREAR LAS TABLAS
create table t_categoria(
cat_id int not null auto_increment primary key,
cat_nombre varchar(20) not null
);
create table t_plato(
pla_id int primary key auto_increment not null,... | true |
548bdedfb8d8d706145d033e451b9025cf2d7934 | SQL | ProjectHandler/WebPlatform | /src/main/resources/db/initDB.sql | UTF-8 | 15,974 | 3.390625 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.1.14
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Oct 24, 2015 at 03:48 PM
-- Server version: 5.6.17
-- PHP Version: 5.5.12
DROP DATABASE IF EXISTS project_handler;
CREATE DATABASE project_handler;
USE project_handler;
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZE... | true |
ad97c2cd5237a0e9ba07450784a564a49fc24938 | SQL | gmusb/PrjHospital | /SQL.sql | UTF-8 | 1,350 | 3.171875 | 3 | [] | no_license | create database hospital;
use hospital;
create table Hospital(
id int auto_increment primary key,
nm_hospital varchar(45) not null,
ds_endereco varchar(200) not null
);
create table ProntoSocorro(
cd int auto_increment primary key,
id_hospital int not null,
ds_endereco varchar(200) not null,
foreign key(id_hospital)... | true |
82805646b6662a25bd072dcf375eba1befb90787 | SQL | dickyfliputra/PROJECT-DADI-RESIK | /dadiresik (3).sql | UTF-8 | 55,134 | 2.78125 | 3 | [
"MIT"
] | permissive | -- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Waktu pembuatan: 24 Bulan Mei 2021 pada 18.27
-- Versi server: 10.4.13-MariaDB
-- Versi PHP: 7.3.20
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIE... | true |
593ceaa981914cbeff93ad8d1540725020bdada8 | SQL | ctorrentsc/modelatgeBBDD | /4.Amazon/Amazon.sql | UTF-8 | 4,537 | 3.53125 | 4 | [] | no_license | -- MySQL Script generated by MySQL Workbench
-- Sun Apr 19 11:50:04 2020
-- Model: New Model Version: 1.0
-- MySQL Workbench Forward Engineering
SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0;
SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0;
SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='ON... | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.