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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
349a046fa1bbc59ada898aa92e706387cf7794ec | SQL | cloud4yourdata/CommunityEvents | /SQLDay/SQLDay2022/src/SynapseServerless/SQLDay2022DemoCETAS.sql | UTF-8 | 1,025 | 3.09375 | 3 | [] | no_license | SELECT * FROM vwFactSalesOrderDetail
-----------
DROP EXTERNAL TABLE FactSalesOrderDetail;
CREATE EXTERNAL TABLE FactSalesOrderDetail
WITH (
LOCATION = '/analytics_zone/DWHS/DWHDLTDemo/tables/ExtFactSalesOrderDetail/Version=1',
DATA_SOURCE = DataLake,
FILE_FORMAT = PARQUET_FORMAT
)
AS
SELECT * FROM vw... | true |
73b3e45fb595aa7a77a7b321633a9cf2ff5f4e14 | SQL | k13jolai/COEN-178-Intro-to-Databases | /labs_and_finalproject/lab3/part5.sql | UTF-8 | 144 | 3.125 | 3 | [] | no_license | SELECT empname, deptname
FROM l_dept NATURAL JOIN l_emp;
SELECT empname, deptname
FROM l_dept LEFT JOIN l_emp
ON l_dept.deptid=l_emp.deptid;
| true |
7b3ee63a9a74b85934db4450889af453468cb620 | SQL | nataliegroeneboom/mysql | /bowl.sql | UTF-8 | 2,418 | 4.28125 | 4 | [] | no_license |
CREATE TABLE bowl (Primary_key int not null auto_increment
, Fname varchar(100)
,Lname varchar(100)
,Game1 int null
,Game2 int null
,Game3 int null
,Game4 int null
, primary key (Primary_key));
INSERT INTO bowl (Fname, Lname, Game1, Game2, Game3, Game4) VALUES
('Natalie', 'Groeneboom', 10, 3, 4, 6)
,('Christina', 'Ho... | true |
b211e3b971a56eb2eb398ae6957cfe568e90ab55 | SQL | ValerieRobateau/Ed-Fi-Analytics-Middle-Tier | /src/EdFi.AnalyticsMiddleTier.DataStandard31/Base/MSSQL/0007-View-DateDim-Create.sql | UTF-8 | 1,175 | 3.578125 | 4 | [
"LicenseRef-scancode-warranty-disclaimer",
"Apache-2.0"
] | permissive | -- SPDX-License-Identifier: Apache-2.0
-- Licensed to the Ed-Fi Alliance under one or more agreements.
-- The Ed-Fi Alliance licenses this file to you under the Apache License, Version 2.0.
-- See the LICENSE and NOTICES files in the project root for more information.
CREATE VIEW [analytics].[DateDim] AS
WITH dates... | true |
c9a469f784544597ae50ccd390074333cd5d164b | SQL | everlyn-borges/banco-de-dados-lanchonete | /insercao_e_consulta_pedido_somativa1_Everlyn.sql | UTF-8 | 2,451 | 2.890625 | 3 | [] | no_license | -- Cadastrando cardápio
insert into lanchonete.cardapio (`nome`) values ("Eve Burguers");
-- Listando cardápio
select * from lanchonete.cardapio;
-- Cadastrando sanduíches
insert into lanchonete.sanduiche (`nome`, `preco`, `codigo_cardapio`) values ("Burguer Blumenau", 18.0, 1);
insert into lanchonete.sanduiche (`nom... | true |
6a660ef3450b94b11e8a51a694f7ff77143298a2 | SQL | jinniaflyer450/Jins-Unit-22.2-Exercises | /queries_products.sql | UTF-8 | 1,323 | 3.96875 | 4 | [] | no_license | -- Comments in SQL Start with dash-dash --
--1, 2, and 3: Inserts chair, stool, and table into products table in products_db
INSERT INTO products (name, price, can_be_returned)
VALUES ('chair', 44.00, false), ('stool', 25.99, true), ('table', 124.00, false);
--4: Display all rows and columns in table.
SELECT * FROM ... | true |
14eb7bea54d70733a77b0b6420e161f0d9f7a578 | SQL | bvez/kardexPucp | /ModeloBD/Dump20180522/a20151258_alm_producto_almacen.sql | UTF-8 | 2,535 | 3.015625 | 3 | [] | no_license | -- MySQL dump 10.13 Distrib 5.7.17, for Win64 (x86_64)
--
-- Host: 127.0.0.1 Database: a20151258
-- ------------------------------------------------------
-- Server version 5.5.5-10.1.31-MariaDB
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SE... | true |
c301a4bcbaa22af1c5835478e4b07dedf7504add | SQL | msvarovsky/PDMSCore | /SQL-StoredProcedures.sql | UTF-8 | 1,384 | 3.8125 | 4 | [] | no_license |
-----------------------------------------------------
GetPanelFromID 1, 1, 'cs'
ALTER PROCEDURE GetPanelFromID
@PanelID int,
@CompanyID int,
@LanguageID varchar(5)
AS
BEGIN
SELECT distinct pg.PageID, pg.URL, lb.Label, lb.CompanyID
FROM Pages pg
LEFT outer join Labels lb ON pg.LabelID = lb.LabelID
WHER... | true |
abeec13309f15ad0195a273436b8894c3ee6cd14 | SQL | school-days/pandora | /scripts/create-table.sql | UTF-8 | 2,508 | 3.3125 | 3 | [
"Apache-2.0"
] | permissive | CREATE EXTERNAL TABLE IF NOT EXISTS default.qun_info (
qunnum bigint,
mastqq bigint,
createdate string,
title string,
quntext string
)
PARTITIONED BY (
class string
)
ROW FORMAT DELIMITED
FIELDS TERMINATED BY '\t'
STORED AS INPUTFORMAT
'org.apache.hadoop.mapred.TextInputFormat'
OUTPUTFORMAT
'org.apa... | true |
ffeee31301f86576a63fb26734fb36760a5c82ad | SQL | jackofdiamond5/Software-University | /C# DB Fundamentals/DB Basics - T-SQL/6. Joins, Subqueries, CTE and Indices/15. Continents and Currencies.sql | UTF-8 | 575 | 4.53125 | 5 | [
"MIT"
] | permissive | WITH CTE_CountriesAndCurrencies AS (
SELECT
ContinentCode,
CurrencyCode,
COUNT(CountryCode) AS CurrencyUsage
FROM Countries
GROUP BY ContinentCode, CurrencyCode
HAVING COUNT(CountryCode) > 1
)
SELECT
cac.ContinentCode,
cac.CurrencyCode,
MaxCurUsage AS CurrencyUsage
FROM (
SELECT
ContinentCode,
MAX(C... | true |
467c2b198cbf04feff254146c0d16f381ba4155c | SQL | ywjno/lineage-cn-jrwz | /db/l1jdb/character_teleport.sql | WINDOWS-1252 | 816 | 2.703125 | 3 | [] | no_license | /*
MySQL Data Transfer
Source Host: localhost
Source Database: l1jdb
Target Host: localhost
Target Database: l1jdb
Date: 2011-12-19 06:28:11
*/
SET FOREIGN_KEY_CHECKS=0;
-- ----------------------------
-- Table structure for character_teleport
-- ----------------------------
CREATE TABLE `character_telep... | true |
fec6e8c5b556461ceb42b60d7a7de93fb0b6e943 | SQL | ChristopherConnolly/Databases-Practical-Project | /census16prelim.sql | ISO-8859-1 | 298,374 | 2.71875 | 3 | [] | no_license | DROP DATABASE IF EXISTS census16prelim;
CREATE DATABASE IF NOT EXISTS census16prelim;
USE census16prelim;
DROP TABLE IF EXISTS population;
CREATE TABLE population (
id INTEGER AUTO_INCREMENT NOT NULL PRIMARY KEY,
electoraldistrict VARCHAR(128) NOT NULL,
county VARCHAR(32) NOT NULL,
pop2002 INTEGER NOT NULL,
pop... | true |
0aa76531040d74123d7aa8d1455d71a32119ec1b | SQL | ArshadAQ/Social-Network-Analysis | /Analysis/dbconstraints.cql | UTF-8 | 621 | 2.78125 | 3 | [] | no_license | CREATE CONSTRAINT ON ( follower:Follower ) ASSERT follower.id IS UNIQUE
CREATE CONSTRAINT ON ( follower:Follower ) ASSERT follower.screen_name IS UNIQUE
CREATE CONSTRAINT ON ( member:Member ) ASSERT member.id IS UNIQUE
CREATE CONSTRAINT ON ( member:Member ) ASSERT member.screen_name IS UNIQUE
CREATE CONSTRAINT ON (... | true |
d7f7ec6829de214aaafeff65e0496832c504f964 | SQL | PlusOneToX/MiPlus | /mysql/misql.sql | UTF-8 | 836 | 2.9375 | 3 | [] | no_license | #客户端连接服务器端使用的编码是UTF8
SET NAMES UTF8;
#丢弃数据库xz
DROP DATABASE IF EXISTS mi;
#创建数据库xz并设置存储的编码为UTF8
CREATE DATABASE mi CHARSET=UTF8;
#进入数据库xz
USE mi;
#创建保存用户数据的表miuser并添加字段及其字段类型
CREATE TABLE miuser(
miid INT PRIMARY KEY AUTO_INCREMENT,
miname VARCHAR(50),
mipwd VARCHAR(50),
miemail VARCHAR(50),
miphone VARCHAR(30)
);... | true |
2a2c20c48f4d61312be07c8f012201ccba542c64 | SQL | ggjacob/oncoclinicas-agenda | /agenda.sql | UTF-8 | 3,002 | 3.0625 | 3 | [] | no_license | -- MySQL dump 10.13 Distrib 5.6.13, for osx10.6 (i386)
--
-- Host: localhost Database: agenda
-- ------------------------------------------------------
-- Server version 5.6.13-log
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
... | true |
1a96cfd2b4197ac770ce6a4105b588b44a235952 | SQL | farbod2u/human-resource-service | /src/test/resources/Person.sql | UTF-8 | 701 | 2.5625 | 3 | [] | no_license | -- INSERT INTO schoolgrade (id_key, name) VALUES(1, 'first');
-- INSERT INTO schoolgrade (id_key, name) VALUES(2, 'second');
-- INSERT INTO schoolgrade (id_key, name) VALUES(3, 'third');
-- INSERT INTO schoolgrade (id_key, name) VALUES(4, 'fourth');
insert into person (id_key, first_name, last_name, id_number)
values ... | true |
70edfdac92b9d3539a77459797f71778dd93c1c8 | SQL | InfoHome/SuporteMU | /Scripts/Listar Impressoras a ser utilizada para emissão da DANFE.sql | ISO-8859-1 | 638 | 2.953125 | 3 | [] | no_license | -- Impressora a ser utilizada para emisso da DANFE
---------------------------------------------------------------------------
select
distinct u.nome,a.svalor
from historiconfe h
join USUARIO_R u on h.USUARIO = u.OID
left join ADITIVO a on u.oid = a.RITEM and a.RDEFINICAO = 33324
where h.dataprocessamento > ='20... | true |
069e66da0f00993068000ccce7abc9c05ca07176 | SQL | sm-valery/gTravel | /SQLQuery1.sql | UTF-8 | 696 | 3.828125 | 4 | [] | no_license | select ag.AgentId, ag.Name, count(*) sold,
sum(cr.InsPrem) Prem,
sum(cr.InsPremRur) PremRur,
sum(ca.insprem) comm,
sum(ca.inspremrur) commrur,
count(case st.code
when 'annul' then 1 end) annul_count,
sum(case st.code when 'annul' then cr.InsPremRur end) annul_sum ,
sum(case st.code when 'annul' then ca.inspremrur end)... | true |
579459de6b8bb22b23b06193c180bed75b0198d0 | SQL | tgenman/internet_shop | /shop-core/src/main/resources/db/migration/V1__Init_DB.sql | UTF-8 | 4,606 | 3.28125 | 3 | [] | no_license | create table category(
id bigint not null auto_increment,
category_name varchar(255),
primary key (id)
) engine=InnoDB;
create table product (
id bigint not null auto_increment,
active bit not null,
title varchar(255),
brand varchar(255),
category_id bigint,
price integer not null,
... | true |
1f3f6c020fd9d48111169fcb3b74168bbfe68fd5 | SQL | DenisKP/geekden | /HW7BD.sql | UTF-8 | 2,355 | 4.25 | 4 | [] | no_license | -- 1
USE VK;
DROP TABLE IF EXISTS users_orders;
CREATE TABLE IF NOT EXISTS users_orders (
user_id SERIAL PRIMARY KEY,
name VARCHAR(255) NOT NULL,
order_id INT
);
DROP TABLE IF EXISTS orders;
CREATE TABLE IF NOT EXISTS orders (
order_id SERIAL PRIMARY KEY,
product_id INT NOT NULL,
product_name VARCH... | true |
5926cbc349e896022d2bd729c7f0041ef27fe2cb | SQL | ChFaizan009/OOP-PROJECTS | /DSA_PROJECT/SQL ServerQuery/Compoiste key.sql | UTF-8 | 136 | 2.625 | 3 | [] | no_license | use Lab;
create table books(
Isbn varchar(100),
title varchar(150),
author varchar(200),
constraint pk_Name PRIMARY KEY (Isbn,title)
);
| true |
18ada2a3eebd1e907332707d77a0f6cb9eab8b0b | SQL | yanmu913/githubfile | /StuInfo-parent/sql/StuInfo.sql | UTF-8 | 1,177 | 3.625 | 4 | [] | no_license | DROP DATABASE IF EXISTS info;
CREATE DATABASE info DEFAULT CHARACTER SET utf8;;
USE info;
DROP TABLE IF EXISTS student;
CREATE TABLE student(
s_id INT(10) PRIMARY KEY AUTO_INCREMENT COMMENT'学生id',
s_name VARCHAR(255) NOT NULL COMMENT'学生姓名',
s_birthday DATETIME NOT NULL COMMENT'学生生日',
s_gender VARCHAR(255)... | true |
e65ee3b917b995c7fae960e58ffbb74ac3104876 | SQL | cb-raghu/Training-Exercises | /SQLQueries/training4.sql | UTF-8 | 1,908 | 4.1875 | 4 | [] | no_license | 1. select cust.id,cust.handle,cust.first_name from
customers cust
inner join subscriptions sub on cust.id = sub.customer_id
group by sub.customer_id
having count(sub.customer_id) > 1
3. select sub.id,handle, ad.code
from subscriptions sub
inner join subscriptions_addons sub_adon on sub.id = sub_adon.subscription_id... | true |
cab41bb257ae5154adbf3861e540da0c4dfa05b8 | SQL | deva7mad/TakiemF | /Database/takieidl_takiem.sql | UTF-8 | 84,358 | 3.28125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.8.3
-- https://www.phpmyadmin.net/
--
-- Host: localhost:3306
-- Generation Time: Apr 24, 2019 at 11:01 AM
-- Server version: 5.6.41-84.1-log
-- PHP Version: 7.2.7
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET... | true |
69168f95b3bdd26170c1a5b0af18e55ec7ff5008 | SQL | ninetysec/laravel-foodxl | /sql/2018-09-10.sql | UTF-8 | 14,299 | 3 | 3 | [
"MIT"
] | permissive | -- phpMyAdmin SQL Dump
-- version 4.8.0
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Generation Time: 2018-05-21 10:40:21
-- 服务器版本: 5.7.21-log
-- PHP Version: 7.1.5
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIE... | true |
bb55d0f74a9c1a12f8a5a38d35f67a1f8def255c | SQL | Enterprise-System-Management-Solutions/Analytics | /dwhnode02/database/procedures/R_MKT_ZONE_WISE_VOICE_DATA_USAGE_NEW.sql | UTF-8 | 820 | 3.015625 | 3 | [] | no_license | --
-- R_MKT_ZONE_WISE_VOICE_DATA_USAGE_NEW (Procedure)
--
CREATE OR REPLACE PROCEDURE DWH_USER.R_MKT_ZONE_WISE_VOICE_DATA_USAGE_NEW IS
VDATE_KEY NUMBER;
BEGIN
SELECT DATE_KEY INTO VDATE_KEY
FROM DATE_DIM WHERE TO_CHAR(DATE_VALUE,'RRRRMMDD')=TO_CHAR(SYSDATE-1,'RRRRMMDD');
--EXECUTE IMMEDIATE 'TRUNCA... | true |
2704cae25daaae29523139550a6383fe4f268bae | SQL | dkhakha9/DealerTracker | /dealerDDL.sql | UTF-8 | 28,033 | 3.6875 | 4 | [] | no_license | /*==============================================================*/
/* DDL */
/*==============================================================*/
/* DEALERWEB DROP */
alter table DEALERWEB
drop constraint PK_DEALERWEB;
alter table DEALERWEB
dr... | true |
f328482c852d9feffd9147349311c2f6e2a6341e | SQL | jpomfret/demos | /DataCompression/01_Page_Internals_ObjectSizeAndCompression.sql | UTF-8 | 777 | 3.703125 | 4 | [] | no_license | Use CompressTest
SELECT
schema_name(obj.SCHEMA_ID) as SchemaName,
obj.name as TableName,
ind.name as IndexName,
ind.type_desc as IndexType,
pas.row_count as NumberOfRows,
pas.used_page_count as UsedPageCount,
(pas.used_page_count * 8)/1024 as SizeUsedMB,
par.data_compression_desc as DataCompression,
(pas.rese... | true |
be1eb738bfc2f461785455d5aafb04ba34f559d3 | SQL | lisasce/LMSCF-LisaScelli-CodeReview-09 | /cr09_lisa_scelli_delivery.sql | UTF-8 | 14,861 | 3.28125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 5.0.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Mar 14, 2020 at 03:58 PM
-- Server version: 10.4.11-MariaDB
-- PHP Version: 7.4.3
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD... | true |
31324f7d99379d29785751c598a0ad3f05b9f951 | SQL | hayyuelha/IF3110-01-Simple-Blog | /simpleblog.sql | UTF-8 | 2,114 | 2.953125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.0.4.1
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Oct 14, 2014 at 09:40 PM
-- Server version: 5.5.32
-- PHP Version: 5.4.16
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */... | true |
5ef39ddd16799890a3841bc415d8c8306772fe9e | SQL | ASCIT/donut | /sql/donut.sql | UTF-8 | 8,460 | 3.59375 | 4 | [
"MIT"
] | permissive | -- TODO: Add CASCADEs
-- TODO: Better comments
DROP TABLE IF EXISTS news;
DROP VIEW IF EXISTS current_position_holders;
DROP VIEW IF EXISTS current_direct_position_holders;
DROP TABLE IF EXISTS position_relations;
DROP VIEW IF EXISTS house_positions;
DROP VIEW IF EXISTS house_groups;
DROP TABLE IF EXISTS position_hold... | true |
0491069ba31355111bc793dd1a8d56f53f5a3685 | SQL | kentwang/CassandraToy | /cql/problem.cql | UTF-8 | 359 | 3.703125 | 4 | [] | no_license | -- problem 1
SELECT votes FROM movies WHERE title = 'The Matrix (1999)';
-- problem 2 (Very complicated) Create multiple table and join
SELECT title FROM movies WHERE rank < 8.3 AND votes >= 400000;
-- problem 3
SELECT COUNT(*) FROM movies WHERE rank = 8.9 ALLOW FILTERING;
-- problem 4 (Very Complicated) Create Join
CR... | true |
c77033522c32552e0ef459e3247ffa3af0fd279c | SQL | RobPajor/WPostBoard-git-test | /schema.sql | UTF-8 | 735 | 3.671875 | 4 | [] | no_license | DROP TABLE IF EXISTS user;
DROP TABLE IF EXISTS post;
CREATE TABLE User (
id INTEGER PRIMARY KEY AUTOINCREMENT,
username TEXT UNIQUE NOT NULL,
bio TEXT,
password TEXT NOT NULL,
joindate TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
avatar_id INTEGER DEFAULT = 1
);
CREATE TABLE post (
id INTEGER PRIMARY KEY AUTOINCREM... | true |
f7500e402384b28738c8b173a8663c1bd302e137 | SQL | maronfranc/rust-sqlx-grpc-nestjs | /rust_server_grpc/migrations/000_create_users.sql | UTF-8 | 307 | 3.234375 | 3 | [
"MIT"
] | permissive | CREATE TABLE IF NOT EXISTS users (
id SERIAL PRIMARY KEY,
email VARCHAR NOT NULL CONSTRAINT unique_email_constraint UNIQUE,
username VARCHAR NOT NULL CONSTRAINT unique_username_constraint UNIQUE,
password VARCHAR NOT NULL,
id_person SERIAL REFERENCES users(id)
);
| true |
d3a435fec7d3cf84839ea7e4fa2d45ca68e6b535 | SQL | nirooj56/opencart-News-Event | /install.sql | UTF-8 | 1,035 | 3.15625 | 3 | [
"MIT"
] | permissive | CREATE TABLE IF NOT EXISTS `oc_cyco_news_article` (
`article_id` INT(11) NOT NULL AUTO_INCREMENT,
`sort_order` INT(11) NOT NULL DEFAULT '0',
`status` TINYINT(1) NOT NULL DEFAULT '0',
`date_modified` DATETIME NOT NULL,
`viewed` INT(5) NOT NULL DEFAULT '0',
... | true |
d5fb8f9c23e54efe3b3693b81959174ac23f15ec | SQL | Sheridan/workflow | /sql/task_зкщпкуыы_view.sql | UTF-8 | 303 | 3.5 | 4 | [] | no_license | CREATE OR REPLACE VIEW task_progress
as
select
now() > tasks.control_timestamp as overtime_control_time,
tasks.id as task_id,
cast(EXTRACT(EPOCH FROM age(tasks.control_timestamp, tasks.start_timestamp)) as int),
cast(EXTRACT(EPOCH FROM age(now(), tasks.start_timestamp)) as int)
from tasks | true |
cedae888e3b5f83261f30b95b1f4d0562b74188e | SQL | Martin1987/myTestCode | /Pro_Oracle_SQL/chapter05_scripts/lst-05-02.sql | UTF-8 | 229 | 3.296875 | 3 | [] | no_license | /* Listing 5-2 */
select employee_id, count(*) job_ct
from
(
select e.employee_id, e.job_id
from employees e
union all
select j.employee_id, j.job_id
from job_history j
)
group by employee_id
having count(*) > 1;
| true |
db773e0407a00f00e19869899f767c471d19a772 | SQL | Jilroge7/holbertonschool-web_back_end | /0x0C-MySQL_Advanced/3-glam_rock.sql | UTF-8 | 219 | 3.28125 | 3 | [] | no_license | -- lists all bands with glam rock as main style,
-- ranked by their longevity
SELECT band_name AS band_name, ifnull(split, 2020)-formed AS lifespan FROM metal_bands WHERE style LIKE '%Glam rock%' ORDER BY lifespan DESC; | true |
4d1b28af79bed3591923b216626c1712c42ec5e8 | SQL | amojohn/ETL | /07_BI_DEPLOY/2_DW/TABLES/DW_STR_STOCKDEPART.sql | UTF-8 | 6,730 | 2.71875 | 3 | [] | no_license | DROP TABLE IF EXISTS DW.DW_STR_STOCKDEPART;
CREATE TABLE IF NOT EXISTS DW.DW_STR_STOCKDEPART(
PERIOD_WID BIGINT COMMENT '日期维ID(到达日)',
SEQNO BIGINT COMMENT '序号',
PROCDATE STRING ... | true |
74c9c6ef024726a92faddc57781c7934cc135994 | SQL | VizualAbstract/NostalgiaEQ-Database | /character_expedition_lockouts.sql | UTF-8 | 1,765 | 2.96875 | 3 | [] | no_license | -- --------------------------------------------------------
-- Host: 127.0.0.1
-- Server version: 10.0.21-MariaDB - mariadb.org binary distribution
-- Server OS: Win64
-- HeidiSQL Version: 11.3.0.6295
-- -----------------------------------------------... | true |
79b08b8d33412fd002d4371b520d1e3817861e44 | SQL | pm11prince/App-Repo | /V1__change.sql | UTF-8 | 610 | 3.046875 | 3 | [] | no_license | -- -----------------------------------------------------
-- Create 2 tables people and states
-- -----------------------------------------------------
create table people (
person_id int not null auto_increment primary key,
first_name varchar(20),
last_name varchar(20),
phone_number ... | true |
bd930b17606641a05358cb49752c341f290df9b8 | SQL | silence-do-good/stress-test-Postgres-and-MySQL | /dump/low/day24/select0030.sql | UTF-8 | 178 | 2.625 | 3 | [] | no_license |
SELECT timeStamp, temperature FROM ThermometerOBSERVATION o
WHERE timestamp>'2017-11-23T00:30:00Z' AND timestamp<'2017-11-24T00:30:00Z' AND temperature>=31 AND temperature<=51
| true |
80c90e8a1e8a90f5ae40dc8b4cf66d062cb41afa | SQL | waroyhz/mhjServer | /MHJServerSharedMySql/database/migration/MHJDatabase-006-pre.sql | UTF-8 | 929 | 3.109375 | 3 | [] | no_license | /* This file was generated by ODB, object-relational mapping (ORM)
* compiler for C++.
*/
ALTER TABLE `user_entity`
ADD COLUMN `UserTitle` LONGTEXT NULL;
CREATE TABLE `MHJDeviceChild` (
`id` BIGINT UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT,
`device` BIGINT UNSIGNED NOT NULL,
`keyID` BIGINT UNSIGNED NOT N... | true |
566feb169e3c1aa7fceb35028274327455d184e4 | SQL | xapegr/ajax-4.1 | /Company.sql | UTF-8 | 3,905 | 3.0625 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.6.4deb1
-- https://www.phpmyadmin.net/
--
-- Host: localhost:3306
-- Generation Time: Apr 21, 2017 at 09:12 AM
-- Server version: 5.7.17-0ubuntu0.16.10.1
-- PHP Version: 7.0.15-0ubuntu0.16.10.4
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
--
-- Database: `comp... | true |
b77dac318a5326f004636e3176c7e66a5aa775f5 | SQL | Sligowebworks/ferret | /SQL/QUERY_hispanic_survey_keys.sql | UTF-8 | 497 | 3.65625 | 4 | [] | no_license |
SELECT g.ID, Q2_text, Q1_radio, Q1_Other , flagged.flag as `Spanish Lang. Interview`
FROM
guardian_concatenated g
LEFT JOIN
(SELECT ID, 1 as flag FROM guardian_concatenated WHERE ID IN (235, 279, 280, 282, 283, 286, 287, 288, 289, 290) ) flagged
on g.ID = flagged.ID
WHERE
Q1_radio = 'HISPANIC AMERICAN'
OR
( ... | true |
2383415f638bd86744ec3578c4b4aa5d3e0a79c4 | SQL | ahSOLO/BootcampX | /4_queries/9_cohort_average_assistance_duration.sql | UTF-8 | 306 | 3.90625 | 4 | [] | no_license | SELECT AVG(total_duration) as average_total_duration
FROM (
SELECT SUM(completed_at - started_at) as total_duration
FROM cohorts
JOIN students ON cohorts.id = cohort_id
JOIN assistance_requests ON students.id = student_id
GROUP BY cohorts.name
ORDER BY total_duration
) AS total_duration_table; | true |
697ee44d4b918132b537aba766696852ec98457e | SQL | GabrielAbdul/holbertonschool-higher_level_programming | /0x0E-SQL_more_queries/15-comedy_only.sql | UTF-8 | 181 | 3.53125 | 4 | [] | no_license | -- script
SELECT ts.title FROM tv_shows ts LEFT JOIN tv_show_genres tsg ON ts.id=tsg.show_id LEFT JOIN tv_genres tg ON tg.id=tsg.genre_id WHERE name='Comedy' ORDER BY ts.title ASC;
| true |
bcad6a5a0da72478837ee9a977fea28e4caa1996 | SQL | andresfborrero/Sistema_SolicitudesTelefonia | /ArchivosSQL/Paquetes Nivel 1/pkSolicitud.sql | UTF-8 | 2,968 | 3.453125 | 3 | [] | no_license | --Paquete tabla SOLICITUD
CREATE OR REPLACE PACKAGE pkSolicitud AS
PROCEDURE pInsertar(ivId IN NUMBER, ivEstado IN VARCHAR2, ivObservacion IN VARCHAR2, ivFechaInicio IN DATE, ivFechaFin IN DATE, ivProducto_Id IN NUMBER, ivTipoProducto_Id IN NUMBER, ivTipoAnomalia_Id IN NUMBER, ivFuncionario_Cedula IN VARCHAR2, ivTipo... | true |
db2f4247edcbc39d9bb73fa6382ea88ba3f3d595 | SQL | WilliamRayJohnson/kanjiStudyTool | /sql/statQueries/SELECT_ALL_KANJI_WITH_ALL_WORDS_AND_READINGS.sql | UTF-8 | 172 | 3.53125 | 4 | [
"MIT"
] | permissive | SELECT k.kanji, w.word, w.reading
FROM kanji k
LEFT JOIN kanji_in_word kiw ON k.id = kiw.kanji_id
LEFT JOIN word w ON kiw.word_id = w.id
ORDER BY k.id desc; | true |
0d3913240d30a26c2f4ff623d9abbcf507948790 | SQL | SeaAroundUs/web-database | /view_cmsy.sql | UTF-8 | 7,771 | 3.8125 | 4 | [] | no_license | --New views for cmsy
--M.Nevado
--10.8.2020
--v_biomass_window
CREATE OR REPLACE VIEW cmsy.v_biomass_window
AS WITH mini(stock_description, year, biomass_window) AS (
SELECT b.stock_description,
b.year,
min(b.biomass_window) AS bw_lower
FROM cmsy.raw_biomass_window b
... | true |
d0125d75027df6ffd99a3b70511b2c0b68b4aafb | SQL | Syed47/sql-labs | /lab3.sql | UTF-8 | 1,203 | 3.21875 | 3 | [] | no_license | SELECT COUNT(*) FROM public.cs130lab3 WHERE custname SIMILAR TO '% M______';
SELECT COUNT(booktitle) FROM public.cs130lab3 WHERE bookpages % 2 = 0 AND bookpages >= 100 AND bookpages <= 200;
SELECT COUNT(bookisbn) FROM public.cs130lab3 WHERE bookisbn SIMILAR TO '(0|7)%' AND bookisbn SIMILAR TO '%-(0|7)';
SELECT COUNT(bo... | true |
32226a74e8d38f80e4bbb653ea1e141058642ca0 | SQL | CUBRID/cubrid-testcases | /sql/_19_apricot/_04_multi-table_update/cases/virtual_class_02.sql | UTF-8 | 1,343 | 3.328125 | 3 | [
"BSD-3-Clause"
] | permissive | set system parameters 'create_table_reuseoid=no';
--CLIENT
create table t1(i int);
insert into t1 values (1), (2), (3), (4), (5);
create table t2(i int);
insert into t2 values (1), (2), (3), (4), (5);
create table t3(i int, j int);
insert into t3 values (1, 1), (2, 2), (3, 3), (4, 4), (5, 5);
create view v1 as selec... | true |
b0075bd37d8e6d94b4b893dd2336e3306e8d4338 | SQL | yurgenMU/InformationalSystem | /src/main/resources/init.sql | UTF-8 | 2,385 | 3.625 | 4 | [] | no_license | CREATE DATABASE IF NOT EXISTS MOBILEOPERATOR
DEFAULT CHARACTER SET utf8
DEFAULT COLLATE utf8_general_ci;
USE MOBILEOPERATOR;
CREATE TABLE IF NOT EXISTS Tariffs (
id INT NOT NULL AUTO_INCREMENT,
name VARCHAR(100) NOT NULL UNIQUE,
price INT NOT NULL,
PRIMARY KEY (Id)
)
ENGINE = InnoDB;
CREATE... | true |
308959858471f216140f3cfcc797f1947ff7a3fa | SQL | kingsoff/mvc_crud | /crud.sql | UTF-8 | 1,646 | 2.984375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.9.0.1
-- https://www.phpmyadmin.net/
--
-- Хост: 127.0.0.1:3306
-- Время создания: Окт 18 2019 г., 19:14
-- Версия сервера: 5.6.43
-- Версия PHP: 7.0.33
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARA... | true |
b67a143beff4b6973292bbd219d03e11e1eba0e6 | SQL | samdlcong/MVC_INSTANCE_CMS | /dbcreate.sql | UTF-8 | 457 | 2.96875 | 3 | [] | no_license | create table if not exists news(
id int not null auto_increment key,
title char(50) not null,
author varchar(20) not null,
`from` varchar(20) not null,
content text not null,
dateline int not null default 0
);
create table if not exists user(
id int(11) not null auto_increment key,
username varchar(50) not nul... | true |
517782d9701313aa5266d01b1f6352e758f49165 | SQL | tahmid200/cmpt391V2 | /CMPT391Database/CMPT391Database/dbo/Scripts/AssignDeptHead.sql | UTF-8 | 149 | 2.875 | 3 | [] | no_license | UPDATE department
SET department.dept_head = (
SELECT TOP 1 id
FROM instructor
WHERE instructor.dept = department.dept_name
ORDER BY NEWID()); | true |
2658d6233e43b273c1263f418f9eea3c69662044 | SQL | aspineonxyz/java-leetcode | /src/main/java/com/github/chen0040/leetcode/day01/easy/BigCountries.sql | UTF-8 | 349 | 3.4375 | 3 | [
"MIT"
] | permissive | -- A country is big if it has an area of bigger than 3 million square km or a population of more than 25 million.
-- Write a SQL solution to output big countries' name, population and area.
-- link: https://leetcode.com/problems/big-countries/tabs/description
select name, population, area from World where area >= 30000... | true |
268b8c5228df1bc70aa4d367adab34bc51ad6ebf | SQL | Maur025/Facial_Recognition_System_c_sharp | /db_reconocimiento.sql | UTF-8 | 2,728 | 3.015625 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.8.5
-- https://www.phpmyadmin.net/
--
-- Servidor: 127.0.0.1
-- Tiempo de generación: 04-11-2019 a las 00:08:46
-- Versión del servidor: 10.1.39-MariaDB
-- Versión de PHP: 7.3.5
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
... | true |
502bf3047216f7eb0b09dc51cd33208c6284520b | SQL | hyunsooDii/TIL_Source | /mariadb/chapter07_exam.sql | UTF-8 | 249 | 3.9375 | 4 | [] | no_license | USE employees;
SELECT U.first_name, DP.dept_name, D.from_date, D.to_date FROM employees U
INNER JOIN dept_emp D
ON U.emp_no = D.emp_no
INNER JOIN departments DP
ON DP.dept_no = D.dept_no
WHERE D.to_date = '9999-01-01'
ORDER BY U.first_name
| true |
571240c6e91af3c2fabcf01289b8f5dd580a5ce1 | SQL | gaurav46/Kylin | /query/src/test/resources/query/sql/query71.sql | UTF-8 | 341 | 2.90625 | 3 | [
"Apache-2.0"
] | permissive | select lstg_format_name,
sum(price) as GMV,
count(1) as TRANS_CNT
from test_kylin_fact
where "TEST_KYLIN_FACT"."LSTG_FORMAT_NAME" in ('Auction', 'ABIN') and (CASE WHEN ("TEST_KYLIN_FACT"."LSTG_FORMAT_NAME" IN ('Auction', 'FP-GTC')) THEN 'Auction' ELSE "TEST_KYLIN_FACT"."LSTG_FORMAT_NAME" END) = 'Auction'
group... | true |
38b0c7f1902bf29b0fe9b3ecca3cfa71b13ef955 | SQL | jwstyler/nicerdicer | /filmverwaltung/SQL/PlayQuery.sql | UTF-8 | 548 | 3.421875 | 3 | [] | no_license | use filmverwaltung;
select *
from filmtitel
order by launchDate;
select
ft.filmtitel
,date_format(ft.launchDate, '%d.%m.%Y') as launchDate
-- ,ft.launchDate
,fs.filmstudio
from filmstudio fs
join filmtitel ft on ft.idFilmstudio = fs.idFilmstudio
where fs.filmstudio like '%%'
order by ft.lau... | true |
e4c40d974d06683d9adae6f98d46caf67a7458a7 | SQL | fouedbrahim/Hope-and-care-Cancer-association | /gfp (1).sql | UTF-8 | 5,268 | 3.328125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 3.5.1
-- http://www.phpmyadmin.net
--
-- Client: localhost
-- Généré le: Mar 08 Avril 2014 à 16:14
-- Version du serveur: 5.5.24-log
-- Version de PHP: 5.3.13
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIEN... | true |
c485d24019585d9b0770611394c58db0f84ebb1b | SQL | Luckyrk/DBO | /dbo/Views/FullPanellist.sql | UTF-8 | 795 | 3.546875 | 4 | [] | no_license | Create View FullPanellist
As
SELECT
c.CountryISO2A
,d.PanelCode
,d.Name as PanelName
,d.Type
,e.Sequence as GroupId
,f.IndividualId
,b.Code as IncentiveCode
,b.Description as IncentiveDescription
,g.Code as StateCode
,h.Code... | true |
66b12c0893001d06963a0b0b9b1d91378eaa9a9d | SQL | adwaitasathe/Leetcode | /Database/Medium/1193. Monthly Transactions I.sql | UTF-8 | 369 | 3.78125 | 4 | [] | no_license | select format(trans_date , 'yyyy-MM') as month,
country,
count(*) as trans_count,
sum(case when state = 'approved' then 1 else 0 end ) as approved_count,
sum(amount) as trans_total_amount,
sum(case when state = 'approved' then amount else 0 end ) as approved_total_amount
from transactions
g... | true |
166c3bc32857bc080d292b5746a82e0b8b607ef4 | SQL | gaufung/Leetcode-solutions | /Algorithm/175.组合两个表.sql | UTF-8 | 1,435 | 3.34375 | 3 | [
"MIT"
] | permissive | --
-- @lc app=leetcode.cn id=175 lang=mysql
--
-- [175] 组合两个表
--
-- https://leetcode-cn.com/problems/combine-two-tables/description/
--
-- database
-- Easy (68.41%)
-- Likes: 370
-- Dislikes: 0
-- Total Accepted: 45.2K
-- Total Submissions: 66K
-- Testcase Example: '{"headers": {"Person": ["PersonId", "LastName"... | true |
f3bacf5a180b17b251dacb2444cb50bed833faf9 | SQL | tkreienbuehl/Forrest_Game | /DatabaseScript.sql | UTF-8 | 3,535 | 3.359375 | 3 | [] | no_license | -- MySQL Script generated by MySQL Workbench
-- Thu Aug 17 14:32:35 2017
-- Model: New Model Version: 1.0
-- 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='TR... | true |
9192e6770802f46b3742d3d9ce358f88e2547b20 | SQL | Cristiane-Pereira/Projeto-Ecommerce-React.js | /src/Join/Join.sql | UTF-8 | 3,509 | 3.09375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1:3306
-- Tempo de geração: 03-Dez-2020 às 16:51
-- Versão do servidor: 8.0.21
-- versão do PHP: 7.3.21
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIEN... | true |
56c681397bb38a80f66f49a25e1a602cd79690ec | SQL | ektha4903/oraclesource | /hr.sql | UHC | 12,770 | 4.34375 | 4 | [] | no_license | -- hr ִ ̺ Ȯ
select * from tab;
--employees ̺ Ȯ
select * from employees;
--employees ̺ first_name,last_name,j0b_id ȸ
select first_name,last_name,job_id from employees;
--ȣ 176 LAST_NAME μȣ ȸѴ
select last_name,department_id from employees where employee_id=176;
-- 12000 ̻Ǵ LAST_NAME ȸѴ.
select last_name,salary f... | true |
9759d9df17542da5ae6317a8f9dcdf24a5b05b0e | SQL | Rachel-Ba/SQL-LDD-FILM | /ExerciceFilmLDD.sql | UTF-8 | 1,383 | 4.0625 | 4 | [] | no_license | CREATE DATABASE IF NOT EXISTS `film` /*!40100 DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci */;
USE `film`;
DROP TABLE IF EXISTS `film`;
CREATE TABLE `film` (
`ident_film` int(10) DEFAULT NULL,
`titre` varchar(10) DEFAULT NULL,
`genre1` varchar(10) DEFAULT NULL,
`recette` int(10) DEFAULT NULL,
`da... | true |
b0a4131eb6e734edf786643456153fbe1221d7a5 | SQL | regap4693/PostgresSQL | /Problem 1/Solution.sql | UTF-8 | 9,432 | 4.21875 | 4 | [] | no_license | create database rrp;
\c rrp
\qecho 'Question 1'
create database assignment1;
\c assignment1
create table Sailor (Sid INTEGER Primary key,Sname varchar(200),Rating integer,Age integer);
create table Boat (Bid integer primary key,Bname varchar(200),Color varchar(200));
create table Reserves(Sid integer,Bid intege... | true |
0a91611d981ce2d193d8f64470778feb05490788 | SQL | marcosd94/trabajo | /pases/111/02_create_Vencimientos.sql | UTF-8 | 620 | 3.09375 | 3 | [] | no_license | -- Table: remuneracion.vencimientos
-- DROP TABLE remuneracion.vencimientos;
CREATE TABLE remuneracion.vencimientos
(
id_vencimiento bigserial NOT NULL,
anho integer,
mes integer,
vencimiento timestamp without time zone NOT NULL,
prorroga timestamp without time zone,
activo boolean NOT NULL,
usu_alta ch... | true |
68cdad696554844a0a96679933f7af47964ea987 | SQL | bhumo/StyleTwo | /db/tables.sql | UTF-8 | 377 | 3.203125 | 3 | [] | no_license | create table city
(
code int primary key generated always as identity (start with 1,increment by 1),
name char(50) not null unique
) ;
create table student
(
roll_number int primary key,
name char(50) not null,
address varchar(300) not null,
city_code int not null,
gender char(1) not null,
ind... | true |
72892b87ba1616aef4932b5c99f6d2078dbd9eae | SQL | cwedwards9/company-management-system | /db/schema.sql | UTF-8 | 721 | 3.734375 | 4 | [
"MIT"
] | permissive | DROP DATABASE IF EXISTS company;
CREATE DATABASE company;
USE company;
CREATE TABLE department (
dept_id INT AUTO_INCREMENT PRIMARY KEY,
name VARCHAR(30)
);
CREATE TABLE role (
role_id INT AUTO_INCREMENT PRIMARY KEY,
title VARCHAR(30),
salary DECIMAL(8,2),
department_id INT,
FOREIGN KEY (d... | true |
b2428ef3cd3e64e3513d7cd29292155e751bbe2b | SQL | Level0r0s/JSC-Cross-Compiler | /examples/php/SimpleMySQLiConsole/SimpleMySQLiConsole/Schema/History/create.sql | UTF-8 | 313 | 2.53125 | 3 | [] | no_license | create table
if not exists
History1(
/* http://stackoverflow.com/questions/7337882/sqlite-and-integer-types-int-integer-bigint */
id INTEGER PRIMARY KEY AUTOINCREMENT,
-- sqlite vs mysql
-- http://www.sqlite.org/datatype3.html
query text not null,
context text not null
) | true |
3f6e695ca505b7328f5345459472b034d86c9e57 | SQL | jimoh9324/M151ToDo | /database/todolist.sql | UTF-8 | 845 | 3.59375 | 4 | [] | no_license | CREATE DATABASE IF NOT EXISTS `151todolist`;
USE `151todolist`;
CREATE TABLE IF NOT EXISTS `users` (
`userid` INT NOT NULL AUTO_INCREMENT,
`firstname` VARCHAR(30) NOT NULL,
`lastname` VARCHAR(30) NOT NULL,
`username` VARCHAR(30) NOT NULL,
`password` VARCHAR(255) NOT NULL,
`email` VARCHAR(100) N... | true |
563ccac23e1d9abe852d932ac6da0297b39a3de8 | SQL | FaithMandela/QuestionThree | /projects/bunson/database/data/update.sql | UTF-8 | 2,674 | 3.234375 | 3 | [] | no_license | ALTER TABLE transfer_assignments ADD time_out time;
ALTER TABLE transfer_assignments ADD time_in time;
ALTER TABLE transfer_assignments ADD closed boolean default false;
ALTER TABLE transfer_assignments ADD last_update timestamp default CURRENT... | true |
5ee855d0114e837fbac9a0a1a61713edad35810f | SQL | bunuli12138/2019_summer_coding | /MySQL(Phase 8)/Task2/2019summer.sql | UTF-8 | 5,600 | 3.140625 | 3 | [] | no_license | -- MySQL dump 10.13 Distrib 8.0.15, for Win64 (x86_64)
--
-- Host: localhost Database: 2019summer
-- ------------------------------------------------------
-- Server version 8.0.15
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
... | true |
43bf4eda42c9152acca331a2bb7ae2fba71c0801 | SQL | KamranJabiyev/P213-07.01.2020 | /SQLQuery-07-01-2020.sql | UTF-8 | 2,030 | 4.21875 | 4 | [] | no_license | use P213;
create table Students(
Id int,
[Name] nvarchar(100),
Surname nvarchar(100)
)
drop table Students
alter table Students
add Email nvarchar(250)
alter table Students
drop column Email
insert into Students
values(1,'Memmed','Lazimli','memmedBomba@gmail.com')
select * from Students
... | true |
979394b7a52b145b08908a289c854a4835806262 | SQL | jordanengstrom/keepr | /Users.sql | UTF-8 | 626 | 3.375 | 3 | [] | no_license | -- CREATE TABLE users (
-- id VARCHAR(255) NOT NULL,
-- username VARCHAR(20) NOT NULL,
-- email VARCHAR(255) NOT NULL,
-- password VARCHAR(255) NOT NULL,
-- PRIMARY KEY (id),
-- UNIQUE KEY email (email)
-- );
-- ADD ITEM TO DB_TABLE
-- INSERT INTO users (
-- id,
-- username,
-- email,
--... | true |
1a2f08c25d264ea23c1c053199c5e5e95e4dc8fe | SQL | freddy36/PostNAS | /import/atkis_rp_rendering/processing/sql/stehendesgewaesser_prep.sql | UTF-8 | 786 | 3.125 | 3 | [] | no_license | DROP TABLE IF EXISTS map_stehendesgewaesser_g0;
DROP SEQUENCE IF EXISTS map_stehendesgewaesser_g0_gid_seq;
--
SELECT
wkb_geometry,
widmung
INTO map_stehendesgewaesser_g0
FROM (
SELECT (ST_Dump( ST_Union( ax_stehendesgewaesser.wkb_geometry ))).geom AS wkb_geometry, unverschluesselt as widmung
FROM ax_stehendesgew... | true |
dac26062bc8333dce995d58f303bb18481753dd9 | SQL | estafette/estafette-ci-api | /pkg/clients/database/queries/migrate_build_logs.sql | UTF-8 | 685 | 3.875 | 4 | [
"MIT"
] | permissive | UPSERT
INTO
build_logs
(
id,
repo_source,
repo_owner,
repo_name,
repo_branch,
repo_revision,
inserted_at,
build_id,
migrated_from
)
SELECT
(2000000000000000000 + build_logs.id) AS id,
builds.repo_source,
builds.repo_owner,
builds.repo_name,
build_logs.repo_branch,
b... | true |
8830cc94047df599adb3d26c635349e8fc57b017 | SQL | vasavdave/sql-challenge | /EmployeeSQL/DBSchema.sql | UTF-8 | 1,299 | 3.828125 | 4 | [] | no_license | CREATE TABLE titles (
title_id VARCHAR NOT NULL,
title VARCHAR NOT NULL,
PRIMARY KEY (title_id)
);
CREATE TABLE employees (
emp_no INT NOT NULL,
emp_title_id VARCHAR NOT NULL,
birth_date DATE NOT NULL,
first_name VARCHAR NOT NULL,
last_name VARCHAR ... | true |
d35b0edbb0d126a93622178aa7e09e3a087ee43f | SQL | nopparat231/t-shirt-shop | /shopping-cart-with-paypal-integration-in-php/db/shopping.sql | UTF-8 | 2,602 | 3.25 | 3 | [] | no_license | --------------------------shop_products------------------------------
CREATE TABLE `shop_products` (
`id` int(11) NOT NULL,
`product_name` varchar(60) NOT NULL,
`product_desc` text NOT NULL,
`product_code` varchar(60) NOT NULL,
`product_image` varchar(60) NOT NULL,
`product_price` int(11) NOT NULL
) ;
INS... | true |
4b3e56800d42c665931f1b8e0a4f8ea62d8a2c84 | SQL | codeformeaning/data-analysis-sql | /07.统计每个性别用户等级的分布情况.sql | WINDOWS-1252 | 132 | 3.015625 | 3 | [] | no_license | select sex,
if (level >5 "", ""),
count(distinct user_name)
from user_info
group by sex,
if (level >5 "", ""); | true |
5e84248b6974f646e667eb7ac2c43f3bf092a579 | SQL | komissarex/snaql-migration | /snaql_migration/tests/countries/migrations/001-create-countries.apply.sql | UTF-8 | 137 | 2.625 | 3 | [
"MIT"
] | permissive | {% sql 'create_countries' %}
CREATE TABLE countries (
id INT NOT NULL,
name VARCHAR(100),
PRIMARY KEY (id)
)
{% endsql %} | true |
b047f0af63214f4a6992320a40a44468e012865a | SQL | ivaneyvieira/engAtacado | /src/main/resources/sql/processaPedido.sql | UTF-8 | 11,330 | 3.109375 | 3 | [] | no_license | /****************************************************************************
Parametros
****************************************************************************/
DO @LOJA := :storeno;
DO @PEDIDO := :ordno;
DO @SERIE := 66;
DO @TIPO := :tipo;
DO @FATOR := IF(@TIPO = 'E', 1, - 1);
DO @DOC := IF(@TIPO = 'E', ' AJUS... | true |
a3e8385544895247276233ba3c56d5f25e7d1490 | SQL | zpiao1/CZ4031 | /query_visualizer/sample9b.sql | UTF-8 | 311 | 4.40625 | 4 | [] | no_license | SELECT C.name, COUNT(D.pubid)
FROM author AS C, publication_author AS D, (
SELECT DISTINCT A.authorid
FROM publication_author AS A, publication AS B
WHERE A.pubid = B.pubid
AND B.year = (SELECT MIN(year) FROM publication)
) AS E
WHERE C.authorid = D.authorid
AND C.authorid = E.authorid
GROUP BY C.authorid; | true |
674d7352a847bf76b24ef3567a56b7e2d1f0b762 | SQL | unsurecoder/MySQL | /The Report.sql | UTF-8 | 432 | 2.75 | 3 | [] | no_license | /*
Enter your query here.
*/
select students.name,grades.grade,students.marks from students inner join grades on students.marks>=min_mark and students.marks<=max_mark where grades.grade>7 order by grades.grade desc,students.name asc;
select "NULL",grades.grade,students.marks from students inner join grades on students.... | true |
88c82940f907b6a6e233df6682a2a9046c49f604 | SQL | josepitteloud/VESPA | /ad_hoc/V250 - Sports Rights Analysis/Final Project Code/v250 Sports rights Part 14 - Days right Viewable metrics by right per account.sql | UTF-8 | 529,161 | 3.890625 | 4 | [] | no_license | /*-----------------------------------------------------------------------------------------------------------------
Project:V250 - Sports right Analysis Profiling
Part - Part 14 Viewing summary
Analyst: Dan Barnett
SK Prod: 5
Create Summary viewable per right for each ac... | true |
4fada3b8bbed5089a47a55bf3026d0c667bccc99 | SQL | giancarloCavalli/bds05 | /src/main/resources/data.sql | UTF-8 | 2,201 | 3.25 | 3 | [] | no_license | INSERT INTO users (id, name, email, password) VALUES (1, 'Bob DePay', 'bob@gmail.com', '$2a$10$eACCYoNOHEqXve8aIWT8Nu3PkMXWBaOxJ9aORUYzfMQCbVBIhZ8tG');
INSERT INTO users (id, name, email, password) VALUES (2, 'Ana Leroy', 'ana@gmail.com', '$2a$10$eACCYoNOHEqXve8aIWT8Nu3PkMXWBaOxJ9aORUYzfMQCbVBIhZ8tG');
INSERT INTO rol... | true |
52533b254f14c4fd7b5d85ddd17e3bb2f808a7c2 | SQL | cazicbor/Library-Manager | /insertion.sql | UTF-8 | 4,698 | 2.828125 | 3 | [] | no_license | INSERT INTO Ressource(code, titre, date_apparition, editeur, genre, code_classification) VALUES (1, 'Guytoune', 2020, 'D or et de platine', 'rap', 890);
INSERT INTO Ressource(code, titre, date_apparition, editeur, genre, code_classification) VALUES (449, 'Cremoso', 2019, 'D or et de platine', 'rap', 279);
INSERT INTO R... | true |
b16114944ee836ce52087c2d39dc00d8a462f4ed | SQL | yuanyanzhu123456/rsc | /doc/db/geo-release/v2.0.0/rcs_quartz_config_v1.0_2018.6.19.sql | UTF-8 | 14,673 | 3.046875 | 3 | [] | no_license | # ************************************************************
# Sequel Pro SQL dump
# Version 4541
#
# http://www.sequelpro.com/
# https://github.com/sequelpro/sequelpro
#
# Host: 127.0.0.1 (MySQL 5.6.38)
# Database: rcs
# Generation Time: 2018-06-19 03:54:21 +0000
# ***************************************************... | true |
70a3d855db82183dc6e4961df33256367e9127c3 | SQL | Raparker88/daily-journal-server | /dailyjournal.sql | UTF-8 | 368 | 3.046875 | 3 | [] | no_license | SELECT * FROM Entries;
SELECT * FROM MOODS;
SELECT
e.id,
e.date,
e.entry,
e.mood_id,
m.label
FROM entries e
JOIN Moods m ON e.mood_id = m.id
SELECT
e.id,
e.date,
e.entry,
e.mood_id,
m.label
FROM entries e
JOIN Moods m ON e.mood_id = m.id
WHERE e.entry LIKE '%a%'
ALTER TABLE En... | true |
1dfd4ca4b0724168d6691e80f28210c9b415eca6 | SQL | jinson7/QueriesSQL | /USFlights/SolutionQueriesSQL.sql | UTF-8 | 1,040 | 4.1875 | 4 | [] | no_license | #1
SELECT count(*) as "Numbers of flights" FROM Flights;
#2
SELECT Origin as "Origin airport", avg(ArrDelay) as "Average delay of arrival",
avg(DepDelay) as "Average delay of exit"
FROM Flights
GROUP BY Origin;
#3
SELECT Origin as "Origin airport", colYear as "Year", colMonth as "Month", "retard"
FROM Flights
GROUP... | true |
3bf4d2dee1105c2de12dcd1f91fa6b8a67282614 | SQL | christinegaraudy/mvp | /server/db/schema.sql | UTF-8 | 263 | 2.796875 | 3 | [] | no_license |
DROP DATABASE IF EXISTS recipe_finder;
CREATE DATABASE recipe_finder;
USE recipe_finder;
CREATE TABLE saved_recipes (
id int NOT NULL AUTO_INCREMENT,
image varchar(8000),
title varchar(250),
PRIMARY KEY (id)
);
-- mysql -u root < server/db/schema.sql
| true |
b4446a100f7554a13806a5725b9cc6192599cb91 | SQL | natebecker11/bamazon | /bamazonSeed.sql | UTF-8 | 319 | 3.28125 | 3 | [] | no_license | DROP DATABASE IF EXISTS bamazon;
CREATE DATABASE bamazon;
USE bamazon;
CREATE TABLE products (
item_id INT NOT NULL AUTO_INCREMENT,
product_name VARCHAR(40) NOT NULL,
department_name VARCHAR(40),
price DECIMAL(10,2) NOT NULL,
stock_quantity INT NOT NULL,
PRIMARY KEY (item_id)
);
SELECT * FROM products; | true |
31b83dfae8e5416f336c130a46b652747f42659d | SQL | Kasenovea/Webapplication_petshood | /Dbsql/service.sql | UTF-8 | 3,483 | 3.359375 | 3 | [] | no_license | CREATE TABLE service (
id_s VARCHAR(5) ,UNIQUE (id_s),
service_photo VARCHAR(100),
service_name VARCHAR(50),
service_description TEXT,
image_1 VARCHAR(100),
info_1 VARCHAR(100),
image_2 VARCHAR(100),
info_2 VARCHAR(100),
image_3 VARCHAR(100),
info_3 VARCHAR(100),
other_info V... | true |
45d70ce66f63152864624b33ba45f5a959064ae6 | SQL | m-stearns/workout-admin-application | /application/database/dmq.sql | UTF-8 | 6,258 | 3.71875 | 4 | [] | no_license | ---------------------USERS-----------------------------
-- View USERS
SELECT *
FROM USERS;
-- Search USERS
SELECT *
FROM USERS
WHERE user_name = :user_name_input;
-- Add USERS
INSERT INTO USERS
(user_name)
VALUES
(:user_name_input);
-- Edit USERS
UPDATE USERS
SET user_name = :user_name_input
WHERE user_id = :use... | true |
58267b9b1bcd135f0df0febf6ec7242606efd007 | SQL | dain1403/MYSQL | /SQL DML연습 2020-8-19.sql | UHC | 2,315 | 3.578125 | 4 | [] | no_license | SELECT TABLE_NAME
FROM USER_TABLES;
-- DML .. INSERT/UPDATE/DELETE
DROP TABLE A_ENROL;
CREATE TABLE A_ENROL
AS
SELECT *
FROM ENROL
WHERE STU_NO < 20150000;
--INSERT
INSERT INTO A_ENROL(SUB_NO, STU_NO, ENR_GRADE) --
VALUES (108, 20151062, 92);
DESC A_ENROL;
SELECT * FROM A_ENROL;
INSERT INTO ... | true |
ac9e99050f83b02009404973e2b6fa7bd1ad44c7 | SQL | physikerwelt/mediawiki-extensions-MathSearch | /db/snippets/CosProd.sql | UTF-8 | 625 | 3.6875 | 4 | [] | no_license | delimiter $$
CREATE DEFINER=`root`@`localhost` FUNCTION `CosProd`(IDA INT,IDB INT ) RETURNS decimal(20,10)
READS SQL DATA
DETERMINISTIC
BEGIN
-- Calculates the CosineSimilarity of two pages
return (
SELECT SUM(CAST(LOG( a.`pagestat_featurecount`)* LOG(b.`pagestat_featurecount`) as DECIMAL(20,10))
/(LOG(var... | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.