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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
c5d4ada6edb46a98d6627772e5a35c132d208f64 | SQL | pavel-voinov/oracle-dba-workspace | /scripts/tools/procedures/exec_sql.sql | UTF-8 | 1,429 | 2.953125 | 3 | [
"MIT"
] | permissive | /*
*/
CREATE OR REPLACE PROCEDURE exec_sql (
p_SQL clob)
is
ds_cur pls_integer := dbms_sql.open_cursor;
sql_table dbms_sql.VARCHAR2S;
c_buf_len constant binary_integer := 256;
v_accum integer := 0;
v_beg integer := 1;
v_end integer := 256;
v_loblen pls_integer;
v_retval pls_integer;
-- l... | true |
fbc7d435dc08483757c197f043e254ff42e0158f | SQL | dangmengkun/Leetocde-everydaysql | /613. Shortest Distance in a Line.sql | UTF-8 | 196 | 3.421875 | 3 | [] | no_license | One trick here is to add the condition in the join to avoid calculating the distance between a point with itself.
select min(abs(p1.x-p2.x)) as shortest
from point p1 join point p2
on p1.x!=p2.x
| true |
ebef2fc706e329a5221907cdc5958f942d8090bc | SQL | adityasistu/Airline-Reservation-Management | /sql/travels (3).sql | UTF-8 | 4,489 | 2.828125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.9.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Nov 11, 2019 at 04:11 PM
-- Server version: 10.4.8-MariaDB
-- PHP Version: 7.3.10
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD... | true |
fed8e8121105e149fb8ddd005ffdacf4b4b8fa50 | SQL | Eph-It/Automation | /src/EphIt/Classlibraries/EphIt.Db/SQL/Trigger/TR_Role_Audit_Update.sql | UTF-8 | 386 | 3.09375 | 3 | [
"MIT"
] | permissive | CREATE OR ALTER TRIGGER dbo.TR_Role_Audit_Update
ON [Role]
AFTER UPDATE
AS BEGIN
INSERT INTO [AUDIT] ( RbacActionId, RbacObjectId, Created, UserId, ObjectId )
SELECT
CASE
WHEN INSERTED.IsDeleted = 1 THEN 3
ELSE 4
END AS 'RbacActionId'
,2 AS 'RbacObjectId'
,GETUTCDATE() AS Created
,INSERTED.ModifiedByU... | true |
da2c471ca4b805488ddea71fac8b64f1973aed01 | SQL | j7ng/CLFY_SA | /SA/Tables/TABLE_N_ATTRIBUTEVALUE.sql | UTF-8 | 3,064 | 2.875 | 3 | [] | no_license | CREATE TABLE sa.table_n_attributevalue (
objid NUMBER,
dev NUMBER,
n_name VARCHAR2(50 BYTE),
n_type NUMBER,
n_focustype NUMBER,
n_focuslowid NUMBER,
n_stringvalue VARCHAR2(255 BYTE),
n_longvalue NUMBER,
n_datevalue DATE,
n_decimalvalue NUMBER(19,4),
n_targettype NUMBER,
n_targetlowid... | true |
efa0dc7dc788939893190d48c6b67277a91c0707 | SQL | drobertadams/Prokope-Server | /queries.sql | UTF-8 | 3,934 | 3.890625 | 4 | [] | no_license | CREATE TABLE IF NOT EXISTS `users` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`username` varchar(60) NOT NULL DEFAULT '',
`password` varchar(45) NOT NULL DEFAULT '',
`firstname` varchar(60) NOT NULL DEFAULT '',
`lastname` varchar(60) NOT NULL DEFAULT '',
`professorid` int(11) DEFAULT NULL,
PRIMARY KEY (`id`)... | true |
2ae45b1de14074dce8e58062e7987ac9736696fa | SQL | phillipjohnson/java-for-the-real-world-code | /logging/logback/src/main/resources/data-h2.sql | UTF-8 | 1,200 | 3.234375 | 3 | [] | no_license | insert into ingredient_type(ingredient_type)
select possible.ingredient_type from
(select 'ICE_CREAM' ingredient_type union select 'TOPPING') possible
where possible.ingredient_type not in (select ingredient_type from ingredient_type)
;
insert into ingredient(ingredient, ingredient_type, unit_price)
select possible.i... | true |
cbb6663bd775ab6745ec65a52d79d98550e7f617 | SQL | reaniwen/DataBase | /original data.sql | UTF-8 | 8,753 | 2.78125 | 3 | [] | no_license |
-- User
insert into user values('10001','aaa','123456','Peter','Allen','P.Allen@gmail.com','New York','6461234567',null,null);
insert into user values('10002','tomlee','654321','Tom','Lee','tomlee@yahoo.com','New York','7181234567',null,null);
insert into user values('10003','lovemusic','lovemusic','Alice','Julia','lo... | true |
48c657fceb8726828d741ff3ef7d69d8cf0d7a40 | SQL | NZOGPS/nzopengps | /scripts/Loopy/Loopy1.sql | UTF-8 | 1,184 | 3.546875 | 4 | [] | no_license | drop table if exists :nodedtable;
CREATE TABLE :nodedtable
(
idx serial PRIMARY KEY,
roadid integer,
label character varying(100),
type character varying(10),
path integer,
geom geometry,
startpt geometry(Point),
endpt geometry(Point),
loop character varying(40)
);
insert into :nodedtable(geom,path,ro... | true |
b9d3a8afd4c31ed03e8d7e9e74b307c41550a88b | SQL | Mbackedi/Projet1POO | /Projet2.sql | UTF-8 | 8,381 | 3.1875 | 3 | [
"MIT"
] | permissive | -- phpMyAdmin SQL Dump
-- version 4.6.6deb5
-- https://www.phpmyadmin.net/
--
-- Client : localhost:3306
-- Généré le : Lun 01 Juillet 2019 à 09:12
-- Version du serveur : 5.7.26-0ubuntu0.18.04.1
-- Version de PHP : 7.2.19-0ubuntu0.18.04.1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!4010... | true |
f1bded1e2dc1cf21a2aba645227a197c1c56858a | SQL | OsetianBoy/PelivsPeli-EB | /scripts/script-paso-0-db-tablas.sql | UTF-8 | 783 | 3.21875 | 3 | [] | no_license | USE competencias;
DROP TABLE IF EXISTS competencia;
CREATE TABLE competencia (
id int(11) NOT NULL AUTO_INCREMENT,
nombre varchar(100) NOT NULL ,
actor_id int(11) unsigned ,
director_id int(11) unsigned,
genero_id int(11) unsigned,
PRIMARY KEY (id),
FOREIGN KEY (actor_id) REFERENCES actor(id),
F... | true |
3bff1cbf85c33d487c071b22454b4e29d234619a | SQL | alsyr/Dimensional_Modeling_and_OLAP | /Queries/Question-08.sql | UTF-8 | 458 | 3.875 | 4 | [] | no_license | SELECT
Time.week_number_overall AS Week_Number,
Store.sales_district AS District,
Product.brand AS Brand,
SUM(Sales_fact.dollar_sales) AS Sales_Dollars
FROM
Store,
Product,
Sales_fact,
Time
WHERE
Sales_fact.store_key = Store.store_key AND
Sales_fact.product_key = Product.product... | true |
92db3ca363da044d29b4eaf56dd719d7a78dcdcf | SQL | YuriyNik72/Lesson11-Spring-Security | /src/main/resources/db/migration/V6__great_table_orders.sql | UTF-8 | 612 | 3.453125 | 3 | [] | no_license | DROP TABLE IF EXISTS orders;
CREATE TABLE orders (
id INT(11) NOT NULL AUTO_INCREMENT,
user_id INT(11) NOT NULL,
status_id INT(11) NOT NULL,
create_at DATETIME NOT NULL,
PRIMARY KEY (id... | true |
675b4ad6bc054f106b9eb4d65c78d6dca6b2f64a | SQL | batuhangoktass/Fobizm | /fobizm.sql | UTF-8 | 7,169 | 3.359375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.9.2
-- https://www.phpmyadmin.net/
--
-- Anamakine: 127.0.0.1:3308
-- Üretim Zamanı: 24 Ara 2019, 10:55:58
-- Sunucu sürümü: 8.0.18
-- PHP Sürümü: 7.4.0
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARA... | true |
0d7c6b74879c6fbd940f364d56ce74d28ab3dbde | SQL | CUBRID/cubrid-testcases | /sql/_01_object/_10_system_table/_013_db_trig/cases/1003.sql | UTF-8 | 466 | 3.234375 | 3 | [
"BSD-3-Clause"
] | permissive | --Create trigger and retrieve the target_attr_name from virtual class db_trig
create class test_class(col1 integer, col2 varchar(20));
insert into test_class values(999,'nhn');
create trigger test_trigger
before update on test_class(col1)
execute print 'update new record on col1';
select trigger_name,
t... | true |
14560c7dd7e6debbb988404103060952252fe896 | SQL | matheusjustino/prisma-crud-k8s | /prisma/migrations/20210925212517_create_tables/migration.sql | UTF-8 | 1,895 | 4.25 | 4 | [] | no_license | -- CreateTable
CREATE TABLE "Product" (
"id" TEXT NOT NULL,
"createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
"updatedAt" TIMESTAMP(3) NOT NULL,
"name" TEXT NOT NULL,
"description" TEXT,
"price" DECIMAL(65,30) NOT NULL,
"sku" TEXT NOT NULL,
"published" BOOLEAN NOT NULL DEFAULT... | true |
a9639e8ad2356d85c8135de2a32318cc4c7c044e | SQL | iusoltsev/sqlplus | /bl_create_awr.sql | UTF-8 | 3,502 | 3.65625 | 4 | [] | no_license | -----------------------------------------------------------------------------------------
--
-- Purpose: Creates SQL Plan Baseline for a SQL statement with a plan_hash_value from AWR
-- Based on cr_baseline_awr.sql from Prasanth Kothuri
-- https://www.dropbox.com/sh/zp07y7qv0v06xg8/AABe8z82ZnFjAfoQyFDQxl9ja?dl=0
-- Usa... | true |
82309270f5438cf68cd6d30bd196c15b82ccd39c | SQL | yamanashi-ai-robot-dev/dorepipa | /dorepipa/src/main/resources/META-INF/jp/co/ysk/pepper/pac2017/dao/TMistakePointsDao/selectFirstWorsePoint.sql | UTF-8 | 532 | 3.890625 | 4 | [] | no_license | select
mu.measure,
mu.num_in_measure,
mu.key_id,
mp.mistake_cd
from
t_mistake_points mp
inner join m_music mu
on mp.music_id = mu.music_id
and mp.note_id = mu.note_id
where
mp.play_id = /* currPlayId */0
and
mp.user_id = /* userId */0
and
not exists (
select
mp2.mistake_point_id
from
t_mistake_... | true |
880894762f0ba868939203d32c15c1f97bf4b03e | SQL | nahmed23/git-github.com-Life-Time-Inc-database_udw | /ltdatabaseudw/marketing/Views/v_dim_crm_campaign.sql | UTF-8 | 2,603 | 2.765625 | 3 | [] | no_license | CREATE VIEW [marketing].[v_dim_crm_campaign]
AS select d_crmcloudsync_campaign.dim_crm_campaign_key dim_crm_campaign_key,
d_crmcloudsync_campaign.campaign_id campaign_id,
d_crmcloudsync_campaign.created_by_dim_crm_system_user_key created_by_dim_crm_system_user_key,
d_crmcloudsync_campaign.created_... | true |
3c1e173d292376e5a2090ae7406c39606561cd32 | SQL | axelgabin/Livrable-Swing-JPA | /BD/gestionrdv.sql | UTF-8 | 1,755 | 3.234375 | 3 | [] | no_license | /*
SQLyog Ultimate v11.5 (32 bit)
MySQL - 5.6.25 : Database - gestionrdv
*********************************************************************
*/
/*!40101 SET NAMES utf8 */;
/*!40101 SET SQL_MODE=''*/;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHEC... | true |
b5c79d3b73f309f18b0169125ca3c56b6560f475 | SQL | juanco89/posts | /db/1. ALTER_POST_ADD_AUTOR.sql | UTF-8 | 394 | 3.171875 | 3 | [
"Apache-2.0"
] | permissive |
-- 14-12-2014
-- Agrega la columna AUTOR a la tabla POST.
ALTER TABLE public.post ADD COLUMN autor VARCHAR NOT NULL DEFAULT '';
-- Si la tabla post no está vacía es necesario realizar update.
-- UPDATE public.post SET autor = 'juan' ;
-- Clave foránea de POST a USUARIO.
ALTER TABLE public.post ADD CONSTRAINT post_... | true |
a81099418dfd3182fb56e593de742f46ec3c4a4c | SQL | zarper/Chim-re | /BDD/chimere.sql | UTF-8 | 11,861 | 3.125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.5.1
-- http://www.phpmyadmin.net
--
-- Client : 127.0.0.1
-- Généré le : Lun 19 Juin 2017 à 15:37
-- Version du serveur : 10.1.16-MariaDB
-- Version de PHP : 5.5.38
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARA... | true |
5e4a38887f24fb62afb07d3b6df950d21872aca9 | SQL | Rayintu/Spotitube-Ricky-Broers | /database/spotitube-DDL.sql | UTF-8 | 1,577 | 3.859375 | 4 | [] | no_license | -- we don't know how to generate schema spotitube (class Schema) :(
create table accounts
(
user varchar(255) not null
primary key,
password varchar(255) null,
full_name varchar(255) null
)
engine = InnoDB
;
create table playlists
(
playlist_id int auto_increment,
name varchar(100) null,
owner ... | true |
6453759f63c90d19823eaa2e690156ca141cfebb | SQL | gruter/tajo-elasticsearch | /tajo-core/src/test/resources/queries/TestSortQuery/testSortWithAlias3.sql | UTF-8 | 251 | 3.671875 | 4 | [
"Apache-2.0",
"PostgreSQL",
"BSD-3-Clause",
"MIT"
] | permissive | select
nation.n_nationkey as n_nationkey,
customer.c_name as c_name,
count(nation.n_nationkey) as cnt
from
nation inner join customer on n_nationkey = c_nationkey
group by
nation.n_nationkey,
customer.c_name
order by
n_nationkey, c_name; | true |
fea9b88f210aa2ef2c4e658821faf4e0ae64c537 | SQL | bhayyasaheb/Hive | /Hive Practicals.sql | UTF-8 | 37,110 | 3.8125 | 4 | [] | no_license |
show databases;
use niit;
show tables;
show table structure:-
--------------------
desc formatted customer;
Location: hdfs://localhost:54310/user/hive/warehouse/niit.db/customer
Table Type: MANAGED_TABLE
select * from customer;
turncate will delete data from table & drop will delete data a... | true |
5b7541616f2189d9f25f1c0dcf3bd1c620ccd4fb | SQL | ast-developers/thewallreport | /App/Database/db.sql | UTF-8 | 10,220 | 3.53125 | 4 | [
"MIT",
"LicenseRef-scancode-free-unknown"
] | permissive | /* 11 Sept 2017 */
DROP TABLE IF EXISTS `roles`;
CREATE TABLE `roles` (
`id` INT(11) UNSIGNED NOT NULL AUTO_INCREMENT,
`name` VARCHAR(255) NOT NULL,
`status` ENUM('0','1') NOT NULL DEFAULT '0',
`created_at` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
`updated_at` TIMESTAMP NULL DEFAULT NULL,
PRIMARY KEY ... | true |
9ad17647182eeb73be3b1ade377db20c8b844a66 | SQL | JoshuaCMorgan/ls180 | /sql_exercises/03_ddl/02.sql | UTF-8 | 919 | 3.96875 | 4 | [] | no_license | -- Relating Stars and Planets
-- You may have noticed that, when we created the stars and planets tables, we did not do anything to establish a relationship between the two tables. They are simply standalone tables that are related only by the fact that they both belong to the extrasolar database. However, there is no... | true |
ab67eb2f77bbc4c5dda1c2c65dd36fe24e4b36a5 | SQL | ahmetaykutay/mini_blog | /create_tables.sql | UTF-8 | 455 | 3.765625 | 4 | [] | no_license | -- create articles table
CREATE TABLE users (
id int NOT NULL AUTO_INCREMENT,
user_name varchar(90) NOT NULL,
email varchar(90) NOT NULL,
password varchar(90) NOT NULL,
PRIMARY KEY (id)
);
-- create articles table
CREATE TABLE articles (
id int NOT NULL AUTO_INCREMENT,
title varchar(90) NOT NULL,
body ... | true |
335da9560856da82d1ef35927277d70833e793bc | SQL | wkrzywiec/Library-API | /src/main/resources/delete-inserted-user.sql | UTF-8 | 157 | 2.546875 | 3 | [
"Apache-2.0"
] | permissive | DELETE FROM `user_role` WHERE `user_id` = (
SELECT `id`
FROM `user`
WHERE `username` = "wojtek")
;
DELETE FROM `user` WHERE `username` = "wojtek"; | true |
3f0c22a34097efa12fc97b9936e1468dc6e97f5d | SQL | Marcus-V-Freitas/SQL_Utils | /Administração/Scripts Configurações das Bases de Dados.sql | WINDOWS-1252 | 2,430 | 3.65625 | 4 | [
"MIT"
] | permissive | ----------------------------------------------------------
-- Script Configuraes Databases
----------------------------------------------------------
SELECT
database_id,
CONVERT(VARCHAR(1000), DB.name) AS dbName,
state_desc,
(SELECT SUM((size*8)/1024) FROM sys.master_files WHERE DB_NAME(database_id) = DB.name AND ... | true |
aa9abd28a3487248cc89319969c029f948521982 | SQL | gambo94/mysql_estructura | /Pizzeria/script.sql | UTF-8 | 2,407 | 3.890625 | 4 | [] | no_license | DROP DATABASE IF EXISTS pizzeria;
CREATE DATABASE pizzeria CHARACTER SET utf8mb4;
USE pizzeria;
CREATE TABLE provincia (
id_provincia INT UNSIGNED AUTO_INCREMENT PRIMARY KEY,
nombre_prov VARCHAR(20) NOT NULL
);
CREATE TABLE localidad (
id_localidad INT UNSIGNED AUTO_INCREMENT PRIMARY KEY,
nombre_loc ... | true |
6652284e9cb24fd15feb2105e92521bda8102bfc | SQL | othmanedendane/Php-LaBonneBouffe | /bonnebouffe.sql | UTF-8 | 3,046 | 3.390625 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.9.2
-- https://www.phpmyadmin.net/
--
-- Hôte : 127.0.0.1
-- Généré le : lun. 12 avr. 2021 à 03:58
-- Version du serveur : 10.4.11-MariaDB
-- Version de PHP : 7.4.1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101... | true |
ad6e8ef31d8b9aff652e26bc737b13f8f370ede3 | SQL | vpoletaev11/avitoParser | /init.sql | UTF-8 | 289 | 2.671875 | 3 | [] | no_license | CREATE DATABASE IF NOT EXISTS avitoParser;
USE avitoParser;
CREATE TABLE IF NOT EXISTS link (
PRIMARY KEY(link),
link VARCHAR(500) NOT NULL,
price INT NOT NULL
);
CREATE TABLE IF NOT EXISTS email (
PRIMARY KEY(email),
email VARCHAR(500) NOT NULL,
link VARCHAR(500) NOT NULL
);
| true |
a73306ebb38e68583d1290f27951a31b9f17d7c9 | SQL | peterlegrand/StudentUnion0105 | /StudentUnion0105/MasterDataScripts/StoredProcedures/ContentTypeIndexGet.sql | UTF-8 | 386 | 3.390625 | 3 | [] | no_license | CREATE PROCEDURE ContentTypeIndexGet (@LanguageId int)
AS
SELECT
dbContentType.Id
, ISNULL(Name, '') Name
, ISNULL(Description,'') Description
, ISNULL(MouseOver,'') MouseOver
, ISNULL(MenuName,'') MenuName
FROM dbContentType
JOIN dbContentTypeLanguage
ON dbContentType.Id = dbContentTypeLanguage.ContentTypeId
... | true |
67c36a25f87944daf8d629f06870312f1ec8c8c2 | SQL | RayDarar/med-share.db | /src/queries/triggers.sql | UTF-8 | 573 | 3.125 | 3 | [
"MIT"
] | permissive | create trigger users_add_trigger
after insert on users
referencing new as new
for each row
begin
insert into users_log(user_id, datetime) values(:new.id, sysdate);
end;
create trigger posts_add_trigger
after insert on posts
referencing new as new
for each row
begin
insert into posts_log(post_id, dateti... | true |
cc0c918b51086779abc3864c47ffa665cb4096ad | SQL | maratimaev/job4j | /chapter_008/src/main/java/ru/job4j/sql/script.sql | UTF-8 | 1,027 | 3.125 | 3 | [] | no_license | create table users (
id serial primary key,
name varchar(2000)
)
create table roles (
id serial primary key,
role varchar(2000)
)
alter table users add column roles_id int references roles(id);
create table rules (
id serial primary key,
rule varchar(2000)
)
create table items (
id serial primary key,
ite... | true |
7f4190d5164508545590a34f81735c37014e9122 | SQL | bugybunny/hsr_modules | /Db1_Uebungen/src/ch/hsr/modules/db1/w14/db/0_runAllScripts.sql | UTF-8 | 1,149 | 3.078125 | 3 | [] | no_license | \echo \conninfo
\echo
\echo -n 'client encoding: '\encoding
\echo
SET client_min_messages = ERROR;
\set user bankuser
\set password '\'bankpw\''
\set database bank
\set promptvar ''
\prompt 'DROP USER [':user'] and DROP DATABASE [':database'] if existing (\\q or Ctrl-C to abort)?' promptvar
:promptvar
DROP DATABASE... | true |
e9debf17c008919793a2c09d99ea173135a63b1a | SQL | tamtadam/gherkin_editor | /sql/project_template.sql | UTF-8 | 284 | 2.859375 | 3 | [] | no_license | DROP table IF EXISTS project_template;
CREATE TABLE project_template (
Project_templateID int(10) unsigned NOT NULL AUTO_INCREMENT,
ProjectID int(10) NOT NULL,
SentenceTemplateID int(10) NOT NULL,
PRIMARY KEY (Project_templateID)
) ENGINE=InnoDB DEFAULT CHARSET=utf8; | true |
ad0347c7836ab00e7b1748a81a4621c7d6f93b7e | SQL | fllencina/Programacion-3 | /producto.sql | UTF-8 | 2,555 | 3.015625 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 5.1.0
-- https://www.phpmyadmin.net/
--
-- Servidor: 127.0.0.1
-- Tiempo de generación: 19-04-2021 a las 03:03:04
-- Versión del servidor: 10.4.18-MariaDB
-- Versión de PHP: 8.0.3
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_... | true |
dcb172f17e940083099a3ebd32df54cc1ad3cc5a | SQL | doitrightway/parking-ticketing-system | /sql/create.sql | UTF-8 | 2,168 | 3.796875 | 4 | [] | no_license | create table users (
uid varchar(10) primary key,
name varchar(20),
phone varchar(10),
class integer not null);
create table wallet (
uid varchar(10) not null,
amount numeric(8,2) check (amount >=0),
foreign key (uid) references users
on delete cascade,
primary key (uid)
);
create table password (
uid var... | true |
2d8dbfc815601efd8865b75341b808ed0fc6df11 | SQL | paulovieira/h2optimum-app | /database/1_tables/1040_t_triggers.sql | UTF-8 | 1,385 | 3.453125 | 3 | [] | no_license | DO $$
DECLARE
patch_exists int := _v.register_patch('create_table_triggers', '');
BEGIN
IF patch_exists THEN
RETURN;
END IF;
/*** BEGIN CODE FOR CHANGES ***/
-- note: these triggers are NOT related to database triggers
create table t_triggers(
id serial primary key,
user_id int references t_users(id) ... | true |
8a762d09d49dd8e8ced7e9eeee282a9aac33167e | SQL | dafthor/MinTic_G2 | /SQL/minticg2.sql | UTF-8 | 1,863 | 2.984375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 5.1.1
-- https://www.phpmyadmin.net/
--
-- Servidor: 127.0.0.1
-- Tiempo de generación: 06-10-2021 a las 03:41:09
-- Versión del servidor: 8.0.26
-- Versión de PHP: 8.0.10
SET
SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET
time_zone = "+00:00";
/*!40101 SET @OLD_CHARA... | true |
b19468b5105894ecec1060bab71a65ecf23e0b25 | SQL | matheuslipk/agencia_turismo | /agencia_turismo.sql | UTF-8 | 4,921 | 3.09375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.7.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: 02-Abr-2018 às 22:35
-- Versão do servidor: 10.1.28-MariaDB
-- PHP Version: 7.1.11
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OL... | true |
ad9356fccba776dad0077fe2cff529e950443dd3 | SQL | tectronics/blooddonorsdocuments | / blooddonorsdocuments/database/datadump_aug_2012.sql | UTF-8 | 32,097 | 2.703125 | 3 | [] | no_license | -- MySQL Administrator dump 1.4
--
-- ------------------------------------------------------
-- Server version 5.5.17
/*!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 */;
... | true |
b10d7507c97a0ff8f1379480efd67cdbe31adf11 | SQL | mfrench71/DAT504 | /Timebank SQL/timebank_031116_02.sql | UTF-8 | 3,914 | 3.640625 | 4 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.6.4
-- https://www.phpmyadmin.net/
--
-- Host: localhost:8889
-- Generation Time: Nov 03, 2016 at 09:44 PM
-- Server version: 5.6.33
-- PHP Version: 7.0.12
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIE... | true |
37be17bdd037618a3f2af8fe3305e75107bcad36 | SQL | andre12001/fecebook-clone-socialkit | /MySQL/fb.sql | UTF-8 | 19,804 | 3.078125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Waktu pembuatan: 26 Nov 2020 pada 06.15
-- Versi server: 10.4.11-MariaDB
-- Versi PHP: 7.4.5
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CH... | true |
7eeb28fbca03038ab6b8c859ed7443be8151c32c | SQL | nathancirillo/SQL-Server | /SQL Server - Consultas avançadas/INNER JOIN.sql | ISO-8859-1 | 1,337 | 3.890625 | 4 | [] | no_license | SELECT * FROM [TABELA DE VENDEDORES]
SELECT * FROM [NOTAS FISCAIS]
--Juntando as duas tabelas (new school)
SELECT * FROM [TABELA DE VENDEDORES] V INNER JOIN [NOTAS FISCAIS]N
ON V.MATRICULA = N.MATRICULA
--Juntando as duas tabelas (old school)
SELECT * FROM [TABELA DE VENDEDORES], [NOTAS FISCAIS]
WHERE dbo.[TABELA DE ... | true |
dcce4c9262ddab936112e66ad053a7227a241d3a | SQL | paulalcabasa/Oracle-SQL-Files | /Accounting Books/AR Receipts sUMMARY.sql | UTF-8 | 1,442 | 3.5 | 4 | [] | no_license | SELECT to_char(acra.receipt_number) receipt_number,
acra.amount receipt_amount,
acra.doc_sequence_value,
to_char(acra.receipt_date,'DD-MON-YYYY') or_date,
NVL(party.party_name,ACRA.MISC_PAYMENT_SOURCE) payee,
ARPT_SQL_FUNC_UTIL.get_lookup_meaning ('CHECK_STATU... | true |
899bf9c056f00e99585f44328e7ef37e4c061198 | SQL | furkantokac/Swamp-server | /SwampDatabase/autoSetup.sql | UTF-8 | 1,220 | 3.3125 | 3 | [
"MIT"
] | permissive | # CREATE DB
CREATE DATABASE swamp;
# DROP TABLES
DROP TABLE User;
DROP TABLE User_Account;
DROP TABLE Bin;
DROP TABLE Collected_Waste;
DROP TABLE User_Bin;
# CREATE TABLES
CREATE TABLE User (
uname VARCHAR(255) NOT NULL,
passwd VARCHAR(255) NOT NULL,
PRIMARY KEY (uname)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLL... | true |
0c0ac839afbbc9a6db7df51dccfbe79b4458935a | SQL | Mini0n/PeopleOneAPI | /sqlfiles/areas.sql | UTF-8 | 2,452 | 3.046875 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.5.4.1deb2ubuntu2
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Nov 26, 2017 at 11:56 PM
-- Server version: 5.7.20-0ubuntu0.16.04.1
-- PHP Version: 7.0.22-0ubuntu0.16.04.1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_C... | true |
ab7cd9613b3ef2d46586d90836c0822700672bc8 | SQL | anhlu8/choose_your_predator | /models/schema.sql | UTF-8 | 573 | 2.96875 | 3 | [] | no_license | DROP DATABASE IF EXISTS trivia_db;
CREATE DATABASE trivia_db;
USE trivia_db;
CREATE TABLE questions (
id INT NOT NULL AUTO_INCREMENT,
category VARCHAR(255) NOT NULL,
difficulty VARCHAR(255) NOT NULL,
question VARCHAR(1000) NOT NULL,
correctAnswer VARCHAR(255) NOT NULL,
incorrect1 VARCHAR(255) ... | true |
67784905b0a0685d8ea1f735186e57fb9a767f95 | SQL | peterhychan/OracleSQL | /AcmeBooks_inserts.sql | UTF-8 | 94,763 | 2.828125 | 3 | [] | no_license |
delete from bk_order_details;
delete from bk_order_headers;
delete from bk_customers ;
delete from bk_handling_fees;
delete from bk_book_authors ;
delete from bk_authors;
delete from bk_book_topics;
delete from bk_topics;
delete from bk_books;
delete from bk_publishers;
insert into bk_handling_fees(low_lim... | true |
9f4a857fdc72de31090f2309f3e4eebc5512968d | SQL | php-service-bus/sagas | /src/Store/Sql/schema/indexes.sql | UTF-8 | 149 | 2.65625 | 3 | [
"LicenseRef-scancode-unknown-license-reference",
"MIT"
] | permissive | CREATE INDEX IF NOT EXISTS sagas_state ON sagas_store (state_id);
CREATE INDEX IF NOT EXISTS saga_closed_index ON sagas_store (state_id, closed_at);
| true |
9669590977cc4aa495affb306edfb1fa99613748 | SQL | M4th3m4tic4l/wow-emulator-archive | /WoWD - 03.2006/wowd-sql/char_actions.sql | UTF-8 | 496 | 2.53125 | 3 | [] | no_license | SET FOREIGN_KEY_CHECKS=0;
#----------------------------
# Table structure for char_actions
#----------------------------
CREATE TABLE `char_actions` (
`charId` int(6) NOT NULL default '0',
`button` int(2) unsigned NOT NULL default '0',
`action` int(6) unsigned NOT NULL default '0',
`type` int(3) unsigned NO... | true |
eb6f0a68b3ffdb6b5287166658e4d621ff15beca | SQL | Evisas/EvisasTurismo | /src/main/resources/data/sql/create.sql | UTF-8 | 1,814 | 3.359375 | 3 | [] | no_license | /*
DROP DATABASE IF EXISTS evisas;
CREATE DATABASE evisas COLLATE utf8mb4_unicode_ci;
USE evisas;
*/
CREATE TABLE usuarios
(
id bigint NOT NULL AUTO_INCREMENT PRIMARY KEY,
nome varchar(80) NOT NULL,
email varchar(40) NOT NULL UNIQUE,
telefone numeric(11),
senha ... | true |
3abc18d47f13923e766be3a977ada438189d6390 | SQL | TechieFrogs-Achievers/JavaBasics | /Ramya Kondapalli/src/SQL/useSelectStatements.sql | UTF-8 | 4,934 | 3.375 | 3 | [] | no_license | USE SelectStatements
CREATE TABLE Books_Details
(
book_Id VARCHAR(50) NOT NULL,
book_title VARCHAR(100) NOT NULL,
book_author varchar(100) NOT NULL,
Totalbooks_count int NULL,
Available_books INT,
book_issueDate DATETIME,
book_returnDate DATETIME,
pay_fine FLOAT,
book_student VARCHA... | true |
e3ffd7a929f17be1cc3961456139bad8cf4ac72a | SQL | Shirleyxxy/lc-sql-database | /exchange-seats.SQL | UTF-8 | 658 | 4.40625 | 4 | [] | no_license | -- CASE WHEN + mod + subquery for different cases
-- Logic:
-- odd id (not the last id) --> id + 1
-- odd id (last id) --> id
-- even id --> id - 1
-- IF
SELECT IF(id % 2 = 0, id-1, IF(id = (SELECT COUNT(*) FROM seat), id, id+1) ) AS id, student
FROM seat
ORDER BY id ASC
-- IF (My preferred solution)
SELECT IF(id %... | true |
1cc66fafa5981a368188d363b23269d599862ac3 | SQL | j7ng/CLFY_SA | /SA/Indexes/PRODUCTBIN_NAME_IND.sql | UTF-8 | 96 | 2.6875 | 3 | [] | no_license | CREATE UNIQUE INDEX sa.productbin_name_ind ON sa.table_productbin(parent_type,parent_id,"NAME"); | true |
0dbb297362aa462e9a0f5c8158ec0089a586a81e | SQL | MarceloSilvarolla/YFM-Database-and-Fusion-Guide | /Test preliminarily general fusions/SwordArmOfDragon.sql | UTF-8 | 3,278 | 3.875 | 4 | [] | no_license | -- Test Sword Arm of Dragon fusions
--[Dragon] + [Warrior] = Dragon Statue (1100/900)
-- = Dragoness the Wicked Knight (1200/900)
-- < Flame Swordsman (1800/1600)
-- = D. Human (1300/1100)
-- = Sword Arm of Drag... | true |
80ea2eba8bdbac8f9b5b0f5e9e43edc99ba9e515 | SQL | thorwbm/lixiera_sql | /organizar/academico/CURRICULOS/PROMOCAO_CURRICULO/processo/34-VW_ACD_ALUNOS_MATRICULADOS_POR_TURMA_DISCIPLINA.sql | UTF-8 | 367 | 3.1875 | 3 | [] | no_license | CREATE VIEW VW_ACD_ALUNOS_MATRICULADOS_POR_TURMA_DISCIPLINA AS
SELECT TURMA_ID, turma_nome, DISCIPLINA_ID, disciplina_nome, CURRICULO_ID, curriculo_nome, COUNT(ALUNO_ID) AS QTD_MATRICULADO
FROM vw_curriculo_curso_turma_disciplina_aluno_grade GRA
WHERE status_mat_dis_id = 14
GROUP BY TURMA_ID, turma_nome, DISCIPLINA_ID... | true |
f979fd00b42070add38badc20bb48b9aa0cbd337 | SQL | iyangming/aric-springboot-samples | /aric-springboot-samples-tomcat-dbcp/src/files/springboot.sql | UTF-8 | 3,687 | 3.484375 | 3 | [
"MIT"
] | permissive | /*
SQLyog Ultimate v10.00 Beta1
MySQL - 5.7.11-log : Database - springboot
*********************************************************************
*/
/*!40101 SET NAMES utf8 */;
/*!40101 SET SQL_MODE=''*/;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CH... | true |
99bc5e6c8b530e9a190cb0e09b3c34f9d65947a5 | SQL | Anna-Myzukina/SQL-ZOO | /JOIN.sql | UTF-8 | 2,531 | 4.71875 | 5 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | # Modify it to show the matchid and player name for all goals scored by Germany. To identify German players, check for: teamid = 'GER'
SELECT matchid, player FROM goal
WHERE teamid = 'GER'
# Show id, stadium, team1, team2 for just game 1012
SELECT id,stadium,team1,team2
FROM game
WHERE id = 1012
# Modify it to s... | true |
952a1926f22224a0c6855febffc9d8b5b08129a6 | SQL | srayner/CivAccess | /data/zfcuser_rules.sql | UTF-8 | 1,158 | 2.71875 | 3 | [] | no_license |
-- zfcUser resources.
insert into access_resource(resource_id, resource, display_name) values (5, 'zfcuser', 'User Account');
-- zfcUser privileges.
insert into access_privilege(resource_id, privilege, display_name) values (5, 'index', 'View');
insert into access_privilege(resource_id, privilege, display_name) values... | true |
88cda3b4bc8fd765907fa77b0526657f6abd9eeb | SQL | rudgjs8080/2021_04_DBMS | /Oracle/빛고을고교(2021-05-04_01).sql | UTF-8 | 4,343 | 4.4375 | 4 | [] | no_license | -- 2021-05-04 빛고을 고교
drop table tbl_student;
create table tbl_student(
st_num char(5) primary key,
st_name nvarchar2(10) not null,
st_tel varchar2(20) not null,
st_addr nvarchar2(125),
st_grade number not null,
st_dpcode char(4) not null
);
create table tbl_dept(
dp_code char(4) primary... | true |
6bd28ad07287f96ff5ff95350d56be0a491dd17e | SQL | CUBRID/cubrid-testcases | /sql/_01_object/_03_virtual_class/_002_constrains/cases/1014.sql | UTF-8 | 264 | 2.984375 | 3 | [
"BSD-3-Clause"
] | permissive | -- create vclass using default and not null keyword
create CLASS snack (serving_hours string);
create vclass vsnack
class attribute (meal_type string DEFAULT 'snack' NOT NULL)
(serving_hours string)
as
select serving_hours from snack;
drop vsnack;
drop snack; | true |
cd2457eed9624da6a6659e1cc3480dd3760e0f51 | SQL | BancoDatosNaturaleza/Listas_IEPNB | /Sentencias_SQL/Sentencias_LC/LC_RESEL_Medida.sql | UTF-8 | 1,304 | 2.609375 | 3 | [] | no_license | CREATE TABLE "LC_RESEL_MEDIDA"
( "ID_MEDIDA" NUMBER(2) NOT NULL,
"DS_MEDIDA" VARCHAR2(250) NULL,
CONSTRAINT "PK_LC_RESEL_MEDIDA" PRIMARY KEY ("ID_MEDIDA")
)
;
/*Insert "LC_RESEL_MEDIDA"*/
Insert into LC_RESEL_MEDIDA
(ID_MEDIDA,DS_MEDIDA)
values
('1',null);
Insert into LC_RESEL_MEDIDA
(ID... | true |
ebe9aaee0e9a31ad64a9bd8b8875b6536c5a6a65 | SQL | jonas-colas/SPA-Vuejs-Laravel-5.7 | /vue.sql | UTF-8 | 9,092 | 2.78125 | 3 | [
"MIT"
] | permissive | -- phpMyAdmin SQL Dump
-- version 4.8.3
-- https://www.phpmyadmin.net/
--
-- Servidor: 127.0.0.1
-- Tiempo de generación: 08-01-2019 a las 21:33:05
-- Versión del servidor: 10.1.37-MariaDB
-- Versión de PHP: 7.2.12
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";... | true |
79ae8342cb8c93a2691c17671d90e103659d6871 | SQL | jiwonjulietyoon/Database_Notes | /SQL_Tableau/Pt02_Ch04_Practice.sql | UHC | 2,152 | 4.5 | 4 | [] | no_license |
/* 4-1 ȸ (SELECT) */
/* 1. Order ̺ ȸ */
SELECT *
FROM [Order];
/* 2. [shop_code] 30 ̻θ */
SELECT *
FROM [Order]
WHERE [shop_code] >= 30;
/* 3. [mem_no] [sales_amt] հ ϱ */
SELECT [mem_no], SUM(sales_amt) AS tot_amt
FROM [Order]
WHERE [shop_code] >= 30
GROUP BY [mem_no];
/* 4. [sales_amt] հ谡 100000 ̻θ */
... | true |
e980f9341f80cf1c499fc35c8dba5fad825592e6 | SQL | DrashtiSabhaya/Event-Management-System | /Database/classic_events.sql | UTF-8 | 9,308 | 2.96875 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.7.0
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: May 05, 2020 at 08:58 AM
-- Server version: 10.1.25-MariaDB
-- PHP Version: 7.1.7
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD... | true |
15f63a7576a7136f3d7e098d73652c0457bcf9fa | SQL | abham916/APkyc | /5.1.3.sql | UTF-8 | 291 | 3.796875 | 4 | [] | no_license | SELECT log.email, log.password, stud.name, stud.phone, maj.name AS major_name, maj.credits, group_concat(t.name) AS teacher_name
FROM logins AS log
JOIN students AS stud
ON stud.login_id = log.id
JOIN majors AS maj
ON stud.major_id = maj.id
JOIN teachers AS t
ON t.major_id = maj.id | true |
af1945447e7f0f8c425612e01899cdb9fd21bbb0 | SQL | wasantos/dlkbigdata | /dl-scala/src/main/resources/pe/com/belcorp/datalake/resources/analytics/dwh/DMatrizCampana/update.sql | UTF-8 | 2,882 | 2.609375 | 3 | [] | no_license | INSERT INTO ?tableName
SELECT
sicc_dmatrizcampana.ANIOCAMPANA,
sicc_dmatrizcampana.CODCANALVENTA,
sicc_dmatrizcampana.CODCATALOGO,
sicc_dmatrizcampana.CODESTRATEGIA,
sicc_dmatrizcampana.CODTIPOOFERTA,
sicc_dmatrizcampana.CODVENTA,
sicc_dmatrizcampana.DESCATALOGO,
sicc_dmatrizcampana.DESTIPOOFERTA,
CAS... | true |
d48fc7fc4261091f091787a9868a73b8b14df892 | SQL | vikksa/project | /src/main/resources/queries/plantree/search_query.sql | UTF-8 | 2,796 | 4.28125 | 4 | [] | no_license | WITH RECURSIVE children AS (
SELECT root.id, root.parent_id, root.name, root.version, root.type, root.active, root.last_activity, root.last_modified, root.plan_type, root.current_revision_id, root.bimplus AS "bimplus"
FROM (
SELECT f.id, f.parent_id, f.name, NULL as "version", 'Folder' as "type", f.... | true |
6dd2a636c9de762561b8d13bab472de7ea36b731 | SQL | joyboukaram/OLX | /db/olx.sql | UTF-8 | 3,954 | 3.078125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.7.4
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Generation Time: Dec 13, 2018 at 06:03 PM
-- Server version: 10.1.26-MariaDB
-- PHP Version: 7.1.9
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD... | true |
6670419d9e44b035d218b86f6454c3fe111e6192 | SQL | nss-evening-cohort-12/chinook-nathanieltylerowens | /tracks_no_id.sql | UTF-8 | 190 | 3.515625 | 4 | [] | no_license | SELECT Track.Name as 'Track Name', Album.Title as 'Album Title', Genre.Name as 'Genre Name'
FROM Track
JOIN Album ON Track.AlbumId = Album.AlbumId
JOIN Genre ON Track.GenreId = Genre.GenreId | true |
0bca23a20b01a53fa051eb49b6221be41b4b8023 | SQL | xSooDx/Database-Tool | /ECELLDB.sql | UTF-8 | 23,033 | 3.234375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.4.12
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Apr 25, 2016 at 03:34 PM
-- Server version: 5.6.25
-- PHP Version: 5.6.11
# Privileges for `sood`@`localhost`
GRANT ALL PRIVILEGES ON *.* TO 'sood'@'localhost' IDENTIFIED BY PASSWORD '*A4B6157319038724E3560... | true |
c2ecb72c5fc22b5602315a478c44fab7b0e064c1 | SQL | gechang90/sql-challenge | /EmployeeSQL/q1-8_query.sql | UTF-8 | 1,647 | 4.09375 | 4 | [] | no_license | --Q1 answer:
SELECT employees.emp_no,employees.last_name, employees.first_name,employees.gender,salaries.salary
FROM employees
INNER JOIN salaries on
employees.emp_no= salaries.emp_no;
--Q2 answer:
SELECT * FROM employees
WHERE hire_date BETWEEN '1986-01-01' AND '1986-12-31';
--Q3 answer:
SELECT employees.emp_no... | true |
2578dcdaf652ce2a9d4790c915d7e0a7f7ed6cb2 | SQL | gurpreet19/ec198392_wht | /Database/configuration/03_02_headless_tool/Delta_WST/TargetPackageDefinitions/UE_STORAGE_PROC_PLANT_HEAD.sql | UTF-8 | 2,468 | 2.84375 | 3 | [] | no_license | CREATE OR REPLACE PACKAGE ue_storage_proc_plant IS
/****************************************************************
** Package : ue_storage_proc_plant; head part
**
** $Revision: 1.2 $
**
** Purpose : This package is used by calling from EcBp_Storage_Proc_plant when predefined functions supplied by EC ... | true |
81b2403c6a74ab579a1079367d98711831b7bcdc | SQL | benjajaja/pingpongwinners | /sql/bd.sql | UTF-8 | 1,365 | 3.109375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.1.9
-- http://www.phpmyadmin.net
--
-- Host: localhost:8889
-- Generation Time: 09-04-2014 a les 14:23:22
-- Server version: 5.5.34
-- PHP Version: 5.5.10
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
--
-- Database: `idkpong`
--
-- ----------------------------... | true |
24f1390938967727042af3b35f4a50174511d92e | SQL | valdipietro/sabretooth | /sql/upgrade/1.1.0/phone_call.sql | UTF-8 | 1,169 | 3.8125 | 4 | [] | no_license | -- add the new index to the start_datetime and end_datetime columns
-- we need to create a procedure which only alters the phone_call table if the
-- start_datetime or end_datetime column indices are missing
DROP PROCEDURE IF EXISTS patch_phone_call;
DELIMITER //
CREATE PROCEDURE patch_phone_call()
BEGIN
DECLARE ... | true |
90ad73141db33327deec7f2c530b97723c3a1912 | SQL | paultag/caseflow | /doc/queries/mpr/d_mpr7_org_pending_asof_date.sql | UTF-8 | 685 | 3.765625 | 4 | [
"CC0-1.0",
"LicenseRef-scancode-public-domain"
] | permissive | -- MPR / MPR7 - Originals Certified as of date
WITH cases AS (
SELECT
brieff.bfcurloc,
brieff.bfmpro,
brieff.bfregoff,
brieff.bf41stat,
brieff.bfdtb,
brieff.bfha,
brieff.bfhr,
brieff.bfdocind,
brieff.bfac,
to_date(:start_date, 'MM/DD/YY') - brieff.bf41stat AS date_to_certified
FROM brieff
WHERE
... | true |
63ca36e044ca10e8d0b4723f26a268b319ef7193 | SQL | mateotherock/utah-trails | /db/get_new_users.sql | UTF-8 | 55 | 2.640625 | 3 | [] | no_license | select *
from users
order by date_joined desc
limit 10; | true |
c0fb4375f0654f5ed9d6f5b2d16b7056a1e7ed26 | SQL | josethec/unipostgresql2020 | /cte.sql | UTF-8 | 967 | 4.21875 | 4 | [] | no_license | select film_id, title, case when length<30 then 'Short'
when length>50 then 'Medium'
end as length
from film
select * from (
select payment_date, count(amount) as grp
from payment
group by payment_date
) grupo where grupo.grp>1
with fecha_duplicada as (
select payment_date, count(amount) as grp
f... | true |
5948d960b3169cf60c85c1f033c816f8ffcd921e | SQL | LightCake/chat | /tables.sql | UTF-8 | 583 | 3.53125 | 4 | [] | no_license | CREATE DATABASE chat;
CREATE TABLE users (
ID SERIAL PRIMARY KEY,
name VARCHAR(100),
password VARCHAR(100),
created TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);
CREATE TABLE rooms (
ID SERIAL PRIMARY KEY,
user_id INT,
name VARCHAR(100),
created TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
FOREIGN KEY (user_id) RE... | true |
c458bed5063e1d817126a1c2e2f19ac05b0ed9b7 | SQL | baobeta/ToiecOnline | /ToiecOnline/ApplicationFile/Database/4. create_table_comment.sql | UTF-8 | 456 | 3 | 3 | [] | no_license | use toieconline;
create table comment(
commentid bigint not null primary key auto_increment,
context text null,
userid bigint null ,
listenguidelineid bigint null,
createddate timestamp null
);
alter table comment add constraint fk_user_comment foreign key (userid) references user(userid);
alter t... | true |
dd666add5e8516a3e1ee042616361163c9cd71a1 | SQL | belal55/Virtual-Judge-Panel-Laravel | /virtualjudgedb.sql | UTF-8 | 10,611 | 2.953125 | 3 | [
"Apache-2.0",
"MIT"
] | permissive | -- phpMyAdmin SQL Dump
-- version 4.7.0
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Jan 28, 2018 at 02:01 PM
-- Server version: 10.1.24-MariaDB
-- PHP Version: 7.1.6
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD... | true |
84351b5164fd508485aa2654212942c62fcd16cb | SQL | grvgoel81/leetcode | /queries-quality-and-percentage.sql | UTF-8 | 210 | 3.21875 | 3 | [] | no_license | SELECT
query_name,
ROUND(AVG(CAST(rating AS DECIMAL(10, 6)) / position), 2) AS quality,
ROUND(SUM(IF(rating < 3, 1, 0)) / COUNT(*) * 100, 2) AS poor_query_percentage
FROM Queries
GROUP BY query_name | true |
cb171ef218234682a0c675f7d05e0f7e32c15032 | SQL | roufiq/fenomenom | /sql/bps1101_db_phenomenom.sql | UTF-8 | 44,060 | 3.265625 | 3 | [
"BSD-3-Clause"
] | permissive | -- --------------------------------------------------------
-- Host: localhost
-- Server version: 5.7.9 - MySQL Community Server (GPL)
-- Server OS: Win64
-- HeidiSQL Version: 9.4.0.5170
-- --------------------------------------------------------
/*!... | true |
7dd6e0e6998006d90e2fad5229bde5dfa7f9871a | SQL | kiriakivel/SpellCheckProject | /Greekwords.sql | UTF-8 | 2,845 | 4.6875 | 5 | [] | no_license | /*dictionary is a schema created in the schemas section..
----- create schema `dictionary` default CHAR SET utf8; ----*/
use dictionary;
DROP table IF EXISTS `greekwords`;
CREATE TABLE greekwords (
id int auto_increment,
words varchar(27) NOT NULL,
length int,
PRIMARY KEY (id)
);
/* drop index Wor... | true |
b25c00d0f032b76e6d083b1ee820e272d0c240f9 | SQL | adeshas/transitmedia | /protected/db_new_schema.sql | UTF-8 | 100,410 | 2.875 | 3 | [] | no_license | --
-- PostgreSQL database dump
--
-- Dumped from database version 11.2
-- Dumped by pg_dump version 11.2
-- Started on 2020-12-09 11:57:19
SET statement_timeout = 0;
SET lock_timeout = 0;
SET idle_in_transaction_session_timeout = 0;
SET client_encoding = 'UTF8';
SET standard_conforming_strings = on;
SELECT pg_catalo... | true |
22b7583aef104f974dd9e2bb7836692e3748f72f | SQL | tomyqg/knxBase | /apps/erm/shop/rsrc/sql/views.sql | UTF-8 | 356 | 3.359375 | 3 | [
"MIT"
] | permissive | #
#
#
DROP VIEW IF EXISTS v_ArticleSalesPriceCacheForShop ;
CREATE VIEW v_ArticleSalesPriceCacheForShop AS
SELECT ASPC.*, ROUND( ASPC.Price * (100.0 + T.Percentage) / 100.0, 2) AS SalesPriceTaxIn FROM ArticleSalesPriceCache AS ASPC
LEFT JOIN Article AS A ON A.ArticleNo = ASPC.ArticleNo
LEFT JOIN Ta... | true |
212d77123e76690e2adba696321b623de31f133d | SQL | danilov-v/schedule | /backend/src/main/resources/db/migrations/changes/initSchema.h2.sql | UTF-8 | 3,309 | 3.78125 | 4 | [] | no_license | --liquibase formatted sql logicalFilePath:initSchema.h2.sql
--changeset gonchar:EVENT-1
CREATE TABLE EVENT (EVENT_ID BIGINT AUTO_INCREMENT NOT NULL, DATE_FROM date NOT NULL, NOTE VARCHAR(10000), UNIT_ID BIGINT NOT NULL, EVENT_TYPE_ID BIGINT NOT NULL, DATE_TO date NOT NULL, CONSTRAINT CONSTRAINT_3 PRIMARY KEY (EVENT_ID... | true |
e9ce0d2fb511c1f88c1374b25d0214a5bb781b9c | SQL | MukolaKUN/DB | /MySql/createDB.sql | UTF-8 | 4,781 | 3.546875 | 4 | [] | no_license | drop database bike_rent;
create database bike_rent;
USE bike_rent ;
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS bike_rent.client (
id_client INT NOT NULL AUTO_INCREMENT,
name VARCHAR(45) NULL,
surname VARCHAR(45) NULL,
addres VARCHAR(45) NULL,
phone VARCHAR(45) NULL,
... | true |
315af71bb7a8baae544c1c1827e9e4fb4e7be9c9 | SQL | yngcan/PatentsView-DB | /Scripts/Website_Database_Generator/generate_database.sql | UTF-8 | 115,022 | 3.84375 | 4 | [] | no_license | # Use these to ease global replace:
# source database: `patent_20150826`
# destination database: `PatentsView_20150826_v1`
# Figures above each query (N,NNN @ N:NN) are row and time estimates for each query based on server
# settings at the time the query was run and are just used for sanity checking purpose... | true |
c81e9a0105c4f040c072985a77ab7d91cf3e1451 | SQL | DouglasUnisystem/BI | /CH 62715 - Balancete Gerencial - Ceres/VW_SALDO_BALANCETE.sql | UTF-8 | 1,708 | 3.515625 | 4 | [] | no_license | CREATE MATERIALIZED VIEW VW_SALDO_BALANCETE REFRESH FORCE ON DEMAND START WITH SYSDATE NEXT SYSDATE + 10/24/60 AS
SELECT RPAD(PC.COD_CONTA,8,' ') AS CTB_CONTA,
PC.TAMANHO,
PC.GRAU,
PC.NOME_CONTA,
TRUNC(CM.DATA_MVTO) AS DATA_MVTO,
CM.COD_EMPRESA,
CM.COD_FILIAL,
CM.COD_SAF... | true |
f5af62218303d6e1643c6312009026ce1977c59a | SQL | vmejiaec/setimimpq | /KCG/xDB/Schema Objects/Schemas/dbo/Programmability/Stored Procedures/Procs1/Apu_Oferta_Equipo_Indice_Delete.proc.sql | UTF-8 | 654 | 3.015625 | 3 | [] | no_license | CREATE PROCEDURE dbo.Apu_Oferta_Equipo_Indice_Delete
(
@Original_Id varchar(17),
@Original_Codigo varchar(200),
@Original_Apu_Oferta_Equipo_Id varchar(17),
@Original_Apu_Indice_Id varchar(17),
@Original_Porcentaje numeric(5, 2),
@IsNull_Estado Int,
@Original_Estado char(3)
)
AS
SET NOCOUNT OFF;
DEL... | true |
798ddeac572353f20948979aa1a864576f1b35e9 | SQL | HyoungUk/spring | /관련자료/springSrc2/shopping3/shopping3.sql | UTF-8 | 571 | 2.65625 | 3 | [] | no_license | create table user1 (
userId varchar2(20) primary key,
userName varchar2(20),
password varchar2(20),
postCode varchar2(8),
address VARCHAR2(50),
email VARCHAR2(50),
job VARCHAR2(30),
birthday DATE
);
select * from member3;
insert into user1 values
('kk1','길동1','ps1','111-111','서울시 서초구','kk1@korea.net','사회인','197... | true |
25901369f57222a6d48e0b9e4db688a0142f1f5c | SQL | Web-Programmer-B-P/data-art-servlets | /src/main/resources/migration.sql | UTF-8 | 521 | 3.34375 | 3 | [] | no_license | create table users
(
id serial not null
constraint user_pk
primary key,
login varchar(100),
password varchar(200)
);
create table ticket
(
id serial not null
constraint ticket_pk
primary key,
name varchar(100),
description text,
... | true |
789f5973a707aeb069523837299170baca5566a2 | SQL | MohammadRasool-Shaik/FastFood | /src/main/resources/schema.sql | UTF-8 | 992 | 3.359375 | 3 | [] | no_license | drop table item if exists;
create table item (item_id int generated by default as identity (start with 1) PRIMARY KEY, item_name varchar(50),
item_type varchar(10) not null, quantity integer, item_price double);
drop table user if exists;
create table user (user_id int ... | true |
1b34c4c2bba954adadc67d182550ae987124ffe8 | SQL | CDRobinsonIII/employee-tracker-node-mysql | /db/seed.sql | UTF-8 | 787 | 3.125 | 3 | [
"MIT"
] | permissive | USE employees_DB;
INSERT INTO department
(name)
VALUES
('Sales'),
('Engineering'),
('Finance'),
('Legal');
INSERT INTO role
(title, salary, department_id)
VALUES
('Sales Lead', 100000,1),
('Salesperson', 80000,1),
('Lead Engineer', 150000, 2),
('Software Engineer', 120000, 2),... | true |
cb8e2cd3c43be77f74bf2fe34cd0183b9da4bcea | SQL | RazwanTanvir/SocialSitePHPPractice | /socialsite.sql | UTF-8 | 3,019 | 3.015625 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.6.5.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Aug 04, 2017 at 10:27 AM
-- Server version: 10.1.21-MariaDB
-- PHP Version: 5.6.30
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SE... | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.