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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
3f35413b6345fb50c28800742268c35b63e9e1ce | SQL | Sankarb475/CassandraLearning | /differentKeysInCassandra.cql | UTF-8 | 4,764 | 4.75 | 5 | [] | no_license | /*
Cassandra has many types of key:
primary key,
partition key,
composite key
clustering key
*/
-- Partition Key: Is the part of a record (one or more columns) that is used to create its hash that is then used to
select the node(s) that will store it. so partition key is the key which creates the hash value based o... | true |
9800a144be5c135a209321a206b019df17c86009 | SQL | anujpal82/Training-Feb-2021 | /Modules/SQL/Day1/paresh gohil/Assignment.sql | UTF-8 | 874 | 3.796875 | 4 | [] | no_license | USE Practices;
CREATE TABLE Emps
(
EmployeeID INT PRIMARY KEY IDENTITY,
FirstName varchar(20) NOT NULL,
LastName varchar(20) NOT NULL,
Email varchar(30) NOT NULL,
PhoneNumber bigint NOT NULL,
JoinDate date NOT NULL,
JobID INT NOT NULL,
Salary bigint NOT NULL,
)
CREATE TABLE Inventories
(
LaunchDate date NOT... | true |
14e15028019f58376c102e260d26498e69b509cf | SQL | aryaab/Mascotas | /pets_2018-09-05.sql | UTF-8 | 7,241 | 3.359375 | 3 | [] | no_license | # ************************************************************
# Sequel Pro SQL dump
# Versión 4541
#
# http://www.sequelpro.com/
# https://github.com/sequelpro/sequelpro
#
# Host: 127.0.0.1 (MySQL 5.7.21)
# Base de datos: pets
# Tiempo de Generación: 2018-09-05 05:17:10 +0000
# ****************************************... | true |
5dedd0a8bcea74e1c7ce8ae2333e1760e8542336 | SQL | abigail3306/Study-Buddy | /queries/top10math.sql | UTF-8 | 673 | 3.953125 | 4 | [] | no_license |
-- Selects the top 10 School in Loudoun County for 4th grade Math scores.
-- Where you are not disadvantaged, disabled, and speak English
--
-- Schema: div_name, sch_name, avg_sol_scale_score
-- Order: avg_sol_scale_score
select d.div_name, s.sch_name, t.avg_sol_scale_score
from test_score as t
join school as s on ... | true |
8eb7a3303b3810bfe6573209d25ef19faecfb82b | SQL | brendan2131/ETL-Project | /ETL.sql | UTF-8 | 634 | 3.796875 | 4 | [] | no_license | CREATE DATABASE top_songs_db;
USE top_songs_db;
CREATE TABLE spotify (
spotify_position INT PRIMARY KEY,
song_name VARCHAR(200) NOT NULL,
artists VARCHAR(200) NOT NULL,
duration_ms DOUBLE (20,1)
);
CREATE TABLE billboard (
id INT PRIMARY KEY,
peak_position INT,
song_name VARCHAR(200) NOT NULL,
arti... | true |
ac6db2796ee4d0db5bc1e9f73053685182f228f6 | SQL | markmeehan99/AirlineDataBase | /int7.sql | UTF-8 | 413 | 3.5 | 4 | [] | no_license | --quantidade de passageiros em cada faixa etaria
.mode columns
.headers on
.nullvalue NULL
select idade/10*10 as idadeMinima, idade/10*10+9 as idadeMaxima, sum(idadeNum)
from
(
select strftime('%Y', 'now')-strftime('%Y',Pessoa.dataNascimento) as idade, count(*) as idadeNum
from Pessoa, Passageiro
whe... | true |
6a8653fe6c282838627b91bf04e37ad32034b2ea | SQL | jeffreyt/shuInventory | /report_user_specific.sql | UTF-8 | 199 | 3.265625 | 3 | [] | no_license | SELECT user.user_name, user_tel, user_location, hardware_make, hardware_model
FROM user
LEFT JOIN hardware
ON user.user_name=hardware.user_name
WHERE user.user_name='on-hand'
ORDER BY user.user_name; | true |
14284362b75eac48bfb7fa7440e51bc1bda4ccfd | SQL | jorgitodf/mfw | /bd/querys.sql | UTF-8 | 1,395 | 3.75 | 4 | [] | no_license | SELECT Replace
(Replace
(Replace
(Format(SUM(ei.valor), 2), '.', '|'), ',', '.'), '|', ',') AS total FROM expenditure_installments ei
JOIN expenses_card ec
ON (ec.id = ei.fk_expenses_card)
WHERE ec.descricao LIKE '%Clash Royale%';
SELECT * FROM framework.expenses_card;
DELETE FROM framework.expe... | true |
48332809cd367c0aa1f278567030000dba5f1faf | SQL | vladimirpetukhov/Soft_Uni_Studies | /C#_Data_Base_MS_SQL/Database Basics – MS SQL – май 2018/Subqueries and JOINs/Subqueries and JOINs/04. Employee Departments.sql | UTF-8 | 173 | 3.53125 | 4 | [
"MIT"
] | permissive | SELECT TOP 5 e.EmployeeID,e.FirstName,e.Salary,d.Name
FROM Employees AS e
JOIN Departments AS d ON d.DepartmentID=e.DepartmentID
WHERE e.Salary>15000
ORDER BY e.DepartmentID | true |
34ea08f1b934a60f7dce601700ac6d131e6c8677 | SQL | kids-cademy/atlas.studio | /db/patches/0.5.7/02.sql | UTF-8 | 245 | 2.96875 | 3 | [
"Apache-2.0"
] | permissive | -- Infer meta_id foreign key.
UPDATE `atlas`.`atlasobject` o
JOIN `atlas`.`taxon` t ON o.id=t.atlasobject_id
JOIN `atlas`.`atlascollection_taxonomymeta` m ON o.collection_id=m.atlascollection_id
SET t.`meta_id`=m.`id`
WHERE t.name=m.name;
| true |
7bb7de9cba5e44b14c98ca428ac4cb9af33cb858 | SQL | aminebousselmi/BD50 | /src/public/700_Create_pqb_db/730_create_pqi_db_librairie_commande.sql | UTF-8 | 628 | 2.671875 | 3 | [] | no_license | --------------------------------------------------------
-- PACKAGE DB_COMMANDE
--------------------------------------------------------
CREATE OR REPLACE PACKAGE DB_COMMANDE AS
TYPE sqlcur IS REF CURSOR;
FUNCTION clientHasCommande(
p_cln_id CLIENT.CLN_ID%TYPE
) RETURN NUMBER;
FUNCTION addCommande(
p_clie... | true |
27e51ebaa7f160df810ce394a1a6a5ef218a819c | SQL | DaeguIT-MinSuKim/Omori | /Scripts/Script-3.sql | UTF-8 | 1,015 | 2.71875 | 3 | [] | no_license | -- testname, testquestion, testexample
-- image
LOAD DATA LOCAL INFILE "D:\\workspace\\workspace_spring\\Omori_Ver2\\DataFiles\\image.txt"
INTO TABLE image character set utf8
FIELDS TERMINATED BY '\t' LINES TERMINATED BY '\n';
select * from image;
-- selected_answer
LOAD DATA LOCAL INFILE "D:\\workspace\\... | true |
72fb707fe542875fe1df7883aa3565203f5cd3da | SQL | betagouv/metiers-numeriques | /prisma/migrations/20220224075937_create_archived_jobs/migration.sql | UTF-8 | 823 | 3.890625 | 4 | [
"MIT"
] | permissive | -- CreateTable
CREATE TABLE "ArchivedJob" (
"id" TEXT NOT NULL,
"title" TEXT NOT NULL,
"missionDescription" TEXT NOT NULL,
"profileDescription" TEXT,
"recruiterName" TEXT NOT NULL,
"region" TEXT NOT NULL,
"slug" TEXT NOT NULL,
"source" "JobSource" NOT NULL,
"createdAt" TIMESTAMP(3) N... | true |
ea660bf61e550d9282b48db7f1e184239858313c | SQL | lifephongphanmem/csdlgia2018 | /public/data/kkdkg/XD00987654321571881977&1.sql | UTF-8 | 8,083 | 2.546875 | 3 | [
"MIT"
] | permissive | -- phpMyAdmin SQL Dump
-- version 4.7.0
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Oct 29, 2019 at 08:44 AM
-- Server version: 10.1.25-MariaDB
-- PHP Version: 5.6.31
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OL... | true |
c7a18810f062fdd366322de43d592e7b0ed9da5d | SQL | kacox1251/unit12-employeetracker | /db/seeds.sql | UTF-8 | 615 | 2.6875 | 3 | [
"MIT"
] | permissive | INSERT INTO department (name) VALUES
("Sales"),
("Production"),
("Development"),
("Corporate");
INSERT INTO role (title, salary,department_id) VALUES
("Accounts", 57000.00, 1),
("Manager", 60000.00, 1),
("Coordinator", 48000.00, 2),
("Engineer", 60000.00, 3),
("CEO", 100000.00, 4);
INSERT INTO employee (first_nam... | true |
4220f71d15772426c568e2b8225eeb9fdfe4c867 | SQL | sdong49/biere-en-stock | /projet.sql | UTF-8 | 23,991 | 2.859375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.9.1
-- https://www.phpmyadmin.net/
--
-- Hôte : 127.0.0.1
-- Généré le : lun. 22 juin 2020 à 10:51
-- Version du serveur : 10.4.8-MariaDB
-- Version de PHP : 7.3.11
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101... | true |
eb6e0ff53ddb8c9044225a83c98a85836510258e | SQL | viet-dc97/spring-jsp | /src/sql/java5.sql | UTF-8 | 2,941 | 3.84375 | 4 | [] | no_license |
CREATE TABLE `accounts` (
`username` varchar(30) NOT NULL,
`password` varchar(30) NOT NULL,
`fullname` varchar(50) DEFAULT NULL,
`email` varchar(50) DEFAULT NULL,
`photo` varchar(100) DEFAULT NULL,
`role` bit(1) DEFAULT NULL,
`status` bit(1) DEFAULT NULL,
`time` datetime DEFAULT NULL
) ENGINE=InnoDB D... | true |
a14ccd23ab6a0f6f082b6767294fd66884a95692 | SQL | james-monahan/Python_SQL_practice | /Unique_Salaries_HARD.sql | UTF-8 | 529 | 4.28125 | 4 | [] | no_license | /*Find the top three unique salaries for each department. Output the department name and
the top 3 unique salaries by each department. Order your results alphabetically by
department and then by highest salary to lowest.*/
WITH inner_q AS
(select department, salary,
DENSE_RANK() OVER(PARTITION BY department ORDER BY... | true |
e8b2e06c786aa436f26bd0a3576f9273dba0ad2b | SQL | sebaek/jsp20210510 | /WebContent/WEB-INF/sql/JOIN05.sql | UTF-8 | 637 | 4.0625 | 4 | [] | no_license | USE test;
SELECT * FROM Orders;
-- 주문의 고객명
SELECT o.OrderID, c.CustomerName
FROM Orders o JOIN Customers c
ON o.CustomerID = c.CustomerID;
-- 주문의 고객명, 직원명
SELECT o.OrderID, c.CustomerName, e.LastName, e.FirstName
FROM Orders o
JOIN Customers c ON o.CustomerID = c.CustomerID
JOIN Employees e ON o.EmployeeID = e.Em... | true |
202359755f8bb430abecbb728918b922d5da44b9 | SQL | SHUSHI-warlock/RFID-LMS | /sql/建表.sql | GB18030 | 1,983 | 3.890625 | 4 | [] | no_license | /**/
/*
ԱT_People
Column(s) of " T_ Peop " Table
Name Datatype Null Option Comment Is PK Is FK Name
P_Id Varchar(20) NOT NULL Yes No ߿
P_Password Varchar(20) NOT NULL No No
*/
create table T_People
(
P_Id Varchar(20) NOT NULL PRIMARY KEY,
P_Name Varchar(20),
P_Password Varchar(20) NOT NULL
)
/*
ͼT_Book
Col... | true |
4492d0621c75c039e0f86cf0eaf28c6de6eb296e | SQL | mikirov/SQL-2019-2020 | /2020-3-27/queries.sql | UTF-8 | 426 | 3.625 | 4 | [] | no_license | use ex2;
select st.name, g.name, g.grade from grades g inner join student st on st.id = g.student_id;
select avg(g.grade) from grades g where g.student_id = 1 and g.name like "SUBD";
select avg(g.grade) as average_grade, st.name from student st inner join grades g on g.student_id = st.id group by st.id;
select st.n... | true |
d188966d1689f168e8f1b7500bc30d2fae9167f4 | SQL | autorizadabr/atsadmin | /script/mov_estoqueTeste.sql | UTF-8 | 7,973 | 3.234375 | 3 | [] | no_license | SET TERM ^ ;
CREATE OR ALTER PROCEDURE MOV_ESTOQUETESTE
(codproduto integer)
RETURNS
( TesteValor char(1), -- Testa tab MOVIMENTODETALHE
TesteEstoque char(1), -- Testa tab MOVIMENTODETALHE
TestePrecoMedio char(1), -- Testa tab MOVIMENTODETALHE
TesteEstoqueProd char(1),... | true |
3dfa6e5abdc87cf176ca65eee6a9331bb4119aea | SQL | Laxmithoodi/DataGrip.PokemonSqlLab | /pokemon_sql/part3.sql | UTF-8 | 1,413 | 4.375 | 4 | [] | no_license | //What is each pokemon's primary type?
SELECT p.name, t.name as primary_typename, p.primary_type FROM pokemons p join types t
ON p.primary_type = t.id;
//What is Rufflet's secondary type?
SELECT p.name, t.name as secondary_typename FROM pokemons p JOIN types t
ON p.secondary_type = t.id WHERE p.name ="Rufflet";
//An... | true |
e2aff66214f41db01f43f3fd45157556d0c0c32c | SQL | vhalbert/modeshape | /sequencers/modeshape-sequencer-ddl/src/test/resources/ddl/dialect/oracle/oracle_test_statements_2.ddl | UTF-8 | 5,769 | 3.5 | 4 | [
"Apache-2.0"
] | permissive | --
-- SAMPLE ORACLE STATEMENTS
--
ALTER TABLE employees
PCTFREE 30
PCTUSED 60;
ALTER TABLE countries
ADD (duty_pct NUMBER(2,2) CHECK (duty_pct < 10.5),
visa_needed VARCHAR2(3));
ALTER TABLESPACE tbs_01
BEGIN BACKUP;
ALTER TABLESPACE omf_ts1 ADD DATAFILE;
ALTER TABLESPACE undots1
... | true |
2bfd3f1064130d5ace04f4a2f9da634c153c79cb | SQL | shahed95/Academic | /5th semester/MediCare/FILES/medicare.sql | UTF-8 | 19,272 | 3.359375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.8.0
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Oct 08, 2018 at 04:42 PM
-- Server version: 10.1.31-MariaDB
-- PHP Version: 7.2.4
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD... | true |
b3afc8db9d69a9c5be7a0d6b34a5cc61687c1388 | SQL | inanimatestructure--/VideoSite | /VideoWebsite/SQL Code/populateUsersTable.sql | UTF-8 | 270 | 2.5625 | 3 | [] | no_license | /*
* Populate the users table with values.
* Note that the INSERT must be list-directed since the primary key
* is automatically populated by the DBMS.
*/
INSERT INTO users (userName, handle) VALUES
('pwebb', 'patc1313'),
('jhollis', 'jman320'),
('2ds1', '23fdsa');
| true |
fb8ca937f35434d7cb2354a408d177c989f370c9 | SQL | hbwang518/llp | /sqlProgram/山地物种MDE_forWang.sql | UTF-8 | 1,758 | 3.140625 | 3 | [] | no_license |
---Altay
select * into m_plantAltay from m_plant where id in
(
select distinct(plant_Id) from plantcountyAltitudeValidResult a, m_grid
where a.id=m_grid.id and m_grid.lastRegion=1
)
select * from m_plantAltay
update m_plantAltay set lowAltitude = b.lowAltitude , highAltitude = b.highaltitude from m_plantAltay,... | true |
056e86949d668af99fb22f9f4c94b1e65a4ce6f0 | SQL | AndyRadulescu/pizza_backend | /pizza.sql | UTF-8 | 1,024 | 3.71875 | 4 | [] | no_license | create table if not exists table_name
(
uuid varchar(500) not null
constraint table_name_pk
primary key,
name varchar(250) not null,
description varchar(500),
price double precision not null,
user_uuid varchar(500),
toppings varchar(1000)
);
alter table table_name owner to postgres;
create unique index if ... | true |
44255c454fd1107cc1b5568be78c9ea8b13b0d96 | SQL | quochuy201/MSBA_Projects | /CapstonProject/SQLscript/ViewMasterData.sql | UTF-8 | 893 | 2.8125 | 3 | [] | no_license | CREATE VIEW MasterData
as
select ta.ParcelNumber,
ta.CurrentUseCodeCurrentYear,
ta.UseCode,
ta.TaxableValueCurrentYear,
ta.TaxYearCurrent,
ta.TaxCodeAreaCurrentYear,
ta.LandValueCurrentYear,
ta.ImprovementValueCurrentYear,
ta.TotalMarketValueCurrentYear,
ta.Taxabl... | true |
021dc6b0b30c9095c2d7bfe24569c1374714ffd7 | SQL | albertbahia/wdi_june_2014 | /w03/d02/james_liu/Homework03-02/db/pokemon_jointable_schema.sql | UTF-8 | 164 | 2.546875 | 3 | [] | no_license | DROP TABLE IF EXISTS pokemons_trainers;
CREATE TABLE pokemons_trainers (
pokemon_id INTEGER REFERENCES pokemons(id),
trainer_id INTEGER REFERENCES trainers(id)
);
| true |
2dec61b15cd1f0bce5546adef4854ceee1c51441 | SQL | aarora3/student-registration-system | /PL SQL/PL SQL/package.sql | UTF-8 | 18,303 | 3.65625 | 4 | [] | no_license |
-- PACKAGE FOR STORED PROCEDURES
create or replace package Proj2_student_reg_package is
type data_cursor is ref cursor;
-- DECLARATION OF ALL STORED PROCEDURES
procedure show_students(student_ref_cursor OUT data_cursor );
procedure show_courses(courses_ref_cursor OUT data_cursor);
procedure sh... | true |
914f92d60bc2faf0deeedd06264aa9a84590f780 | SQL | marizole/segparcial | /bd_blog.sql | UTF-8 | 3,766 | 3.046875 | 3 | [] | no_license | /*
Navicat Premium Data Transfer
Source Server : PARCIALDOS
Source Server Type : MySQL
Source Server Version : 100138
Source Host : localhost:3306
Source Schema : bd_blog
Target Server Type : MySQL
Target Server Version : 100138
File Encoding : 65001
Date: 06/11/2020... | true |
dc502798e85882ad35f7bcda406d8ee11e253a1e | SQL | thiagorodi/exercicios_sala | /cadastro.sql | UTF-8 | 1,345 | 3.203125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.0.4.2
-- http://www.phpmyadmin.net
--
-- Máquina: localhost
-- Data de Criação: 09-Ago-2019 às 00:54
-- Versão do servidor: 5.6.13
-- versão do PHP: 5.4.17
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIE... | true |
d581d1c0dad6336630394e42d0dbe3ed775b279b | SQL | gsteinhoff/LEAF-copy | /LEAF_Request_Portal/utils/db_upgrade/Update_RMC_DB_4429-4482.sql | UTF-8 | 664 | 2.828125 | 3 | [
"LicenseRef-scancode-public-domain"
] | permissive | START TRANSACTION;
INSERT INTO `dependencies` (`dependencyID`, `description`) VALUES ('-2', 'Requestor Followup');
CREATE TABLE IF NOT EXISTS `data_extended` (
`recordID` smallint unsigned NOT NULL,
`indicatorID` smallint NOT NULL,
`data` text NOT NULL,
`timestamp` int unsigned NOT NULL,
`userID` varchar(50)... | true |
8d55c0e451808755817be938bf1cabf874db9e29 | SQL | aidnurs/competitive-programming | /leetcode/database/181.employees-earning-more-than-their-managers.sql | UTF-8 | 151 | 3.0625 | 3 | [] | no_license | # Write your MySQL query statement below
select a.Name as Employee from Employee as a, Employee as b where a.ManagerId=b.Id and a.Salary > b.Salary ;
| true |
0a1f20f49796769f120cacdafd53c2e884ce1fce | SQL | wade0564/repo | /notes/sql/recovery miss asup_queue.sql | UTF-8 | 1,494 | 3.140625 | 3 | [] | no_license | ---recover PARSE_SUCCESS asup_queue message
INSERT INTO asup.asup_queue(file_name,file_source,file_type,sn,model_str,ddos_ver,parse_status)
SELECT substring(filename,12),
CASE
WHEN EXTERNAL = 1 THEN 'customer'
ELSE 'internal'
END AS file_source,
'autosupport',
... | true |
8f6973ade38f586f7539d287af3c36a5d2fafcb2 | SQL | SZFelixHuang/pms-database | /script/mysql/jetspeed/create/security_domain.sql | UTF-8 | 511 | 3.125 | 3 | [] | no_license | SET FOREIGN_KEY_CHECKS=0;
-- ----------------------------
-- TABLE STRUCTURE FOR SECURITY_DOMAIN
-- ----------------------------
CREATE TABLE IF NOT EXISTS `SECURITY_DOMAIN` (
`DOMAIN_ID` DECIMAL(65,30) NOT NULL,
`DOMAIN_NAME` VARCHAR(254) DEFAULT NULL,
`REMOTE` DECIMAL(3,0) DEFAULT NULL,
`ENABLED` DECIMAL(3,0... | true |
9fdf955b70695900beb748c243130910e4c5cb18 | SQL | mleczey/todo | /src/main/resources/db/migration/V00001__create_todo.sql.sql | UTF-8 | 1,346 | 3.859375 | 4 | [] | no_license | USE todo;
CREATE TABLE TASK (
ID INT AUTO_INCREMENT,
VERSION INT NOT NULL,
UUID BINARY(16) NOT NULL,
CREATED_AT TIMESTAMP NOT NULL,
MODIFIED_AT TIMESTAMP NOT NULL,
TITLE VARCHAR(256) NOT NULL,
DESCRIPTION VARCHAR(1024) DEFAULT NULL,
FINISHED_AT... | true |
11c179f187bc4550b1fa8d238d5ee83e268a9c30 | SQL | tusharwr/SRDT | /NEW/DAY 3.sql | UTF-8 | 6,792 | 3.328125 | 3 | [] | no_license | SELECT *
FROM
(SELECT DISTINCT A.CAMPUS_ID,
B.NAME_DISPLAY,
C.ACAD_PROG "COURSE",
SUBSTR(D.ACAD_PROG,4,2) "BRANCH",
E.NAME "FATHER/MOTHER" ,
( SELECT SUM(LINE_AMT) FROM PS_ITEM_LINE_VW WHERE EMPLID=A.EMPLID AND ACCOUNT_TERM LIKE '%' AND LINE_AMT>'0' AND LINE_ACTION != 'REF') AS "TOTAL FEE PAY... | true |
16f507e6769740820bdd70b6835525809fd51e56 | SQL | PrasanthReddy-Chittapu6683/Python_DataScience_MachineLearning | /PrepCourse/BasicsOfSql/mypractivefiles/query1.sql | UTF-8 | 650 | 3.234375 | 3 | [] | no_license | select * from companydb.employee;
select fname as "First Name", lname as "Last Name" from companydb.employee;
select * from companydb.employee where Sex='M' and salary>=30000;
select * from companydb.employee where Sex='F' or salary>=30000;
select * from companydb.dependent where essn=333445555;
select essn, hours fro... | true |
22a27738f6994be0b561c28c5c3bb4f7d7b1cc5b | SQL | NHSRC/facilities-assessment-server | /src/main/resources/db/migration/V22__AddFacilityAssessmentSeriesName.sql | UTF-8 | 143 | 2.53125 | 3 | [] | no_license | ALTER TABLE facility_assessment ADD COLUMN series_name VARCHAR(50) NULL;
ALTER TABLE facility_assessment ADD UNIQUE (series_name, facility_id); | true |
d66870635076955f7fa2a98a7bc3580bf798c1c7 | SQL | roshankshaw/Online-Hotel-Reservation-System | /sql/hotel (1).sql | UTF-8 | 5,154 | 3.25 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | -- phpMyAdmin SQL Dump
-- version 4.7.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1:3306
-- Generation Time: Apr 30, 2019 at 07:08 PM
-- Server version: 5.7.19
-- PHP Version: 5.6.31
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CH... | true |
eff6ddf352c9e1d950a4dd1b12514830817c5109 | SQL | WhitneyOnTheWeb/SQL_Playground | /Marvel/Data/Scripts/MarvelQuery.sql | UTF-8 | 2,990 | 3.796875 | 4 | [] | no_license | USE MarvelCharApps
--X-Men comics
SELECT AppID
, c.CharName
, n.ComicName
FROM CharComicApps AS a
JOIN MarvelCharacters AS c ON a.CharID = c.CharID
JOIN ComicNames AS n ON a.ComicID = n.ComicID
WHERE n.ComicName LIKE '%xm%' --X-Men Comics
ORDER BY ComicName;
--Spiderman Comics
SELECT AppID
, c... | true |
95258ce7d86242c064331540f42b04292d1876b9 | SQL | pointgamma173/sayn | /sayn/start_project/sayn_project_base/sql/tracks_per_album_ordered.sql | UTF-8 | 551 | 3.265625 | 3 | [
"Apache-2.0",
"MIT"
] | permissive | /*
In this sql query, you can see the usage of parameters.
This is based on Jinja templating.
Parameters are passed from the profile used at run time (profiles are defined in the settings)
After a query is compiled, they will appear in the compile folder
*/
SELECT tpa.*
FROM {{schema_models}}.{{table_prefix}}tracks_p... | true |
f90a71dc67288a276563406c77b1b29da6dc22d4 | SQL | krish9449/handykrew | /handykrew/hkdb/src/main/resource/seeds/9_technition_service_categories.sql | UTF-8 | 479 | 2.5625 | 3 | [] | no_license | /*
-- Query: SELECT * FROM handykrew.technician_service_categories
LIMIT 0, 1000
-- Date: 2018-09-05 12:42
*/
INSERT INTO technician_service_categories(technician_account_no,category_no) VALUES(4,1);
INSERT INTO technician_service_categories(technician_account_no,category_no) VALUES(6,1);
INSERT INTO technicia... | true |
c1d1c19b9e7f1de808a00a1eb9fae6192d2a2fda | SQL | jinlongsj/jinlong-system | /jinlong-system-dbsql/src/main/V0.1/table/001_create_dic_jinlong_system_file_type.sql | UTF-8 | 403 | 3.1875 | 3 | [
"Apache-2.0"
] | permissive | -- 表1 :文件类型字典表 (dic_jinlong_system_file_type)
DROP TABLE IF exists dic_jinlong_system_file_type;
CREATE TABLE dic_jinlong_system_file_type
(
value INT(11) AUTO_INCREMENT COMMENT '文件类别ID',
name VARCHAR(20) NOT NULL COMMENT '父类文件类别ID',
PRIMARY KEY (value) -- 设置主键:文件类别ID
)
ENGINE=... | true |
cd76c6d5a156d85a443914a309fb6fdf1634bdd9 | SQL | radtek/Database-3 | /oracle/admin/scripts/cursores.sql | UTF-8 | 1,900 | 4.375 | 4 | [] | no_license | /*Para ver la cantidad de cursores abiertos de cada usuario*/
SELECT s.*, n.name
FROM v$sesstat s, v$statname n
WHERE s.statistic# = n.statistic#
and name = 'opened cursors current'
and sid = &sid ;
/*Ver los cursores abiertos de todos los usuarios con el texto sql*/
SELECT /*+ RULE */
a.VALUE can... | true |
b3d1ee4a474c213d1435188edf931209a71d325b | SQL | MrD0079/portal | /sql/merch_report_4sv_by_spec_new4.sql | UTF-8 | 3,017 | 3.4375 | 3 | [] | no_license | /* Formatted on 02.02.2014 22:40:11 (QP5 v5.227.12220.39724) */
SELECT SUM (msb.weight) msb_weight,
SUM (msr.r_remain) msr_remain,
SUM (msr.r_oos) msr_oos,
SUM (msr.r_gos) msr_gos,
SUM (msr.r_fcount) msr_fcount,
SUM (msr.r_price) msr_price,
COUNT (*) c,
decode(cou... | true |
905af1768a45a2f2fc3dd341ae14c948bc97081d | SQL | Dummy420/Darwin_client | /darwin.sql | UTF-8 | 3,813 | 3.359375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.8.5
-- https://www.phpmyadmin.net/
--
-- Hôte : 127.0.0.1:3306
-- Généré le : lun. 23 mars 2020 à 15:13
-- Version du serveur : 5.7.26
-- Version de PHP : 7.3.5
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET... | true |
548be31219f0d0e8fb53383f9e1d33f48e601e76 | SQL | anein/Database-Management-Essentials | /week 2/Assignment/location.sql | UTF-8 | 261 | 3.28125 | 3 | [] | no_license | DROP TABLE Location;
CREATE TABLE Location (
locNo CHAR(8) NOT NULL,
facNo CHAR(8) NOT NULL,
locName VARCHAR(30) NOT NULL,
CONSTRAINT LocationPK PRIMARY KEY (locNo),
CONSTRAINT FacilityFK FOREIGN KEY (facNo) REFERENCES Facility (facNo)
); | true |
6329f4ac8bf2cee9ba44e9e41a8b6fc16962db48 | SQL | manolf/CFLMS-MYSQL-DAY02-Manu | /queries.sql | UTF-8 | 1,052 | 3.84375 | 4 | [] | no_license |
--ALL ROUTES
select * from route;
--ALL busstops from ROUTE 100
select *
from route
inner join routedetail on routedetail.CODE = route.CODE
where route.CODE = 100;
--All busstop from Route with detailed info Stops and Adresses
select route.code, station.name, routedetail.ORDER_NR, address.STREET, address.ZIP_CODE, a... | true |
8c9ed38f0ac569dd21ec62efebbb694f85dc67d1 | SQL | ButeanuCosmin/Chat-Application | /chat_project.sql | UTF-8 | 2,858 | 3.015625 | 3 | [] | no_license | -- --------------------------------------------------------
-- Host: 127.0.0.1
-- Server version: 10.1.37-MariaDB - mariadb.org binary distribution
-- Server OS: Win32
-- HeidiSQL Version: 9.5.0.5196
-- -------------------------------------------... | true |
6540fc0ffcf2ca55cd794f54f4a6bb544dc5a706 | SQL | PearInJurassic/InfectStatisticWeb | /sql/infectstaticdb 2.0.sql | UTF-8 | 48,808 | 2.515625 | 3 | [] | no_license | /*
Navicat MySQL Data Transfer
Source Server : HW
Source Server Version : 50728
Source Host : localhost:3306
Source Database : infectstaticdb
Target Server Type : MYSQL
Target Server Version : 50728
File Encoding : 65001
Date: 2020-03-13 19:30:46
*/
SET FOREIGN_KEY_CHECKS=0;
-- -... | true |
a94cea77810b50390f739e95f11fad69cb81dbef | SQL | Complex-Cormorant/questions-and-answers | /Postgres/postgres-q-and-a.sql | UTF-8 | 803 | 3.1875 | 3 | [] | no_license | CREATE TABLE questions(
question_id SERIAL NOT NULL PRIMARY KEY,
product_id INT NOT NULL,
question_body VARCHAR(1000) NOT NULL,
question_date BIGINT NOT NULL,
asker_name VARCHAR(60) NOT NULL,
email VARCHAR(60) NOT NULL,
reported BOOLEAN DEFAULT false,
question_helpfulness SMALLINT DEFAULT 0
);
CREATE T... | true |
1d2f36cdc54180fbb51db051022ef1b58a28e3f2 | SQL | quepasapedro/portfolio | /sql/onboarding_outcome_variance/onboarding_metric_alert_code.sql | UTF-8 | 3,212 | 3.71875 | 4 | [] | no_license | SELECT
applied_hour,
Enrolled_variance_sqrt,
Rejected_variance_sqrt,
IDV_variance_sqrt,
Auto_variance_sqrt,
CASE
WHEN (Enrolled_variance_sqrt >= 1.2 AND Rejected_variance_sqrt >= 1.2)
OR (Enrolled_variance_sqrt >= 1.2 AND IDV_variance_sqrt >= 1.2)
OR (Enrolled_variance_sqrt >... | true |
295331255e0143d21c3e206385692f4c96ced1ad | SQL | Woodu/sg_f | /fox_sv/socialsv/sql/fox_udb/update/create_user_tournament_card_data_1487.sql | UTF-8 | 18,410 | 3.078125 | 3 | [] | no_license | CREATE TABLE fox_udb0.user_tournament_card_data (
tournament_card_id BIGINT AUTO_INCREMENT PRIMARY KEY,
user_id INTEGER NOT NULL, -- ユーザーID
card_id BIGINT NOT NULL DEFAULT 0, -- カードID
card_type INTEGER NOT NULL DEFAULT 0, -- カードタイプ
base_id INTEGER NOT NULL DEFAULT 0, -- ベースID... | true |
070da9677d2bb7a3f7bb05ed853c0dccad22967a | SQL | microsoft/AzureSynapseScriptsAndAccelerators | /Assessment/Scripts/Snowflake/22. Query History.sql | UTF-8 | 194 | 2.625 | 3 | [
"LicenseRef-scancode-generic-cla",
"MIT"
] | permissive | -- Query for: 22. Query History
select * from table(information_schema.query_history(
end_time_range_start=>dateadd(d,-6,current_timestamp),
end_time_range_end=>current_timestamp));
| true |
dbdfbbaf5224aaa72dc61f825704e9072d8644ab | SQL | Akash-Macha/ServiceTicketResolutionSystem_SpringBoot | /Database Each Table Scripts/strs_hiber_department.sql | UTF-8 | 2,097 | 3.0625 | 3 | [] | no_license | -- MySQL dump 10.13 Distrib 8.0.16, for Win64 (x86_64)
--
-- Host: localhost Database: strs_hiber
-- ------------------------------------------------------
-- Server version 8.0.16
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
... | true |
5b3d7cb3ac3014678e8ee568dfc77a2b9bbe5975 | SQL | Igamegum/Utils | /Database/dump.sql | GB18030 | 3,782 | 3.5 | 4 | [] | no_license | -- MySQL dump 10.13 Distrib 5.7.17, for Linux (x86_64)
--
-- Host: localhost Database: face_2_3_0
-- ------------------------------------------------------
-- Server version 5.7.17-0ubuntu0.16.04.1
--
-- Table structure for table `face`
--
DROP TABLE IF EXISTS `face`;
CREATE TABLE `face` (
`userId` varchar(25... | true |
b58f13ccd1cfc44dcd803ca4ae023bde4cbf753f | SQL | haardikgupta17/Data-Warehousing-for-Business-Intelligence | /Database Management Essentials/Week 3/Week 3 Lesson 5 Examples.sql | UTF-8 | 600 | 3.046875 | 3 | [] | no_license | -- Example 1:
INSERT INTO Student
(StdNo, StdFirstName, StdLastName, StdCity, StdState, StdZip, StdClass, StdMajor, StdGPA)
VALUES ('99-99-9999', 'JOE', 'STUDENT', 'SEATAC', 'WA', '98042-1121', 'FR', 'IS', 0.0);
SELECT *
FROM Student
WHERE StdNo = '99-99-9999';
-- Example 2
SET sql_safe_updates = 0;
UPDATE S... | true |
3727b70e95139bcab1599a0a3088132cc2692b0d | SQL | desdevol/ezdine | /ezdine.sql | UTF-8 | 13,169 | 3.125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.8.0
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Nov 29, 2018 at 08:22 PM
-- Server version: 10.1.31-MariaDB
-- PHP Version: 7.2.4
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD... | true |
3853d3586d66d76903409ce87e6261af48026343 | SQL | silentbalanceyh/vertx-zero | /vertx-pin/zero-tpl/src/main/resources/plugin/sql/tpl/TPL_TICKET.sql | UTF-8 | 2,244 | 3.765625 | 4 | [
"LicenseRef-scancode-unknown-license-reference",
"Apache-2.0",
"LicenseRef-scancode-warranty-disclaimer"
] | permissive | -- liquibase formatted sql
-- changeset Lang:tpl-ticket-1
-- 模板表:TPL_TICKET
DROP TABLE IF EXISTS TPL_TICKET;
CREATE TABLE IF NOT EXISTS TPL_TICKET
(
`KEY` VARCHAR(36) NOT NULL COMMENT '「key」- 增量记录ID',
`CODE` VARCHAR(50) NOT NULL COMMENT '「code」- 编码',
`NAME` VARCHAR(50) ... | true |
28d860ccbab6780fb22682cd050845ea10b3dc29 | SQL | mgmilton/learn_sql_hard_way | /code_ex1_ex14/code.sql | UTF-8 | 1,344 | 3.765625 | 4 | [] | no_license | DROP TABLE IF EXISTS person;
DROP TABLE IF EXISTS pet;
DROP TABLE IF EXISTS person_pet;
CREATE TABLE person (
id INTEGER PRIMARY KEY,
first_name TEXT,
last_name TEXT,
age INTEGER
);
CREATE TABLE pet (
id INTEGER PRIMARY KEY,
name TEXT,
breed TEXT,
age INTEGER,
dead INTEGER
);
CREA... | true |
7de5dd7c65ee1cc92e8566a68296e1d9085d013a | SQL | harsh-a1/amr_analytics | /amr_sample_organism_count.sql | UTF-8 | 2,335 | 4.03125 | 4 | [] | no_license |
select de_aggid as deid,
organism.sourceid,
organism.startdate,
organism.enddate,
p.periodid,
categoryoptioncomboid,
count(organism.value) as value
from (
select psi.programstageinstanceid,
to_char(executiondate, 'yyyy-mm-01')::date as startdate,
(date_trunc('month',executiondate)+interval '1 month' - inte... | true |
0ae44017fd399df4c3b8056f9715479f4a7b2c7e | SQL | delasalle-sio-olivon/PortailFull | /script/portail.sql | UTF-8 | 13,122 | 2.890625 | 3 | [
"MIT"
] | permissive |
--
-- Base de données : portail
--
-- --------------------------------------------------------
--
-- Structure de la table categories
--
CREATE TABLE categories (
id serial NOT NULL,
unix varchar(255) NOT NULL,
titre varchar(255) NOT NULL,
resume varchar(255) NOT NULL,
detail varchar(255) NOT NULL,
... | true |
75447f9315b20c0a980edb21bc017849b0860fe7 | SQL | schraj/ActionApp | /Database/MySql/TestData.sql | UTF-8 | 2,006 | 3.25 | 3 | [] | no_license | delete from `actionapp`.`issue`
where ID <= 3;
delete from `actionapp`.`actionitem`
where ID=1;
INSERT INTO `actionapp`.`channel`
(
`ChannelName`,
`ChannelDescription`)
VALUES
('test channel', 'test c desc');
INSERT INTO `actionapp`.`issue`
(
`Channel_ID`,
`IssueName`,
`IssueDescription`)
VALUES
(1,'Appointment of... | true |
993798c7c6f9e607a7ac8613e5373c361ab74f3f | SQL | SocialGouv/emjpm | /packages/hasura/migrations/default/1620203322354_replace_tgrm_search_functions_by_unaccented/up.sql | UTF-8 | 5,073 | 3.125 | 3 | [
"Apache-2.0"
] | permissive | CREATE OR REPLACE FUNCTION public.search_lb_users(search text)
RETURNS SETOF lb_users
LANGUAGE sql
STABLE
AS $function$
SELECT *
FROM lb_users
WHERE
search IS NULL OR f_unaccent(search) <% f_unaccent(CONCAT_WS(' ', siret, nom, prenom, code_postal, ville, adresse1, adresse2, email))
ORDER BY
... | true |
cbcada6d764543369860c6857dd76b13327bc699 | SQL | vardanaivazian/cma | /src/main/resources/schema.sql | UTF-8 | 3,357 | 3.34375 | 3 | [] | no_license | /*
SQLyog Community v13.1.1 (64 bit)
MySQL - 5.7.25-log : Database - cma-db
*********************************************************************
*/
/*!40101 SET NAMES utf8 */;
/*!40101 SET SQL_MODE=''*/;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FORE... | true |
4e5e1c21825cd00b3e7554b3df8758111004098b | SQL | YauheniD/GodelDataMasteryPart1 | /Tasks/Vadzim/Task3_1/query06.sql | UTF-8 | 292 | 3.640625 | 4 | [] | no_license | --Query 6
SELECT TOP(10)
ssod.SalesOrderID,
MAX(ssod.LineTotal) AS TotalPrice
FROM Sales.SalesOrderDetail AS ssod
JOIN Sales.SalesOrderHeader AS ssoh ON (ssod.SalesOrderID = ssoh.SalesOrderID)
WHERE YEAR(ssoh.OrderDate) = 2011
GROUP BY ssod.SalesOrderID
ORDER BY TotalPrice DESC
;
| true |
324f2b6f8b3297598aae9501c467a382e5b9582c | SQL | paulhoffman98/SQL | /HW4.sql | UTF-8 | 5,206 | 4.75 | 5 | [] | no_license | use glassesshipping;
/*1) From orders table, list orderid, shopid, productid, and
price paid for each order. Please consider the list price of
products for orders with no price paid.*/
SELECT OrderID, ShopID, ProductID, PricePaid, ListPrice
FROM orders
JOIN products using(ProductID)
WHERE PricePaid is Null;
/*2) F... | true |
1b110d6de96386df9b6b35d91ee924d76dfb88f0 | SQL | tsebal/JavaRushTasks | /3.JavaMultithreading/src/com/javarush/task/sql/task03/task0350/query.sql | UTF-8 | 486 | 3.78125 | 4 | [] | no_license | -- Write your code here:
WITH tempTable(averageGrossed) AS (SELECT AVG(grossed)
FROM films),
tempTable2(averageYearReleased) AS (SELECT AVG(year_released)
FROM films)
SELECT title
, genre
, year_released
, grossed
FROM films... | true |
a8599da0cc3f6cda99915420ad9699a951caa569 | SQL | JaysonRice/nss-mastering-sql-queries | /carnival_reports_BK2.sql | UTF-8 | 2,734 | 4.625 | 5 | [] | no_license | -- Creating Carnival Reports
-- Team Project: Carnival Database
-- Who are the top 5 employees for generating sales income?
SELECT CONCAT(e.first_name, ' ', e.last_name) as employee_name, SUM (s.price) AS total_income
FROM sales s
JOIN employees e ON s.employee_id = e.employee_id
GROUP BY e.employee_id
ORDER BY total... | true |
231959c54648e9970e4f3c40113ba2c377a3c63d | SQL | stepheku/cclqueries | /scheduling/order_catalog_synonym_to_scheduling.sql | UTF-8 | 1,298 | 3.65625 | 4 | [
"MIT"
] | permissive | /*
order_catalog_synonym_to_scheduling.sql
~~~~~~~~~~~~~~~~~~~~
Grabs order catalog synonyms that are linked to a scheduling
appointment type
*/
select primary = oc.primary_mnemonic
, synonym = ocs.mnemonic
, synonym_oef = oef1.oe_format_name
, s.synonym_id
, appt_type = uar_get_code_display(s.appt_typ... | true |
7cc483d4628eb70ecd353cbd861b7fbe88ea8e43 | SQL | rita-choi/cafeinme | /src/main/webapp/resources/mysql/cafe_list.sql | UTF-8 | 983 | 3.71875 | 4 | [] | no_license | -- 데이터 베이스 생성 (utf8)
CREATE DATABASE cafedb DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;
-- 카페 목록 생성
CREATE TABLE cafe_list (
cno INT NOT NULL AUTO_INCREMENT,
cafename VARCHAR(200) NOT NULL,
content VARCHAR(1000) NOT NULL,
location VARCHAR(200) NOT NULL,
writer VARCHAR(50) NOT NULL,
regdate TIMEST... | true |
4fc451966512337c67dcdcb7913e9370eadaa972 | SQL | radiantnode/tv-listings-updater | /schema.sql | UTF-8 | 680 | 3.03125 | 3 | [
"MIT"
] | permissive | CREATE TABLE `entries` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`Title` varchar(255) DEFAULT NULL,
`EpisodeTitle` varchar(255) DEFAULT NULL,
`Description` TEXT DEFAULT NULL,
`AiringTime` datetime DEFAULT NULL,
`Duration` int(11) DEFAULT NULL,
`ChannelNumber` int(11) DEFAULT NULL,
`ChannelCallsign` varcha... | true |
a1e652fae5146662b11ebd5aae8238062930d40e | SQL | carlos-sierra/cscripts | /metadata_ddl.sql | UTF-8 | 3,778 | 3.25 | 3 | [] | no_license | DEF 1 = 'C##IOD';
PRO dbc_dbcps_pdb_metadata. persistent
DECLARE
l_exists NUMBER;
l_sql_statement VARCHAR2(32767) := q'[
CREATE TABLE &&1..dbc_dbcps_pdb_metadata (
-- /* key: id and pdb_name */
id NUMBER NOT NULL -- should be enough for uniqueness but sea has two pdbs DB... | true |
1b763073e4fb625884f165c44a961c0d531fd9b3 | SQL | ethanholda/FriendsShelter | /TABLES.sql | UTF-8 | 1,000 | 3.015625 | 3 | [] | no_license | CREATE TABLE `users` (
`user_id` int(10) NOT NULL auto_increment,
`email` varchar(60) NOT NULL default '',
`password` varchar(8) NOT NULL default '',
`first_name` varchar(50) default NULL,
`last_name` varchar(50) default NULL,
`street_address` varchar(60) default NULL,
`city` varchar(30) default NULL,
`... | true |
8a9ecab91ad34a1c897d68031b5602c0d8b2bc1d | SQL | DamiSxM/CDI | /MOD2/SEQ2/SEA1/A1/MOD2_SEQ2_SEA1_A1_1.2h.sql | UTF-8 | 461 | 3.75 | 4 | [] | no_license | --Quels sont les noms des pilotes qui habitent dans la ville de localisation d'un Airbus ? ME & MP
select distinct Nom, Ville, Localisation from Pilote
join vol on Pilote.Pil# = vol.Pilote
join avion on vol.Avion = avion.Av#
where avion.Localisation = Pilote.Ville
and Marque = 'AIRBUS'
select distinct Nom, Ville from... | true |
7e20585ab992e56901af2f21142081b1d193ae23 | SQL | MeGaDeTH91/SoftUni | /Java/02.DB/01.MySQL/07.BuiltInFuncs/Ex/05.FindTownByTownName.sql | UTF-8 | 76 | 2.75 | 3 | [] | no_license | SELECT `name`
FROM `towns`
WHERE LENGTH(`name`) IN(5,6)
ORDER BY `name` ASC; | true |
b6ba5e2f8969c45334c7b9451ada336d4e5e4b70 | SQL | tuankietdut/C0421G1_TranXuanTuanKiet_Module3 | /4_cac_ham_csdl/bai_tap/bai_tap_lesson4.sql | UTF-8 | 477 | 3.59375 | 4 | [] | no_license | use quan_li_sinh_vien;
select *
from `subject`
where credit = (select max(credit) from `subject`);
select `subject`.subject_name, mark.mark as so_diem_cao_nhat
from mark inner join `subject` on mark.subject_id = `subject`.subject_id
where mark = (select max(mark) from mark);
select s.student_name,s.address, s.phone... | true |
29db15193665f15a3970b95d1ecb82d0bc9bb1a4 | SQL | shsuk/jojesus | /WebContent/WEB-INF/sql/system/wf/working_job.sql | UTF-8 | 722 | 3.40625 | 3 | [] | no_license |
SELECT wf_job_id
FROM workflow_job_tbl
WHERE job_status in ('WAT','RET')
and next_run_dt <= now()
LIMIT 0, 1;
UPDATE workflow_job_tbl
SET
job_status = 'RUN',
run_ip = @{run_ip},
last_run_dt = now()
WHERE wf_job_id = @{this.wf_job_id};
SELECT
t1.wf_job_id,
t1.wf_id,
current_wf_proc_id,
... | true |
fa2504827c39809b4864426a6d74c2947e7786ac | SQL | relativelimited/argent-cloudkit | /argent/argent-cloudkit.sql | UTF-8 | 6,238 | 3.375 | 3 | [] | no_license | -- Argent CloudKit Database Structure
-- version 1.2.0
-- http://www.argentcloudkit.com/
--
CREATE TABLE IF NOT EXISTS `ua_accounts` (
`meta_guid` varchar(32) NOT NULL,
`object_id` varchar(40) NOT NULL,
`account_status` set('NEW','ACTIVE','SUSPENDED','DELETED') NOT NULL,
`meta_timestamp` datetime NOT ... | true |
e03860697faf14bf4555322027145fa69a4ef830 | SQL | HTTPArchive/almanac.httparchive.org | /sql/2019/cdn/17_03.sql | UTF-8 | 627 | 3.21875 | 3 | [
"Apache-2.0"
] | permissive | #standardSQL
# 07_03: Percentiles of TTFB for CDN
SELECT
client,
cdn,
COUNT(0) AS requests,
APPROX_QUANTILES(ttfb, 1000)[OFFSET(100)] AS p10,
APPROX_QUANTILES(ttfb, 1000)[OFFSET(250)] AS p25,
APPROX_QUANTILES(ttfb, 1000)[OFFSET(500)] AS p50,
APPROX_QUANTILES(ttfb, 1000)[OFFSET(750)] AS p75,
APPROX_QUANT... | true |
372e33e9830114379e494859a5ba54faf7f309af | SQL | vishnuasabe/attbysanket | /database/attsystem.sql | UTF-8 | 5,938 | 3 | 3 | [
"MIT"
] | permissive | -- phpMyAdmin SQL Dump
-- version 4.2.11
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Jul 07, 2018 at 03:23 AM
-- Server version: 5.6.21
-- PHP Version: 5.5.19
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;... | true |
3848d8cc6cb402c19c34868bf2afe2a165f53283 | SQL | MariyamB/Big-Data-Management | /Hive/Hive_HW/Hive_Assignment_Script_File.sql | UTF-8 | 3,266 | 4.625 | 5 | [] | no_license | -- Name: Mariyam Rajeev George
-- Hive Assignment
/*Write a set of Hive scripts that load these files into a staging external table called, Teller.
Create a managed partitioned table, called PtTeller that partitions the rows in the table Teller
dynamically based on the teller’s name.*/
drop table Teller;
drop... | true |
95d33a796d20d749fd053f66d27e85f9a0bd31f8 | SQL | sxgan-code/MyMusicBoot | /Sql/Daniel.sql | UTF-8 | 2,329 | 3.203125 | 3 | [] | no_license | /*
Navicat Premium Data Transfer
Source Server : MySQL
Source Server Type : MySQL
Source Server Version : 80026
Source Host : localhost:3306
Source Schema : daniel
Target Server Type : MySQL
Target Server Version : 80026
File Encoding : 65001
Date: 24/08/2021 10:19:4... | true |
9007f338e81aae32c1d6919d2ee62d67c56fac4e | SQL | huyanh0720/Education-Project | /src/snowflake/REST API.sql | UTF-8 | 685 | 2.671875 | 3 | [] | no_license |
-------------------------------------
--CREATE SNOWPIPE ENDPOINT"PIPELINE_GROUP02"
--show stages in database "PIPELINE_GROUP02"
--show file formats in database "PIPELINE_GROUP02"
alter user HANK0720 set rsa_public_key = 'MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAxP20oUpVwtPYPuGnsyou
ySuD685+YMOUEQI583TSom5f4GBikCR... | true |
4e4f19572b6b28f63e3aced633424535eca6b4a0 | SQL | Maltasga/pi4-while-true | /Database/01 - Scripts/View SelectUsuarioCompleto.sql | UTF-8 | 409 | 3.375 | 3 | [
"MIT"
] | permissive | CREATE VIEW SELECT_USUARIO_COMPLETO
(
ID,
NOME,
EMAIL,
LOGIN,
SENHA,
ATIVO,
DT_CADASTRO,
ID_PERFIL,
NM_PERFIL
)
AS
(
SELECT
U.ID,
U.NOME,
U.EMAIL,
U.LOGIN,
U.SENHA,
U.ATIVO,
U.DT_CADASTRO,
P.ID AS 'ID_PERFIL',
... | true |
464e91f93c3d85ce2354050df44f9383295868e6 | SQL | wdb3ar/image-host | /image_host.sql | UTF-8 | 2,676 | 3.296875 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.5.4.1deb2ubuntu2
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Jan 29, 2018 at 04:41 PM
-- Server version: 5.7.21-0ubuntu0.16.04.1
-- PHP Version: 7.0.22-0ubuntu0.16.04.1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_C... | true |
d35b9e54d9382cbf57bdb0bdf8e5da14d3a933ad | SQL | mrv90/Sports-Mission-Control-System | /doc/WednesdaySql.sql | UTF-8 | 3,786 | 3.265625 | 3 | [] | no_license | ---- delete from pmamor where thozor = '[Empty Value]'
--select count(*) from pmamor
--select * from pmamor
------------------------------------------------------------------
---- همه مامورها؛ چه داخل تیم و چه داخل باشگاه، بدون قسمت
--select distinct daraje as N'درجه' , names as N'نامونشان', nameyegan as N'یگان', re... | true |
ba094715a62e9a0d9a9044c728e63af837fe5398 | SQL | kanchw/test | /modules/distribution/resources/migration/mssql.sql | UTF-8 | 1,057 | 2.703125 | 3 | [
"LicenseRef-scancode-unknown",
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference",
"EPL-1.0",
"Classpath-exception-2.0",
"GPL-2.0-only",
"BSD-3-Clause",
"MPL-1.0",
"MPL-2.0",
"EPL-2.0",
"LGPL-2.0-only",
"CDDL-1.0",
"MIT"
] | permissive | ALTER TABLE AM_SUBSCRIBER ALTER COLUMN USER_ID VARCHAR(255);
ALTER TABLE AM_APPLICATION ADD GROUP_ID VARCHAR(100);
ALTER TABLE AM_API ADD CONTEXT_TEMPLATE VARCHAR(256);
ALTER TABLE AM_APPLICATION_KEY_MAPPING ADD CREATE_MODE VARCHAR(30) DEFAULT 'CREATED';
ALTER TABLE AM_APPLICATION_REGISTRATION ADD TOKEN_SCOPE VARCHAR(2... | true |
f33aed2d970dcf8e6a8a812839b67e0e4108d0ab | SQL | andreanhk/intest | /SQL DB Lama/saptest.sql | UTF-8 | 80,050 | 2.90625 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.7.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Jun 03, 2018 at 10:30 AM
-- Server version: 10.1.30-MariaDB
-- PHP Version: 5.6.33
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OL... | true |
e7d5b18ed57ee7dd89059deb6ba490a7bd8f1725 | SQL | lungua/deseuri | /src/java/sql/triggerCantRezultataInsert.sql | UTF-8 | 696 | 2.96875 | 3 | [] | no_license | DELIMITER ||
drop trigger cantRezultataInsert ||
CREATE TRIGGER cantRezultataInsert
AFTER INSERT ON cantrezultata
FOR EACH ROW
BEGIN
DECLARE wcant double;
declare widMiscLuna integer;
set wcant=0.0;
set widMiscLuna=0;
set wcant= new.cantitate;
set widMiscLuna = new.MiscariLuna_... | true |
647e8bfd9b2298ba2d47804e938f60b447a78159 | SQL | EaglesReign/test1-CMP341 | /query7.sql | UTF-8 | 138 | 2.515625 | 3 | [] | no_license | //Increase the salaries of all employees making less than $40000 by 10%.
update employee set salary = salary * 1.1 where salary < 40000;
| true |
65f35f6e9a88b3f3392ed38c9561abbb98deef65 | SQL | JYunZhang/QuizDatebase | /q2.sql | UTF-8 | 877 | 4.21875 | 4 | [] | no_license | -- For all questions in the database, report the question ID, question text,
-- and the number of hints associated with it. For True-False questions, report
-- NULL as the number of hints (since True-False questions cannot have
-- hints).
drop table if exists q2 cascade;
create table q2(
qid VARCHAR(20),
questiontex... | true |
c9321286cc7907b08d8e237d62f7523ab6f5a0e4 | SQL | ahristoff/Database-Advanced | /1_DB_APPS_INTRODUCTION/Exercises/4/bin/Debug/netcoreapp1.1/MinionsData.sql | UTF-8 | 167 | 3.703125 | 4 | [] | no_license | SELECT m.Name as Mname, m.Age as age, t.Name as Tname FROM Minions AS m
join Towns as t on t.Id = m.TownId
where m.Name = @mname and m.Age =@age and t.Name = @tname | true |
477248274c12f7f2260a98dfbe8fc3e25ffa5f2b | SQL | nikiqta/MS-SQL | /Queries/EX-QUERIES JOINS.sql | UTF-8 | 7,729 | 4.53125 | 5 | [
"MIT"
] | permissive | USE SoftUni
-- 1. Employee Address
SELECT TOP (5)
e.EmployeeID,
e.JobTitle,
e.AddressID,
a.AddressText
FROM Employees
AS e
JOIN Addresses
AS a
ON e.AddressID = a.AddressID
ORDER BY e.AddressID
-- 2. Addresses with Towns
SELECT TOP (50)
e.Fi... | true |
2ad27728d5ee491ddc5161b28884e962f4f0157b | SQL | RedmondC/Information-Management-Final | /DatabaseQueries.sql | UTF-8 | 535 | 3.171875 | 3 | [] | no_license | USE info_project;
SELECT * FROM professor_public;
SELECT * FROM college_population;
SELECT * FROM student_public;
SELECT * FROM Student;
SELECT * FROM Is_contained_in;
SELECT * FROM Module_List;
SET @ExampleStudent := 10000000;
SELECT s.*,c.Module_List_Id,m.Module_Id,m.Module_Name
FROM Module_List l
LEFT JOI... | true |
586df5706cef53b1f22fb69708b9f9d8c853e5e7 | SQL | Alexidis/BasicMySQL | /database/temp_db_console.sql | UTF-8 | 7,217 | 3.765625 | 4 | [] | no_license | DROP TABLE IF EXISTS catalogs;
CREATE TABLE catalogs (
id SERIAL PRIMARY KEY,
name VARCHAR(255) COMMENT 'Название раздела',
UNIQUE unique_name(name(10))
) COMMENT = 'Разделы интернет-магазина';
INSERT INTO catalogs VALUES
(NULL, 'Процессоры'),
(NULL, 'Материнские платы'),
(NULL, 'Видеокарты'),
(NULL, 'Же... | true |
22d81949a482459afb2b9de2c9e9986faf73a317 | SQL | chrisjxn/vehicle-collection | /db/get_user_collection.sql | UTF-8 | 213 | 3.046875 | 3 | [] | no_license | SELECT
vehicles.id,
first_name as owner_first,
last_name as owner_last,
type,
color,
description,
photo_url
FROM vehicles
LEFT JOIN users ON users.id = vehicles.user_id
WHERE users.id = $1; | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.