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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
e635c47cdca744c0ff48ed2be480bff03b92398a | SQL | gelarians/MySQL | /02-Vergleichsoperatoren und Verknüpfungen/02-Vergleichsoperatoren.sql | UTF-8 | 1,738 | 3.75 | 4 | [] | no_license | -- Vergleichsoperatoren
use seminar; -- benutze die Datenbank "seminar"
drop table if exists anwender;
create table anwender
(
id int unsigned not null auto_increment primary key,
vorname varchar(30) not null,
lebensalter int unsigned
);
... | true |
d9a295b33ff6b4b3d92d7f56c893f42afe0111bb | SQL | victordomingos/Learning_SQL | /11__F1__10_3_equi-join.sql | UTF-8 | 293 | 3.53125 | 4 | [
"MIT"
] | permissive | SELECT I.codigo AS cod, I.veiculo, E.especialidade
FROM intervencao I,
veiculo V,
mecanico M,
especialidade_mecanico EM,
especialidade E
WHERE V.matricula=I.veiculo
AND I.mecanico=M.codigo
AND EM.mecanico=M.codigo
AND EM.especialidade=E.codigo;
| true |
6dfbca2abc7a9fdf004ad52f9a1d3e418cbf79ec | SQL | Ertoun/SQL | /ozaydi_e/Requete 9/requete.sql | UTF-8 | 186 | 3.828125 | 4 | [] | no_license | SELECT nom as "nom genre", COUNT(titre) as "nombre films", sum(duree_min) as "minutes totales"
from film, genre
WHERE film.genre_id = genre.id
AND genre_id
BETWEEN 3 AND 5
GROUP BY nom; | true |
206e3d149e6abf37090a8fb0a781acd441af2784 | SQL | Bapexboz/mtSQL | /POI&deal 矩阵(支付分纯新转新,意向UV分入口渠道).sql | UTF-8 | 4,186 | 3.546875 | 4 | [] | no_license | --POI&deal 矩阵(支付分纯新转新,意向UV分入口渠道)-like
select
ll.datekey,
concat
(
ll.deal_nums,'~',ll.poi_nums
) as deal_poi_nums,
ll.mt_module,
count(distinct ll.uuid) as `意向用户数`,
count(distinct pay.uuid)- count(distinct if(pn.user_type = 1,pn.uuid, null))- count(distinct if(... | true |
2926edcfe544ab94a302df4469e6a6991461cf87 | SQL | jeremynac/Dashboard | /postgresschema/schema.sql | UTF-8 | 518 | 3.09375 | 3 | [] | no_license | CREATE TABLE IF NOT EXISTS users(
user_id SERIAL PRIMARY KEY,
username TEXT UNIQUE NOT NULL,
gmail_token TEXT,
password TEXT NOT NULL
);
CREATE TABLE IF NOT EXISTS user_widgets (
widgets_id serial PRIMARY KEY,
user_id INTEGER NOT NULL references users(user_id) ON DELETE CASCADE
);
CREATE TABLE... | true |
b5c95ed508e6bcc32a786bcf9b309b033772f755 | SQL | gptarun/plantheunplanned | /application/SQL/user_admin.sql | UTF-8 | 1,588 | 2.875 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | -- phpMyAdmin SQL Dump
-- version 4.9.0.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Jan 18, 2020 at 09:37 AM
-- Server version: 10.4.6-MariaDB
-- PHP Version: 7.3.8
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OL... | true |
926f61100a6573d527086e6c8d769713b7d81c52 | SQL | fiorella212/fedd | /SQL/Alters.sql | UTF-8 | 3,038 | 3.328125 | 3 | [] | no_license | ALTER TABLE `puesto_trabajo` ADD `id_empresa_sap` VARCHAR(11) NULL DEFAULT NULL AFTER `codigo_unificado`;
ALTER TABLE `puesto_trabajo` ADD `id_local_sap` VARCHAR(11) NULL DEFAULT NULL AFTER `id_empresa_sap`;
-- 05/04/2017
ALTER TABLE `puesto_trabajo` ADD `area_puesto` VARCHAR(255) NULL DEFAULT NULL AFTER `... | true |
9cabf6ffbfddfb07dda1e021a3a62ae7b273272a | SQL | Symplicity/subdivision-list | /data/pt/mysql/subdivisions_BE.mysql.sql | UTF-8 | 1,100 | 2.796875 | 3 | [
"MIT"
] | permissive | CREATE TABLE subdivision_BE (id VARCHAR(6) NOT NULL, name VARCHAR(255) NOT NULL, level VARCHAR(64) NOT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDB;
INSERT INTO `subdivision_BE` (`id`, `name`, `level`) VALUES ('BE-VAN', 'Antuérpia', 'province');
INSERT INTO `subdivision_BE`... | true |
b05e79e3f40fce3fa560504bc4958dcb15ba81a1 | SQL | CinthaAryani/uasku | /kasir/db_toko.sql | UTF-8 | 7,283 | 3.140625 | 3 | [
"MIT"
] | permissive | -- phpMyAdmin SQL Dump
-- version 5.0.4
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Generation Time: Jan 20, 2021 at 12:57 PM
-- Server version: 10.4.17-MariaDB
-- PHP Version: 8.0.0
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIEN... | true |
6e294f099c1ed480a10325d7f8193d709fb29af2 | SQL | softden2006/backup | /db.sql | UTF-8 | 107,708 | 2.84375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.5.4.1deb2ubuntu2
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Apr 07, 2018 at 05:41 PM
-- Server version: 5.7.21-0ubuntu0.16.04.1
-- PHP Version: 7.0.28-0ubuntu0.16.04.1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_C... | true |
7440f606254a276112e0bb6b4714de9eb0b8f8b7 | SQL | bgulbis/stroke_ich | /qry/isc_hannah/isc_locations.sql | UTF-8 | 2,002 | 3.953125 | 4 | [] | no_license | WITH PATIENTS AS (
SELECT DISTINCT
ENCOUNTER.ENCNTR_ID,
ENCOUNTER.PERSON_ID,
ENCNTR_ALIAS.ALIAS,
ENCOUNTER.DISCH_DT_TM
FROM
ENCNTR_ALIAS,
ENCOUNTER
WHERE
ENCNTR_ALIAS.ALIAS IN @prompt('Enter value(s) for Alias','A',,Multi,Free,Persistent,,User:0)
AND ENCNTR_ALIAS.ENCNTR_ALIAS_TYPE_CD = 619 -- FIN ... | true |
1d757e8b948e1845ff7b7cd6226d7aaefa2bfe1c | SQL | lin590/BestBuy | /best_buy (2).sql | UTF-8 | 42,915 | 3.234375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.9.5
-- https://www.phpmyadmin.net/
--
-- Host: localhost:3306
-- Generation Time: Dec 07, 2020 at 06:32 AM
-- Server version: 5.7.24
-- PHP Version: 7.4.1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHA... | true |
57382a69c2ce4e47f0c1d2bc64d81a5cf2dffdae | SQL | marlisreyes14/smart | /Base de datos/proyecto.sql | UTF-8 | 4,932 | 3.015625 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 5.1.1
-- https://www.phpmyadmin.net/
--
-- Servidor: 127.0.0.1
-- Tiempo de generación: 26-10-2021 a las 17:00:09
-- Versión del servidor: 10.4.18-MariaDB
-- Versión de PHP: 8.0.3
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_... | true |
3f802155673cd25bfc91fefbc0d546908e19367b | SQL | mr-fuller/npmrds | /trucks/pm_peak_tttr_2012.sql | UTF-8 | 1,387 | 3.890625 | 4 | [] | no_license | --drop table congestion_lottr;
--create table congestion_lottr as
alter table tttr
add column if not exists tttr_pmp_2012 numeric,
add column if not exists ttt_pmp50pct_2012 numeric,
add column if not exists ttt_pmp95pct_2012 numeric;
with
joined as(
select i.*,
g.miles,
g.geom
from npmrds2012to2016truck... | true |
3060c1eb1f31fc669c09bcd9626f10538efdc4f9 | SQL | WillZWL/project | /database/change script/chatandvision.com/20110507.sql | UTF-8 | 2,057 | 3.71875 | 4 | [] | no_license | CREATE TABLE `software_licence` (
`sku` varchar(15) NOT NULL,
`key` varchar(255) NOT NULL,
`link` varchar(255) DEFAULT NULL,
`distributed` tinyint(2) unsigned NOT NULL DEFAULT '0' COMMENT '0 = No / 1 = Yes',
`status` tinyint(2) unsigned NOT NULL DEFAULT '1' COMMENT '0 = Inactive / 1 = Active',
`create... | true |
3fb8d536eb2477bea16626e318b58ab7e0931441 | SQL | ZYFZYF/RoboDBMS | /test/select_one_table.sql | UTF-8 | 1,262 | 3.1875 | 3 | [] | no_license | create database test;
use database test;
drop table select_one_table;
create table select_one_table( O_ORDERKEY INT PRIMARY KEY,
O_CUSTKEY INT NOT NULL,
O_ORDERSTATUS CHAR(1),
O_TOTALPRICE DECIMAL,
... | true |
dd5711a2941f135cdd244493a725eec3ddb56031 | SQL | FieryCharizard7/CIV-il-War-Multiplayer-Modpack | /Reduced Unit Graphics (v 9)/SQL/ReducedUnitGraphics.sql | UTF-8 | 81,843 | 2.703125 | 3 | [] | no_license | -----------------------------------------------------------------------------
-- Reduced Unit Graphics
-- Base Units
-----------------------------------------------------------------------------
-- SOLDIERS (0.18)
------------------------------------------------
UPDATE ArtDefine_UnitMemberInfos SET Scale = 0.18 WHERE ... | true |
72053dd44ff76068f2c5f6566cb637e46fdc1047 | SQL | domduf/NFA083-Soulminisite | /bd/soul_membres-0204.sql | UTF-8 | 8,487 | 3.25 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.5.2
-- http://www.phpmyadmin.net
--
-- Client : localhost
-- Généré le : Sam 02 Avril 2016 à 12:23
-- Version du serveur : 10.1.10-MariaDB
-- Version de PHP : 5.6.19
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHAR... | true |
cd5ecda5e613e4b112a9d2fe4cbe3dc1962cf8ab | SQL | no-later-cn/Tourism | /Data/signin.sql | UTF-8 | 1,281 | 2.96875 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.1.14
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: 2017-04-19 16:00:30
-- 服务器版本: 5.6.17
-- PHP Version: 5.5.12
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET ... | true |
0a125398d03b1d1a68db9cb7382c39e9f15c2680 | SQL | laptopsr/superled | /sql_pohja.sql | UTF-8 | 5,337 | 3.328125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.5.1
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: 03.01.2017 klo 17:31
-- Palvelimen versio: 10.1.9-MariaDB
-- PHP Version: 5.5.30
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIE... | true |
3f85441a927281582c2b6568843aff102524dd22 | SQL | rzendaris/WeightLogging | /weight_log.sql | UTF-8 | 2,074 | 3.078125 | 3 | [
"MIT"
] | permissive | -- phpMyAdmin SQL Dump
-- version 4.8.0.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Aug 28, 2018 at 01:58 PM
-- Server version: 10.1.32-MariaDB
-- PHP Version: 7.2.5
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @O... | true |
44bd8ddb8e43d82bfe855fbf7aeb160a7cb02aff | SQL | armandoaepp/PHPeru-FrameWork | /v.0.8/clases/Procedure/Procedure_configuracion.sql | UTF-8 | 2,648 | 3.1875 | 3 | [] | no_license | /* Procedures Generada desde Cix-PHP - by power @armandoaepp */
DELIMITER ;;
CREATE PROCEDURE usp_set_configuracion( id int(11),titulo varchar(200),horario text,direccion text,email varchar(200),telefono varchar(20),facebook varchar(75),youtube varchar(75),instagram varchar(75),mapa text,popup varchar(75),show_popup in... | true |
9f7594967274db0c5ddeee7bdfdf7bbd4208b746 | SQL | royert/Implantacion | /bd_futbol.sql | UTF-8 | 5,770 | 3.109375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.8.4
-- https://www.phpmyadmin.net/
--
-- Servidor: 127.0.0.1
-- Tiempo de generación: 01-02-2021 a las 17:08:07
-- Versión del servidor: 10.1.37-MariaDB
-- Versión de PHP: 7.3.1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
... | true |
0cbb2f00571ff8baf043e746aa186d4633292776 | SQL | jimobrien/rss-puppy | /monitor/init-feed-db.sql | UTF-8 | 316 | 2.625 | 3 | [
"MIT"
] | permissive | DROP TABLE IF EXISTS feeds;
CREATE TABLE feeds (feed text primary key, lastUpdated timestamp default NULL);
-- DROP TABLE IF EXISTS entries;
CREATE TABLE IF NOT EXISTS entries (
id text primary key,
feed text,
title text,
description text,
image_url text,
date timestamp,
link text
);
| true |
7c18a2abe7b55be0b46ad9b66e2f3f1cea28b288 | SQL | rhodeskl/YelpDatabaseApplication | /sql statements for milestone 2 UI.sql | UTF-8 | 1,645 | 4.34375 | 4 | [] | no_license | --Retrieve all distinct states that appear in the Yelp business data and list them
select distinct state_name from business
--when a user selects a state, retrieve and display the cities that appear in the Yelp business data in the selected state
--(using NC as example)
select distinct city
from business
where state_n... | true |
208cc8bcca46230038368889421fffc9a64f52c6 | SQL | avgasanov/java-nanodegree-data-store-for-customer-reviews | /src/main/resources/create.sql | UTF-8 | 944 | 3.75 | 4 | [] | no_license | CREATE TABLE `udacity`.`products` (
`id` INT NOT NULL AUTO_INCREMENT,
`name` VARCHAR(150) NOT NULL,
PRIMARY KEY (`id`));
CREATE TABLE `udacity`.`reviews` (
`id` INT(11) NOT NULL AUTO_INCREMENT,
`username` VARCHAR(45) NOT NULL,
`product_id` INT(11) NULL DEFAULT NULL,
INDEX `review_product_fk_idx` (`produc... | true |
8d735d2d1160549121a108e19ba626f6222d40ad | SQL | gjader/IDA_SOFTPLAN | /TESTE_IDA_SOFTPLAN/Script.sql | UTF-8 | 2,968 | 3.234375 | 3 | [] | no_license | --<ScriptOptions statementTerminator=";"/>
CREATE TABLE "Schema"."user_type" (
"cd_user_type_id" SERIAL NOT NULL,
"nm_name" VARCHAR(150) NOT NULL
);
CREATE TABLE "Schema"."user" (
"cd_user" SERIAL NOT NULL,
"nm_name" VARCHAR(150) NOT NULL,
"de_email" VARCHAR(100) NOT NULL,
"nu_type" INTEGER NO... | true |
da8868921527750e2afdffdd5ebd8d4ad3fbdfdb | SQL | NTXpro/NTXbases_de_datos | /DatabaseNTXpro/ERP/Tables/AjusteCuentaCobrar.sql | UTF-8 | 1,290 | 2.796875 | 3 | [] | no_license | CREATE TABLE [ERP].[AjusteCuentaCobrar] (
[ID] INT IDENTITY (1, 1) NOT NULL,
[IdTipoComprobante] INT NOT NULL,
[IdCuentaCobrar] INT NOT NULL,
[IdEntidad] INT NOT NULL,
[IdMoneda] INT NULL,
[IdEmpresa]... | true |
720716924f0f501a43e193d5b165927339cd2f6e | SQL | LucaciuAlex/CriSoft_practica | /ScriptUseri.sql | UTF-8 | 296 | 2.53125 | 3 | [] | no_license | create table useri(
id number(3) primary key,
username varchar(40) unique,
passwordAng varchar(40),
email varchar(40),
nivelAcces number(1)
)
alter table useri
add constraint nrCaractere_parola check (length(passwordAng)>=8)
create sequence incrementUseri start with 1;
| true |
866fa943ab443a81382e7eee88daa26e1ee18815 | SQL | jason-hannett/Tender-Care-App | /db/init.sql | UTF-8 | 1,038 | 3.71875 | 4 | [] | no_license | create table users (
user_id serial primary key,
email varchar(250) not null,
password text not null
);
create table posts (
post_id serial primary key,
time date not null default current_date,
post varchar(500) not null,
image text
);
create table primary_info(
primary_id serial primary key... | true |
1cb81fa682aea1ba723e5d830f945dcdf2ada5a9 | SQL | YairPR/Oracle | /Scripts/IBM/Assessment/Herramientas/info_awr_report_grafica.sql | UTF-8 | 10,842 | 2.78125 | 3 | [] | no_license | Graficar AWR
Para ello hay que sacar awr en "text" entre cada snap_id para
tener varios archivos por ejemplo si queremos ver entre 2 horas y el tiempo de generacion de awr es cada 30 minutos tenemos q sacar 4 archivos.
Una vez los 4 archivos hay q ejecutar la shell
awr_parse.sh
-- Una vez generado el csv llevarlo al ... | true |
a827157f13bb25a4a1efb0787191c6c46624634d | SQL | DiegoSanchezPiedra/edt | /2ASIX/M02/postgresql/p4/CasaColonies_creacio.sql | UTF-8 | 2,007 | 3.4375 | 3 | [] | no_license | CREATE TABLE casa_de_colonies (
id_casa smallint NOT NULL,
nom_casa character varying(20) NOT NULL,
capacitat smallint NOT NULL,
);
CREATE TABLE infants (
id_infant smallint NOT NULL,
nom_infant character varying(20) NOT NULL,
cognom_infant character varying(20) NOT NULL,
tel_pare bigint,
... | true |
484691a80065ea5e3d1bac1aebe70b59741eb6d3 | SQL | Elvina-Mnd/pokeshop | /config/db.sql | UTF-8 | 1,128 | 3.15625 | 3 | [] | no_license | CREATE DATABASE pokedex;
USE pokedex;
CREATE TABLE pokemon (
`id` INT PRIMARY KEY AUTO_INCREMENT NOT NULL,
`name` varchar(150) NOT NULL,
`img` varchar(250) NOT NULL,
`content` text NOT NULL
);
INSERT INTO pokemon (`name`, `img`, `content`) VALUES
('Evoli', 'https://www.google.com/url?sa=i&url=https%3... | true |
e327930d9fbee1e3afad919e65c803ccc4165ffd | SQL | amannm/BigData | /fullloadrxnorm.sql | UTF-8 | 3,723 | 3.421875 | 3 | [] | no_license | drop table if exists rxnorm.concepts;
create table rxnorm.concepts (
rxcui character varying(8) not null,
lat character varying(3) default 'ENG' not null,
ts character varying(1),
lui character varying(8),
stt character varying(3),
sui character varying(8),
ispref character varying(1),
rxaui character varying(... | true |
9d9e744991fbf22106efe180974a7ed4eebc5f7b | SQL | mostafaelshazly9/Pharminder | /DB BackUp/pharmacy_owner.sql | UTF-8 | 2,221 | 3.140625 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.8.5
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: May 13, 2019 at 11:11 PM
-- Server version: 10.1.38-MariaDB
-- PHP Version: 7.3.4
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD... | true |
be874d0946b91083872bf5bd3dae1e73af7e1de5 | SQL | gyk/sql-query-fu | /hackerrank/contest-leaderboard.sql | UTF-8 | 339 | 3.84375 | 4 | [] | no_license | # MySQL solution
select hacker_id, name, sum(max_score) as total_score
from
(
select hacker_id, name, challenge_id, max(score) as max_score
from Hackers
join Submissions
using (hacker_id)
group by hacker_id, name, challenge_id
) as T
group by hacker_id, name
having total_score > 0
order by total_sco... | true |
3cad13bbba31e025bf3cbdb33a3db4fd95d5ea0b | SQL | progamr/todoApp_nofrontend_version | /database/todoApp.sql | UTF-8 | 3,733 | 3.25 | 3 | [
"MIT"
] | permissive | -- phpMyAdmin SQL Dump
-- version 4.0.10deb1
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Dec 16, 2015 at 06:07 PM
-- Server version: 5.5.46-0ubuntu0.14.04.2
-- PHP Version: 5.5.9-1ubuntu4.14
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_C... | true |
a31f6cc7d11b31077ac616a6f6d309be061d42fd | SQL | yuralves/fremo | /sql.sql | UTF-8 | 41,194 | 2.984375 | 3 | [] | no_license | drop table Atleta;
drop table atletahastreino;
drop table clube;
drop table evento;
drop table exercicio;
drop table federacao;
drop table instanciaexercicio;
drop table listaatletas;
drop table mensagem;
drop table mensalidadeatletas;
drop table mensalidadeclubes;
drop table newsletter;
drop table provas;
drop table t... | true |
8ad633dacf82cd4d34efc5ffcbb56f4cf365b092 | SQL | jayesh25parab/Complex-SQL-Queries | /FIT9132A2_SQL.sql | UTF-8 | 5,691 | 4.375 | 4 | [] | no_license | spool .\FIT9132A2_output.txt;
set echo on;
-- Assignment 2
-- Student Name: Jayesh Parab
-- Student ID: 27148572
-- Write your SQL statement below each question.
/* Q1. How many animals have been born in the wild belongs to the EQUIDAE
family. Name the output column "Number of animals" */
Select
count(a.anim... | true |
b2ad603585cc50d14101853ee3b8d6663f14479e | SQL | Massimilian/Vasily-Maslov | /chapter_004/src/main/java/ru/job4j/sql/filters_second/8.sql | UTF-8 | 102 | 2.578125 | 3 | [
"Apache-2.0"
] | permissive | select product.id, product.name, type.name from product inner join type on product.type_id=type.id; | true |
c516a7ecf7d084b2117203c237f0eddac308f1b6 | SQL | caichangqi/pgtools | /sql/pgstat_io.sql | UTF-8 | 926 | 3.109375 | 3 | [] | no_license | CREATE SCHEMA IF NOT EXISTS pgtools;
SET search_path = pgtools, public;
CREATE OR REPLACE VIEW pgstat_io AS (
SELECT pg_stat_user_tables.schemaname, pg_stat_user_tables.relname,
((((COALESCE(pg_stat_user_tables.seq_tup_read, (0)::bigint) + COALESCE(pg_stat_user_tables.idx_tup_fetch, (0)::bigint)) + COALESCE(... | true |
79ad05669a0bba265b3eeb3999daf628eafbdaf1 | SQL | simonabacanu/Twdm | /database.sql | UTF-8 | 892 | 3.5 | 4 | [] | no_license | CREATE TABLE IF NOT EXISTS USERS(
id_user INT NOT NULL AUTO_INCREMENT,
firstName VARCHAR(32),
lastName VARCHAR(32),
email VARCHAR(32),
pass VARCHAR(64),
address VARCHAR(50),
phone VARCHAR(14),
PRIMARY KEY (id_user)
);
CREATE TABLE IF NOT EXISTS PRODUCTS(
id_product INT NOT NULL AUTO... | true |
73f56a802df0275417a6199401a0d642f799d928 | SQL | dabid76/prime-group-joins | /joins-solution.sql | UTF-8 | 1,458 | 4.53125 | 5 | [] | no_license | --1) Get all customers and their addresses.
SELECT * FROM "customers"
JOIN "addresses" ON "addresses".id = "addresses".customer_id;
--2) Get all orders and their line items (orders, quantity and product).
SELECT * FROM "orders"
JOIN "line_items" ON "orders".id = "line_items".product_id;
--3) Which warehouses have che... | true |
9a0bacb0ef900d859473af35f8152d7c0a2147d1 | SQL | markconcepcion/TechClass | /db/techclass.sql | UTF-8 | 13,041 | 3.234375 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | -- phpMyAdmin SQL Dump
-- version 4.7.4
-- https://www.phpmyadmin.net/
--
-- Host: localhost:3306
-- Generation Time: Jan 19, 2020 at 01:12 PM
-- Server version: 5.7.20
-- PHP Version: 7.1.12
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CH... | true |
b2f76ce7fe153a126c16bd85b825415c23390b9b | SQL | natthabong/training-api | /src/main/resources/db/migration/V1__create_product_table.sql | UTF-8 | 196 | 2.84375 | 3 | [
"Apache-2.0"
] | permissive | CREATE TABLE tbl_product (
product_id BIGINT IDENTITY(1,1) NOT NULL,
product_name NVARCHAR(255) NOT NULL,
price NUMERIC (19, 2) NOT NULL,
quantity INT NOT NULL,
PRIMARY KEY( product_id )) | true |
ea1e0e9b5f5a8b9d3b75a568ce2bcbdd23bff91d | SQL | dragonbtm/chain-safe-manage | /db/db_chain_manage.sql | UTF-8 | 7,778 | 2.96875 | 3 | [
"Apache-2.0"
] | permissive | /*
Navicat MySQL Data Transfer
Source Server : localhost
Source Server Version : 50722
Source Host : 192.168.5.144:3306
Source Database : db_chain_manage
Target Server Type : MYSQL
Target Server Version : 50722
File Encoding : 65001
Date: 2019-01-11 11:03:33
*/
SET FOREIGN_KEY_CHE... | true |
85b033ca1fa7b04d29b92c30746f7c5b0acc91e0 | SQL | PrawinRaj94/Oracle-SQL-PLSQL | /06_MRF_02032020.sql | UTF-8 | 3,697 | 4.46875 | 4 | [] | no_license | Multiple Row Function (n ---> 1)
List out some aggregate function/group function
-- never process null values.
MIN()
MAX()
SUM()
COUNT() |*| 1
SELECT MIN(salary)
,MAX(salary)
,SUM(salary)
,ROUND(AVG(salary))
,COUNT(employee_id) FROM employees;
-- We can use * and 1 only ... | true |
ccf50505e91c85a30b07d6861db409fa81febf92 | SQL | winback1000/C0720G1_TranAnhKhoa_Module3 | /02_design_n_create_db/exercise/DeteminePrimaryForeignKey.sql | UTF-8 | 1,122 | 3.90625 | 4 | [] | no_license | create database PrimaryAndForeignKey;
use PrimaryAndForeignKey;
create table Customer(
id int auto_increment primary key,
fullName varchar(50),
address varchar(1000),
phoneNum char(10) unique
);
create table email(
id int auto_increment primary key,
email varchar(50),
id_customer int,
constraint fk_email foreign key (i... | true |
b79f3263143605beda96481a43bd35ff67f30988 | SQL | hermanurikh/t-project | /sql/dumps/tproject_2014.10.17_17_42.sql | WINDOWS-1251 | 10,912 | 3.421875 | 3 | [] | no_license | -- MySQL dump 10.13 Distrib 5.5.38, for debian-linux-gnu (x86_64)
--
-- Host: localhost Database: tproject
-- ------------------------------------------------------
-- Server version 5.5.38-0ubuntu0.12.04.1
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@... | true |
01092e1a8f55879870c650b513088f6997fa2f36 | SQL | vitiak/vitiak_repozytorium | /src/main/resources/sql_22_1_viplevel.sql | UTF-8 | 514 | 3.28125 | 3 | [] | no_license | drop function if exists VipLevel;
delimiter $$
create function VipLevel(booksrented INT) returns varchar(20) deterministic
begin
declare result varchar(20) default 'Standard customer';
if booksrented >= 10 then
set result = 'Gold customer';
elseif booksrented >=5 and booksrented < 10 then
set result = 'Silver customer'... | true |
41fa3de444882b3eb8c9775000f3115aa650031b | SQL | alex-rosheim/UDENDATA_ACR | /07-SQL Homework_ACR/ACR_SAKILA_HW.sql | UTF-8 | 4,375 | 3.953125 | 4 | [] | no_license | -- 1a
-- SELECT a.first_name, a.last_name
-- FROM actor a
-- 1b
-- SELECT CONCAT(a.first_name, ' , ', a.last_name) AS Actor_Name
-- FROM actor a
-- 2a
-- SELECT a.actor_id, a.first_name, a.last_name
-- FROM actor a
-- Where a.first_name = 'Joe'
-- 2b
-- SELECT a.actor_id, a.first_name, a.last_name
-- FROM actor a
--... | true |
a987df98cd3720320537846d36db46ba0d9a7b85 | SQL | bilalmarifet/DatabaseMidTermProject | /FacebookDB/FACEBOOKINSERT.sql | ISO-8859-9 | 4,064 | 2.984375 | 3 | [] | no_license | insert into Country values('Trkiye')
insert into Country values('Polonya')
insert into Country values('Rusya')
insert into Country values('Japonya')
insert into City values(1,'stanbul')
insert into City values(1,'zmir')
insert into City values(1,'Ktahya')
insert into City values(1,'Afyon')
insert into City values(1,'... | true |
ecb57ac15e2374f5e7131d837e17677ef4286e29 | SQL | haipenge/learn-doc | /mycat/conf_20170807_10.11.100.139/nuc_table_struct.sql | UTF-8 | 179,040 | 3.6875 | 4 | [] | no_license | /*
SQLyog 企业版 - MySQL GUI v8.14
MySQL - 5.7.12-log : Database - nuc
*********************************************************************
*/
/*!40101 SET NAMES utf8 */;
/*!40101 SET SQL_MODE=''*/;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@... | true |
288c1371b3070298f0544c2b01b3264199d1a990 | SQL | Ptibiscuit973/Projet_PHP | /hotel.sql | UTF-8 | 5,538 | 3.21875 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.9.2
-- https://www.phpmyadmin.net/
--
-- Hôte : 127.0.0.1
-- Généré le : ven. 07 fév. 2020 à 11:58
-- Version du serveur : 10.4.10-MariaDB
-- Version de PHP : 7.3.12
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!4010... | true |
97487aee14b4234c5fa6b66188a6445252a8f686 | SQL | ohjay/ohjay.github.io | /cs61a/sp17/quiz/quiz11/quiz11.sql | UTF-8 | 779 | 3.8125 | 4 | [
"MIT"
] | permissive | -- Discussion 11 Quiz
-- To run (Ubuntu / macOS Yosemite+): sqlite3 < quiz11.sql
-- Windows / macOS Mavericks-: ./sqlite3 < quiz11.sql
-- Q1 solution
-- Expected output: 1 3 9 27 81 243 729 2187 6561
select 'Q1'; select '---';
with threes(pwr) as (
select 1 union
select pwr * 3 from threes where pwr <= 2187
)
sele... | true |
4003543c19abd3afa27af199e13536c1826526ad | SQL | 4Science/DSpace | /dspace-api/src/main/resources/org/dspace/storage/rdbms/sqlmigration/h2/V6.0_2016.01.03__DS-3024.sql | UTF-8 | 903 | 3.234375 | 3 | [
"LicenseRef-scancode-unknown-license-reference",
"BSD-3-Clause",
"MPL-1.0",
"W3C",
"GPL-1.0-or-later",
"LicenseRef-scancode-unicode",
"LGPL-2.1-or-later",
"LGPL-2.0-or-later",
"CDDL-1.0",
"MIT",
"Apache-2.0",
"JSON",
"EPL-1.0",
"LicenseRef-scancode-public-domain",
"LicenseRef-scancode-un... | permissive | --
-- The contents of this file are subject to the license and copyright
-- detailed in the LICENSE and NOTICE files at the root of the source
-- tree and available online at
--
-- http://www.dspace.org/license/
--
------------------------------------------------------
-- DS-3024 Invent "permanent" groups
------------... | true |
2658e49020644d8ab0f1c543b65139ba640a7395 | SQL | apollon33/financemanager | /b32_22798782_db.sql | UTF-8 | 7,347 | 2.890625 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 3.5.8.2
-- http://www.phpmyadmin.net
--
-- Host: sql209.byetcluster.com
-- Generation Time: Jun 05, 2019 at 08:18 AM
-- Server version: 5.6.41-84.1
-- PHP Version: 5.3.3
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTE... | true |
966a9588c47ef6e659ff32f29b1d189145f9cf79 | SQL | mackhood/TACS-UTN-2021 | /Backend/src/main/resources/data.sql | UTF-8 | 634 | 2.515625 | 3 | [] | no_license | INSERT INTO role(id, name) values(1, "ADMIN"),(2, "PLAYER")
INSERT INTO user(id, email, password, username) values(1, "admin@gmail.com", "$2y$12$qR9ULVnvGS1GGyFuxzpSwOHn5c.6cSs886N2hCkWaohBVipY2vm4q", "admin")
INSERT INTO user(id, email, password, username) values(2, "player@gmail.com", "$2y$12$qz1eN7va7AlTC.lxyyHDb.s... | true |
f75c68140a8997327989c2c2b51981e3bc1452eb | SQL | YangWang1231/TB_Process | /TB_Process/TB_Process/analyse_html/create_tables.sql | UTF-8 | 3,521 | 3.90625 | 4 | [] | no_license |
/*描述一个用户的基本情况*/
create table user(
id integer primary key AUTOINCREMENT,
name text not null
);
/*描述一个被测软件的项目情况*/
create table projects(
id integer primary key autoincrement,
projectname text not null,
userid integer not null,
projectrowdata Blob not null, /*用户提交的原始数据:testbed分析的html结果*/
FOREIGN... | true |
94028e7ed938ef2b01d4f7e18846ab3426e104e5 | SQL | ipsusila/ramona | /server/ramona.sql | UTF-8 | 3,662 | 3.34375 | 3 | [] | no_license | CREATE TABLE measurement1
(
serid integer NOT NULL,
measurement_ts timestamp without time zone NOT NULL DEFAULT now(),
measurement_value double precision,
CONSTRAINT measurement1_pkey PRIMARY KEY (measurement_ts, serid)
)
WITH (
OIDS=FALSE
);
ALTER TABLE measurement1 OWNER TO monlink;
create table quantity(
... | true |
f4e55066a6dbc8999dfcc4b7ca79744837d20dbd | SQL | georgegregoropoulos/IISLogParser | /LogParser/Scripts/StatusCode.sql | UTF-8 | 135 | 2.671875 | 3 | [] | no_license | SELECT
sc-status as Status,
COUNT(*) as Hits,
MUL(PROPCOUNT(*),100) as %
FROM
'<%FILENAME%>'
GROUP BY
sc-status
| true |
694f394f3c94610b82de2774a37a31272a1ecd6f | SQL | DouradoUilquer/api-rest-spring | /src/main/resources/db/migration/create_table_ordem_service.sql | UTF-8 | 514 | 3.078125 | 3 | [] | no_license | CREATE TABLE `ordem_service` (
`Id` int(11) NOT NULL AUTO_INCREMENT,
`client_id` int(11) NOT NULL DEFAULT 0,
`description` varchar(255) DEFAULT NULL,
`price` decimal(10,2) DEFAULT 0.00,
`status` varchar(20) NOT NULL DEFAULT '',
`date_open` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
`date_finished` d... | true |
66b72649d0ceec3e00da7d85742c38456968a2ca | SQL | temenos-quantum/workflow-lab | /fabric/LoansOrigination1/Apps/_ObjectServices/LoansApplicationObjS/1.0/_Flyway/MYSQL/V13__MYSQL.sql | UTF-8 | 270 | 2.640625 | 3 | [] | no_license | ALTER TABLE `ApplicationModel`
DROP INDEX `9119321c4bc0b4332fcb6f05bc2020`,
CHANGE `application_id` `record_id` BIGINT NOT NULL AUTO_INCREMENT,
ADD CONSTRAINT `89ec5b4f6c5cb35b1a7ca434c5b0be` UNIQUE KEY(`record_id`),
DROP PRIMARY KEY,
ADD PRIMARY KEY(`record_id`);
| true |
f1a4f89d5ae3e020f128a2f3276a88c29e33007e | SQL | chrisw2188/dodgeball | /db/dodgeball.sql | UTF-8 | 376 | 3.09375 | 3 | [] | no_license | DROP TABLE matches;
DROP TABLE teams;
CREATE TABLE teams (
id SERIAL4 primary key,
name VARCHAR(255),
location VARCHAR(255)
);
CREATE TABLE matches (
id serial4 primary key,
away_team_score VARCHAR(255),
home_team_score VARCHAR(255),
away_team_id INT4 REFERENCES teams(id),
home_team_id INT4 REFER... | true |
ac75c92c9ee97d7c129331a9f443686a9923728b | SQL | jkltroth/Bamazon | /bamazonSchema.sql | UTF-8 | 1,540 | 3.28125 | 3 | [] | no_license | DROP DATABASE IF EXISTS bamazon_db;
CREATE database bamazon_db;
USE bamazon_db;
CREATE TABLE products (
item_id INT NOT NULL AUTO_INCREMENT,
product_name VARCHAR(45) NULL,
department_name VARCHAR(45) NULL,
price DECIMAL(10,2) NULL,
stock_quantity INT NULL,
PRIMARY KEY (item_id)
);
INSERT INTO products (p... | true |
e4e6d8a0b160bbac06b256208569807232848518 | SQL | tomosam0620/sample | /WorkManage-Domain/src/main/resources/META-INF/jp/co/orangearch/workmanage/domain/dao/JoinProjectDao/selectById.sql | UTF-8 | 163 | 2.5625 | 3 | [] | no_license | select
/*%expand*/*
from
JOIN_PROJECT
where
USER_ID = /* userId */'a'
and
PROJECT_ID = /* projectId */1
and
START_DATE = /* startDate */'2010-01-23'
| true |
fab6b3c6159e1188002b4e7e47adea39778fc55b | SQL | Noobinabox/knowledge | /sqlserver/scripts/advancedspwho2.sql | UTF-8 | 1,861 | 3.671875 | 4 | [
"MIT"
] | permissive | /*****************************************************************************************
** File: advancedspwho2.sql
** Name: Advanced SP_WHO2
** Desc: A more detailed command to run which allows filtering, rather than sp_who2
** Auth: NoobInABox
** Date: Mar 1, 2016
**************************************************... | true |
58c28749c23e1fdc83d965fedc3a21709a21e26c | SQL | Btaby19/Hotel | /hotel_database.sql | UTF-8 | 11,494 | 3.3125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.7.0
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Sep 19, 2017 at 08:53 AM
-- Server version: 10.1.25-MariaDB
-- PHP Version: 5.6.31
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OL... | true |
8fb168854a6afe4377793b802cb659a39eb30529 | SQL | borossandor27/WitcherForm | /WitcherForm/db/witcher.sql | UTF-8 | 8,838 | 3.296875 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.9.2
-- https://www.phpmyadmin.net/
--
-- Gép: 127.0.0.1
-- Létrehozás ideje: 2020. Nov 20. 22:31
-- Kiszolgáló verziója: 10.1.36-MariaDB
-- PHP verzió: 7.2.11
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD... | true |
bc9c68a927d38f83c267d17f176e47bd1a74361c | SQL | SmallRen/sensor | /sensor.sql | UTF-8 | 2,198 | 3.21875 | 3 | [] | no_license | /*
Navicat Premium Data Transfer
Source Server : localhost
Source Server Type : MySQL
Source Server Version : 50720
Source Host : localhost:3306
Source Schema : sensor
Target Server Type : MySQL
Target Server Version : 50720
File Encoding : 65001
Date: 15/03/2019 15:... | true |
e0bd922242e9a30b416904f298d3637f5811c3b4 | SQL | arshsingh5211/ArshpreetAulakhIT2351 | /Assignment2/Assignment2Part2I.sql | UTF-8 | 486 | 3.0625 | 3 | [] | no_license | -- *******************************************************************************************************
-- IT2351 Assignment 2 Part 2I - Arshpreet Aulakh
-- Increased price by 10% of all items with a unit_price over 17
-- Used UPDATE and verified it worked by selecting all rows from the items table
-- *************... | true |
134e009e9be207d1604cb477ed7949455b3aaf52 | SQL | smallbook970/yiqian | /数据库/sysLog.sql | UTF-8 | 984 | 2.765625 | 3 | [
"LicenseRef-scancode-mulanpsl-1.0-en",
"MulanPSL-1.0",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | /*
Navicat Premium Data Transfer
Source Server : 阿里云
Source Server Type : MySQL
Source Server Version : 50728
Source Host : 182.92.81.132:3306
Source Schema : yiqianLibrary
Target Server Type : MySQL
Target Server Version : 50728
File Encoding : 65001
Date: 17/08/202... | true |
e0ee728c22cc7bcf73a12e10b749d778da7357fe | SQL | tcp666/javacode | /ftf_db.sql | UTF-8 | 4,775 | 3.390625 | 3 | [] | no_license | /*
Navicat Premium Data Transfer
Source Server : localhost_3306
Source Server Type : MySQL
Source Server Version : 50540
Source Host : localhost:3306
Source Schema : ftf_db
Target Server Type : MySQL
Target Server Version : 50540
File Encoding : 65001
Date: 17/10/201... | true |
90111c33c6449b0fe9f946adb4e510af1a8a9ca6 | SQL | Muatasim/Team-8-ICT-1 | /dbo.AdminValidation.sql | UTF-8 | 482 | 3.203125 | 3 | [] | no_license | CREATE PROCEDURE AdminValidation
@AdministratorUsername VARCHAR(30),
@AdministratorPassword VARCHAR(30),
@GroceryBranchName VARCHAR(20)
AS
BEGIN
SELECT Administrator_Username,Administrator_Password,Grocery_Branch_Name
FROM Administrator,Grocery_Branch
WHERE Grocery_Branch.Grocery_Branch_No = Administrator.Gro... | true |
3b859ca79fc4e4be7202974d3e79b9c342febaa5 | SQL | nutan06/thinkful_data-1-2-2 | /query_l2_5_2.sql | UTF-8 | 112 | 2.53125 | 3 | [] | no_license | select
id,
name,
neighbourhood,
count(*)as count
from
listings
group by neighbourhood
order by count desc | true |
9ebcbf7ffc310d7b48ed1e4b660d569a0b6b346e | SQL | tre-parth/SBA_PO_AzureSQLDb | /PO_WH_Azure_SQL_DB/dbo/Stored Procedures/usp_load_msdrg_code_file.sql | UTF-8 | 1,463 | 3.84375 | 4 | [] | no_license | CREATE PROCEDURE dbo.usp_load_msdrg_code_file
AS
SET NOCOUNT ON;
truncate table [stg].[tbl_msdrg_codes];
INSERT INTO [stg].[tbl_msdrg_codes]
(
ms_drg
,mdc
,type
,ms_drg_title
,run_instance_skey
,source_file_skey
,stg_inserted_timestamp
)
SELECT
ms_drg
,mdc
,type
,ms_drg_title
,run_instance_skey
,source_file_sk... | true |
df0a4787a1a56bfcddad5a19499337d12df326d1 | SQL | Holid-creator/laundri | /database/db_laundry.sql | UTF-8 | 5,459 | 2.953125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Jan 20, 2021 at 05:51 AM
-- Server version: 10.4.14-MariaDB
-- PHP Version: 7.4.9
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIEN... | true |
c0a55ddaeb4df72e06cb26422ae8785dce2c08d5 | SQL | HTTPArchive/almanac.httparchive.org | /sql/2019/pwa/11_04d.sql | UTF-8 | 756 | 3.796875 | 4 | [
"Apache-2.0"
] | permissive | #standardSQL
# 11_04d: Top manifest categories
CREATE TEMPORARY FUNCTION getCategories(manifest STRING)
RETURNS ARRAY<STRING> LANGUAGE js AS '''
try {
var $ = JSON.parse(manifest);
var categories = $.categories;
if (typeof categories == 'string') {
return [categories];
}
return categories;
} catch (e) {
... | true |
99059396b01d20a9100f8c0401969036c64cfd66 | SQL | kapoolay/imdbSQL | /imdb_Query.sql | UTF-8 | 2,101 | 3.859375 | 4 | [] | no_license | --- How many movies are longer than 3 hours long? 1,751
SELECT COUNT (*) FROM title_basics
WHERE runtime_minutes > '180'
AND title_type = 'movie';
--- How many movies came out after the year 2010? 131,696
SELECT COUNT (*) FROM title_basics
WHERE start_year > '2010'
AND title_type = 'movie';
--- What's the imdb ID... | true |
122b8c80291263fb896399eb480fa9317a87b2ed | SQL | devphp90/vims-poc | /migrations/base.sql | UTF-8 | 17,689 | 3.171875 | 3 | [] | no_license | CREATE TABLE vims_action (
act_id INT AUTO_INCREMENT NOT NULL,
act_name VARCHAR(255) NOT NULL,
PRIMARY KEY (act_id)
);
CREATE TABLE vims_rule (
rule_id INT AUTO_INCREMENT NOT NULL,
rule_name VARCHAR(255) NOT NULL,
rule_lvl... | true |
f2f8df1d8612ae020bc3ee481aac9855848eeb3d | SQL | Tomas86200/STS2 | /STS 2/Slam 3/Tonner express/SQL-Batimetal.sql | UTF-8 | 4,970 | 4.375 | 4 | [] | no_license | /*Statistiques d impression-Batimetal*/
/*Question 1*/
Select distinct u.nomutilisateur
from utilisateur u
inner join utiliser ut
on u.codeutilisateur = ut.codeutilisateur
inner join imprimante i
on i.codeimprimante = ut.codeimprimante
where i.nomimprimante = 'ETUDES'
and ut.dateheure = '2010-10-20'; /*DAY(dateheur... | true |
fa707d135857f24ae7004d06a32431820462c73c | SQL | philipcp23/sql-tables-queries | /CompanyDB/CompanyDB_JOINS.sql | UTF-8 | 609 | 3.5625 | 4 | [] | no_license | INSERT INTO branch VALUES(4, 'Buffalo', NULL, NULL);
SELECT *
FROM branch;
--Find all branches and the names of their managers------------
--INNER JOIN
SELECT employee.emp_id, employee.first_name, branch.branch_name
FROM employee
JOIN branch
ON employee.emp_id = branch.mgr_id;
--LEFT JOIN
SELECT employee.emp_id, e... | true |
fae5fcb05e12a03f3b0893d904c7ef9344eb0392 | SQL | Project3-DASH/dash2 | /schema.sql | UTF-8 | 1,009 | 3.671875 | 4 | [] | no_license | DROP DATABASE IF EXISTS dash;
CREATE DATABASE dashdb;
DROP TABLE IF EXISTS products;
CREATE TABLE products (
id serial PRIMARY key,
name VARCHAR (50) UNIQUE,
company VARCHAR (50) UNIQUE,
category VARCHAR(50) NOT NULL,
image VARCHAR(255) UNIQUE,
datetime TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);
... | true |
63f3a32431d6859c152c69654158de5e1fbdd661 | SQL | jonathangeiger/jelly-tests | /data/postgres.sql | UTF-8 | 1,604 | 4 | 4 | [] | no_license | DROP TABLE IF EXISTS authors;
CREATE TABLE authors (
id serial,
name varchar(255) NULL,
password varchar(255) NULL,
email varchar(255) NULL,
role_id int8 NOT NULL,
PRIMARY KEY (id)
);
INSERT INTO authors (id,name,email,role_id)
VALUES
(1,'Jonathan Geiger','jonathan@jonathan-geiger.com',1);
DROP TABLE I... | true |
b1fbdcfd927987885cdd3d03a830a284361ed12e | SQL | mor282/DBS | /DBS_FINAL_PROJECT/SRC/APPLICATION-SOURCE-CODE/create_table_queries/movies.sql | UTF-8 | 548 | 2.640625 | 3 | [] | no_license | CREATE TABLE DbMysql08.movies(
`movie_id` INT NOT NULL ,
`title` CHAR(209) NOT NULL ,
`budget` INT UNSIGNED NOT NULL ,
`revenue` BIGINT UNSIGNED NOT NULL ,
`runtime` MEDIUMINT NOT NULL ,
`language` TINYTEXT NOT NULL ,
`poster_link` TEXT NULL ,
`release_year` YEAR NOT NULL ,
`overview` MEDIUM... | true |
fddd72b031c3d5408110ef0bda0b4130bb6c0e30 | SQL | vAonom/quiz | /src/main/resources/setup_query.sql | UTF-8 | 2,197 | 3.78125 | 4 | [] | no_license | DROP SCHEMA IF EXISTS `quiz` ;
CREATE SCHEMA IF NOT EXISTS `quiz` DEFAULT CHARACTER SET utf8 ;
USE `quiz` ;
DROP TABLE IF EXISTS `quiz`.`admin` ;
CREATE TABLE IF NOT EXISTS `quiz`.`admin` (
`id` INT NOT NULL AUTO_INCREMENT,
`name` VARCHAR(45) NOT NULL,
`pass` VARCHAR(45) NOT NULL,
PRIMARY KEY (`id`))
ENGINE = ... | true |
9d1d547994493b8bd7a556cdac5abed1f0d3f196 | SQL | gialnet/collect_tax | /NUEVAS CUENTAS ANUALES.SQL | ISO-8859-10 | 7,323 | 3.796875 | 4 | [] | no_license |
-- Valores pendientes a la fecha indicada
SELECT SUM(PRINCIPAL),PADRON,YEAR_CONTRAIDO,AYTO
FROM VALORES
WHERE ( (F_INGRESO IS NULL OR F_INGRESO >= xFechaIni)
AND (FECHA_DE_BAJA IS NULL OR FECHA_DE_BAJA >= xFechaIni) )
AND F_CARGO < xFechaIni
AND TIPO_DE_OBJETO=xReciLiqui
AND AYTO=xZonaAyto... | true |
e0777309b3ae6bf62fc71be1ceebd6dcb764f511 | SQL | arunsnmimt/Administration | /Plans, Stats/Execution Plans.sql | UTF-8 | 1,094 | 3.84375 | 4 | [] | no_license | -- Total Cached Plans
SELECT COUNT(*) FROM sys.dm_exec_cached_plans
-- Overview of plan reuse
SELECT MAX(CASE WHEN usecounts BETWEEN 10 AND 100 THEN '10-100'
WHEN usecounts BETWEEN 101 AND 1000 THEN '101-1000'
WHEN usecounts BETWEEN 1001 AND 5000 THEN '1001-5000'
W... | true |
e81ad3622fea582a7cd900c2565106ac55cf9695 | SQL | cjimenez13/Process-Managment-MBC | /Database/Llenado Roles.sql | ISO-8859-1 | 13,518 | 3.203125 | 3 | [] | no_license | execute sp_insert_role 'Administrador', 'Utilizado solo por los gerentes'
execute sp_insert_role 'Desarrollador', 'Equipo de desarrollo'
delete from Users_Roles
select * from Users_Roles
-------------------------------------- Modulos -------------------------------------------------
-- delete from modules
--select * f... | true |
851ac68e144767eaaa196b9ac442a060daba8ab5 | SQL | zigameni/ENTER-Projekat | /enter_site/enter_db.sql | UTF-8 | 3,938 | 2.9375 | 3 | [
"LicenseRef-scancode-unknown-license-reference",
"MIT"
] | permissive | -- phpMyAdmin SQL Dump
-- version 4.8.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1:3306
-- Generation Time: Jun 03, 2019 at 06:35 AM
-- Server version: 5.7.24
-- PHP Version: 7.2.14
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CH... | true |
ee8ed4c404a8fbe61a239b8803247790425a8403 | SQL | ghirihari/Quiz | /quizup.sql | UTF-8 | 4,743 | 3.359375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.8.5
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Mar 30, 2019 at 09:15 PM
-- Server version: 10.1.38-MariaDB
-- PHP Version: 7.1.27
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OL... | true |
86937a39e35b03e3cfae0f011a240d34af8e51a6 | SQL | Vitaliy-Kungurcev/axmor-Test-task | /src/main/webapp/WEB-INF/data.sql | UTF-8 | 1,477 | 3.375 | 3 | [] | no_license | drop table PROBLEMS;
drop table COMMENTS;
CREATE TABLE PROBLEMS
(
id int NOT NULL AUTO_INCREMENT,
name varchar(100),
status varchar(25),
author varchar(20),
description varchar(500),
date varchar(15),
dateTime varchar(20),
PRIMARY KEY (id)
);
CR... | true |
d8b6a0bb8ae317bceccfbe997e38d69ef7c8b2cc | SQL | pompuchou/SQL_codes | /006_CALCULATE.sql | UTF-8 | 1,472 | 3.65625 | 4 | [] | no_license | --人數
select left(CASENO,6) as YM,
count(*) as N
from al.dbo.tbl_pijia
where G=1
group by left(CASENO,6)
order by left(CASENO,6)
--診察費
select left(A.CASENO,6) as YM,
count(A.CASENO) as N,
sum(convert(float,B.AMT)) as AMT
from al.dbo.tbl_pijia as A
left outer join
al.dbo.tbl_opd_order as B
on A.CASENO=B.CASEN... | true |
3300f5442ceefb85bb979e7aff8782ef337153af | SQL | Khachatur86/Netology.Python-13.lesson-2.4 | /Migrations/115_1-28-1_grantPermission.sql | UTF-8 | 4,765 | 2.875 | 3 | [] | no_license | ----- cr_Prerequisite_File
if (not exists(select *
from T_PERMISSION_ACCESS_ATTRIBUTE
where idr_user_role = (select id_role from T_USER_ROLE where name_role = 'MAFU CM Change Leader')
and idr_infobase = (select id_infobase from infobase where infoBase.object_value = 'cr_Prerequisite_File' and infoBase... | true |
1ee9d314eafd176b90167d5dcb66df033905c8df | SQL | KatherineObregon/exfinal_g2 | /exfinal_g2.sql | UTF-8 | 3,384 | 2.921875 | 3 | [] | no_license | -- MySQL dump 10.13 Distrib 8.0.25, for Win64 (x86_64)
--
-- Host: localhost Database: exfinal_g2
-- ------------------------------------------------------
-- Server version 8.0.25
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
... | true |
91b232da53e01b08458d7d77623d874fe080d478 | SQL | HIErdemir/netflix-opdracht | /SQLQueryOpdrachtenNetflix.sql | MacCentralEurope | 1,174 | 3.890625 | 4 | [] | no_license | --Geef de accounts met slechts 1 profiel.
SELECT AccountName
FROM
(SELECT AccountID, COUNT(*) as AccountProfilen
FROM NProfile
GROUP BY AccountID
HAVING COUNT(*) = 1) as Pietje
JOIN Account ON Account.AccountID = Pietje.AccountID
--Voor een door de gebruiker geselecteerde film, hoeveel kijkers hebb... | true |
a4c927528324680e0ed041c37e4abea42edaabaa | SQL | new4u/data-analyst-nanodegree | /sql reports/turns/ScheduledExpirationsRenewals.sql | UTF-8 | 1,507 | 3.828125 | 4 | [] | no_license | USE Yardi_Stage;
SELECT
t.sunitcode, as 'Property'
a.SUBGROUP18 as 'Region',
a.SUBGROUP12 as 'Market',
a.SUBGROUP10 as 'Division',
t.scode as 'Tenant ID',
t.saddr1 as 'Address',
t.scity as 'City',
t.sstate as 'State',
t.szipcode as 'Zip Code',
t.sfirstname as 'First Name',
t.slastname as 'Last Name',
t.srent as 'Cur... | true |
a92054a55279b4247b72d1c35195228efc146fef | SQL | vaglarov/Databases-Basics---MS-SQL-Server | /02. CRUD/Exercises/05 BASIC SELECT.sql | UTF-8 | 151 | 2.6875 | 3 | [] | no_license | --PROBLEM 05
--Write SQL query to find the first, middle and last name of each employee.
SELECT
FirstName
,MiddleName
,LastName
FROM Employees | true |
d6b59e7ea6f8f6af2bdceb2293f223868e90f6aa | SQL | hiraq/catalog-cake | /app/Config/Schema/phpjogja_catalog.sql | UTF-8 | 2,605 | 3 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 3.4.11.1deb1
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: May 01, 2013 at 03:00 AM
-- Server version: 5.5.31
-- PHP Version: 5.4.6-1ubuntu1.2
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_... | true |
ffd3545ad6823f87dc03a8cc12635f49341f0017 | SQL | MCZbase/DDL | /TRIGGER/OTHER_ID_CT_CHECK.sql | UTF-8 | 499 | 3.375 | 3 | [
"Apache-2.0"
] | permissive |
CREATE OR REPLACE TRIGGER "OTHER_ID_CT_CHECK" BEFORE
INSERT
OR UPDATE ON "MCZBASE"."COLL_OBJ_OTHER_ID_NUM" REFERENCING OLD AS OLD NEW AS NEW FOR EACH ROW declare
numrows number;
collectionCode varchar2(20);
BEGIN
execute immediate 'SELECT COUNT(*)
FROM ctcoll_other_id_type
WHERE other_id_type = ''' |... | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.