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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
2583f8ca6c058a94906791b5560ada2c3bd01ede | SQL | cdesmarais/WebDB-Test | /WebDB/StoredProcedures/Common/dbo.Admin_GetRIDCount_ForSurvey.PRC | UTF-8 | 614 | 3.359375 | 3 | [] | no_license |
/****** Object: StoredProcedure [dbo].[Admin_GetRIDCount_ForSurvey] Script Date: 03/26/2013 10:44:27 ******/
IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[Admin_GetRIDCount_ForSurvey]') AND type in (N'P', N'PC'))
DROP PROCEDURE [dbo].[Admin_GetRIDCount_ForSurvey]
GO
CREATE PROCEDURE [... | true |
dac907d604bdfc80c86af2e097608850bb8e58da | SQL | coodesoft/webTicketAPI | /sql/21-8-18-2.sql | UTF-8 | 640 | 3.09375 | 3 | [
"BSD-3-Clause"
] | permissive | ALTER TABLE `zona` ADD `final` BOOLEAN NOT NULL DEFAULT TRUE COMMENT 'Este campo indica si al seleccionar esta zona en algun formulario se puede entender que se completó la selección de zonas' AFTER `nivel`;
ALTER TABLE `zona` ADD `denominacion` SMALLINT NOT NULL AFTER `final`;
CREATE TABLE `creoprop`.`zona_denominaci... | true |
cd261e15b171b1b44e93f8644013780622761618 | SQL | johnkz1981/database_march | /lesson2/alter_table_example.sql | UTF-8 | 1,638 | 3.78125 | 4 | [] | no_license | RENAME TABLE Countries TO countries;
RENAME TABLE Areas TO regions;
RENAME TABLE Cities TO cities;
ALTER TABLE countries RENAME COLUMN Name TO name;
ALTER TABLE regions RENAME COLUMN Name TO name;
ALTER TABLE regions RENAME COLUMN Countries_id TO country_id;
ALTER TABLE cities DROP FOREIGN KEY fk_Cities_Areas1;
ALTER... | true |
6eb5b2734371b03a649de0108ff9bf14a2f625cb | SQL | jrunzer26/CloudCodingEnv | /myapp/database/schema.sql | UTF-8 | 1,166 | 3.609375 | 4 | [
"MIT"
] | permissive | DROP TABLE IF EXISTS Users CASCADE;
DROP TABLE IF EXISTS Quizzes CASCADE;
DROP TABLE IF EXISTS Questions CASCADE;
DROP TABLE IF EXISTS Answers CASCADE;
DROP TABLE IF EXISTS QuizResults CASCADE;
DROP TABLE IF EXISTS Programs CASCADE;
CREATE TABLE Users (
"email" text PRIMARY KEY,
"firstName" text,
"lastName... | true |
07ab16ad4e966118b86678ca03e4a810258f82dd | SQL | ZVlad1980/excel_api | /test/residents/check_status.sql | UTF-8 | 516 | 3.375 | 3 | [] | no_license | select extract(year from a.date_op) year,
a.nom_vkl,
a.nom_ips,
a.shifr_schet,
a.sub_shifr_schet,
sum(a.amount) amount
from dv_sr_lspv_acc_v a
where a.nom_vkl = 257
and a.nom_ips = 37
and a.date_op > to_date(20170101, 'yyyymmdd')
and a.charge_type = 'TAX'
group by extract(... | true |
ae2eeb8e3f3bf066253b1ed5c04a21567be2c876 | SQL | dewhitee/snippets | /sql/join/all_genres_of_artist.sql | UTF-8 | 219 | 3.5 | 4 | [
"MIT"
] | permissive | select track.title, artist.name, genre.name
from track join genre join album join artist on
track.genre_id = genre.genre_id and track.album_id = album.album_id and album.artist_id = artist.artist_id
order by album.name; | true |
46c22ba411fcfa6410d309b5cd4ceea212914fe2 | SQL | Vanyok/eventsCalendar | /db_ini.sql | UTF-8 | 8,027 | 2.953125 | 3 | [
"BSD-3-Clause"
] | permissive | -- phpMyAdmin SQL Dump
-- version 4.6.4
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Generation Time: May 19, 2017 at 11:00 PM
-- Server version: 5.7.18-0ubuntu0.16.04.1
-- PHP Version: 7.0.19-1+deb.sury.org~xenial+1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARA... | true |
1693607788765e0881fca15b2dcd4d661480ad7b | SQL | sp-autotest/billing-admin | /src/main/resources/sql/postgres/schema.sql | UTF-8 | 43,904 | 3.578125 | 4 | [] | no_license | drop table if exists billing_file cascade;
drop table if exists billing_terminal cascade;
drop table if exists bo_file cascade;
drop table if exists report_file cascade;
drop table if exists country_currency cascade;
drop table if exists file_record cascade;
drop table if exists posting_file cascade;
drop table if exis... | true |
703ef65a56bc30f9c89f445557e7bda504f0e569 | SQL | timowang1991/SQL-Tutorial---Full-Database-Course-for-Beginners | /03-Update and Delete.sql | UTF-8 | 915 | 3.40625 | 3 | [] | no_license | CREATE TABLE student (
student_id INT PRIMARY KEY AUTO_INCREMENT,
name VARCHAR(20),
major VARCHAR(20) DEFAULT 'undecided'
);
DESCRIBE student;
INSERT INTO student(name, major) VALUES('Jack', 'Biology');
INSERT INTO student(name, major) VALUES('Kate', 'Sociology');
INSERT INTO student(name, major) VALUES('Cla... | true |
309351b5683a7d163936b616c7c8c3121299fc48 | SQL | hruodwolf/werkzeug | /plsql_uebungen/Kapitel_12_Collection/12_Kapitel_Collection_Beispiel_nested_tables_5_DELETE.sql | ISO-8859-1 | 925 | 2.8125 | 3 | [] | no_license | SET SERVEROUTPUT ON
DECLARE
TYPE List_T IS TABLE OF VARCHAR2 (88);
L_Auto List_T := List_T ();
L_Row PLS_INTEGER;
BEGIN
L_Auto.EXTEND (4);
L_Auto (1) := 'BMW';
L_Auto (2) := 'Audi';
L_Auto (3) := 'VW';
L_Auto (4) := 'Tatra';
L_Row := L_Auto.FIRST;
WHILE L_Row IS NOT NULL LOOP... | true |
2bccbf456a11363eeaa3e1da1dcfd0548f533b4d | SQL | zzenonn/amazon-kinesis-demo | /kinesis.sql | UTF-8 | 951 | 3.84375 | 4 | [
"MIT"
] | permissive | CREATE OR REPLACE STREAM "TEMP_STREAM" (
"iotName" varchar (40),
"iotValue" integer,
"ANOMALY_SCORE" DOUBLE);
-- Creates an output stream and defines a schema
CREATE OR REPLACE STREAM "DESTINATION_SQL_STREAM" (
"iotName" varchar(40),
"iotValue" integer,
"ANOMALY_SCORE" DOUBLE,
... | true |
8476f1ef436f85f15bb85cc80c2f014cee98a2b8 | SQL | jkstill/oracle-script-lib | /sql/stats_trace.sql | UTF-8 | 2,939 | 3.53125 | 4 | [
"MIT",
"LicenseRef-scancode-proprietary-license"
] | permissive |
set echo on
/*
Enable tracing in DBMS_STATS
http://www.freelists.org/post/oracle-l/dbms-statset-paramtrace3166
http://www.orafaq.com/maillist/oracle-l/2006/08/22/0985.htm
http://www.hellodba.com/reader.php?ID=30&lang=en
Values to use for dbms_stats.set_param('trace','value')
in 11g the set_param procedure is depre... | true |
8c5a95755f60f85bfea994a63ce85c0557584f6f | SQL | rkammer/production-sql | /views/subaccount_get_list.sql | UTF-8 | 1,925 | 3.234375 | 3 | [] | no_license | CREATE OR REPLACE VIEW subaccount_get_list(
subaccount_id,
subaccount_code,
subaccount_title,
subaccount_media_company_id,
subaccount_business_group_id,
subaccount_network_id,
subaccount_production_id,
subaccount_season_id,
subaccount_episode_id,
subaccount_ledger_id,
subacco... | true |
a7ae6263463d301d12ad5c48b0843f5fb91c6671 | SQL | benhpoh/landmark-remark | /schema.sql | UTF-8 | 223 | 2.59375 | 3 | [] | no_license | CREATE DATABASE landmark;
-- \c landmark;
CREATE TABLE users (
id SERIAL PRIMARY KEY,
username text
);
CREATE TABLE landmarks (
id SERIAL PRIMARY KEY,
user_id INTEGER,
note TEXT,
lat DECIMAL,
lng DECIMAL
); | true |
72d038572f797a882f342365391481f7807bbe3a | SQL | Kris-Zhao/CJV805_HRManagement | /support/createSecurityTable.sql | UTF-8 | 256 | 2.8125 | 3 | [] | no_license | CREATE TABLE SECURITY
( EMPLOYEE_ID NUMBER(6,0) CONSTRAINT sec_emp_id_pk PRIMARY KEY,
SEC_ID VARCHAR2(20),
SEC_PASSWORD VARCAHR2(10),
SEC_STATUS CHAR(1),
CONSTRAINT sec_emp_fk FOREIGN KEY(EMPLOYEE_ID)
REFERENCES EMPLOYEES(EMPLOYEE_ID) ); | true |
5a992b23db3ae592bf0dbb11cb3637ddc260fb5b | SQL | psalmeight/products-api | /migrations/19_create_table_sales.down.sql | UTF-8 | 328 | 2.859375 | 3 | [
"Apache-2.0"
] | permissive | CREATE TABLE IF NOT EXISTS "sales"(
"id" SERIAL primary key,
"sale_datetime" VARCHAR,
"sale_dispense_location" VARCHAR,
"sale_dispense_datetime" VARCHAR,
"sale_no" VARCHAR,
"sale_details" VARCHAR,
"sale_status" VARCHAR,
"customer_id" INT,
FOREIGN KEY (customer_id) REFERENCES customer... | true |
cd7bed2d895b79befc4ecc011e80a53fb1ee4f34 | SQL | Panik1997/Food_Ordering_System | /SQL_TASK.sql | UTF-8 | 448 | 4.03125 | 4 | [] | no_license | /*1. Select countries where the total number of inhabitants (population) in all cities is greater
than 400.*/
SELECT c.Name FROM Country AS c
WHERE 400 < (SELECT ci.Population FROM City AS ci WHERE c.id_CountryID = ci.CountryID)
/*2. Select names of the countries that have no buildings at all*/
SELECT c.Name FROM ... | true |
d99113f8b492672b8f1b89705fae5250f39f3903 | SQL | CeliaZhu/covid19-pennsylvania | /update.sql | UTF-8 | 369 | 3.625 | 4 | [] | no_license | CREATE TEMP TABLE temp_us
(LIKE covid19.covid19us INCLUDING ALL);
\COPY temp_us from '~/git/nytimes-covid19-data/us-counties.csv' delimiter ',' header csv;
INSERT INTO covid19.covid19us (date, county, state, fips, cases, deaths)
SELECT t2.* FROM temp_us t2
LEFT JOIN covid19.covid19us t1 ON
t1.date = t2.date
WHERE
t1.... | true |
dbbf78625e210a6ba0308a0fa18b1cf63cc96d33 | SQL | victorluccassvl/UniversityMaterial | /MC536/Querry/SearchQuerry/14_Querry.sql | UTF-8 | 448 | 3.203125 | 3 | [] | no_license | -- 14) Exames de sangue de um determinado paciente ( CPF )
WITH associa_cpf_aos_procedimentos AS (
SELECT *
FROM paciente p INNER JOIN submetido_a s
ON p.cpf = s.cpf
WHERE p.cpf = 23169435862
)
SELECT data, hora, nome, descricaoproc
FROM exame e INNER JOIN associa_cpf_aos_procedimentos... | true |
22590646682b6abe2eee7d0c4023a911fc07029e | SQL | drobnjak98/E-Learning | /baza/predaje.sql | UTF-8 | 790 | 3.46875 | 3 | [] | no_license | CREATE TABLE IF NOT EXISTS `portal`.`predaje` (
`email_nastavnik` VARCHAR(255) CHARACTER SET 'latin1' COLLATE 'latin1_swedish_ci' NOT NULL,
`sifra_kursa` CHAR(6) CHARACTER SET 'latin1' COLLATE 'latin1_swedish_ci' NOT NULL,
PRIMARY KEY (`email_nastavnik`, `sifra_kursa`),
INDEX `fk_nastavnik_has_kurs_kurs1_idx` (... | true |
98442ba30a9a8de3e636b3e3083e2c3b7fa0986d | SQL | META-DREAMER/291-P1 | /sql/select.sql | UTF-8 | 863 | 3.375 | 3 | [] | no_license | select * from (
select rownum,src,dst,dep_date,dep_time,arr_time,2 AS stops,flightno1,flightno2,flightno3,layover1*24*60 as layover1,layover2*24*60 as layover2,fare1,fare2,fare3,price,seats
from (select * from (two_good_connections))
union all
select rownum,src,dst,dep_date,dep_time,arr_time,1 AS stops,flightno1,flight... | true |
2e2af7925e4331a48ca826a0b5507955f37a1b19 | SQL | retailcrm/mg-transport-telegram | /migrations/1528208070_app.up.sql | UTF-8 | 305 | 2.9375 | 3 | [
"MIT"
] | permissive | create table users
(
id serial not null
constraint users_pkey
primary key,
external_id integer not null,
user_photo_url varchar(255),
user_photo_id varchar(100),
created_at timestamp with time zone,
updated_at timestamp with time zone,
constraint users_key unique(external_id)
);
| true |
aaf8a630cdb7200040c26264133c5f674d775711 | SQL | paarthbir77/week6-assignment | /target/classes/com/greatlearning/designpattern2/script.sql | UTF-8 | 231 | 2.75 | 3 | [] | no_license | create database assignment6;
use assignment6;
CREATE TABLE 'accounts' (
'accountNo' int(5) NOT NULL AUTO_INCREMENT,
'balance' int(8) NOT NULL,
'branch' varchar(20) NOT NULL,
'type' varchar(20) NOT NULL,
PRIMARY KEY ('accountNo')
); | true |
ca95d208372c36d98fad566e6b3ac50993e5eb18 | SQL | tianhongw/tinyid | /sql/db1/db.sql | UTF-8 | 1,261 | 3.375 | 3 | [] | no_license | USE tinyid;
CREATE TABLE `tiny_id_info` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`biz_type` varchar(63) NOT NULL,
`max_id` bigint(20) NOT NULL DEFAULT 0,
`step` int(11) DEFAULT 0,
`delta` int(11) NOT NULL DEFAULT 1,
`remainder` int(11) NOT NULL DEFAULT 0,
`create_time` timestamp NOT NULL DEFAU... | true |
c2411834dca22c2e7548ff5ce08ed3502be91aa1 | SQL | AhmedKKhalid/Data-Analysis-Products-Price | /schema/project sql.sql | UTF-8 | 1,321 | 4.40625 | 4 | [] | no_license | /* transactions table */
select * from sales.transactions ;
/* number of row in transactions table */
select count(*) from sales.transactions ;
/* Show transactions for Chennai market (market code for chennai is Mark001 */
select * from sales.transactions where market_code='Mark001' ;
/* Show distrinct product cod... | true |
866cfe3c4dd3b2b31e8b16b55125ece46454fd1f | SQL | i-avatar777/yii2-service-blockchain-table | /init.sql | UTF-8 | 719 | 3.15625 | 3 | [] | no_license | CREATE TABLE `blockchain_transaction` (
`id` int(11) NOT NULL AUTO_INCREMENT,
row_id int null,
table_id int null,
created_at int null,
hash varchar(64) null,
PRIMARY KEY (`id`)
) ENGINE=InnoDB D... | true |
10b539a5934c220ba9695978179ecb5c9086ed0c | SQL | emanuelanechei/Oracle-Email-Reports | /sql/errors-Enrich_ACCSHV.sql | UTF-8 | 919 | 3.21875 | 3 | [] | no_license | select segment1 "Part Number"
, case when nvl(fixed_days_supply,0) <> 20 then 'Fixed Days Supply should be 20'
when release_time_fence_code <> 4 then 'Release time fence code should be "User-defined time fence"'
when nvl(release_time_fence_days,0) <> 10 then 'Release time fence days should b... | true |
2a35e8ce08b759cfe2ca457966eade17e4b6e11f | SQL | stepheku/cclqueries | /powerforms/smart_template_powerform_search.sql | UTF-8 | 2,235 | 3.71875 | 4 | [
"MIT"
] | permissive | /*
smart_template_powerform_search.sql
~~~~~~~~~~~~~~~~~~~~
Searches for a smart template program usage within PowerForms
*/
select form = dfr.description
, section = dsr.description
, template = cv1.definition
, read_only = nvp3.pvc_value
, dta = dta.description
, event_code = uar_get_code_dis... | true |
26aee4438a2109f7d60e7b377008cac7e9abf89d | SQL | sczhaoqi/docs-manager | /src/main/resources/db/init.sql | UTF-8 | 610 | 2.703125 | 3 | [] | no_license | create table if not exists users(
id int auto_increment primary key,
username varchar(60),
password varchar(100),
enabled boolean default 1
);
create table if not exists AUTHORITIES(
id int auto_increment primary key ,
authority varchar(60),
authority_details varchar(200)
);
create table if not exists us... | true |
edb9929d67082541d63c512fb8bed62b826348f6 | SQL | cpietsch/logger | /mysql/logger.sql | UTF-8 | 329 | 2.546875 | 3 | [
"MIT"
] | permissive | DROP TABLE IF EXISTS `logs`;
CREATE TABLE `logs` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`sessionid` varchar(40) NOT NULL,
`payload` text NOT NULL,
`modified` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
`ip` varchar(14) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARS... | true |
9f4ee718105f6394d04418807d3f916ae6426fd6 | SQL | yllczjh/yl | /工作文档/健康通平台/更新内容/1互联互通序列、表及表初始数据.sql | GB18030 | 23,369 | 3.234375 | 3 | [] | no_license | create sequence SEQ_ͨ_־_ˮ
minvalue 1
maxvalue 9999999999
start with 1
increment by 1
cache 10;
create sequence SEQ_ͨ__ˮ
minvalue 1
maxvalue 9999999999
start with 1
increment by 1
cache 10;
create sequence SEQ_ͨ_ϸ_ˮ
minvalue 1
maxvalue 9999999999
start with 1
increment by 1
cache 10;
create sequence SEQ_ͨ_ûϢ_ˮ
min... | true |
34ba709d4b6b7c0465a73895760fd412576a97bb | SQL | qlmnrnq/instagram | /aihalBD.sql | UTF-8 | 15,280 | 3.125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.8.3
-- https://www.phpmyadmin.net/
--
-- Хост: 127.0.0.1:3306
-- Время создания: Июн 04 2019 г., 03:16
-- Версия сервера: 5.6.41
-- Версия PHP: 5.5.38
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACT... | true |
b809eabbdb38e6b5c44fdda47737bca0af01540f | SQL | leed25d/golden | /dotWine/drive_c/XEClient/oledb/samples/RefCur/RefCur.sql | UTF-8 | 1,308 | 3.328125 | 3 | [] | no_license | CREATE OR REPLACE PACKAGE Employees AS
TYPE empcur IS REF CURSOR;
PROCEDURE GetEmpRecords(p_cursor OUT empcur,
indeptno IN NUMBER,
p_errorcode OUT NUMBER);
FUNCTION GetDept(inempno IN NUMBER,
p_errorcode OUT NUMBER)
RET... | true |
588080081165e17353fb3ba7e3ee5d2ce82b763c | SQL | keipham/e-commerce_website_PL-SQL | /non-apex/model/CONSTRAINTS/SOK_PRODUCT_DETAIL_LU.sql | UTF-8 | 1,096 | 2.84375 | 3 | [
"MIT"
] | permissive | --------------------------------------------------------
-- Constraints for Table SOK_PRODUCT_DETAIL_LU
--------------------------------------------------------
ALTER TABLE "SOK_PRODUCT_DETAIL_LU" ADD CONSTRAINT "SOK_PRODUCT_DETAIL_PK" PRIMARY KEY ("PRODUCT_DETAIL_ID")
USING INDEX ENABLE;
ALTER TABLE "SOK_PRODU... | true |
8d2aa050a73fdef389a1fca35fda660324dfc777 | SQL | levelp/java_07 | /webapp/config/CREATE_001.sql | UTF-8 | 826 | 4.03125 | 4 | [] | no_license | CREATE TABLE resume (
uuid CHAR(36) PRIMARY KEY NOT NULL,
full_name TEXT NOT NULL,
location TEXT
);
CREATE TABLE contact (
id SERIAL,
resume_uuid CHAR(36) NOT NULL,
type TEXT NOT NULL,
value TEXT NOT NULL,
CONSTRAINT contant_pkey PRIMARY KEY (id),
C... | true |
89d0f8741f664b0ebfe1a8b5e879cea85d0ed077 | SQL | white-van/freeflo.io | /backend/schema.sql | UTF-8 | 735 | 3.5625 | 4 | [
"MIT"
] | permissive | CREATE TYPE pr_status AS ENUM ('approved', 'denied', 'pending');
CREATE TABLE IF NOT EXISTS users (
ID SERIAL PRIMARY KEY,
username VARCHAR(30) UNIQUE,
email VARCHAR(30),
password VARCHAR(30) NOT NULL
);
CREATE TABLE IF NOT EXISTS articles (
author_id INT REFERENCES users(ID) ,
article_id SERIAL PRIMARY KE... | true |
d8dc11789a7708ced73e1e9e1588f4dd9915a0cd | SQL | andri000me/web-2-mi | /web_2_mi.sql | UTF-8 | 2,430 | 3.125 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | -- phpMyAdmin SQL Dump
-- version 4.5.1
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Jul 10, 2018 at 10:37 AM
-- Server version: 10.1.13-MariaDB
-- PHP Version: 5.6.23
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CL... | true |
a71bae431f7fb5fe7142ddeb2c8eaf49cbbdc214 | SQL | Fellyx/adpizza | /banco_de_dados.sql | UTF-8 | 5,655 | 3.109375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.2.12deb2
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Tempo de geração: 04/06/2015 às 15:16
-- Versão do servidor: 5.6.24-0ubuntu2
-- Versão do PHP: 5.6.4-4ubuntu6
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@C... | true |
5e40e4e5b8bbd09e39b82e233bab02f692f16007 | SQL | fruscil/AFScripts | /DDL_Split_From_Terry/EMOC3_Script-20140219100142_converted/Stored_Procedures/SP_emoc3.get_moc_joaps.sql | UTF-8 | 854 | 3.03125 | 3 | [] | no_license | --<ScriptOptions statementTerminator="@"/>
CREATE PROCEDURE "EMOC3"."GET_MOC_JOAPS" (
p_cursor OUT emoc_types.emoc_cursor,
mocidin NUMBER
)
AS
BEGIN
-- RETURN THE CURSOR FOR THE RECORDSET
OPEN p_cursor FOR
SELECT joap.joapid, joap.joapcode, joap.joapdescription,
jo... | true |
afb645682e41ae24ea945107eae8a0584d163eb4 | SQL | Air-Cooled/diboot | /iam-base-starter/src/main/resources/META-INF/sql/init-iam-base-sqlserver-upgrade.sql | UTF-8 | 5,249 | 3.296875 | 3 | [
"Apache-2.0"
] | permissive | ALTER TABLE ${SCHEMA}.iam_user ADD tenant_id bigint not null default 0;
ALTER TABLE ${SCHEMA}.iam_account ADD tenant_id bigint not null default 0;
ALTER TABLE ${SCHEMA}.iam_role ADD tenant_id bigint not null default 0;
ALTER TABLE ${SCHEMA}.iam_user_role ADD tenant_id bigint not null default 0;
ALTER TABLE ${SCHEMA}.ia... | true |
db90b71ee961914cf63e6a79c470080be8fee256 | SQL | Julienski/MyQAPortfolio | /SkilloQueries.sql | UTF-8 | 7,104 | 4.125 | 4 | [] | no_license | #1. Брой на потребители.
Select * from users;
#2. Най-стария потребител.
Select birthDate, username
from users
order by birthDate asc limit 1;
#3. Най-младия потребител.
Select birthDate, username
from users
order by birthDate desc limit 1;
#4. Колко потребители са регистрирани с мейли от abv и gmail. И колко с разл... | true |
e93e088faad7f0366a40951f5c0674a9e133f422 | SQL | smilescripts/indra | /panel/backup/Wed13Aug2014spk1407954593.sql | UTF-8 | 5,646 | 3.125 | 3 | [] | no_license | DROP TABLE histori;
CREATE TABLE `histori` (
`nrp` char(7) NOT NULL,
`histori` int(11) NOT NULL,
PRIMARY KEY (`nrp`),
CONSTRAINT `histori_ibfk_1` FOREIGN KEY (`nrp`) REFERENCES `pendaftaranmahasiswa` (`NRP`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
INSERT INTO histori VALUES("6311238","1");
DROP TABLE infob... | true |
d51a10c745b85465f3d0e98e6f2b7f9b94331cae | SQL | PaxAuz15/tests | /Talentuum-Healthatom/Challengue2/answer.sql | UTF-8 | 1,248 | 4.40625 | 4 | [] | no_license | -- FIRST QUESTION
SELECT titanes.nombre,titanes.altura
FROM titanes
JOIN muertes
ON titanes.id = muertes.id_titan
WHERE muertes.causa = 'Batallón 1'
ORDER BY titanes.altura DESC
LIMIT 1;
-- SECOND QUESTION
SELECT titanes.id,titanes.nombre, titanes.altura,avistamientos.fecha
FROM titanes
LEFT JOIN... | true |
a59eedd936c13cf40f4045289cd6013e55c5d64b | SQL | lucasmernin/fullstack_spring_mvc_webapp | /Blog_Script.sql | UTF-8 | 1,133 | 3.921875 | 4 | [] | no_license | DROP DATABASE IF EXISTS blog;
CREATE DATABASE blog;
USE blog;
CREATE TABLE `user` (
id int primary key auto_increment,
username varchar(20) not null,
`password` varchar(80) not null,
enabled boolean not null
);
CREATE TABLE tag (
id int primary key auto_increment,
`name` varchar(25) not null
);
CREATE TABLE catego... | true |
114c2b57bee9a0ddebde8ada71f91fae7f44b881 | SQL | metalrufflez/courses | /stanford_db/sql_social_core.sql | UTF-8 | 1,848 | 4.71875 | 5 | [] | no_license | /* Question 1
Find the names of all students who are friends with someone named Gabriel. */
select hs.name
from Highschooler hs join Friend f
on (hs.ID=f.ID1 and f.ID2 in
(select ID
from Highschooler
where name = 'Gabriel'))
or (hs.ID=f.ID2 and f.ID1 in
(select ID from
Highscho... | true |
1020e3fb730b2ce8829259020c56bc32d9aae6c7 | SQL | Hansimov/cs-notes | /sql/NK-18 获取当前薪水第二多的员工的信息 2.sql | UTF-8 | 434 | 4.21875 | 4 | [] | no_license | with t as (
select s1.salary
from salaries as s1
left join salaries as s2
on s1.salary <= s2.salary
where s1.to_date = '9999-01-01'
and s2.to_date = '9999-01-01'
group by s1.salary
having count(distinct s2.salary)=2
)
select e.emp_no, s.salary, e.last_name, e.first_name
from empl... | true |
66660897bc3afbf9648be9d01ae8ebf1d7070a06 | SQL | jimmyalf/temp | /Spinit.Wpc.Synologen.Database/dbo/Stored Procedures/spBaseRemoveLanguage.sql | UTF-8 | 332 | 2.734375 | 3 | [] | no_license | create PROCEDURE spBaseRemoveLanguage
@id INT,
@status INT OUTPUT
AS
DELETE From tblBaseLocationsLanguages
WHERE cLanguageId = @id
DELETE FROM tblBaseLanguages
WHERE cId = @id
IF (@@ERROR = 0)
BEGIN
SELECT @status = 0
END
ELSE
BEGIN
SELECT @status = @@ERROR... | true |
042d14e9b88d1c8889b2a2981d8b0787c22f1d12 | SQL | itekiosu/gulag | /ext/db.sql | UTF-8 | 34,490 | 3.40625 | 3 | [
"MIT"
] | permissive | SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8mb4 */;
-- -----------------... | true |
6b22f0013d381c5f0f56a7fe23277590de448999 | SQL | DigitalWand/digitalwand.admin_helper_example | /install/db/mysql/custom_table.sql | UTF-8 | 909 | 2.796875 | 3 | [] | no_license | CREATE TABLE IF NOT EXISTS `digitalwand_admin_helper_custom_table_demo` (
`ID` int(11) unsigned NOT NULL AUTO_INCREMENT,
`STRING` VARCHAR(128) NULL,
`NUMBER` INT(11) NULL,
`TEXT` TEXT NULL,
PRIMARY KEY (`ID`)
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE IF NOT E... | true |
d701f6ee00f92b1f176567950bad7de9cf4cf3af | SQL | umcssa/freshman-handbook | /server/sql/schema.sql | UTF-8 | 272 | 3.421875 | 3 | [
"Apache-2.0"
] | permissive | CREATE TABLE article (
title VARCHAR(64) PRIMARY KEY NOT NULL,
content VARCHAR(32768) NOT NULL
);
CREATE TABLE image (
image_id INTEGER PRIMARY KEY AUTOINCREMENT,
title VARCHAR(64) NOT NULL,
FOREIGN KEY (title) REFERENCES article (title)
);
| true |
4ebd6a557d797e94d620189e951a32d9ab104d76 | SQL | JayMunnangi/Codebase | /DBFiles_SizeInfo.sql | UTF-8 | 459 | 3.609375 | 4 | [] | no_license | --(Database Filenames and Paths)
SELECT DB_NAME([database_id]) AS [Database Name],
[file_id], name, physical_name, type_desc, state_desc,
is_percent_growth, growth,
CONVERT(bigint, growth/128.0) AS [Growth in MB],
CONVERT(bigint, size/128.0) AS [Total Size in MB]
FROM sys.master_files WITH... | true |
690ccd78dd7037f95461a82d24218f180e13039a | SQL | anushkafka/meeplepurse | /meeplepurse.sql | UTF-8 | 1,674 | 3.59375 | 4 | [] | no_license | CREATE DATABASE meeplepurse;
CREATE TABLE users
(
id serial PRIMARY KEY,
email VARCHAR(225) unique,
currency VARCHAR(3),
usrname VARCHAR(225),
img_url bytea,
est_budget NUMERIC CHECK (est_budget > 0),
password_digest VARCHAR(400) not NULL
);
CREATE TABLE purchases(
id SERIAL PRIMARY KEY,
user_id INT... | true |
11d8cb3628b9d9c272f132cf520e106395e42541 | SQL | wangzhibinjunhua/watch_tcp_server | /Applications/database/watch.sql | UTF-8 | 5,876 | 3 | 3 | [
"MIT"
] | permissive | -- MySQL dump 10.13 Distrib 5.5.49, for debian-linux-gnu (x86_64)
--
-- Host: localhost Database: watch
-- ------------------------------------------------------
-- Server version 5.5.49-0ubuntu0.14.04.1
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHA... | true |
77119af2517976446d28244e7aa1da329ef6f154 | SQL | maykonmenezes/openprescribing | /openprescribing/dmd/management/commands/dmd_sql/step_02.sql | UTF-8 | 1,606 | 3.09375 | 3 | [
"MIT"
] | permissive | -- Section 6 of Implementation Guide (p43)
insert into dmd_product_temp
select
dmd_amp.apid as dmdid,
NULL as bnf_code,
dmd_amp.vpid,
dmd_amp."nm" as name,
dmd_amp."desc" as full_name,
ema,
1 as pres_statcd,
avail_restrictcd,
2 as product_type,
0 as non_availcd,
2 as concept_class,
false as nur... | true |
50551aebb55d05b9c21deae087321fe49e57103d | SQL | ykxxx/Data-Analysis-Intern2018 | /RFM.sql | UTF-8 | 3,231 | 3.921875 | 4 | [] | no_license |
--RFM模型
create table rfm_table as
select a.uid, brand, model, recent_date, rscore, frequency, fscore, monetary, mscore from (
select distinct uid, brand, province, apcode, ip from ossp_useroperation
where proc_date >= '20180627' and proc_date <= '20180703'
and osid = 'android' and bizid = '100ime')a
left join... | true |
fd050397524c19362fa6cba5bc862df8d81273f2 | SQL | UnknownDevBY/SpringReactSocialNetwork | /back/src/main/resources/db/migration/V10__Add_users_blacklist.sql | UTF-8 | 206 | 3.203125 | 3 | [] | no_license | create table if not exists user_blacklist (
user_id int not null,
blacklist int
);
alter table if exists user_blacklist
add constraint fk_user_blacklist_users
foreign key (user_id) references users | true |
ab1db856ae017433213067b33d32bda2e7016efb | SQL | sprokushev/Delphi | /MASTER/_DATABASE/Indexes/EUL_SQ_OBJ_FK_I.sql | UTF-8 | 219 | 2.671875 | 3 | [] | no_license | /* This object may not be sorted properly in the script due to cirular references. */
--
-- EUL_SQ_OBJ_FK_I (Index)
--
CREATE INDEX MASTER.EUL_SQ_OBJ_FK_I ON MASTER.EUL_SUB_QUERIES
(SQ_OBJ_ID)
TABLESPACE USERSINDX;
| true |
8dbf9c1b752ee404287870b53145f39fb3d92aa4 | SQL | mfvanek/pg-index-health-sql | /sql/duplicated_indexes.sql | UTF-8 | 975 | 3.71875 | 4 | [
"Apache-2.0"
] | permissive | /*
* Copyright (c) 2019-2023. Ivan Vakhrushev and others.
* https://github.com/mfvanek/pg-index-health-sql
*
* Licensed under the Apache License 2.0
*/
-- Finds completely identical indexes.
select
table_name,
string_agg('idx=' || idx::text || ', size=' || pg_relation_size(idx), '; ') as duplicated_indexe... | true |
a7a0467fc9b5b0ef18369081eb15e7a7a5a6fd2f | SQL | Rachel-Pavlakovic/EECS393HealthAndFitnessTracker | /HealthAndFitnessTracker/tracker.sql | UTF-8 | 4,040 | 2.859375 | 3 | [] | no_license | CREATE TYPE unit AS ENUM ('Imperial', 'Metric');
CREATE TYPE not AS ENUM ('Text', 'Email', 'Web');
CREATE TABLE IF NOT EXISTS food (
name VARCHAR(100),
density DOUBLE(10,5),
caloricDensity DOUBLE(10, 5),
PRIMARY KEY (name)
);
CREATE TABLE IF NOT EXISTS drink (
name VARCHAR(100),
density DOUBL... | true |
8890b5785103e53d7e1247b39c4bd1c4f5c108ca | SQL | MichaelSpr/wisbada | /backend/docs/structure.sql | UTF-8 | 1,349 | 3.328125 | 3 | [] | no_license | DROP TABLE IF EXISTS beziehungen;
CREATE TABLE beziehungen (
tid int(11) NOT NULL,
bid int(11) NOT NULL,
type int(1) NOT NULL,
id_1 int(11) NOT NULL,
id_2 int(11) NOT NULL,
PRIMARY KEY (bid, tid)
);
DROP TABLE IF EXISTS personen;
CREATE TABLE personen (
tid int(11) NOT NULL,
pid int(11) NOT NULL,
name... | true |
b92c5724ede11c72c67cf7384df240117b25cb28 | SQL | hqottsz/MXI | /assetmanagement-database/src/upgrade/plsql/lib/liquibase/8/1/3/0/plsql/lpa_pkg_body.sql | UTF-8 | 18,853 | 3.296875 | 3 | [] | no_license | --liquibase formatted sql
--changeSet lpa_pkg_body:1 stripComments:false endDelimiter:\n\s*/\s*\n|\n\s*/\s*$
CREATE OR REPLACE PACKAGE BODY LPA_PKG
IS
/********************************************************************************
*
* Function: is_task_defn_service_check
* Arguments: an_TaskTaskDbId (IN NUM... | true |
dd15c601f1b7cbdbefac5396ef0f5be2ecac05d1 | SQL | riddhi-shikha/Supermarket | /database.sql | UTF-8 | 16,728 | 3.078125 | 3 | [] | no_license | -- --------------------------------------------------------
-- Host: 127.0.0.1
-- Server version: 8.0.25 - MySQL Community Server - GPL
-- Server OS: Win64
-- HeidiSQL Version: 11.3.0.6295
-- --------------------------------------------------------
/... | true |
701c6f4b367fe8e999ad15dfc972dee6ef43ed39 | SQL | edebaze/HomEat | /homeat.sql | UTF-8 | 18,393 | 3.375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.7.7
-- https://www.phpmyadmin.net/
--
-- Hôte : 127.0.0.1
-- Généré le : ven. 06 avr. 2018 à 19:05
-- Version du serveur : 10.1.30-MariaDB
-- Version de PHP : 7.2.2
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101... | true |
f911d86024303e9eaeb407be2b9dfb28387e5317 | SQL | annPud/kaoqin | /Scripts/Script.sql | UTF-8 | 796 | 3.515625 | 4 | [] | no_license | SELECT
*
FROM
kaoqin
WHERE
ename = '朱伟亮'
AND EXTRACT(
YEAR_MONTH
FROM
'2015-8-9'
) = EXTRACT(
YEAR_MONTH
FROM
clock
)
ORDER BY
clock ASC;
SELECT
*
FROM
kaoqin
WHERE
ename = '朱伟亮'
AND clock BETWEEN '2015/08/01' A... | true |
d16cab173c65a1133feacb8645721f1b70fedeb0 | SQL | cchantep/codex | /sql/cars/queries.sql | UTF-8 | 757 | 3.265625 | 3 | [] | no_license | -- vehicule_tbl --
SELECT immat, modele, annee_circu
FROM vehicule_tbl
WHERE no_secu='1710549123456';
SELECT immat, modele, annee_circu
FROM vehicule_tbl
WHERE no_secu='2740749345678';
SELECT vehicule_tbl.immat, vehicule_tbl.modele, vehicule_tbl.annee_circu, vehicule_tbl.no_secu,
client_tbl.nom, client_tbl.prenom
F... | true |
a9e24bf3d9aaa711c8e68808e17f1b8486f91a04 | SQL | zplante/University-Assignments | /CS182/Lab2/query5.sql | UTF-8 | 238 | 3.578125 | 4 | [] | no_license | SELECT c.customerID, c.address, sa.paidPrice * sa.quantity AS theRevenue, sa.dayDate
FROM Customers AS c, Sales AS sa
WHERE c.status = 'H'
AND c.address IS NOT NULL
AND sa.paidPrice * sa.quantity >=200
AND c.customerID = sa.customerID | true |
5b69baafb02edd1e1419fdf44ca4276686567a9b | SQL | nedjoooo/Databases | /04.SQL Introduction/10.All-infotmation-employees-with-job-title-Sales-Representative.sql | UTF-8 | 591 | 4 | 4 | [] | no_license | SELECT e.EmployeeID AS [Employee ID],
e.FirstName + ' ' + e.MiddleName + ' ' + e.LastName AS [Employee Name],
e.JobTitle AS [Job Title],
d.Name AS [Department Name],
m.FirstName + ' ' + m.LastName as [Manager Name],
e.HireDate as [Hire Date],
e.Salary as Salary,
a.AddressText as Adrress,
t.Name ... | true |
e2d78d5d1521e1bf94207ee3be0f623224b9717c | SQL | jdwalbur/Passive-Coin-Sorter | /create.sql | UTF-8 | 185 | 2.671875 | 3 | [] | no_license | CREATE TABLE transactions (
id int(10) NOT NULL AUTO_INCREMENT,
timestamp varchar(50) NOT NULL,
amount float NOT NULL,
current_bal float NOT NULL,
PRIMARY KEY(id)
); | true |
c08b0e23cd3c1e41fabb3e6c3a2b3d69ba04ebc2 | SQL | youngquarshie/Student-Clearance-System | /db/clearance.sql | UTF-8 | 13,626 | 2.796875 | 3 | [
"MIT"
] | permissive | -- phpMyAdmin SQL Dump
-- version 4.5.1
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: May 16, 2018 at 06:13 AM
-- Server version: 10.1.16-MariaDB
-- PHP Version: 7.0.9
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLI... | true |
eb8e9f9574ccfad741e9563ba5c002a3299e9f0d | SQL | jd-webb/draft-measures | /pages/cql/in-progress/fhir401/NCQA_Common-5.2.000.cql | UTF-8 | 6,220 | 3.53125 | 4 | [
"MIT"
] | permissive | library NCQA_Common version '5.2.000'
using QDM version '5.5'
codesystem "SOP": 'urn:oid:2.16.840.1.113883.3.221.5'
valueset "Hospice Encounter": 'urn:oid:2.16.840.1.113883.3.464.1004.1761'
valueset "Hospice Intervention": 'urn:oid:2.16.840.1.113883.3.464.1004.1762'
code "MEDICAID": '2' from "SOP" display 'MEDICAID... | true |
15a9b533f289e28ee2b7a56cd9dd189ff6643bfb | SQL | HoangNhatVo/TutorWeb | /Database/account_proc.sql | UTF-8 | 22,445 | 3.296875 | 3 | [] | no_license | DELIMITER $$
USE `sql12314047`$$
CREATE PROCEDURE GetAccountByUsername(in us varchar(50))
BEGIN
select * from account where username COLLATE utf8mb4_unicode_ci = us;
END;$$
DELIMITER ;
DELIMITER $$
USE `sql12314047`$$
CREATE PROCEDURE GetAccountByEmail(in e varchar(100))
BEGIN
select * from account where email COLLA... | true |
ef27a6b0e434ffe1ac127f59382b81e93bb3f383 | SQL | jampaniuday/DBA_Scirpts | /Req_to_sid.sql | UTF-8 | 563 | 3.21875 | 3 | [] | no_license | set verify off
set head off
col reqid format 999999999
col sesid format a10
col ospid format a10
select
'Concurrent request number :'||a.request_id ,
'Oracle session id(SID) :'||d.sid,
'Serial Hash value :'||d.serial#,
'OS process id (SPID) :'||c.spid
from
applsys.fnd_concurrent_request... | true |
005cf3b540d96e0ad29f5219ded54a5df68c8674 | SQL | SevdalinZhelyazkov/ConferenceOrganisation | /src/main/resources/dbScripts/DBUpdate1.sql | UTF-8 | 412 | 3.140625 | 3 | [
"Apache-2.0"
] | permissive | ALTER TABLE `conferenceOrganisation`.`userRoles`
DROP FOREIGN KEY `userroles_ibfk_2`;
ALTER TABLE `conferenceOrganisation`.`roles`
CHANGE COLUMN `roleId` `roleId` INT(11) NOT NULL AUTO_INCREMENT ;
ALTER TABLE `conferenceOrganisation`.`userRoles`
ADD CONSTRAINT `userroles_ibfk_2`
FOREIGN KEY (`roleId`)
REFERENC... | true |
035a32b346370b2b138685a735d70a095b3ba4cf | SQL | bravesoftdz/sgts | /sql/oracle/patch_15.01.2009/procedures/2/212_U_DEFECT_VIEW.prc | WINDOWS-1251 | 607 | 3.1875 | 3 | [] | no_license | /* */
CREATE OR REPLACE PROCEDURE U_DEFECT_VIEW
(
DEFECT_VIEW_ID IN INTEGER,
NAME IN VARCHAR2,
DESCRIPTION IN VARCHAR2,
PRIORITY IN INTEGER,
OLD_DEFECT_VIEW_ID IN INTEGER
)
AS
BEGIN
UPDATE DEFECT_VIEWS
SET DEFECT_VIEW_ID=U_DEFECT_VIEW.DEFECT_VIEW_ID,
NAME=U_DEFECT_VIEW.NAME, ... | true |
0cb5ad12ed6647ce7fd4f6a3c895dad1b29b6112 | SQL | harrifeng/mysql-cookbook-code | /misc/serial.sql | UTF-8 | 1,271 | 3.75 | 4 | [] | no_license | # serial.sql
# try the multi-part auto_increment thing
DROP TABLE IF EXISTS serial;
CREATE TABLE serial
(
prefix CHAR(3) NOT NULL,
num INT(5) ZEROFILL NOT NULL AUTO_INCREMENT,
PRIMARY KEY (prefix,num)
);
INSERT INTO serial (prefix)
VALUES("A"),
("A"),
("B"),
("C"),
("A"),
... | true |
e50d80a78a0952d7eb289445c96e50c74548aa04 | SQL | hyelee-jo/jsp20201103 | /WebContent/WEB-INF/sql/constraint/constEx5.sql | UHC | 2,252 | 4.09375 | 4 | [] | no_license | -- ߰
DROP TABLE emp_copy;
CREATE TABLE emp_copy
AS
SELECT * FROM employee;
SELECT * FROM emp_copy;
SELECT * FROM user_constraints
WHERE table_name='EMPLOYEE';
SELECT * FROM user_constraints
WHERE table_name='EMP_COPY';
ALTER TABLE emp_copy
ADD PRIMARY KEY (eno);
DROP TABLE dept_copy;
CREATE TABLE dept_copy
AS
... | true |
413df5f070a8301cfe491b998313759e2b1912cf | SQL | cyril23/testone | /SQL_Management/sql_files/3.8/Iteration4/EDW/Queries/how_reported.sql | UTF-8 | 567 | 2.84375 | 3 | [] | no_license | set @qry = concat("
#START QUERY
select formatted_output
#OUTFILE
from (
select concat_ws('|','H',date_format(@end, '%Y%m%d'), date_format(@end, '%Y%m%d')) formatted_output, 1 as seq
union
select '10|In Person' formatted_output, 2 as seq
union
select '18|Phone' formatted_output, 2 as seq
union
select ... | true |
5d88dd9628f5e9bcbc899f0b45856b44c20aaee2 | SQL | pablomarttiins/TrabalhoTCC | /Scripts SQL/script MODELAGEM BANCO - 31-08-2016 - TB Estado - TB Adms2.sql | UTF-8 | 16,091 | 3.53125 | 4 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | -- 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='TRADITIONAL,ALLOW_INVALID_DATES';
-- -----------------------------------------------------
-- Schema mydb
-- -... | true |
bb425c8988168bd50fd2704405d651bcdbf3e172 | SQL | pkhandke/PostgreSQL_ParchAndPosey | /Logical Operators/lo4.sql | UTF-8 | 751 | 4.03125 | 4 | [] | no_license | /*
1. Write a query that returns all the orders where the standard_qty is over 1000, the poster_qty is 0, and the gloss_qty is 0.
2. Using the accounts table find all the companies whose names do not start with 'C' and end with 's'.
3. Use the web_events table to find all information regarding individuals who were c... | true |
b67a37dd37892314fc59230a3d06c335aa257e51 | SQL | SchuylerGoodman/record-indexer | /database/DatabaseCreate.sql | UTF-8 | 1,513 | 3.28125 | 3 | [] | no_license | DROP TABLE IF EXISTS users;
DROP TABLE IF EXISTS projects;
DROP TABLE IF EXISTS fields;
DROP TABLE IF EXISTS records;
DROP TABLE IF EXISTS images;
CREATE TABLE users
(
userId INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
username VARCHAR(255) NOT NULL UNIQUE,
first VARCHAR(255) NOT NULL,
last VARCHAR... | true |
18503d057a213c2f5d6e28b8f1f3185f01f0a3a9 | SQL | tahhan/RecSys | /resources/recruitment.sql | UTF-8 | 18,342 | 3.28125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 3.2.0.1
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: May 12, 2011 at 07:56 PM
-- Server version: 5.1.37
-- PHP Version: 5.3.0
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER... | true |
33728e0651c781cc6e977152de472e782cf9859c | SQL | svn2github/openbiz-cubi | /cubi/modules/email/mod.install.sql | UTF-8 | 1,695 | 3.03125 | 3 | [
"BSD-3-Clause"
] | permissive | /*Table structure for table `email_log` */
DROP TABLE IF EXISTS `email_log`;
CREATE TABLE `email_log` (
`id` int(11) NOT NULL auto_increment,
`result` varchar(255) NOT NULL,
`sender` varchar(255) NOT NULL,
`sender_name` varchar(255) NOT NULL,
`recipients` text NOT NULL,
`subject` varchar(255) NO... | true |
362c8b3ad0a08fbaa7a219b8fe5af3bda4d5f33e | SQL | AndersonYesidParra/Regitra_productos.personasSENA | /taller (1).sql | UTF-8 | 5,168 | 3.015625 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 5.0.4
-- https://www.phpmyadmin.net/
--
-- Servidor: 127.0.0.1
-- Tiempo de generación: 03-05-2021 a las 05:02:29
-- Versión del servidor: 10.4.17-MariaDB
-- Versión de PHP: 8.0.2
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_... | true |
b800991324540b042c4b9a2f5a15caf6a7e1204b | SQL | GingSing/LightBnB | /1_queries/5_get_all_reservations_for_user.sql | UTF-8 | 321 | 3.5 | 4 | [] | no_license | SELECT reservations.*, properties.*, avg(rating)
FROM property_reviews
JOIN reservations ON reservation_id = reservations.id
JOIN properties ON property_reviews.property_id = properties.id
WHERE end_date < now()::date and property_reviews.guest_id = 1
GROUP BY reservations.id, properties.id
ORDER BY start_date
LIMIT 10... | true |
4aea3a3173dae0af3152543c907697e0405c3d35 | SQL | 1suming/CenturyServer | /sql/output/localhost.sql | UTF-8 | 4,663 | 3.1875 | 3 | [] | no_license |
-- 创建数据库 --
CREATE DATABASE `centurywar` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;
use centurywar;
-- 方法性能分析 --
CREATE TABLE `command_analysis`(
`gameuid` int(10) default "0" COMMENT '玩家GAMEUID',
`command` varchar(100) default "[]" COMMENT '',
`createtime` int(10) default "0" COMMENT '',
`type`... | true |
27cb1596515d466d3d1f87e36dc71f5f634fb370 | SQL | GiselaCapozzi/proyectoFinalPHP | /libreria.sql | UTF-8 | 5,423 | 3.03125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 5.0.3
-- https://www.phpmyadmin.net/
--
-- Servidor: 127.0.0.1
-- Tiempo de generación: 08-08-2021 a las 23:45:26
-- Versión del servidor: 10.4.14-MariaDB
-- Versión de PHP: 7.4.11
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD... | true |
d2a45726c395cf814a4d58aa0d344000f015b512 | SQL | szwetsloot/RC | /Dumps/bouys.sql | UTF-8 | 1,002 | 2.921875 | 3 | [] | no_license | /*
Navicat MySQL Data Transfer
Source Server : localhost
Source Server Version : 50505
Source Host : localhost:3306
Source Database : rowcoaching
Target Server Type : MYSQL
Target Server Version : 50505
File Encoding : 65001
Date: 2017-07-11 14:30:40
*/
SET FOREIGN_KEY_CHECKS=0;
... | true |
25dfc7f5bc0543ad7f9c79442dce9091bf8685b5 | SQL | whlee21/aumc-daily | /init_load/sprint_3/itf_cost_i.sql | UTF-8 | 13,268 | 3.21875 | 3 | [] | no_license | /*****************************************************
프로그램명 : ITF_COST_I.sql
작성자 : Won Jong Bok
수정자 :
최초 작성일 : 2020-12-04
수정일 :
소스 테이블(기본) :
소스 테이블(참조) :
프로그램 설명 : 입원COST내역
cnt :
time :
*****************************************************/
DROP TABLE if exists itfcdmpv532_daily.ITF_COST_I;;
cr... | true |
c813ed9619c26902b2184ccc54f9760de2ba894d | SQL | Nazira73/SQL | /Cascading Referential Integrity.sql | UTF-8 | 3,961 | 4.09375 | 4 | [] | no_license | -----------------------------------
-- Cascading Referential integrity
-----------------------------------
-- It allows to define the actions Microsoft SQL Server should take when a user attempts to delete or update a key to which an
-- existing foreign key points
Select * from tblperson
Select * from tblgender
-- ... | true |
4c4956e95951cb6eb442999b881b5e51c67d26a7 | SQL | hyndio/notebook | /Oracle常用SQL/createtablespace.sql | GB18030 | 17,636 | 2.78125 | 3 | [] | no_license |
---ļλûļɸʵʻ
--1
--ļ
CREATE SMALLFILE TABLESPACE "FLTINFO1" DATAFILE '/opt/oracle/oradata/oradb/fltinfo1a.dbf' SIZE 100M AUTOEXTEND ON NEXT 100M MAXSIZE UNLIMITED LOGGING EXTENT MANAGEMENT LOCAL SEGMENT SPACE MANAGEMENT AUTO ;
--ļ
ALTER TABLESPACE "FLTINFO1" ADD DATAFILE '/opt/oracle/oradata/oradb/fltinfo1b.dbf' SIZE ... | true |
b28a247b49a3a98ad69c0026808f6299cf725558 | SQL | Sathimantha/JPA-POS | /db-script.sql | UTF-8 | 873 | 3.90625 | 4 | [] | no_license | CREATE TABLE customer
(
id VARCHAR(10) PRIMARY KEY,
name VARCHAR(50) NOT NULL,
address VARCHAR(50) NOT NULL
);
CREATE TABLE item
(
code VARCHAR(10) PRIMARY KEY,
description VARCHAR(50) NOT NULL,
unit_price DECIMAL NOT NULL,
qty_on_hand INT NOT NULL
);
CREATE TAB... | true |
b545de9a02c04244d04542211ca091b4a586ef31 | SQL | jbredow/sql-queries | /manual_reporting/new vict2 process/08 PR_VICT2_SLS_CAT.sql | UTF-8 | 12,901 | 2.578125 | 3 | [] | no_license | TRUNCATE TABLE PRICE_MGMT.PR_VICT2_SALES_MSTR_MAN;
DROP TABLE PRICE_MGMT.PR_VICT2_SALES_MSTR_MAN;
CREATE TABLE PRICE_MGMT.PR_VICT2_SALES_MSTR_MAN
NOLOGGING
AS
SELECT DISTINCT
V.YEARMONTH,
V.ACCOUNT_NUMBER,
V.ACCOUNT_NAME,
V.WAREHOUSE_NUMBER,
V.INVOICE_NUMBER_NK,
... | true |
b6724c0566bb991eb1fa9963dd8f9dd34d03b4ed | SQL | 305810827/mooc | /demo1.sql | UTF-8 | 6,162 | 3.234375 | 3 | [] | no_license | /*
Navicat MySQL Data Transfer
Source Server : mysql
Source Server Version : 50725
Source Host : localhost:3306
Source Database : demo1
Target Server Type : MYSQL
Target Server Version : 50725
File Encoding : 65001
Date: 2019-07-30 16:45:46
*/
SET FOREIGN_KEY_CHECKS... | true |
7199e87a2c3bbdd2ce833c9d86438fb00cefad84 | SQL | HelbertMonteiro/sd_ThorEnt | /BD_Tracker/scp_thorent.sql | UTF-8 | 462 | 3.359375 | 3 | [] | no_license | create database ThorEnt;
use ThorEnt;
create table Peer(
ip char(15) primary key
);
create table Arquivo(
hashArquivo char(33) not null,
nome char(150) not null,
tamanhoArquivo double not null,
tamanhoVetor int not null,
ip char(15) not null,
primary key Arquivo(hash... | true |
6558c2053d1ca3a04cc9ff8f0eaa8f1058c99e6f | SQL | radtek/Telecommunication | /GSM/DataBase/www/REPORT_BALANCE.sql | WINDOWS-1251 | 2,570 | 3.484375 | 3 | [] | no_license | CREATE OR REPLACE PROCEDURE REPORT_BALANCE(
SESSION_ID IN VARCHAR2,
PHONE_NUMBER IN VARCHAR2
) IS
--#Version=1
--
-- 1. . 22.08.11.
--
pDATE_ROWS DBMS_SQL.DATE_TABLE;
pCOST_ROWS DBMS_SQL.NUMBER_TABLE;
pDESCRIPTION_ROWS DBMS_SQL.VARCHAR2_TABLE;
PRIXOD NUMBER;
RASXOD NUMBER;
--
BEGIN
G_STATE.PRINT_... | true |
7227c537e0bf6eb96694e8cce2b59d89799afd8d | SQL | sophiemw898/Algorithm_Basic | /DataBase/1075. Project Employees I.sql | UTF-8 | 201 | 3.4375 | 3 | [] | no_license | # Write your MySQL query statement below
select project_id, round(avg(experience_years),2) as average_years
from Project join Employee
on Project.employee_id = Employee.employee_id
group by project_id
| true |
61e6c9cf9c352eb09dab121268c5f9349f2a7392 | SQL | z1441275629/yiguo1 | /商品表和购物车表.sql | UTF-8 | 812 | 2.515625 | 3 | [] | no_license | --商品表
create table goodsInfo
(
goodsId varchar(10) primary key,
goodsName varchar(100),
goodsType varchar(20),
goodsPrice float,
goodsCount int,
goodsDesc varchar(100),
goodsImg varchar(100),
beiyong1 varchar(100),
beiyong2 varchar(100),
beiyong3 ... | true |
061e2c6814a7236135a50c7a01841e380ad63868 | SQL | janaprasanna/Library-Mgmt-APP-DEV | /dbmodel.sql | UTF-8 | 1,024 | 3.59375 | 4 | [] | no_license | create database master ;
use master;
/*for students */
create table users(id integer primary key auto_increment, name varchar(20), email varchar(20), password varchar(20) );
create table studentbooks_inventory(BookID integer primary key, BookName varchar(20),
TotalBooksBorrowed integer, ReturnDate date,Total_token... | true |
690c0ab6ae3cae7c64c179756784100b59fbb18d | SQL | tiagobarretomc/transmetaisWeb | /scripts/movimentacao_despesa.sql | UTF-8 | 606 | 3.25 | 3 | [
"Apache-2.0"
] | permissive | CREATE TABLE `transmetais`.`movimentacao_despesa` (
`movimentacao_id` BIGINT(20) NOT NULL,
`despesa_id` BIGINT(20) NOT NULL,
PRIMARY KEY (`movimentacao_id`, `despesa_id`),
INDEX `fk_movimentacao_despesa_despesa_idx` (`despesa_id` ASC),
CONSTRAINT `fk_movimentacao_despesa_despesa`
FOREIGN KEY (`despesa_id`... | true |
7d9e13eaa595e1940929419e0e8597d3088dde18 | SQL | luhm2017/neo4j | /data/sql/version1/twodegree/antiFraudTwoDegree_device_myphone.sql | UTF-8 | 17,362 | 3.6875 | 4 | [] | no_license | use knowledge_graph;
--根据二度取关联数据,增加时间日期 , 通配符统一替换关联边
create table temp_degree2_relation_data_device_myphone as
SELECT a.order_id_src,
a.apply_date_src ,
a.cert_no_src,
a.order_id_dst2,
a.apply_date_dst2,
a.cert_no_dst2
FROM fqz.fqz_relation_degree2 a
join temp_contract_data b on a.order_id_src = b.order_id
where e... | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.