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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
86a51643243a9b1ff8993a56961729920199777d | SQL | earthgecko/skyline | /updates/sql/luminosity-v1.2.1-beta-to-v1.2.2-stable.sql | UTF-8 | 942 | 3.15625 | 3 | [
"MIT"
] | permissive | /*
This the the SQL script to update Skyline from Luminosity (v1.2.1-beta - v1.2.1-stable)
*/
USE skyline;
# @added 20180715 - Task #2446: Optimize Ionosphere
# Branch #2270: luminosity
ALTER TABLE `ionosphere_matched` ADD COLUMN `fp_count` INT(10) DEFAULT 0 COMMENT 'the total number of features pro... | true |
d8fc12341cad0108f0ba21bffc8b3bec831b6d9e | SQL | ClickHouse/ClickHouse | /tests/queries/0_stateless/00411_merge_tree_where_const_in_set.sql | UTF-8 | 727 | 3.25 | 3 | [
"Apache-2.0",
"BSL-1.0"
] | permissive | DROP TABLE IF EXISTS const_in_const;
set allow_deprecated_syntax_for_merge_tree=1;
CREATE TABLE const_in_const (id UInt64, date Date, uid UInt32, name String, Sign Int8) ENGINE = CollapsingMergeTree(date, intHash32(uid), (id, date, intHash32(uid)), 8192, Sign);
INSERT INTO const_in_const VALUES(1, now(), 1, 'test1', 1)... | true |
d3bd9f48d5465d5d6a0ddac3521ba517826b49c4 | SQL | fnazih/Databases-in-SQL | /TP2/code.sql | UTF-8 | 2,833 | 3.734375 | 4 | [] | no_license | -- 1) Correction d’erreurs d’insertion :
--1.a)
INSERT INTO formateur VALUES(default, 'Jacques', 'Mesrine');
--(l’dentifiant 1 ayant déjà été pris, on utilise le premier disponible a la suite grace a la commande default qui a été initialisee avec l’auto-incrementation).
--1.b)
INSERT INTO inscrire VALUES(21, 'X00005',... | true |
c78d27c38a43c1f876e4360f2c14ea6994b7f1d0 | SQL | tainenko/Leetcode2019 | /leetcode/editor/en/[2066]Account Balance.sql | UTF-8 | 2,486 | 4.5625 | 5 | [] | no_license | #Table: Transactions
#
#
#+-------------+------+
#| Column Name | Type |
#+-------------+------+
#| account_id | int |
#| day | date |
#| type | ENUM |
#| amount | int |
#+-------------+------+
#(account_id, day) is the primary key for this table.
#Each row contains information about one transa... | true |
e319dfeb805a81eddb278a17d32fe9c0e2f015b1 | SQL | fermi-lat/mootCore | /maint/createAncillary.sql | UTF-8 | 1,634 | 3.3125 | 3 | [
"BSD-3-Clause"
] | permissive | create table Ancillary
(Ancillary_key INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY,
class_fk INT UNSIGNED NOT NULL
COMMENT 'refers to row in Ancillary_class',
instrument varchar(16) not null default 'LAT'
COMMENT 'e.g. LAT, EM2 ',
source VARCHAR(255) NOT NULL
COMMENT 'path to ... | true |
2b8e35a3317d1332132977c1375cbbe37d75188d | SQL | tayduivn/training | /rdbms/update/.svn/text-base/sacwis_611.sql.svn-base | UTF-8 | 1,949 | 2.796875 | 3 | [] | no_license | --STGAP00015600 - Release(3.4) SQR: Enable new report APPLA Exception Cases
-- APPLA Exception SMS Req#38480 ; SMS Proj#39457
-- Dependency: DBCR 15595 (MR-057: add Placement new columns); DBCR 15596 (view Most recent placement by month)
insert into caps.reports (nm_rpt_sqr_name, nm_rpt_sqr_ver, nbr_rpt_retainag... | true |
ee6f4396f867d3714e5b2a59ca7cb553f2766e14 | SQL | nigelbayliss/oracle-db-examples | /machine-learning/sql/21c/oml4sql-feature-extraction-text-mining-nmf.sql | UTF-8 | 5,834 | 3.34375 | 3 | [
"UPL-1.0",
"LicenseRef-scancode-warranty-disclaimer",
"Apache-2.0"
] | permissive | -----------------------------------------------------------------------
-- Oracle Machine Learning for SQL (OML4SQL) 21c
--
-- Feature Extraction - NMF Algorithm with Text Mining - dmtxtnmf.sql
--
-- Copyright (c) 2021 Oracle Corporation and/or its affilitiates.
--
-- The Universal Permissive License ... | true |
2a458a399fe6a45f36c12534afba125dc8039b6a | SQL | librar127/PythonDS | /Leetcode/SQL/Hard/1127.sql | UTF-8 | 937 | 4.5 | 4 | [] | no_license | -- Write your MySQL query statement below
WITH distinct_platform AS
(
SELECT "desktop" AS platform
UNION ALL
SELECT "mobile" AS platform
UNION ALL
SELECT "both" AS platform
),
date_platform AS
(
SELECT
DISTINCT(A.spend_date)spend_date ,
B.platform
FROM
Spending A, d... | true |
eca911f1b7309156a2933d6460901fe4d4915d6f | SQL | asciiu/polo | /conf/evolutions/default/2.sql | UTF-8 | 1,066 | 3.09375 | 3 | [
"MIT"
] | permissive | #
# --- !Ups
DROP TABLE IF EXISTS poloniex_messages;
DROP TABLE IF EXISTS poloniex_candles;
CREATE TABLE poloniex_messages (
id serial PRIMARY KEY,
crypto_currency text NOT NULL,
last NUMERIC(12, 8) NOT NULL,
lowest_ask NUMERIC(12, 8) NOT NULL,
highest_bid NUMERIC(12, 8) NOT NULL,
percent_chan... | true |
b29e5917b9f6cc1f3655602e98d4c314d728491d | SQL | MrDanao/tradint | /bdd_backup/sql_script_build_db_from_scratch.sql | UTF-8 | 6,418 | 3.25 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.6.6deb4
-- https://www.phpmyadmin.net/
--
-- Client : localhost:3306
-- Généré le : Sam 24 Février 2018 à 23:45
-- Version du serveur : 10.1.26-MariaDB-0+deb9u1
-- Version de PHP : 7.0.27-0+deb9u1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @... | true |
f2c406696cabe814ac005e38db2dc4dded2c81ea | SQL | NeotomaDB/Neotoma_SQL | /function/ti/getcontextdatasettypecount.sql | UTF-8 | 329 | 3.03125 | 3 | [
"MIT"
] | permissive | CREATE OR REPLACE FUNCTION ti.getcontextdatasettypecount(_datasettypeid integer, _variablecontextid integer)
RETURNS TABLE(count bigint)
LANGUAGE sql
AS $function$
SELECT COUNT(datasettypeid) AS count
FROM ndb.contextsdatasettypes
WHERE datasettypeid = _datasettypeid AND variablecontextid = _variablecontextid;
$f... | true |
9a84c71da1c5028b8265543d25a5d314644571a2 | SQL | absuite/suite-amiba | /database/presqls/2017_00_08_100010_sp_amiba_data_distribute.sql | UTF-8 | 3,978 | 3.890625 | 4 | [] | no_license | DELIMITER $$
DROP PROCEDURE IF EXISTS sp_amiba_data_distribute$$
CREATE PROCEDURE sp_amiba_data_distribute(IN p_ent CHAR(200),IN p_purpose CHAR(200),IN p_period CHAR(200),IN p_level INT)
BEGIN
DECLARE v_loop INT DEFAULT 1;
/*待分配数据*/
DROP TEMPORARY TABLE IF EXISTS tml_result_allocated;
CREATE TEMPORARY TABLE IF NOT... | true |
29fd1261cae65df98201bb17cd29fbf50243bc25 | SQL | silence-do-good/stress-test-Postgres-and-MySQL | /dump/low/day15/select1740.sql | UTF-8 | 178 | 2.65625 | 3 | [] | no_license |
SELECT timeStamp, temperature FROM ThermometerOBSERVATION o
WHERE timestamp>'2017-11-14T17:40:00Z' AND timestamp<'2017-11-15T17:40:00Z' AND temperature>=10 AND temperature<=20
| true |
c8c5c479b430c409066146d3dc4e322423c916a4 | SQL | owlscout/GIt | /Workspace_WEB/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/Jsp14_Test/WEB-INF/classes/com/poosil/comment/freeboarddb/freeboardcomment.sql | UTF-8 | 447 | 3.203125 | 3 | [] | no_license | DROP SEQUENCE FREECOMMENTSEQ;
DROP TABLE FREECOMMENT;
CREATE SEQUENCE FREECOMMENTSEQ
CREATE TABLE FREECOMMENT(
FREECOMSEQ NUMBER NOT NULL,
FREECOMBOARDSEQ NUMBER NOT NULL,
FREECOMNICKNAME VARCHAR2(100),
FREECOMREGDATE DATE NOT NULL,
FREECOMPARENT NUMBER,
FREECOMCONTENT VARCHAR2(1000) NOT NULL,
CONSTRAINT FREEC... | true |
8af884c46e9a7f00db46cd9b81fed71d6d8fe396 | SQL | JHarvin/SIRA | /BD/sira_bd.sql | UTF-8 | 25,311 | 2.734375 | 3 | [] | no_license | SET FOREIGN_KEY_CHECKS=0;
CREATE DATABASE IF NOT EXISTS sira_bd;
USE sira_bd;
DROP TABLE IF EXISTS talquiler;
CREATE TABLE `talquiler` (
`fecha_alquiler` varchar(25) COLLATE utf8_spanish_ci NOT NULL,
`fecha_devolucion` varchar(25) COLLATE utf8_spanish_ci NOT NULL,
`numero_de_placa` varchar(8) COLLATE utf8_spa... | true |
a4504448887998d81ac3a87323879e7b283fbfb1 | SQL | PIRO-DEV/Servlet_Apps | /user_roles.sql | UTF-8 | 1,475 | 3.03125 | 3 | [] | no_license | /*
SQLyog Ultimate v13.1.1 (64 bit)
MySQL - 8.0.17 : Database - app_test
*********************************************************************
*/
/*!40101 SET NAMES utf8 */;
/*!40101 SET SQL_MODE=''*/;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN... | true |
8dc1dc7cdd63b773afee3832c78ab119a26e6476 | SQL | dagibbins186/Pewlett-Hackard-Analysis | /Pewlett-Hackard-Analysis Folder/Queries/Employee_Database_Challenge.sql | UTF-8 | 3,559 | 4.5625 | 5 | [] | no_license | -- Creating tables for PH-EmployeeDB
CREATE TABLE departments (
dept_no VARCHAR(4) NOT NULL,
dept_name VARCHAR(40) NOT NULL,
PRIMARY KEY (dept_no),
UNIQUE (dept_name)
);
CREATE TABLE employees (
emp_no INT NOT NULL,
birth_date DATE NOT NULL,
first_name VARCHAR NOT NULL,
last_name VA... | true |
d74b194b043199e975c3ea2f07b2673da187fd92 | SQL | qianbin0205/data_analysis | /meituan_analysis/meituan_mysql_script.sql | UTF-8 | 1,867 | 3.859375 | 4 | [] | no_license | #sql1
select distinct
b.poi_id,b.title,b.avg_price,b.avg_score,b.comment_num,b.address,b.stamp from meituan_classify_info as a
inner join meituan_shop_info as b on a.sub_id = b.sub_id and a.class_type = b.class_type
where a.class_type = 1 and a.sub_id not in(24,393,395) and b.avg_price <> 0 and b.avg_score <> 0
order ... | true |
4a5be20afad8cdac321f4f993b69583bdbada710 | SQL | dengsauve/College-Work | /2017 Winter/CIS126 DBMSSQL/ModifyDataAssignmentCreateTable.sql | UTF-8 | 726 | 2.8125 | 3 | [] | no_license | create table DogLicense(
License int not null primary key,
Expires date not null,
constraint ck_expires check (Expires > '01/01/1990'),
Sex varchar(2) not null,
constraint ck_sex check (Sex in ('M', 'F', 'NM', 'SF')),
PetName varchar(255),
Breed varchar(255),
OwnerLastName varchar(255) not null,
OwnerFirstName... | true |
346b65aeabe46bd0439c4a3a1b8bbc41d30cf290 | SQL | DominicWrege/elenco | /sql/insert/comment.sql | UTF-8 | 296 | 3.125 | 3 | [
"MIT"
] | permissive | WITH inserted AS (
INSERT INTO comment(content, user_id, feed_id)
VALUES ($1, $2, $3 ) RETURNING id, user_id, feed_id, created, content
)
SELECT inserted.id, content, account.username, inserted.user_id, feed_id, inserted.created
FROM inserted, account
WHERE account.id = inserted.user_id; | true |
799a144d4450094be0acf273bcdff4f96d5563f6 | SQL | anandeka/my-project | /DBScripts/DataCorrectionScripts/data_correction_script_24.sql | UTF-8 | 2,643 | 3.5625 | 4 | [] | no_license |
DECLARE
CURSOR cr_ash_record
IS
SELECT ash.assay_ref_no, ash.internal_gmr_ref_no,
ash.internal_grd_ref_no
FROM ash_assay_header ash
WHERE ash.assay_type = 'Weighing and Sampling Assay'
GROUP BY ash.assay_ref_no,
ash.internal_gmr_ref_no,
... | true |
ce7aafc7e591730cadf16c2ec31ffdec7b36cfb2 | SQL | andrewmanq/cs262 | /Lab08/commands.sql | UTF-8 | 1,097 | 4.25 | 4 | [] | no_license | --EXERCISE 8.1
--sort games by ascending time
SELECT *
FROM Game
ORDER BY time ASC;
--selects games in the past week
SELECT *
FROM Game
WHERE time > '2018-10-19 01:00:00';
--finds players with no name
SELECT *
FROM Player
WHERE name IS NOT NULL;
--finds the id of players with scores above 2000
SELECT playerID
FROM Play... | true |
87808fbeba0465f7e9623fdb0201d176e3f90b0b | SQL | fmaraujo1981/phpmysql | /with-query/data.sql | UTF-8 | 940 | 2.78125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 3.2.0.1
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Feb 28, 2015 at 12:31 PM
-- Server version: 5.1.36
-- 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 |
13b23e08694ae6af1df485750d0be65a6980e235 | SQL | CUBRID/cubrid-testcases | /sql/_22_news_service_mysql_compatibility/_04_regular_expression/cases/_dev_02_regex_test_cf.sql | UTF-8 | 1,246 | 2.6875 | 3 | [
"BSD-3-Clause"
] | permissive | -- CBRD-24563 : default regexp library change from cppstd to RE2
set system parameters 'regexp_engine=cppstd';
-- regular expression tests (constant folding)
select (null rlike 'a');
select ('a' rlike null);
select (null rlike null);
select ('' rlike 'a');
select ('a' rlike '');
select ('' rlike '');
select (null rl... | true |
73cfd3a943966175da0f9e00f08061bab333ac60 | SQL | gravesmw/RiskManager | /GravesConsultingLLC.RiskManager.Database/Report/Views/DimObjectType.sql | UTF-8 | 170 | 2.734375 | 3 | [] | no_license | CREATE VIEW [Report].[DimObjectType]
AS
SELECT ObjectTypeID AS ObjectTypeKey,
Name,
ParentObjectTypeID AS ParentObjectTypeKey
FROM Content.ObjectType WITH (NOLOCK) | true |
45cb13868a537b674546406180822fa4ae2d252f | SQL | DaniilTuruhanov/my-projects | /Front/task 11/13.sql | UTF-8 | 172 | 3.78125 | 4 | [] | no_license | SELECT USER_NAME FROM Users
INNER JOIN Posts ON Posts.USER_ID = Users.USER_ID
WHERE date(CREATION_DATE) = CURDATE()
GROUP BY Users.USER_ID
HAVING COUNT(Posts.POST_ID) > 3; | true |
157d7e7f7194d5d2e634f857dbade093fba94040 | SQL | paulgheorghecristian/cubrid-testcases | /sql/_27_banana_qa/issue_16066_BINARY_charset/_00_String_Functions_and_Operators/cases/translate002.sql | UTF-8 | 1,412 | 3 | 3 | [
"BSD-3-Clause"
] | permissive | --+ holdcas on;
set names utf8;
drop table if exists t1;
create table t1 (col_binary varchar(10) collate binary, col_euckr varchar(10) collate euckr_bin, col_utf8 varchar(10) collate utf8_bin, col_iso varchar(10) collate iso88591_bin);
insert into t1 values('문자열', '문자열', '문자열', 'ÀÏ');
insert into t1 values(cast( _utf8'... | true |
39f33794557a2c5dfd2cd7fe629084572486bb3e | SQL | AdmiJW/SQL | /SQL Cheat Sheet/1.2 INSERTING DATA.sql | UTF-8 | 1,003 | 3.21875 | 3 | [] | no_license | # INSERTING DATA IN ALL FIELDS
/* ======================================================================
If we are going to insert the data into ALL the fields, we use the
syntax
INSERT INTO <table> VALUES ( <...values> )
where the values are exactly number of columns in the table
=============... | true |
2722f18dff555042bc803a1a97bd67c9ba91f384 | SQL | AbdelGhania/PostgresSQL-Challenge | /Schemas.sql | UTF-8 | 1,622 | 3.890625 | 4 | [
"MIT"
] | permissive | # Creating employees table:
Create Table employees (
emp_no INT NOT NULL,
birth_date DATE NOT NULL,
first_name VARCHAR(14) NOT NULL,
last_name VARCHAR (16) NOT NULL,
gender VARCHAR (1) NOT NULL,
hire_date DATE NOT NULL,
primary key (emp_no));
# Creating departments table:
Creat... | true |
295b6d19bccdbf018e0765d94291395051dcb5c4 | SQL | S205334/ProgettoPWR | /DB/informatica.sql | UTF-8 | 1,717 | 3.453125 | 3 | [] | no_license | --
-- database: `informatica`
--
DROP DATABASE IF EXISTS `informatica`;
CREATE DATABASE `informatica` DEFAULT CHARACTER SET latin1 COLLATE latin1_general_cs;
USE `informatica`;
--
-- structure for table `prodotti`
--
DROP TABLE IF EXISTS `prodotti`;
CREATE TABLE `prodotti` (
`pid` int unsigned NOT ... | true |
93bd70845da89991a478d2d5e808fcbc7efdd02b | SQL | dcdimas/simpleHMS | /SQL.sql | UTF-8 | 14,073 | 2.859375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Jun 30, 2020 at 10:37 AM
-- Server version: 10.4.11-MariaDB
-- PHP Version: 7.4.6
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIEN... | true |
7e1550fe5c634c995f271dbd6c446adab60e7f6b | SQL | LucaContri/dataanalysis | /SFReportEngine/resources/coles.dashboard.reports.sql | UTF-8 | 2,810 | 4.0625 | 4 | [] | no_license | use salesforce;
create or replace view coles_dashboard_data_last_month_sub as
select a.Name as 'Account Name', c.AccountId, c.Id, c.Name, c.FirstName, c.LastName, date_format(min(r.Class_Begin_Date__c ), '%Y-%m') as 'First Registration Period'
from training.registration__c r
inner join training.contact c on r.Attendee_... | true |
05dc63dbaf5f73f16e1663bca94577c06d803e6d | SQL | mucollabo/SQL200 | /176.sql | UTF-8 | 911 | 3.171875 | 3 | [] | no_license | set serveroutput on
set verify off
accept p_num prompt '랜덤으로 생성할 숫자들의 개수를 입력하세요 ~ '
accept p_a prompt '검색할 숫자를 입력하세요 ~ '
declare
type array_t is varray(1000) of number(30);
array_s array_t := array_t();
v_cnt number(10) := &p_num;
v_a number(10) := &p_a;
v_chk number(10) := 0;
begin
... | true |
22e38237d7f74d8d14435241ff15157a053cd94e | SQL | silence-do-good/stress-test-Postgres-and-MySQL | /dump/low/day17/select1926.sql | UTF-8 | 262 | 2.9375 | 3 | [] | no_license |
SELECT sen.name
FROM SENSOR sen, SENSOR_TYPE st, COVERAGE_INFRASTRUCTURE ci
WHERE sen.SENSOR_TYPE_ID=st.id AND st.name='WeMo' AND sen.id=ci.SENSOR_ID AND ci.INFRASTRUCTURE_ID=ANY(array['4082','4100_1','3084','5241','5064','4029','2028','3032','2044','1420'])
| true |
5775fe9c441f9a718d562dcf18e9f4bc52236926 | SQL | BiSAPPD/ECAD_sync | /2017/local_server_lp&mx.sql | UTF-8 | 929 | 3.75 | 4 | [] | no_license |
select distinct ppd.salon_code,
lp.brand, lp.id, lp.id_ecad, lp.salon_code, count(Concat('LP',lp.brand)) over ( order by Concat(lp.salon_code, lp.brand) ), lp.name, lp.address, lp.street, lp.com_mreg, lp.city_name_geographic, lp.region_name_geographic, lp.phone_sln, lp.email_sln, lp.full_name, lp.mobile_number_mng,... | true |
6178701ebc281b630c4bc50dc917266436b3d2e0 | SQL | akim004/SoundCloudParser | /db.sql | UTF-8 | 933 | 3.015625 | 3 | [] | no_license | -- Adminer 4.7.8 MySQL dump
SET NAMES utf8;
SET time_zone = '+00:00';
SET foreign_key_checks = 0;
SET sql_mode = 'NO_AUTO_VALUE_ON_ZERO';
DROP TABLE IF EXISTS `tbl_track`;
CREATE TABLE `tbl_track` (
`id` int NOT NULL AUTO_INCREMENT,
`duration` int DEFAULT NULL,
`name` varchar(255) DEFAULT NULL,
`playback_coun... | true |
551b10aa29814964c83f67cb8a1ea23fe9950577 | SQL | hwa1049/kobis-utils | /KobisUtils/quries/Temporary.sql | UTF-8 | 4,045 | 3.765625 | 4 | [] | no_license | select * from T1_ClassificationSystemTable a right outer join X1_GbifTaxonomyName b
on a.scientific_name=b.name_txt;
-- 4,416,348
select count(*) from X1_GbifTaxonomyName;
-- 501,206
select count(*) from X1_ItisTaxonomyName;
-- 1,265,377
select count(*) from X1_NcbiTaxonomyName;
select name_txt from X1_ItisTaxo... | true |
b66b8ef0c96008bd1b156098cddf10f14a15b363 | SQL | brunosouza502/SyService | /cliclo3_consultas.sql | UTF-8 | 3,943 | 3.328125 | 3 | [] | no_license | ALTER TABLE syservice.user ADD COLUMN datacadastro TIMESTAMP WITH TIME ZONE default 'now'
ALTER TABLE syservice.requisita alter column dt_inicio set default 'now'
ALTER TABLE syservice.requisita ADD COLUMN dtreq TIMESTAMP WITH TIME ZONE DEFAULT 'now'
ALTER TABLE syservice.requisita drop column dt_inicio
ALTER TABLE sy... | true |
39134c0b277578590aa7bf9bfa952da66b85eda0 | SQL | potch/spenses | /db/purchase.sql | UTF-8 | 1,571 | 3.109375 | 3 | [] | no_license | -- *************************** 1. row ***************************
-- purchaseid: 1
-- description: test
-- purchase_amount: 10.00
-- date_updated: 0000-00-00 00:00:00
-- date_created: 2010-07-28 18:44:52
-- date_of: 2010-07-28 00:00:00
-- is_settle: 0
-- creator_userid: 1
-- creator_nic... | true |
c184bec5c5a11899cfa67e2c2cb66abda2653cf4 | SQL | omarhassanhub/Dropit | /Database/dropit.sql | UTF-8 | 1,300 | 2.71875 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.2.7.1
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Dec 17, 2014 at 11:09 PM
-- Server version: 5.6.20
-- PHP Version: 5.5.15
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */... | true |
018d821967b81e3138ac307a08da3df4f54d0002 | SQL | CUBRID/cubrid-testcases | /sql/_33_elderberry/cbrd_23916/cases/partition_cascade_03.sql | UTF-8 | 886 | 4.09375 | 4 | [
"BSD-3-Clause"
] | permissive | drop table if exists a cascade constraints;
drop table if exists b cascade constraints;
drop table if exists c cascade constraints;
create table a (a int primary key, c int NULL) partition by hash(a) partitions 2;
create table b (a int NULL, b int primary key, foreign key (a) references a(a) on delete CASCADE) partitio... | true |
4f4f40ee2b0d7e69c1199c710c4626f661e41126 | SQL | patilanup246/Merkle | /VTWC/CRM/api_customer/Views/CampaignHistory.sql | UTF-8 | 824 | 3.484375 | 3 | [] | no_license |
CREATE VIEW [api_customer].[CampaignHistory] AS
SELECT ch.CustomerID,
km.CustomerID AS CBECustomerID,
ch.LegacyCampaignID AS CampaignID,
ch.ContactDate AS ContactDate,
c.Name AS CampaignName,
'Email' AS Channel,
... | true |
ce07176d4c57187f0f062adac27afd64e3cc9f86 | SQL | TheDariusz/InGoodHands | /src/main/resources/db/migration/V1_1_0__CreateTables.sql | UTF-8 | 1,124 | 3.65625 | 4 | [] | no_license | create
sequence hibernate_sequence start
1 increment 1;
create table category
(
id int4 not null,
name varchar(255),
primary key (id)
);
create table institution
(
id int8 not null,
description varchar(255),
name varchar(255),
primary key (id)
);
create table don... | true |
092d79e53c30280039037b4472c132dc04e5c46f | SQL | TonyLeeIT/hopital_management | /schema/insert_table.sql | UTF-8 | 8,137 | 2.609375 | 3 | [] | no_license | use
HospitalManagement;
#doctor
insert into doctor value('BS01', 'Identity_Number01_BS', 'Ninh Xuan Huan', '1998-05-20','Ha Noi',5,'DaiHoc','Than Kinh','Bac Si');
insert into doctor value('BS02', 'Identity_Number02_BS', 'Nguyen HaiPhuong', '1994-07-31','Ha Noi',10,'DaiHoc','Tim','Truong Khoa');
insert into doctor valu... | true |
d1775339f07e3d624d4e0e380666341871e3e4f0 | SQL | mj6meron/SQL--Creating-and-populating-a-database. | /pupulatingMyDatabase.sql | UTF-8 | 3,082 | 3.171875 | 3 | [] | no_license | USE nba;
INSERT INTO arenas VALUES('Barclays Center', 'Brooklyn, New York', 19000);
INSERT INTO arenas VALUES('Toyota Center', 'Houston, Texas', 18000);
INSERT INTO arenas VALUES('Scotiabank Arena', 'Toronto, Ontario', 19800);
INSERT INTO arenas VALUES('STAPLES Center', 'Los Angeles, California', 20000);
INSERT INTO a... | true |
039d6d0bab64ce1e8c87f354819f4dcf32906061 | SQL | heerokim/Portfolio-Massage | /community/src/main/webapp/WEB-INF/sql/note.sql | UTF-8 | 506 | 3.40625 | 3 | [] | no_license | create table note_tb(
note_no number PRIMARY KEY
,send_id varchar2(30) NOT NULL
,recv_id varchar2(30) NOT NULL
,note_title varchar2(200) NOT NULL
,note_content varchar2(3000) NOT NULL
,note_type char(1) DEFAULT 0
,note_read char(1) DEFAULT 0
,note_date date DEFAULT sysdate
,cons... | true |
e68702f4541389df46e7f858279cdb9742219600 | SQL | catarinacci/proyecto_p_p | /database/tigergym_1.sql | UTF-8 | 18,403 | 3.1875 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.8.3
-- https://www.phpmyadmin.net/
--
-- Servidor: 127.0.0.1
-- Tiempo de generación: 14-02-2020 a las 00:30:43
-- Versión del servidor: 10.1.36-MariaDB
-- Versión de PHP: 7.2.10
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";... | true |
566142cd6b3cb9395811c601fac542575fa1565c | SQL | zetarus/Americano | /Server/CGSF/ThirdParty/fastdb-375/fastdb/ruby/clitest.sql | UTF-8 | 331 | 2.71875 | 3 | [] | no_license | open 'clitest';
create table Person(name string,
salary int8,
address string,
rating real8,
pets array of string,
subordinates array of reference to Person);
create index on Person.salary;
create hash on Person.name;
start server 'localho... | true |
2094f061fb4ba2d3e4e0e414a45204e770a8417d | SQL | adriangrahl/classic-models-spring-boot-jpa | /src/main/resources/db/migration/V2020031503__create_location_tables.sql | UTF-8 | 640 | 3.859375 | 4 | [] | no_license | create table cities (
id bigint not null auto_increment,
name varchar(255),
stateCode bigint,
primary key (id)
) engine=InnoDB;
create table countries (
id bigint not null auto_increment,
name varchar(255),
primary key (id)
) engine=InnoDB;
create table states (
id bigint not null auto_i... | true |
831e257e1648ca0e164147e24f26dce7077c71c8 | SQL | Anemone95/dissertation-MLonSAST | /extra/msca.sql | UTF-8 | 23,539 | 3.53125 | 4 | [] | no_license | /*
Navicat Premium Data Transfer
Source Server : localhost
Source Server Type : MySQL
Source Server Version : 80012
Source Host : localhost:3306
Source Schema : msca
Target Server Type : MySQL
Target Server Version : 80012
File Encoding : 65001
Date: 11/02/2020 18:00... | true |
54c6d49b7d9c19bc9a37d068fe216f0f3fa9b31e | SQL | rafaferruz/cpuz | /web/WEB-INF/config/scripts/alter.sql | UTF-8 | 166 | 2.90625 | 3 | [] | no_license | alter table userroles ADD FOREIGN KEY user (usu_user) REFERENCES users (usu_user);
alter table userroles ADD FOREIGN KEY role (usr_role) REFERENCES roles (rol_role); | true |
9e30f73acd10b1e16c3bee28e4a6a0369533b0a7 | SQL | evandromaster/mysql | /2 - Carga/2 - Carga - notebook/Importar dim_populacao.sql | UTF-8 | 374 | 2.71875 | 3 | [] | no_license | LOAD DATA LOCAL INFILE 'c:/Mysql/Tbl_Dimensao/dim_populacao.csv' -- Aqui vc especifica o local do arquivo
into table dim_populacao -- Aqui você especifica o nome da tabela
fields terminated by ';'
LINES TERMINATED by '\n'
ignore 1 lines
(
UEOP,
COD_MUNI,
FRACAO,
POP2017,
POP2018
); -- Aqui você coloca os ca... | true |
cdee8cb64a084473f656406020ee981916a93616 | SQL | postgrespro/tsvector2 | /init.sql | UTF-8 | 10,906 | 3.265625 | 3 | [
"PostgreSQL"
] | permissive | -- complain if script is sourced in psql, rather than via CREATE EXTENSION
\echo Use "CREATE EXTENSION tsvector2" to load this file. \quit
CREATE TYPE tsvector2;
CREATE FUNCTION tsvector2in(cstring)
RETURNS tsvector2
AS 'MODULE_PATHNAME'
LANGUAGE C STRICT IMMUTABLE;
CREATE FUNCTION tsvector2out(tsvector2)
RETURN... | true |
54447d368cca697ad172c2753562f0d44418ab48 | SQL | nanda199/UTS-FP-SMT6 | /data_surat.sql | UTF-8 | 1,568 | 2.96875 | 3 | [
"MIT"
] | permissive | -- phpMyAdmin SQL Dump
-- version 4.8.5
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Apr 22, 2021 at 05:35 PM
-- Server version: 10.1.39-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... | true |
88737437eec1d958c4a896b7c1844c613badcdc2 | SQL | st-decker/lahman-baseball-st-decker | /queries/1_question.sql | UTF-8 | 783 | 3.59375 | 4 | [] | no_license | /*
QUESTION ::
What range of years does the provided database cover?
SOURCES ::
* Batting, pitching, fielding
DIMENSIONS ::
* ...
FACTS ::
* min year
* max year
FILTERS ::
* Using specific tables
DESCRIPTION ::
Assumptions from README: Stat... | true |
e80ba0c849b4687b81c25dc750c13ea1602b416f | SQL | tbhaijee/Literacy-Data-ETL-project | /SQL Files/querries.sql | UTF-8 | 237 | 3.359375 | 3 | [] | no_license | Select country,countryname,sex, suicidedata.year, literacydata.year, age, suicide_no,literacy_number
from suicidedata
JOIN literacydata on
country = countryname AND
suicidedata.year = literacydata.year
where literacy_number is not null
| true |
3cd91391760103cb8f6961d280d2de61b77e66fb | SQL | AmadouSY/Compta-Theatre | /tests/annuler_reservation.sql | UTF-8 | 293 | 2.515625 | 3 | [
"MIT"
] | permissive | \echo ********** PAIEMENT RESERVATION **********
SELECT * FROM BILLET WHERE statut_billet='RESERVE' ;
\prompt 'Tapez le numero de la RESERVATION a annuler : ' num_billet
\echo 'BILLER SUPPRIMER ':num_billet
DELETE FROM billet WHERE id_billet=billets.id_billet;
SELECT(f_ajouter_place(:num_billet));
| true |
490efbc7e3d3216749cd983f2195116e8fc38c7b | SQL | darsal09/walkforourwater | /data/posts.sql | UTF-8 | 1,305 | 3 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.1.12
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Jun 24, 2015 at 03:36 AM
-- Server version: 5.6.16
-- PHP Version: 5.5.11
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;... | true |
7dcd546156b516862e0c56ca3645db4b132bc58b | SQL | promisethedeveloper/SQL-joins-exercise | /queries.sql | UTF-8 | 578 | 4.375 | 4 | [] | no_license | -- write your queries here
-- first query
SELECT * FROM owners o
FULL OUTER JOIN vehicles v
ON o.id=v.owner_id;
-- second query
SELECT first_name, last_name,
COUNT(owner_id) FROM owners o
JOIN vehicles v on o.id=v.owner_id
GROUP BY (first_name, last_name)
ORDER BY first_name;
-- third query
SELECT
... | true |
e84940235e4d0f6d158bc4d0fd4d03cba8699d32 | SQL | smukashev/essp | /usci/db_oracle_scripts/vw_simple_attribute.sql | UTF-8 | 222 | 2.796875 | 3 | [] | no_license | create or replace view vw_simple_attribute as
select sa.id, classes.name as class_name, sa.name as attribute_name
from eav_m_simple_attributes sa,
eav_m_classes classes
where sa.containing_id = classes.id;
| true |
00606ebc34cd1429d6a90d414791b9fcad5536c4 | SQL | cmswafford/uiucrehome | /uiucsd.sql | UTF-8 | 3,422 | 3.84375 | 4 | [] | no_license | CREATE DATABASE uiucsd DEFAULT CHARACTER SET = utf8 DEFAULT COLLATE = utf8_general_ci;
GRANT ALL PRIVILEGES ON uiucsd.* TO 'uiucsd'@'localhost' IDENTIFIED BY 'uiuc$d2011';
USE uiucsd;
CREATE TABLE categories ( category_id INT UNSIGNED AUTO_INCREMENT
,category_name VARCHAR(255) DEFAULT NULL
... | true |
af9f87299d176f2471415349a00fcf96b4a258f1 | SQL | 201411096/study_flask | /flask/ex_03_flask_board/ver_01/backup_dbsql/210125_db.sql | UTF-8 | 15,529 | 3.171875 | 3 | [] | no_license | -- --------------------------------------------------------
-- 호스트: 192.168.0.13
-- 서버 버전: 10.5.5-MariaDB - mariadb.org binary distribution
-- 서버 OS: Win64
-- HeidiSQL 버전: 11.0.0.5919
-- ---------------------------------------------... | true |
37a87e87dd34ab457cd332c6d33cbb951dd95372 | SQL | yifeng2019uwb/DataCampAndCodePractice | /Data-Analyst-with-SQL-Server/01-Introduction-to-SQL-Server/02-Groups-strings-and-counting-things/10-GROUP_BY.sql | UTF-8 | 1,030 | 4.46875 | 4 | [] | no_license | /*
GROUP BY
In an earlier exercise, you wrote a separate WHERE query to determine the amount of demand lost for a specific region. We wouldn't want to have to write individual queries for every region. Fortunately,you don't have to write individual queries for every region. With GROUP BY, you can obtain a sum of all th... | true |
c41071176d4227f79936413a194bcba0455cf55f | SQL | amaitpaul2255/atp3-lab | /Lab task 6/labtask6ff.sql | UTF-8 | 1,754 | 3.046875 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 5.0.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Apr 30, 2022 at 06:20 PM
-- 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_CLIE... | true |
3371968d445598d0f0993fe76a0f6c3d68295d0c | SQL | halmasieh/Pewlett-Hackard-Analysis | /silver_tsunami.sql | UTF-8 | 2,335 | 4.59375 | 5 | [] | no_license | -------------------------------------------------------------------------
--Written Analysis-Summary
--------------------------------------------------------------------------
-- Create tables employees
CREATE TABLE employees (
emp_no INT NOT NULL,
birth_date DATE NOT NULL,
first_name VARCHAR NOT NULL,
... | true |
4a28872f5f7f29488d9aec43960632925be8ae8d | SQL | sdramsey89/Pewlett-Hackard-Analysis | /Queries/Employee_Database_challenge.sql | UTF-8 | 3,024 | 4.4375 | 4 | [] | no_license | --Deliverable 1
-- Retreive Employee Number, First Name, Last Name
SELECT e.emp_no,
e.first_name,
e.last_name,
t.title,
t.from_date,
t.to_date
INTO retirement_titles
From employees as e
Join titles as t
ON (e.emp_no = t.emp_no)
WHERE (e.birth_date BETWEEN '1952-01-01' AND '1955-12-31')
ORDER BY e.emp_no
;
-- Use ... | true |
5afa823c12c1faeb9f8f7b5e15c97e1e8b295cff | SQL | annemaku/weatherdiary | /src/main/resources/omaschema.sql | UTF-8 | 509 | 2.703125 | 3 | [] | no_license | CREATE TABLE IF NOT EXISTS weatheruser (
id int NOT NULL PRIMARY KEY,
user_name varchar(50),
password varchar(20),
name varchar(50),
role varchar(50)
);
CREATE TABLE IF NOT EXISTS weather (
weather_id int NOT NULL AUTO_INCREMENT PRIMARY KEY,
weatherdate date NOT NULL,
location varchar(50),
temperature var... | true |
3e4730332529d15f07d169cb481ba6d9f9eb346c | SQL | amyelmer92/GWS-SQL | /ethos.sql | UTF-8 | 1,561 | 3.890625 | 4 | [] | no_license | --first, check if tablename exists - if so, drop it
IF OBJECT_ID('dbo.DimEthnos') IS NOT NULL
BEGIN
DROP TABLE dbo.DimEthnos
END
--then select the IDs from the relevant column, create table, adding description (use case statement, and values from data dictionary)
SELECT DISTINCT
ETHNOS as I... | true |
8d87f074b673215ff86aced9d26726ba3371ab74 | SQL | saga1015/db_refresh | /sql/DB_Refresh_Restore_Script_Ddboost.sql | UTF-8 | 706 | 3.234375 | 3 | [] | no_license | select
'gpssh -h ' || hostname || ' -v -e '''
||'gpddboost --readFile --from-file=' || file_name || ' | '
|| 'PGOPTIONS="-c gp_session_role=utility" psql -h '|| hostname || ' -p ' || port || ' -d ' || :v_Target_DB || ' -U gpadmin '
|| E'''&\n'
|| 'plist['|| id_file ||']=$!'
from (select row_number() over() as id_fil... | true |
bf336774acfe4f33fc972ff9d0dc7a4e0fad6b2b | SQL | royiwanhamonanganpasaribu/Amor | /1.sql | UTF-8 | 2,232 | 2.921875 | 3 | [] | no_license |
DROP VIEW public.perhitungan_sisa_amor_final;
DROP VIEW public.perhitungan_sisa_deposito;
-- View: public.perhitungan_sisa_deposito
-- DROP VIEW public.perhitungan_sisa_deposito;
CREATE OR REPLACE VIEW public.perhitungan_sisa_deposito AS
SELECT sum(hitung_komisi_deposito_3.sisa_amor) AS komisi_dep
FROM hitung_... | true |
fa0bcf67327b532151eb8d53e18fe9e43d89267b | SQL | pawurb/ruby-pg-extras | /lib/ruby_pg_extras/queries/db_settings.sql | UTF-8 | 381 | 2.5625 | 3 | [
"MIT"
] | permissive | /* Values of selected PostgreSQL settings */
SELECT name, setting, unit, short_desc FROM pg_settings
WHERE name IN (
'max_connections', 'shared_buffers', 'effective_cache_size',
'maintenance_work_mem', 'checkpoint_completion_target', 'wal_buffers',
'default_statistics_target', 'random_page_cost', 'effective_io_c... | true |
02659184a7912be3e886cf1b12f265601cdb8427 | SQL | sandylcruz/aa-algorithms | /recap/sql/sql-zoo/difficult.sql | UTF-8 | 1,707 | 4.3125 | 4 | [] | no_license | -- 1. The example query shows all goals scored in the Germany-Greece quarterfinal.
-- Instead show the name of all players who scored a goal against Germany.
SELECT DISTINCT player
FROM goal JOIN game ON matchid = id
WHERE (team1='GER' OR team2='GER')
AND teamid <> 'GER'
-- 2. Show teamname and the total number of g... | true |
1570d1cfeb0f2137cbc6fb46df4c6c0e59bdf5c0 | SQL | lautaro1990/Base-de-datos-2 | /ejercicios/clase 13.sql | UTF-8 | 1,239 | 3.4375 | 3 | [] | no_license | use sakila;
-- 1
insert into customer
(store_id, first_name, last_name, email, address_id, active, create_date, last_update)
select 1, 'Juan', 'Perez', 'juanperez@gmail.com', MAX(address_id), 1, current_timestamp, current_timestamp FROM address
inner join city on address.city_id = city.city_id
inner join country on c... | true |
1e6e941487de4e56212884fb383367a8e0753717 | SQL | yeahframeoff/course-db | /department_curriculums_dump.sql | UTF-8 | 6,947 | 3.421875 | 3 | [
"MIT"
] | permissive | CREATE DATABASE IF NOT EXISTS `department_curriculum` /*!40100 DEFAULT CHARACTER SET utf8 */;
USE `department_curriculum`;
-- MySQL dump 10.13 Distrib 5.6.13, for Win32 (x86)
--
-- Host: 127.0.0.1 Database: department_curriculum
-- ------------------------------------------------------
-- Server version 5.5.38-log... | true |
22fc54db6edb301c7174032045a720b03efd54de | SQL | huidh123/SoftWarePKYanZhiBin | /《同学帮帮忙》源码-岩志彬/数据库文件/shm.sql | UTF-8 | 5,900 | 3.140625 | 3 | [] | no_license | /*
Navicat MySQL Data Transfer
Source Server : ess
Source Server Version : 50096
Source Host : localhost:3307
Source Database : shm
Target Server Type : MYSQL
Target Server Version : 50096
File Encoding : 65001
Date: 2015-05-25 21:15:33
*/
SET FOREIGN_KEY_CHECKS=0;
-- -----------... | true |
06a88f79fa06bb72051170c3ba1f34599b2f447e | SQL | thorwbm/lixiera_sql | /organizar/genericos/cursor basico.sql | UTF-8 | 1,167 | 2.625 | 3 | [] | no_license | /*****************************************************************************************************************
* IMPORTACAO DA CARGA HORARIA *
* ... | true |
fce011138bbac74d0894df35dcf16d81bd256c77 | SQL | etnewell/12-MySQL-db | /emp.sql | UTF-8 | 499 | 3.28125 | 3 | [] | no_license |
DROP DATABASE IF EXISTS emp_manage_db;
CREATE DATABASE emp_manage_db;
USE emp_manage_db;
CREATE TABLE department (
id INT NOT NULL,
name VARCHAR(30) NOT NULL,
PRIMARY KEY (id)
);
CREATE TABLE role (
id INT NOT NULL,
title VARCHAR(30) NOT NULL,
salary INT NULL,
department_id INT NULL,
PRIMARY KEY ... | true |
fdef0fc36aca43485c1af6fa5c027aabc5baa883 | SQL | silence-do-good/stress-test-Postgres-and-MySQL | /dump/high/day25/select1617.sql | UTF-8 | 178 | 2.640625 | 3 | [] | no_license |
SELECT timeStamp, temperature FROM ThermometerOBSERVATION o
WHERE timestamp>'2017-11-24T16:17:00Z' AND timestamp<'2017-11-25T16:17:00Z' AND temperature>=11 AND temperature<=57
| true |
5fddb363b4c472f8385b03ad6bbd3aa387309632 | SQL | klk083/hapi | /src/Hapi/database.sql | UTF-8 | 4,857 | 3.5625 | 4 | [] | no_license | -- noinspection SqlNoDataSourceInspectionForFile
DROP TABLE IF EXISTS subscription_menu;
DROP TABLE IF EXISTS subscription_customer;
DROP TABLE IF EXISTS order_chauffeur;
DROP TABLE IF EXISTS order_cook;
DROP TABLE IF EXISTS menu_order;
DROP TABLE IF EXISTS menu_ingredient;
DROP TABLE IF EXISTS ingredient;
DROP TABLE I... | true |
ad1dcef95395c418ad06887b9d94798fbaee1017 | SQL | 1725136424/tmall-ssm | /src/main/resources/sql/order_.sql | UTF-8 | 1,520 | 2.84375 | 3 | [] | no_license | /*
Navicat MySQL Data Transfer
Source Server : study
Source Server Version : 80016
Source Host : localhost:3306
Source Database : tmall
Target Server Type : MYSQL
Target Server Version : 80016
File Encoding : 65001
Date: 2021-05-10 15:22:03
*/
SET FOREIGN_KEY_CHECKS=0;
-- -------... | true |
4b987d6c3387cc96560c7fce4231babd6f3cf42c | SQL | AmitTheBest/atk4-codepad | /doc/agileproject.001.sql | UTF-8 | 418 | 2.71875 | 3 | [] | no_license | -- This is your inital structure for the prject. Put all tables here and also
-- insert some data into your tables
--
-- Remember that it's recommended to have "id int not null primary key auto_increment"
-- on all tables. Also if you are not sure about filed length, use 255.
--
create table user (
id int not null pr... | true |
5c1ef2d4cf037cedad4f9eb1385c6424d9999a94 | SQL | Dr1N/NotesOrganizer | /db/tbl_note_tags.sql | UTF-8 | 379 | 3.453125 | 3 | [] | no_license | CREATE TABLE tbl_note_tags
(
id INT NOT NULL AUTO_INCREMENT,
note_id INT NOT NULL,
tag_id INT NOT NULL,
PRIMARY KEY (id),
FOREIGN KEY (note_id) REFERENCES tbl_notes(id)
ON DELETE CASCADE
ON UPDATE CASCADE,
FOREIGN KEY (tag_id) REFERENCES tbl_tags(id)
ON DELETE CASCADE
ON UPDATE CAS... | true |
69692ae70758847f477733aa5fda7979a82bc574 | SQL | kangqi0421/Oracle | /monitoring_worker_serv_hot.sql | UTF-8 | 541 | 3.203125 | 3 | [] | no_license | select /*+RULE*/
s.username,
dl.SID,
s.SID,
s.SERIAL#,
dl.JOB,
p.spid,
'kill -9 ' || p.SPID,
'alter system kill session ''' || s.sid || ',' || s.serial# || '''' || ';'
from dba_jobs_running dl, v$session s, v$process p
where
--dl.name like 'INV_INV%' and
s.paddr = p.addr
and dl.sid = s.SID
a... | true |
55e8c973b9e7f03e67ebe8fc7c0d94dc4b741673 | SQL | DonThomas98/safeplusDjango | /Github/SQL/triggers/trigger_pagos.sql | UTF-8 | 667 | 3.21875 | 3 | [] | no_license | --ESTE TRIGGER SE INVOCA AL MOMENTO DE CREAR UN CLIENTE , SE LE CREA UN CONTRATO
create or replace trigger trg_crearcontrato
after insert on auth_user
for each row
begin
if :NEW.is_staff=0 then
insert into contrato (descripcion,costo,fecha_contratacion,rut_cliente_id)
values ('Plan U... | true |
4680ae7474988b191a25614a28644539687729cb | SQL | atmospherer/aqi | /xici_proxy/schema.sql | UTF-8 | 2,561 | 3.71875 | 4 | [] | no_license | PRAGMA foreign_keys = OFF;
-- ----------------------------
-- Table structure for aqi
-- ----------------------------
DROP TABLE IF EXISTS "main"."aqi";
CREATE TABLE aqi (
ID INTEGER NOT NULL PRIMARY KEY,
division UNSIGNED BIG INT(10) NOT NULL,
areaName VARCHAR(12) DEFAULT NULL,
... | true |
eaff22a2fdf875d2e7819b9f2dea74860956c859 | SQL | vsarathy1/ch2 | /ch2driver/pytpcc/util/cbcrindexcollection_replicas.sql | UTF-8 | 1,730 | 2.875 | 3 | [] | no_license | drop index cu_w_id_d_id_last on default.tpcc.customer USING GSI
drop index di_id_w_id on default.tpcc.district USING GSI
drop index no_o_id_d_id_w_id on default.tpcc.neworder USING GSI
drop index or_id_d_id_w_id_c_id on default.tpcc.orders USING GSI
drop index or_w_id_d_id_c_id on default.tpcc.orders USING GSI
drop ind... | true |
c315105a4e9a4f6a5aec002e454c1fbeac08ece4 | SQL | clyan/some-mini-project | /大二实训/ebuy.sql | UTF-8 | 27,724 | 2.984375 | 3 | [
"MIT"
] | permissive | /*
Navicat MySQL Data Transfer
Source Server : ebuy
Source Server Version : 50520
Source Host : localhost:3306
Source Database : ebuy
Target Server Type : MYSQL
Target Server Version : 50520
File Encoding : 65001
Date: 2019-02-13 00:14:46
*/
SET FOREIGN_KEY_CHECKS=0... | true |
d900160187ebf6d05ccef1e39866c1321b12396c | SQL | mundodron/arduino-bot-aurelio | /Querys/~eb8C0A.sql | UTF-8 | 495 | 2.625 | 3 | [] | no_license | select * from customer_id_acct_map where external_id = '899998500563'
select cmf.cust_state, cmf.bill_state from cmf where account_no = 8551415
select rowid, a.* from cmf a where account_no = 8551415
select SB.PARENT_ACCOUNT_NO, vl.*
from service_billing sb, equip_class_code_values vl
where sb.parent_acc... | true |
cb4bfaf57a0965d3bdd3ff8fea21a3abd4ddb998 | SQL | YurySS/oracle_dbd_plsql_basic | /2. blocks/1. block_types.sql | UTF-8 | 1,034 | 3.03125 | 3 | [] | no_license | /*
Курс: PL/SQL.Basic
Автор: Кивилев Д.С. (https://t.me/oracle_dbd, https://oracle-dbd.ru, https://www.youtube.com/c/OracleDBD)
Лекция 2. Блоки
Описание скрипта: примеры трех типов PL/SQL-блоков
*/
---- Пример 1. Неименованный блок
declare
v_str varchar2(20 char) := 'Hello world!';
begin
dbms_output.put... | true |
2dbe74183094d8128f70cc0f65911f2714a7c8b9 | SQL | Gonomic/Genealogy-backend | /GetPossibleFathersBasedOnAge.sql | UTF-8 | 602 | 3.890625 | 4 | [
"MIT"
] | permissive | DELIMITER $$
CREATE DEFINER=`root`@`%` PROCEDURE `getPossibleFathersBasedOnAge`(IN `PersonAgeIn` DATE)
SQL SECURITY INVOKER
COMMENT 'To get the possible fathers of a person based on the persons bir'
BEGIN
SELECT DISTINCT
P.PersonID as PossibleFatherID,
concat(P.PersonGivvenName, ' ', P.Person... | true |
cea71908948d3b505485d6755cedc89f49e2b054 | SQL | CommerceRack/backend-static | /ebay/sql/database00.sql | UTF-8 | 2,753 | 3.203125 | 3 | [
"MIT"
] | permissive | DROP TABLE IF EXISTS `ebay_categories`;
CREATE TABLE `ebay_categories` (
`id` int(10) unsigned NOT NULL default '0',
`parent_id` int(10) unsigned NOT NULL default '0',
`level` tinyint(3) unsigned NOT NULL default '0',
`name` varchar(64) NOT NULL default '',
`leaf` tinyint(3) unsigned NOT NULL default '0',
`... | true |
f05fdd425d8a3c9ee8b15eb97484f722a005c48b | SQL | taylor97data/LeetCode-SQL-Summary | /join/simple_join/1112. 每位学生的最高成绩.sql | UTF-8 | 185 | 3.171875 | 3 | [] | no_license | SELECT student_id,min(course_id) as course_id,grade
FROM enrollments
WHERE (student_id,grade)
in(SELECT student_id,max(grade)
FROM enrollments
GROUP BY student_id)
GROUP BY student_id
| true |
cb3dcc57b45c4636b5ca08c51b771a0d11d424e4 | SQL | JaneChengYiChen/SQLQuerySet | /view_BonusRateWithRelations.sql | UTF-8 | 9,107 | 3.484375 | 3 | [] | no_license | --sql server --
--view_BonusRateWithRelations
CREATE VIEW v_LS_mentoring_relation_ratios AS
WITH mentoring_line AS (
SELECT
man_code,
man_name,
man_tcode,
gd_code,
gd_name,
gd_tcode,
LV,... | true |
bf05ef015c155c9a1359ae4a8613518d2a5b3c74 | SQL | ameet2r/ParkingApplication | /parking.sql | UTF-8 | 2,015 | 4 | 4 | [] | no_license | -- Karanbir Toor and Ameet Toor
-- Create ParkingLot table and generate values.
DROP TABLE ParkingLot;
CREATE TABLE ParkingLot
(
lotName VARCHAR(100),
UNIQUE(lotName),
location VARCHAR(100),
capacity INT,
floors INT,
PRIMARY KEY(lotName)
);
INSERT INTO ParkingLot
VALUES('TestOne', 'Seattle', '100', '2'),
... | true |
8fb851e479f29ddb63bfa84f6b18e55fcc077f5b | SQL | ArmandoNCM/SanMartinMS | /Implementation/Database/DDL Scripts/DatabaseConstraints.sql | UTF-8 | 536 | 3.265625 | 3 | [] | no_license | ALTER TABLE DISPATCH
ADD CONSTRAINT FK_DISPATCH
FOREIGN KEY (OWNER)
REFERENCES CLIENT (NIT);
ALTER TABLE INVOICE
ADD CONSTRAINT FK_INVOICE
FOREIGN KEY (CLIENT)
REFERENCES CLIENT (NIT);
ALTER TABLE ITEM_PRICE
ADD CONSTRAINT FK_ITEM_PRICE
FOREIGN KEY (ITEM)
REFERENCES ITEM (ITEM_CODE);
ALTER TABLE ORDER_DETAI... | true |
aef6a0d637682682ecbd582ba6f2166d923fbacb | SQL | sinerger/HR_Application | /HR_Application_DB/Stored Procedures/Base/Comments/UpdateComment.sql | UTF-8 | 338 | 3 | 3 | [] | no_license | CREATE PROCEDURE [HRAppDB].[UpdateComment]
@ID int,
@EmployeeID int,
@Information nvarchar (255),
@Date nvarchar (255)
AS
Update [HRAppDB].[Comments]
SET [HRAppDB].[Comments].EmployeeID = @EmployeeID,
[HRAppDB].[Comments].Information = @Information,
[HRAppDB].[Comments].[Date] = @Date
Where [HRAppDB].[Com... | true |
3f914f54aaf67c019701cdbd38b0b81bed78f878 | SQL | edigonzales-archiv/landuseplans_extract_light | /src/main/resources/queries.sql | UTF-8 | 12,150 | 3.671875 | 4 | [
"MIT"
] | permissive | /*
WITH parcel AS (
SELECT
flaechenmass AS area,
geometrie AS geometry
FROM
agi_mopublic_pub.mopublic_grundstueck
WHERE
egrid = 'CH970687433258'
)
SELECT
foo.t_id,
'NoiseSensitivityLevels' AS theme,
'Lärmempfindlichkeitsstufen (in Nutzungszonen)' AS subtheme,
substring(foo.typ_kt FROM 1... | true |
c83f56f5a2668e186ce2666b4c0bf1b20817a5e9 | SQL | bomethis/leetcode | /swap_salary.sql | UTF-8 | 108 | 2.71875 | 3 | [] | no_license | UPDATE salary
SET sex = Case
When sex = 'm' Then 'f'
When sex = 'f' then 'm'
End
Where sex ='f' or sex ='m'
| true |
db0c6a7198b1924f325bb07ca9709583d30af5f3 | SQL | SolarHalo/iiiviviko | /createtable.sql | UTF-8 | 4,525 | 3.09375 | 3 | [] | no_license | /*
Navicat MySQL Data Transfer
Source Server : iiivivi
Source Server Version : 50148
Source Host : hdm-059.hichina.com:3306
Source Database : hdm0590365_db
Target Server Type : MYSQL
Target Server Version : 50148
File Encoding : 65001
Date: 2012-12-14 11:32:06
*/
SET FOREIGN_KEY_C... | true |
0cb4bd150d6c0ffdfa8d0c3f6a6defe4fa17595c | SQL | luchomarfil/tallerJava | /t/src/ar/edu/unlp/hermes2/resources/hermes.schema.sql | UTF-8 | 1,435 | 3.25 | 3 | [] | no_license | PRAGMA foreign_keys=OFF;
BEGIN TRANSACTION;
CREATE TABLE "Hermes.Ninios" (
"id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL,
"nombre" TEXT NOT NULL,
"apellido" TEXT NULL
);
CREATE TABLE "Hermes.Contextos" (
"id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL,
"nombre" TEXT NOT NULL,
"descripcion" TE... | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.