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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
ff71b6bb613178e16df34e2827a687b758dea239 | SQL | zengqingtao/phone | /backend/mysql.sql | UTF-8 | 11,463 | 3.328125 | 3 | [
"MIT"
] | permissive | #在商品列表存一个pid与商品详情表的pid对应,在商品列表的页面使用<router-link :to="`/details/${item.pid}`"></router-link>跳转到
#详情页,并商品对应的pid传过去,然后在服务器通过pid查询该商品表的所有信息,再通过该family_id查询该商品的规格、颜色放到一个数组中保存
#在详情页面中通过选中的规格的pid重新跳转到详情页面<router-link :to="`/details/${spec.pid}`">,数据重新加载过来
#设置客户端连接服务器端编码
SET NAMES UTF8;
#丢弃数据库huawei,如果存在的话
DROP DATABASE IF EX... | true |
bfe94374d265827d929805571d38b4fe699e174d | SQL | hmainismael/micro_blog | /db/micro_blog.sql | UTF-8 | 3,138 | 3.140625 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.1.14
-- http://www.phpmyadmin.net
--
-- Client : 127.0.0.1
-- Généré le : Ven 20 Janvier 2017 à 19:36
-- Version du serveur : 5.6.17
-- Version de PHP : 5.5.12
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_... | true |
48b8214649091e62ad9773f0ad2c00e05642a52c | SQL | boriskos/DCF | /DCF.DataLayer/DB Scripts/zCreateScoredFactsTable.mysql | UTF-8 | 504 | 3.453125 | 3 | [] | no_license | delimiter $$
CREATE TABLE IF NOT EXISTS ScoredFacts (
ItemID INT(11) NOT NULL,
TopicID INT(11) NOT NULL,
Factor int(11) NOT NULL,
Score DOUBLE NOT NULL,
Category varchar(70) COLLATE utf8_bin NOT NULL,
Correctness TINYINT(1) NULL,
PRIMARY KEY(ItemID),
FOREIGN KEY sfItemID_fkey (ItemID) REFER... | true |
75018a4e08769f4b957c21774998958edd018a1c | SQL | srishilesh/15CSE302_DBMS | /Lab3/building.sql | UTF-8 | 265 | 2.71875 | 3 | [] | no_license | create table building(
bid varchar(10) not null,
street varchar(10),
city varchar(10),
building_type varchar(10) not null,
primary key(bid));
--insert into building values('&bid','&street','&city','&building_type');
desc building
select * from building; | true |
0e7431134db1f5dbea0b05f7c87464b69f320c20 | SQL | uttejadiraju/SQL-Basics | /except.sql | UTF-8 | 824 | 3.671875 | 4 | [] | no_license | DROP TABLE IF EXISTS COURSE;
create table COURSE (id int, name varchar(30), year varchar(30));
insert into COURSE values(1, 'physics', 2019);
insert into COURSE values(1, 'maths', 2020);
insert into COURSE values(3, 'social', 2019);
insert into COURSE values(3, 'social', 2019);
insert into COURSE values(4, 'telugu', 20... | true |
6d8b4e0219e2c2c56e4ac3914b2272b7efffed8f | SQL | radtek/abs3 | /sql/mmfo/bars/Data/Applist/codeapp_$RM_KASZ.sql | WINDOWS-1251 | 9,036 | 2.546875 | 3 | [] | no_license | PROMPT =====================================================================================
PROMPT *** Run *** ========== Scripts /Sql/Bars/Data/Applist/codeapp_$RM_KASZ.sql =========*
PROMPT =====================================================================================
PROMPT *** Create/replace ARM ... | true |
0b683963ae9401fcd1b3bb548987821a85a8f1e7 | SQL | Niayaa/project | /assgin/P1_09.sql | UTF-8 | 858 | 3.9375 | 4 | [] | no_license | /*Question 9)Do the same as question 1.7 but this time only include trunks that
have at least one 'IDLE' channel. That is, write an SQL query that will produce
in one table a list of all the acceptable trunks that can be used to route a call
to the 416 area code, office code 334 have at least one idle channel. This que... | true |
246feb5059007e6932be07d3f12a1bd5b106de89 | SQL | dbalinux237/OraclePerfSurvivalGuide | /Ch10/subquery_join.sql | UTF-8 | 372 | 2.9375 | 3 | [] | no_license | SPOOL subquery2
SET serveroutput on
ALTER SESSION SET tracefile_identifier=subquery2;
ALTER SESSION SET sql_trace=TRUE;
alter session set events '10053 trace name context forever, level 1';
SET lines 120
SET pages 10000
SET timing on
select * from hr.employees where (first_name, last_name) in
(select ... | true |
ef0bcc61ed126fe3e403202eedefac0cd8aeff46 | SQL | xpzyxx/DDL-DML-Base-2019-5-17-7-33-10-495 | /dml.sql | UTF-8 | 292 | 3.09375 | 3 | [] | no_license | -- 插入记录
INSERT INTO tablename(field1,field2,...,fieldn) VALUES(value1,value2,...,valuen);
-- 修改记录
UPDATE tablename SET field1=value1 [WHERE CONDITION];
-- 删除记录
delete from tablename [WHERE CONDITION];
-- 查询记录
SELECT * FROM tablename [WHERE CONDITION]; | true |
6c82bcfa1d4f1eabb651948727576d2afbd4714c | SQL | e-muhit/TV-Series-Crud-App | /database/schema.sql | UTF-8 | 552 | 3.609375 | 4 | [] | no_license | DROP DATABASE series;
CREATE DATABASE series;
\c series
CREATE TABLE networks (
network_id SERIAL PRIMARY KEY,
network_name TEXT NOT NULL,
logo_url TEXT
);
CREATE TABLE genres (
genre_id SERIAL PRIMARY KEY,
genre_name TEXT NOT NULL
);
CREATE TABLE series (
show_id SERIAL PRIMARY KEY,
s... | true |
3aaeb3cc3a62423e83b9144eedab000d2e92396d | SQL | joSar2000/LABORATORIO_2B | /LABORATORIO_2.3/SENTENCIAS.sql | UTF-8 | 1,032 | 3.734375 | 4 | [] | no_license | /**
CONSULTAS
CLIENTE c
FECHA f
BARRIO b
DESPACHO d
DIRECICON dir
PRODUCTO p
*/
SELECT d.detalle, f.fechaDespacho, d.peso, d.valorEntrega, p.fragil, p.descripcion, p.tipoproducto
FROM Despacho d, Fecha f, Producto p
WHERE
d.idFecha = f.idFecha AND
d.idProducto = p.idProducto AND
f.fechaDespacho = '01-08-2... | true |
84c5ea364592f64172ee2bdb2948f283eaf12959 | SQL | gxa/gxa | /sql/Schema/list_to_table.sql | UTF-8 | 2,811 | 2.796875 | 3 | [
"Apache-2.0"
] | permissive | /*
* Copyright 2008-2010 Microarray Informatics Team, EMBL-European Bioinformatics Institute
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-... | true |
898cba49da7ebc74b93c7e037734337146e84d2c | SQL | taylortao/myLeetcode | /Database/177_nth_highest_salary.sql | UTF-8 | 220 | 3.40625 | 3 | [] | no_license | CREATE FUNCTION getNthHighestSalary(N INT) RETURNS INT
BEGIN
DECLARE k int;
SET K = n-1;
RETURN (
SELECT DISTINCT Salary FROM Employee WHERE Salary IS NOT NULL ORDER BY Salary DESC LIMIT k, 1
);
END
| true |
58d71df457587638f5b2594ea06e6765d2ee16b3 | SQL | LyHoaNam/HeThongQuanLyChanNuoiHeo | /quanlyheo (1).sql | UTF-8 | 30,436 | 3.21875 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.6.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Dec 07, 2017 at 02:30 PM
-- Server version: 5.7.14
-- PHP Version: 5.6.25
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */... | true |
aa6150972df51926769d7d9ff98a05804e222f5e | SQL | imbuada/datama2 | /mysql_many_to_many_view_exercise_imbuada/datama2_demo.sql | UTF-8 | 8,486 | 3.125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.9.0.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Oct 31, 2019 at 07:10 AM
-- Server version: 10.3.16-MariaDB
-- PHP Version: 7.3.6
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @O... | true |
20896ed9ee1cb1899191fd4960ee16cf7b43884c | SQL | scrpio/dubbo-park-master | /park.sql | UTF-8 | 65,810 | 3.4375 | 3 | [] | no_license | /*
Navicat MySQL Data Transfer
Source Server : localhost_3306
Source Server Version : 50719
Source Host : localhost:3306
Source Database : park
Target Server Type : MYSQL
Target Server Version : 50719
File Encoding : 65001
Date: 2020-03-25 14:36:10
*/
SET FOREIGN_KEY_CHECKS=0;
--... | true |
c242178bfd0fa68d3f67fa4dd25c3552ac05c286 | SQL | CUBRID/cubrid-testcases | /sql/_26_features_920/issue_10161_partition_collate/cases/list_010.sql | UTF-8 | 817 | 3 | 3 | [
"BSD-3-Clause"
] | permissive | set system parameters 'create_table_reuseoid=no';
set names utf8;
CREATE TABLE t1 (a VARCHAR(10) default 'A', b varchar(10) ) collate utf8_en_cs
PARTITION BY LIST (a) (
PARTITION a1 VALUES IN ('a')
);
insert into t1 values ('a', 'a');
insert into t1 values ('A', 'A');
insert into t1 values (default, 'A');
insert ... | true |
a860b760e79a16400b6fa9fa6f5688f5b4362b6e | SQL | AcPvP/Fizzletide_Content | /sql/weenies/Update Rares to Legendaries/30353 Dreamseer Bangle.sql | UTF-8 | 3,378 | 2.609375 | 3 | [] | no_license | DELETE FROM `weenie` WHERE `class_Id` = 30353;
INSERT INTO `weenie` (`class_Id`, `class_Name`, `type`, `last_Modified`)
VALUES (30353, 'braceletraredreamseerbangle', 1, '2019-02-04 06:52:23') /* Generic */;
INSERT INTO `weenie_properties_int` (`object_Id`, `type`, `value`)
VALUES (30353, 1, 8) /* ItemType ... | true |
d1bd2f79b6e545f45f2c27f062a58754d8f03045 | SQL | noresources/ns-php-sql | /tests/reference/Create_TableConstraint_foo.sql | UTF-8 | 301 | 2.90625 | 3 | [
"MIT"
] | permissive | CREATE TABLE [metavariables].[foo] (
[id] INTEGER NOT NULL AUTO INCREMENT,
[angle] REAL NOT NULL DEFAULT 3.1415926535898,
CONSTRAINT [pirmary_foo] PRIMARY KEY ([id]),
CONSTRAINT [pi_boundary] CHECK (
[metavariables].[foo].[angle] BETWEEN -3.1415926535898
AND 3.1415926535898
)
)
| true |
3614985c88c6161b82dbba6b9b53c54b43f880de | SQL | ekaterina-goncharova/homework_lesson2 | /homework lesson 4.sql | WINDOWS-1251 | 7,999 | 3.96875 | 4 | [] | no_license | -- : https://docs.google.com/document/d/1NVORWgdwlKepKq_b8SPRaSpraltxoMg2SIusTEN6mEQ/edit?usp=sharing
--colab/jupyter: https://colab.research.google.com/drive/1j4XdGIU__NYPVpv74vQa9HUOAkxsgUez?usp=sharing
--task13 (lesson3)
-- : (pc, printer, laptop). : model, maker, type
select model, maker, type
fro... | true |
e301245561d63c8568db7a490b079193bca4b137 | SQL | JacobTheLiar/sda-oracle-sql | /zadania 6-1.sql | WINDOWS-1250 | 3,885 | 4.34375 | 4 | [] | no_license | --Zadanie 6-1
-- 1. Poka sum plac dla kadego zespou z podsumowaniem
select
id_zesp, sum(p.placa_pod+nvl(p.placa_dod, 0)) zarobki
from pracownicy p
group by rollup(id_zesp);
-- 2. Otrzymaj poniszy efekt w zapytaniu
select
case
when grouping(id_zesp)=1
then 'RAZEM'
else... | true |
283b696c7c964d94cf231985fe337905122e83d8 | SQL | ClickHouse/ClickHouse | /tests/queries/0_stateless/00927_asof_join_correct_bt.sql | UTF-8 | 947 | 3.484375 | 3 | [
"Apache-2.0",
"BSL-1.0"
] | permissive | DROP TABLE IF EXISTS A;
DROP TABLE IF EXISTS B;
CREATE TABLE A(k UInt32, t UInt32, a UInt64) ENGINE = MergeTree() ORDER BY (k, t);
INSERT INTO A(k,t,a) VALUES (1,101,1),(1,102,2),(1,103,3),(1,104,4),(1,105,5);
CREATE TABLE B(k UInt32, t UInt32, b UInt64) ENGINE = MergeTree() ORDER BY (k, t);
INSERT INTO B(k,t,b) VALU... | true |
8720720351688c3116e51b38a53bf490f02e6948 | SQL | kab1nz/organixcrm | /bd/librerias/esqueleto.sql | UTF-8 | 14,447 | 3.421875 | 3 | [] | no_license | CREATE TABLE `lord_of_the_table` (
`GUID` char(36) NOT NULL,
`TIPO` int(8) NOT NULL,
`NOMBRE` varchar(40) DEFAULT NULL,
PRIMARY KEY (`GUID`)
);
-- DELIMITADOR
CREATE TRIGGER `lord_GUID` BEFORE INSERT ON `lord_of_the_table` FOR EACH ROW
BEGIN
IF new.GUID IS NULL THEN
SET new.GUID = uuid();
END IF;
END;... | true |
c97654175e0b71f3b16ce086d22e1b4af4c9877f | SQL | Mr-DoubleM/jspweb | /WEB/sql/LOL.sql | UHC | 3,205 | 3.25 | 3 | [] | no_license | --------------------------------------------------------
-- - ȭ-9-29-2020
--------------------------------------------------------
--------------------------------------------------------
-- DDL for Table LOL
--------------------------------------------------------
CREATE TABLE "SCOTT"."LOL"
( "RECO... | true |
01e6bcfb6b1ba6b1a5113b3e62aeba64ffded33e | SQL | Mynor2397/PsicoAPPAuth | /database/PAC_InitialStage.sql | UTF-8 | 2,939 | 3.6875 | 4 | [] | no_license | SELECT
cit.uuid as uuidCaseInitial,
ta.uuid as uuidTestingApplication,
tt.uuid as uuidTestType
FROM
PAC_TestingApplication ta
INNER JOIN PAC_CaseInitialStage cit ON ta.uuidCaseInitialStage = cit.uuid
INNER JOIN PAC_TestType tt ON ta.uuidTestType = tt.uuid;
-- PROCEDIMIENTO ALMACENADO PARA PODER... | true |
247b7798e1f4b60de8cf02fe0a25c30dc88bb159 | SQL | SirMatix/Python | /[corrected] Table populating program for JetAir Database/JetAirDB DML Code.sql | UTF-8 | 4,436 | 3.6875 | 4 | [] | no_license | DROP DATABASE IF EXISTS JetAirDB;
CREATE DATABASE IF NOT EXISTS JetAirDB;
USE JetAirDB;
SELECT 'CREATING DATABASE STRUCTURE' as 'INFO';
CREATE TABLE Country
(
CountryID INT(10) AUTO_INCREMENT PRIMARY KEY,
Country VARCHAR(50)
);
CREATE TABLE City
(
CityID INT(10) AUTO_INCREMENT PRIMARY KEY,
City_name VARCHAR(5... | true |
e023022d203c14998d90c6bbc5c63af81932c6bc | SQL | toanht15/moni | /apps/plugins/db_sql/getCountCpQuestion.sql | UTF-8 | 567 | 3.71875 | 4 | [] | no_license | SELECT
count(DISTINCT R.question_id) AS total
FROM
cp_questionnaire_actions QA
INNER JOIN
cp_actions ACT ON ACT.id = QA.cp_action_id AND ACT.del_flg = 0
INNER JOIN
cp_action_groups GR ON GR.id = ACT.cp_action_group_id AND GR.del_flg = 0
INNER JOIN
cps CP ON CP.id = GR.cp_id AND CP.del_flg = 0 AND DA... | true |
2efe60b92e2c23a98fca14be012367bd263f61de | SQL | Bootz/IceCreamdb | /arctic_world/command_overrides.sql | UTF-8 | 857 | 2.71875 | 3 | [] | no_license | /*
Navicat MySQL Data Transfer
Source Server : arcticdev
Source Server Version : 50509
Source Host : localhost:3306
Source Database : arctic_world
Target Server Type : MYSQL
Target Server Version : 50509
File Encoding : 65001
Date: 2012-04-04 17:26:04
*/
SET FOREIGN_KEY_CHECKS=0;
... | true |
67de7b3a63c6311b4f215f1d9ba169c65c052eb8 | SQL | evgenyim/watch-dog-service | /src/SQLCreateServiceProcedure.sql | UTF-8 | 480 | 2.9375 | 3 | [] | no_license | create procedure InsertService(@Id int, @Url varchar(max), @CheckUrl varchar(max), @TimeCheck int)
as
begin tran
if exists (select * from Services where Id = @Id)
begin
update Services
set TimeCheck = @TimeCheck where Id = @Id
update WebServices
set CheckUrl = @CheckUrl where Id = @Id
end
el... | true |
81c74aad434e265e372804520c69e2286880039b | SQL | shailesh1001/SpringWithLoadingSQL | /taskstore/src/main/resources/taskstore.sql | UTF-8 | 1,418 | 3.234375 | 3 | [] | no_license | /*
SQLyog Community v12.4.2 (64 bit)
MySQL - 5.7.18-log : Database - taskstore
*********************************************************************
*/
/*!40101 SET NAMES utf8 */;
/*!40101 SET SQL_MODE=''*/;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@F... | true |
bc8dda7b73ea84c0f3f140b63dee28b4eb0292d4 | SQL | MukulKolpe/almanac.httparchive.org | /sql/2021/structured-data/rdfa_prefixes.sql | UTF-8 | 1,507 | 4 | 4 | [
"Apache-2.0"
] | permissive | # standardSQL
# Count RDFa Prefixes
CREATE TEMP FUNCTION getRDFaPrefixes(rendered STRING)
RETURNS ARRAY<STRING>
LANGUAGE js AS """
try {
rendered = JSON.parse(rendered);
const prefixRegExp = new RegExp(/(?<ncname>[^:]*):\s+(?<uri>[^\s]*)\s*/gm)
return rendered.rdfa_prefixes.map(prefix => {
const mat... | true |
9774283e6d786a70c6a9eda684671a36dadde7cb | SQL | fotol1/SQL | /CW1/2.sql | UTF-8 | 176 | 2.734375 | 3 | [] | no_license | -- Вывести самого молодого водителя
select top 1 with ties dr.DriverID,dr.Surname,dr.FirstName
from Drivers as dr
order by dr.Date_of_Birth desc
| true |
23e053f9a45fc246e653fb1c0c6a498f92676bce | SQL | CityOfClearwaterSQLServer/Day1 | /Module 06 DML/01 DML Statements.sql | UTF-8 | 727 | 3.390625 | 3 | [] | no_license | use SQLClass
insert into Sales.Customers
values
('Fred', 'Flintstone', 'fred@slate.com', '000-555-1212', default)
insert into Sales.Customers
(FirstName, LastName, Email, Phone, State)
values
('Barney', 'Rubble', 'barney@slate.com', '000-555-1212', default)
update Sales.Customers
set Phone = '727-555-1212'
where Pho... | true |
8202fe525a4a815427609d8f8ecb29314037ff24 | SQL | b3nnymac/SQLExamples | /bmaci520Lab2.sql | UTF-8 | 1,223 | 3.421875 | 3 | [] | no_license | select s_last, f_last
from student, faculty
where student.f_id= faculty.f_id
select faculty.f_id, f_last, count(student.f_id)
from student, faculty
where faculty.f_id = student.f_id
group by faculty.f_id;
select course.course_id, course_name, max_enrl
from course, course_section
where course.course_id = course... | true |
5b477971fc8659a0f445b98415b34b66e2d51241 | SQL | JaviBF92/IISSI-Web-Project | /DB/4-Test-Packages/5.1 PaqueteEquipo.sql | WINDOWS-1250 | 3,025 | 3.375 | 3 | [] | no_license | CREATE OR REPLACE PACKAGE PRUEBAS_EQUIPO AS
PROCEDURE INICIALIZAR;
PROCEDURE INSERTAR (NOMBRE_PRUEBA VARCHAR2, W_CATEGORIA VARCHAR2,W_LIGA VARCHAR2,SALIDAESPERADA BOOLEAN);
PROCEDURE ACTUALIZAR (NOMBRE_PRUEBA VARCHAR2,W_IDEQUIPO integer, W_CATEGORIA VARCHAR2,W_LIGA varchar2, SALIDAESPERADA BOOLEAN);
... | true |
7d92a7ee450a9043df5d991f7148317ebb2b3095 | SQL | silence-do-good/stress-test-Postgres-and-MySQL | /dump/low/day19/select0412.sql | UTF-8 | 191 | 2.734375 | 3 | [] | no_license |
SELECT timeStamp, temperature
FROM ThermometerObservation
WHERE timestamp>'2017-11-18T04:12:00Z' AND timestamp<'2017-11-19T04:12:00Z' AND SENSOR_ID='dd4a163f_5d1e_493d_9b11_886d65982676'
| true |
ffa5f0f8d876d0c9a391843828861496c7ca1ff8 | SQL | ljlodl5/Pewlett-Hackard-Analysis | /Queries/Employee_Database_Challenge.sql | UTF-8 | 4,420 | 4.875 | 5 | [] | no_license |
--Purpose: Review employees within the next retirement-ready cohort (1952-1955)
--Retrieve the emp_no, first_name, and last_name columns from the Employees table.
SELECT emp_no, first_name, last_name
FROM employees
--Retrieve the title, from_date, and to_date columns from the Titles table.
SELECT title, from_date, to... | true |
5f7b5b091ed571a77aaf1f12f11ed7e43fe0aea5 | SQL | hasura/concurrent-db-queue-benchmark | /sql/setup.sql | UTF-8 | 773 | 4 | 4 | [] | no_license | DROP TABLE IF EXISTS hdb_cron_events CASCADE;
DROP EXTENSION IF EXISTS pgcrypto CASCADE;
CREATE EXTENSION pgcrypto;
CREATE TABLE hdb_cron_events
(
id TEXT DEFAULT gen_random_uuid() PRIMARY KEY,
project_id TEXT NOT NULL,
trigger_name TEXT NOT NULL,
scheduled_time TIMESTAMPTZ NOT NULL,
status TEXT NOT NULL DEFA... | true |
c16096738df19128e6ba92321ab8601a0df08934 | SQL | 97lele/lagouscrapydemo | /lagou.sql | UTF-8 | 2,166 | 3.28125 | 3 | [] | no_license | CREATE TABLE `lagou_company` (
`url` varchar(255) NOT NULL,
`url_object_id` varchar(64) NOT NULL,
`company_name` varchar(255) DEFAULT NULL,
`industry` varchar(255) DEFAULT NULL,
`finance` varchar(255) DEFAULT NULL,
`people_count` varchar(255) DEFAULT NULL,
`city` varchar(255) DEFAULT NULL,
`score` varch... | true |
f1932fcb6685dbcaebad832d7719a90db77dba3e | SQL | j2eety/sofa_demo | /demo-doc/db.sql | UTF-8 | 17,038 | 2.890625 | 3 | [] | no_license | /*
Navicat Premium Data Transfer
Source Server : RDS-PG10
Source Server Type : PostgreSQL
Source Server Version : 100100
Source Host : pgm-bp1fxq2367q5a8m5to.pg.rds.aliyuncs.com
Source Database : usercenter
Source Schema : uc
Target Server Type : PostgreSQL
Target Server... | true |
0a4cc390a8733eb4199cf14fa0b02e91d322fa2a | SQL | simon4360/DQ_APP | /dq_app/src/main/db/dq_user/dmp/views/v_dmp_batch_status.sql | UTF-8 | 1,196 | 3.28125 | 3 | [] | no_license | CREATE OR REPLACE VIEW DQ_USER.V_DMP_BATCH_STATUS
AS
select i.aptitude_project
, bt.process_name as aptitude_microflow
, t.table_name
, bs.BATCH_TASK_PROCESS_ID as batch_process_id
, bs.batch_task_use_case_id as use_case_id
, bs.batch_task_s... | true |
13b4266948fbc183302b7979c84ec8ef40923ba2 | SQL | shimabox/php-before-dependency-injection | /data/test_sample_ddl.sql | UTF-8 | 284 | 2.5625 | 3 | [
"MIT"
] | permissive | CREATE TABLE IF NOT EXISTS `sample` (
`id` INT UNSIGNED NOT NULL AUTO_INCREMENT ,
`name` TEXT NOT NULL ,
`created_at` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ,
`updated_at` TIMESTAMP NULL DEFAULT NULL ,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8; | true |
51f2d6b8ad9d44b906ca75d2fa8635e49e345fb1 | SQL | nss-day-cohort-44/chinook-krsteele | /line_item_track_artist.sql | UTF-8 | 380 | 3.515625 | 4 | [] | no_license | -- Provide a query that includes the purchased
-- track name AND artist name with each invoice line item.
SELECT
i.InvoiceLineId,
i.InvoiceId,
i.TrackId,
track.name track_name,
artist.name artist_name,
i.UnitPrice,
i.Quantity
FROM InvoiceLine i, Track, Album, Artist
WHERE i.TrackId = Track.TrackId
AND Track.albu... | true |
e1cfaeeae052ebfb29c4c0a4b1dca02d04797662 | SQL | go2suresh1979/MyRepo | /Personal/Solaris/main/datawarehouse/sql/rally/test_artifacts/cr_test_case_step_obj.sql | UTF-8 | 1,473 | 3.078125 | 3 | [] | no_license | /*
#------------------------------------------------------------------------------#
#
# Component: $Id: //ovo8/main/datawarehouse/sql/rally/test_artifacts/cr_test_case_step_obj.sql#1 $
# Author: Manimegalai Kumarasamy
# Copyright: Copyright (c) 2013 Verizon Data Services, All Rights Reserved.
# No... | true |
f3f52987ff2a065d44e21c9dde6b4d807d58e870 | SQL | CUBRID/cubrid-testcases | /sql/_27_banana_qa/issue_5765_timezone_support/_02_type_conversions/_02_implicit_conversion/cases/_01_ins_dt_to_collection.sql | UTF-8 | 2,474 | 3.8125 | 4 | [
"BSD-3-Clause"
] | permissive | --implicit conversion from DATETIME(L)TZ columns to collection types, in insert
drop table if exists tz_test;
create table tz_test (id int auto_increment, ts datetime, dtltz datetime with local time zone, dttz datetime with time zone);
set timezone '+10:00';
insert into tz_test(ts, dtltz, dttz) values (datetime'198... | true |
91f287a0d509bd2a263db250395252a5ff64c9e0 | SQL | WenPeng6/Java | /exam2.sql | UTF-8 | 30,714 | 3.390625 | 3 | [] | no_license | /*
Navicat MySQL Data Transfer
Source Server : 123
Source Server Version : 50096
Source Host : 127.0.0.1:3306
Source Database : exam2
Target Server Type : MYSQL
Target Server Version : 50096
File Encoding : 65001
Date: 2019-01-04 02:08:41
*/
SET FOREIGN_KEY_CHECKS=0... | true |
65e77f0d228ca563c53e0b5fd3a4bed5b7a1f505 | SQL | MrD0079/portal | /sql/a1604sh_tp_select.sql | UTF-8 | 1,216 | 3.078125 | 3 | [] | no_license | /* Formatted on 29/01/2015 12:13:36 (QP5 v5.227.12220.39724) */
SELECT a1604sh.tab_num,
st.fio fio_ts,
a1604sh.fio_eta,
a1604sh.tp_ur,
a1604sh.tp_addr,
a1604sh.tp_kod,
DECODE (a1604shtps.tp_kod, NULL, NULL, 1) selected,
NVL (a1604shtps.contact_lpr,
... | true |
1b56a220b6c8b99c78de99b30167a2a5d6d7c5d7 | SQL | Adam-Ross/SQL_query_practice | /count_and_group_by.sql | UTF-8 | 189 | 3.015625 | 3 | [] | no_license | #films by rating
SELECT
rating, count(film_id)
FROM
film
GROUP BY 1
;
#films by rating and rental price
SELECT
rating, rental_rate, count(film_id)
FROM
film
GROUP BY 1,2
;
| true |
3f56ea8ca58e3170545e450f2db35f7920ae0256 | SQL | victoria2309/locadora-bd | /locadora.sql | UTF-8 | 1,240 | 2.796875 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.8.0.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: 07-Nov-2018 às 19:21
-- Versão do servidor: 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 |
5fcf8de096fce7a0dff753d175cd6e72bdd2f4ab | SQL | lucasloiola/turma16java | /MySQL/Lista_Joins/listaJoinsEx2.sql | UTF-8 | 2,380 | 3.453125 | 3 | [] | no_license | create database db_pizzaria_legal;
use db_pizzaria_legal;
create table tb_categoria(
tamanho varchar(100),
preco float,
refri_gratis boolean,
primary key (tamanho)
);
create table tb_pizza(
id bigint auto_increment,
sabor varchar(100),
adicionais varchar(100),
vegetariano boolean,
... | true |
cba5d616d533d422b5c82a46f48088d3df20c2a0 | SQL | faisal-ijaz/TNG | /Databases/How many Objects exists in a Schema/HowManyObjectsExistsInASchema.sql | UTF-8 | 1,003 | 4.03125 | 4 | [] | no_license | /*
During develop a database solution with agile methods (like SCRUM) schemas with some objects are created, then objects are moved to other schemas and so on; a dynamically developing process like usally.
At the end of this process you may notice that some of these schemas are "empty", means no objects are assoziate... | true |
462595419593704df0217ee6bf79c7f432226236 | SQL | changjiangxiong/DN | /student_management.sql | UTF-8 | 2,018 | 3.515625 | 4 | [] | no_license | /*
Navicat MySQL Data Transfer
Source Server : myDB
Source Server Version : 50624
Source Host : localhost:3306
Source Database : student_management
Target Server Type : MYSQL
Target Server Version : 50624
File Encoding : 65001
Date: 2017-06-21 22:41:31
*/
SET FOREIG... | true |
e530606d7f5ae89769c107f009238d7fc6ede9c4 | SQL | MarcMenard/GestionDeTournoi | /conception/gestiontournoi.sql | UTF-8 | 12,642 | 2.859375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.5.5.1
-- http://www.phpmyadmin.net
--
-- Client : 127.0.0.1
-- Généré le : Mer 17 Mai 2017 à 14:55
-- Version du serveur : 5.7.11
-- 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=@@CHARACTER_SET... | true |
2c30fbf7d864f93b296b0e50123fddfdbd9f1db2 | SQL | enigma-seeking/sql_learn | /01-尚硅谷MySQL核心技术-婷姐/资料、代码/code/day2/分组查询随课练.sql | UTF-8 | 2,194 | 4.71875 | 5 | [] | no_license | select AVG(salary) ,department_id from employees group by department_id;
##表里有一项是null,那么这个就不能区分了
select AVG(salary) from employees;
##每个工种最高工资
select MAX(salary),job_id from employees group by job_id;
##查询每个位置上部门数
select count(*), location_id from departments group by location_id;
##添加筛选条件
##查询邮箱中包含a字符的,每个部门的平均工资
... | true |
1bda8b321df773252fa924ea6dc947afc2125d6c | SQL | praveenupadhyay997/AddressBookDB-UC12-UC13 | /UC4EditExistingContactUsingName.sql | UTF-8 | 355 | 2.640625 | 3 | [] | no_license | /* Invoking the Address Book Database */
use addressBook_services;
/* Displaying the columns from the address book table */
select * from addressBook_Table;
/* Updating the row contact detail from the address book table finding by the contact name */
update addressBook_Table set address = 'Sec-2'
where firstName = '... | true |
d6df14e5333e622eba784744592e7e88ae143d1d | SQL | ChintalaHimaja/ASSIGNMENT | /sql set 2.sql | UTF-8 | 2,511 | 4.125 | 4 | [] | no_license | SELECT D.DNAME
FROM DEPT D
LEFT JOIN EMP E
ON D.DEPTNO= E.DEPTNO
WHERE E.DEPTNO IS NULL;
query 2:
SELECT JOB,ENAME
FROM EMP
WHERE JOB LIKE 'PRESIDENT';
query 3:
SELECT ENAME,JOB
FROM DEPT D
FULL JOIN EMP E
ON D.DEPTNO= E.deptno
WHERE LOC LIKE 'NEWYORK' AND COMM>1000;
query 4:
SELECT COUNT(*) AS NU... | true |
4b0d0189eaabc7a926fe63aa9e33e794145d0303 | SQL | greut/cs322 | /queries/basic_g.sql | UTF-8 | 694 | 4.625 | 5 | [] | no_license | -- List the name of the schools according to the number of players they sent to
-- the NBA. Sort them in descending order by number of drafted players.
SELECT l1.id, l1.name, l2.counter
FROM locations l1
LEFT JOIN (
SELECT location_id id, COUNT(*) counter
FROM (
SELECT
d.id, CONCAT(year, ro... | true |
e42cb983fc4bc1dc117b12146e70333837757747 | SQL | FALLENxGaLaXie5/Databases | /Lab8/DDL_AviationCO/aviationco.sql | UTF-8 | 13,740 | 3.25 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 3.2.0.1
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Oct 30, 2016 at 08:03 PM
-- Server version: 5.1.36
-- PHP Version: 5.3.0
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
CREATE DATABASE AVIATIONCO;
USE AVIATIONCO;
--
-- Database: `aviationco`
--
-- ------------... | true |
ab89c29fe0d9d61caa272cca9c5c04e212060416 | SQL | saqibnizami/CodingPractice | /SQL/LeetCode/0586-Customer-Placing-the-Largest-Number-of-Orders.sql | UTF-8 | 1,979 | 4.46875 | 4 | [] | no_license | /*
586. Customer Placing the Largest Number of Orders
Easy
Table: Orders
+-----------------+----------+
| Column Name | Type |
+-----------------+----------+
| order_number | int |
| customer_number | int |
+-----------------+----------+
order_number is the primary key for this table.
This table... | true |
d92afc7e34712e4a9c655407426d86e30f1214a9 | SQL | dougsillars/almanac.httparchive.org | /sql/2019/10_SEO/10_02.sql | UTF-8 | 415 | 2.953125 | 3 | [
"Apache-2.0"
] | permissive | #standardSQL
# lang attribute usage and mistakes (lang='en')
# source: https://discuss.httparchive.org/t/what-are-the-invalid-uses-of-the-lang-attribute/1022
SELECT
LOWER(REGEXP_EXTRACT(body, '(?i)<html[^>]*lang=[\'"]?([a-z]{2})')) AS lang,
COUNT(0) AS freq,
COUNT(0) / SUM(COUNT(0)) OVER () AS pct
FROM
`httpa... | true |
d0bfae0134fe819861531aabd97ccce38b856803 | SQL | olanaso/MobilityDB | /test/queries/03_timestampset.test.sql | UTF-8 | 3,112 | 2.96875 | 3 | [
"PostgreSQL"
] | permissive | -------------------------------------------------------------------------------
-- Tests for timestampset data type.
-- File TimestampSet.c
-------------------------------------------------------------------------------
/* Errors */
SELECT timestampset '2000-01-01, 2000-01-02';
SELECT timestampset '{2000-01-01, 2000-... | true |
482255e8df3ade8087de67415302d8ce11b2cef5 | SQL | murari-goswami/bi | /ETL/DataVirtuality/views/tableau/tableau.billing_arvato_checklist_red_dark.sql | UTF-8 | 452 | 3.3125 | 3 | [] | no_license | -- Name: tableau.billing_arvato_checklist_red_dark
-- Created: 2015-04-24 18:24:52
-- Updated: 2015-07-30 17:59:04
CREATE view tableau.billing_arvato_checklist_red_dark
AS
SELECT
fd.order_id,
fd.customer_id,
fd.fd_date_created,
fd.customer_order_date_created,
fd.arvatoresult_1,
fd.provider_transaction_id1,
cu.... | true |
029906f0cb891ceeb7b65a46591e64d09be6bab4 | SQL | jaytees/clothes-store-test | /collections.sql | UTF-8 | 890 | 2.875 | 3 | [] | no_license | DROP TABLE IF EXISTS collections;
CREATE TABLE collections (
collection_id INTEGER PRIMARY KEY AUTOINCREMENT,
collection_name TEXT,
collection_year INTEGER,
collection_image TEXT
);
INSERT INTO collections (collection_name, collection_year, collection_image)
VALUES (
'The Drop',
2020,
'https://e... | true |
f86e0d72025c93a0abe12265d6cc8047f0c63cdd | SQL | kvamm007/Pewlett-Hackard-Analysis | /Employee_Database_Challenge.sql | UTF-8 | 2,754 | 4.59375 | 5 | [] | no_license | --Deliverable 1
--Retirement Titles Query
SELECT e.emp_no,
e.first_name,
e.last_name,
ts.title,
ts.from_date,
ts.to_date
INTO retirement_titles
FROM employees AS e
INNER JOIN titles AS ts
ON (e.emp_no = ts.emp_no)
WHERE (e.birth_date BETWEEN '1952-01-01' AND '1955-12-31')
ORDER BY e.emp_no;
-- Use Dictinct wi... | true |
3cb46bb936fa47a78ee05875c1cd74aef50371e8 | SQL | cristiandb/Toollife | /DataBase/Procedimientos_almacenados.sql | UTF-8 | 1,630 | 3.734375 | 4 | [] | no_license | -- Consulta para saber los amigos y grupos de cada amigo, de un determinado usuario
CREATE PROCEDURE identificar_usuario (IN email VARCHAR(75), IN pass VARCHAR(45))
SELECT p.idUser, p.nombre, p.apellidos, p.pathUser, u.isActive
FROM usuarios u NATURAL JOIN perfil p
WHERE u.email = email and u.password = pass;
-- Los ... | true |
6ff3fefb35a18f14de69921cf54519cdeab2124e | SQL | stardog-union/stardog-examples | /examples/aml/load_transactions-mysql.sql | UTF-8 | 727 | 3.5 | 4 | [
"Apache-2.0"
] | permissive | CREATE DATABASE IF NOT EXISTS `stardog`;
USE `stardog`;
DROP TABLE IF EXISTS `transactions`;
CREATE TABLE `transactions` (
`tx_id` INTEGER PRIMARY KEY,
`account1` VARCHAR(20),
`account2` VARCHAR(20),
`amount` INTEGER,
`tx_date` DATE
);
LOAD DATA LOCAL INFILE
'C:/@cyg/demos/aml/ra... | true |
59006b9927561539dba9adea3f4f3d4d0a4b3b04 | SQL | CIFP-Virgen-de-Gracia/productosapirest-sec | /mysql/productosapirest.sql | UTF-8 | 12,359 | 3.546875 | 4 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.9.0.1
-- https://www.phpmyadmin.net/
--
-- Servidor: localhost
-- Tiempo de generación: 26-03-2020 a las 13:59:28
-- Versión del servidor: 10.4.6-MariaDB
-- Versión de PHP: 7.3.9
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";... | true |
5565d7ada5feac6134cbe3dfbc11886cebdf1ef0 | SQL | mspierings96/employee-tracker | /db/schema.sql | UTF-8 | 717 | 3.875 | 4 | [] | no_license | CREATE DATABASE employee-tracker;
CREATE DATABASE employee_tracker;
CREATE TABLE departments (
id INT PRIMARY KEY auto_increment,
name VARCHAR(30) NOT NULL
);
USE employee_tracker;
DROP TABLE IF EXISTS departments;
DROP TABLE IF EXISTS role;
DROP TABLE IF EXISTS employees;
CREATE TABLE role (
id INT PRIMARY KEY aut... | true |
c4ce765f5c539f23da92a37be5022465c88d2086 | SQL | ZVlad1980/adm_scripts | /sql/cbo/baselines/show_baseline_plan.sql | UTF-8 | 555 | 3.296875 | 3 | [] | no_license | SELECT PLAN_TABLE_OUTPUT
FROM V$SQL s, DBA_SQL_PLAN_BASELINES b,
TABLE(
DBMS_XPLAN.DISPLAY_SQL_PLAN_BASELINE(b.sql_handle,b.plan_name,'basic')
) t
WHERE s.EXACT_MATCHING_SIGNATURE=b.SIGNATURE
AND b.PLAN_NAME=s.SQL_PLAN_BASELINE
AND s.SQL_ID='31d96zzzpcys9';
/
select PLAN_TABLE_OUTPUT
fro... | true |
3fbe0c67e02078f5f69df984a736a05c872d4a78 | SQL | Onyothi/Postgre_Datenbanken | /sewing_pattern/SQL_scripts/data.sql | UTF-8 | 6,824 | 2.890625 | 3 | [] | no_license | DELETE FROM designer;
INSERT INTO designer (shortname, name, web)
VALUES ('Ottobre', 'Studio Tuumat Oy', 'https://www.ottobredesign.com/de/');
INSERT INTO designer (shortname, name, firstname, web)
VALUES ('Schnabelina', 'Pax', 'Roswitha', 'http://schnabelina.blogspot.de/');
INSERT INTO designer (shortname, na... | true |
19c2980bdca0354d5da1314d136827264666a8bb | SQL | vikramapilla/HackerRank | /SQL/Aggregation.sql | UTF-8 | 2,125 | 4.0625 | 4 | [] | no_license | /*1.Revising Aggregations - The Count Function*/
SELECT COUNT(*) FROM CITY WHERE population > 100000;
/*2.Revising Aggregations - The Sum Function*/
SELECT SUM(population) FROM city where LOWER(district) = 'california';
/*3.Revising Aggregations - Averages*/
SELECT AVG(population) FROM city WHERE UPPER(district) =... | true |
b5f9c21cff12b82bc5e141b110f29becc9cd2082 | SQL | luzac3/pict | /sql/stored/getUserList.sql | UTF-8 | 3,735 | 3.546875 | 4 | [] | no_license | DROP PROCEDURE IF EXISTS getUserList;
DELIMITER //
-- ********************************************************************************************
-- getUserList ユーザー情報を取得
--
-- 【処理概要】
-- ユーザー情報を取得する
--
--
-- 【呼び出し元画面】
-- インデックス
--
-- 【引数】
-- _evnt_num :イベント番号
-- _key_word_1 :キーワード1
-- _key_w... | true |
74ba20b72cca4b108828a69702bae0f089d2b84b | SQL | Norokibambu77/B-A-I | /Fungsi IN and NOT IN SQL.sql | UTF-8 | 170 | 2.640625 | 3 | [] | no_license | SELECT
*
FROM
employees
WHERE first_name NOT IN('Maria','Denis','Mark');
SELECT
*
FROM
employees
WHERE first_name IN('Maria','Denis','Mark'); | true |
176769c1770fddda8d8d8c387b6f003721e38c79 | SQL | stefansilverio/holbertonschool-higher_level_programming | /0x0E-SQL_more_queries/10-genre_id_by_show.sql | UTF-8 | 287 | 3.75 | 4 | [] | no_license | -- list all shows w/ genre linked
-- ascending order
SELECT `tv_shows`.`title`, `tv_show_genres`.`genre_id` FROM `tv_shows`
INNER JOIN `tv_show_genres` ON
`tv_shows`.`id` = `tv_show_genres`.`show_id`
ORDER BY `tv_shows`.`title` ASC, `tv_show_genres`.`genre_id` ASC;
| true |
2b605f0f9f65bdec7c3a36ac7cbc54596d615d0b | SQL | divx1979/Datacamp-Data-Scientist-Career-Track | /DataCamp-Data-Scientist-master/Python-career-track/11-intro-to-sql-for-data-science/02-filtering-rows.sql | UTF-8 | 2,238 | 4.3125 | 4 | [] | no_license | -- Get the title and release year of films released after 2000
SELECT title, release_year
FROM films
WHERE release_year > 2000;
-- Get the name and birth date of the person born on November 11th, 1974. Remember to use ISO date format ('1974-11-11')!
SELECT name, birthdate
FROM people
WHERE birthdate = '1974-11-11'
--... | true |
ec2036bd48442468c478912f2ead56b037547052 | SQL | OvidiuEDSgrup/TET | /DEBUG/120827/SQLQuery4.sql | UTF-8 | 133 | 2.546875 | 3 | [] | no_license | select * from antetBonuri a where a.Factura is null
order by a.Data_bon desc
select * from terti t where t.Tert like '2810824124246' | true |
0100568a3a82e47f8455d1cc2c914e6a199e74f0 | SQL | anbarasimanoharan/Library-Management-System | /db/ddl/CHECKOUT.sql | UTF-8 | 551 | 2.921875 | 3 | [] | no_license | CREATE TABLE CHECKOUT
(
"UnityId" VARCHAR2 (20),
"QueueType" VARCHAR2 (20),
"QueueId" VARCHAR2 (20),
"DueDate" TIMESTAMP,
"CheckOutDate" TIMESTAMP,
"ReturnDate" TIMESTAMP
)
NOCACHE
LOGGING;
ALTER TABLE checkout
ADD CONSTRAINT fk_checkout_1 FOREIGN KEY ("UnityId")
... | true |
098a846b6d1285ea2d02fd1cf9f85ff511433168 | SQL | augustvavreliy/test | /sql.sql | UTF-8 | 2,004 | 3.859375 | 4 | [] | no_license | 1. Вывести список сотрудников, получающих максимальную заработную плату в своем отделе.
SELECT * FROM EMPLOYEE AS emp WHERE emp.SALARY = (SELECT MAX(salary) FROM EMPLOYEE as emp2 WHERE emp2.DEPARTMENT_ID = emp.DEPARTMENT_ID);
2. Вывести список ID отделов, количество сотрудников в которых не превышает 3 человек
... | true |
c6c2b26cc1d24bf182d620f4ec99a01b8bb71c2d | SQL | kamisme/No1CookMenu | /mysqlData/lifecircle.sql | UTF-8 | 3,407 | 2.5625 | 3 | [] | no_license | /*
Navicat MySQL Data Transfer
Source Server : localhost_3306
Source Server Version : 50520
Source Host : localhost:3306
Source Database : no1cookmenu
Target Server Type : MYSQL
Target Server Version : 50520
File Encoding : 65001
Date: 2017-04-20 15:18:05
*/
SET FOR... | true |
e14efd0ee5a2aaad675c75198aa77c0962ba4227 | SQL | lavenpillay/PokemonMachine | /db_dev/scripts/tabledata_shapes.sql | UTF-8 | 1,179 | 2.75 | 3 | [] | no_license |
-- Table: pokemon_shapes
CREATE TABLE pokemon_shapes (
id INTEGER NOT NULL,
identifier VARCHAR( 79 ) NOT NULL,
PRIMARY KEY ( id )
);
INSERT INTO [pokemon_shapes] ([id], [identifier]) VALUES (1, 'ball');
INSERT INTO [pokemon_shapes] ([id], [identifier]) VALUES (2, 'squiggle');
INSERT INTO... | true |
664d6d3d02977e303d95d0480b7f976927379212 | SQL | bakink/DBA_Oracle | /sort_area_size.sql | UTF-8 | 1,874 | 3.5625 | 4 | [] | no_license | declare
v_addr raw(10);
v_text varchar2(230);
v_info varchar2(1000);
v_sort1 number;
v_sort2 number;
v_sort3 number;
v_sort4 number;
cursor c1 is
SELECT v$session.username, v$session.sid, serial#, contents, sql_address , extents
FROM v$session, v$sort_usage
WHERE v$session.saddr = v$sort_usage.session_addr ;
cursor c2 ... | true |
ba94052b0ac3919f851bd081152475b8750df899 | SQL | MaksymVakuliuk/SQL | /Lab_2/Lab2_Create_DB_Books_SQLQuery_MaksymVakuliuk_DS-81mn.sql | UTF-8 | 1,194 | 3.625 | 4 | [] | no_license | CREATE DATABASE DB_Books
ON
(
NAME = 'DB_Books',
FILENAME = 'D:\Programming\MSSQL\Lab_2\DB_Books.mdf',
SIZE = 10 MB,
MAXSIZE = 100 MB,
FILEGROWTH = 10 MB
)
LOG ON
(
NAME = 'Log_DB_Books',
FILENAME = 'D:\Programming\MSSQL\Lab_2\Log_DB_Books.Ldf',
SIZE = 5 MB,
MAXSIZE = 50 MB,
FILEGROWTH = 5 MB
)
USE DB_Book... | true |
f4eace1dfdcbc194a9d085ebc2e3c06b031fea51 | SQL | Rattanapoom/traintable | /train.sql | UTF-8 | 2,110 | 3.09375 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | -- phpMyAdmin SQL Dump
-- version 4.6.6
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Generation Time: Nov 05, 2020 at 09:41 AM
-- Server version: 5.7.17-log
-- PHP Version: 5.6.30
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIEN... | true |
ac5229ef00fbc026b72a82afd3e13c080c487909 | SQL | cckmit/xinfu | /ccms/WebContent/WEB-INF/action/project/fitness/wx/mc/report/searchcardsales/query-card.sql | UTF-8 | 407 | 3.84375 | 4 | [] | no_license | select
card.created::date as createdate,
count(1) as num,
sum(card.factmoney) as factmoney
from cc_card card
inner join cc_cardtype ct on card.cardtype = ct.code and card.org_id = ct.org_id
where card.status!=0 and card.isgoon=0 and card.org_id = ${def:org}
and to_char(card.created::date, 'yyyy-MM') = to_char('${de... | true |
0d7406626fcd136613af60e88da09439c6c85378 | SQL | heylookabird/OverwatchRoulette | /Server/mysql/schemas/init_schema.sql | UTF-8 | 576 | 3.65625 | 4 | [] | no_license | DROP DATABASE IF EXISTS StratRoulette;
CREATE DATABASE StratRoulette;
CREATE TABLE StratRoulette.Maps(
id INT NOT NULL AUTO_INCREMENT,
name VARCHAR(32) NOT NULL,
map_type VARCHAR(16) NOT NULL,
PRIMARY KEY (id),
UNIQUE(name)
);
-- List of tradable goods and resources
CREATE TABLE StratRoulette.Strats (
id INT ... | true |
ebd0a60cf1827497f01dc8e49f088673b02ba8f1 | SQL | armindtoussi/authServer | /sql/script.sql | UTF-8 | 342 | 2.671875 | 3 | [] | no_license | DROP TABLE if exists `oden_users`;
create table `oden_users` (
`id` int not null auto_increment,
`username` text not null,
`password` text not null,
`email` text,
`created_at` timestamp default current_timestamp,
`updated_at` timestamp default current_timestamp on update current_timestamp,
... | true |
600ea37e1c0946aea3d3eac21aa1bb991ee70c90 | SQL | diegoareval/SistemaJaryva | /hcpeventosbd1 (1).sql | UTF-8 | 28,216 | 2.9375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.8.4
-- https://www.phpmyadmin.net/
--
-- Servidor: 127.0.0.1
-- Tiempo de generación: 18-11-2019 a las 15:26:51
-- Versión del servidor: 10.1.37-MariaDB
-- Versión de PHP: 7.3.0
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
... | true |
a09c0d03419a590aa2a7404335602378cb8947ba | SQL | learking/introDS | /assignment2/matMulti.sql | UTF-8 | 124 | 3.4375 | 3 | [] | no_license | SELECT A.row_num, B.col_num, SUM(A.value * B.value)
FROM A, B
WHERE A.col_num = B.row_num
GROUP BY A.row_num, B.col_num; | true |
140eae1a141d0b7e3f27d7364b9ca5ddd2f97725 | SQL | device42/DOQL_scripts_examples | /Recommended DOQL/Application and Service Communication/Database_Servers.sql | UTF-8 | 2,658 | 3.8125 | 4 | [
"Apache-2.0"
] | permissive | /* Database Servers - Information Extract */
/* Inline view of Target CTE (inline views) to streamline the process -
Update 2020-10-19
- updated the view_device_v1 to view_device_v2
*/
/* v16.0 */
Select Distinct
d.last_edited "Last Discovered"
,d.device_pk "Device Unique Key"
,d.name "Device Name... | true |
58b94fc8674c40c14f6242555589daec48a1026f | SQL | LucaMD/SRL | /MIMIC/query/tbls/sepsis_nqf_0500.sql | UTF-8 | 3,355 | 3.609375 | 4 | [] | no_license |
--5 CMS Severe Sepsis and Septic Shock: Management Bundle measure (NQF #0500) criteria
-- Adapted by Seymour et al.
-- These criteria require:
-- i) denominator population derived from discharge diagnoses
-- ii) the presence of >=2 SIRS criteria
-- iii) the presence of organ dysfunction using criteria present by inte... | true |
6ccd468468b69b98541b81f5b5a6a73163409aa9 | SQL | Rafe-Samman/learning-nodejs-expressjs-framework-fall-2020-2021-sec-b | /17-35304-2/agro-glow (3).sql | UTF-8 | 6,259 | 3.0625 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Nov 29, 2020 at 03:00 PM
-- Server version: 10.4.14-MariaDB
-- PHP Version: 7.4.10
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIE... | true |
b84d7abd0d914e6c2e2fc26383f999355e3f31ba | SQL | vanhao051212/IOT_Door | /diemdanh-ngay19_8/csvc_roomlist.sql | UTF-8 | 2,047 | 2.96875 | 3 | [] | no_license | -- MySQL dump 10.13 Distrib 8.0.16, for Win64 (x86_64)
--
-- Host: localhost Database: csvc
-- ------------------------------------------------------
-- Server version 8.0.16
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!401... | true |
b27c7c10fd582fcdc362416d16e7f7fe50007ca7 | SQL | coderHook/mySQL | /pruebas.sql | UTF-8 | 894 | 4.03125 | 4 | [] | no_license | -- Listados de los Parques Naturales y sus Directores.
/*
SELECT parque_natural.nombre, operario.NOMBRE
FROM parque_natural, operario
WHERE parque_natural.Dni_Operario_Director = operario.dni
ORDER BY parque_natural.nombre
*/
-- Listdo de operarios y parque natural al que pertenecen.
/*
select operario.nombre, parque_... | true |
8c7c67f0d8e89bd8d996cf5619c92509d6f89f57 | SQL | Sifat-Anwar/HospitalDatabaseProject | /HospitalViews.sql | UTF-8 | 1,811 | 3.296875 | 3 | [] | no_license | CREATE OR REPLACE VIEW dyzury_w_okresie
AS
SELECT p.imie, p.nazwisko, p.pesel,d.data_rozpoczecia, d.data_zakonczenia FROM dyzur d
JOIN Lekarz l ON l.id_lekarza = d.id_lekarza
JOIN Pracownik p ON p.id_pracownika = l.id_pracownika;
CREATE OR REPLACE VIEW Pracownicy_oddzialu
AS
SELECT p.imie, p.nazwisko, p.pesel,... | true |
4b4996d70ff92d62dd500707bb13b02538019ea7 | SQL | Lore2116/Proyecto-Multiempleo-S.A.S | /Documentación Proyecto/prometheus.sql | UTF-8 | 4,372 | 3 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 5.1.1
-- https://www.phpmyadmin.net/
--
-- Servidor: 127.0.0.1
-- Tiempo de generación: 05-10-2021 a las 16:18:09
-- Versión del servidor: 10.4.20-MariaDB
-- Versión de PHP: 8.0.9
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_... | true |
cd3ba69b7d8ec0085d758cc123a0b935843a8cab | SQL | OnePlc/PLC_X_Testing | /data/install.sql | UTF-8 | 659 | 2.5625 | 3 | [
"MIT"
] | permissive | SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
--
-- Basic Permissions
--
INSERT INTO `permission` (`permission_key`, `module`, `label`, `nav_label`, `nav_href`, `show_in_menu`, `needs_globaladmin`) VALUES
('index', 'OnePlace\\Testing\\Controller\\BackendController', 'Overview', '... | true |
7cda7f0d4891dcacd6d28b137fc0b67cb5b5955f | SQL | renepastor/abit | /BD/sql.sql | UTF-8 | 581 | 2.78125 | 3 | [] | no_license |
--create trigger aud_user before insert on nucleo.usuarios for each row execute procedure nucleo.aud_user();
ALTER TABLE nucleo.usuarios DISABLE TRIGGER aud_user ;
ALTER TABLE nucleo.usr_roles DISABLE TRIGGER aud_user ;
--insert into nucleo.usuarios(pers_id, cuenta, alias, clave,usuario) values
--(1001000000016200,... | true |
800b20e9792772b4b42802a6dcb9fead997663df | SQL | ilyes12zouaoui/MQTT-microservice-pub-sub-example | /apps/products/src/main/resources/data.sql | UTF-8 | 257 | 2.859375 | 3 | [] | no_license | DROP TABLE IF EXISTS products;
CREATE TABLE products
(
id INT AUTO_INCREMENT PRIMARY KEY,
name VARCHAR(250) NOT NULL,
category_id INT
);
INSERT INTO products (name,category_id)
VALUES ('BMW-1',1),
('BMW-2',1),
('Plane-3',3); | true |
94dcaaaa1e5ff63fc3484813f8473d6a2dba5155 | SQL | fengchanglin/Test | /hisdb数据库2020-09-28.sql | UTF-8 | 461 | 3.78125 | 4 | [] | no_license | SELECT
DATE_FORMAT(s.`basicflow_sterile_time`,'%Y-%m-%d'),
COUNT(p.`basicflow_package_name`) AS packagecount
FROM
`t_basicflow_sterile` s,
`t_basicflow_package` p
WHERE
p.basicflow_package_sterilizationid = s.basicflow_sterile_id
AND p.basicflow_package_unusual = 0
AND s.basicflow_sterile_time BETWEEN '2020-07-0... | true |
4963183648f20b59e9d16c4815ae227da81ada8f | SQL | WinrichSy/HackerRank-Solutions | /SQL/WeatherObservationStation5.sql | UTF-8 | 365 | 3.640625 | 4 | [
"Apache-2.0"
] | permissive | --Weather Observation Station 5
--https://www.hackerrank.com/challenges/weather-observation-station-5/problem
SELECT city, LENGTH(city)
FROM(
SELECT city, LENGTH(city) as min_city
FROM station
ORDER BY min_city ASC
LIMIT 3) as sub_query
ORDER BY city ASC
LIMIT 1;
SELECT city, LENGTH(city) as max_city
... | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.