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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
e3608368b6c8513eedbbf30052bc28987c6250c3 | SQL | caiqianyi/yashua | /modules/mall/db/mallorder.sql | UTF-8 | 970 | 2.671875 | 3 | [] | no_license | -- 菜单SQL
INSERT INTO `sys_menu` (`parent_id`, `name`, `url`, `perms`, `type`, `icon`, `order_num`)
VALUES ('1', '订单表', 'modules/mall/mallorder.html', NULL, '1', 'fa fa-file-code-o', '6');
-- 按钮父菜单ID
set @parentId = @@identity;
-- 菜单对应按钮SQL
INSERT INTO `sys_menu` (`parent_id`, `name`, `url`, `perms`, `type`, `icon... | true |
b5325aa0c9a9c733845de62d8151c5a65e5b4254 | SQL | lo8e/sql2-1-insert-inschrijven-studenten-ErikBuen | /inschrijvingen.sql | UTF-8 | 691 | 2.515625 | 3 | [] | no_license | use lo8e_sql2;
INSERT INTO klassen (klas_code, slb_code, cohort, opleiding_code)
VALUES ('lo9e-amo1', "vlt03", 2019, 'amo'),
('lo9e-amo2', "rs001", 2019, 'amo'),
('lo9e-amo3', "bkr02", 2019, 'amo'),
('lo9e-amo4', "brc01", 2019, 'amo');
INSERT INTO studenten (ov_nummer, voornaam, achternaam... | true |
9221624cee6039735d2c780235c7064f70162835 | SQL | ibalenciagabu14dw/jQuery | /Ariketak/bases_de_Datos/ejercicios.sql | UTF-8 | 1,395 | 2.9375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.0.10deb1
-- http://www.phpmyadmin.net
--
-- Servidor: 127.0.0.1
-- Tiempo de generación: 17-12-2015 a las 11:46:52
-- Versión del servidor: 5.5.46-0ubuntu0.14.04.2
-- Versión de PHP: 5.5.9-1ubuntu4.14
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @... | true |
bbefb8575f0bd5c535ee3eac7e747748361be005 | SQL | nickscaglione/sql-library-lab-web-0916 | /lib/insert.sql | UTF-8 | 2,876 | 2.59375 | 3 | [
"LicenseRef-scancode-unknown-license-reference",
"LicenseRef-scancode-public-domain"
] | permissive | INSERT INTO series (title, author_id, subgenre_id)
VALUES ("Lord of the Rings", NULL, NULL);
INSERT INTO series (title, author_id, subgenre_id)
VALUES ("Harry Potter", NULL, NULL);
INSERT INTO books (title, year, series_id)
VALUES ("The Sorcerer's Stone", 1994, 2);
INSERT INTO books (title, year, series_id)
... | true |
4fc3f1367d65c426c36f2964f5ee76474344b103 | SQL | hiplot/pathway-figure-ocr | /database/xrefs_in_wp_hs_but_not_xrefs_table.sql | UTF-8 | 120 | 2.8125 | 3 | [
"Apache-2.0"
] | permissive | SELECT xrefs_wp_hs.xref
FROM xrefs_wp_hs
LEFT OUTER JOIN xrefs ON xrefs_wp_hs.xref = xrefs.xref
WHERE xrefs.id IS NULL;
| true |
1f34905bd630a935196fc01f5d5c11c6320b58a0 | SQL | Mithra-610/DBMS-SQL-Codes | /PLSQL_Material/query3.sql | UTF-8 | 7,509 | 3.84375 | 4 | [] | no_license | -- 1. Input any number and display following patterns. Ex., inputted number is 5, program should display 5 lines.
-- 1
-- 2 3
-- 4 5 6
-- 7 8 9 10
-- 1
-- 0 1
-- 1 0 1
-- 0 1 0 1
-- 1 0 1 0 1
declare
num int:=:num;
cnt int:=1;
begin
for i in 1..num loop
... | true |
59e1c94f3012d6aaaf3141da2ad5d8f73724264e | SQL | Bogyi3/BananasInPajamasFedEx | /backend/sql/fedex_commitment.sql | UTF-8 | 243 | 2.515625 | 3 | [] | no_license |
DROP TABLE IF EXISTS `commitments`;
CREATE TABLE `commitments` (
`commitment_id` int NOT NULL AUTO_INCREMENT,
`commitment_name` varchar(255) NOT NULL,
`challenge_id` int NOT NULL,
`xp` int NOT NULL,
PRIMARY KEY (`commitment_id`)
) | true |
a99170a288d5b5f6da892c5f840a12eb77cae7c0 | SQL | jkstill/tracefile_identifier | /create-table.sql | UTF-8 | 218 | 2.78125 | 3 | [] | no_license |
-- create-table.sql
drop table tid_demo purge;
create table tid_demo
as
select *
from dba_objects;
exec dbms_stats.gather_table_stats(ownname=> USER, tabname=>'TID_DEMO', method_opt=>'for all columns size auto')
| true |
7c9ead8d4a88411bee4dcd529f0c1224796ab12e | SQL | badbayard/projet_BDA | /TPCSV_Analyse.sql | UTF-8 | 10,614 | 3.84375 | 4 | [] | no_license | /*Yannis Hutt 11408376 Julien Granjon 11509496 */
--------------------------------------------------------------------------------
-- LIFBDW2 - 2017-2018 Printemps - TPCSV - ANALYSE
--------------------------------------------------------------------------------
set serveroutput on;
---------------------... | true |
42fcfcf46ab446aaf4b1d94ba3e7b6bd46ca9b1a | SQL | gbiplesh/e-schools | /sql/eschool.sql | UTF-8 | 5,619 | 2.90625 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.7.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1:3306
-- Generation Time: Aug 27, 2018 at 12:12 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 |
ae33142372ee4456d162998440be4ce8644d461a | SQL | shakermegahed/CoreCrud | /BB.WM.Database/Website/Stored Procedures/WebSiteRestaurantUpdate.sql | UTF-8 | 1,110 | 3.21875 | 3 | [] | no_license |
-- =============================================
-- Author: Shaker Mohamed
-- Create date: 26 Oct 2019
-- Description: WebSite Restaurant Update
-- =============================================
CREATE PROCEDURE [Website].[WebSiteRestaurantUpdate]
@WebSiteRestaurantId UNIQUEIDENTIFIER,
@RestaurantId UNIQUEIDENTI... | true |
00a11314d2c2fde871feacdac338ff8feab2af9b | SQL | heu-unah/HEU-UNAH | /Diagrama de BD/hospital.sql | UTF-8 | 4,836 | 3.296875 | 3 | [] | no_license | -- MySQL Script generated by MySQL Workbench
-- 11/08/17 09:54:43
-- 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='TRADITION... | true |
1a22700ec8d9f224cbe79f12b099f506ff90a495 | SQL | metzgergroup/ep | /docker-scripts/sql/occupation.sql | UTF-8 | 340 | 2.75 | 3 | [] | no_license | \echo occupation
CREATE UNLOGGED TABLE occupation (
occupation_code text PRIMARY KEY,
occupation_type text NOT NULL,
title text NOT NULL
);
\set filepath `echo ${DATA_DIR}`/occupation.csv
COPY occupation (occupation_code, occupation_type, title) FROM :'filepath' WITH CSV;
ALTER TABLE occupation... | true |
db8a2fc8e40feebfafaa431d4717946280f784f1 | SQL | gmlakds21/Database_MariaDB | /src/_1_Class_Maria_DB/Playground/D.sql | UTF-8 | 14,810 | 3.921875 | 4 | [] | no_license | -- 1. 고객 테이블을 조회하세요
select * from Customers;
-- 2. 고객테이블에서 고객이름과 도시를 조회하세요
select ContactName, city from Customers;
-- 3. 고객 테이블에서 도시를 조회하세요 (중복은 제외한다)
select distinct city from Customers;
-- 4. 고객 테이블에서 국가 수를 조회하세요
select count(distinct country) from Customers;
-- 5. 고객 테이블에서 국가가 'Mexico'인 고객을 조회하세요
select Contact... | true |
167332ccd47d51964df99630905e066c2bf34df8 | SQL | newtonmunene99/advanced-web-class-forum | /csc316.sql | UTF-8 | 3,298 | 3.265625 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.5.2
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Nov 17, 2019 at 09:55 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_SET_CL... | true |
17da23cc783d061b68396af74511e3363cc2617b | SQL | Carnif3x/dbisworkshops | /km-51/Timonov_Oleksii/project/packages/eventPackage.sql | UTF-8 | 5,837 | 3.90625 | 4 | [] | no_license | CREATE OR REPLACE PACKAGE EVENT_PACKAGE AS
TYPE T_EVENT IS RECORD (
EV_TITLE VARCHAR2(30 CHAR),
EV_TOPIC VARCHAR2(30 CHAR),
EV_DESC VARCHAR2(1000 CHAR),
EV_PRICE BINARY_DOUBLE,
EV_ORG varchar2(30 char),
ID_EVENT NUMBER,
deleted varchar2(30 char)
);
TYPE T_EVENT_TABLE IS TABLE OF T_E... | true |
aa3e127dc89e04ea24e7de2fb2ad70f873ec326c | SQL | srgg/permissions | /queries/get-all-ideas.sql | UTF-8 | 2,989 | 4.25 | 4 | [] | no_license | SET @user_id = 5;
SET @resource = 'IDEAS';
SET @action = 'READ';
SELECT i.*
,( SELECT GROUP_CONCAT(DISTINCT REPLACE(p.single_perm, '_OWN', '')) FROM
(
SELECT Trim(SUBSTRING_INDEX(SUBSTRING_INDEX(ppp.action, ',', n.digit+1), ',', -1)) single_perm
FROM (
SELECT * FROM permissio... | true |
e68a42ee5fd2eaaee263c0d9bec394f9171aa569 | SQL | KangSeungKu/SQL-Q_200 | /PART3_SQL_실력_다지기/088.sql | UTF-8 | 665 | 4.09375 | 4 | [] | no_license | -- 088) 서브쿼리를 사용하여 데이터 합치기
ALTER TABLE dept
ADD sumsal number(10);
-- 먼저 dept테이블에 'sumsal'이라는 컬럼추가
MERGE INTO dept d
USING (SELECT deptno, sum(sal) sumsal
FROM emp
GROUP BY deptno) v
ON (d.deptno = v.deptno)
WHEN MATCHED THEN
UPDATE set d.sumsal = v.sumsal;
-- 새롭게 추가된 'sumsal'이라는 컬럼에 해당 부서 번호의... | true |
adcbc37ea3d9b02fe8bca85a27370762c5eb8159 | SQL | Neeraj1005/changed_file_projects | /2feb/knowledgebasesetting.sql | UTF-8 | 2,964 | 3.125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.9.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Feb 02, 2020 at 09:59 AM
-- Server version: 10.4.11-MariaDB
-- PHP Version: 7.2.26
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OL... | true |
1849c04663fa75c9809493a752ad45ff21c0e048 | SQL | Tagataya/Gs | /php04_kadai/sql_files/gs_bm_table.sql | UTF-8 | 7,704 | 3.046875 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.8.5
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Generation Time: 2019 年 6 月 12 日 20:43
-- サーバのバージョン: 10.1.40-MariaDB
-- PHP Version: 7.3.5
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACT... | true |
6b6cd3ca63a1664345b482350e966898ee56a3bb | SQL | claudivanmoreira/controle-de-gastos | /controle-de-gastos-dao/src/main/resources/create-db.sql | UTF-8 | 2,061 | 3.359375 | 3 | [] | no_license | /*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
/**
* Author: Claudivan Moreira
* Created: 09/04/2017
*/
create table cards (
id INTEGER GENERATED BY DEFAULT AS IDENTITY(STA... | true |
ce624c1e7c09c33532937c9c022e9a8bd8de31d2 | SQL | carlospisani10/backup1 | /Carlos/MYSQL/MYSQL12-11-17/words.sql | UTF-8 | 211 | 2.625 | 3 | [] | no_license | select * from wordassociaion_ac limit 10000000000000;
where source = "cc"
select * From wordassociation_ac
where author >=0
and author <=20
select * from wordassociation-ac
where word1 = "pie"
or word2 = "pie" | true |
f49a07cc8238fa1378f43bcb7f8298bc60f74875 | SQL | AdvancedDatabases/ZSBD-studies-course | /benchmark/test-sets/set1-geo-sql/3.sql | UTF-8 | 738 | 4.1875 | 4 | [] | no_license | SELECT AVG(OI.UNIT_PRICE*OI.QUANTITY), PC.CATEGORY_NAME
FROM PRODUCT_CATEGORIES PC
JOIN PRODUCTS P on PC.CATEGORY_ID = P.CATEGORY_ID
JOIN ORDER_ITEMS OI on P.PRODUCT_ID = OI.PRODUCT_ID
WHERE ORDER_ID IN (
SELECT O2.ORDER_ID
FROM ORDERS O2
WHERE SALESMAN_ID IN (
SELECT E.EMPLOYEE_ID
F... | true |
b33ecccc38acb7733fdea97d5a7b478dfdeea8f3 | SQL | ggholson/RouteBuilder | /RouteBuilder/sql/RouteBuilder.DB/SchemaObjects/Game/Tables/Equipment.sql | UTF-8 | 484 | 3.171875 | 3 | [] | no_license | CREATE TABLE [Game].[Equipment]
(
[EquipmentId] TINYINT NOT NULL PRIMARY KEY,
[GearSlotId] TINYINT NOT NULL,
[Name] VARCHAR(20) NOT NULL,
[Strength] TINYINT NULL,
[Magic] TINYINT NULL,
[Speed] TINYINT NULL,
[Spirit] TINYINT NULL,
[ElementalBoost] BIGINT NULL,
[ElementalResist] BIGINT NULL,
[Cost] INT ... | true |
99e7212af56ecbf5eeed4754a2b12700ced1f41d | SQL | atruby-team/internship-19-winter | /at-vuongtran/SQL_DAY1/baptapsql1.sql | UTF-8 | 240 | 3.453125 | 3 | [] | no_license | select *
from users inner join books on users.id = books.id_user
where books.book_name = 'naruto';
select users.id, users.user_name, count(books.book_name) as count
from users left join books on users.id = books.id_user
group by users.id;
| true |
afe740961135fc8a5b0f3059774afa7b995e8347 | SQL | russnewman/distance-study-platform-backend | /src/main/resources/db/liquibase/changelog/init/012-files-table.sql | UTF-8 | 521 | 3.09375 | 3 | [] | no_license | -- liquibase formatted sql
-- changeset Sharipov:0.1.2 endDelimiter:\n/
-- preconditions onFail:MARK_RAN
-- precondition-sql-check expectedResult:0 SELECT count(*) FROM information_schema.tables where TABLE_NAME = 'files' and TABLE_SCHEMA = 'distance_study_platform'
create table files
(
id varchar(45) not null,
... | true |
4c876ca9ae20031915df174a77ce0f23401e5967 | SQL | sarojkaul/Java_CodeReview5_sarojkaul | /Database/cr5_famazon_sarojkaul.sql | UTF-8 | 9,512 | 3.34375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 5.0.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Erstellungszeit: 05. Dez 2020 um 20:12
-- Server-Version: 10.4.16-MariaDB
-- PHP-Version: 7.4.12
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=... | true |
b199bd6adcd2bf10df94f72f5cc5a8be22ea989d | SQL | georgesabin/PSBD-Project | /cod_plsql/eliberare_camera.sql | UTF-8 | 1,072 | 3.53125 | 4 | [] | no_license | SET SERVEROUTPUT ON
CREATE OR REPLACE PROCEDURE eliberare_camere
IS
CURSOR C1 IS select * from rezervare_ocupare;
BEGIN
FOR rez in c1 LOOP
if rez.data_start < SYSDATE AND rez.status_camera = 1 THEN
--eliberam camera
UPDATE rezervare_ocupare set status_camera = 0 where id = rez.id;
... | true |
adc1cd0a0b0b0380ef9a8db7889239009bbfd763 | SQL | EDGE775/job4j_todo | /src/db/schema.sql | UTF-8 | 616 | 3.4375 | 3 | [] | no_license | CREATE TABLE users
(
id SERIAL PRIMARY KEY,
name TEXT not null,
email TEXT unique not null,
password TEXT not null
);
CREATE TABLE items
(
id SERIAL PRIMARY KEY,
description TEXT not null,
created timestamp not nul... | true |
4901e29252c1da47d4566f5d1b6a9cc103bdf977 | SQL | PEDSnet/pedsnetcdm_to_pcornetcdm | /v2 to v3/ETL Scripts/Condition_ETL.sql | UTF-8 | 1,830 | 3.921875 | 4 | [] | no_license |
-- more changes likely to be made in the future based on Data Models issues 200 and 201
insert into dcc_pcornet.condition(
conditionid, patid, encounterid, report_date, resolve_date, onset_date,
condition_status, condition, condition_type, condition_source,
raw_condition_status, r... | true |
1fee4ef4805071619c8587acf69ed66b42efff25 | SQL | dharmu05/Hands-On-Data-Science-with-SQL-Server-2017 | /CH6_Data_Exploration_and_Statistics_with_T_SQL/60_percentile_cume_dist_example.sql | UTF-8 | 115 | 2.90625 | 3 | [
"MIT"
] | permissive | SELECT StudentName
, Score
, CUME_DIST() OVER (ORDER BY Score) as CumeDist
FROM TestResults
ORDER BY 3 DESC | true |
eb1eafb7f4be05bdac7cc7e67ca252981c6d536b | SQL | CerebriumAI/dbt_shopify_source | /models/stg_shopify__refund.sql | UTF-8 | 439 | 3.25 | 3 | [
"Apache-2.0"
] | permissive |
with source as (
select *
from {{ ref('stg_shopify__refund_tmp') }}
),
renamed as (
select
{{
fivetran_utils.fill_staging_columns(
source_columns=adapter.get_columns_in_relation(ref('stg_shopify__refund_tmp')),
staging_columns=get_refund_columns()
... | true |
9813cf2dfd6c40d4734608004cc8f7be222dbc68 | SQL | DdarkSaber/CSLR51---DBMS-Lab | /Week 3/1-CustOrders.sql | UTF-8 | 3,595 | 3.359375 | 3 | [] | no_license | CREATE DATABASE w3q1_orders;
USE w3q1_orders;
CREATE TABLE Salesman(
salesman_id int,
sname varchar(50),
city varchar(50),
commission float
);
INSERT INTO
Salesman(salesman_id, sname, city, commission)
VALUES
(5001, 'James Hoog', 'New York', 0.15),
(5002, 'Nail Knite', 'Paris', 0.13),
(5005, 'Pit Alex',... | true |
ca8b9eb35e77c318301cdb781f849a2d5f2702d2 | SQL | bingli-borland/transaction_lock | /src/main/resources/mysql.sql | UTF-8 | 242 | 2.5625 | 3 | [] | no_license | CREATE TABLE `test_table` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`money` bigint(20) NOT NULL,
`user_id` bigint(20) NOT NULL,
PRIMARY KEY (`id`),
KEY `idx_user_id` (`user_id`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8 | true |
524ca7fa37b845a8963b981a67a9a13c23a038d7 | SQL | leejh872/SOSOJihyeONLY | /src/soso/sqlserver/SosoDao.sql | UTF-8 | 3,176 | 3.8125 | 4 | [] | no_license | select * from post
--20161025
INSERT INTO [USER](CELLPHONE, EMAIL, PW, GENDER) VALUES('010-1111-8888', 'delete@naver.com', '1111', 0);
--ALTER TABLE "USER" MODIFY GENDER VARCHAR(10);
--20161026
-- ALTER TABLE ���̺�� ADD CONSTRAINT ������Ʈ����� DEFAULT 0 FOR �ش��÷�;
ALTER TABLE [USER] ADD CONSTRAINT [uregdate... | true |
a7435006d30ab07a1dbaebfcf0bbdd6d9f5a8518 | SQL | techtronics/upa | /Insidencias/reportes/nuevas/informatica/rangos alumnos aporte fiscal.sql | UTF-8 | 767 | 2.84375 | 3 | [] | no_license | select *,case when promedio_paa > '691.5' then 5
when promedio_paa >= '654.5' and promedio_paa < '691' then 4
when promedio_paa >= '630' and promedio_paa < '654' then 3
when promedio_paa >= '610.5' and promedio_paa < '629.5' then 2
when promedio_paa >= '595' and promedio_paa < '610' then 1
else 0 end as ra... | true |
df0c112ee1d9a1e8990a32432a28208bf14f5a04 | SQL | TohaRhymes/databases_itmo_autumn2020 | /lab1/insertion.sql | UTF-8 | 1,915 | 2.640625 | 3 | [] | no_license | INSERT INTO planetary_system (id, name, central_star)
VALUES (0, 'Солнечная система', 'Солнце');
INSERT INTO planetary_system (id, name, central_star)
VALUES (1, 'Альфас системс', 'Альфа центавра');
INSERT INTO bodies (id, name, planetary_system_id, type, chemicals)
VALUES (0, 'Церера', 0, 'карликовая планета', NULL)... | true |
c51424d3d0ab8646208eecb5a2eeba526defd1c4 | SQL | pjuliano/glowing-waffle | /Views/KD_WWSS_NADirect.sql | UTF-8 | 3,466 | 3.734375 | 4 | [] | no_license | Create Or Replace View Kd_WWSS_NADirect As
Select
'NADirect' As Segment,
Case When A.Region_Code = 'USEC' Then 'East Coast'
When A.Region_Code = 'USWC' Then 'West Coast'
When A.Region_Code = 'USSC' Then 'South Central'
When A.Region_Code = 'USNC' Then 'North Central'
... | true |
95b48b52c52e119d277a771677923cfe8e4c116a | SQL | gabrieldi95/campus-party | /campus_party.sql | UTF-8 | 1,604 | 3.203125 | 3 | [] | no_license | -- *********************************************
-- * Standard SQL generation
-- *--------------------------------------------
-- * DB-MAIN version: 10.0.3
-- * Generator date: Aug 23 2017
-- * Generation date: Sat Nov 18 16:37:42 2017
-- * LUN file: /home/who/Downloads/... | true |
fcf8335a00f4921f2be9adcc6c699c7b4559fc69 | SQL | mtiowl/oracle | /dictionary/find_source.sql | UTF-8 | 218 | 2.796875 | 3 | [] | no_license | define obj = &Object_name
define lineno = &Line
set linesize 300
set scan on
col text format a150
select line, text
from all_source
where name = upper('&obj')
and line between &lineno-5 and &lineno+5
/
set line 100 | true |
1ffff61f92b72cece824faabb4876c494af1e6aa | SQL | daviinacio/ProjetoFinalTreinamentoCamelSysmi | /src/main/resources/sql/CreatePatientsTable.sql | UTF-8 | 1,123 | 2.5625 | 3 | [] | no_license | /**
* Author: Davi-PC
* Created: Nov 6, 2020
*/
CREATE TABLE `Patients` (
`id` INT NOT NULL AUTO_INCREMENT,
`nome` VARCHAR(128) NOT NULL,
`cpf` VARCHAR(14) NOT NULL,
`rg` VARCHAR(12) NOT NULL,
`data_nasc` DATE NOT NULL,
`idade` INT UNSIGNED NOT NULL DEFAULT 0,
`cor` VARCHAR(32) NOT NULL... | true |
390f76ee44c115b79347dfb979f6d2d097502740 | SQL | PNNL-Comp-Mass-Spec/DBSchema_PgSQL_DMS | /dms/pnnldata/pnnldata.VW_PUB_SMS_NETWORK_INTERFACE.sql | UTF-8 | 1,917 | 3.078125 | 3 | [
"Apache-2.0"
] | permissive | --
-- Name: VW_PUB_SMS_NETWORK_INTERFACE; Type: FOREIGN TABLE; Schema: pnnldata; Owner: d3l243
--
CREATE FOREIGN TABLE pnnldata."VW_PUB_SMS_NETWORK_INTERFACE" (
"SMS_DEVICE_ID" integer NOT NULL,
"DHCP_SERVER_IP_ADDRESS" character varying(15) NOT NULL,
"GATEWAY_IP_ADDRESS" character varying(15) NOT N... | true |
416e6aa3523fd286b3a7120917e435221fd2d018 | SQL | belhaji/LRIAPP | /db1.sql | UTF-8 | 16,477 | 2.890625 | 3 | [
"MIT"
] | permissive | -- MySQL dump 10.13 Distrib 5.7.16, for osx10.12 (x86_64)
--
-- Host: localhost Database: lriapp
-- ------------------------------------------------------
-- Server version 5.7.16
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/... | true |
06d3e89f2b6e5bddd570636de76020895b88e9a2 | SQL | AlinaGomeniuc/Data-Base | /Lab7/SQLcode/SQLQuery_Lab7_ex8_2.sql | UTF-8 | 267 | 3.0625 | 3 | [] | no_license | SELECT DISTINCT disciplineS.Disciplina
FROM disciplineS, reusitaS, studentiS
WHERE disciplineS.Id_Disciplina = reusitaS.Id_Disciplina
AND reusitaS.Id_Student = studentiS.Id_Student
AND studentiS.Nume_Student = 'Florea'
AND studentiS.Prenume_Student = 'Ioan' | true |
692e0b2d28cf30680ddc478eb7e46f96ed502299 | SQL | adonnart/PPE3-Mesguen | /Produit.sql | UTF-8 | 314 | 2.640625 | 3 | [] | no_license | CREATE TABLE produit (
IdProduit NUMBER (11,0) NOT NULL,
NomProduit VARCHAR2(60) NOT NULL,
CodeProduit NUMBER(11,0) NOT NULL,
DescProduit VARCHAR2(60) NOT NULL,
EtatProduit VARCHAR2(60) NOT NULL,
CONSTRAINT PK_PRODUIT PRIMARY KEY () USING INDEX TABLESPACE VB_Mesguen_Index
) TABLESPACE VB_Mesguen_Data ; | true |
003a5282276fdf540ece3cff7a96ec0c074b5a95 | SQL | Ledinalvarado/PaginaPrograNegocios | /cinesEmely/cinesEmely.sql | UTF-8 | 15,113 | 2.765625 | 3 | [] | no_license | -- MySQL dump 10.13 Distrib 5.7.12, for Win64 (x86_64)
--
-- Host: localhost Database: cinesemely
-- ------------------------------------------------------
-- Server version 5.7.14-log
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_R... | true |
d2cf4026b69dcfa0a5a97d0cf57ae648efee8210 | SQL | strikerlg/kc | /tmp/db_file/1.sql | UTF-8 | 3,369 | 2.875 | 3 | [] | no_license | CREATE TABLE `zawodnicy` (
`id_zawodnika` int(16) NOT NULL AUTO_INCREMENT,
`imie` varchar(60) NOT NULL,
`nazwisko` varchar(60) NOT NULL,
`klub` varchar(60) NOT NULL,
`waga` varchar(10) NOT NULL,
`stopien` varchar(10) NOT NULL,
`zdjecie` varchar(10) NOT NULL,
`licencja` varchar(10) NOT NULL,
PRIMARY K... | true |
bc8f9cc4854bb5489c9949e3b71a8e05075a0df6 | SQL | Blue-Sky-Skunkworks/forager | /gleandb.sql | UTF-8 | 5,296 | 3.140625 | 3 | [] | no_license | --
-- PostgreSQL database dump
--
SET statement_timeout = 0;
SET lock_timeout = 0;
SET client_encoding = 'UTF8';
SET standard_conforming_strings = on;
SET check_function_bodies = false;
SET client_min_messages = warning;
--
-- Name: plpgsql; Type: EXTENSION; Schema: -; Owner:
--
CREATE EXTENSION IF NOT EXISTS plpgs... | true |
e2689fb209a28d431d8521c45c8347797b8141bd | SQL | aaronsingleterry10/database-exercises | /index-exercises.sql | UTF-8 | 620 | 3.75 | 4 | [] | no_license | USE codeup_test_db;
SHOW TABLES;
DROP TABLE IF EXISTS albums;
CREATE TABLE IF NOT EXISTS albums
(
id INT UNSIGNED NOT NULL AUTO_INCREMENT,
artist VARCHAR(100),
name VARCHAR(100),
release_date INT UNSIGNED,
genre VARCHAR(250),
sales FLOAT,
PRIMARY KEY ... | true |
1a61e1f1235a92fb790451d12f4b30f29167b7c3 | SQL | seanv507/lendico | /Projects/Returns/src/first_lates_EOM.sql | UTF-8 | 3,501 | 4.0625 | 4 | [] | no_license | select
latest.fk_loan,
latest.loan_request_nr,
latest.fk_loan_request,
latest.payout_date,
earliest_date earliest_date_EOM,
latest_date latest_date_EOM,
in_arrears_since_days_7_plus_first in_arrears_since_days_7_plus_first_EOM,
in_arrears_since_days_14_plus_first in_arrears_since_days_14_plus_first_... | true |
e14f84b5078ccfbb279fcd7b6cb33fbc8222ff25 | SQL | agdiaz/GestionDeDatos | /TP1C2013 K3051 SI_NO_APROBAMOS_HAY_TABLA 16 ZIP123/data/Finales/01 - SELECT/80_sp_listar_detallado_pasaje.sql | UTF-8 | 754 | 3.4375 | 3 | [] | no_license | CREATE PROCEDURE SI_NO_APROBAMOS_HAY_TABLA.sp_listar_detallado_pasaje
(
@p_id_micro int,
@p_dni numeric(18,0),
@p_id_butaca int,
@p_precio numeric(18,2)
)
AS
BEGIN
SELECT p.id_pasaje, p.id_compra, p.id_butaca,
p.id_cancelacion, p.dni, p.pre_pasaje,
p.disponible, p.cancel, p.fecha_cancel,
p.motivo_cancel, p.i... | true |
7b46c909271568d4258a8a4240edb39fa7c4892d | SQL | Phycas/DropdaJ | /querys.sql | UTF-8 | 1,487 | 3.875 | 4 | [] | no_license | CREATE TABLE usuarios(
id INT UNSIGNED NOT NULL AUTO_INCREMENT,
nombre VARCHAR(140),
usuario VARCHAR(140),
clave VARCHAR(140) not null,
mail VARCHAR(140),
PRIMARY KEY (id)
);
CREATE TABLE archivos(
id INT UNSIGNED NOT NULL AUTO_INCREMENT,
nombre VARCHAR(140),
tipo VARCHAR(140),
... | true |
c367631c6ca87a2cde3c4770842d83aac8b07344 | SQL | j7ng/CLFY_SA | /SA/Tables/ADFCRM_PERGENCODES.sql | UTF-8 | 1,239 | 3.421875 | 3 | [] | no_license | CREATE TABLE sa.adfcrm_pergencodes (
code_id VARCHAR2(20 BYTE) NOT NULL,
code_description VARCHAR2(400 BYTE) NOT NULL,
code_active NUMBER NOT NULL,
code_cmd NUMBER NOT NULL,
code_int_type NUMBER NOT NULL,
code_priority NUMBER NOT NULL,
delivery VARCHAR2(30 BYTE) DEFAULT 'DUAL' NOT NULL,
clears V... | true |
edbdf377f9456f045cdf9afcde3ec0b619d29b61 | SQL | Snyo98/Java-cruds | /Java CRUDS/db_uts_e2.sql | UTF-8 | 1,563 | 2.953125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.9.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Waktu pembuatan: 08 Apr 2020 pada 15.50
-- Versi server: 10.4.11-MariaDB
-- Versi PHP: 7.4.1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARA... | true |
f9746af4a0f71f78f40d1c71080e512f89b33541 | SQL | Tomohiro-Hayashi/google_cpc_entryrate_estimation | /train/train_2.sql | UTF-8 | 2,502 | 4.40625 | 4 | [] | no_license | WITH
entry_list AS (
SELECT m.id member_id, m.created,
MAX(CASE WHEN a.id IS NOT NULL THEN 1 ELSE 0 END) entry_flg
FROM jstaff.members m
LEFT JOIN jstaff.applications a ON a.member_id = m.id
LEFT JOIN jl_ad.hellowork_members hm ON m.id = hm.member_id
AND DATE_DIFF('DAY', m.cr... | true |
31326d5fc504d1d2a60ba20bcfaeb5c112d6a21e | SQL | wyhwpl/MealOrderPlatFormPro | /脚本/t_order.sql | UTF-8 | 851 | 3.171875 | 3 | [] | no_license | drop table if exists t_order;
create table t_order(
id varchar(255) primary key, #订单ID
userID varchar(255), #用户ID
userName varchar(255), # 用户名字
address varchar(255), # 收货地址
phone varchar(11), #联系方式
sellerID varchar(255), #商家ID
sellerName varchar(255), #店铺名
sellerPhone varchar(11), #店家联系方式
riderID varchar(255),... | true |
f2e15bed5f049d3d6835bbddc5bd159efbb81079 | SQL | JennyLeekb/support | /support.sql | UTF-8 | 2,799 | 3.46875 | 3 | [] | no_license | --用户表
CREATE TABLE `support_oa_user` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键',
`nameEn` VARCHAR(50) NOT NULL DEFAULT '' COMMENT '用户英文名',
`nameCh` VARCHAR(50) NOT NULL DEFAULT '' COMMENT '用户中文名',
`gender` TINYINT(2) NOT NULL DEFAULT 0 COMMENT '性别 0-男生 1-女生',
`phone` VARCHAR(12) NOT NULL DEFAUL... | true |
dbbfde900d0028c9df99fcdc27120f51a1275283 | SQL | MemoryD/student | /db/example.sql | UTF-8 | 1,495 | 3.96875 | 4 | [] | no_license | CREATE TABLE student(
Sno CHAR(9) PRIMARY KEY,
Sname CHAR(20) NOT NULL,
Ssex CHAR(2) NOT NULL,
Sage SMALLINT NOT NULL,
Scomment VARCHAR(100)
);
INSERT INTO Student VALUES
('201215121','李勇','男',20,'傻孩子'),
('201215122','刘晨','女',19,'你是班花'),
('201215123','王敏','女',18,'不知道说什么了'),
('201215124','张立','男',19,'这个功能有点傻');
C... | true |
3c314f4bed33f1c5d3aefe0f141a2f36b1e70681 | SQL | projectmailtest19/HERBONA_DB | /HERBONA_DB/dbo/Stored Procedures/get_PaySchedule.sql | UTF-8 | 316 | 3.078125 | 3 | [] | no_license |
CREATE PROCEDURE get_PaySchedule
@Company_ID bigint=null,
@Branch_ID bigint=null,
@login_id bigint=null
AS
BEGIN
SET NOCOUNT ON;
select p.id,convert(varchar,p.PayScheduleWeek) +' ('+s.session_name+')' as PaySchedule from PaySchedule as p
inner join Session as s
on p.session_id = s.id
END | true |
50dac8be531be5cd5bd62646939298c7b3e6a983 | SQL | AhxanFarooq/CollegeManagementSys | /CollegeDataBaseSystem.sql | UTF-8 | 8,526 | 3.40625 | 3 | [] | no_license |
-- --------------------------------------------------------
--
-- Table structure for table EXPENSES
--
DROP TABLE IF EXISTS EXPENSES;
CREATE TABLE EXPENSES (
exp_id INT NOT NULL PRIMARY KEY IDENTITY(1,1),
exp_name varchar(30) NOT NULL,
exp_date varchar(10) NOT NULL,
exp_type varchar(20) NOT NULL,
exp_amou... | true |
fcc326a58b17ba0759fa8efeae8e5335ffe33640 | SQL | badoujun/xmm-biz-manager | /admin.sql | UTF-8 | 21,461 | 3.203125 | 3 | [] | no_license | /*
SQLyog Enterprise v12.08 (64 bit)
MySQL - 5.6.43 : Database - xmmdb
*********************************************************************
*/
/*!40101 SET NAMES utf8 */;
/*!40101 SET SQL_MODE=''*/;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS... | true |
40eddacbbb4832e516b0dc351bda9f53557b9330 | SQL | felipeserna/holbertonschool-higher_level_programming | /0x0E-SQL_more_queries/15-comedy_only.sql | UTF-8 | 616 | 3.890625 | 4 | [] | no_license | -- lists all Comedy shows in the database hbtn_0d_tvshows.
-- * The tv_genres table contains only one record where name = Comedy
-- (but the id can be different)
-- * Each record should display: tv_shows.title
-- * Results must be sorted in ascending order by the show title
-- * You can use only one SELECT statement
--... | true |
02c8ea8c92e2c9b5febe6ca48ef26b9d6bedbcde | SQL | Donzellini/realEstateEnforce | /Banco de Dados/Modelo_Fisico/Cliente.sql | UTF-8 | 561 | 2.859375 | 3 | [] | no_license | CREATE TABLE public.CLIENTE (ID_CLIENTE serial PRIMARY KEY,
NOME_CLI varchar(255),
RG_CLI char(9),
CPF_CLI char(11),
DATA_NASC_CLI date,
ESTADO_CIVIL_CLI varchar(20),
EMAIL_CLI varchar(100),
TELEFONE_CLI char(11),
ID_ENDERECO_C... | true |
41ef37b4f1914d366efb32ed728fc4bdf135d5fd | SQL | gefimov/GE-agency | /TussentijdseEvaluatieGE/03.sql | UTF-8 | 146 | 2.625 | 3 | [] | no_license | USE TussentijdseEvaluatie1C;
SELECT Personen.Voornaam, Personen.Familienaam FROM Baasje
Left join Personen ON Personen_id = Baasje.Personen_id | true |
ff55734104945da209d1fd6c2f071883a9fbd866 | SQL | ArrettB/omni-workspace | /servicetrax/dbscripts/views/PKT_ITEMS_V.sql | UTF-8 | 436 | 3.765625 | 4 | [] | no_license |
CREATE VIEW dbo.PKT_ITEMS_V
AS
SELECT DISTINCT rir.item_id, rir.item_name, rir.organization_id, rir.job_id, u.user_id
FROM resource_item_rates_v rir inner join items_by_job_types_v ijt
ON rir.job_id = ijt.job_id
AND rir.item_id = ijt.item_id
AND rir.item_type_code = 'hours'
INNER JOIN resources r
ON r.resource... | true |
67bea7baba3224bfa56f2644c8060231c84ddc49 | SQL | SJC-InformationServices/archive | /deploy/sql/createHistory.sql | UTF-8 | 1,329 | 2.96875 | 3 | [] | no_license | CREATE TABLE `entity_history` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`rawdata` json DEFAULT NULL,
`entity_id` int(11) GENERATED ALWAYS AS (json_unquote(json_extract(`rawdata`,'$.entity_id'))) STORED,
`entity_type` varchar(200) COLLATE utf8mb4_unicode_ci GENERATED ALWAYS AS (json_unquote(json_extract(`rawdata`,... | true |
8e3988fd75d1328cf693b8e6e208ca3075fd7d04 | SQL | jirkapinkas/online-skoleni-2021-2 | /1-kurz-sql-dotazy/cviceni/select-3-group-by-having.sql | UTF-8 | 3,874 | 4.125 | 4 | [] | no_license | -- S300_0:
SELECT hodnost, COUNT(*) pocet FROM AERO.pilot
GROUP BY hodnost;
-- S300:
SELECT tl.typ_letadla_id, tl.nazev, COUNT(l.letadlo_id) AS pocet_letadel
FROM AERO.typ_letadla tl, AERO.letadlo l
WHERE tl.typ_letadla_id = l.typ_letadla_id
GROUP BY tl.typ_letadla_id, tl.nazev;
-- S301:
SELECT tl.typ_letadla_id, tl.... | true |
9184104d579a161d9c1bfb3e6c5f95df2e12af33 | SQL | pi314mm/Hackcmu2018 | /sqlsetup.sql | UTF-8 | 1,276 | 3.78125 | 4 | [] | no_license | use stuff;
DROP TABLE IF EXISTS items;
CREATE TABLE items (
id INT NOT NULL AUTO_INCREMENT,
name VARCHAR(100),
description VARCHAR(5000),
department ENUM('CMU','Electronics','Clothing','Food','Outdoors'),
PRIMARY KEY(id)
);
DROP TABLE IF EXISTS users;
CREATE TABLE users (
id INT NOT NULL AUTO_INCREMENT,
user... | true |
e49dd254e472aade2e589c701a40be706a7c33fc | SQL | umindow/finance | /db/depment_base_info.sql | UTF-8 | 1,568 | 3.046875 | 3 | [
"Apache-2.0"
] | permissive | /*
Navicat MySQL Data Transfer
Source Server : myDB
Source Server Version : 50717
Source Host : localhost:3306
Source Database : middle
Target Server Type : MYSQL
Target Server Version : 50717
File Encoding : 65001
Date: 2018-02-05 23:06:41
*/
SET FOREIGN_KEY_CHECKS... | true |
80c6d826d80d7f083468c450f2ab17a0c77d765f | SQL | xiaojianwu/database | /updatescripts/from_420alpha/alterPrj.sql | UTF-8 | 219 | 3.5625 | 4 | [] | no_license | ALTER TABLE prj ADD COLUMN prj_prjtype_id integer,
ADD CONSTRAINT prj_prj_prjtype_id_fkey FOREIGN KEY (prj_prjtype_id)
REFERENCES prjtype (prjtype_id) MATCH SIMPLE
ON UPDATE NO ACTION ON DELETE NO ACTION;
| true |
0a72a8f8120af06f29abc4b7b9c1f8a203288405 | SQL | zw1076347327/ssh_studentmana | /ssh_studentmana/student.sql | UTF-8 | 3,440 | 3.5 | 4 | [] | no_license | /*
SQLyog 企业版 - MySQL GUI v8.14
MySQL - 5.7.16-log : Database - student
*********************************************************************
*/
/*!40101 SET NAMES utf8 */;
/*!40101 SET SQL_MODE=''*/;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHEC... | true |
734f25e8cc7c2c973cd48e46e160abb35894332a | SQL | leeiter/_biz_oracle_ | /IOUSER(todolist-2019-12-31).sql | UTF-8 | 774 | 3.421875 | 3 | [] | no_license | -- iouser : tbl_todolist
CREATE TABLE tbl_todolist (
td_seq NUMBER PRIMARY KEY,
td_date VARCHAR2(10) NOT NULL,
td_time VARCHAR2(8) NOT NULL,
td_subject nVARCHAR2(125) NOT NULL,
td_text nVARCHAR2(1000),
-- insert를 수행할 때 값을 추가하지 않으면 기본값으로 칼럼을 채워라
-- DEFAULT 항목이 설정되... | true |
cd0968aa3284a1910c2c6d1a5766fdb05fcc636c | SQL | ungame/concurrency-experimentals | /db/sql/mysql_orders_table.sql | UTF-8 | 577 | 2.765625 | 3 | [] | no_license | DROP TABLE IF EXISTS orders;
CREATE TABLE orders (
id VARCHAR(100) PRIMARY KEY,
user_id VARCHAR(100),
product_id VARCHAR(100),
description TEXT,
quantity INT,
unit_price DECIMAL(18, 2),
amount DECIMAL(18, 2),
status VARCHAR(35),
reason_reject VARCHAR(255),
paid CHAR(1) DEFAULT '... | true |
2730df5c70fdf108fd07d9733cadbff6a7928634 | SQL | ibanfq/academic | /app/config/schema/sql/migrations/2019_08_08_migration.sql | UTF-8 | 996 | 3.03125 | 3 | [
"MIT"
] | permissive | ALTER TABLE `competence`
ADD INDEX `course_idx` (`course_id` ASC);
;
ALTER TABLE `competence_criteria`
ADD INDEX `goal_idx` (`goal_id` ASC);
;
ALTER TABLE `competence_criterion_grades`
ADD INDEX `student_idx` (`student_id` ASC);
;
ALTER TABLE `competence_criterion_rubrics`
ADD INDEX `criterion_idx` (`criterion_i... | true |
3a06f9c71c92f1b6bae509db031769183d44f902 | SQL | XDSEC/LCTF2017 | /src/web/simple-blog/src/web1.sql | UTF-8 | 3,191 | 2.875 | 3 | [] | no_license | -- MySQL dump 10.13 Distrib 5.5.53, for Win32 (AMD64)
--
-- Host: localhost Database: web1
-- ------------------------------------------------------
-- Server version 5.5.53
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!4010... | true |
aeed69e220486d4fafc8b94edeec5fa68d8d587e | SQL | mkemalhernandi/Daskom-CTF-SQL-answer | /DaskomCTF_SQL.sql | UTF-8 | 1,090 | 3.984375 | 4 | [] | no_license | CREATE DATABASE ctf_triptodatabase;
USE ctf_triptodatabase;
-- A TRIP TO THE DATABASE CHALLENGE
SELECT * FROM information_schema.columns
WHERE column_name='flag';
-- FLAG AMONGST FLAGS CHALLENGE
SELECT flag
FROM fl4gh0ld3r
WHERE flag LIKE ('dctf1337{%}')
ORDER BY length(flag) ASC;
-- THE CURSE OF THE HOARDER
... | true |
f481bc94e346b0f9435f84c11a02568ee5893ad9 | SQL | spetz911/anonsocial | /query/1.sql | UTF-8 | 806 | 3.9375 | 4 | [] | no_license | CREATE OR REPLACE VIEW board_view (p_id, b_id) AS
SELECT ab_msg.person_id, ab_board.id FROM ab_msg
JOIN ab_post ON ab_msg.id = ab_post.msg_ptr_id
JOIN ab_thread ON ab_post.thread_id = ab_thread.msg_ptr_id
JOIN ab_board ON ab_thread.board_id = ab_board.id;
CREATE OR REPLACE VIEW stat_view (count, p_id, b_id) AS
SELECT ... | true |
7006577a3c845774ecb0f077317b7f37cd4934c4 | SQL | Tasks-neh/Task4 | /ecom.sql | UTF-8 | 5,908 | 3.265625 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1:3306
-- Generation Time: Feb 06, 2021 at 01:12 PM
-- Server version: 5.7.31
-- PHP Version: 7.3.21
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@... | true |
d754262053ecc06bc42b3ec59e47fbe63356ff83 | SQL | CJPowell/testRepo | /014 GUV-108 Including missing subscription events.sql | UTF-8 | 1,697 | 3.625 | 4 | [] | no_license | --------------------------------------------------------------------------------
-- missing_subscription --
--------------------------------------------------------------------------------
create view missing_subscription as
select null::varchar(32) as guid, tp.cust... | true |
e1e183ba77f73a81c52cd8ab9613ca147e2b11f7 | SQL | Sergbch/workshop3 | /km-62/Поправко/sql/dynamic_search.sql | UTF-8 | 1,376 | 3.5625 | 4 | [] | no_license | CREATE OR REPLACE PACKAGE orm_user_newss IS
TYPE news_data IS RECORD(
news_name user.user_name%TYPE,
users_count INTEGER
);
TYPE tblnewsdata IS TABLE OF news_data;
FUNCTION GetnewsData (news_name user.user_name%TYPE default null)
RETURN tblnewsdata
PIPEL... | true |
3c8195975e08f56630ece6f31e88fd3dccb78948 | SQL | alexandrafossum/database-exercises | /delete_exercises.sql | UTF-8 | 767 | 3.625 | 4 | [] | no_license | USE codeup_test_db;
# Write SELECT statements for:
# Albums released after 1991
# Albums with the genre 'disco'
# Albums by an artist of your choice
# Make sure to put appropriate captions before each SELECT
# Convert the SELECT statements to DELETE
# Use the MySQL command line client to make sure your records ... | true |
0c101fc6930abdfd37d51382b90d2105a3f5bd2c | SQL | LeoVanelli/bd3-semana01 | /S01E01-ator_nome_li_ordenado.sql | UTF-8 | 241 | 2.59375 | 3 | [] | no_license | USE SAKILA;
SELECT
a.last_name AS 'Sobrenome'
FROM
actor a
WHERE
a.last_name LIKE '%LI%'
ORDER BY last_name DESC;
SELECT
a.last_name AS 'Sobrenome'
FROM
actor a
WHERE
a.last_name LIKE '%LI%'
ORDER BY last_name ASC;
| true |
9d8941d1c7861888a3439d964f2f8efa60dded73 | SQL | CM0R31R4/motor_desarrollo | /base/bono3/CONSALUD/sp_oracle/CONPRESTPAQUETE_PKG.sql | UTF-8 | 2,921 | 2.921875 | 3 | [] | no_license |
SQL*Plus: Release 11.2.0.3.0 Production on Mon Jun 1 18:05:37 2015
Copyright (c) 1982, 2011, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> SQL> PROCEDURE CON... | true |
1800e25545d6e6d7fae24fbe00c7de2706a04ef9 | SQL | Zach-Wibbenmeyer/cs342 | /05sql/lab05_3.sql | UTF-8 | 1,362 | 3.796875 | 4 | [] | no_license | -- Zach Wibbenmeyer
-- Professor Vanderlinden
-- CS342 - Homework 05
-- a
SELECT DISTINCT P.lastName || ', ' || P.firstName || ' and ' || Y.firstName || ' - ' || H.phoneNumber || ' - ' || H.street as PhoneBookEntry
FROM Household H
INNER JOIN Person P ON H.ID = P.householdID
INNER JOIN Person Y ON H.ID = Y.househo... | true |
68f8e6efba5ea6294c82feb2a91057dece3fbea1 | SQL | avamsykiran/PLSQL_23Apr2021_28Apr2021_14001600 | /script08.sql | UTF-8 | 531 | 3.078125 | 3 | [] | no_license | declare
v_employees_rec employees%rowtype;
begin
select *
into v_employees_rec
from employees
where job_id = 'AD_VP';
dbms_output.put_line('employee id : ' || v_employees_rec.employee_id);
dbms_output.put_line('last name : ' || v_employees_rec.last_name);
dbms_output.put_line('... | true |
129f98004a73060791d0c17ca06ccb450aa49bc7 | SQL | hung118/uvis | /src/main/sql/scramble_person_ssns.sql | UTF-8 | 2,090 | 3.78125 | 4 | [] | no_license | SET ECHO OFF
SET SERVEROUTPUT ON
DECLARE
-- Define working variables
lv_ssn_lastdigits_count NUMBER := 0;
lv_ssn_middigits_count NUMBER := 0;
lv_update_count NUMBER := 0;
lv_update_err_count NUMBER := 0;
-- Define New Person Record Variables
lv_rec_ssn ... | true |
cec906c2125405e0e7f0f7becae5e0f7fd72d5be | SQL | sagarnikam123/learnNPractice | /others/tech/dbSNP/MySQL_bedSNP.sql | UTF-8 | 954 | 2.625 | 3 | [
"MIT"
] | permissive | -- MySQL dbSNP data
-- for loading genomic data
mysql -u root --local-infile=1 --skip-line-numbers=1
create database dbSNP;
use dbSNP;
create table bedSNP(
chromosome varchar(10),
ChrId_1 bigint,
ChrId_2 bigint,
rsId varchar(10),
blank varchar(5),
zero varchar(3),
iD3 bigint,
str1 varchar(100),
str2 varchar(20),
type... | true |
05d55c3894663df3f61cd65f7f511b82763bad72 | SQL | CrescencioLucas/Php-Mysql-Exercises | /atv_prt_043_bd.sql | UTF-8 | 1,389 | 2.703125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.6.6deb5
-- https://www.phpmyadmin.net/
--
-- Host: localhost:3306
-- Generation Time: 16-Ago-2019 às 11:48
-- Versão do servidor: 5.7.24-0ubuntu0.18.04.1
-- PHP Version: 7.2.14-1+ubuntu18.04.1+deb.sury.org+1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!4010... | true |
f405407f50f2eb505970a6fba357304fcb6b3d40 | SQL | riemann1859/Chinook_database | /Query2.sql | UTF-8 | 668 | 4.34375 | 4 | [] | no_license | --Number of tracks per artist. Here consider artists whose all songs are completely rock
select sub1."Name", sub1.number_of_tracks
from (
select sub."Name", sum(sub.rock_or_not),count(*) as number_of_tracks
from (
select ar."Name",case when t."GenreId"=1 then 0
... | true |
c329e81db8b7cb75d455d364cec0601071e079ff | SQL | mtejas88/esh | /Projects/gold_plating/src/sql/frn_statuses.sql | UTF-8 | 287 | 3.15625 | 3 | [] | no_license | select distinct recipient_id, li.frn, fr.frn_status, num_bids_received
from public.fy2016_services_received_matr sr
left join fy2016.line_items li
on sr.line_item_id = li.id
left join fy2016.frns
on li.frn = frns.frn
left join public.funding_requests_2016_and_later fr
on li.frn = fr.frn | true |
70c370fd9c0379c11cc83d5567e3ca009435f141 | SQL | SergeyKarpen/servlet | /src/main/resources/db/migration/V2__Base_version.sql | UTF-8 | 1,187 | 3.921875 | 4 | [] | no_license | create table account
(
id bigint auto_increment,
status varchar(255) null,
content varchar(255) null,
constraint account_id_uindex
unique (id)
);
alter table account
add primary key (id);
create table developer
(
id_developer bigint auto_increment,
first_name varchar(255) n... | true |
67cd0bb1581613cac1bc44be001eb5c7b4109352 | SQL | sot/mica | /mica/archive/archfiles_aca_l0_def.sql | UTF-8 | 661 | 2.703125 | 3 | [
"BSD-3-Clause"
] | permissive | CREATE TABLE archfiles (
filename text not null,
filetime int not null,
year int not null,
doy int not null,
tstart float not null,
tstop float not null,
startmjf int ,
startmnf int ,
stopmjf int ,
stopmnf int ,
... | true |
63810437dfe9843a02ed397be7c4592d2b304942 | SQL | msmet/EAA-SQL-Reports | /State Reporting/School Infrastructure Database (SID).sql | UTF-8 | 2,356 | 3 | 3 | [] | no_license | SELECT
sch.school_number
, sch.abbreviation
, sch.name
, '%param2%'
, ps_customfields.getcf('schools',sch.school_number,'MI_SRSD_AdminUnit')
, 0
, NULL
, NULL
, NULL
, NULL
, COUNT(DISTINCT CASE WHEN (LOG.LOGTYPEID = 628 AND LOG.SUBTYPE = '04') THEN log.dcid ELSE 0 END) AS Truancy
, NULL
, COUNT(DISTINCT C... | true |
70d5427389abdddae1c3eb6e16b701379f0af8f5 | SQL | hanah04/sqlScript | /bizdb fix/FIX - cant update delete flag in psphicledger.sql | UTF-8 | 598 | 2.953125 | 3 | [] | no_license |
select registryno, dbo.udf_GetFullName(a.FK_emdPatients)fullname,registrydate,PK_TRXNO, b.applno
--update a set IsDelete=1
From psPHICLedgers a join psPHICAppl b on a.FK_psPatRegisters=b.FK_psPatRegisters and b.FK_TRXNO<>a.PK_TRXNO
where --a.FK_psPatRegisters=6894 and
cancelflag<>1 and IsDelete<>1
select dbo.ud... | true |
2d205cf9c05084c8008880546067cc92fea0bf76 | SQL | AndreaPineiro/A01705681-Labs-TC2005b | /Lab16 - Constraints para Integridad Referencial/crearBd.sql | UTF-8 | 3,431 | 3.921875 | 4 | [] | no_license | -- DROP TABLE Entregan, Materiales, Proyectos, Proveedores
-- Crear Tablas
IF EXISTS (SELECT * FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 'Materiales')
DROP TABLE Materiales
CREATE TABLE Materiales (
Clave NUMERIC(5) NOT NULL,
Descripcion VARCHAR(50),
Costo NUMERIC(8, 2)
)
IF EXISTS (SELECT * FROM INFO... | true |
fc5fc8c9c110c3188b28a0b1f3901721921052f8 | SQL | whyhhh123/studentmanager | /test.sql | UTF-8 | 8,466 | 3.21875 | 3 | [] | no_license | /*
Navicat Premium Data Transfer
Source Server : studentmanager
Source Server Type : MySQL
Source Server Version : 80021
Source Host : localhost:3306
Source Schema : studentmanager_test
Target Server Type : MySQL
Target Server Version : 80021
File Encoding : 65001
Da... | true |
8124afe9980835d51880fe80fbe9ff2471d1cd08 | SQL | Austin-Whitley/database-exercises | /limit_exercises.sql | UTF-8 | 253 | 2.953125 | 3 | [] | no_license | USE employees;
SELECT DISTINCT first_name FROM employees ORDER BY first_name DESC LIMIT 10;
SELECT emp_no FROM salaries ORDER BY salary DESC LIMIT 5;
--update to show the "10th page"
SELECT emp_no FROM salaries ORDER BY salary DESC LIMIT 5 OFFSET 45; | true |
44997eabcbd8198f2a0a4dd67cc2f43346504060 | SQL | ume-team/ume-ems-tool | /src/main/gen/ddl/mysql/EM_TBL_COL_CFG.sql | UTF-8 | 1,723 | 3.671875 | 4 | [] | no_license |
/* EM_TBL_COL_CFG : EM实体属性配置表 */
DROP TABLE IF EXISTS `EM_TBL_COL_CFG` ;
CREATE TABLE `EM_TBL_COL_CFG` (
`ENT_ID` VARCHAR(32) BINARY NOT NULL COMMENT '属性所属实体ID',
`COL_ID` VARCHAR(32) BINARY NOT NULL COMMENT '属性ID',
`COL_NAME` VARCHAR(64) BINARY COMMENT '属性名称',
`DATA_SUB_TYPE` VARCHAR(32) BIN... | true |
9f3a437473742b6426c0c86cbf27aa81e9d72dcd | SQL | jakeshin89/bit_sql | /sql/02.sql | UTF-8 | 10,158 | 4 | 4 | [] | no_license | --테이블 SELECT해서 가져오기
--테이블 characters 모두 소문자로 변경하기 lower(a column)
select dname, lower(dname), loc, lower(loc) from dept;
select * from employees;
-- *는 all을 의미함
select * from emp;
select * from dept;
--원하는 column 추출, column name은 대소문자 구분 안함. 하지만 계정은 구분함.
select ename, hiredate from emp;
select ENAME, HIRE... | true |
88da1f25e23c91ee31b8039ad51d854a4a7d9917 | SQL | gel1123/dbmemo | /oracledb/st02.sql | UTF-8 | 561 | 3 | 3 | [] | no_license | -- drop table seq cascade constrainsts purge;
drop table seq;
create table seq ( num Number );
insert into seq values(2);
insert into seq values(3);
insert into seq values(1);
insert into seq values(3);
insert into seq values(3);
insert into seq values(4);
insert into seq values(4);
insert into seq values(2);
insert in... | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.