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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
b617454496753e3bf70bb3882a29669c404d3c4a | SQL | mariru27/SQL-SERVER-queries- | /Laborator_4/3. EXERCITII SI PROBLEME(raspunsuri)/QUERIES_LAB4.sql | UTF-8 | 4,847 | 3.34375 | 3 | [] | no_license |
--3.1
SELECT Nume,Prenume,Adresa
FROM INTREPRINDERE.dbo.CLIENTI
WHERE Adresa='Bucuresti'
UNION
SELECT Nume,Prenume,Adresa
FROM INTREPRINDERE.dbo.FURNIZOR
WHERE Adresa = 'Bucuresti'
--3.2
SELECT *
FROM INTREPRINDERE.dbo.ANGAJATI
CROSS JOIN INTREPRINDERE.dbo.SECTII
--3.3
SELECT Nume,Prenume,NrComponente
FROM INTREPRIN... | true |
76501f8bb5dd8cebfc70d95c9bec61625f330b1e | SQL | 18918090402/MZJF_Work | /MZJF_Work/0002 Git.nonobank.com/archive_20180806/bi-etl.git/03_DW_HADOOP/02_IDW/03_SCRIPT/USER_TAG_HIST/script_old/IDW_FACT_USER_TAG_27.sql | UTF-8 | 2,473 | 3.546875 | 4 | [] | no_license | set mapreduce.job.queuename=etl-dw;
set mapreduce.job.name=IDW_FACT_USER_TAG_27_01;
set hive.groupby.skewindata = true ;
set hive.map.aggr = true ;
set hive.enforce.bucketing = true;
set hive.exec.dynamic.partition=true;
set hive.exec.dynamic.partition.mode=nonstrict;
set hive.exec.max.dynamic.partitions.pernode=10... | true |
3aca9dc66bfce05a04a5acf2e6959e1e4f23108f | SQL | Shadows100/afpa | /DW/BDD/Select/Select.sql | UTF-8 | 5,750 | 4.09375 | 4 | [] | no_license | USE exemple;
/*exercice 1 affiche toutes les informations des employés*/
SELECT *
FROM employe;
/*exercice 2 affiche toutes les informations départements*/
SELECT *
FROM dept;
/*exercice 3 affiche le nom, la date d'embauche, le numéro du supérieur, le
numéro de département et le salaire de tous les employés*/
SELECT... | true |
5b187d6aee190a47252986572b603a7d5044c42d | SQL | Luis85/symprowire-demo | /install/install.sql | UTF-8 | 48,567 | 2.796875 | 3 | [
"MIT"
] | permissive | # --- WireDatabaseBackup {"time":"2021-07-15 12:51:49","user":"","dbName":"symprowire_demo","description":"","tables":[],"excludeTables":["pages_drafts","pages_roles","permissions","roles","roles_permissions","users","users_roles","user","role","permission"],"excludeCreateTables":[],"excludeExportTables":["field_roles"... | true |
da589f8cfb886b1f4c4e712878ca3531441727ee | SQL | ElizabethKleynhans/clus | /SQL/VRI_SPECIES_GROUPING.sql | UTF-8 | 10,014 | 3.15625 | 3 | [
"Apache-2.0"
] | permissive | /*
SELECT * FROM VRI_SPECIES_GROUPS
DROP TABLE IF EXISTS VRI_SPECIES_GROUPS
CREATE UNIQUE INDEX IDX_VRI_TSA_SPECIES_GROUPS ON VRI_TSA_SPECIES_GROUPS(FEATURE_ID_WITH_TFL)
*/
--------------------------------------------------------------------------------------------
CREATE TABLE VRI_TSA_SPECIES_GROUPS AS
WITH UNPIVOT A... | true |
88149036778aed769af0a83d4f4fa3b4e2f1b7e5 | SQL | vladnaz9/DBMVN | /practice/grades-MargaritaZhevnerovich.sql | UTF-8 | 1,048 | 3.890625 | 4 | [] | no_license | -- task 1
SELECT CONCAT(student.name, ' ', student.surname, ' ', student.lastname) as fullname, group.year, group.name as group_name FROM student
left join `group` ON `group`.id = student.group_id
-- task 2
SELECT CONCAT(student.name, ' ', student.surname, ' ', student.lastname) as fullname, group.name as group_name F... | true |
82e57083f32f7705b5017b73380b5de29a4c54fa | SQL | Maxington20/DatabaseManagement-Assignment6 | /Assignment6.sql | UTF-8 | 2,453 | 4.09375 | 4 | [] | no_license | --Assignment6
--Max Herrington
CREATE DATABASE VehiclePartsDB
CREATE TABLE Plant
(
ID INT IDENTITY (1,1) PRIMARY KEY,
Location VARCHAR(30) NOT NULL
)
CREATE TABLE Employee
(
ID INT IDENTITY(1,1) PRIMARY KEY,
FirstName VARCHAR(20) NOT NULL,
LastName VARCHAR(25),
Address VARCHAR(80),
Telephone VARCHAR(10),
PlantID ... | true |
a05fd1ab8e7c4843a97a08d05dc11e5daf2554a7 | SQL | teocns/api.fyrebet.com | /sql/stored-procedures/chat/sendMessage.sql | UTF-8 | 1,694 | 3.859375 | 4 | [] | no_license | -- Return values
-- [n] = Bet placed, betId returned
-- [varchar] = Error
use casino;
drop PROCEDURE if exists `sendMessageToChatroom`;
CREATE PROCEDURE `sendMessageToChatroom`(
in _userId bigint,
in _chatRoomUUID varchar(36),
in _messageText text,
out _insertedMessageUUID varchar(36),
out error varchar(155... | true |
e3a61374d76675e6d73d1604f79876bee528a61a | SQL | unbreakablery/dbwebb-course | /sql/skolan/dml_subquery.sql | ISO-8859-15 | 458 | 3.359375 | 3 | [] | no_license | -
- subquery
-
SELECT
*
FROM kurstillfalle
WHERE
kursansvarig IN (
SELECT
akronym
FROM
larare
WHERE
avdelning = 'DIDD'
)
;
-
- subquery WITH UNION
-
(
SELECT akronym, avdelning FROM larare WHERE avdelning = 'DIDD'
)
UNION
(
SELECT akronym, avdelning FROM larare WHERE avdelning = 'DIPT'
)
... | true |
3bd0402ccec7bd2f14993f4189e8cf51272ae90b | SQL | sebrown0/TestBenchDB | /SQL/Procedures/create_or_update_test_suite_version.sql | UTF-8 | 687 | 2.828125 | 3 | [] | no_license | CREATE DEFINER=`root`@`localhost` PROCEDURE `create_or_update_test_suite_version`(
IN testSuiteRowId INT UNSIGNED,
IN testSuiteId INT UNSIGNED,
IN testSuiteName VARCHAR(200),
IN versionNote TEXT,
IN mjr INT UNSIGNED,
IN mnr INT UNSIGNED,
IN bld INT UNSIGNED,
IN transGroupNum INT UNSIGN... | true |
3ed2996a8f1e5ee3298041d670a523400a058f18 | SQL | aperveyev/booru_processor | /python/yande_re_2020/#yndr_out.sql | UTF-8 | 4,244 | 2.6875 | 3 | [] | no_license | set verify off
set termout off
set head off
set feedback off
set pagesize 0
set linesize 4000
set trimspool on
col nnn noprint
spool yndr_rip_RU.tsv
select 'POST_ID' ||chr(9)|| 'SCORE' ||chr(9)|| 'RATING' ||chr(9)|| 'POST_RANK' ||chr(9)|| 'IMG_WIDTH' ||chr(9)|| 'IMG_HEIGHT' ||chr(9)|| 'FILE_SIZE' ||chr(9)||
'S... | true |
841ba40519bf94bf2c5cd82645c15f8b0fe1e220 | SQL | gowthamdurairaj/Image_Versioning | /conf/evolutions/default/1.sql | UTF-8 | 1,031 | 3.21875 | 3 | [
"Apache-2.0"
] | permissive | # --- First database schema
# --- !Ups
set ignorecase true;
create table book (
id bigint not null,
name varchar(255) not null,
author varchar(255) not null,
description varchar(255) not null,
version bigint not null,
const... | true |
88a73335d46f6a7d39e23b94332008d9a07a8d63 | SQL | Stayer/school-site | /sql/site_albums.sql | UTF-8 | 1,818 | 2.90625 | 3 | [] | no_license | INSERT INTO site_albums
(`id`, `folder`, `title`, `text`, `img_count`)
VALUES
(1, 'medal', 'Наши медалисты', 'В этом альбоме - ученики, которые очень успешно закончили обучение в нашем лицее!', 13);
INSERT INTO site_albums
(`id`, `folder`, `title`, `text`, `img_count`)
VALUES
(2, 'sport', 'Наши спо... | true |
569f3a7c352f481404dc5d9044a37d70edb6d85b | SQL | kaairasif/phpPhotoGallery | /photo_gallery.sql | UTF-8 | 3,876 | 3.15625 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.2.7.1
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Sep 20, 2016 at 10:01 AM
-- Server version: 5.6.20
-- PHP Version: 5.5.15
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */... | true |
2b4b097ceb7bd1bbc47715876bf21c71e6ce1562 | SQL | spiro-stathakis/projects | /console/sp-imports/sp_import_events.sql | UTF-8 | 1,831 | 3.71875 | 4 | [
"BSD-3-Clause"
] | permissive |
DROP PROCEDURE IF EXISTS `sp_import_events`;
DELIMITER ;;
CREATE PROCEDURE `sp_import_events`()
MODIFIES SQL DATA
BEGIN
DECLARE no_rows INT UNSIGNED DEFAULT 0;
DECLARE l_status_active INT UNSIGNED DEFAULT 2;
DECLARE l_count INT UNSIGNED DEFAULT 0;
DECLARE l_boolean_true INT UNSIGNED DEFAULT 2;
... | true |
0de5d7ab9520db62c008e75363f700f7538bfbfe | SQL | stackcats/leetcode | /database/easy/delete_duplicate_emails.sql | UTF-8 | 151 | 3.265625 | 3 | [
"MIT"
] | permissive | # Write your MySQL query statement below
DELETE FROM person WHERE id NOT IN (
SELECT * FROM (SELECT min(p.id) FROM person p GROUP BY p.email) t
)
| true |
e40331243a95e51b500efc0c648ba2f60d71b6f9 | SQL | vgoel38/PQET | /inputs/really_final_outputs/original/without_mj/10b.sql | UTF-8 | 4,832 | 2.734375 | 3 | [] | no_license | QUERY PLAN
------------------------------------------------------------------------------------------------------------------------------------------------------... | true |
516f0931d146be26a85deadddf1f2a365fd4ef66 | SQL | federicomartin2004/cd_api | /api.sql | UTF-8 | 4,774 | 3.109375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.6.6deb5
-- https://www.phpmyadmin.net/
--
-- Host: localhost:3306
-- Generation Time: Dec 25, 2018 at 08:34 PM
-- Server version: 10.1.34-MariaDB-0ubuntu0.18.04.1
-- PHP Version: 7.2.10-0ubuntu0.18.04.1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET... | true |
add32aa39be60c344953612fdc04549c06f0b12f | SQL | lijinjoseji/gwells | /database/scripts/load-submission-ready-data.sql | UTF-8 | 15,435 | 2.828125 | 3 | [
"Apache-2.0"
] | permissive | \encoding windows-1251
\copy well_yield_unit FROM './gwells_well_yield_unit.csv' HEADER DELIMITER ',' CSV
\copy province_state FROM './gwells_province_state.csv' HEADER DELIMITER ',' CSV
\copy well_activity_type (well_activity_type_guid,code,description,is_hidden,sort_order,who_created,when_created,who_upd... | true |
41f570fac6769586df540b389e6bbaee3f47f385 | SQL | Daniel4lm/Console-Imenik | /TelefonskiImenik.sql | UTF-8 | 403 | 3.21875 | 3 | [] | no_license | DROP DATABASE IF EXISTS TelefonskiImenik ;
CREATE DATABASE TelefonskiImenik;
USE TelefonskiImenik;
CREATE TABLE osoba(
ID_Osoba INT primary key auto_increment,
Ime VARCHAR(20) NOT NULL,
Prezime VARCHAR(20) NOT NULL
);
CREATE TABLE imenik(
ID INT primary key auto_increment,
ID_Osoba INT NOT NULL,
Br... | true |
d4fd549d3352327756260283f043cd15f39ec542 | SQL | itsdanny/SQL | /STADA/FG Production.sql | UTF-8 | 3,056 | 4.15625 | 4 | [] | no_license | /*WITH FillingCapacity_CTE (Groups, TotalHours, TRCap, StadaCap)
AS
-- Define the CTE query.
(
SELECT StadaFactFGGroups.Groups, SUM(ROUND(StadaFactBudgetSKU.Qty / scheme.wsroutdm.batch_size * scheme.wsroutdm.time_per_batchsize, 0))
/ 60 AS TotalHours, MAX(TRCap) AS TRCap, MAX(StadaCap)... | true |
e6d5bb936e480101ed931e56552c61423a789e2a | SQL | melpadden/corona.info.scripts | /sql_scripts/scratch.sql | UTF-8 | 442 | 3.953125 | 4 | [] | no_license |
WITH corona_cte AS (
SELECT *,
row_number() OVER (ORDER BY last_update) AS row_num
FROM corona_info
WHERE province_name = 'Hubei'
)
SELECT current_row.*,
current_row.confirmed - COALESCE(previous_row.confirmed, 0) AS confirmed_delta
FROM corona_cte cur... | true |
92e7a4a27aed9525a64ec481b70f07e9d464f11c | SQL | mariobgr/falcon | /mysql/init_db.sql | UTF-8 | 1,380 | 2.796875 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.2.12deb2+deb8u2
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Nov 21, 2018 at 11:48 PM
-- Server version: 5.5.52-0+deb8u1-log
-- PHP Version: 5.6.33-0+deb8u1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_... | true |
930a7839ab2d37c83c5ae8e671fa6c377889ae47 | SQL | augustocrf/BootCamp_Santander | /MySQL/scrpt_create_table_insert.sql | UTF-8 | 629 | 3.234375 | 3 | [] | no_license | -- Create database
CREATE database digital_innovation_one;
-- use database
USE digital_innovation_one;
-- Criar as tabelass
CREATE TABLE aluno (
id INTEGER PRIMARY KEY AUTO_INCREMENT,
nome VARCHAR(80) NOT NULL,
idade INTEGER NOT NULL,
estado CHARACTER(2) NOT NULL
);
-- Adicionar alguns exemplos (rod... | true |
d06df99ff7e3a08529df22ab6dd8b7fb907c9bc3 | SQL | Kylord/tutor_scheduling | /group3.sql | UTF-8 | 5,800 | 3.984375 | 4 | [] | no_license | -- Document each column name
-- Make sure you are using names consistently
-- Think about maybe making Tables capitalized not all caps, SQL KEYWORDS all caps and columns lower case
-- Add some more test data (maybe all at end of file?)
-- Use consistent indenting
DROP TABLE IF EXISTS TUTOR_SCHEDULE;
DROP TABLE ... | true |
83a04c15d01c7b294799aff1e6479dc1fbfad2a3 | SQL | stat-solutions/MafutaGaffeNow | /db meta.sql | UTF-8 | 6,660 | 3.0625 | 3 | [] | no_license | users_roles:role_name
->admin_normal
->admin_super
->user_nomal
:role_type
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'password';
CREATE TABLE `accountsidgenerators` (
`TemplateIdAssets` int(11) DEFAULT '100000',
`TemplateIdExpenses` int(11) DEFAULT '200000',
`TemplateIdIncomes` i... | true |
ff65b24b63b1e45b45a0156c489b6ec09f8614dc | SQL | Genskill2/03-bootcamp-sql-NagulaRakesh | /query3.sql | UTF-8 | 227 | 3.640625 | 4 | [] | no_license | SELECT title FROM books INNER JOIN books_subjects ON books_subjects.book=books.id WHERE books_subjects.subject IN (
(SELECT id FROM subjects WHERE name = 'Technology'),
(SELECT id FROM subjects WHERE name = 'Politics')
);
| true |
8c7ce435124d4e298276c766601071aeff08d8d5 | SQL | sit7/DB-Projects-OVERVIEW | /Lorawan/dump-lora-202105051115.sql | UTF-8 | 24,747 | 2.828125 | 3 | [] | no_license | --
-- PostgreSQL database dump
--
-- Dumped from database version 12.5 (Ubuntu 12.5-1.pgdg18.04+1)
-- Dumped by pg_dump version 12.5
-- Started on 2021-05-05 11:15:47
SET statement_timeout = 0;
SET lock_timeout = 0;
SET idle_in_transaction_session_timeout = 0;
SET client_encoding = 'UTF8';
SET standard_conforming_st... | true |
c059c29656881ec4d1fb7ccb1a40be8f07fa52a0 | SQL | otmazka/finish | /webgrossbuh.sql | UTF-8 | 6,247 | 3.25 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 5.0.1
-- https://www.phpmyadmin.net/
--
-- Хост: 127.0.0.1
-- Время создания: Мар 30 2020 г., 19:30
-- Версия сервера: 10.4.11-MariaDB
-- Версия PHP: 7.4.3
--
-- 30.03.2020
--
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*... | true |
4b866d2c92d80aa023b2ec8469d31305bbedf6d9 | SQL | MaliciousGenius/ml | /ml-crawler/workers/sql/links_queue.sql | UTF-8 | 405 | 2.75 | 3 | [] | no_license | CREATE TABLE IF NOT EXISTS LinksQueue (
link String,
seed Enum8(
'false' = 0,
'true' = 1
)
) ENGINE = Kafka
SETTINGS kafka_broker_list = 'kafka.local:9092',
kafka_topic_list = 'links',
kafka_group_name = 'clickhouse',
kafka_format = 'JSONEachRow',
kafka_skip_broken_mess... | true |
e762cd8471f659b4ac724e38865d644a53be5ed8 | SQL | TheBoyMoe/DataScience-Repo | /01-sql/projects/04-more-aggregate-functions.sql | UTF-8 | 800 | 4.125 | 4 | [] | no_license |
select department, count(*) as 'total'
from met
group by department;
select count(*) as 'count'
from met
where category like '%celery%';
select title, medium, min(date) as 'date'
from met;
select title, medium, date
from met
where date like '%1600%';
select country, count(*) as count
from met
where country is not ... | true |
0a3559a184213238d7ec497ad8a359c75fea257a | SQL | asecord92/connectus | /db/seeds.sql | UTF-8 | 926 | 2.6875 | 3 | [
"MIT"
] | permissive | INSERT INTO user (username, first_name, last_name, email, password)
VALUES
('leebu', 'Lee', 'Burridge', 'leebu@mail.com', 'leebu123'),
('yokoo', 'Yoko', 'O', 'yokoo@mail.com', 'yokoo123'),
('damianl', 'Damian', 'Lazarus', 'damianl@mail.com', 'damianl123');
INSERT INTO event (name, description, date, location, creator... | true |
09f566154623b34321d66a68b8996b1b4b2b61ae | SQL | nico-ras/introduccion_bases_de_datos | /unidad2/prueba/prueba.sql | UTF-8 | 6,504 | 3.4375 | 3 | [] | no_license | DROP DATABASE IF EXISTS prueba;
CREATE DATABASE prueba;
\c prueba
CREATE TABLE category(
id SERIAL PRIMARY KEY,
kinds VARCHAR(30),
descriptions VARCHAR(50)
);
CREATE TABLE product(
id SERIAL PRIMARY KEY,
names VARCHAR(30),
descriptions VARCHAR(50),
unit_price INT,
category_id INT,
... | true |
c233e76990a9d2ca05ce422e13f1eaf633ada5a7 | SQL | JoseDiaz17/Proyecto_Opor_CI | /compreme.sql | UTF-8 | 1,538 | 2.875 | 3 | [
"LicenseRef-scancode-unknown-license-reference",
"MIT"
] | permissive | -- phpMyAdmin SQL Dump
-- version 4.8.0.1
-- https://www.phpmyadmin.net/
--
-- Servidor: 127.0.0.1
-- Tiempo de generación: 19-07-2019 a las 19:27:54
-- 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 |
ed3bcf0dd6c44ee1aa5c6a8c52f84c34b07346b2 | SQL | treejames/wutong | /Wutong/src/main/sql/poll.sql | UTF-8 | 1,401 | 3.09375 | 3 | [] | no_license | CREATE TABLE `poll` (
`id` bigint(20) NOT NULL,
`source` bigint(20) NOT NULL,
`target` varchar(5000) DEFAULT '',
`title` varchar(4096) NOT NULL,
`description` varchar(4096) DEFAULT '',
`multi` tinyint(4) DEFAULT 1,
`limit_` tinyint(4) DEFAULT 0,
`privacy` tinyint(4) DEFAULT 0,
`anonymous` tinyint(4) D... | true |
25de382f3a21f8cfc09e9ce906a069c242a09db0 | SQL | maflorvega/Redash_queries | /queries_versioned/104_Real estate -Geo localization.sql | UTF-8 | 840 | 3.3125 | 3 | [] | no_license | /*
Name: Real estate -Geo localization
Data source: 4
Created By: Admin
Last Update At: 2015-11-11T18:44:48.936083+00:00
*/
SELECT l.geo_country as Country,
l.geo_city as City,
g.lat as lat,
g.lng as lng,
count (*) as count,
FROM
(SELECT *
FROM TABLE_QUERY(djomniture:cipomniture_djmansi... | true |
d47c1b978b9906ea1dab25fda1fc3a5171e80aa4 | SQL | JasonCwx/shop | /shop.sql | UTF-8 | 7,442 | 3.265625 | 3 | [
"Apache-2.0"
] | permissive | #生活服务分类表
CREATE TABLE o2o_category(
id INT(11) UNSIGNED NOT NULL AUTO_INCREMENT KEY,
name VARCHAR(50) NOT NULL DEFAULT '',
parent_id INT(10) UNSIGNED NOT NULL DEFAULT 0,
listorder INT(8) UNSIGNED NOT NULL DEFAULT 0,
status TINYINT(1) NOT NULL DEFAULT 0,
create_time DATETIME NOT NULL DEFAULT now(),
update_... | true |
02724d173d1442b701ef187b3e198d3f0904039a | SQL | radtek/abs3 | /sql/mmfo/bars/Table/err$_bopcount.sql | UTF-8 | 2,108 | 2.859375 | 3 | [] | no_license |
PROMPT =====================================================================================
PROMPT *** Run *** ========== Scripts /Sql/BARS/Table/ERR$_BOPCOUNT.sql =========*** Run ***
PROMPT =====================================================================================
PROMPT *** ALTER_POLICY_INFO... | true |
df3cd53702a206cc19c681cb4b60c7f109bb9b11 | SQL | molokovskikh/af_ftp-gateway | /migrations/2145_00_ftp_config.sql | UTF-8 | 596 | 3.265625 | 3 | [] | no_license | create table Customers.FtpConfigs (
Id INTEGER NOT NULL AUTO_INCREMENT,
UserId INTEGER UNSIGNED,
SupplierId INTEGER UNSIGNED,
PriceUrl VARCHAR(255),
WaybillUrl VARCHAR(255),
OrderUrl VARCHAR(255),
primary key (Id)
);
alter table Customers.FtpConfigs add index (User... | true |
c17f60c23db4cd36d22cf55e9b49e90ef50a4d6c | SQL | aporcel/SQL-SummitWorks | /Phase1/SQLQuery03.sql | UTF-8 | 263 | 3.453125 | 3 | [] | no_license | -- Ex 03
CREATE PROC Q03 AS
BEGIN
SELECT C1.Country_Id,C1.Country_Name
FROM ( SELECT ROW_NUMBER() OVER (ORDER BY Country_Name ASC) AS ROWNUMBER,
C.*
FROM COUNTRY C) as C1
WHERE ROWNUMBER <= 3;
END;
| true |
c3a871165e38084267bd07764f5011f1d54aad14 | SQL | RPFJ/DDL_DB | /Data Stage - DS/ADM_LOG.SQL | UTF-8 | 412 | 2.953125 | 3 | [] | no_license | CREATE TABLE ADM_LOG_DS
(
ID_LOG NUMBER NOT NULL,
DT_EXECUCAO DATE DEFAULT SYSDATE,
PASSO VARCHAR2(100) NOT NULL,
TIPO CHAR(1) NOT NULL,
ACONTECIMENTO VARCHAR2(1000) NOT NULL,
CONSTRAINT CK_TIPO CHECK (TIPO IN ('T', 'F')),
CONSTRAINT PK_ADM_LOG PRIM... | true |
ae4d82600c49da65b5d17270f8eb531534a47409 | SQL | rxt1077/cs673 | /Database/historical.sql | UTF-8 | 4,124,062 | 2.6875 | 3 | [] | no_license | USE rxt1077;
CREATE TABLE IF NOT EXISTS historical (
date DATE,
symbol VARCHAR(32),
price DECIMAL(10,2)
);
INSERT INTO historical VALUES ('2016-03-01', 'MMM', 159.59);
INSERT INTO historical VALUES ('2016-03-02', 'MMM', 159.41);
INSERT INTO historical VALUES ('2016-03-03', 'MMM', 159.38);
INSERT INTO hist... | true |
88748ae89352e566e154e5f6413ad9ae7155d67b | SQL | vishnu7420/pawn | /sql/pawn_shop_details.sql | UTF-8 | 3,137 | 3 | 3 | [] | no_license | -- MySQL dump 10.13 Distrib 8.0.19, for Win64 (x86_64)
--
-- Host: localhost Database: pawn
-- ------------------------------------------------------
-- Server version 8.0.19
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!401... | true |
a905e6b16adc5501fa9318f3ad1b49dced40e093 | SQL | oldfoot/lams | /modules/leave/db/leave_application_approval.sql | UTF-8 | 527 | 2.984375 | 3 | [] | no_license | CREATE TABLE `leave_application_approval` (
`application_id` int(5) NOT NULL DEFAULT '0',
`user_id` int(5) NOT NULL DEFAULT '0',
`approved` char(1) DEFAULT NULL,
`date_updated` datetime DEFAULT NULL,
PRIMARY KEY (`application_id`,`user_id`),
KEY `application_id` (`application_id`),
KEY `user_id` (`user_id... | true |
9b5ee52ee022f48de3f3b76ea9c7921afc861548 | SQL | emmanuel-garza/data-sciencie-study | /sql/problem_h_1_v2.sql | UTF-8 | 605 | 4.34375 | 4 | [] | no_license | -- Assuming that now is January 1, 2017, we want to
-- find all high-value customers from 2016, who've made
-- at least one order with a total value of $10,000 and
-- give them VIP status. (6 rows)
SELECT
det.orderid,
ord.customerid,
SUM(det.unitprice*det.quantity) AS nodisc,
SUM((1-det.discount)*det.unitprice*... | true |
523be95584e79f13a41ef29b1332f589b2407ba6 | SQL | DartRabbit/topjava_graduate | /src/main/resources/db/populateDB.sql | UTF-8 | 2,575 | 3.25 | 3 | [] | no_license | DELETE FROM VOTES;
DELETE FROM USERS;
DELETE FROM DISHES;
DELETE FROM RESTAURANTS;
ALTER SEQUENCE GLOBAL_SEQ
RESTART WITH 100000;
INSERT INTO USERS (name, email, password) VALUES
('User1', 'user1@yandex.ru', 'password'),
('User2', 'user2@yandex.ru', 'password'),
('User3', 'user3@yandex.ru', 'password'),
('Use... | true |
0b5dbc4a62309f725ba95a551ed19ff3e1d111d0 | SQL | AnweshDahal/l5-databases-cw1 | /querys/bckup/Information Query/q5.sql | UTF-8 | 532 | 3.859375 | 4 | [
"MIT"
] | permissive | -- List the name of the head of modules with the list of his phone number.
SELECT
instructor.person_id,
person.first_name || ' ' || person.last_name "Name",
person.m_phone_no "Permanent Phone Number",
address.phone_no "Temporary Phone Number"
FROM
instructor
JOIN
person
ON
(instructor.person_id = person.... | true |
a59a5482bc664fedb12e9f13c74326f7be1cc4dd | SQL | radumarias/incubator-trafodion | /core/sql/regress/newregr/rowsets/teste141.sql | UTF-8 | 9,508 | 3.015625 | 3 | [
"Apache-2.0"
] | permissive | -- @@@ START COPYRIGHT @@@
--
-- Licensed to the Apache Software Foundation (ASF) under one
-- or more contributor license agreements. See the NOTICE file
-- distributed with this work for additional information
-- regarding copyright ownership. The ASF licenses this file
-- to you under the Apache License, Version 2... | true |
9ffa82fc473bdd4f86d8bc5ea4fa1b053f8e6a38 | SQL | tdharris/bashScripts | /collaboration/vibe/getCalendarCounts/getCalendarCountsFromVibe.sql | UTF-8 | 2,808 | 4.3125 | 4 | [] | no_license | -- ------------------------------------------------------------------------------
-- Authors:
-- Tyler Harris, Shane Nielson
--
-- Purpose:
-- Get events & attendees counts from a Vibe calendar for a specific date range
--
-- Assumptions:
-- -attendee teams & groups will be ignored in counts
--
-- Tip ... | true |
441a605736a44d728b5a8f5d2db8e712609fc306 | SQL | SoftuniDarby/blog | /Docs/sql/Old Versions/articles_table(0.1).sql | UTF-8 | 409 | 2.859375 | 3 | [] | no_license | CREATE TABLE `articles` (
`article_id` int(11) NOT NULL,
`author_id` int(11) NOT NULL,
`title` char(255) NOT NULL,
`content` mediumtext NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- --------------------------------------------------------
ALTER TABLE `articles`
ADD PRIMARY KEY (`article_id`);
ALTER TA... | true |
8b024c7961a6caf4ef54c9951fc41c707953ca9b | SQL | GordinV/buh70 | /sql/aruanned/lapsed/yksuse_taabel.sql | UTF-8 | 14,156 | 3.234375 | 3 | [] | no_license | DROP FUNCTION IF EXISTS lapsed.yksuse_taabel(JSONB, INTEGER);
DROP FUNCTION IF EXISTS lapsed.yksuse_taabel(INTEGER, INTEGER, INTEGER);
CREATE OR REPLACE FUNCTION lapsed.yksuse_taabel(l_rekvid INTEGER, l_kuu INTEGER DEFAULT month(current_date),
l_aasta INTEGER DEFAULT yea... | true |
3df806c0bba1e4e14773e6f329c67df48859dbcb | SQL | fhrdn24/WEB2 | /minggu5/latihan/rental_mobil.sql | UTF-8 | 4,293 | 3.296875 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Apr 03, 2021 at 07:40 PM
-- Server version: 10.4.13-MariaDB
-- PHP Version: 7.4.8
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIEN... | true |
9df729fee1aa8183bea967d89f17e5b0f93c5e59 | SQL | thesoncriel/heal365 | /src/artn/database/heal-create-table-view-physics.sql | UTF-8 | 3,801 | 3.15625 | 3 | [] | no_license | /* 물리치료 테이블 - 2014.01.07 by shkang [시작] */
create table if not exists heal_medi_physics_field (
id int not null auto_increment,
field_name char(10) not null default '',
field_type tinyint not null default 0,
field_label varchar(100) not null default '',
field_unit char(10) not null default '',
field_relation ... | true |
4930df9f3908d063aa1e4a987ba4e282dc510c5b | SQL | bennyalvarez/database-exercises | /select_exercises.sql | UTF-8 | 1,025 | 3.515625 | 4 | [] | no_license | USE codeup_test_db;
SELECT 'Pink Floyd Albums' AS 'Query One';
SELECT name AS 'The name of all albums by Pink Floyd' FROM albums WHERE artist = 'Pink Floyd';
SELECT release_date AS 'Sgt. Pepper''s Lonely Hearts Club Band release date' FROM albums WHERE name = 'Sgt. Pepper''s Lonely Hearts Club Band';
SELECT 'The ye... | true |
6b0cc671dba6de224782ce6bb4d898588879a9c7 | SQL | nwillbanks/burger | /db/schema.sql | UTF-8 | 237 | 2.890625 | 3 | [] | no_license | DROP DATABASE IF EXISTS burgers_db;
CREATE DATABASE burgers_db;
USE burgers_db;
CREATE TABLE burgers
(
'id' int NOT NULL AUTO_INCREMENT,
'burger name' varchar(255) NOT NULL,
'devoured' BOOLEAN DEFAULT false,
PRIMARY KEY (id)
); | true |
c8e2f65c048f102897f12fdb9298038906fc9135 | SQL | gaurabhalder/online-Shop-Inventory-Software | /inventory.sql | UTF-8 | 23,645 | 3.046875 | 3 | [
"MIT"
] | permissive | -- phpMyAdmin SQL Dump
-- version 5.0.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Apr 22, 2020 at 08:04 AM
-- Server version: 10.4.11-MariaDB
-- PHP Version: 7.4.3
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD... | true |
6ede581bab920f975de2813fafbac1e72e7d9167 | SQL | CKudella/corr_data | /budé/sql_queries/no_epp_per_year/comp_no_epp_per_year_sent_by_to_budé.sql | UTF-8 | 1,052 | 3.8125 | 4 | [] | no_license | SELECT DISTINCT A.send_date_year1,
B.NoEppSentFromBudé,
C.NoEppSentToBudé
FROM
(SELECT DISTINCT send_date_year1
FROM budé_cdb_v1.letters
WHERE letters_id NOT LIKE '%ck2'
AND sender_id = 'c0b89c75-45b8-4b04-bfd7-25bfe9ed040b'
UNION ALL SELECT DISTINCT send_date_year1
FR... | true |
5274a495887de3bd7ed8a58200a7cef341de10ab | SQL | greenplum-db/pxf | /automation/tincrepo/main/pxf/features/hdfs/readable/text/errors/error_table_breached/sql/query01.sql | UTF-8 | 573 | 2.515625 | 3 | [
"Apache-2.0"
] | permissive | -- @description query01 for PXF HDFS Readable error table breached
-- start_matchsubs
--
-- m/DETAIL/
-- s/DETAIL/CONTEXT/
--
-- m/ERROR:\s*(S|s)egment reject limit reached/
-- s/ERROR:\s*(S|s)egment reject limit reached.*/ERROR: segment reject limit reached/
--
-- m/CONTEXT:\s*Last error was/
-- s/CONTEXT:\s*Last err... | true |
2852032c7d070b1872a685d2a46e829d9f5960ec | SQL | sollygit/ConsoleApp | /SQL Snippets/test_dome.sql | UTF-8 | 1,490 | 4.59375 | 5 | [] | no_license | /* Write a query that select all distinct pet names. */
select distinct name from (
select name from dogs
union all
select name from cats) u
/* Write a query that selects userId and average session duration for each user who has more than one session. */
select
userid,
avg(duration) as avg
from sessions
where
... | true |
88d82725bf1807b796ce5f898403612f72bfc6f6 | SQL | azaraterochester/yoda | /aprendoz_desarrollo/alumnos_con _problema_en_descuento_matriculados.sql | UTF-8 | 789 | 3.546875 | 4 | [] | no_license | select distinct vista_datos_padres.email from
tabla_descuentos
inner join PERSONA on persona.Codigo = tabla_descuentos.codigo
inner join insc_persona_grupo_familiar on persona.Id_Persona = insc_persona_grupo_familiar.Persona_Id_Persona
inner join actualizacion_grupo_familiar on actualizacion_grupo_familiar.grupo_fam... | true |
f4a14a112bc6fe9589fb2bd36db067534679bb64 | SQL | Oyatullo/ip2020_lecture7_simple_blog | /simpsons_queries.sql | UTF-8 | 615 | 3.953125 | 4 | [] | no_license | SELECT c.id, c.name, g.grade FROM students s
JOIN grades g ON s.id=g.student_id
JOIN courses c ON c.id=g.course_id
WHERE s.name='Bart' AND g.grade<'C';
SELECT bc.name FROM students bs
JOIN grades bg ON bs.id=bg.student_id
JOIN courses bc ON bg.course_id=bc.id
JOIN courses lc ON bc.id=lc.id
JOIN grades lg ON lc.id=lg.c... | true |
419a8259562ea8d39c69d60668876162d0c88778 | SQL | peterrobert/SQL_SQLZOO | /SELECT_FROM_WORLD/8.sql | UTF-8 | 93 | 2.765625 | 3 | [
"MIT"
] | permissive |
SELECT name, population, area
FROM world
WHERE area >= 3000000 XOR population >= 250000000 | true |
d20b968f0a7f9e6b943dbca620d5fc1f6f6cd1fc | SQL | panov-ma/test | /run.sql | UTF-8 | 4,749 | 3.53125 | 4 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.0.10deb1
-- http://www.phpmyadmin.net
--
-- Хост: localhost
-- Время создания: Ноя 23 2017 г., 17:00
-- Версия сервера: 5.5.54-0ubuntu0.14.04.1
-- Версия PHP: 5.5.34-1+deb.sury.org~trusty+1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACT... | true |
8180b0a6f82dfd2ac149fa7323554856ba94c2b1 | SQL | aQuigs/POS | /procedures/DetailStatusChanged.sql | UTF-8 | 1,500 | 3.5625 | 4 | [] | no_license | DROP PROCEDURE DetailStatusChanged;
DELIMITER //
CREATE PROCEDURE DetailStatusChanged(IN IUsername VARCHAR(64), IN IPassword VARCHAR(256), IN IDetailId INT(11), IN INewStatusName VARCHAR(256), IN ICurrentStatusName VARCHAR(256), OUT OReturnCode int(3))
BEGIN
DECLARE userType varchar(10);
CALL ValidateUser(IUsername, I... | true |
9598b1f9b5ae338f781eccd9e4171dc07fc01095 | SQL | eltalave/TFG | /tfg_unir.sql | UTF-8 | 6,487 | 3.234375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.1.14
-- http://www.phpmyadmin.net
--
-- Servidor: 127.0.0.1
-- Tiempo de generación: 04-03-2016 a las 17:13:01
-- Versión del servidor: 5.6.17
-- Versión de PHP: 5.5.12
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARA... | true |
7ec157f9429922ad938a87f2bcc681fbf5ae82fc | SQL | 18215582009/ap_114 | /document/开发日志/database_updata/fc_rei-创建表-2017-05-12.sql | UTF-8 | 1,075 | 3.078125 | 3 | [] | no_license | /*
Navicat Premium Data Transfer
Source Server : localhost
Source Server Type : MySQL
Source Server Version : 50717
Source Host : localhost
Source Database : fc114
Target Server Type : MySQL
Target Server Version : 50717
File Encoding : utf-8
Date: 05/12/2017 11:28:52 ... | true |
a33c376faca2552a71e795196ffa918768595bb0 | SQL | aurantst/windows-XP-SP1 | /XPSP1/NT/inetsrv/iis/config/src/inc/comreg.sql | UTF-8 | 9,179 | 3.234375 | 3 | [] | no_license | //********** Macros ***********************************************************
#define DFT_MINROWS 16
#define DFT_BUCKETS 17
#define DFT_MAXCOL 5
#define MAX_NAME_LENGTH 1024
#define MAX_DESCRIPTION_LENGTH 1024
#define NAMECOLSIZE 260 // 260 == _MAX_PATH for file names.
#define FLAGS_COLUMN DBTYPE_I2... | true |
ee27c75bbf687a3774b549ae053d61266d7eb63e | SQL | leakon/simple-web-service | /new_service/cupcake/project/data/fixtures/data_product_colibri.sql | WINDOWS-1252 | 2,935 | 2.78125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 3.2.0.1
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Sep 21, 2010 at 01:57
-- Server version: 5.1.37
-- PHP Version: 5.3.0
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_S... | true |
b493331990ca3cd5727c429a4b0d1f70f7e85ff0 | SQL | onixred/spring-boot-security-oauth2-example | /src/main/resources/db/migration/V1.0.0.2018101901__Init_Schema_Data.sql | UTF-8 | 745 | 2.921875 | 3 | [] | no_license | CREATE TABLE User1(
id serial PRIMARY KEY,
username VARCHAR (150) UNIQUE NOT NULL,
password VARCHAR (150) NOT NULL,
salary int NOT NULL,
age int NOT NULL
);
INSERT INTO User1 (id, username, password, salary, age) VALUES (1, 'hendi', '$2a$04$I9Q2sDc4QGGg5WNTLmsz0.fvGv3OjoZyj81PrSFyGOqMphqfS2qKu', 3456, 33);
INS... | true |
8d648d391530041482feba1b8ffd89526c6d594f | SQL | JustUtahCoders/comunidades-unidas-internal | /migrations/sqls/20200206044343-bulk-sms-up.sql | UTF-8 | 724 | 3.46875 | 3 | [
"MIT"
] | permissive | CREATE TABLE IF NOT EXISTS bulkSms (
id INT AUTO_INCREMENT PRIMARY KEY,
twilioSid VARCHAR(128) NOT NULL,
clientsMatched INT NOT NULL,
clientsWithPhone INT NOT NULL,
leadsMatched INT NOT NULL,
leadsWithPhone INT NOT NULL,
uniquePhoneNumbers INT NOT NULL,
smsBody VARCHAR(2048) NOT NULL,
addedBy INT NOT ... | true |
fb7b08b1336957944e8e14a9b55d94f4a47182fa | SQL | vasilstoyanov99/CSharp_DB_January_2021 | /MSSQL/Exam_Preparation/Exam_Preparation_2/05. Teen Students.sql | UTF-8 | 98 | 2.734375 | 3 | [] | no_license | SELECT FirstName, LastName, Age
FROM Students
WHERE Age >= 12
ORDER BY FirstName ASC, LastName ASC | true |
07581095c898dc1b97e9bcf76747f9d768c305fa | SQL | ThanhMon99/ASMtest | /asmtest.sql | UTF-8 | 7,710 | 3.015625 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 5.0.1
-- https://www.phpmyadmin.net/
--
-- Máy chủ: 127.0.0.1
-- Thời gian đã tạo: Th4 08, 2020 lúc 10:49 AM
-- Phiên bản máy phục vụ: 10.4.11-MariaDB
-- Phiên bản PHP: 7.4.3
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!... | true |
f2f76cb14aa6fe110baa8a9d0a8fb38db919a3e1 | SQL | eekjacke/TDDD12_Database | /lab4/Question10MakeBooking.sql | UTF-8 | 2,279 | 3.3125 | 3 | [] | no_license | /******************************************************************************************
Question 10, concurrency
This is the second of two scripts that tests that the BryanAir database can handle concurrency.
This script sets up a valid reservation and tries to pay for it in such a way that at most
one such bo... | true |
93c3a929432c5e09e5daaca25d6d5e0e6c48bc57 | SQL | Financoresa/Financore | /Productos/Workflow/Base de Datos/Script/scr_create_wf_ejecuciones_etapas.sql | UTF-8 | 772 | 3.515625 | 4 | [] | no_license | -- Table: workflow.wf_ejecuciones_etapas
-- DROP TABLE workflow.wf_ejecuciones_etapas;
CREATE TABLE workflow.wf_ejecuciones_etapas
(
id_ejecucion_etapa numeric NOT NULL,
id_solicitud character varying(10) COLLATE pg_catalog."default" NOT NULL,
fecha_inicio date NOT NULL,
fecha_fin date,
descripcio... | true |
5f6fc41f4ad5e465ef4942afdb643597eeaf80ad | SQL | shelbourn/Udemy-Projects | /oracleDB12cSQL/instructorAssets/7.2-number-functions.sql | UTF-8 | 1,210 | 3.46875 | 3 | [
"MIT"
] | permissive | --number function
--take number and return number
--1 round function
SELECT ROUND(10.5) FROM DUAL; --if you didnt sepecify decimal places , then round without decimal
SELECT ROUND(150.49) FROM DUAL;--if you didnt sepecify decimal places , then round without decimal
SELECT ROUND(10.48, 1) FROM DUAL;
SELECT ROUND(... | true |
1b8fb29f9974eee258c052e6eb5b59f870eec7f4 | SQL | sujeetdiwakar/web-learning-advance-php | /263-create-dynamic-column-chart-using-php-ajax-with-google-charts/chart_data.sql | UTF-8 | 1,647 | 3.109375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.8.3
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Oct 02, 2019 at 08:25 AM
-- Server version: 10.1.35-MariaDB
-- PHP Version: 7.2.9
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD... | true |
b76504b539524fbdb3dc103b30e070d0e3cf50af | SQL | silence-do-good/stress-test-Postgres-and-MySQL | /dump/low/day17/select0609.sql | UTF-8 | 191 | 2.75 | 3 | [] | no_license |
SELECT timeStamp, temperature
FROM ThermometerObservation
WHERE timestamp>'2017-11-16T06:09:00Z' AND timestamp<'2017-11-17T06:09:00Z' AND SENSOR_ID='0b3ddc28_34c1_4b5d_ab67_858dd771cfae'
| true |
18cef159cc90afdf9306e3e3e911b30835944b1d | SQL | fullstackdev427/ses-cloud | /migration/20180228_alter_table_modify_column_mt_skills.sql | UTF-8 | 11,709 | 2.6875 | 3 | [] | no_license | truncate table mt_skill_categories;
insert into mt_skill_categories (id, name) values (1,"言語");
insert into mt_skill_categories (id, name) values (2,"DB");
insert into mt_skill_categories (id, name) values (3,"OS サーバー 等");
insert into mt_skill_categories (id, name) values (4,"ツール");
insert into mt_skill_categories (id,... | true |
6f3cea4e7303a3a88895fc35bf7c7890ff3e94be | SQL | agdiaz/GestionDeDatos | /TP1C2013 K3051 SI_NO_APROBAMOS_HAY_TABLA 16 ZIP123/data/Finales/01 - SELECT/72_sp_obtener_compra.sql | UTF-8 | 376 | 2.640625 | 3 | [] | no_license | CREATE PROCEDURE SI_NO_APROBAMOS_HAY_TABLA.sp_obtener_compra
(
@p_id int
)
AS
BEGIN
SELECT [id_compra]
,[id_usuario]
,ISNULL([id_cancelacion], 0) as id_cancelacion
,[fecha_compra]
,[cancel]
,[fecha_cancel]
,ISNULL([motivo_cancel], '') as motivo_cancel
FROM [GD1C2013].[SI_NO_APROBA... | true |
99571b0f2ddf967de0d6ab5d49ac72e509031f78 | SQL | manshi10/SQL-Compiler | /Final_Lex/op.sql | UTF-8 | 217 | 2.671875 | 3 | [] | no_license | CREATE TABLE ABC ( PersonID int, LastName byte, FirstName varchar, City int );
SELECT id FROM ABC WHERE ab > 12 group by name having b < 12 order by num intersect SELECT rand FROM ABC WHERE a1b > 18;
#comments = 2
| true |
02db2c2bc3ba3e1b8e0905cb5a0d73fe90e67e86 | SQL | alee32393/TavernDatabase | /CreateTables.sql | UTF-8 | 1,283 | 3.6875 | 4 | [] | no_license | USE ALee_2019
/* Created tables */
CREATE TABLE Tavern(
TavernID INT,
TavernName TEXT,
TavernLocation TEXT,
OwnerName TEXT,
SystemUsers TEXT,
SystemsUserRole TEXT,
TavernFloors INT
);
CREATE TABLE Users(
UserID INT,
UserName TEXT,
UserRole TEXT,
RoleDescription TEXT,
TavernID INT FOREIGN K... | true |
f621278898c653ebc350184419f7f83a53e1c0db | SQL | NikitaKums/TalTech | /icd0011/src/main/resources/schema.sql | UTF-8 | 877 | 3.65625 | 4 | [] | no_license | DROP TABLE IF EXISTS order_rows;
DROP TABLE IF EXISTS orders;
DROP TABLE IF EXISTS authorities;
DROP TABLE IF EXISTS users;
DROP SEQUENCE IF EXISTS seq1;
CREATE SEQUENCE seq1 AS INTEGER START WITH 1;
CREATE TABLE orders
(
id BIGINT NOT NULL PRIMARY KEY DEFAULT nextval('seq1'),
order_number VARCHAR(2... | true |
ac254de4e234466480af333da6d87aa58bd7322a | SQL | mariomartinezjr/Scripts_dba | /cria-TBS_tend/tbs_partições_sit.sql | UTF-8 | 3,788 | 2.75 | 3 | [] | no_license | CREATE TABLESPACE PART_AUDITORIA_A15_M08 DATAFILE
'+DATA/sit/datafile/part_auditoria_a15_m08.dbf' SIZE 1M AUTOEXTEND ON NEXT 10k MAXSIZE UNLIMITED
LOGGING
ONLINE
PERMANENT
EXTENT MANAGEMENT LOCAL AUTOALLOCATE
BLOCKSIZE 8K
SEGMENT SPACE MANAGEMENT AUTO
FLASHBACK ON;
alter table ADM_SGV_AUD.auditoria
add partition
... | true |
5b6bf6645c92b4f36709520f72a7c3e4f43420a5 | SQL | ErosMLima/Training-Jan-2021 | /Modules/SQL/Day6/Nihar Sodhaparmar/ViewsTask.sql | UTF-8 | 5,008 | 4.5625 | 5 | [] | no_license | USE Day6;
/* 1. Write a query to find the addresses (location_id, street_address, city, state_province, country_name) of all the departments. */
CREATE VIEW DepartmentAddress AS
SELECT d.DepartmentName
, l.LocationID
, l.StreetAddress
, l.City
, l.StateProvince
, c.CountryName
FROM Departments d
LEFT JOIN Locati... | true |
0ebb9c5e053446f61d6cb56b7b1232c30782f90c | SQL | cckmit/drive-cloud-master | /drive-cloud-modules/drive-cloud-admin/drive-cloud-admin-service/src/main/java/com/drive/admin/sql/studenttraincarapply_menu.sql | UTF-8 | 4,254 | 2.5625 | 3 | [
"MIT"
] | permissive | -- 菜单sql
INSERT INTO `sys_menu`(
`menu_name`,
`menu_perms`,
`menu_type`,
`router_path`,
`parent_id`,
`component`,
`is_link`,
`visible`,
`status`,
`icon`,
`remark`,
`order_num`,
`create_by`,
`create_time`,
... | true |
8a1800a6341e9d5a420ef6505d227ebe9ec169e2 | SQL | kicaj29/sql | /Oracle/Docs/Oracle 9i. Programowanie w jezyku PL/SQL - przyklady/rozdz10/WstawTymcz.sql | WINDOWS-1250 | 466 | 2.890625 | 3 | [] | no_license | REM WstawTymcz.sql
REM Rozdzia 10., Scott Urman - Oracle9i Programowanie w jzyku PL/SQL
REM Tej funkcji nie mona wywoa z poziomu instrukcji SQL.
CREATE OR REPLACE FUNCTION WstawTymcz(
p_Num IN tabela_tymcz.kol_num%TYPE,
p_Znak IN tabela_tymcz.kol_znak%type)
RETURN NUMBER AS
BEGIN
INSERT INTO tabela_tymcz (kol_... | true |
87fe69238bbae571e93b61bdca81d4957eb7a892 | SQL | MatheusMonteiroQ/SQL-Server-2014 | /Exercicios/exercicio - novos comandos.sql | ISO-8859-1 | 12,155 | 3.421875 | 3 | [] | no_license | Create table Cliente(
cod_clie numeric(4) constraint clie_cod_pk primary key,
nome_clie varchar(20) constraint clie_nome_nn not null,
endereco varchar(30),
cidade varchar(15),
cep char(8),
uf char(2),
cnpj char(16) constraint cnpj_uk unique,
ic char(12)
)
sp_help Cliente
select*from Cliente
----------------------------... | true |
df59e95d4a8e569f5ef00e986644b9e657fca37a | SQL | ericborn/PPPSW-SQL | /Rapid HIV.sql | UTF-8 | 1,735 | 4.03125 | 4 | [] | no_license | --drop table #temp1
SELECT p.person_nbr, p.race
,'age' = CAST((CONVERT(INT,CONVERT(CHAR(8),pp.service_date,112))-CONVERT(CHAR(8),p.date_of_birth,112))/10000 AS varchar)
,pe.enc_nbr, pp.service_date, actText, obsValue, service_item_id
INTO #temp1
from patient_procedure pp
JOIN order_ o ON pp.enc_id = o.encounter... | true |
de19bb4922e96be70b61f58335958f687ebf3ad3 | SQL | AndersonHJB/PyCharm_Coder | /Coder_Old/data-analysis/16-活跃-留存-价值/16.5练习:计算留存率.sql | UTF-8 | 632 | 3.90625 | 4 | [] | no_license | select InvoiceNo as '订单号',
CustomerID as '用户ID',time1 as '消费日期',time2 AS '首次消费日期',
datediff(time1,time2)gap from(
select
CustomerID,
InvoiceNo,
InvoiceDate as time1,
ROW_NUMBER() OVER(PARTITION BY CustomerID ORDER BY InvoiceDate) AS rank1,
FIRST_VALUE(InvoiceDate) OVER(PARTITION BY CustomerID ORDER BY InvoiceDate) AS ... | true |
e4fb1bf79887da201fda1b7e9f733899662c9a8b | SQL | prabinrs/PatientLevelPrediction | /inst/sql/sql_server/GetCovariates.sql | UTF-8 | 185,561 | 2.5625 | 3 | [
"Apache-2.0"
] | permissive | /************************************************************************
@file GetCovariates.sql
Copyright 2015 Observational Health Data Sciences and Informatics
This file is part of PatientLevelPrediction
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in complianc... | true |
7939d2561e02b26a872421fbac1c7f0434a07c0b | SQL | agencia-desigual/birishop | /documents/database/banco.sql | UTF-8 | 4,832 | 3.65625 | 4 | [] | no_license | CREATE TABLE usuario (
id_usuario INT NOT NULL AUTO_INCREMENT,
nome VARCHAR (150) NOT NULL,
nome_estabelecimento VARCHAR (150) NULL DEFAULT NULL,
cnpj VARCHAR (150) NULL DEFAULT NULL,
email VARCHAR (150) NOT NULL,
senha VARCHAR (150) NOT NULL,
telefone VARCHAR(150) NOT NULL,
nivel VARCHA... | true |
5502e054908fc4587bc25d2e6636211709c2bba4 | SQL | Aaronswright/burger | /db/schema.sql | UTF-8 | 226 | 2.6875 | 3 | [] | no_license | CREATE DATABASE IF NOT EXISTS burger_db;
USE burger_db;
DROP TABLE IF EXISTS burger_db;
CREATE TABLE burger (
id int NOT NULL AUTO_INCREMENT,
burger_name varchar(100) NOT NULL,
devoured BOOL DEFAULT false,
PRIMARY KEY (id)
); | true |
82a2d66d015366a847869693c1819122d7a4d90d | SQL | tjcprince/spring-mybatis | /src/main/resources/test_user_role.sql | UTF-8 | 808 | 2.78125 | 3 | [] | no_license | /*
Navicat Premium Data Transfer
Source Server : mysql
Source Server Type : MySQL
Source Server Version : 100110
Source Host : localhost
Source Database : test
Target Server Type : MySQL
Target Server Version : 100110
File Encoding : utf-8
Date: 10/17/2016 15:48:21 PM
... | true |
b6a5143ba5cb3518518e176c09c47d805ef64e3b | SQL | thomas-dean/GITS | /src/main/resources/db/tables/cleanup_effort.sql | UTF-8 | 253 | 2.53125 | 3 | [] | no_license | CREATE SEQUENCE IF NOT EXISTS gits.cleanup_effort_id_seq;
CREATE TABLE IF NOT EXISTS gits.cleanup_effort (
id BIGINT PRIMARY KEY DEFAULT nextval('gits.cleanup_effort_id_seq'::regclass),
effort TEXT NOT NULL
);
| true |
d66c5adc6353c2c07be67ec34da756702998c434 | SQL | Noi-Git/personal_fin | /bin/sql/personal_findb.sql | UTF-8 | 1,571 | 3.859375 | 4 | [] | no_license | CREATE TABLE users(
id SERIAL PRIMARY KEY,
username VARCHAR(255),
email VARCHAR(255) unique,
password VARCHAR(255),
phone VARCHAR(15),
created_at TIMESTAMP,
updated_at TIMESTAMP,
deleted_at TIMESTAMP
);
CREATE TABLE money_flow(
id SERIAL PRIMARY KEY,
user_id INT REFERENCES users(id),
name VARCHAR(255),
amo... | true |
37e3b47eb5685bacdd0234ef6ef59abfab86a131 | SQL | AvishekaviD/PRM | /CoreBriefs/279_SQL.sql | UTF-8 | 3,391 | 2.828125 | 3 | [] | no_license | select
b.region,'KKT' as brand,count(distinct a.best_mobile_number_hash) as counts
from PRM.kkt_cdr_contest_trans_ST a
join PRM.ref_mobile_lookup b
on a.region_lookup_number = b.lookup_prefix5
where contest_file_id = 9 and option_provided = 2
group by 1,2
order by 1,2;
select b.region,
case when lower(a... | true |
bfb36c5dc2d59f4a89eb7ef9b768d135bd32c89a | SQL | JuliaTao/sql_practice | /i_questions/tables/create_tables_sales_nick.sql | UTF-8 | 561 | 3.578125 | 4 | [] | no_license | CREATE TABLE salesperson (
id INTEGER
,name VARCHAR(24)
);
CREATE TABLE sale (
id INTEGER
,salesperson_id INTEGER
,item_id INTEGER
,date DATE
,amount INTEGER
);
CREATE TABLE item (
id INTEGER
,price NUMERIC(10,2)
);
INSERT INTO salesperson
VALUES
(1,'Nick')
,(2,'Sally')
,(3,'Evan')
... | true |
7a60f62da24a345c7f5fe96675becf4e75a0f252 | SQL | wonjongah/multicampus_IoT | /mariadb/chapter3_7.sql | UTF-8 | 623 | 3.921875 | 4 | [] | no_license | USE sqldb;
SELECT AVG(amount) AS '평균 구매 개수'
FROM buytbl;
SELECT userID, AVG(amount) AS '평균 구매 개수'
FROM buytbl
GROUP BY userID;
SELECT name, MAX(height), MIN(height) FROM usertbl; -- 잘못.. 제일 키 큰 사람과 작은 사람 알고 싶은 것 같은디.. -> 서브쿼리 이용!
SELECT NAME, MAX(height), MIN(height) -- 잘못
FROM usertbl
GROUP BY NAME;
SELECT NAME... | true |
abdedc4d05e7c4e440f24d7fce8e661517e24425 | SQL | mojodna/marblecutter-tilezen | /footprints/footprints_to_geojson.sql | UTF-8 | 833 | 3.421875 | 3 | [
"BSD-3-Clause"
] | permissive | -- Uses builtin PostGIS functionality to generate a GeoJSON FeatureCollection
-- of all the footprints in the database. To get a GeoJSON file without
-- any psql cruft, run something like this:
--
-- psql postgresql://user:password@database.host/footprints \
-- -t --pset="footer=off" \
-- -f footprints_to_geo... | true |
47e32a459db2409b0d474283aeec93f878083202 | SQL | devis505/sod | /SOD/src/main/resources/sql/insert-data.sql | UTF-8 | 1,327 | 2.640625 | 3 | [] | no_license | INSERT INTO sod_connector VALUES (1, 'dsHobotun', 'com.mysql.jdbc.Driver',
'jdbc:mysql://server120.hosting.reg.ru/u0081230_hobotun?useUnicode=true&characterEncoding=utf8',
'u0081230_hobotun', '123456789');
INSERT INTO sod_query_type VALUES (1, 'SELECT');
INSERT INTO sod_query_type VALUES (2, 'INSERT');
IN... | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.