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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
50350e199a6c3b159a6c675824816698616bab29 | SQL | kpse/web-1 | /conf/evolutions/default/26.sql | UTF-8 | 741 | 3.046875 | 3 | [] | no_license | # --- !Ups
CREATE TABLE advertisement (
uid INT(11) NOT NULL AUTO_INCREMENT,
school_id VARCHAR(20) NOT NULL,
position_id INT(11) default 0,
link text NOT NULL,
image text NOT NULL,
name VARCHAR(20) NOT NULL default '',
status INT DEFAULT 1,
update_at BIGINT NOT NULL DEFAULT 0,
PRIMA... | true |
8263c4a34292a5775f7bd8806b5df6d1b0fc3dde | SQL | Kwamenas/SQL | /2gbabove.sql | UTF-8 | 4,668 | 3.78125 | 4 | [] | no_license | select sum((CHARGE1+CHARGE2)/(1024*1024)),ACCT_ID1,BILLING_NBR from event_usage_c_3037@link_rb where trunc(start_time)
between'02-JAN-2017' and '06-JAN-2017' and BILLING_NBR>'233001099' --AND sum((CHARGE1+CHARGE2)/(1024*1024))>='2.0'
GROUP BY ACCT_ID1,BILLING_NBR
--34014361
--113157
select distinct phone_numb... | true |
de5e0efdb90eb598b1ea2b37dc1e14c6e75dc5dc | SQL | liviamano/NRT-spatiotemporal-vis | /backend/src/main/java/master/data/download/queries.sql | UTF-8 | 12,632 | 4.03125 | 4 | [] | no_license | -- wsg 84
ALTER table no2data
ADD COLUMN polygon84 varchar(100000);
SELECT AddGeometryColumn('public', 'no2data', 'polygon84', 4326, 'POLYGON', 2);
UPDATE "no2data"
SET polygon84 = ST_Transform(ST_SetSRID(point, 4326), 4326);
-- Count number of points in polygon
SELECT city_merge.city, city_merge.date, count(n... | true |
08fe3c692fab54a4e7a727ac374a7fac1284bb9b | SQL | emeraldjava/bhaa-zend | /sql/Procs/RacePoints/addAllRacePoints.sql | UTF-8 | 428 | 2.984375 | 3 | [] | no_license | DELIMITER $$
CREATE PROCEDURE `addAllRacePoints` (_race int)
BEGIN
delete from racepoints where race = _race;
insert into racepoints(race, runner, pointsbystandard, pointsbyscoringset)
select
race,
runner,
10.1 - (positioninstandard * 0.1) as pointsbystandard,
10.1 -... | true |
9d889c5ab6a0bc7df27dbffe75dad8459d93fec5 | SQL | dwitiacahyani/UASLara-16090049 | /ujian123.sql | UTF-8 | 5,210 | 2.671875 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.8.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Waktu pembuatan: 14 Jul 2019 pada 16.58
-- Versi server: 10.1.33-MariaDB
-- Versi PHP: 7.2.6
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARA... | true |
4082be772375978fb4e2e0ae2098174e46ca21d7 | SQL | vcrfxia/ksql | /ksqldb-functional-tests/src/test/resources/sql-tests/query-upgrades/alter.sql | UTF-8 | 3,548 | 3.796875 | 4 | [
"LicenseRef-scancode-proprietary-license",
"Apache-2.0"
] | permissive | -- this file tests adding columns
----------------------------------------------------------------------------------------------------
--@test: add columns to DDL stream
-- this test uses a DML to test because of https://github.com/confluentinc/ksql/issues/6058
---------------------------------------------------------... | true |
fa240e07228fad161c24ff34783782115771a27f | SQL | mindok/CDArchiver | /CDArchiver/DBSetup.SQL | UTF-8 | 718 | 3.640625 | 4 | [
"MIT",
"LicenseRef-scancode-warranty-disclaimer"
] | permissive |
--DROP TABLE FileDetails
--DROP TABLE CdDetails
CREATE TABLE CdDetails (
CdId NVARCHAR(50) NOT NULL,
ScannedBy NVARCHAR(50) NOT NULL,
ScannedDate DATETIME NOT NULL,
Notes NVARCHAR(2000) NULL,
CONSTRAINT PK_CdDetails PRIMARY KEY CLUSTERED (CdId)
)
CREATE TABLE FileDetails (
FileId INT NOT NULL IDENTIT... | true |
8765c58dc64acc7676f39583e45db0fa699d62c3 | SQL | openaire/iis | /iis-wf/iis-wf-referenceextraction/src/main/resources/eu/dnetlib/iis/wf/referenceextraction/community/sqlite_builder/oozie_app/lib/scripts/buildcummunitiesdb.sql | UTF-8 | 600 | 2.875 | 3 | [
"Apache-2.0"
] | permissive | create temp table jsoninp as select * from stdinput();
drop table if exists grants;
create table grants as select conceptId,conceptLabel,suggestedAcknowledgement
from
(setschema 'conceptId,conceptLabel,suggestedAcknowledgement'
select c1 as conceptId,c2 as conceptLabel, c3 as suggestedAcknowledgement
... | true |
ba63c9d6d5c313e3dd206a8c661443dbb833aa6c | SQL | Lakshmi141105/country_club | /server/database/default_data.sql | UTF-8 | 11,923 | 3.078125 | 3 | [] | no_license | -- -------------------------------------------------------------
-- ---DEFAUTL DATA (If Admin side add these insertion, we can remove from here)--------------------
-- ----------------------------------------------------------------
-- venue type
INSERT INTO venue_type (venue_type) VALUES("private_party");
insert int... | true |
d7c98dce8d6c9972a1b7e8f8224dd25464de70de | SQL | zubairwazir/code_problems | /leetcode/sql/rank-scores.sql | UTF-8 | 161 | 3.84375 | 4 | [
"MIT"
] | permissive | SELECT S.Score, COUNT(S2.Score) as `Rank`
FROM Scores S,
(SELECT DISTINCT Score FROM Scores) AS S2
WHERE S.Score <= S2.Score
GROUP BY S.id
ORDER BY S.Score DESC; | true |
006f8335ddabbd45bbae912465b692b8a70ff51f | SQL | LaibaBasit008/GAPP | /gapp.sql | UTF-8 | 2,409 | 3.0625 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.8.5
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1:3306
-- Generation Time: Aug 18, 2021 at 12:27 PM
-- Server version: 5.7.28-log
-- PHP Version: 7.2.18
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OL... | true |
3cfe4408d3d00ce048aaf7020e294eaf2903a350 | SQL | processtec/storeapi | /DB/structure/store_warehouse.sql | UTF-8 | 2,583 | 3.296875 | 3 | [
"MIT"
] | permissive | -- MySQL dump 10.13 Distrib 8.0.21, for macos10.15 (x86_64)
--
-- Host: localhost Database: store
-- ------------------------------------------------------
-- Server version 8.0.21
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
... | true |
d3c4eb7a682ac93376424a3721d25c8df8a462e0 | SQL | t2m-git/LeetCode | /SQL/585.sql | UTF-8 | 956 | 3.953125 | 4 | [] | no_license | # Write your MySQL query statement below
WITH tmp_TIV_2015 AS (
SELECT
PID
FROM
insurance
WHERE
TIV_2015 IN (
SELECT
TIV_2015
FROM
insurance
GROUP BY TIV_2015
HAVING
COUNT(TIV_2015) > 1
)
),
loc AS (
SELECT
PID
FROM
insurance
GROUP BY LAT, LO... | true |
b0863d9b31c8dfaf4d8449f05d71ff8f7a9af090 | SQL | SNEHA-MARTIN-ORG/codes | /FACT ATTRIBUTE QUERIES.sql | UTF-8 | 1,092 | 3.15625 | 3 | [] | no_license | select * from dbo.DimGeography
SELECT * FROM DBO.FactCrime ORDER BY StateKey
SELECT * FROM DBO.FactPropertyMedian ORDER BY StateKey
SELECT * FROM DBO.FactRentalMedian ORDER BY StateKey
----FACT CRIME ATTIBUTE QUERY----
SELECT distinct dbo.Crime.CrimeRate, dbo.Crime."Year", dbo.Suburb.Suburb, dbo.Sub... | true |
0bea56a2f0e4b3dd7796cc1d9987975372bb9312 | SQL | hartmutmeyer/LK15 | /32_SQL_Einfuehrung/loesungen/haustier.sql | UTF-8 | 15,212 | 4.09375 | 4 | [] | no_license | DROP SCHEMA IF EXISTS haustier;
# Übung 1, Aufgabe 1
CREATE SCHEMA haustier DEFAULT CHARACTER SET utf8;
USE haustier;
CREATE TABLE tier
(
name VARCHAR(20) NOT NULL,
tierart VARCHAR(20) NOT NULL,
lebendig ENUM('ja','nein') DEFAULT 'ja',
geschlecht ENUM('weiblich','männlich') DEFAULT 'weiblich',
geburtstag DATE,
... | true |
2bd7e8433fec089cd5c3cfd62b954ee252af68cb | SQL | elinoza/m6-d7 | /data/all.sql | UTF-8 | 1,060 | 3.171875 | 3 | [] | no_license |
CREATE TABLE IF NOT EXISTS
categories (
id INTEGER PRIMARY KEY GENERATED ALWAYS AS IDENTITY,
name VARCHAR (50) NOT NULL,
img VARCHAR (50)
);
CREATE TABLE IF NOT EXISTS
authors (
id INTEGER PRIMARY KEY GENERATED ALWAYS AS IDENTITY,
name VARCHAR (50) NOT NULL,
img VARCHAR (50)
... | true |
3f545eeba6983c3271ea5c39c0a7fa8ba7fe8ab5 | SQL | TimothyBreen/Library-Project | /question 6.sql | UTF-8 | 273 | 3.5625 | 4 | [] | no_license | SELECT tblBORROWER.Name, tblBORROWER.[Address], COUNT(tblBORROWER.CardNo)
FROM tblBOOK_LOANS FULL OUTER JOIN tblBORROWER
ON tblBOOK_LOANS.CardNo = tblBORROWER.CardNo
GROUP BY tblBORROWER.CardNo, tblBORROWER.Name, tblBORROWER.[Address]
HAVING COUNT(tblBORROWER.CardNo) >5
| true |
c167bff406f973c1ff12147e976157153f3a48ed | SQL | now-in-orbit/alien-gram | /sql/project.sql | UTF-8 | 3,581 | 4.15625 | 4 | [
"Apache-2.0"
] | permissive | -- this is a comment in SQL (yes, the space is needed!)
-- these statements will drop the tables and re-add them
-- this is akin to reformatting and reinstalling Windows (OS X never needs a reinstall...) ;)
-- never ever ever ever ever ever ever ever ever ever ever ever ever ever ever ever ever ever ever ever
-- do thi... | true |
ed4746cd3756fb85b34244b00e0bf49acc410fcf | SQL | ArvindBalgo/pvt_maurirental | /maurirent.sql | UTF-8 | 9,709 | 3.21875 | 3 | [] | no_license | -- ****************** SqlDBM: MySQL ******************;
-- ***************************************************;
DROP TABLE `ExpensesDetails`;
DROP TABLE `BillingDetails`;
DROP TABLE `Pricing`;
DROP TABLE `AccomodationDetails`;
DROP TABLE `BookingDetails`;
DROP TABLE `Reviews`;
DROP TAB... | true |
e214e2debf634ffafc74916f2510b7d20d2cda61 | SQL | YarGU-Demidov/math-site | /db.sql | UTF-8 | 35,575 | 2.96875 | 3 | [
"MIT"
] | permissive | CREATE TABLE IF NOT EXISTS "__EFMigrationsHistory" (
"MigrationId" varchar(150) NOT NULL,
"ProductVersion" varchar(32) NOT NULL,
CONSTRAINT "PK___EFMigrationsHistory" PRIMARY KEY ("MigrationId")
);
DO $$
BEGIN
IF NOT EXISTS(SELECT 1 FROM "__EFMigrationsHistory" WHERE "MigrationId" = '20170926004454_I... | true |
001d6dcb26633335293e273327b4317f9067099b | SQL | syuru04/TopProject_MD | /wordlist.sql | UTF-8 | 2,691 | 3.8125 | 4 | [] | no_license | CREATE DATABASE IF NOT EXISTS wordlist;
USE wordlist;
DROP TABLE IF EXISTS texts;
DROP TABLE IF EXISTS words;
DROP TABLE IF EXISTS master;
DROP TABLE IF EXISTS asks;
DROP TABLE IF EXISTS etc;
DROP TABLE IF EXISTS users;
CREATE TABLE users (
id INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY,
nick VARCHAR(60) ... | true |
219263839c1f5676c83b3f7ef6dcfc70aa133ef0 | SQL | dino003/christian-parametrage | /database.sql | UTF-8 | 8,370 | 3.328125 | 3 | [] | no_license | -- --------------------------------------------------------
-- Hôte : localhost
-- Version du serveur: 5.7.24 - MySQL Community Server (GPL)
-- SE du serveur: Win32
-- HeidiSQL Version: 9.5.0.5337
-- --------------------------------------------------------
/*... | true |
8bdfc1594d42563a822247e39409b491e4bf5350 | SQL | DennyLe/CourseModel | /Courses_dump/courses_student.sql | UTF-8 | 2,590 | 3.09375 | 3 | [] | no_license | CREATE DATABASE IF NOT EXISTS `courses` /*!40100 DEFAULT CHARACTER SET utf8 */;
USE `courses`;
-- MySQL dump 10.13 Distrib 5.6.17, for Win32 (x86)
--
-- Host: localhost Database: courses
-- ------------------------------------------------------
-- Server version 5.7.21-log
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@... | true |
91bd06fbb3f29471601be3ab6f80edf55ffe805f | SQL | hello-nls/sql | /voidVoucher-setStatusToVOID-Update.sql | UTF-8 | 367 | 2.5625 | 3 | [] | no_license | /*
* from the community site
* https://community.nortridge.com/t/unable-to-reverse-a-duplicate-transaction-and-also-void-the-associated-voucher/2064
* Voucher_Status:
* 0 Pending
* 1 Paid
* 2 Voided
* 3 Hold
* 4 Queued
*/
-- Set Voucher Status to VOID
UPDATE Voucher SET v... | true |
6829513347b754c006645f2b7a5ece92ebddaf7e | SQL | VB6Hobbyst7/Tutorials | /Both_Libraries_part1/Libraries/UDP_routines.inc | UTF-8 | 3,185 | 3.453125 | 3 | [] | no_license | ' UDP_routines.inc
GLOBAL strThisServer AS STRING
GLOBAL ip AS LONG
GLOBAL hUDP AS LONG
%UPort = 16010
FUNCTION funOpenUDP() AS LONG
strThisServer = "OCTAL"
'
ERRCLEAR
HOST ADDR TO ip
hUDP = FREEFILE
UDP OPEN PORT %UPort AS hUDP TIMEOUT 60000
IF ERR THEN
CON.STDOUT "Error " & ERROR$
EXIT FUNCTIO... | true |
45a0a4f8a13597f0464d2b8309d81714c963fc01 | SQL | millenniumbrain/GradeMeUp | /GradeMeUp/scripts/assignments.sql | UTF-8 | 373 | 3.4375 | 3 | [] | no_license | CREATE TABLE IF NOT EXISTS Assignments (
ID INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL,
"Name" VARCHAR(255),
PointsPossible INT,
Grade INT,
StudentID INTEGER,
CourseID INTEGER,
AssignmentType INTEGER,
FOREIGN KEY(StudentID) REFERENCES students(ID),
FOREIGN KEY(CourseID) REFERENCES courses(ID)
--FOREIGN KEY(A... | true |
02bee2cfa94b069fa6c984ed7fc03edb27ed6363 | SQL | Iudina/Berkley_DataScience_Bootcamp | /10_SQL/hw8_SQL.sql | UTF-8 | 7,884 | 4.4375 | 4 | [] | no_license | USE sakila;
-- 1a. Display the first and last names of all actors from the table actor.
SELECT first_name, last_name
FROM actor;
-- 1b. Display the first and last name of each actor in a single column in upper case letters. Name the column Actor Name.
SELECT CONCAT(first_name, ' ', last_name) AS Actor_Name
FROM act... | true |
a58b79c43233165a756a690d8729b1faa50aca59 | SQL | SDC-Whirlpool/AtelierApi | /db/schema.sql | UTF-8 | 463 | 2.8125 | 3 | [] | no_license | CREATE DATABASE IF NOT EXISTS sdc;
CREATE SCHEMA IF NOT EXISTS sdctables;
CREATE TABLE sdctables.reviews (
id INTEGER NOT NULL,
product_id INTEGER NOT NULL,
rating INTEGER NOT NULL,
date date NOT NULL,
summary text NOT NULL,
body text NOT NULL,
recommend BOOLEAN NOT NULL,
reported BOOLEAN NOT NULL,
... | true |
b6083064e307e9ffa31f42e9eef0d3690f5cefbc | SQL | ilkou/soap | /Ecole.sql | UTF-8 | 2,491 | 3.234375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.9.2
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Generation Time: Jan 27, 2021 at 11:30 PM
-- Server version: 10.4.11-MariaDB
-- PHP Version: 7.2.26
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OL... | true |
eff90c6be73b96938bcf381e7307c2e055d0c98e | SQL | rajeshghourvani/assessor | /assessorportal/AMPSQL/AMP/Views/PP_REL_SEC_PROP_VW.sql | UTF-8 | 7,066 | 3.3125 | 3 | [] | no_license | /********************************************************************************************************
NAME: PP_REL_SEC_PROP_VW
PURPOSE: DDL for View PP_REL_SEC_PROP_VW
REVISIONS:
Ver Date Author Description
--------- ---------- --------------- --------------------... | true |
747a4c15f74ab25aabb7a208d6fd902ac6aab520 | SQL | ychang21/Bamazon | /schema.sql | UTF-8 | 1,441 | 3.0625 | 3 | [] | no_license | CREATE DATABASE bamazon_DB;
USE bamazon_DB;
CREATE TABLE Products(
itemId INT NOT NULL AUTO_INCREMENT,
productName VARCHAR(45) NOT NULL,
departmentName VARCHAR(45) NOT NULL,
price DECIMAL(10, 4) NOT NULL,
stockQuantity INT(10) NOT NULL,
PRIMARY KEY (itemId));
INSERT INTO Products (productName,departmentN... | true |
500012630360d5435603d3f30164143dea1278e9 | SQL | 1cg2cg3cg/AI_Concentration | /db재정의.sql | UTF-8 | 2,394 | 3.578125 | 4 | [] | no_license | show databases;
use aiconcd;
create user 'ai'@'%' identified by '1234';
grant all privileges on aiconcd.* to 'ai'@'%';
flush privileges;
use mysql;
select user, host from user;
show variables like 'PORT';
drop database aiconcd;
create database aiconcd;
use aiconcd;
-- 컬럼 타입 변경--
alter table user modify user_sex bo... | true |
3139e5b06a9428e5bc01e1060a643827604b5db4 | SQL | sees-yamazaki/plc | /gijiroku/sql/make.sql | UTF-8 | 1,936 | 3.140625 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.8.5
-- https://www.phpmyadmin.net/
--
-- Host: localhost:3306
-- Generation Time: Nov 08, 2019 at 11:53 AM
-- Server version: 5.7.25
-- PHP Version: 7.3.1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
--
-- Database: `gijiroku`
--
-- ---------------------------... | true |
7e3270f9b93da03162b286e42ba7d7c355d76f96 | SQL | bartekus/reactuate-app | /packages/server/db/migrations/20181102_201027.app_public.tables.user_authentications-up.sql | UTF-8 | 1,801 | 3.75 | 4 | [
"Apache-2.0"
] | permissive | create table app_public.user_authentications (
id serial primary key,
user_id int not null references app_public.users on delete cascade,
service text not null,
identifier text not null,
details jsonb not null default '{}'::jsonb,
created_at timestamptz not null default now(),
updated_at timestamptz not n... | true |
7c46ab4e10272fe112b46d220ef677c9ee655a24 | SQL | conero/lang | /mind/gsdm/gsdm_base-init-data.sql | UTF-8 | 1,061 | 2.890625 | 3 | [
"Apache-2.0"
] | permissive | /*==============================================================*/
/* DBMS name: MySQL 5.7 初始化数据 */
/* Created on: 2019/8/15 16:05:34 */
/*==============================================================*/
-- /-------------------- 【系统常量】
-- 基本状态
INSERT INTO co... | true |
2288ed7cf93e4f8661313b66a138f60e3e633bdf | SQL | eanderton/minibar | /resources/test.sql | UTF-8 | 778 | 2.890625 | 3 | [] | no_license | drop table if exists users;
create table users (
username varchar(255) primary key not null,
role varchar(255) not null,
password varchar(255) not null
);
insert into users (username,role,password) values ('admin','admin','password');
insert into users (username,role,password) values ('user','user','passwo... | true |
9a74d9753f85ca6e334459577ffe0255364213f7 | SQL | flexagon9/flextest | /APEX/CustomerTracker/application/shared_components/user_interface/templates/list/button_control_group.sql | UTF-8 | 1,364 | 2.640625 | 3 | [] | no_license | --application/shared_components/user_interface/templates/list/button_control_group
prompt ......list template 1024082145644455931
begin
declare
t varchar2(32767) := null;
t2 varchar2(32767) := null;
t3 varchar2(32767) := null;
t4 varchar2(32767) := null;
t5 varchar2(32767) := null;
t6 varchar2(32767) :... | true |
a9d32938aac5ea4d5ae6965505ee3e93a8b15bfb | SQL | collab-uniba/emotions-online-qa | /build_dataset/sql/dump.sql | UTF-8 | 3,621 | 3.515625 | 4 | [
"MIT"
] | permissive | # Copyright (c) 2013 Georgios Gousios
# MIT-licensed
# ERRORE RISCONTRATO: quando si esegue in mysql 'source dump.sql'
# ERROR 13 (HY000): Can't get stat of '/mnt/workingdir/stackoverflow_dump/Badges.xml' (Errcode: 13)
#
# SOLUZIONE
# sudo chown mysql:mysql /mnt/workingdir/stackoverflow_dump/ -R
drop database stackov... | true |
a7b5d96ff60111bc15a6e0e2bfeb37930f080218 | SQL | Akashv1507/wrldc_soFar_highest | /sql/soFarHighest.sql | UTF-8 | 368 | 3.015625 | 3 | [] | no_license | create table SoFar_Highest
(
id NUMBER GENERATED BY DEFAULT ON NULL AS IDENTITY,
datasource varchar2(50),
metric_name varchar2(50),
sofar_highest number(10,2),
sofar_highest_timestamp date,
prev_sofar_highest number(10,2),
prev_sofar_highest_timestamp date,
constraints unique_soFarHighest unique(datasource, metric_name... | true |
d1eff8f6855d3ef0870962a666a3aa36d9259cd0 | SQL | GerritLuimstra/DistributedNeuralNetwork | /projectdnn.sql | UTF-8 | 4,172 | 3.328125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.7.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Gegenereerd op: 10 jun 2018 om 15:39
-- Serverversie: 10.1.26-MariaDB
-- PHP-versie: 7.0.22
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARAC... | true |
4a9e1ae66a05c0c672e11dcbd9b826e9c76e7782 | SQL | funfunsin/SQL | /SQL Server 指令碼1/SQL Server 指令碼1/22DDL-Alter.sql | BIG5 | 609 | 3.390625 | 3 | [] | no_license | --ƪsW
alter table q
add ƶq int not null default 1,
q datetime not null default getdate()
--ƪק
alter table q
alter column ƶq bigint
--ƪR
alter table q
drop constraint DF__q__ƶq__52593CB8
alter table q
drop column ƶq
--ƪק
alter table q
drop constraint qjs_check
alter table q
add constraint qjs_check
che... | true |
3a95e24f076994257b2f4e3e3b5d9e387c7f7730 | SQL | moneymanagerex/general-reports | /packages/Transaction/FollowUpTransactions/sqlcontent.sql | UTF-8 | 1,085 | 3.125 | 3 | [
"MIT"
] | permissive | SELECT IFNULL(CH.CURRVALUE, m.BASECONVRATE) AS CURRRATE,
t.TRANSID,
t.TRANSDATE,
a.ACCOUNTNAME,
p.PAYEENAME,
t.NOTES,
((CASE t.TRANSCODE WHEN 'Deposit' THEN t.TRANSAMOUNT ELSE -t.TRANSAMOUNT END) * (IFNULL(CH.CURRVALUE, m.BASECONVRATE))) AS TRANSAMOUNT,
m.PFX_SYMBOL,
... | true |
a474107a865065421c4551669d722637977693c3 | SQL | thangduong3010/PL-SQL | /Script/rdbms_admin/cattrans.sql | UTF-8 | 8,175 | 3.015625 | 3 | [] | no_license | Rem
Rem $Header: rdbms/admin/cattrans.sql /st_rdbms_11.2.0/1 2012/01/13 23:08:59 yberezin Exp $
Rem
Rem cattrans.sql
Rem
Rem Copyright (c) 2000, 2012, Oracle and/or its affiliates.
Rem All rights reserved.
Rem
Rem NAME
Rem cattrans.sql - <one-line expansion of the name>
Rem
Rem DESCRIPTION
Rem <short ... | true |
dcdfc62200b15c4e6c63141875b8767058b2b010 | SQL | DmitrySadchikov/JavaItis | /DB/queries.sql | UTF-8 | 511 | 3.875 | 4 | [] | no_license | SELECT C.CAR_MAKE AS CAR
FROM CARS C, CAR_USERS U, ID_CAR_USERS_ID_CARS I
WHERE C.ID = I.ID_CAR AND I.ID_CAR_USER = U.ID
AND U.CITY = 'Казань'
SELECT U.U_NAME AS USERNAME
FROM CAR_USERS U, ID_CAR_USERS_ID_CARS I
WHERE EXISTS (SELECT *
FROM CARS C
WHERE C.ID = I.ID_CAR AND I.ID_CAR_USER = U.ID
AND C.MILEAGE > 1... | true |
183b640c801ed9a9771fab4aef7819568a00efe6 | SQL | andsmi97/OnlineCinema-backend | /postgres/tables/OnlineCinema.sql | UTF-8 | 20,824 | 3.78125 | 4 | [] | no_license | /*==============================================================*/
/* DBMS name: PostgreSQL 9.x */
/* Created on: 01.04.2019 16:12:55 */
/*==============================================================*/
/*==========================================... | true |
57022e25bd84c52f4d8f77bfe648b24f8dd0ccf2 | SQL | alexpinheiropf/college-project-e-commerce-database-PL-SQL- | /e-commerce/Functions.sql | UTF-8 | 2,450 | 4.34375 | 4 | [] | no_license | --Functions
--a. Retornar o estoque atual de determinado produto (código do produto) e disparar uma exceção caso este produto esteja descontinuado;
CREATE OR REPLACE FUNCTION estoque_produto (in_cod_produto IN Number)
return integer
AS
-- Declaracao de variavel
v_status Number;
v_estoque integer;
BEGIN
-- Codigo PL/... | true |
10db03380b46eeedbfa9e60da9c571dda23c51f8 | SQL | syedmeesamali/Python | /4_Misc/2_SQL/createnewdb.sql | UTF-8 | 557 | 2.78125 | 3 | [] | no_license |
CREATE TABLE passengers(
id SERIAL PRIMARY KEY,
name VARCHAR NOT NULL,
flight_id INTEGER REFERENCES flights2
);
INSERT INTO passengers (name, flight_id) VALUES ('Alice', 1);
INSERT INTO passengers (name, flight_id) VALUES ('Bob', 1);
INSERT INTO passengers (name, flight_id) VALUES ('Maria', 2);
INSERT ... | true |
6a2d0c520def6327ed04c8463490501755e4aa1c | SQL | silence-do-good/stress-test-Postgres-and-MySQL | /dump/high/day09/select0239.sql | UTF-8 | 191 | 2.6875 | 3 | [] | no_license |
SELECT timeStamp, temperature
FROM ThermometerObservation
WHERE timestamp>'2017-11-08T02:39:00Z' AND timestamp<'2017-11-09T02:39:00Z' AND SENSOR_ID='990c19e0_2c27_4af3_bada_a8a7ecaf3584'
| true |
f08e4dac97363b4b32ae9a91da3efafd75eb35cb | SQL | Casorey/tp-cuatri-pasado | /gdd-factura2-main/TP2C2020 K3522 FACTURA2/data/script_creacion_inicial.sql | UTF-8 | 23,757 | 2.96875 | 3 | [] | no_license |
--Borrar todo si existe, para volver a crearlo.
IF EXISTS (SELECT SCHEMA_ID FROM sys.schemas WHERE [name] = 'GDD2020')
BEGIN
PRINT('ESQUEMA EXISTENTE, eliminando...');
PRINT('ELIMINANDO CONSTRAINTS');
-- 28 CONSTRAINTS
IF EXISTS ( SELECT * FROM sys.foreign_keys WHERE object_id = OBJECT_ID(N'[GDD2020].FK_COMPR... | true |
21a3189b3f88236f3b83d213e36a42fb89d955a7 | SQL | XiaCodie/vrlv3 | /database/listat_data_schema.sql | UTF-8 | 3,246 | 3.15625 | 3 | [
"Apache-2.0",
"MIT"
] | permissive | -- phpMyAdmin SQL Dump
-- version 4.1.14
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: 22.07.2015 klo 12:00
-- Palvelimen versio: 5.6.17
-- PHP Version: 5.5.12
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
--
-- Database: `vrlv3`
--
-- ------------------------------------... | true |
c6524021f80d8897471f5f1d2e64dffb09c959db | SQL | radtek/Database-3 | /oracle/admin/scripts/dbs_stats_delete.sql | UTF-8 | 352 | 3.046875 | 3 | [] | no_license | set feed on
set timing on
delete from dbadmin.dbs_stale_stats a
where job_id = &job_id
and table_name in ('SM_AVERAGE','SM_ACCOUNT_MOVEMENTS')
and inserts=0 and deletes=0 and updates=0 and truncated='YES'
and not exists (select 1 from dbadmin.dbs_stats_queue_details where job_id=a.job_id and stale_id=a.stale_id)... | true |
f47ed2896de2b047b2f90fd130552e8782c4d8a6 | SQL | derickgroves/sql-scratch-capstone-turn-in | /Derick Groves SQL/code.sql | UTF-8 | 2,118 | 3.859375 | 4 | [] | no_license | select *
from survey
limit 10;
select question, count(question) as responses
from survey
group by 1;
select *
from quiz
limit 5;
select *
from home_try_on
limit 5;
select *
from purchase
limit 5;
with funnel as(select q.user_id,
case
when h.user_id not null then 'TRUE'
else 'FALSE... | true |
fb21b7a832ea8a3a3293f4f291a1345fd5482eac | SQL | Gandalf-the-Tartan/portfolio | /SQL/nanodegree/1_BETWEEN.sql | UTF-8 | 371 | 3.453125 | 3 | [] | no_license | # BETWEEN AND, shorthand for >= AND <=
SELECT occurred_at, gloss_qty
FROM orders
WHERE gloss_qty BETWEEN 24 AND 29;
#N.B. includes end and start points
#saves writing: column >= 24 AND column <= 29
#timestamp data type
SELECT *
FROM web_events
WHERE channel IN ('organic', 'adwords') AND occurred_at BETWEEN '2016-... | true |
64413b8319bfcdfd8aa3240832da266c65146b43 | SQL | tiwarikaustav/EmployeePayrollDBUC8ToUC12 | /UC7_SumAvgMinMaxFunctions&GroupByStatement.sql | UTF-8 | 571 | 3.59375 | 4 | [] | no_license | --UC7: Using SUM(), AVG(), MIN(), MAX() functions
SELECT SUM(salary) as 'Sum of Salary' FROM employee_payroll
WHERE gender = 'F';
SELECT SUM(salary) as 'Sum Of Salary', MIN(salary) as 'Minimum Salary',
MAX(salary) as 'Maximum Salary', COUNT(salary) as 'Number Of Males',
AVG(salary) as 'Average Salary', gender from e... | true |
26374b7bf248d0cf35a9182ace640f495e5fb1aa | SQL | TakiyaHideto/hive_eleme | /dm_ups_user_item_info_food_prefer.sql | UTF-8 | 5,510 | 3.875 | 4 | [] | no_license | #***************************************************************************************************
# ** 文件名称: dm.dm_ups_user_item_info_food_prefer.sql
# ** 功能描述: 生成用户食品偏好,并插入到用户画像中
# ** 创建者: jiahao.dong
# ** 创建日期: 2016-08-11
#********************************************************************************************... | true |
278df650c8620152388126420df92f864b559b36 | SQL | dmateusp/dbt-spark | /dbt/include/spark/macros/materializations/incremental.sql | UTF-8 | 2,317 | 3.71875 | 4 | [
"Apache-2.0"
] | permissive | {% macro get_insert_overwrite_sql(source_relation, target_relation, partitions) %}
{%- set dest_columns = adapter.get_columns_in_relation(target_relation) -%}
{%- set dest_cols_csv = dest_columns | map(attribute='quoted') | join(', ') -%}
insert overwrite table {{ target_relation }}
{{ partition_cols(l... | true |
ebfb8f5548973953e2d46b83c1cd347cd7b253aa | SQL | gvdiaz/Curso_SQL | /Unidad 1/Unidad 3/Scripts/Ejercicio_practico_3_14.sql | UTF-8 | 2,741 | 3.953125 | 4 | [
"MIT"
] | permissive | # Descripción: Ejercicio 3.14
# Autor: Gustavo Vladimir Diaz
# Fecha: 27/09/2020
# Enunciado:
# A. Obtener los 5 primeros caracteres de la cadena "ABCDEFGHIJ"
# B. Obtener los 5 últimos caracteres de la cadena "ABCDEFGHIJ"
# C. Convertir a minúsculas la cadena "ABCDEFGHIJ"
# D. Convertir a mayúsculas el resultado de C... | true |
901c3f34ab185b2039efa4ea38ba56425262d332 | SQL | thona-seguros/Repositorio-Sicas | /Objetos-BD/Paquetes/oc_clausulas.sql | UTF-8 | 3,454 | 3.1875 | 3 | [] | no_license | --
-- OC_CLAUSULAS (Package)
--
-- Dependencies:
-- STANDARD (Package)
-- STANDARD (Package)
-- CLAUSULAS (Table)
--
CREATE OR REPLACE PACKAGE SICAS_OC.oc_clausulas IS
FUNCTION DESCRIPCION(nCodCia NUMBER, nCodEmpresa NUMBER, cCodClausula VARCHAR2) RETURN VARCHAR2;
FUNCTION OBLIGATORIA(nCodCia NUMBER, nCo... | true |
2b9b27e66d285f2a08dcebcef88a7b48f76e4599 | SQL | emdimacali/todolistapp | /setupdb/createDbAndTables.sql | UTF-8 | 507 | 3.5625 | 4 | [] | no_license | CREATE DATABASE IF NOT EXISTS todolistapp;
USE todolistapp;
CREATE TABLE IF NOT EXISTS app_users(
email varchar(255) NOT NULL,
password varchar(255) NOT NULL,
PRIMARY KEY (email)
);
CREATE TABLE IF NOT EXISTS tasks(
id int(255) NOT NULL AUTO_INCREMENT,
task_name varchar(500) NOT NULL,
date_cre... | true |
767012de9d1ca3a9003d954b8b76f0b4f42409e9 | SQL | rodrigost23/currency-convert-api | /db-init.sql | UTF-8 | 1,177 | 3.75 | 4 | [] | no_license | CREATE TABLE conversion_log (id SERIAL NOT NULL, from_currency_id INT DEFAULT NULL, to_currency_id INT DEFAULT NULL, timestamp TIMESTAMP(0) WITH TIME ZONE NOT NULL, input NUMERIC(10,
2) NOT NULL, result NUMERIC(10, 2) NOT NULL, PRIMARY KEY(id));
CREATE INDEX IDX_36AA9A5AA66BB013 ON conversion_log (from_currency_id);
C... | true |
c2a49f00faefde3bfdba01fda9dbb3eb6b632393 | SQL | nuozhou715/DataBootcamp | /HW7/Analysis/analysis_2.sql | UTF-8 | 560 | 3.96875 | 4 | [] | no_license | select * from employees;
select employees.emp_no, employees.gender, employees.first_name, employees.last_name, employees.hire_date, salaries.salary
from employees
full join salaries
on employees.emp_no = salaries.emp_no;
select hire.emp_no, hire.first_name, hire.last_name, hire.hire_date
from (
select employees.emp_... | true |
df5d38e353ef4670278097d621b7713fe4309d4f | SQL | gauravm31/VTAPP | /mysql/exercise_6/person.sql | UTF-8 | 1,202 | 4.375 | 4 | [] | no_license | CREATE TABLE persons (
email VARCHAR(25),
phone VARCHAR(10),
city VARCHAR(15),
PRIMARY KEY (email)
);
LOAD DATA LOCAL INFILE 'mysql/exercise_6/email_subscribers.csv'
INTO TABLE persons
FIELDS TERMINATED BY ' , '
LINES TERMINATED BY '\n'
IGNORE 1 ROWS;
--What all cities did people respond from
SELECT DISTINCT ... | true |
d585a680dcea002e4c772681e17abc2c2d815702 | SQL | devyeony/pics | /src/main/webapp/resource/kjy/db_query_mapper_insert.sql | UTF-8 | 3,676 | 2.96875 | 3 | [] | no_license | select * from studio;
select * from studio_filter;
select * from repeat_date;
--------------------------------------------
-- repeat_date insert
--------------------------------------------
-- stu_id 10
INSERT INTO repeat_date(weekday, time, stu_id) VALUES ('mon','17-19',10);
INSERT INTO repeat_date(weekday, time, stu... | true |
63bb0f3dcc033d01417f454d56072db5ecd79f55 | SQL | jampaniuday/sql_source | /sql/model_clause/otn_download/for.sql | UTF-8 | 377 | 3.421875 | 3 | [] | no_license | SELECT SUBSTR(country,1,20) country,
SUBSTR(prod,1,15) prod, year, sales
FROM sales_view
WHERE country='Italy'
MODEL RETURN UPDATED ROWS
PARTITION BY (country)
DIMENSION BY (prod, year)
MEASURES (sale sales)
RULES (
sales['Mouse Pad', FOR year FROM 2005 TO 2012 INCREMENT 1] =
1.2 *... | true |
a703c0bbee3730a107f99260e28f7e73dc0c0d80 | SQL | typo3union/Python | /Quick/Ext/js_career - 236/ext_tables.sql | UTF-8 | 6,750 | 3.046875 | 3 | [] | no_license | #
# Table structure for table 'tx_jscareer_domain_model_clinik'
#
CREATE TABLE tx_jscareer_domain_model_clinik (
uid int(11) NOT NULL auto_increment,
pid int(11) DEFAULT '0' NOT NULL,
title varchar(255) DEFAULT '' NOT NULL,
tstamp int(11) unsigned DEFAULT '0' NOT NULL,
crdate int(11) unsigned DEFAULT '0' NOT NU... | true |
8da43d1c26ba6a7318f309ed00d3f88a7e7ab095 | SQL | Felipepereiralima/MySQL | /Atividades Inner Join/Exercício_1.sql | UTF-8 | 3,202 | 3.953125 | 4 | [] | no_license | /*
Atividade 1
Crie um banco de dados para um serviço de um game Online , o nome do banco deverá ter o seguinte nome db_generation_game_online, onde, o sistema trabalhará com as informações dos personagens desse game.
O sistema trabalhará com 2 tabelas tb_personagem e tb_classe.
siga exatamente esse passo a passo:... | true |
c08741e2023f08eac8042280362e8ef653e05c79 | SQL | OSLL/mdbci | /playground/mariadb_connection/test_results_db.sql | UTF-8 | 492 | 3.203125 | 3 | [] | no_license | CREATE DATABASE IF NOT EXISTS test_results_db;
USE test_results_db;
CREATE TABLE test_run (
id INT AUTO_INCREMENT,
jenkins_id INT,
start_time DATETIME,
target VARCHAR(256),
box VARCHAR(256),
product VARCHAR(256),
mariadb_version VARCHAR(256),
test_code_commit_id VARCHAR(256),
maxscale_commit_id VARC... | true |
c9c175189e86eba471bcc784c2ce84b700a6131e | SQL | MManoj915/Autotime | /Scripts/Oracle/Provider Mandatory Tariff Mapping.sql | UTF-8 | 649 | 3.390625 | 3 | [] | no_license | SELECT TPC.*,GEN.CONSTANTNAME AS CPTNAME,GEN1.CONSTANTNAME AS FACTORTYPENAME, GEN3.CONSTANTNAME CALMETHODNAME
FROM IM_TARIFF_PER_CATEGORY TPC
JOIN ADMCOMPANY ADMCOM ON ADMCOM.COMPANYCODE=TPC.COMPANYCODE AND TPC.COMPANYCODE =1
LEFT JOIN GENCONSTANT GEN3 ON GEN3.CATEGORY= 'SLABCALCULATIONMODE' AND GEN3.LANGUAGECOD... | true |
89bb2be1ed60e44042087439cd9248f715e4ec94 | SQL | grantdanielconsultingllc/projectx | /chapter5.sql | UTF-8 | 1,663 | 4.34375 | 4 | [] | no_license | -- chapter 5
-- Write a query to get the names of products ordered by name.
Select productname
From product
Order by productname;
-- copy the previous SQL and order by just product name, descending.
Select productname
From product
Order by productname Desc;
-- Write a query to get employee birthdate, first and last ... | true |
ee71e158b8592479a78142a2363849af7b84a905 | SQL | LucaContri/dataanalysis | /SFReportEngine/resources/prc.metrics.sql | UTF-8 | 2,949 | 4.28125 | 4 | [] | no_license | select * from analytics.sla_arg_v2 arg
where arg.`Metric` in ('ARG Submission - Waiting On Client')
and arg.`Region` like 'EMEA%';
(select t.*,
timestampdiff(second, t.`First Submitted`, t.`First Reviewed`)/3600/24 as 'First Submitted to First Reviewed (Days)',
timestampdiff(second, t.`First Submitted`, t.`CA Approve... | true |
81d2095724f44c75dcb427151c20a58879a25b8b | SQL | SabaTass/ETL-project | /SQL_data/SQL_Query_rankings.sql | UTF-8 | 1,268 | 4.15625 | 4 | [] | no_license | create table rank_airbnb1 as
select airbnb_id, brewery, dist, rank() over w from
distance window w as (partition by brewery order by dist asc);
-- create a new table from the query below to only include the top 5 airbnb rankings for each brewery
create table rank_airbnb2 as
select airbnb_id, brewery, dist, rank from ... | true |
b58b7f040473f121a64631fcd4caf57d398b931c | SQL | Take-01/frinob | /frinob/sql/frinob.sql | UTF-8 | 3,975 | 3.75 | 4 | [] | no_license | set names utf8;
set foreign_key_checks=0;
drop database if exists frinob;
create database frinob;
use frinob;
create table user_info(
id int primary key not null auto_increment comment "ID",
user_id varchar(16) unique not null comment "ユーザーID",
password varchar(100) not null comment "パスワード",
user_name varchar(20)... | true |
4ab15951b57c78f2fb5a0ef82bcb344f75d14ad4 | SQL | BaekSangYeol/Practice | /src/main/java/practice/sql/delete.sql | UTF-8 | 781 | 3.140625 | 3 | [] | no_license | /*member delete(on delete cascade)*/
delete member where m_id = 'aaa';
/*cart delete*/
--상품 1개 삭제
delete cart where c_no = 1;
--상품 전체 삭제
delete cart where m_id = 'aaa';
/*reservation delete(on delete cascade)*/
--예약 목록 1개 삭제(한 번에 2개 예약 시 예약상품목록 2개도 삭제됨)
delete reservation where r_no = 1;
--1명의 회원 예약 목록 전부... | true |
fb978b0f140b5fa0f8a737f0e4bdb36b9eb5204d | SQL | Praveenstein/musicSystem | /docs/chinook_additional_sql/q10_tracks_with_more_genre.sql | UTF-8 | 288 | 4.5625 | 5 | [] | no_license | SELECT DISTINCT
t.Name,
g.Name
FROM track t
INNER JOIN genre g
ON t.GenreId = g.GenreId
WHERE t.Name IN (SELECT
t.Name
FROM track t
GROUP BY t.Name
HAVING COUNT(DISTINCT t.GenreId) > 1
ORDER BY COUNT(DISTINCT t.GenreId) DESC, t.TrackId)
ORDER BY t.Name
LIMIT 20 | true |
e7b28be21ef3a0dd6a8c6265286057b99bab2c41 | SQL | 13141498695/gasxgj3iotyun | /jzkj-biz-admin/fileDocument/2019年1月10日gas3iotyundata.sql | UTF-8 | 12,088 | 3.078125 | 3 | [] | no_license | /*
Navicat MySQL Data Transfer
Source Server : 172.26.28.204
Source Server Version : 50642
Source Host : 172.26.28.204:3306
Source Database : gas3iotyundata
Target Server Type : MYSQL
Target Server Version : 50642
File Encoding : 65001
Date: 2019-01-10 17:40:16
*/
SET FOREIGN_KEY_... | true |
69246b639f35958b76bf674a2673214d7872fe94 | SQL | taipeifx/vote_data_TW | /2004_11/data cleaning 11.sql | UTF-8 | 3,852 | 3.8125 | 4 | [] | no_license | #EXPORT TO CSV FROM RESULTS FOR CLEANER DATA
################### DATA CLEANING #############################
#1 "attach elpaty to elcand"
CREATE TABLE cand_11 AS
SELECT elcand_11.CanNum, elcand_11.CanName, elcand_11.Sex, elcand_11.Age, elcand_11.CurInc, elpaty_9.PParty, elcand_11.RMate
FROM elcand_11
INNER JOIN elpa... | true |
18b560e978a5e6394733f9334f7f12165046bfbe | SQL | AbdulKanjo/TutorzWay | /db/schema.sql | UTF-8 | 596 | 2.828125 | 3 | [] | no_license | CREATE TABLE students
(
student_id SERIAL PRIMARY KEY NOT NULL,
first_name varchar(40),
last_name varchar(40),
location varchar(80),
age integer,
grade integer,
description varchar(40),
picture text,
favorite_tutor varchar(40),
favorite_subjects varchar(40)
);
CREATE TABLE tutor... | true |
2f7f0a5d93d0fbc2af9e2a63124b82d35805dc52 | SQL | sedc-codecademy/skwd8-07-dbdevdesign | /g3/Session 7/additonal scripts/session 7 - retrospective.sql | UTF-8 | 731 | 3.765625 | 4 | [
"MIT"
] | permissive |
CREATE VIEW vv_OpstPregledPoVraboten
AS
SELECT e.FirstName+' '+e.LastName as imeiprezime, o.TotalPrice, c.Name as custmerName,
b.Name as BEName, b.Region as BERegion, STRING_AGG(p.Name,',') as ProduktiVoNaracka,
STRING_AGG(CAST(p.price as VARCHAR(10)),',') as cenipoprodukti, SUM(od.quantity) as Quantity
FROM Emplo... | true |
ec220fe4fc41abbc2befa90781abd94e37009f78 | SQL | dacamor/chinook | /sales_agent_invoices.sql | UTF-8 | 208 | 3.15625 | 3 | [] | no_license | Select Employee.FirstName || " " || Employee.LastName as FullName, Invoice.*
from invoice
join customer on invoice.CustomerId = Customer.CustomerId
join Employee on Customer.SupportRepId = Employee.EmployeeId | true |
2fc1e6025550b8c03ffdbab8e7d543538ad8d290 | SQL | Annelies-P/kaleidos-legacy-conversion | /src/convertor/lib/queries/themes.sql | UTF-8 | 178 | 2.59375 | 3 | [] | no_license | SELECT
taxonomy_term_data.tid as id,
taxonomy_term_data.name as name,
taxonomy_term_data.description as description
FROM
`taxonomy_term_data`
WHERE
`vid` = '2'
ORDER BY
`tid`;
| true |
bd9d2786306336deddb517da151c77d8775b3377 | SQL | Edison1007/Examen_Peliculas | /PELIS.sql | UTF-8 | 2,135 | 3.625 | 4 | [] | no_license | DROP DATABASE IF EXISTS videoclub;
CREATE DATABASE IF NOT EXISTS videoclub;
USE videoclub;
CREATE TABLE peliculas(
cod_pelicula INT PRIMARY KEY AUTO_INCREMENT,
titulo VARCHAR(100),
genero VARCHAR(100),
pais VARCHAR(100),
anyo INT
);
CREATE TABLE personas(
cod_persona INT PRIMARY KEY AUTO_INCRE... | true |
193fcfcb4408b6bbf5a611ba846c498eacf744d2 | SQL | morgangiraud/ecvd-php | /finaltest/rouksana/chat/mysql.sql | UTF-8 | 508 | 3.015625 | 3 | [
"MIT"
] | permissive | CREATE DATABASE ecvchat;
USE ecvchat;
CREATE TABLE users (
id INT NOT NULL AUTO_INCREMENT,
email VARCHAR(255),
username VARCHAR(255),
password VARCHAR(255),
photo_id INT,
PRIMARY KEY (ID)
);
CREATE TABLE files (
id INT NOT NULL AUTO_INCREMENT,
filename VARCHAR(255),
path VARCHAR(255),
extension VARCHAR(... | true |
c5bf5bcb143e276833028b8895009e346a6a4a8f | SQL | n2parko/abstract-capital | /sql examples/weekly-spending.sql | UTF-8 | 167 | 3.296875 | 3 | [
"MIT"
] | permissive | select date_trunc(date, week) as week, sum(amount) as weekly_spending
from prototype.transactions_view
where date >= '2020-07-31'
and amount > 0
group by 1
order by 1 | true |
e3a63cb5ffa36f3a42de875838be9c8cea5ffc6c | SQL | ThibautJoub/gsbfraisth | /sql/3_creations_status_fiche_hors_forfait.sql | UTF-8 | 1,271 | 3.515625 | 4 | [] | no_license | SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET N... | true |
f5e4a85769139d328f8cb5f7c74ee2b8eb117ed5 | SQL | agencia-desigual/sistema-contatos-producao | /documents/database/create.sql | UTF-8 | 2,035 | 3.890625 | 4 | [] | no_license | CREATE TABLE usuario(
id_usuario INT NOT NULL AUTO_INCREMENT,
nome VARCHAR(100) NOT NULL,
email VARCHAR(150) NOT NULL,
senha VARCHAR(150) NOT NULL,
status BOOLEAN NOT NULL DEFAULT true,
cadastro TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (id_usuario)
);
CREATE TABLE token(
id_token INT... | true |
610c07b2123464b975818d8276abfb7b11f9bd38 | SQL | eveisesi/athena | /.config/migrations/20210205232929_member_jump_clones.up.sql | UTF-8 | 587 | 3 | 3 | [
"MIT"
] | permissive | CREATE TABLE `member_jump_clones` (
`member_id` INT UNSIGNED NOT NULL,
`jump_clone_id` INT UNSIGNED NOT NULL,
`location_id` BIGINT UNSIGNED NOT NULL,
`location_type` ENUM('station', 'structure') NOT NULL,
`implants` JSON NOT NULL,
`created_at` TIMESTAMP NOT NULL,
`updated_at` TIMESTAMP NOT N... | true |
35e7251df62fc1d8b569b86f6d1da12167fafb13 | SQL | realtechz/IBM-Data-Science-Files | /5.Databases_and_SQL_for_Data_Science/Week 2 - Advanced SQL/1. String Patterns, Ranges, Sorting, and Grouping/wk2q3.sql | UTF-8 | 147 | 2.640625 | 3 | [
"MIT"
] | permissive | -- RETRIEVE ALL EMPLOYEES IN DEPARTMENT 5 WHOSE SALARY IS BETWEEN
-- 60000 AND 70000
SELECT * FROM EMPLOYEES
WHERE SALARY BETWEEN 60000 AND 70000; | true |
5fa4eccb806a8b8bc44fab895c86e5efb1a630a6 | SQL | oscar0812/BookZale | /data/bookStore.sql | UTF-8 | 7,195 | 3.3125 | 3 | [
"MIT"
] | permissive | -- phpMyAdmin SQL Dump
-- version 4.7.4
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Generation Time: May 07, 2018 at 03:44 AM
-- Server version: 10.1.26-MariaDB
-- PHP Version: 7.1.9
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD... | true |
0bcca460c9a5e78b674407c96da2f6ece9d4f2ec | SQL | gwrippee/SQL-SSRS | /Inside Sales - Customer Service/Samples/JT_DroppedSamplesJohnB.sql | UTF-8 | 1,070 | 3.046875 | 3 | [] | no_license | /*********************************************************************************
** **
** SR# 13712 **
** Programmer: James Tuttle Date: 08/26/2013 **
** ---------------------------------------------------------------------------- **
** Purpose: All samples/display for 001-... | true |
5e1ae2025cac710c95101f32606dd8e0a7ace64e | SQL | efaro2014/Dojo-Assignments | /webfun/databases/world.sql | UTF-8 | 655 | 3.859375 | 4 | [] | no_license | SELECT countries.name, languages.language, languages.percentage
From countries
JOIN languages
ON languages.country_id=countries.id
WHERE languages.language='Slovene'
ORDER BY languages.percentage DESC;
SELECT countries.name, count(*)
From cities
left JOIN countries
ON cities.country_id=countries.id;
SELECT cities... | true |
c50340e762fd3560b7a07fece7a96dd3564659e3 | SQL | pntlong/Demo-Spring | /src/main/resources/db/migration/V1__init.sql | UTF-8 | 2,147 | 3.625 | 4 | [] | no_license | create extension if not exists "uuid-ossp";
create table account
(
id uuid not null default uuid_generate_v4() primary key,
account_name varchar(255) not null,
password varchar(255) not null,
role varchar not null,
created_date timestamp not null default now(),... | true |
ace1da20828e597e3d82219ccb4f8ea69d0a7961 | SQL | wylyandrews/QuiziCool | /Database/Test_Procedure_Calls.sql | UTF-8 | 2,456 | 3.15625 | 3 | [] | no_license | -- QuiziCool --
-- A database project --
-- Wyly Andrews, Riley Abrahamson, and Dawson Coleman --
-- sql page for running test procedures --
-- Created on: April 12, 2019 --
-- Last updated on: April 30, 2019... | true |
d42b5dbf9cf86c4c4e3ebfcd3bfdae911e130733 | SQL | MaySkye/fiber-monitor-system-server | /src/main/resources/db-back/fiber_monitor_system.sql | UTF-8 | 22,158 | 3.265625 | 3 | [] | no_license |
CREATE DATABASE `fiber_monitor_system` DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
grant all PRIVILEGES on fiber_monitor_system.* to root@'%' identified by '123456';
flush privileges;
use fiber_monitor_system;
set session sql_mode='STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENG... | true |
7ceb270b62cbf4c073c4df78e297cb908a06adc3 | SQL | philipscode/bd | /lab_3/view_3.sql | UTF-8 | 206 | 2.9375 | 3 | [] | no_license | CREATE VIEW `Sport club`.`constant` AS
SELECT `sn`.`full_name` Sportsman
FROM `Sport club`.`sportsmen` `sn`
WHERE `sn`.`certificate_number` NOT IN (SELECT `sportsman` FROM `Sport club`.`previous trainers`); | true |
15a05d77203c7ea97d2624e70847436306ebfe59 | SQL | Pokham/pet_adoption | /serverside/createDatabases.sql | UTF-8 | 923 | 3.078125 | 3 | [] | no_license | DROP DATABASE IF EXISTS AnimalShelters;
CREATE DATABASE AnimalShelters;
USE AnimalShelters;
CREATE TABLE Locations
(
ID INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY,
Name VARCHAR(50) NOT NULL,
Address VARCHAR(100),
Website VARCHAR(100),
Phone VARCHAR(20)
);
CREATE TABLE Contacts
(
ID INT UNSIGNED NOT NULL... | true |
a8f89ef8358c32bf5f7f2098da2d03ca48449dce | SQL | lopezmoises/BD2 | /exercicios-1/42.sql | UTF-8 | 189 | 3.171875 | 3 | [
"Apache-2.0"
] | permissive | SELECT * FROM world.country
LEFT JOIN world.countrylanguage ON world.countrylanguage.CountryCode = world.country.Code
WHERE Language = 'Spanish' AND IsOfficial = 'T' AND Percentage > 96.00 | true |
1fa8d7bd72b47d0f1b74177eb6dc1321778e01b5 | SQL | jiwankang/internet-traffic | /server_code.sql | UTF-8 | 2,169 | 3.734375 | 4 | [] | no_license | CREATE TABLE `endreason` (
`id` INTEGER PRIMARY KEY AUTO_INCREMENT,
`description` VARCHAR(255) NOT NULL
);
CREATE TABLE `networknode` (
`ip` VARCHAR(255) NOT NULL,
`port` INTEGER NOT NULL,
PRIMARY KEY (`ip`, `port`)
);
CREATE TABLE `protocol` (
`id` INTEGER PRIMARY KEY AUTO_INCREMENT,
`name` VARCHAR(255... | true |
9500ff9025b0473367e3788ad780b4bdbe677e7d | SQL | Natreton/SQL-iSkillo | /HW-18.sql | UTF-8 | 237 | 4.03125 | 4 | [] | no_license | SELECT users.id,
users.username,
COUNT(posts.userId) as Total
FROM users
LEFT JOIN posts
ON users.id = posts.userId
GROUP BY users.id, users.username
HAVING COUNT(posts.userId) < 5
ORDER BY COUNT(posts.userId) ASC ;
| true |
365996450c1d0f98c91fc21b74713cbdcd66a9dd | SQL | LegionDark/SQL_testbed | /sql/custom/mob_groups_custom.sql | UTF-8 | 115,900 | 2.8125 | 3 | [] | no_license | -- ---------------------------------------------------------------------------
-- This file adds onto, or modifies portions of the table "mob_groups" created
-- by the file mob_droplist.sql and must be imported/executed AFTER that file.
--
-- For new entries DarkStar does not have, use "INSERT INTO"
-- For changing ent... | true |
7b4ef774e5676989a30dc957d7cfb542e75c0e5e | SQL | r0bis/acc_caseloads | /sql/qsel_CountDCaseloads.sql | UTF-8 | 586 | 3.421875 | 3 | [] | no_license | SELECT main.AllocatedHCPName AS TWList,
Count(main.ClientID) AS Nr,
tbl_TWListPD.notes AS Explanation
FROM main INNER JOIN tbl_TWListPD
ON main.AllocatedHCPName = tbl_TWListPD.AllocatedHCPName
GROUP BY main.AllocatedHCPName, tbl_TWListPD.notes
ORDER BY Count(main.ClientID) DESC
;
-- When pa... | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.