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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
72f1e9aebc78157c8d63018324f70f345a29a0aa | SQL | uprightclear/2020Summer2_INFO6210 | /SQL/level1/SQL Date Functions.sql | UTF-8 | 1,504 | 3.375 | 3 | [] | no_license | SELECT SalesOrderID, OrderDate
FROM AdventureWorks2008R2.Sales.SalesOrderHeader
ORDER BY OrderDate DESC,SalesOrderID DESC;
/*Useful Date Functions */
SELECT TOP 10 SalesOrderID, OrderDate [Date and Time]
FROM Sales.SalesOrderHeader
ORDER BY TotalDue DESC;
/*Get Order Date Only*/
SELECT TOP 10 SalesOrderID, ... | true |
5b9202bbaa19090bc78819fcfd019e4945b86b67 | SQL | sufansufan/java-webapp | /db/sql/V1605184864__rtd_history_partition.sql | UTF-8 | 1,750 | 2.703125 | 3 | [] | no_license | alter table rtd_history drop primary key;
alter table rtd_history modify column collect_time datetime NOT NULL DEFAULT NOW();
ALTER TABLE `rtd_history` PARTITION BY RANGE(TO_DAYS(collect_time)) (
PARTITION `p0` VALUES LESS THAN (TO_DAYS('20201101')),
PARTITION `p1` VALUES LESS THAN (TO_DAYS('20201201')),
... | true |
5cdfbb7b9371f126f1a50b4bf51be8174a9b15ae | SQL | obusorezekiel/numbergame | /numbergame (1).sql | UTF-8 | 3,934 | 2.96875 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.6.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Sep 04, 2017 at 12:54 AM
-- Server version: 5.7.14
-- PHP Version: 5.6.25
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */... | true |
8976b8723bd3f65c089bf3df814df02115578ca8 | SQL | altamira/visualstudio | /Sistema de Informação Altamira/EGISSQL.Database/dbo/Stored Procedures/Procs2/pr_pesquisa_projetos_cq.sql | UTF-8 | 2,543 | 3.453125 | 3 | [] | no_license |
/****** Object: Stored Procedure dbo.pr_pesquisa_projetos_cq Script Date: 13/12/2002 15:08:38 ******/
--pr_pesquisa_projetos_cq
-----------------------------------------------------------------------------------
--Polimold Industrial S/A 2001 ... | true |
5b797d5d29e4e50d9d856ecc7e06820a032f62af | SQL | Ultraviolet1/Bamazon-app | /bamazon.sql | UTF-8 | 1,510 | 3.203125 | 3 | [] | no_license | Drop database if exists bamazon;
create database bamazon;
use bamazon;
create table products (
id int not null auto_increment,
product_name varchar(200) not null,
department_name varchar(200) not null,
price int(25) not null,
stock_quantity int(25) not null,
primary key (id)
);
insert into products(product_name, de... | true |
eb6f13aa8d63de8f50851657aa6f0d630396e831 | SQL | jeanramalalvarez/proyectos | /veterinaria/GestionMatrizSeconReload/src/main/java/com/gestionmatriz/script/sp_insertAsistencia.sql | UTF-8 | 590 | 2.53125 | 3 | [] | no_license | delimiter $$
CREATE DEFINER=`root`@`localhost` PROCEDURE `sp_insertAsistencia`(
IN asistencia int,
IN idHorario int,
IN idJornada int,
IN idContrato int,
IN fecha date,
IN hora time,
IN tipoMarcado int,
IN estadoMarcado varchar(1)
)
BEGIN
INSERT INTO `matriz`.`tb_asis... | true |
0fee9826230b288ca7b926621b722bb0b2d2e1a1 | SQL | theprincec/te-capstone | /java/database/temp.sql | UTF-8 | 1,167 | 3.5625 | 4 | [] | no_license | START TRANSACTION;
INSERT INTO doctors (doctor_id, user_id, first_name, last_name, office_id) VALUES (DEFAULT, 1000, 'James', 'Brown', 1000);
UPDATE doctors SET office_id = 1 WHERE doctor_id = 1;
START TRANSACTION;
ROLLBACK;
INSERT INTO offices (office_id, office_name, address, city, district, postal_code, phone, op... | true |
e4f1cdddba84f19a1a0c8bb7adbce0ce1f221201 | SQL | ditor4ik/StudentsDB | /GIBDD.sql | UTF-8 | 4,145 | 3.484375 | 3 | [] | no_license | CREATE TABLE Должности
(
Наименование_должности VARCHAR NOT NULL,
Оклад INT NOT NULL,
Обязанности VARCHAR NOT NULL,
Требования VARCHAR NOT NULL,
Код_должности INT NOT NULL,
PRIMARY KEY (Код_должности)
);
CREATE TABLE Звания
(
Наименование VARCHAR NOT NULL,
Надбавка INT NOT NULL,
Обязанности VARCHAR ... | true |
f8c77cd86a4fdc416b232343bd91521c12157f0c | SQL | aldvine/oracle_vpd | /createVPD_ADMIN18.sql | UTF-8 | 3,976 | 3.578125 | 4 | [] | no_license | /** SCRIPT CREATION VPD */
/** CREATION POLICY POUR LA TABLE USERS */
BEGIN
DBMS_RLS.DROP_POLICY ('ADMIN18','USERS','users_policy');
END;
/
BEGIN
DBMS_RLS.ADD_POLICY (
object_schema => 'ADMIN18',
object_name => 'USERS',
policy_name => 'users_policy',
function_schema => 'ADMIN18',
policy_fu... | true |
dfb048847f6d4c8d15deb131faea64aa6e1e2884 | SQL | amri-hidayatulloh/rest-apis-payment-test | /db/base.sql | UTF-8 | 3,069 | 3.390625 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.9.1
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Generation Time: May 25, 2021 at 02:53 PM
-- Server version: 10.4.8-MariaDB
-- PHP Version: 7.1.32
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD... | true |
39d2fa0faa227cbf44d37f5d22802db81a33cba6 | SQL | open-infinity/cmt | /cloud/cloud-repository/src/test/resources/sql/cloud/H2/populate_tables.sql | UTF-8 | 6,384 | 2.796875 | 3 | [] | no_license |
insert into cluster_type_tbl (configuration_id, name, title, dependency, replicated, min_machines, max_machines, min_repl_machines, max_repl_machines )
values(1, 'ig', 'Identity Gateway', -1, false, 1, 12, null, null);
insert into cluster_type_tbl (configuration_id, name, title, dependency, replicated, min_machines... | true |
4a84f6c0518cf08588026231ed0b4e7c40d26733 | SQL | yalgun/Bil372_Odev2_6 | /Bil372_Homework/sql_scripts/submissions_generator.sql | UTF-8 | 212 | 2.734375 | 3 | [] | no_license |
create table Submissions(
SubmissionID int primary key,
prevSubmissionID int,
AuthenticationID int foreign key references [User](AuthenticationID),
ConfID Varchar(20) foreign key references Conference(ConfID)
)
| true |
54dd96353c5197dbbee66919d333a1e5d2c2c5a4 | SQL | Aristiklever-R-Sousa/CRUD-Laravel-Project | /DER/doctoroffice.sql | UTF-8 | 3,409 | 3.46875 | 3 | [] | no_license | -- MySQL Script generated by MySQL Workbench
-- Tue May 4 17:26:23 2021
-- 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='ON... | true |
7ca814333569840075a11a72c6b586b8514d7b40 | SQL | hackeziah/EFB_CodeIgiter | /EFB_accounting/db_efb.sql | UTF-8 | 14,602 | 3 | 3 | [
"LicenseRef-scancode-unknown-license-reference",
"MIT"
] | permissive | -- phpMyAdmin SQL Dump
-- version 4.6.5.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Oct 22, 2017 at 11:58 PM
-- Server version: 10.1.21-MariaDB
-- PHP Version: 5.6.30
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SE... | true |
4a401201252929b4ee567cfc88ce7386809aecaa | SQL | aadityatadas/nabhitsolutions | /csv/CI CSV Import/ciaddressimport.sql | UTF-8 | 2,360 | 2.859375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 3.5.1
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Jan 29, 2014 at 06:52 PM
-- Server version: 5.5.24-log
-- PHP Version: 5.3.13
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */... | true |
9b64465bb21455ae9a8b06cee7438ce588c39c0f | SQL | mailliam/ITK-I244 | /Kodused ülesanded/11. nädal/ylesanne.sql | UTF-8 | 656 | 3.171875 | 3 | [] | no_license | CREATE TABLE mkeerus_loomaaed (
id integer PRIMARY KEY auto_increment,
nimi text,
vanus integer,
liik text,
puur integer
);
INSERT INTO mkeerus_loomaaed (nimi, vanus, liik, puur) VALUES
('Kunn', 23, 'lõvi', 2),
('Jänn', 6, 'jänes', 1),
('Repsu', 5, 'rebane', 3),
('Hundu', 12, 'hunt', 3),
('Reelika'... | true |
95abf1e280e24b1b1270afca2da5a5a51befe782 | SQL | joemontibello/iii-sql-queries | /spanlangfilms.sql | UTF-8 | 844 | 3.78125 | 4 | [] | no_license | SELECT record_num
FROM
(SELECT distinct
'b' || bib_view.record_num || 'a' AS record_num,
bib_view.cataloging_date_gmt
FROM
sierra_view.bib_view,
sierra_view.control_field,
sierra_view.bib_record_item_record_link,
sierra_view.item_record
WHERE
bib_view.bcode3 = E'-' --bib status
AND bib_view.id = control_field.recor... | true |
7596bdf1abe0b3778f859ada78d00ddb2cf55c44 | SQL | abrehamgezahegn/graphql-experss | /prisma/migrations/20210813211356_added_shopify_session/migration.sql | UTF-8 | 195 | 2.703125 | 3 | [] | no_license | -- CreateTable
CREATE TABLE "store" (
"id" TEXT NOT NULL,
"shop" TEXT NOT NULL,
"accessToken" TEXT NOT NULL
);
-- CreateIndex
CREATE UNIQUE INDEX "store.id_unique" ON "store"("id");
| true |
4a6761d7676cfd8c5f18083bbec5bbe2bba225e5 | SQL | acmlmboard/acmlmboard-2 | /sql/old/updates/spritecateg.sql | UTF-8 | 499 | 3.0625 | 3 | [] | no_license | #Creates and populates a table used to show franchise names on sprites.
#Date: 1/27/2014
CREATE TABLE `spritecateg` (
`id` INT NOT NULL,
`name` VARCHAR( 32 ) NOT NULL
) ENGINE = MYISAM ;
INSERT INTO `spritecateg` (`id`, `name`) VALUES ('0', 'Miscellaneous/Unclassified'), ('1', 'Super Mario Brothers Series'), ('2', 'Le... | true |
6744ff55423880c63ecba444e315936a9a78219b | SQL | ihe-brasil/gazelle | /gazelle-tm/gazelle-tm-ear/src/main/scripts/itb_scripts/[update]-tf_hl7_message_profile.sql | UTF-8 | 7,919 | 2.96875 | 3 | [] | no_license | /* This update script updates the profile_content column in database table tf_hl7_message_profile with the */
/* contents of the gazelle profile XML file(s). The script requires that the profile XML files must be present */
/* in the gazelle_hl7_profiles folder of the postgres data directory. For example, in window... | true |
0110de6cacbe70e05f129bff23611de3679a5808 | SQL | z4444a/AIM | /misc/database/changesets/master/AIM-011.sql | UTF-8 | 903 | 3.390625 | 3 | [] | no_license | CREATE SEQUENCE aim.pool_parameter_value_seq;
CREATE TABLE aim.pool_parameter_values(
parameter_value_id integer PRIMARY KEY DEFAULT nextval('aim.pool_parameter_value_seq'),
parameter_id integer NOT NULL,
pool_id integer NOT NULL,
number_value integer,
string_value ... | true |
fa90a351628426f2c883ded7b84c588062071f95 | SQL | novikor/sqlc | /sql/mysql/procedures.sql | UTF-8 | 292 | 2.734375 | 3 | [] | no_license | DROP PROCEDURE IF EXISTS clearTable;
DELIMITER 1488;
CREATE PROCEDURE clearTable(tableName VARCHAR(30))
BEGIN
SET @query = CONCAT('TRUNCATE ', tableName);
PREPARE statement FROM @query;
EXECUTE statement;
DEALLOCATE PREPARE statement;
END;
1488;
CALL clearTable('text'); | true |
50b6b5a079a6c63febaae4e0870dcda25785df17 | SQL | meyerAlexis/tuto-sql | /car.sql | UTF-8 | 82,983 | 2.671875 | 3 | [] | no_license | create table car (
id BIGSERIAL NOT NULL PRIMARY KEY,
make VARCHAR(100) NOT NULL,
model VARCHAR(100) NOT NULL,
price NUMERIC (19, 2) NOT NULL
);
insert into car (id, make, model, price) values (1, 'Mitsubishi', 'Chariot', 72853);
insert into car (id, make, model, price) values (2, 'Nissan', 'Pathfinder', 70458);
in... | true |
5194b742f5fe8df91d567a648adc3e2a68b0374f | SQL | paulo280799/RegistraClinicPscicoWEB | /RegistraClinicPsico_WEB/Banco/Script.sql | UTF-8 | 8,732 | 2.9375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.8.5
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1:3306
-- Generation Time: 29-Ago-2019 às 23:24
-- Versão do servidor: 5.7.26
-- versão do PHP: 7.2.18
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!... | true |
6e2c85eab0b1eef797e5da2127c584c673f1ea2d | SQL | Nikunj1703/SchedulingApp | /SQLScripts/SFSystem_Scripts.sql | UTF-8 | 3,126 | 3.421875 | 3 | [] | no_license |
create table USERS
(
USER_ID INTEGER CONSTRAINT user_pk primary key GENERATED ALWAYS AS IDENTITY (START WITH 1, INCREMENT BY 1),
ULID VARCHAR(32),
PASSWORD VARCHAR(32),
ISADMIN INTEGER,
CREATED_TS TIMESTAMP,
LAST_UPDT_TS TIMESTAMP
);
create table REVIEW_COMMENT
(
COMMENT_ID INTEGER CONSTRAINT review_comment_p... | true |
df31ba8a5a6d06572882c04297e89e52fd483fcb | SQL | cruz-thomas-cory-caroline/master-of-music | /src/main/theorySeeder.sql | UTF-8 | 1,146 | 3 | 3 | [] | no_license | USE master_of_music_db;
INSERT INTO questions (id, question, game_id)VALUES
(1,'What scale does the Phrygian mode belong to?',2),
(2, 'What is the most common time signature?', 2),
(3, 'What is the third mode of the G Major Scale?',2),
(4,'Assuming a guitar is in standard tuning, what note is on the 5th fret of the lo... | true |
9d6e6d9bcaf7a7c653b2cd94597c69ed06184107 | SQL | battenadam04/EverythingBackpacker | /everythingbackpacker_2017-08-29.sql | UTF-8 | 7,748 | 3.25 | 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.5.5-10.1.19-MariaDB)
# Database: everythingbackpacker
# Generation Time: 2017-08-29 20:13:03 +0000
# *******************... | true |
0a2d5f8e61f416123676eee39c3681c808300f2d | SQL | kousuke-2047/individual_activity | /Oldmove/sql/oldmove.sql | UTF-8 | 2,528 | 3.15625 | 3 | [] | no_license | set names utf8;
set foreign_key_checks =0;
drop database if exists oldmove;
create database if not exists oldmove;
use oldmove;
drop table if exists battlemonster;
create table battlemonster(
id int not null primary key auto_increment,
name varchar(16),
menber int,
power int,
guard int,
hp int,
maxhp int,
mp... | true |
53da0bd5218f555220432dacce8e1ed1f9967772 | SQL | revaekap/BeStup | /db_setup.sql | UTF-8 | 3,981 | 3.03125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 5.0.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Waktu pembuatan: 26 Jul 2020 pada 13.58
-- Versi server: 10.4.11-MariaDB
-- Versi PHP: 7.4.2
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARA... | true |
a8ccf32c0e62583a3e894efed3451ff5b4112870 | SQL | cedricsam/Contributions | /quebec/donateurs.sql | UTF-8 | 1,416 | 2.96875 | 3 | [] | no_license | --
-- PostgreSQL database dump
--
SET statement_timeout = 0;
SET client_encoding = 'UTF8';
SET standard_conforming_strings = on;
SET check_function_bodies = false;
SET client_min_messages = warning;
SET search_path = public, pg_catalog;
SET default_tablespace = '';
SET default_with_oids = false;
--
-- Name: donate... | true |
73a68715c7839d4a2921dd332b251570521b6d40 | SQL | wpdud94/util_sql | /sql/mysql05_join.sql | UTF-8 | 7,101 | 4.34375 | 4 | [] | no_license | -- [Join] %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
/*
클래스간의 연간 = hasing
hasing 방법 = 필드 주입, 생성자 or setter
# 테이블 간 연간
- 부모자식 관계
- Foreign Key 갖는 쪽이 자식 : 그 테이블이 필드니까
- 이 외의 관계는 없다
# 용어
- join : 하나 이상의 테이블로부터 데이터를 질의하기 위해서 조인을 사용. 다수의 테이블을 활용하는 것
- selfjoin이 있어서 하나 이상이라고 하지만 보통은 두 개 이상임
*/
SELECT * FRO... | true |
19faf5f013900691f331a2d74f3bff709957fe81 | SQL | altamira/visualstudio | /Sistema de Informação Altamira/EGISADMIN.Database/dbo/Stored Procedures/sp_AlteraGrupoUsuario.sql | UTF-8 | 1,007 | 3.359375 | 3 | [] | no_license |
CREATE procedure sp_AlteraGrupoUsuario
--dados depois da execuçao (novos)
@nm_grupo_usuario varchar (40),
@sg_grupo_usuario char (10),
@ic_tipo_grupo_usuario char (1),
--dados antes da execuçao (antigos)
@cd_grupo_usuario_old int
/*,
@nm_grupo_usuario_old varchar (40),
@sg_grupo_usuario_old char (10),
@ic_tipo_grupo_... | true |
dfb8b44145cb3a5eaf935f18aeeb9ac0cce4e316 | SQL | RAJALAKSHMIRAJKUMAR/EI | /DYNAMIC MIGRATION SP/SP_TO_CHECK_CUSTOMER_LP_NOT_IN_UNIT_LP_VER_0_1_270622014.SQL | UTF-8 | 1,743 | 3.75 | 4 | [] | no_license | --version:0.1 --sdate:27/06/2014 --edate:27/06/2014 --issue:765 --commentno:205 --desc:CUSTOMER LP NOT IN UNIT LP --doneby:RL
DROP PROCEDURE IF EXISTS SP_TO_CHECK_CUSTOMER_LP_NOT_IN_UNIT_LP;
CREATE PROCEDURE SP_TO_CHECK_CUSTOMER_LP_NOT_IN_UNIT_LP()
BEGIN
DROP TABLE IF EXISTS TEMP_INV_DATE;
CREATE TABLE TEMP_INV_D... | true |
dddee6b00131ed024d2e245de762f17236c9f520 | SQL | Hung040299/bunbu-microservice | /database-microservice/cv_database.sql | UTF-8 | 2,637 | 4 | 4 | [] | no_license | create table cv_templates(
cv_template_id SERIAL primary key,
location varchar(50),
skill varchar(4000),
product varchar(4000),
link_img varchar (250),
user_role_id int,
created_at TIMESTAMP,
update_at TIMESTAMP
);
create index idx_cvtemplate_id on cv_templates(cv_template_id);
create table cvs(
cv_i... | true |
187cb4eac3c2a34590fa21fe953c203c9cec444e | SQL | 100dej/PlanningS | /Form/700/SQL Program Behavior/dbo.ProgExecuteAllTimeForChart.sql | UTF-8 | 492 | 3.046875 | 3 | [
"MIT"
] | permissive | create proc ProgExecuteAllTimeForChart (@Uname nvarchar(8)) as
select
case
when xTime <= 12 then 'AM'
else 'PM'
end as xTime,
sum(CountSuccessTime) as CountSuccessTime,
sum(CountErrorTime) as CountErrorTime,
sum(CountTotalTime) as CountTotalTime,
sum(SuccessTime) as SuccessTime,
sum(ErrorTime) ... | true |
602d4aabf1b03998c4cd6f4c0125d05e351be30c | SQL | brittacarroll/sql-marathon | /schema.sql | UTF-8 | 312 | 3.46875 | 3 | [] | no_license | DROP TABLE IF EXISTS movies;
DROP TABLE IF EXISTS categories;
CREATE TABLE categories(
id SERIAL PRIMARY KEY,
name VARCHAR(100) NOT NULL UNIQUE
);
CREATE TABLE movies(
id SERIAL PRIMARY KEY,
title VARCHAR(100) NOT NULL,
year INT,
category_id INT REFERENCES categories(id),
UNIQUE(title, year)
);
| true |
9441338b6426308e522ab10a8e5e977262822e41 | SQL | silence-do-good/stress-test-Postgres-and-MySQL | /dump/low/day23/select2215.sql | UTF-8 | 178 | 2.71875 | 3 | [] | no_license |
SELECT timeStamp, temperature FROM ThermometerOBSERVATION o
WHERE timestamp>'2017-11-22T22:15:00Z' AND timestamp<'2017-11-23T22:15:00Z' AND temperature>=41 AND temperature<=95
| true |
830edb25444b95abee8624a6b4d43166e7ec8f9c | SQL | cindygriffin/sql-scratch-capstone-turn-in | /Warby Parker/Warby_Parker_Cindy_Griffin.sql | UTF-8 | 1,454 | 4.21875 | 4 | [] | no_license | --Warby Parker Capstone
--Section 1.1
SELECT *
FROM survey
LIMIT 10;
--Section 1.2
SELECT question, COUNT (question)
FROM survey
GROUP BY question;
--Section 1.4
SELECT *
FROM quiz
LIMIT 5;
SELECT *
FROM home_try_on
LIMIT 5;
SELECT *
FROM purchase
LIMIT 5;
--Section 1.... | true |
415a3a0396a1fe8eb339d56de428f4f5aadc4241 | SQL | guptam/data-observability-in-practice | /queries/distribution/dist-query-rolling-avg.sql | UTF-8 | 524 | 4.03125 | 4 | [] | no_license | .headers on
WITH NULL_RATES AS(
SELECT
DATE_ADDED,
CAST(SUM(CASE WHEN AVG_TEMP IS NULL THEN 1 ELSE 0 END) AS FLOAT) / COUNT(*) AS AVG_TEMP_NULL_RATE
FROM
EXOPLANETS
GROUP BY
DATE_ADDED
),
NULL_WITH_AVG AS(
SELECT
*,
AVG(AVG_TEMP_NULL_RATE) OVER (
ORDER BY DATE_ADDED ASC
ROW... | true |
4dc25451e9a7d76388220caebb9e5a6357642217 | SQL | opentechinstitute/t4sj-queries | /990/countTermsSearchSpecificField.sql | UTF-8 | 365 | 3.65625 | 4 | [] | no_license | -- Or get all rows by omitting the group by clause
-- 'technology' in their ACTIVIDESCRI variable's value
SELECT
t.topic,
count(irs990)
FROM (
VALUES
('education'),
('technology')) t (topic)
JOIN irs990
ON to_tsvector('english', irs990.value) @@ to_tsquery('english', t.topic)
WHERE irs99... | true |
cb9922e2af1e318534153e5cd5004cd4fe835573 | SQL | unison/unison | /build/loading/aux/ncbi/sql/mim2gene-create.sql | UTF-8 | 343 | 3.125 | 3 | [
"LicenseRef-scancode-unknown-license-reference",
"Apache-2.0",
"CC-BY-4.0"
] | permissive | create table ncbi.mim2gene (
mim_id integer not null,
gene_id integer not null,
type text not null
) without oids;
create index mim2gene_mim_id on ncbi.mim2gene(mim_id);
create index mim2gene_gene_id on ncbi.mim2gene(gene_id);
comment on table ncbi.mim2gene is 'NCBI Entrez Gene <-> MIM mapping';
grant select on nc... | true |
a5402b6f8de75755a7b695b0a033d2c37a3f51cf | SQL | vladimirtitov/anonimvoting | /sql/anonim_voting_tallier.sql | UTF-8 | 3,339 | 3.09375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.7.0
-- https://www.phpmyadmin.net/
--
-- Host: localhost:3306
-- Generation Time: May 30, 2018 at 05:51 PM
-- Server version: 5.6.34-log
-- PHP Version: 7.2.1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD... | true |
429138adbb54b6dade4e7b0a76dbac2386b46cfa | SQL | qamatic/mintleaf | /core/src/test/resources/oracle/hrdb-changesets/hrdb-ddl-typeobjects.sql | UTF-8 | 1,219 | 3.25 | 3 | [
"MIT"
] | permissive | -- <ChangeSet id="create employee object type" delimiter="/" />
CREATE TYPE address_typ AS OBJECT (
street VARCHAR2(30),
city VARCHAR2(20),
state CHAR(2),
postal_code VARCHAR2(6) );
/
CREATE TYPE employee_typ AS OBJECT (
employee_id NUMBER(6),
first_name ... | true |
7ec7c6eaeb1c88d592e19cfccec3fdbaa3eefd16 | SQL | SylvainBeg/WinGear | /WinGear/src/DAO/db/content.sql | UTF-8 | 2,258 | 2.609375 | 3 | [] | no_license | INSERT INTO `t_article` (`art_id`, `art_title`, `art_content`, `art_image`, `art_price`, `categorie`) VALUES
(1, 'Sac tennis', 'Sac Pouvant transporter juqu''à 6 raquettes de tennis ! Idéal pour sportif confirmer','bag1.jpg',65,3),
(2, 'Résine blanche PROMO',' 5 pots de résine Blanche avec spray anti colle offert profi... | true |
dc0673faab0874262e96f9302ee8f40577ee27a2 | SQL | freym827/MedFund | /db/schema.sql | UTF-8 | 325 | 2.515625 | 3 | [
"MIT"
] | permissive | use chtueijpe3wq0j8w;
CREATE TABLE IF NOT EXISTS users (
user_id INT AUTO_INCREMENT PRIMARY KEY,
google_id VARCHAR(255) NOT NULL,
user_name VARCHAR(255),
user_email VARCHAR(255),
user_about VARCHAR(4000),
user_photo VARCHAR(60000),
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
) ENGINE=IN... | true |
d9ef841e21ad781b62f49f147b0a8b351f6d4259 | SQL | radtek/abs3 | /sql/mmfo/bars/Data/notportfolio_nbs.sql | UTF-8 | 1,618 | 3.15625 | 3 | [] | no_license | begin
delete notportfolio_nbs;
merge into notportfolio_nbs a
using (select '9802' nbs, null user_id, 'CCK' portfolio_code from dual union all
select '9122', null, 'CCK' from dual union all
select '9129', null, 'CCK' from dual union all
select ... | true |
36b61b1df05802dc69626498b61f4bb77701af30 | SQL | wfilip/wfilip | /views/V_STR_SKL_SUR.sql | WINDOWS-1250 | 15,876 | 3.4375 | 3 | [] | no_license | CREATE OR REPLACE FUNCTION ILOSC_DODATKU (pNR_OBR NUMBER, pIL_OBR NUMBER, pWSP1 NUMBER, pWSP2 NUMBER, pWSP3 NUMBER, pWSP4 NUMBER, pWSP5 NUMBER) RETURN NUMBER
AS
vNorma NUMBER(14,6) default 1;
vIlSzt NUMBER(10) default 1;
vWynik NUMBER(14,6);
BEGIN
for l in (select S.met_oblicz, L.nr_kol_param, L.czy_korekt_wym rodz... | true |
f765c26dd1a87b91aba777ca33b874cb914f2cd6 | SQL | alvarorl231/UCO-Practices | /SEGUNDO/BASES DE DATOS/p2/EJERCICIOS-P2.sql | WINDOWS-1252 | 2,628 | 4 | 4 | [] | no_license | /*1- Obtener el nombre de todos los votantes cuyo segundo apellido acaba en n.*/
SELECT NOMBRECOMPLETO FROM VOTANTES WHERE NOMBRECOMPLETO LIKE '%n';
/*2- Obtener el DNI de todos los votantes que tengan al menos tres 5s en su DNI.*/
SELECT DNI FROM VOTANTES WHERE DNI LIKE '%5%5%5%';
/*3- Obtener el nombre de aquello... | true |
55463279e27a677193228981561b0b292069a601 | SQL | productboardlabs/e-data-fest-dv | /queries.sql | UTF-8 | 1,095 | 3.578125 | 4 | [] | no_license | INSERT INTO beer_database
(name, id, brewery_id, cat_id, style_id, alcohol_by_volume, description, style, category, brewer)
VALUES ('pilsner urquell', 99999, 88888, '99', '99', 4.8, 'Very good anch tasty beer.', 'european lager', 'czech lager', 'pilsner urquell brewery in pilsen');
select *
from sat_beer
where name = ... | true |
24723235e5376c9dc9e4a23d5c90967c1b6982d9 | SQL | arrioja/shared-intranet-cene | /nomina/bd/personal.sql | UTF-8 | 158,922 | 3.1875 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 2.10.2
-- http://www.phpmyadmin.net
--
-- Servidor: localhost
-- Tiempo de generación: 28-03-2008 a las 16:59:35
-- Versión del servidor: 5.0.45
-- Versión de PHP: 5.2.3
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
--
-- Base de datos: `personal`
--
-- ----------------------------------... | true |
966b4cad3ec4b8d35d0c56f8fab9166405747b23 | SQL | paulalcabasa/Oracle-SQL-Files | /XXIPC_CUSTOMER_DETAIL_V.sql | UTF-8 | 9,162 | 3.296875 | 3 | [] | no_license | SELECT *
FROM XXIPC_CUSTOMER_DETAIL_V
where cust_account_id = 15094
and site_use_id = 10045;
drop view XXIPC_CUSTOMER_DETAIL_V;
commit;
CREATE VIEW XXIPC_CUSTOMER_DETAIL_V AS SELECT DISTINCT
hca1.account_number customer_number,
hca1.account_name,
hp1.party_name,
hca1.cust_account_id ,
... | true |
8e83aa70af0504b168daafc7eb1da7dc93cd37c9 | SQL | maraboinanishanth/DocSortGitRepository | /DocSort v1.0.0.5/DocSort CPA/DataBase Scripts/StoredProcedures/`sp_ShowScannedDocuments`.sql | UTF-8 | 440 | 3.546875 | 4 | [] | no_license | DELIMITER $$
USE `cpa-mysql`$$
DROP PROCEDURE IF EXISTS `sp_ShowScannedDocuments`$$
CREATE DEFINER=`root`@`localhost` PROCEDURE `sp_ShowScannedDocuments`()
BEGIN
SELECT d.*,f.*,sd.*,k.Keyword FROM tbl_documentslist d INNER JOIN
tbl_files f ON d.document_ID=f.File_ID LEFT JOIN
tbl_scanneddocumentresults sd ON d.Docum... | true |
6c3cb9efce32b5f7061782ec8be25249acc1e9f7 | SQL | patricknaka/Nova | /Views Nike/VW_NK_NFV_DET.sql | UTF-8 | 8,072 | 2.921875 | 3 | [] | no_license | SELECT DISTINCT
-- O campo CD_CIA foi incluido para diferenciar NIKE(13) E BUNZL(15)
--**********************************************************************************************************************************************************
13 CD_CIA,
CASE WHEN tcemm030.t$euca = ' ' then substr(tcemm124.t$grid... | true |
3a8c5db0d89517c46e4323c7d8b593dc10c0f608 | SQL | ministryofjustice/prison-visits-2 | /db/views/rejection_percentage_by_days_v01.sql | UTF-8 | 2,762 | 4.625 | 5 | [
"MIT",
"LicenseRef-scancode-proprietary-license"
] | permissive | WITH rejection_reasons AS (
SELECT visit_id, unnest(reasons) AS reason
FROM rejections
GROUP BY visit_id, reasons
),
rejected_visits_count_by_prison AS (
SELECT prisons.name AS prison_name,
prisons.id AS prison_id,
visits.created_at::date AS date,
COUNT(*) ... | true |
24dae672197ce1806db9128bba9708f3342b5c9b | SQL | 666riosmauricio/telefonia-movil | /servidor/sql/base de datos telefonia.sql | UTF-8 | 1,021 | 3.078125 | 3 | [] | no_license | create database Telefonia;
use Telefonia;
create table persona (
perId int not null,
perNombre varchar(50) not null,
perApellido varchar(50) not null,
perTelefonoFijo varchar(20) not null,
perFechaDeNacimiento varchar(20) not null,
perCedula varchar(20) not null primary key
);
create table linea (... | true |
54d30b0442373c80e78317b1ac2ffb43799ea647 | SQL | jmarca/calvad_areas | /sql/generate_membercells.sql | UTF-8 | 1,808 | 3.421875 | 3 | [
"MIT"
] | permissive | \t on
\o counties_grids.json
with allgrids as
(select distinct floor(grids.i_cell) || '_'|| floor(grids.j_cell) as cell,st_centroid(grids.geom4326) as centroid, grids.geom4326 as geom
from carbgrid.state4k grids
),
countygrids as
(select distinct c.cell, a.name as county, conum
from allgrids c
join pu... | true |
1874228c1ddc6edd2f1c2a6876d5a3a1a3352333 | SQL | palpriyanshu/express | /setup/sql/express_schema.sql | UTF-8 | 1,429 | 4.09375 | 4 | [] | no_license | PRAGMA foreign_keys = on;
DROP TABLE IF EXISTS users;
DROP TABLE IF EXISTS stories;
DROP TABLE IF EXISTS tags;
DROP TABLE IF EXISTS claps;
DROP TABLE IF EXISTS comments;
CREATE TABLE users (
id varchar(42) PRIMARY KEY,
github_id integer NOT NULL,
display_name text NOT NULL DEFAULT 'Expresser',
avatar_url text NOT... | true |
5184ac23502b007e5075ba095b51ba8208e86df0 | SQL | Jason-Cooke/bigquery-etl | /udf_js/json_extract_missing_cols.sql | UTF-8 | 3,157 | 4.28125 | 4 | [] | no_license | /*
Extract missing columns from additional properties.
More generally, get a list of nodes from a JSON blob.
param input: The JSON blob to explode
param indicates_node: An array of strings. If a key's value is an object, and contains one of these values,
that key is returned as a node.
param kn... | true |
0b932a9cb9c29033ffa6790e85f8efe72abc5d8b | SQL | jgialis/CSE111 | /Quizzes/Quiz4/Quiz-4/queries.sql | UTF-8 | 2,410 | 4.28125 | 4 | [] | no_license |
SELECT maker, type, min AS minPrice, max AS maxPrice
FROM (
SELECT maker, Product.type AS type, MIN(price) AS min, MAX(price) AS max
FROM Product, PC
WHERE
Product.model = PC.model AND
maker = 'A' AND
Product.type = 'pc'
UNION ALL
... | true |
fe8295a087beebdcdf3f8639292e84be07cf9494 | SQL | FelippeKZP/sistemaWEB | /farmacia.sql | UTF-8 | 18,796 | 3.25 | 3 | [] | no_license | -- Estrutura da tabela `cliente`
--
CREATE TABLE IF NOT EXISTS `cliente`
(
`id` int
(
11
) NOT NULL AUTO_INCREMENT,
`tipo_pessoa` varchar
(
20
) COLLATE utf8_bin NOT NULL,
`nome` varchar
(
80
) COLLATE utf8_bin NOT NULL,
`cpfCnpj` varchar
(
60
) COLLATE utf8_bin NOT NULL,
`rgIe` varchar
(
60
) COLL... | true |
8bfa7c59a537b423f65cc6a2111b19ca296c9fc8 | SQL | SamuelXing/MechanicalEngineeringTeachingWeb | /resourceSite/Resource_Site.sql | UTF-8 | 27,164 | 3.0625 | 3 | [] | no_license | -- MySQL dump 10.13 Distrib 5.6.24, for osx10.10 (x86_64)
--
-- Host: localhost Database: Resource_Site
-- ------------------------------------------------------
-- Server version 5.6.24
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULT... | true |
28d554ce51688ce2e360271d39088aa8b9533c42 | SQL | charuzain/BootcampX | /4_queries/assistance_requests_data.sql | UTF-8 | 436 | 3.59375 | 4 | [] | no_license | SELECT teachers.name AS teacher ,
students.name AS student,
assignments.name AS assignments,
(assistance_requests.completed_at - assistance_requests.started_at)AS duration
FROM assistance_requests
JOIN teachers ON assistance_requests.teacher_id = teachers.id
JOIN students ON assistance_requests.st... | true |
1b486faeb85e60b9ec4b16b31ba73266ced63963 | SQL | dburr/CXPS | /sql/createTables.sql | UTF-8 | 14,839 | 3.390625 | 3 | [] | no_license | -- --------------------------------------------------------
-- Host: 127.0.0.1
-- Server version: 5.7.11 - MySQL Community Server (GPL)
-- Server OS: Win64
-- HeidiSQL Version: 9.4.0.5125
-- --------------------------------------------------------
/*... | true |
d30ae9c10879ea529e7b2b3f01b28dee34a44ba5 | SQL | submersibletoaster/oolite-spa | /database/schema.sql | UTF-8 | 3,903 | 3.609375 | 4 | [] | no_license | PRAGMA foreign_keys=on;
create table economy (
economy integer primary key,
economy_description string
);
insert into economy values(0,'Rich Industrial');
insert into economy values(1,'Average Industrial');
insert into economy values(2,'Poor Industrial');
insert into economy values(3,'Mainly Industrial');
insert i... | true |
f333bb14743d97eab85f9c1b3fd718848812c6f0 | SQL | smwright/FTC-PAM | /database/queries/PAM_update_status_date_out.sql | UTF-8 | 815 | 3.453125 | 3 | [] | no_license | CREATE DEFINER=`cl45-acg-pam`@`%` PROCEDURE `PAM_update_status_date_out`()
NO SQL
BEGIN
DECLARE memberID_bfr INTEGER;
DECLARE statusDate_bfr DATE;
DECLARE finished INTEGER DEFAULT 0;
DECLARE update_cursor CURSOR FOR
SELECT memberID, date FROM memberstatuslog;
DECLARE CONTINUE HANDLER
FOR NOT FOUND SET finishe... | true |
e1e328e80993c3d9c95eaed9a24d56c8b7abecc2 | SQL | GoncharEvgeniy/Alevel-Trucking | /src/main/resources/sql/V1_17_create_table_order_goods.sql | UTF-8 | 410 | 3.109375 | 3 | [] | no_license | CREATE TABLE `order_goods`
(
`id_order` BIGINT(20) NOT NULL,
`id_goods` BIGINT(20) NOT NULL,
INDEX `FK_id_goods` (`id_goods`),
INDEX `FK_id_order_goods` (`id_order`),
CONSTRAINT `FK_id_order_goods` FOREIGN KEY (`id_order`) REFERENCES `orders` (`id`),
CONSTRAINT `FK_id_goods` FOREIGN KEY (`id_goo... | true |
561236648d23ed4364c18444ce2abe932502ea99 | SQL | laminas-api-tools/api-tools-oauth2 | /test/TestAsset/database/db_oauth2.sql | UTF-8 | 1,767 | 3.171875 | 3 | [] | permissive | PRAGMA foreign_keys=OFF;
BEGIN TRANSACTION;
CREATE TABLE oauth_access_tokens (
access_token VARCHAR(40) NOT NULL,
client_id VARCHAR(80) NOT NULL,
user_id VARCHAR(255),
expires TIMESTAMP NOT NULL,
scope VARCHAR(2000),
CONSTRAINT access_token_pk PRIMARY KEY (access_token)
);
CREATE TABLE oauth_aut... | true |
a5a1a4c4838a9edba3809bc2cd7c313f72c882c5 | SQL | Ralph85/sql-crowdfunding-lab-online-web-ft-011419 | /lib/insert.sql | UTF-8 | 1,806 | 2.828125 | 3 | [
"LicenseRef-scancode-unknown-license-reference",
"LicenseRef-scancode-public-domain"
] | permissive | INSERT INTO users (id, name, age) VALUES
(1, "James", 18),
(2, "Willis", 33),
(3, "Iris", 29),
(4, "Kaitline", 29),
(5, "Oliver", 25),
(6, "Esther", 58),
(7, "Lucy", 37),
(8, "Nora", 22),
(9, "Ashley", 39),
(10, "Rico", 37),
(11, "Mariah", 15),
(12, "Pablo", 8),
(13, "Jenny", 6),
(14, "Tia", 17),
(15, "Marvin", 11),
(1... | true |
80f517f5bd43288c330e4c63a511b497b982e75f | SQL | ikrelln/ikrelln | /migrations/2018-01-23-220231_span/up.sql | UTF-8 | 1,463 | 3.796875 | 4 | [
"Apache-2.0"
] | permissive | CREATE TABLE endpoint
(
endpoint_id VARCHAR(36) NOT NULL PRIMARY KEY,
service_name VARCHAR(255),
ipv4 VARCHAR(30),
ipv6 VARCHAR(50),
port INT,
CONSTRAINT UC_Endpoint UNIQUE (service_name, ipv4, ipv6, port)
);
CREATE UNIQUE INDEX UC_Endpoint_name ON endpoint (service_name) WHERE (ipv4 is null AND... | true |
a68127e596feab0854156c4babbbed97ed0a0e1c | SQL | samarink/cs50 | /pset7/movies/9.sql | UTF-8 | 186 | 3.234375 | 3 | [] | no_license | SELECT
DISTINCT(people.name)
FROM
people
JOIN
stars ON people.id = stars.person_id
JOIN
movies ON stars.movie_id = movies.id
WHERE
movies.year = 2004
ORDER BY
people.birth
;
| true |
4a5db2d155476cf36886a2746d57986d1cd11834 | SQL | Ravanblade/ravanblade.com.pl | /database/database.sql | UTF-8 | 581 | 2.796875 | 3 | [] | no_license | CREATE TABLE Projects (
`id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
CategoryId INT,
Title varchar(60) not null,
Technologies varchar(100) not null,
Text varchar(255) ,
Url varchar(100),
UrlText varchar(100),
CodeUrl varchar(100),
CodeText varchar(60),
ImgUrl varchar(100)
);
CREATE TABLE Categorie... | true |
2a0d1e4dfb584ebde5c58565f98dd3c3300d11e2 | SQL | silence-do-good/stress-test-Postgres-and-MySQL | /dump/low/day11/select2337.sql | UTF-8 | 178 | 2.625 | 3 | [] | no_license |
SELECT timeStamp, temperature FROM ThermometerOBSERVATION o
WHERE timestamp>'2017-11-10T23:37:00Z' AND timestamp<'2017-11-11T23:37:00Z' AND temperature>=15 AND temperature<=83
| true |
96ea2f52e361773af8d6c717293ebeea7ee4405f | SQL | breninrice/PA_SistemaWeb | /DB_construmar.sql | UTF-8 | 8,209 | 3.109375 | 3 | [] | no_license | CREATE DATABASE `deposito_contrumar`
DROP TABLE IF EXISTS `tb_pessoal`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `tb_pessoal` (
`id_pessoal` int(50) NOT NULL AUTO_INCREMENT,
`nome` varchar(150) DEFAULT NULL,
`cpf` int(20) DEFAULT NU... | true |
29bc9f25c4ef637508eeb63cfd960dc62406a9bc | SQL | grgabrielrosa/cae | /Banco de Dados/iftobanco.sql | UTF-8 | 3,827 | 3.328125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.5.1
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: 21-Maio-2019 às 21:08
-- Versão do servidor: 10.1.13-MariaDB
-- PHP Version: 7.0.6
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CL... | true |
f0614119afb1bbc2e4930e2673801e691bc613a4 | SQL | GitHupThiennam/ASSM2 | /database.sql | UTF-8 | 1,209 | 3.4375 | 3 | [] | no_license | CREATE DATABASE QLTB
ON PRIMARY (NAME = QLTB,
FILENAME= "D:\Detai\Database\QLTB.mdf",
SIZE=50MB, MAXSIZE = 200MB, FILEGROWTH = 10%)
LOG ON (NAME = QLTB_Log,
FILENAME= "D:\Detai\Database\QLTB_Log.ldf",
SIZE=10MB, MAXSIZE = UNLIMITED, FILEGROWTH = 5MB)
use QLTB
create table tblNguoiDung
(tendangnhap varchar(50) constrai... | true |
d97051ae5203b773f136c162ee9d70d350096edd | SQL | LINCHENMUM/Commonly-used-SQL | /数据库清理.sql | UTF-8 | 14,413 | 2.8125 | 3 | [] | no_license | --Dealer
SELECT * FROM CRM_DEALERS where DEALERID IN (100000,140000,150000,160000,240000,280000,290000)
SELECT * FROM CRM_MVNO_PROPERTIES
DELETE FROM CRM_DEALERS WHERE STATE=2
SELECT * FROM CRM_DEALERS WHERE PARENTID=-1
Update CRM_DEALERS set DEALERNODE='CPS Test',DEALERID=570000 where DEALERID=140000
--DELETE FROM... | true |
a293a84583d0beb1dee0657e484ae1c2daf78a3f | SQL | anricoj1/cyber-coders-project | /meetsql.sql | UTF-8 | 11,068 | 3.34375 | 3 | [] | no_license | -- MySQL dump 10.13 Distrib 5.7.26, for Linux (x86_64)
--
-- Host: localhost Database: MEET
-- ------------------------------------------------------
-- Server version 5.7.26-0ubuntu0.18.04.1
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_R... | true |
f46559bdd51b75a39f99d73d912ec9420d100be6 | SQL | aedoler/IS362_Assignment1 | /sql_Week1.sql | UTF-8 | 2,868 | 4.21875 | 4 | [] | no_license | #*********PART 1***********
#-----Question 1-----
SELECT COUNT(DISTINCT tailnum) AS 'No. listed speeds',
MAX(speed) AS 'Max. speed',
MIN(speed) AS 'Min. speed'
FROM planes
WHERE speed IS NOT null;
#Output: 23, 432, 90
#-----Question 2-----
SELECT SUM(distance)
FROM flights
WHERE year = 2013
AND month = 1;
#Output: 27... | true |
81493423afc54795e0e1e8e526bd6ba2965cb9f7 | SQL | Cristian-Moller/Web2TPE | /database/db_concesionaria.sql | UTF-8 | 7,598 | 2.984375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.8.3
-- https://www.phpmyadmin.net/
--
-- Servidor: 127.0.0.1
-- Tiempo de generación: 29-11-2019 a las 03:53:07
-- Versión del servidor: 10.1.37-MariaDB
-- Versión de PHP: 7.2.12
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";... | true |
0e566f33625a5195956b525d9dae08399d039849 | SQL | Ptyga/afpa | /sql/Northwind.sql | UTF-8 | 2,678 | 4.21875 | 4 | [] | no_license | /* EXERCICE 1 */
SELECT CompanyName AS `Société`, ContactName AS `Contact`, ContactTitle AS `Fonction`, Phone AS `Téléphone` FROM customers WHERE Country = "France"
/* EXERCICE 2 */
SELECT ProductName AS `Produit`, UnitPrice AS `Prix` FROM products JOIN suppliers ON ... | true |
f914c07a2406db41e14c8655a2f4e8522fd9c887 | SQL | JSON033/CSE-111 | /Jason-Feng-lab4/10.sql | UTF-8 | 122 | 3.203125 | 3 | [] | no_license | select p_type, max(l_discount)
from lineitem, part
where p_type like 'ECONOMY%' and p_partkey = l_partkey
group by p_type; | true |
81f790b60d09cd321683e3219209769d2e871692 | SQL | elopez92/SocialMediaWebAndroid | /DBScript.sql | UTF-8 | 1,053 | 4.1875 | 4 | [] | no_license |
DROP TABLE user;
DROP TABLE tweets;
DROP TABLE following;
DROP VIEW user_tweets;
DROP DATABASE twitter;
create DATABASE twitter;
USE twitter;
CREATE TABLE user(
id INT AUTO_INCREMENT PRIMARY KEY,
first_name VARCHAR(50),
email VARCHAR(50),
password VARCHAR(50),
picture_path VARCHAR(350)
);
describ... | true |
b9b92add96ed73ac3b1abba76c68de654d3ea76b | SQL | cobblau/leetcode | /Database/181-employees_earning_more_than_their_managers.sql | UTF-8 | 234 | 3.25 | 3 | [] | no_license | # https://leetcode.com/problems/employees-earning-more-than-their-managers/
#
# Author: Cobblau
# Email: cobblau@gmail.com
#
select e1.Name as Employee
from Employee e1
left join Employee e2
on e1.ManagerId = e2.Id
where e1.Salary > e2.Salary;
| true |
5fb6174e98bbe9d02d250f41389fe1ef317ff247 | SQL | nguyenxuanhai1701/ADO | /ADO/Stored procedures/ADO-sp.sql | UTF-8 | 951 | 3.71875 | 4 | [] | no_license | --create table
CREATE TABLE tblEmployees
(EmployeeId int identity primary key,
Name nvarchar(50),
Gender nvarchar(10),
Salary int)
INSERT INTO tblEmployees values('Mason','Male',5000)
INSERT INTO tblEmployees values('Priyanka','Female',3500)
INSERT INTO tblEmployees values('John','Male',2350)
INSERT INTO tblEmployees ... | true |
4a3fc6f405dd2698706f5690b8b8b9036a429d8c | SQL | MarinPaunovic/PHPAcademyHomework4 | /gym.sql | UTF-8 | 6,128 | 3.84375 | 4 | [] | no_license | # ------------------------------------STANDARD-----------------------------------------------
CREATE DATABASE GYM CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
use GYM;
# ----------------------------------STATUS---------------------------------------------------------
create table status(
id... | true |
c5a86c1aa2f33869cfe3b9a749e34d2de2a55d25 | SQL | AmandaNguyenn/employee_management_system | /seeds.sql | UTF-8 | 808 | 3.203125 | 3 | [] | no_license | use employees;
INSERT INTO department (name)
VALUES
('Human Resources'),
('Marketing'),
('Accounting'),
('Sales');
INSERT INTO role (title, salary, department_id)
VALUES
('Sales Lead', 90000, 1),
('Salesperson', 80000, 1),
('Billing Specialist', 100000, 2),
('Graphic Designer... | true |
2bc4f4971536744c9fb61041cb39e0c6c4c06795 | SQL | chaodhib/reservation_admin | /src/main/sql/h2/generated/01-create.sql | UTF-8 | 5,379 | 3.546875 | 4 | [] | no_license | --
-- Source code generated by Celerio, a Jaxio product.
-- Documentation: http://www.jaxio.com/documentation/celerio/
-- Follow us on twitter: @jaxiosoft
-- Need commercial support ? Contact us: info@jaxio.com
-- Template pack-backend-jpa:src/main/sql/h2/01-create.p.vm.sql
-- Template is part of Open Source Project: h... | true |
fa8dc16a9b3df186604c99e1c6fddf7a4ac09ea5 | SQL | zshCuanNi/reminder-calendar | /spring-boot-backend/src/main/resources/sql/init.sql | UTF-8 | 837 | 3.78125 | 4 | [
"MIT"
] | permissive | drop database if exists memo;
create database memo;
use memo;
-- drop index deadlineIK on Memos;
drop table if exists Memos;
-- drop index usernameIK on User;
drop table if exists User;
create table User
(
UID int not null auto_increment,
username varchar(50),
password ... | true |
8b9337d5545105c7e39512cdd348dce49f4c0dd1 | SQL | AmiyaDas/BloodDonor | /db/city.sql | UTF-8 | 10,589 | 2.859375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.6.5.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Mar 20, 2017 at 05:12 AM
-- Server version: 10.1.19-MariaDB
-- PHP Version: 5.5.38
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SE... | true |
6afecb52361e84407f0411904313fc7a4a7685d1 | SQL | jammynguyen/CBML2 | /na/project/ini/DatabaseCreationScript/cr_users.sql | UTF-8 | 32,787 | 3.3125 | 3 | [] | no_license | ALTER PROFILE "DEFAULT" LIMIT
PASSWORD_LIFE_TIME UNLIMITED -- important to set to UNLIMITED
PASSWORD_GRACE_TIME UNLIMITED; -- important to set to UNLIMITED
DROP USER CONFIG CASCADE;
CREATE USER CONFIG
IDENTIFIED BY CONFIG
DEFAULT TABLESPACE &ts
TEMPORARY TABLESPACE TEMP
PROFILE DEFAULT
ACCOUNT UNLOCK;... | true |
7c6e0c81181f231b93cdbf69c2560b64c205866f | SQL | zvant/LeetCodeSolutions | /0175.combine_two_tables_E.sql | UTF-8 | 237 | 3.046875 | 3 | [] | no_license | # https://leetcode.com/problems/combine-two-tables/
# 2022/08
# 743 ms
# Write your MySQL query statement below
select lastName, firstName, Address.city, Address.state
from Person left join Address
on Person.personID = Address.personID
| true |
df256032fa3930633c516a49bd9f6c368c8e9fa4 | SQL | semaberkiten/SOC-App | /web-app/SQL/setup.sql | UTF-8 | 1,853 | 3.25 | 3 | [] | no_license | /* SQL to set up the Databse */
USE socioapp;
CREATE TABLE researchers (
id INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY,
email VARCHAR(320) NOT NULL UNIQUE,
pass CHAR(41) NOT NULL,
first_name VARCHAR(255),
last_name VARCHAR(255)
/* other things? */);
CREATE TABLE subjects (
id INT UNSIGNED NOT NULL AUTO... | true |
77a6359373bc03c477fc9480ff01b6421a35e14f | SQL | iozamudioa/passguard | /scripts/sp/updatePersonData.sql | UTF-8 | 1,137 | 3.609375 | 4 | [] | no_license | CREATE DEFINER=`admin`@`%` PROCEDURE `updatePersonData`(IN _name VARCHAR(45), IN _lastname VARCHAR(45), IN _email VARCHAR(45), IN _birth_date DATE, IN _user_id INT)
BEGIN
DECLARE _persons_data_id INT DEFAULT NULL;
SELECT persons_data_id INTO _persons_data_id FROM persons_data WHERE user_id = _user_id;
... | true |
835b0fd34105f107730de70bd94fd76b0ff8e5d3 | SQL | BognarPal/Jedlik_FeladatMegoldasok | /Fullstack/E-Munkalap/E-Munkalap.Data/SQL/scripts/work/works_select.sql | UTF-8 | 914 | 3.109375 | 3 | [] | no_license | Select munkalap_works.id,
munkalap_works.RequesterName,
munkalap_works.Description,
munkalap_works.RequestDate,
munkalap_works.ProfessionId,
munkalap_works.EmployeeId,
munkalap_works.DeadLine,
munkalap_works.AssignDate,
munkalap_works.AssignDetails,
... | true |
f3b422e425c3ad7776b91a0209a1fecd9ddb1c55 | SQL | gituserDoesNotExist/oracle-playground | /extracted-ddls/PLAYGROUND/package_bodies/list_utils.sql | UTF-8 | 2,105 | 3.03125 | 3 | [] | no_license | CREATE OR REPLACE PACKAGE BODY "PLAYGROUND"."LIST_UTILS"
AS
--###############################################################
FUNCTION COPY_ARRAY(R_INPUT_ARRAY IN INTEGER_ARRAY)
RETURN INTEGER_ARRAY
IS
COPY INTEGER_ARRAY := INTEGER_ARRAY();
BEGIN
FOR IDX IN 1 .. R_INPUT_ARRAY.... | true |
c238aa91b5bd2283ff22d2ef1cebff926e77521a | SQL | sagademo/Database | /ITI/ITI/mst/Tables/Transaction_Master_TypeOfpurchase.sql | UTF-8 | 518 | 3.21875 | 3 | [] | no_license | CREATE TABLE [mst].[Transaction_Master_TypeOfpurchase] (
[TransactionId] INT IDENTITY (1, 1) NOT NULL,
[PurchaseId] TINYINT NULL,
[TypeOfpurchase] NVARCHAR (100) NOT NULL,
[CreatedOn] DATETIME NULL,
[CreatedBy] INT NULL,
[UpdatedOn] DATETIM... | true |
1f2d5c5f520966630f59ff4651ad27f96b9c2a35 | SQL | PabloExperimental/CrowdMine | /core/database/my_crowdmine_.sql | UTF-8 | 14,483 | 3.09375 | 3 | [
"MIT"
] | permissive | -- phpMyAdmin SQL Dump
-- version 4.5.1
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Creato il: Gen 14, 2017 alle 15:08
-- Versione del server: 10.1.19-MariaDB
-- Versione PHP: 7.0.13
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLI... | true |
27eec59ea77169f7beeb2669322b6dff1bfa41bb | SQL | dkazany/DWH-2.0 | /Source Extracts/T24/F_CARD_TYPE.sql | UTF-8 | 599 | 2.71875 | 3 | [] | no_license | SELECT
XMLRECORD.value('(/row/@id)[1]', 'nvarchar(6)') AS CARD_TYPE,
XMLRECORD.value('(/row/c1)[1]', 'nvarchar(65)') AS DESCRIPTION,
XMLRECORD.value('(/row/c10)[1]', 'nvarchar(10)') AS LMB_DR_CR_CARD,
XMLRECORD.value('(/row/c10[@m="2"])[1]', 'nvarchar(10)') AS CARD_TYPE_CODE,
XMLRECORD.value('(/row/c10[@m="3"])[1]', '... | true |
c81dfc140a1014318491e774976a62bf49e16b2d | SQL | yibuyisheng/chat | /mysql.sql | UTF-8 | 945 | 3.421875 | 3 | [] | no_license | -- 数据库构建
CREATE SCHEMA `chat` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci ;
CREATE TABLE `chat`.`user` (
`id` INT(11) NOT NULL AUTO_INCREMENT,
`name` VARCHAR(45) NULL,
`nickname` VARCHAR(45) NULL,
`password` VARCHAR(45) NULL,
`email` VARCHAR(45) NULL,
`avatar` VARCHAR(200) NULL,
PRIMARY KEY (`id`... | true |
aa1e396bfffcdd1937d0efb77af111dad4cfcf03 | SQL | svwriting/This-is-CS50x | /pset7/movies/13.sql | UTF-8 | 627 | 4.375 | 4 | [] | no_license | -- write a SQL query to list the names of all people
-- who starred in a movie in which Kevin Bacon also starred.
-- Your query should output a table with a single column for the name of each person.
-- There may be multiple people named Kevin Bacon in the database.
-- Be sure to only select the Kevin Bacon b... | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.