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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
f16ddb1eb90107c11025cf02d011058cd69ce19c | SQL | Patrick0546/Scrum__Opdrachten | /Sprint 5/SQL/Friday_the_13th.sql | UTF-8 | 385 | 3.375 | 3 | [] | no_license | SELECT EventName, EventDate,
DATENAME(WEEKDAY,Eventdate) as Day_of_Week,
DATENAME(DAY, EventDate) as Day_Number
FROM tblEvent
where DATENAME(WEEKDAY,Eventdate) = 'Friday' and DATENAME(DAY, EventDate) = '13' or DATENAME(WEEKDAY,Eventdate) = 'Thursday' and DATENAME(DAY, EventDate) = '12' or DATENAME(WEE... | true |
72224ed4a1cbb097718b6a0c83a085e35b8e1252 | SQL | avganti1102/TEST | /SQL/Assignment 1 +2/Assignment 1.sql | UTF-8 | 3,170 | 3.96875 | 4 | [] | no_license | drop database if exists Test;
create database Test;
use Test;
create table if not exists Department
(
DepartmentID tinyint auto_increment,
DepartmentName nvarchar(50) not null unique key,
primary key(DepartmentID)
);
create table if not exists `Position`
(
PositionID tinyint auto_increment,
PositionName e... | true |
9ffd804edbcfce3355ce9c6edb090d171e819b5c | SQL | lucianostegun/irank | /data/sql/alter/20120311.sql | UTF-8 | 733 | 3.203125 | 3 | [] | no_license | CREATE SEQUENCE event_photo_contest_seq;
CREATE TABLE event_photo_contest (
id INTEGER NOT NULL DEFAULT nextval('event_photo_contest'::regclass) PRIMARY KEY,
event_photo_id_left INTEGER NOT NULL,
event_photo_id_right INTEGER NOT NULL,
event_photo_id_winner INTEGER,
lock_key VARCHAR(32),
ip_addre... | true |
b7f0ce64a2d947133bae2d11f938d4d3b198bea7 | SQL | cbsProcessMining/E-H | /IBC Backup/Transformations/SAP ECC Production Planning/Transformation PP/Backup of Transformation - Create View AFPO.sql | UTF-8 | 3,000 | 3.578125 | 4 | [] | no_license | DROP VIEW IF EXISTS PP_AFPO;
CREATE VIEW PP_AFPO AS
SELECT DISTINCT
AFPO.*
,MAKT.MAKTX AS MATNR_TEXT -- Material type
,T023T.WGBEZ AS MATKL_TEXT -- Material group
,CASE
WHEN AUFK.WAERS = '<%=currency%>' THEN MBEW.STPRS*IFNULL(TCURX.TDEC,1)
WHEN TCURR_CC.UKURS > 0 THEN (MBEW.STPRS*IS... | true |
77a0f7884c555b39d2fea9523277152fb11c8776 | SQL | JettScythe/BootcampX | /3_queries_group_by/6_total_assignment_submissions.sql | UTF-8 | 641 | 3.875 | 4 | [] | no_license |
-- count(assignment_submissions.*) shows > 1000000? ASK ABOUT ME
SELECT cohorts.name as cohort_name, count(students.name) as total_submissions
FROM cohorts
JOIN students
ON cohorts.id = students.cohort_id
JOIN assignment_submissions
ON assignment_submissions.student_id = students.id... | true |
0a0cc095f50a12f771b2b4aa76b7acdc285a0aa9 | SQL | haileyanderton/starwars-database | /database/characters (1).sql | UTF-8 | 2,786 | 3.3125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.5.2
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Feb 08, 2017 at 02:47 AM
-- Server version: 10.1.19-MariaDB
-- PHP Version: 5.6.28
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CL... | true |
588508d8754ac43622bc011e8ae938df219b88fa | SQL | HomeSwitchHome/Version9 | /henry.sql | UTF-8 | 25,787 | 2.96875 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.2.5
-- http://www.phpmyadmin.net
--
-- Host: localhost:8889
-- Generation Time: Jan 16, 2015 at 10:11 AM
-- Server version: 5.5.38
-- PHP Version: 5.5.14
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
--
-- Database: `hsh`
--
-- ---------------------------------... | true |
b851867a4bb9498efd675278683207c547647a52 | SQL | LaurensGiesen/Mars-Server | /src/main/resources/populateDatabase.sql | UTF-8 | 1,767 | 2.734375 | 3 | [] | no_license | insert into subscriptions(id, name, price) values(1,'FREE',0);
insert into subscriptions(id, name, price) values(2,'BASIC',10);
insert into subscriptions(id, name, price) values(3,'PREMIUM',100);
insert into addresses(id, street, number, dome) values(1, 'The Moon', 404, 1337);
insert into users(firstname, lastname,... | true |
fea94cbf2d7a154c7c8500f8e4974bfc9e638ef2 | SQL | nisarg291/Training-Aug-21 | /SQL/Raj Thakkar/Day1/ExtraAssignment.sql | MacCentralEurope | 1,378 | 4.25 | 4 | [] | no_license | --You have been hired to create a relational database to support a car sales business.
--You need to store information on the businesss employees, inventory, and completed sales.
--You also need to account for the fact that each salesperson receives a different percentage of their sales in commission.
--What tables a... | true |
9b00c43a1ea6e62e6b437310638b5f5d62ee0a7c | SQL | allwaysoft/fun | /Clients/MBTA/ORCL/SQL/Jim/MBCR_Transactions.sql | UTF-8 | 1,283 | 3.5625 | 4 | [] | no_license | select * from person
select sta.stationid, rou.routeid, sta.name, rou.description, tvm.DeviceClassID DeviceClassId, tvm.TVMID DeviceId
from
TVMTable tvm
,Routes rou
,TVMStation sta
where sta.StationID = tvm.TVMTariffLocationID
AND rou.RouteID = tvm.RouteID
and (rou.routeid = 9996 and (s... | true |
537ff136dd7e13262c879f16f410fbe493e7936d | SQL | pengguojin/nodejs | /data/animation.sql | UTF-8 | 1,849 | 3.25 | 3 | [] | no_license | /*
Navicat MySQL Data Transfer
Source Server : 本地数据库
Source Server Version : 50714
Source Host : localhost:3306
Source Database : animation
Target Server Type : MYSQL
Target Server Version : 50714
File Encoding : 65001
Date: 2018-05-18 10:34:48
*/
SET FOREIGN_KEY_CHECKS=0;
-- ---... | true |
b004fef89c3ae6a6ba31d0f05b467d9be5ba8e45 | SQL | xieyuqian/zhiz | /tables.sql | UTF-8 | 1,342 | 3.25 | 3 | [] | no_license | create table if not exists author(
id int primary key auto_increment,
name varchar(20) default 'Hit9',
email varchar(30) default '',
description varchar(100) default '',
url varchar(100) default ''
) engine=innodb default charset=utf8;
create table if not exists blog(
id int primary key auto_i... | true |
825e563b645104e8024cdd1d1fc338d4f48002cf | SQL | ArifGlory/ManajemenSurat | /database/backup.sql | UTF-8 | 26,956 | 2.8125 | 3 | [
"MIT"
] | permissive | /*
SQLyog Community v13.1.7 (64 bit)
MySQL - 10.4.11-MariaDB : Database - qrcodelp_new
*********************************************************************
*/
/*!40101 SET NAMES utf8 */;
/*!40101 SET SQL_MODE=''*/;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CH... | true |
3e2889735ac05e59b44843b715d6302511738277 | SQL | NikiSpasov/SQL_Server_Basics | /02.DataDefinitionAndDataTypes/DataDefinitionAndDataTypes/16.CreateSoftUniDatabase.sql | UTF-8 | 708 | 3.703125 | 4 | [] | no_license | CREATE DATABASE SoftUni
USE SoftUni
CREATE TABLE Towns
(Id INT PRIMARY KEY IDENTITY (1,1),
Name NVARCHAR (50) NOT NULL)
CREATE TABLE Addresses
(Id INT PRIMARY KEY IDENTITY (1,1),
AddressText NVARCHAR (50) NOT NULL,
TownId INT FOREIGN KEY(TownId) REFERENCES Towns(Id) NOT NULL)
CREATE TABLE Departments
(Id INT PRI... | true |
208bd40d544dd92c98c36c324e11d993ca059256 | SQL | masanorisawada/SQL_python | /hayashi/1920016_lec_7/ai_tech.sql | UTF-8 | 1,727 | 2.65625 | 3 | [] | no_license | CREATE TABLE data_spot_impr (
spot_id SERIAL PRIMARY KEY,
spot_area TEXT,
spot_name TEXT,
spot_latitude REAL,
spot_longitude REAL,
spot_elevation INTEGER,
spot_history_culture INTEGER,
spot_nature INTEGER,
spot_view INTEGER,
spot_opentime INTEGER,
spot_closetime INTEGER,
spot_recommend_time INTEGER
);
INSERT INTO data... | true |
b77f9e49ef69a1943dcd6fea8d03cabaada0f455 | SQL | haroonmaqsood/BYC | /SERVICE/SQLPatches/5.sql | UTF-8 | 655 | 3.015625 | 3 | [] | no_license | CREATE TABLE `follow` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`follower` int(11) NOT NULL,
`following` int(11) NOT NULL,
`createdDttm` datetime NOT NULL,
`updatedDttm` datetime DEFAULT NULL,
`deletedDttm` datetime DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=19 DEFAULT CHARSET=... | true |
7e7f37324db1453e5402314c85f9a03a30b3e92c | SQL | dmswldi/JSP | /WebContent/WEB-INF/sql/select/joinEx1.sql | UHC | 1,471 | 4.1875 | 4 | [] | no_license | ----------- EQUI JOIN
-- 14, 8
SELECT * FROM employee;
-- 4, 3
SELECT * FROM department;
-- 56(), 11(): ġ
SELECT * FROM employee, department;
-- ߺ column dno Ȯ
SELECT eno, ename, employee.dno edno, department.dno ddno, dname
FROM employee, department
WHERE eno = 7369;
SELECT eno, ename, employee.dno edno, dname... | true |
702f5dad43f79a1b2e984ca7db2c5dd285f0ec2b | SQL | dxdyprotocol/djuno | /schema/02-posts.sql | UTF-8 | 837 | 2.90625 | 3 | [
"MIT"
] | permissive | CREATE TABLE post
(
id TEXT NOT NULL UNIQUE PRIMARY KEY,
parent_id TEXT REFERENCES post (id),
message TEXT NOT NULL,
created timestamp without time zone NOT NULL,
last_edited timestamp without time zone NOT NULL,
... | true |
66c1676521650a24590d7b06e3722d622a1a047d | SQL | StefanStafie/Honorable-mentions | /PHP & web Coin handling site/db_population/users.sql | UTF-8 | 41,397 | 2.703125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Generation Time: May 17, 2020 at 11:58 AM
-- Server version: 10.4.11-MariaDB
-- PHP Version: 7.4.5
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIEN... | true |
3ae7153474977ca60e2a6c49377f4f2f62497335 | SQL | cgb-report/jeereporter | /src/test/temp.sql | UTF-8 | 3,419 | 3.15625 | 3 | [] | no_license | DROP TABLE `demo`.`oms_commodity`, `demo`.`oms_commodity_column`, `demo`.`oms_order`, `demo`.`oms_order_item`, `demo`.`online_apply`, `demo`.`ordercontext`, `demo`.`orderdetails`, `demo`.`orderdetailstemplate`, `demo`.`orders`, `demo`.`ordertesttemplate`;
# 上锌量配置表
CREATE TABLE rpt_base_zinccoatingthickness_config (
... | true |
6ba00b6ea9a14fb7ec6ea689abd5f77cb17e5290 | SQL | youngmeezz/sql | /select/문자형함수.sql | UTF-8 | 1,777 | 4.15625 | 4 | [] | no_license | -- upper
-- 1.자바 upperCase보다 DB의 upper()가 훨씬 빠르다.
-- 2.웬만한 DB에서 문자열 처리 뿐만아니라 포맷팅 처리 등을 다 해주고
-- 자바에서는 출력만 한다.
-- 3.자바 코드가 간결해서 좋다.
select upper('SEOUL'), ucase('seoul');
select upper(first_name) from employees;
-- db에서 다 해결해서 가져오는게 훨씬 빠르다는데?
-- lower
select lower('SEoul'), lcase('SEOUL');
-- substring
select sub... | true |
5ff13d17c4995dfc2a63dcbc13875ae6e540b82f | SQL | zaretmir/inventory-database | /db_inventory_price.sql | UTF-8 | 2,794 | 3.171875 | 3 | [] | no_license | CREATE DATABASE IF NOT EXISTS `db_inventory` /*!40100 DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci */ /*!80016 DEFAULT ENCRYPTION='N' */;
USE `db_inventory`;
-- MySQL dump 10.13 Distrib 8.0.16, for Win64 (x86_64)
--
-- Host: localhost Database: db_inventory
-- ------------------------------------------... | true |
12a288bee8306fa2742018b2fa3b7219b03c4926 | SQL | ankmish/Previous-Semester-Assignments | /6th_Semester/Lab Assignments/DBMS Lab/as6/2 emp.sql | UTF-8 | 716 | 2.765625 | 3 | [] | no_license | create table Employee(
eid varchar(20),
ename varchar(20),
age varchar(20),
Salary integer,
Gender varchar(20),
City varchar(20),
primary key(eid)
);
alter table Employee ENGINE = InnoDB;
insert into Employee
values('101','John Smith','45',100000,'M','Berkeley');
insert into Employee
values('102','John... | true |
3930b71cefbf4ecf44e2cbd8d4d30f161a7147bd | SQL | kimyeseul97/Mung | /nodejs/board.sql | UTF-8 | 694 | 3.140625 | 3 | [] | no_license | CREATE TABLE BOARD(
NUM int,
ID VARCHAR(50),
TITLE VARCHAR(200),
CONTENT VARCHAR(1000),
WDATE DATE,
PRIMARY KEY (NUM)
);
INSERT INTO BOARD(id, title, content, wdate)
VALUES("person1", "p", "hi.content", NOW());
CREATE TABLE BOARD(
num int not null,
id VARCHAR(50),
title VARCHAR(200... | true |
179bd3e119b62008d23a58e902249c84b704d7c5 | SQL | dorisoy/ERP | /doc/技术文档/其他文档/mysql 20150925.sql | GB18030 | 288,113 | 3.5 | 4 | [] | no_license |
CREATE TABLE `brand` (
`ID` int(10) NOT NULL AUTO_INCREMENT,
`Code` varchar(50) DEFAULT NULL COMMENT 'Ʒƴ',
`Name` varchar(50) DEFAULT NULL COMMENT 'Ʒ Ψһ',
`ParentID` int(10) DEFAULT NULL COMMENT 'id',
`Seq` int(4) DEFAULT NULL COMMENT ' Ĭ0',
`CreatePerson` varchar(50) DEFAULT NULL COMMENT 'ˣû',
`CreateDa... | true |
ddd8bb509ed52db32e1dcdf85734f4e527ccaaea | SQL | marcelo-michels/estados-cidades-br | /SQL/completo/microrregioes.sql | UTF-8 | 56,189 | 2.703125 | 3 | [] | no_license |
create table microrregiao
(
idmicrorregiao integer,
nome character varying(50) not null,
idmesorregiao integer not null,
primary key (idmicrorregiao)
);
insert into microrregiao (idmicrorregiao, nome, idmesorregiao) values ( 11001, 'Porto Velho', 1101);
insert into microrregiao (idmicrorregiao, nome,... | true |
89e05b31bb63db6e172714f43f0f8b833467b87f | SQL | EduardoDanielSouzaGuimaraes/GRUPO_1-Marcos- | /Desenvolvimento agil RMK.sql | UTF-8 | 5,413 | 3.5 | 4 | [] | no_license | -- MySQL Workbench Forward Engineering
SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0;
SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0;
SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SU... | true |
109479944ac0c955d92cf2166477abd04fee880d | SQL | apache/flink | /flink-end-to-end-tests/flink-tpcds-test/tpcds-tool/query/query99.sql | UTF-8 | 1,323 | 3.78125 | 4 | [
"BSD-3-Clause",
"OFL-1.1",
"ISC",
"MIT",
"Apache-2.0"
] | permissive | -- start query 1 in stream 0 using template ../query_templates_qualified/query99.tpl
select
substr(w_warehouse_name,1,20)
,sm_type
,cc_name
,sum(case when (cs_ship_date_sk - cs_sold_date_sk <= 30 ) then 1 else 0 end) as `30 days`
,sum(case when (cs_ship_date_sk - cs_sold_date_sk > 30) and
... | true |
d0c9961b727f7947bcbb49c95f894f3d526aab74 | SQL | lele1307/Sql | /project/src/task1.sql | UTF-8 | 965 | 3.765625 | 4 | [] | no_license | DROP TABLE Post;
DROP TABLE Topic;
DROP TABLE Forum;
DROP TABLE Person;
CREATE TABLE Person (
id INTEGER PRIMARY KEY AUTO_INCREMENT ,
name VARCHAR(100) NOT NULL ,
username VARCHAR(10) NOT NULL UNIQUE ,
stuId VARCHAR (10) NULL
);
CREATE TABLE Forum (
id INTEGER PRIMARY KEY AUTO_INCREMENT ,
title ... | true |
1e6aa0c4a29ed56eca53943bdbc5558f64277136 | SQL | silence-do-good/stress-test-Postgres-and-MySQL | /dump/high/day15/select2335.sql | UTF-8 | 498 | 3.65625 | 4 | [] | no_license |
SELECT obs.sensor_id, avg(counts)
FROM (SELECT sensor_id, date_trunc('day', timestamp), count(*) as counts
FROM WeMoObservation WHERE timestamp>'2017-11-14T23:35:00Z' AND timestamp<'2017-11-15T23:35:00Z' AND SENSOR_ID = ANY(array['a7bb68ca_6d74_431b_87fe_70ba47545683','f55f8d78_4925_4dab_b034_cbe609f6ae19','31... | true |
05cb77f012d93fa36f3a2d31f1d3ec9f542daa3d | SQL | VaishnaviReddyGuddeti/SQL--MySQL | /UNION VS UNION.sql | UTF-8 | 519 | 3.890625 | 4 | [] | no_license | USE employees;
SELECT
d.dept_name, AVG(salary)
FROM
departments d
JOIN
dept_manager m ON d.dept_no = m.dept_no
JOIN
salaries s ON m.emp_no = s.emp_no
GROUP BY d.dept_name
ORDER BY d.dept_no;
SELECT
d.dept_name, AVG(salary) AS average_salary
FROM
departments d
... | true |
8704e6545b8edfbbb300a8234d2a8cc79f0533b5 | SQL | mdurular/SQL | /DAwSQL (NV) Session-7 (Window Functions-2).sql | UTF-8 | 4,601 | 4.375 | 4 | [] | no_license |
/* WINDOW FUNCTIONS */
-- 3. ANALYTIC NUMBERING FUNCTIONS --
--ROW_NUMBER() - RANK() - DENSE_RANK() - CUME_DIST() - PERCENT_RANK() - NTILE()
--Assign an ordinal number to the bike prices for each category in ascending order
--1. Herbir kategori içinde bisikletlerin fiyat sıralamasını yapınız (artan fiyata g... | true |
8e26c38f040bd20a6ebea73893a30c066dfa6da3 | SQL | Shafquat16/Bus-Transportation-System | /Section 5-ID21341045-CSE 470/Section 5_21341045-CSE 470/Code/MVC/Controller/Database/id21341045_bus_ticket.sql | UTF-8 | 5,746 | 2.90625 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.9.5
-- https://www.phpmyadmin.net/
--
-- Host: localhost:3306
-- Generation Time: Aug 27, 2020 at 05:38 PM
-- Server version: 10.3.16-MariaDB
-- PHP Version: 7.3.12
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SE... | true |
bcd7dca4d15837291ec1972f94d8f7742f6ddfe5 | SQL | PasserbyX7/scrapy | /mysql/stock.sql | UTF-8 | 439,122 | 2.953125 | 3 | [] | no_license | /*
Navicat Premium Data Transfer
Source Server : localhost
Source Server Type : MySQL
Source Server Version : 80015
Source Host : localhost:3306
Source Schema : fund
Target Server Type : MySQL
Target Server Version : 80015
File Encoding : 65001
Date: 22/01/2021 00:51... | true |
c536adb6dfc249b58ca6ad3fd605e4de3190e931 | SQL | mtuwtf/polcon | /db/tbl_staff.sql | UTF-8 | 1,039 | 2.625 | 3 | [
"BSD-2-Clause"
] | permissive | CREATE TABLE tbl_staff (
int_staff_id serial PRIMARY KEY,
txt_staff_guid character varying(64),
txt_staff_guid_sha1 character varying(64),
txt_staff_email character varying(128),
txt_staff_email_sha1 character varying(64),
txt_created timestamp without time zone NOT NULL,
txt_isp_confirmed ... | true |
0ec60cce87eeab2c3c44747cbf63ef89f1c65931 | SQL | jacobstringer/lagStudy | /dbsetup.sql | UTF-8 | 2,363 | 3.453125 | 3 | [] | no_license | CREATE DATABASE libio;
\connect libio;
CREATE TABLE projects (ID varchar, Platform varchar, Name varchar, CreatedTimestamp varchar, UpdatedTimestamp varchar, Description varchar, Keywords varchar, HomepageURL varchar, Licenses varchar, RepositoryURL varchar, VersionsCount varchar, SourceRank varchar, LatestReleasePu... | true |
6bc37f6aed802e42d3621d7be53cfe2d6fa97291 | SQL | Poojabafnaprakash/CMPE295 | /Database/Favorite.sql | UTF-8 | 296 | 3.015625 | 3 | [] | no_license | CREATE TABLE `Favorite` (
`fid` int(11) NOT NULL AUTO_INCREMENT,
`tid` int(11) DEFAULT NULL,
PRIMARY KEY (`fid`),
KEY `tid_idx` (`tid`),
CONSTRAINT `tableID` FOREIGN KEY (`tid`) REFERENCES `Travel` (`tid`) ON DELETE NO ACTION ON UPDATE NO ACTION
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
| true |
9d273aab15b94d606168ee5876f5d00cd4f94421 | SQL | andrei-kolesnik/leetcode | /sql/197.Rising-Temperature.SQL | UTF-8 | 708 | 4.0625 | 4 | [] | no_license | /*
LeetCode 197. Rising Temperature
https://leetcode.com/problems/rising-temperature/
Sample Input:
+---------+------------------+------------------+
| Id(INT) | RecordDate(DATE) | Temperature(INT) |
+---------+------------------+------------------+
| 1 | 2015-01-01 | 10 |
| 2 | 2... | true |
6a1b67b7094e2ddfce74c7d8c3608ea0b3579ad8 | SQL | lilixom/EntityFrameworkEAV | /Script/FileMetadata/FileMedia.sql | GB18030 | 505 | 3.328125 | 3 | [] | no_license | -- Create table
create table FILEMEDIA
(
id VARCHAR2(40) not null,
relativepath VARCHAR2(200),
fullpath VARCHAR2(200),
checksum VARCHAR2(128)
);
-- Add comments to the columns
comment on column FILEMEDIA.id
is '汾ID';
comment on column FILEMEDIA.relativepath
is '·';
comment on column FILEM... | true |
d26e5dd41c2499e432cd65be3cd94f0e2f82445b | SQL | anaxkokan/hackerrank-sql | /weather_observation_station_13.sql | UTF-8 | 186 | 3.140625 | 3 | [] | no_license | --https://www.hackerrank.com/challenges/weather-observation-station-13/problem
select
cast(sum(lat_n) as decimal (10, 4))
from station
where 38.7880 < lat_n and lat_n < 137.2345; | true |
754e077f07f0725c696e0f7a2a26055d7febfda2 | SQL | jkuhlenkamp/AnsCassandra | /roles/cassandra/files/setup-ycsb.cql | UTF-8 | 220 | 2.625 | 3 | [] | no_license | create keyspace usertable with replication = {'class' : 'SimpleStrategy', 'replication_factor' : 1};
use usertable;
create table data (key blob, column1 ascii, value blob, PRIMARy KEY(key, column1)) WITH COMPACT STORAGE; | true |
ab067207092de43079e17bef61d94e02aad0e5d7 | SQL | salman1993/twitter-customer-support-collector | /create.sql | UTF-8 | 835 | 3.796875 | 4 | [
"MIT"
] | permissive |
CREATE TABLE IF NOT EXISTS tweets (
status_id TEXT PRIMARY KEY,
created_at TIMESTAMP,
observed_at TIMESTAMP default (now() at time zone 'utc'),
data JSONB
);
CREATE INDEX IF NOT EXISTS tweet_created_at ON tweets (created_at);
CREATE TABLE IF NOT EXISTS users (
user_id TEXT PRIMARY KEY,
observed_at TIMEST... | true |
1ce8a118638befbff81f6c5deb3638da7ae6bd43 | SQL | genoufox/sql-scripts | /vip2017登陆留存0209.sql | GB18030 | 217 | 2.875 | 3 | [] | no_license | select a.userid ˺id,
b.last_logout_time ½ʱ,
b.last_pay_time ʱ
from vip_2017_0208 a
join bitask.t_dw_xa_account_status b
on a.userid = b.userid
| true |
d1eadd38ea060d483e74f84e08c800d2b207de9f | SQL | hectown/Scripts | /Querys/reporte seguimiento pos diario bueno2.sql | UTF-8 | 5,082 | 3.96875 | 4 | [] | no_license | SELECT PRON_JUST.FECHA_CONTABLE,
POZOS.ACTIVO,
POZOS.SECTOR,
POZOS.ESTADO,
PRON_JUST.CONCEPTO,
PRON_JUST.DET_CONCEPTO,
PRON_JUST.VOLUMEN,
PRON_MOVS.DESC_PLATAFORMA,
PRON_MOVS.DESC_INSTALACION
FROM
(SELECT b.activo,
b.sector,
b.proyect... | true |
e4df7126ad44e99ce7cd9e2e6011059e91e0e784 | SQL | pedroiki/table_sql | /table.sql | UTF-8 | 1,367 | 4.5 | 4 | [] | no_license |
-- criando uma tabela
CREATE TABLE products (
id int, -- identificador do produto
name varchar(255), -- propriedades da tabela, 225 tamanho to text, varchar = texto
price double, -- double porque e um numero flutuante
creation_date datetime ... | true |
076ff1310455e373cb3e8560ed5fcd20acf7f801 | SQL | FinOCE/CP2404 | /Week 9/queries/28.sql | UTF-8 | 79 | 2.546875 | 3 | [] | no_license | SELECT
COUNT(BOOK_NUM) AS 'Available Books'
FROM BOOK
WHERE PAT_ID IS NULL; | true |
36e1481dd1b4b04cf15138321cb4e10d6dd076ae | SQL | danieldiamond/gitlab-analytics | /transform/snowflake-dbt/models/sources/greenhouse/greenhouse_openings_source.sql | UTF-8 | 820 | 2.90625 | 3 | [
"LicenseRef-scancode-unknown-license-reference",
"MIT"
] | permissive | WITH source as (
SELECT *
FROM {{ source('greenhouse', 'openings') }}
), renamed as (
SELECT
--keys
id::NUMBER AS job_opening_id,
job_id::NUMBER AS job_id,
opening_id::varchar AS opening_id,
hired_app... | true |
dfd9c1b12a6ca9f4d498a5f0ac68b82a7804f876 | SQL | bpcavalcante/Exercicios-Generation | /2 Modulo/MySQL/Atividade8.sql | UTF-8 | 4,336 | 4 | 4 | [] | no_license | /*
Atividade 2
Crie um banco de dados para um serviço de pizzaria de uma empresa, o nome do banco deverá ter o seguinte nome db_pizzaria_legal, onde o sistema trabalhará com as informações dos produtos desta empresa.
O sistema trabalhará com 2 tabelas tb_pizza e tb_categoria.
siga exatamente esse passo a passo:
C... | true |
7ea1424f5bf3923fc1599e334a88cced2fa254a7 | SQL | adonisventocilla/TextilEmpresa | /BDtextil.ddl | UTF-8 | 6,206 | 3.03125 | 3 | [] | no_license | -- Generado por Oracle SQL Developer Data Modeler 18.3.0.268.1208
-- en: 2018-12-02 19:13:48 COT
-- sitio: Oracle Database 10g
-- tipo: Oracle Database 10g
CREATE TABLE camion (
mat_car CHAR(7) NOT NULL,
mod_car VARCHAR2(50),
tipo_car VARCHAR2(50),
pot_car ... | true |
aefc75deba121f6efe5984adc1fb7ea8e34a0ec5 | SQL | Justarone/bmstu-db | /lab_01/init.sql | UTF-8 | 6,888 | 3.984375 | 4 | [
"MIT"
] | permissive | DROP DATABASE IF EXISTS mydb;
CREATE DATABASE mydb;
\c mydb
CREATE TABLE IF NOT EXISTS player_info (
player_id INT PRIMARY KEY,
firstName VARCHAR(30) NOT NULL,
lastName VARCHAR(30) NOT NULL,
nationality VARCHAR(5) NOT NULL,
birthCity VARCHAR(30) NOT NULL,
primaryPosition VARCHAR(2) NOT NULL,
... | true |
5b381f191de1c62a23455ab51e8c40f793a07a2c | SQL | josepitteloud/VESPA | /Vespa Projects/083 - Disney Recorded Viewing.sql | UTF-8 | 1,387 | 3.078125 | 3 | [] | no_license |
select cast(recorded_time_utc as date) as recorded_date
,count(*) as records
,sum(x_programme_viewed_duration) as seconds_viewed
,count(distinct subscriber_id) as boxes
from sk_prod.VESPA_STB_PROG_EVENTS_20120510
where play_back_speed =2
group by recorded_date
order by recorded_date
;
select count(*) as records
,s... | true |
3eabfcfd2b9cdc7c43d9bb4e1c5dead8fb6204a3 | SQL | leanrob/ASP.NET_Webforms_Projects | /Engi3673Assn3/CREATE TABLE.sql | UTF-8 | 982 | 3.21875 | 3 | [] | no_license | drop table if exists Ottawa cascade;
create table Ottawa
(
Object_ID serial primary key,
PIN float not null,
RoadName text not null,
RoadType text not null
);
comment on table Ottawa is 'The adresses of Ottawa';
comment on column Ottawa.Object_ID is 'autogenerated ID.';
comment on column Ottawa.PIN is 'The PIN of... | true |
61a15ce520d1bdb1f3ba5493e5b3b2b702cd8d05 | SQL | cogud0908/StudyWrite | /데이터베이스/sql/employees_query3.sql | UTF-8 | 5,240 | 4.96875 | 5 | [] | no_license | -- 1번문제 현재 급여가 많은 직원부터 직원의 사번, 이름, 그리고 연봉을 출력 하시오
select employees.emp_no as '사번', concat(first_name,' ',last_name) as '이름', salary as '연봉'
from employees join salaries on
employees.emp_no = salaries.emp_no
where salaries.to_date > now()
order by salary desc;
-- 문제2 전체 사원의 사번, 이름, 현재 직책을 이름 순서로 출력하세요.
select a.emp_... | true |
0e4566223ec3d1f75a903da07754fec025c1ee90 | SQL | Antoine-manu/Covoiturage | /script.sql | UTF-8 | 2,203 | 4.21875 | 4 | [] | no_license | --
-- Current Database: `carpooling`
--
DROP DATABASE IF EXISTS `carpooling`;
CREATE DATABASE `carpooling` CHARACTER SET UTF8;
USE `carpooling`;
--
-- Table structure for table `users`
--
DROP TABLE IF EXISTS `users`;
CREATE TABLE `users` (
`user_id` INT(11) NOT NULL AUTO_INCREMENT,
`first_name` VARCHAR(150) NO... | true |
58b50442463bd37206507fc599f5d25895af15a4 | SQL | sujeetdiwakar/web-learning-advance-jquery | /37-ajax-jquery-column-sort-with-php-mysql/tbl_employee.sql | UTF-8 | 1,504 | 2.921875 | 3 | [] | no_license | --
-- Table structure for table `tbl_employee`
--
CREATE TABLE IF NOT EXISTS `tbl_employee` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(50) NOT NULL,
`gender` varchar(10) NOT NULL,
`designation` varchar(100) NOT NULL,
`age` int(11) NOT NULL,
PRIMARY KEY (`id`)
)... | true |
13c6fedd71044e3b58fdcc2799085d5c56d7b9ee | SQL | Dimeurg/iteh_2 | /lab3/database.sql | UTF-8 | 4,011 | 3.296875 | 3 | [] | no_license | -- MySQL dump 10.13 Distrib 8.0.19, for Win64 (x86_64)
--
-- Host: localhost Database: db_lab
-- ------------------------------------------------------
-- Server version 5.7.28-log
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
... | true |
3d1d0d64535838b87b36c1c1cf1e11fb70f941ca | SQL | RonnyWeiss/APEX-Item-Toolbar | /dynamic_action_plugin_apex_item_toolbar.sql | UTF-8 | 23,541 | 2.578125 | 3 | [
"MIT"
] | permissive | prompt --application/set_environment
set define off verify off feedback off
whenever sqlerror exit sql.sqlcode rollback
--------------------------------------------------------------------------------
--
-- ORACLE Application Express (APEX) export file
--
-- You should run the script connected to SQL*Plus as the Oracle... | true |
a3cce5be7fcab0732b895d3816859e252ed24405 | SQL | 2505beto/Servicio_Web | /mvc/udh.sql | UTF-8 | 4,813 | 2.8125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Servidor: 127.0.0.1
-- Tiempo de generación: 14-10-2020 a las 14:59:44
-- Versión del servidor: 10.4.13-MariaDB
-- Versión de PHP: 7.3.19
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD... | true |
9549d48c793c4de437552191572c4b8bdbbc64fc | SQL | MarcinHoinka/mySQLrepo | /inserty.sql | UTF-8 | 12,168 | 3.125 | 3 | [] | no_license | #INSERT klubowicze. Uprawnienia uzytkownikow 1=klubowicz / user, 2=sprzetowiec/root
INSERT INTO klubowicze VALUES (1, 'Urszula', 'Rak', 'Rurka','K','1986-07-13', '69', 'rak@adresmailowy.com', '321654987', '1' );
INSERT INTO klubowicze VALUES (2, 'Marcin', 'Hoinka', 'Zoha','M','1984-08-10','79', 'zoha@foogle.com', '6216... | true |
7ecc09602815946a52ce7a77525bfbe00f42c361 | SQL | bahattincelik/SQL | /day01.sql | WINDOWS-1252 | 1,268 | 3.65625 | 4 | [] | no_license | --TABLO OLUSTURMA
/*
COMMENT LINE
*/
CREATE TABLE student
(
std_id CHAR(3),
std_name VARCHAR2(20),
std_age NUMBER
);
INSERT INTO student VALUES('101','AHMET CAN',30);
INSERT INTO student VALUES('102','BAHATTIN CELIK',33);
INSERT INTO student VALUES('103','MUSTAFA ALI',29);
INSERT INTO student VALUES('10... | true |
7478962180e4f04fd581abc4bbad85514edc6bd7 | SQL | alancps/snowman | /src/main/resources/db/migration/V01__create_tables.sql | UTF-8 | 4,339 | 3.6875 | 4 | [
"Apache-2.0"
] | permissive | CREATE TABLE category (
id bigint(20) NOT NULL AUTO_INCREMENT,
description varchar(45) NOT NULL,
PRIMARY KEY (id),
UNIQUE KEY description_UNIQUE (description)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE tourist_spot (
id bigint(20) NOT NULL AUTO_INCREMENT,
name varchar(100) NOT NULL,
longitude dec... | true |
c96a90837b1db946fd151963eb908b9752782ee6 | SQL | AllakaNagaNaveen/DCL-DML | /statements.sql | UTF-8 | 502 | 3.234375 | 3 | [] | no_license | Create database university;
Create table students;
Create view for_students;
Drop database university;
Drop table student;
Alter table guru99 add subject varchar;
TRUNCATE table students;
INSERT INTO students (RollNo, FIrstName, LastName) VALUES ('60', 'Tom', Erichsen');
UPDATE students
SET FirstName = 'Jhon'... | true |
984364cbb8a97c9553ef6231ae78cc2d87589c82 | SQL | mfiumara/SelfAssessment | /selfassessment.sql | UTF-8 | 3,263 | 3.25 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 3.5.1
-- http://www.phpmyadmin.net
--
-- Machine: localhost
-- Genereertijd: 17 aug 2013 om 11:56
-- Serverversie: 5.5.24-log
-- PHP-versie: 5.4.3
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!401... | true |
deebe7da1623d050502fa33f3b5b4a8b3ba51b20 | SQL | jalexacb/MarketingWebApi | /NextCampaign.sql | UTF-8 | 44,695 | 3.203125 | 3 | [
"MIT"
] | permissive | -- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Servidor: 127.0.0.1:3306
-- Tiempo de generación: 03-03-2021 a las 22:47:56
-- Versión del servidor: 5.7.31
-- Versión de PHP: 7.2.33
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHA... | true |
64fd013ff9b1604760cd5fa423a3600a4f7f7808 | SQL | Baneeishaque/android-billing-server | /db/android-billing.sql | UTF-8 | 8,289 | 3.046875 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 3.5.2.2
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Mar 14, 2017 at 06:00 AM
-- Server version: 5.5.27
-- PHP Version: 5.4.7
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/... | true |
7d858508bfba5003318aefe7e4be52f0a93f4240 | SQL | luannlaurindo/postgresqlt_test | /comissoesDB.sql | UTF-8 | 422 | 3.3125 | 3 | [] | no_license | --select * from comissao c2 ;
--select * from comissao_historico ch ;
--select * from comissao_draft cd ;
--select * from beneficiario b ;
select b.nm_beneficiario, SUM(c.vl_comissao), c.dt_comissao_inicio_beneficio
from beneficiario b, comissao c
where cast(b.nr_beneficiario_cpf as varchar) = c.nr_comissao_cp... | true |
c99854b5c7c4072b510fa82ecf512a5c9bf6e057 | SQL | mathiasuy/misfinanzas | /build/classes/mathiasbattistella/conexion/script.sql | UTF-8 | 5,512 | 3.09375 | 3 | [] | no_license | -- drop database micasa;
-- create database micasa;
use micasa;
-- drop database micasa;
-- create database micasa;
drop table MovimientoMensual;
drop table MovimientoRapido;
drop table Categoria;
create table Categoria(
nombre varchar(20) primary key unique not null,
descripcion varchar(200)
);
... | true |
00ceaa1cae49173a1cd888ff02b6fce1c55e8a24 | SQL | felipeomurillo/sql-challenge | /EmployeeSQL/queries.sql | UTF-8 | 6,363 | 4.5 | 4 | [] | no_license | -- Author: F. Murillo
-- Date: May 25, 2019
-- Title: SQL-Challenge: Employee Database (Pewlett Hackard) PART I
-- Description: Each section header describes the desired SQL query to be performed
--
-----
-- #1: List employee number, last name, first name, gender, and salary
-----
SELECT e.emp_no as "Employee #",
... | true |
a8460404165d1348f5267a3dc93ba56cdb59ccf8 | SQL | rcont0110/laravel | /bd_usuarios.sql | UTF-8 | 2,514 | 2.96875 | 3 | [
"MIT"
] | permissive | -- phpMyAdmin SQL Dump
-- version 4.9.1
-- https://www.phpmyadmin.net/
--
-- Servidor: 127.0.0.1
-- Tiempo de generación: 14-10-2019 a las 09:50:11
-- Versión del servidor: 10.4.8-MariaDB
-- Versión de PHP: 7.3.10
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
... | true |
fd07da4d84f2d1f7e4432718b0aee97367376c6c | SQL | DeskwarePI/API-VoMariaFelix | /SPRINT 2/Programação/Dump alt.sql | UTF-8 | 4,352 | 3.265625 | 3 | [
"MIT"
] | permissive | CREATE DATABASE IF NOT EXISTS `ong` /*!40100 DEFAULT CHARACTER SET utf8mb4 */;
USE `ong`;
-- MySQL dump 10.13 Distrib 8.0.21, for Win64 (x86_64)
--
-- Host: localhost Database: ong
-- ------------------------------------------------------
-- Server version 8.0.21
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER... | true |
26fe1e943c655355579c0a0dba13fd39c962c701 | SQL | PatrickRichardson12/BetterBannerWeb | /Server/schema.sql | UTF-8 | 1,121 | 3.796875 | 4 | [] | no_license |
CREATE TABLE term (
semester VARCHAR PRIMARY KEY
);
CREATE TABLE subject (
name VARCHAR PRIMARY KEY
);
CREATE TABLE subject_term (
semester VARCHAR,
subject VARCHAR,
PRIMARY KEY(semester, subject)
);
CREATE TABLE course_term (
semester VARCHAR,
course INT,
PRIMARY KEY(semester, cours... | true |
0149411b16faf9017f35afcea808099a420757e6 | SQL | hi-noikiy/project | /91ns/schemas/web/20150408/pre_activities_share.sql | UTF-8 | 905 | 2.875 | 3 | [] | no_license | /*
Navicat MySQL Data Transfer
Source Server : 192.168.1.23
Source Server Version : 50611
Source Host : localhost:3306
Source Database : 91ns
Target Server Type : MYSQL
Target Server Version : 50611
File Encoding : 65001
Date: 2015-04-08 17:09:35
*/
SET FOREIGN_KEY_CHECKS=0;
-- -... | true |
19a66be5143d23732d9b2801af03cb82cc16cdb4 | SQL | Shiishiji/HeartstoneServer | /src/main/kotlin/org/shiishiji/create_schema_mysql.sql | UTF-8 | 1,824 | 3.453125 | 3 | [] | no_license | SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET N... | true |
1bc71ba54fe3137871dcda70608120b1442c0d9b | SQL | maximgn/ft_project_bankAPI | /src/main/resources/data.sql | UTF-8 | 1,599 | 2.53125 | 3 | [] | no_license | INSERT INTO USERS VALUES(1, 'Иванов', 'Иван', 'Иванович');
INSERT INTO USERS VALUES(2, 'Борисов', 'Сергей', 'Михайлович');
INSERT INTO USERS VALUES(3, 'Григоренко', 'Петр', 'Афанасьевичч');
INSERT INTO USERS VALUES(4, 'Шумкина', 'Елена', 'Григорьевна');
INSERT INTO USERS VALUES(5, 'Игнатова', 'Любовь', 'Михайловна');
I... | true |
c2d7d403c1a144d2391872f022d772961171be5d | SQL | Troy0718/Order | /sql_script(database)/Dump20201208.sql | UTF-8 | 6,241 | 3.015625 | 3 | [] | no_license | CREATE DATABASE IF NOT EXISTS `test` /*!40100 DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci */ /*!80016 DEFAULT ENCRYPTION='N' */;
USE `test`;
-- MySQL dump 10.13 Distrib 8.0.16, for macos10.14 (x86_64)
--
-- Host: localhost Database: test
-- ------------------------------------------------------
-- Ser... | true |
91cc7c75ce10d2542c65ed603083172fbb0c2ad2 | SQL | wtmullican/urlinked | /SQL_Scripts/XML_Import/000 - Parse Testing Script.sql | UTF-8 | 892 | 3.234375 | 3 | [] | no_license |
--EXEC dbo.XML_ParsePrep_LongDesc_SP
--EXEC dbo.RS_ParseLongDesc_RSType_SP
--EXEC dbo.RS_ParseLongDesc_Fav_SP
--EXEC dbo.RS_ParseLongDesc_Author_SP
EXEC dbo.RS_ParseLongDesc_EntryDate_SP
--EXEC dbo.RS_ParseLongDesc_PubDT_SP
SELECT
RS_SysID
, RS_RST_SysID
, RST_Desc
, RS_Author
, RS_EntryDT
, RS_FavoriteFlag
... | true |
fcc5d332dcc6754e75b5c20c32d7c11484bb287f | SQL | TheWifflebrain/CS313_PHP_2 | /db/db.sql | UTF-8 | 2,218 | 3.109375 | 3 | [] | no_license | SELECT * FROM pg_stat_activity;
-- Table: public."Comment"
-- DROP TABLE public."Comment";
CREATE TABLE public."Comment"
(
"Comment_id" bigint NOT NULL,
"User_id" bigint NOT NULL,
"Date" date[] NOT NULL,
"Message" text[] COLLATE pg_catalog."default" NOT NULL,
CONSTRAINT "Comment_pkey" PRIMARY KEY... | true |
44703fe1b0d39cf00ec3b72b04f9eadfad9b9d1a | SQL | NaimHamidi/DeveloperDiscussionsPHP | /database/developerdiscussionsdbphp.sql | UTF-8 | 9,436 | 2.96875 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.9.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Dec 22, 2019 at 11:14 AM
-- Server version: 10.4.8-MariaDB
-- PHP Version: 7.3.11
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD... | true |
962afcda2587062037eda36fedc546730225b4a8 | SQL | zhengjr/bis | /sql/krasrielt/mysql/update/10.08.2010.sql | UTF-8 | 11,431 | 3.796875 | 4 | [] | no_license | ALTER TABLE COLUMN_PARAMS
ADD ELEMENT_TYPE INTEGER
--
DROP VIEW S_COLUMN_PARAMS
--
CREATE VIEW S_COLUMN_PARAMS
AS
SELECT CP.*,
C.NAME AS COLUMN_NAME,
P.NAME AS PARAM_NAME,
P.PARAM_TYPE
FROM COLUMN_PARAMS CP
JOIN COLUMNS C ON C.COLUMN_ID=CP.COLUMN_ID
JOIN PARAMS P ON P.PARAM_ID=CP.PARAM_ID
--
DR... | true |
573d3336e3e67835bc8a32a8ff5abdc3fd69d7e0 | SQL | dspencer-kc/Path.Slide-Tracker.BackEnd | /mysql/qryCaseInquiry.sql | UTF-8 | 796 | 2.546875 | 3 | [] | no_license | /*qryCaseInquiry*/
SELECT tblSlides.SlideID,
tblSlides.StainLabel,
tblSlideDistribution.Status,
tblSlideDistribution.SlideDistributionLocation,
tblSlideDistribution.DTReadyForCourier,
tblSlides.LocationPrinted,
tblSlides.DTP... | true |
f3719c84eab53378cc2be715f32d0a6a43a53796 | SQL | clausoriano/BD | /Tema 5/21.sql | UTF-8 | 118 | 2.78125 | 3 | [] | no_license | select tda_ger, ventas.*
from tiendas,ventas
where vnt_tda = tda_num and vnt_fch like '91%'
order by vnt_precio desc;
| true |
722024a667874d5e326c6aee8c43d9ccba9cdc85 | SQL | phpfarmers/mincms | /data/default.sql | UTF-8 | 11,001 | 2.75 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.1.14
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: 2015-03-25 09:30:38
-- 服务器版本: 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 |
66a12bab21623bf3a3d137817566416c922fe7ab | SQL | exMifsan/Database_2017 | /lab5.sql | WINDOWS-1251 | 2,971 | 4.0625 | 4 | [] | no_license | 1.1
SELECT * FROM child LIMIT 1;
2.1
SELECT * FROM child WHERE id_polyclinic IS NULL;
2.2
SELECT * FROM child WHERE id_polyclinic IS NOT NULL;
2.3 2010-01-01 2013-01-01.
SELECT * FROM child WHERE dob BETWEEN '2010-01-01' AND '2013-01-01';
2.4 1991-05-12 1994-03... | true |
29524282663e167f4d3a416d4e2629f3113c5440 | SQL | rjoleary/personal-finance | /schema.sql | UTF-8 | 745 | 3.4375 | 3 | [] | no_license | PRAGMA foreign_keys = ON;
CREATE TABLE account (
acc_id INTEGER PRIMARY KEY AUTOINCREMENT,
acc_name VARCHAR(255) NOT NULL,
acc_currency CHAR(3)
);
CREATE TABLE category (
cat_id INTEGER PRIMARY KEY AUTOINCREMENT,
cat_name VARCHAR(255) NOT NULL
);
CREATE TABLE transact (
trn_id ... | true |
0633a329c87db7cdfef117ceccbd0d2643b05a50 | SQL | florinrm/BD-Labs | /lab5.sql | UTF-8 | 2,644 | 4.03125 | 4 | [] | no_license | create table grupe
(
id_grupa number(2),
den_grupa varchar2(20),
id_sef_gr number(2),
constraint pk_grupe primary key (id_grupa)
);
create table studenti
(
id_student number(2),
nume varchar2(20),
id_grupa number(2),
medie_an number(4,2),
constraint pk_stud primary key (id_student),
constraint... | true |
a08f7b2b39b894aec5d8cd6c5c5f6d64b3c5dfce | SQL | Aziz-Mattar/cloud-project | /management.sql | UTF-8 | 4,663 | 3.03125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1:3306
-- Generation Time: Jan 05, 2021 at 09:14 AM
-- Server version: 5.7.31
-- PHP Version: 7.3.21
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@... | true |
3532a555f2e6c735f3cd7cd4fe7a6a2c6ecaebac | SQL | stobita/scala-play-sample | /conf/evolutions/default/2.sql | UTF-8 | 312 | 3.109375 | 3 | [] | no_license | # --- First database schema
# --- !Ups
create table posts (
id bigint not null auto_increment,
title varchar(255) not null,
content varchar(255) not null,
user_id bigint not null,
constraint pk_posts primary key (id)
);
# --- !Downs
drop table if exists posts;
| true |
0bf3681b30172dc073cda5703fc198036e299da2 | SQL | Ahaochan/algorithm | /src/test/java/LeetCode/_0196_删除重复的电子邮箱.sql | UTF-8 | 833 | 3.734375 | 4 | [] | no_license | # https://leetcode-cn.com/problems/delete-duplicate-emails/
# 编写一个 SQL 查询,来删除 Person 表中所有重复的电子邮箱,重复的邮箱里只保留 Id 最小 的那个。
#
# Id 是这个表的主键。
# +----+------------------+
# | Id | Email |
# +----+------------------+
# | 1 | john@example.com |
# | 2 | bob@example.com |
# | 3 | john@example.com |
# +----+----------... | true |
c72ea9ce75af4f54ebc346c88af61725cb605c49 | SQL | radtek/abs3 | /sql/mmfo/bars/View/cc_w017.sql | WINDOWS-1252 | 3,037 | 3.15625 | 3 | [] | no_license | prompt ##############################################
prompt 6. .
prompt ##############################################
--------------------------------------------------------
-- cc_W017 + ---------------------------------
CREATE OR REPLACE FORCE VIEW BARS.CC_W017 AS
SELECT DECODE (x.tip,'LIM',0,'... | true |
9e4279d5b5cb2ce3631bf760067ac5e881a6acda | SQL | avkojwer1/web | /Web01/sql/tmp.sql | UTF-8 | 1,422 | 3.984375 | 4 | [] | no_license | CREATE TABLE person(
id INT PRIMARY KEY,
NAME VARCHAR(30)
);
CREATE TABLE cars(
id INT PRIMARY KEY,
NAME VARCHAR(30),
price NUMERIC(5,2),
pid INT
);
ALTER TABLE cars
ADD CONSTRAINT c_fk FOREIGN KEY(pid) REFERENCES person(id);
INSERT INTO person VALUES(1,'Jack');
INSERT INTO person VALUES(2,'To... | true |
aabe1964fb95d19cd4ecdc600c3b9bc31e80f243 | SQL | mohitkumar123/Data-Science-Projects- | /Extraction- Transformation and Loading-2/RollUp.sql | UTF-8 | 313 | 3.015625 | 3 | [] | no_license | SELECT department, aisle, SUM(Monday)as MonSales, SUM(Tuesday)as TueSales,
SUM(Wednesday)as WedSales, SUM(Thursday)as ThsSales, SUM(Friday)as FriSales,
SUM(Saturday)as SatSales, SUM(Sunday)as SunSales, GROUPING(department)
AS 'Grouping'
FROM MyPivot
GROUP BY department, aisle with rollup
ORDER BY 1,2 | true |
2edee5f26e926323da4aac443b20ccb926551d40 | SQL | vaglarov/Databases-Basics---MS-SQL-Server | /Test 012019/04. DATA AGGREGATION/Exercieses/Problem 19.sql | UTF-8 | 258 | 3.96875 | 4 | [] | no_license | --Problem 19
SELECT TOP (10) FirstName, LastName, k.DepartmentID
FROM Employees AS [k]
JOIN
(SELECT DepartmentID, AVG(Salary) AS [Avg]
FROM Employees
GROUP BY DepartmentID) AS [r] ON r.DepartmentID = k.DepartmentID
WHERE Salary > Avg
| true |
2f106a97ffc9e2b8e0d8bdefd51b676a1bee838a | SQL | PacktPublishing/learn-sql-database-programming | /chapter-8/gathering-table-info.sql | UTF-8 | 190 | 2.953125 | 3 | [
"MIT"
] | permissive | #in MySQL
USE yourschema;
describe managers;
SELECT * FROM information_schema.table_constraints
WHERE table_name = 'managers'
AND table_schema = 'yourschema';
SHOW CREATE TABLE managers;
| true |
eaff4ca775562f1eec32cc5bb640120130b25b48 | SQL | gcoronelc/SISTUNI-PLSQL-008 | /PROYECTOS/GRUPO02/Examen_Final_Huertas_Zuniga_Cama/Gestion_Cobranza_Banco_Paquete CRUD/PACK_CLIENTE.sql | UTF-8 | 2,008 | 2.96875 | 3 | [] | no_license | --CRUD PAQUETE CLIENTE
CREATE OR REPLACE
PACKAGE PACK_CLIENTE AS
--CREAR
PROCEDURE INSERTAR_CLIENTE(
p_TIPO_DOCUMENTO IN CLIENTE.TIPO_DOCUMENTO%TYPE,
p_NRO_DOCUMENTO IN CLIENTE.NRO_DOCUMENTO%TYPE,
p_NOMBRES IN CLIENTE.NOMBRES%TYPE,
p_APELLIDOS IN CLIENTE.APELLIDOS%TYPE,
p_SEXO IN CLIENTE.SEXO%T... | true |
248f43b37094764078950d0f6880e3dfb31ccb42 | SQL | altamira/visualstudio | /Sistema de Informação Altamira/EGISSQL.Database/dbo/Stored Procedures/Procs1/pr_consulta_importacao_pedido.sql | UTF-8 | 2,195 | 3.6875 | 4 | [] | no_license |
create procedure pr_consulta_importacao_pedido
@cd_pedido_venda int
as
Begin
select pii.cd_pedido_importacao as 'PedidoImportacao',
pii.cd_item_ped_imp as 'ItemPedido',
fa.nm_razao_social as 'Fabricante',
po.nm_pais as 'PaisFabricante',
f.nm_razao_social as 'Exportador',
p... | true |
2cbb9f8c0c08654322cf9ceba9f201197b3e003a | SQL | zhoudy-github/Backup-Restore | /HighjetBI-Portal/src/DB/Highjet_ORA_PDM_门户系统表_DDL.SQL | GB18030 | 5,975 | 3.390625 | 3 | [
"Apache-2.0"
] | permissive | CREATE TABLE SYS_MENU
(
MENU_ID NUMBER ,
PARENT_ID NUMBER,
NAME VARCHAR2(50),
URL VARCHAR2(200),
PERMS VARCHAR2(500),
TYPE NUMBER,
ICON VARCHAR2(50),
ORDER_NUM NUMBER)
;
COMMENT ON TABLE SYS_MENU IS '˵Ŀ¼';
COMMENT ON COLUMN SYS_MENU.MENU_ID IS '';
COMMENT ON COLUMN SYS_MENU.PARENT_ID IS '';
COMMENT ON COLUMN SY... | true |
9db118bb930812db913a670629dbc898a78aa6f1 | SQL | sergiobelli/gecomp | /database/ddl/ddl_properties.sql | UTF-8 | 357 | 2.5625 | 3 | [] | no_license | -- --------------------------------------------------------
--
-- Struttura della tabella `properties`
--
CREATE TABLE IF NOT EXISTS `properties` (
`ID` int(11) unsigned NOT NULL AUTO_INCREMENT,
`CHIAVE` varchar(255) NOT NULL,
`VALORE` varchar(255) NOT NULL,
PRIMARY KEY (`ID`)
) ENGINE=MyISAM DEFA... | true |
7b708bb2ba40d77817ed8e9fe2ca25f699106037 | SQL | tomgiggs/helloPython | /bash/hive_sql_sample.sql | UTF-8 | 10,872 | 3.765625 | 4 | [] | no_license | Create [EXTERNAL] TABLE [IF NOT EXISTS] table_name
[(col_name data_type [COMMENT col_comment], ...)]
[COMMENT table_comment]
[PARTITIONED BY (col_name data_type [COMMENT col_comment], ...)]
[CLUSTERED BY (col_name, col_name, ...) [SORTED BY (col_name [ASC|DESC], ...)]INTO num_buckets BUCKETS]
[ROW FORMAT row_form... | true |
5bbf15af5e009175c3c57a55cb4786f0b40b2179 | SQL | Andrauss/springboot-angular-back | /src/main/resources/import.sql | UTF-8 | 3,902 | 3.125 | 3 | [] | no_license | /* Populate tabla clients */
INSERT INTO regions (id, name) VALUES (1, 'Sudamérica');
INSERT INTO regions (id, name) VALUES (2, 'Centroamérica');
INSERT INTO regions (id, name) VALUES (3, 'Norteamérica');
INSERT INTO regions (id, name) VALUES (4, 'Europa');
INSERT INTO regions (id, name) VALUES (5, 'Asia');
INSERT INT... | true |
9840f0e2981d1a65b477f930374102026ef90888 | SQL | kimbrow-slice/mysql_recipes | /some_queries.sql | UTF-8 | 771 | 4.125 | 4 | [] | no_license | /* get all the ingredients with names */
SELECT r.name AS 'Recipe', r.instructions, ri.amount AS 'Amount', mu.name AS 'Unit of Measure', i.name AS 'Ingredient'
FROM Recipe r
JOIN RecipeIngredient ri on r.id = ri.recipe_id
JOIN Ingredient i on i.id = ri.ingredient_id
LEFT OUTER JOIN Measure mu on mu.id = measure_id... | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.