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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
33ac4e5bfc4fe9a87aa1cbb4531d92bf4d9aaf3a | SQL | cabo622/prueba | /src/sql/database.sql | UTF-8 | 287 | 3.015625 | 3 | [] | no_license | CREATE DATABASE proyecto;
USE proyecto;
CREATE TABLE news (
id_news INT NOT NULL PRIMARY KEY AUTO_INCREMENT,
title VARCHAR(100),
news TEXT,
data_created TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);
INSERT INTO news (title, news) values ('Primera', 'Noticia');
SELECT * FROM news;
| true |
063f738326876aa7b5b650de756b8a31ad46c1d8 | SQL | rensiarteaga/sis_segproyecto | /base/patch000001.sql | UTF-8 | 10,367 | 3.453125 | 3 | [] | no_license |
/***********************************I-SCP-YAC-SP-0-13/02/2017****************************************/
CREATE TABLE sp.tactividad (
id_actividad SERIAL NOT NULL,
actividad VARCHAR(150),
id_actividad_padre INTEGER,
PRIMARY KEY(id_actividad)
) INHERITS (pxp.tbase)
WITH (oids = false);
/*********... | true |
3a000d51349cb748b4002629ee7da8a1bf761afb | SQL | lucaburatti7/A00-Training-plan | /Mainframe Training/HISOFT/Hisoft Training/DEV_FOLDER/SERVER/SQL文/KOK_HSMKN.SQL | SHIFT_JIS | 1,279 | 2.828125 | 3 | [] | no_license | CREATE TABLE KOK_HSMKN
(
ڋqR[h CHAR(6) NOT NULL,
菈R[h CHAR(2) NOT NULL,
O[vR[h CHAR(8) NOT NULL,
R[h CHAR(8) NOT NULL,
[U[R[h CHAR(8) NOT NULL,
O[v_ CHAR(6) NOT NULL,
O[v_c NUMBER(13... | true |
44a9de995c7b38ae24a77cf61dc1e181df8b612f | SQL | atsid/playflow | /conf/evolutions/default/1.sql | UTF-8 | 6,884 | 3.703125 | 4 | [
"Apache-2.0"
] | permissive | # --- Created by Ebean DDL
# To stop Ebean DDL generation, remove this comment and start using Evolutions
# --- !Ups
create table factory (
id bigint not null,
is_active boolean default true not null,
name varchar(255) not null,
description ... | true |
a0cd293264716b9995d203dc52884a74cda6416a | SQL | reyjrar/DreamCatcher | /sql/schema/install/plugins/zone_discovery/zone.sql | UTF-8 | 523 | 3.703125 | 4 | [
"BSD-3-Clause"
] | permissive | CREATE TABLE "zone"
(
id bigserial NOT NULL,
"name" TEXT NOT NULL,
path ltree NOT NULL,
reference_count BIGINT DEFAULT 0,
first_ts TIMESTAMP WITHOUT TIME ZONE DEFAULT NOW(),
last_ts TIMESTAMP WITHOUT TIME ZONE DEFAULT NOW(),
CONSTRAINT zone_pki_id PRIMARY KEY (id),
CONSTRAINT zone_uniq_name UNIQUE (name... | true |
13ddb6026ce4312525e11a0cc5de730d921c60f6 | SQL | fruscil/AFScripts | /DDL_Split_From_Terry/EMOC3_Script-20140219100142_converted/Stored_Procedures/SP_emoc3.remove_aircraft_history.sql | UTF-8 | 1,162 | 2.953125 | 3 | [] | no_license | --<ScriptOptions statementTerminator="@"/>
CREATE PROCEDURE "EMOC3"."REMOVE_AIRCRAFT_HISTORY" (
aircraftidin history.aircraftid%TYPE
)
AS
CURSOR history_cur
IS
SELECT historyid, eventdate, elementvalue, userid, aircraftid, ELEMENT,
transactionid
FROM history
WHERE ... | true |
4c23a986f20817b14546a201637e950ab9c6c78e | SQL | ReneNyffenegger/about-sqlite | /sql/explain/explain_query_plan-columns.sql | UTF-8 | 810 | 3.625 | 4 | [] | no_license | create table tq84_eqp_A (
id integer primary key,
col1 text,
col2 text
);
create table tq84_eqp_B (
id integer primary key,
col1 text,
col2 text
);
create table tq84_eqp_A2B (
id_A integer references tq84_eqp_A,
id_B integer references tq84_eqp_B,
col1 text,
col2 text
);
... | true |
e0270333cc55a3922c655b3f90a290b9392404f8 | SQL | Krypt0n9/superast | /sql/realtime.sql | UTF-8 | 7,837 | 2.71875 | 3 | [] | no_license | DROP DATABASE IF EXISTS `asteriskrealtime`;
CREATE DATABASE `asteriskrealtime`;
USE `asteriskrealtime`;
CREATE TABLE `sip_buddies` (
`id` int(11) NOT NULL auto_increment,
`name` VARCHAR(80) NOT NULL,
`callerid` VARCHAR(80) DEFAULT NULL,
`DEFAULTuser` VARCHAR(80) NOT NULL,
`regexten` VARCHAR... | true |
1314a9429b885542ef9dc03e48684c4a2ebca53f | SQL | DIBASSI/ZEUS | /ETL/etl-framework-master (5)/etl-framework-master/Postgres SQL Scripts/Date Dimension/CREATE TABLE DimDate Step 1.sql | UTF-8 | 1,147 | 3.171875 | 3 | [
"MIT"
] | permissive | --Create dw Schema first!
--Do something about the lower case.
--Spreadsheet calculates leap year dates poorly.
DROP TABLE IF EXISTS dw.DimDate;
CREATE TABLE dw.DimDate
(
DateCK BIGINT NOT NULL,
FullDate VARCHAR(10) NOT NULL,
DateName VARCHAR(10) NOT NULL,
DayOfWeek INT NOT NULL,
DayNameOfWeek VARCHAR(9) NOT N... | true |
0b13bfce7afadaede472e4b44b3052966a4d6134 | SQL | gntstart/hz2004qxgl_idea | /补丁/20170301跨地市迁移补丁/脚本/跨地区户籍迁移.sql | UTF-8 | 1,463 | 3.09375 | 3 | [] | no_license | -- Add/modify columns
alter table HJYW_QCZXXXB add KDQQY_DQBM VARCHAR2(20);
alter table HJYW_QCZXXXB add KDQQY_YHM VARCHAR2(40);
-- Add comments to the columns
comment on column HJYW_QCZXXXB.KDQQY_DQBM
is '跨地区迁移地区';
comment on column HJYW_QCZXXXB.KDQQY_YHM
is '跨地区迁移用户名';
-- Create/Recreate indexes
create index I... | true |
8ce15bf40ca3293d96a23d0b521860159e8e4986 | SQL | jodehavi/azureunleashed | /Fabrikam-Bookstore/dbscripts/books.sql | UTF-8 | 383 | 2.796875 | 3 | [] | no_license | CREATE DATABASE fabrikam_bookstore
USE fabrikam_bookstore
CREATE TABLE `books` (
`id` INT NOT NULL AUTO_INCREMENT,
`isbn` VARCHAR(100) NULL,
`title` VARCHAR(200) NULL,
`author` VARCHAR(200) NULL,
`publisher` VARCHAR(200) NULL,
`image` VARCHAR(45) NULL,
`price` DECIMAL(10, 2) NULL,
`updated_at` TIMEST... | true |
c0802fb686c4b956fd1a6993968c1eb097e92909 | SQL | ienglehart/employee-tracker | /db/schema.sql | UTF-8 | 732 | 3.875 | 4 | [
"MIT"
] | permissive | DROP DATABASE IF EXISTS employees;
CREATE DATABASE employees;
USE employees;
CREATE TABLE department (
id INTEGER PRIMARY KEY,
name VARCHAR(30) NOT NULL
);
CREATE TABLE employee (
id INTEGER PRIMARY KEY,
first_name VARCHAR(30) NOT NULL,
last_name VARCHAR(30) NOT NULL,
role_id INTEGER,
manager_id INT... | true |
ba27b202b9039cd91216e15bda5c6ab2093e1c5a | SQL | mtnpreiss/sql_scripts | /unstable_plans.sql | UTF-8 | 2,694 | 3.71875 | 4 | [] | no_license | -- -----------------------------------------------------------------------------
-- unstable_plans.sql
-- shows information on queries with changed plans and increased runtime
-- in the scope of AWR-History
-- based on Kerry Osborne's script:
-- http://kerryosborne.oracle-guy.com/scripts/unstable_plans.sql
-- ---------... | true |
1eb2d38d42d3696d7f471aede0387508173c7c78 | SQL | jpirnat/dex | /sql/schema/dex/species_habitats.sql | UTF-8 | 385 | 3.53125 | 4 | [] | no_license | create table if not exists `species_habitats`
(
`species_id` smallint unsigned not null,
`habitat_id` tinyint unsigned not null,
primary key (
`species_id`,
`habitat_id`
),
foreign key (`species_id`) references `species` (`id`)
on delete restrict
on update cascade,
foreign key (`habitat_id`) references `habitats` ... | true |
0c2e3e385b8d3543429eceff34042ff82ec69214 | SQL | supun151515/casualJobsProject | /SQL File/casualjobs.sql | UTF-8 | 62,295 | 3.453125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Oct 08, 2020 at 12:12 AM
-- Server version: 10.4.13-MariaDB
-- PHP Version: 7.4.7
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIEN... | true |
d19f2daed1497bf375f34ac08a0d54bc563a936d | SQL | WilliamLP/AdventOfCode | /2022/day18.sql | UTF-8 | 840 | 4.0625 | 4 | [] | no_license | WITH cubes AS (
SELECT split_part(input, ',', 1)::int as x,
split_part(input, ',', 2)::int as y,
split_part(input, ',', 3)::int as z
FROM day18
), free_sides AS (
SELECT COALESCE(z - LAG(z) OVER xy, 0) != 1 AS z1,
COALESCE(LEAD(z) OVER xy - z, 0) != 1 AS z2,
COALESCE(y - LAG(... | true |
076ec928206d48520e14a24f14ba23e4a3b0ef9d | SQL | seohyeon0072/Javaproject | /BoardProject/mysql.sql | UTF-8 | 550 | 2.84375 | 3 | [] | no_license | create table member (
member_id varchar(20) not null primary key,
member_pw varchar(20) not null,
member_name varchar(20) not null,
member_phone varchar(30),
member_email varchar(50)
);
drop table member ;
CREATE TABLE board (
b_num INT PRIMARY KEY AUTO_INCREMENT,
b_category VARCHAR(20) NOT NULL,
b_tit... | true |
4f747425c21ebf718aba32bbe36fc9fae5f75a5f | SQL | NANDEESWARAN-M/crm | /electrokleen (1).sql | UTF-8 | 23,009 | 3.09375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 3.3.9
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Dec 01, 2018 at 11:19 AM
-- Server version: 5.5.8
-- PHP Version: 5.3.5
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SE... | true |
62fad4eb0a608b1ee366c48f187df9327fd9438c | SQL | vgulaev/Lections | /20150427 Oracle PL SQL/day 3/query_plan.sql | UTF-8 | 213 | 3.0625 | 3 | [] | no_license | explain plan for
select *
--from CLIENTDEBT
--LEFT JOIN OURCLIENTS on OURCLIENTS.ID = CLIENTDEBT.CLIENTID;
from BILLSUM, OURCLIENTS
where OURCLIENTS.ID = BILLSUM.CLIENTID;
select * from table(dbms_xplan.display); | true |
5f321b9e22663b2b0c1ffc7f0a19cac1516c09c3 | SQL | ingridsl/TransactSQL-Training | /LAB4.sql | UTF-8 | 2,865 | 3.890625 | 4 | [] | no_license | -- lab 04 https://github.com/MicrosoftLearning/QueryingT-SQL/blob/master/Labs/Lab04.pdf
-- challenge 1
-- 1
SELECT * FROM SALESLT.ADDRESS;
SELECT * FROM SALESLT.CUSTOMER;
SELECT * FROM SALESLT.CUSTOMERADDRESS;
SELECT C.COMPANYNAME, A.ADDRESSLINE1, A.CITY, 'Billing' AS AddressType
FROM SALESLT.CUSTOMERADDRESS AS CA
JOI... | true |
c293568ba22b7cb06b96c8d167a903fc48896b97 | SQL | antonio-decaro/US_UniSeat | /sql/create_schema.sql | UTF-8 | 1,785 | 3.734375 | 4 | [
"Apache-2.0"
] | permissive | DROP SCHEMA IF EXISTS UniSeatDB;
CREATE SCHEMA UniSeatDB;
USE UniSeatDB;
CREATE TABLE IF NOT EXISTS Utente
(
nome VARCHAR(20) NOT NULL,
cognome VARCHAR(20) NOT NULL,
email VARCHAR(48) NOT NULL,
password VARCHAR(256) NOT NULL,
tipo ENUM ('STUDENTE', ... | true |
2e71f0b8fe81fa3ec24b0d7f13b0455b12e85db4 | SQL | thangduong3010/PL-SQL | /Script/rdbms_admin/cataqsch.sql | UTF-8 | 34,317 | 2.671875 | 3 | [] | no_license | Rem
Rem $Header: rdbms/admin/cataqsch.sql /main/17 2010/01/11 13:39:50 rmao Exp $
Rem
Rem cataqsch.sql
Rem
Rem Copyright (c) 2006, 2010, Oracle and/or its affiliates.
Rem All rights reserved.
Rem
Rem NAME
Rem cataqsch.sql - <one-line expansion of the name>
Rem
Rem DESCRIPTION
Rem AQ dictionary objects... | true |
b7eddbf1d44e562093e3e15e770ed8ccf5f4a357 | SQL | chriskang24/BootcampX | /2_queries_joins/2_cohorts_total_assignment_submission.sql | UTF-8 | 766 | 4.3125 | 4 | [] | no_license | -- Get the total amount of time that all students from a specific cohort have spent on all assignments.
-- This should work for any cohort but use FEB12 for now.
-- Select only the total amount of time as a single column.
-- You can write as many JOIN statements as you need in a single query. Expected Result:
SELECT ... | true |
4ab668d631d43806689137ea9bdd94af9f7aa7d4 | SQL | AmaniYunge/inventory | /sinza_sale/database/new db/bank_name.sql | UTF-8 | 671 | 2.546875 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 2.10.1
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: May 31, 2014 at 03:40 PM
-- Server version: 5.0.37
-- PHP Version: 5.2.2
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
--
-- Database: `moshi_db`
--
-- -------------------------------------------... | true |
2eeeca9826b6013167ab767e7cf6b8a827f7253a | SQL | MauGutierrez/finalProjectWebClass | /data/querys.sql | UTF-8 | 1,107 | 3.078125 | 3 | [] | no_license | # Query to create the database
CREATE DATABASE parkingtec;
# Query to create tables for users registration and user comments
CREATE TABLE users (
firstName VARCHAR(100) NOT NULL,
lastName VARCHAR(100) NOT NULL,
email VARCHAR(100) NOT NULL,
idNumber VARCHAR(100) NOT NULL,
parkingSpace Varchar(100) NOT NUL... | true |
13e3e528262b46acdaedfc66985ab5d92610f326 | SQL | JanisLV/SQL-databases | /examples/view.sql | UTF-8 | 204 | 3.359375 | 3 | [] | no_license | CREATE VIEW employees_with_dept_name AS
SELECT
employees.*,
departments.name AS department_name
FROM
employees
LEFT JOIN
departments USING(id_departments);
SELECT * FROM employees_with_dept_name; | true |
ac8bebb885beb3dab531b58c3214875f4d381f5b | SQL | kobatastu/09_submit | /good_table.sql | UTF-8 | 1,799 | 3.1875 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.8.5
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Generation Time: 2019 年 6 月 27 日 16:21
-- サーバのバージョン: 10.1.38-MariaDB
-- PHP Version: 7.3.4
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACT... | true |
0fcb293ba894ff6202574e05e99b84bc2a82d90b | SQL | kevinmiles/instrumentation | /db/sp/sp_temperature_get_desc.sql | UTF-8 | 381 | 3.40625 | 3 | [] | no_license | drop procedure if exists sp_temperature_get_desc;
DELIMITER //
CREATE PROCEDURE sp_temperature_get_desc
(
IN address varchar(16),
OUT name varchar(100)
)
SQL SECURITY DEFINER
BEGIN
declare address_exists int;
set address_exists = 0;
select t.name
into name
from temperature t
where t.dallas_addre... | true |
b6b1320a11a2eae3b8e2f9f2911258d0fe4d40b6 | SQL | mans00rahmed/Employee.sql | /Employee.sql | UTF-8 | 1,617 | 3.625 | 4 | [] | no_license | CREATE TABLE EMPLOYEEE (
EMP__NO NUMBER(4) CONSTRAINT EMPNOPK PRIMARY KEY,
E__NAME VARCHAR2(10) NOT NULL,
DESIGNATIONN VARCHAR2(10) NOT NULL,
QUALIFICATIONN VARCHAR2(20) NOT NULL,
JOIN__DATE VARCHAR2(10));
CREATE TABLE PROJECTT (
PID VARCHAR2(4) CONSTRAINT PIDPK PRIMARY KEY,
TITLE VARCHA... | true |
44c3fee688cbff7ecb82ff10bb089f6c82d84066 | SQL | pavanhp001/Spring-boot-proct | /Spring-proctice/src/SCenter/Order-Managment-wildfly/Database/Postgres/transactional/verify/v1071782013_08_28_job_tuning.sql | UTF-8 | 495 | 2.578125 | 3 | [] | no_license | SELECT '1' AS Expected, COUNT(*) AS Actual FROM DUAL WHERE (SELECT INDEX_NAME FROM ALL_INDEXES WHERE INDEX_NAME ='OMJOB_RESPARENT_IDX01') in ('OMJOB_RESPARENT_IDX01');
SELECT '1' AS Expected, COUNT(*) AS Actual FROM DUAL WHERE (SELECT INDEX_NAME FROM ALL_INDEXES WHERE INDEX_NAME ='OMJOB_EXTID_IDX01') in ('OMJOB_EXTI... | true |
20d8dfb470ec7ef58235225d82217a3b75ce8a2d | SQL | Marjukka-P/henkkis | /tietokannat/henkilotiedot.sql | UTF-8 | 5,566 | 3.375 | 3 | [] | no_license |
DROP DATABASE IF EXISTS henkilotiedot;
CREATE DATABASE henkilotiedot DEFAULT CHARACTER SET utf8 COLLATE utf8_swedish_ci;
USE henkilotiedot;
DROP TABLE IF EXISTS Yhteystiedot;
CREATE TABLE Yhteystiedot(
osoiteID int PRIMARY KEY NOT NULL AUTO_INCREMENT,
katuosoite varchar(100),
postinumero varchar(5), ... | true |
96607bfbc8f30c0f99d3dc979a32b1905bcbe916 | SQL | halflite/modern-servlet-example | /api/db/migration/V2_1_1__insert_account.sql | UTF-8 | 509 | 2.515625 | 3 | [
"MIT"
] | permissive | LOCK TABLES `account` WRITE;
/*!40000 ALTER TABLE `account` DISABLE KEYS */
;
INSERT
INTO `account`
VALUES (
1
, 'testuser1@example.com'
, '81dc9bdb52d04dc20036dbd8313ed055'
, 'てすとゆーざー壱号'
, 'ENABLED'
, '2019-02-01 00:00:00'
, '2019-02-01 00:00:00'
)
, (
2
, 'testuser2@example.com'
, '674f3c... | true |
3da18bafcf655dbaef07a803e691bb652f1ab7e5 | SQL | ppalani09/sql-challenge | /EmployeeSQL/queries.sql | UTF-8 | 1,761 | 4.375 | 4 | [] | no_license | -- Question 1
SELECT employees.emp_no, employees.last_name, employees.first_name, employees.sex, salary.salary
FROM employees
LEFT JOIN salary ON employees.emp_no = salary.emp_no;
-- Question 2
SELECT first_name, last_name, hire_date
FROM employees
WHERE hire_date BETWEEN '1986-01-01' AND '1986-12-31';
-- Question 3
... | true |
3050ad15e173944354016ca261f07a2da38588a9 | SQL | matteomalvezzi/AbdulManager | /resource/db/database_export.sql | UTF-8 | 6,256 | 3.109375 | 3 | [] | no_license | -- MariaDB dump 10.19 Distrib 10.5.9-MariaDB, for Win64 (AMD64)
--
-- Host: localhost Database: abdulmanager
-- ------------------------------------------------------
-- Server version 10.5.9-MariaDB
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACT... | true |
bd00c10b76d89b8189416f78ff21e2aef539b1fb | SQL | rayhannovelo/CRM-Transportasi | /crm-transportasi.sql | UTF-8 | 9,517 | 3.203125 | 3 | [
"LicenseRef-scancode-unknown-license-reference",
"MIT"
] | permissive | -- phpMyAdmin SQL Dump
-- version 4.6.5.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Feb 09, 2019 at 01:08 PM
-- Server version: 10.1.21-MariaDB
-- PHP Version: 5.6.30
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SE... | true |
4160c2706835346ac062cf46de954c6be197e67c | SQL | gordonje/missourian_analytics | /sql/select_short_urls.sql | UTF-8 | 322 | 3.125 | 3 | [] | no_license |
SELECT DISTINCT link
FROM messages_links
WHERE (
link LIKE '%bit.ly%'
OR link LIKE '%bitly%'
OR link LIKE '%trib.al%'
OR link LIKE '%tribal%'
OR link LIKE '%ow.ly%'
OR link LIKE 'http://t.co%'
)
AND link NOT IN (SELECT short_url FROM short_to_full_urls)
ORDER BY link... | true |
3cee719df06095614a57d567f5b634834da5df38 | SQL | AimeeLiu01/SQL | /50questions/31.sql | UTF-8 | 110 | 3 | 3 | [] | no_license | select sc.sid, student.sname from sc, student
where sc.cid = '01' and sc.score >= 80
and sc.sid = student.sid; | true |
6b41986271cd39897d92d6e664f4bcbed383eaa5 | SQL | Racmo/SQL-Exercises | /Lesson 10/exceptions.sql | UTF-8 | 2,322 | 3.90625 | 4 | [] | no_license | --SQL Wyjątki
--1
declare
cursor etaty(v_etat pracownicy.etat%TYPE) is select nazwisko from pracownicy where etat=v_etat;
etat_zmienna pracownicy.etat%TYPE;
test pracownicy.etat%TYPE;
begin
etat_zmienna:='&Podaj_etat';
select distinct etat into test from pracownicy where etat=etat_zmienna;
for c in etaty(etat_zmi... | true |
f4f9f36b3bb17e891692108a32f4fcead3684922 | SQL | BCSDLab/KOIN_API | /src/main/resources/db/migration/V5__create_semester_table.sql | UTF-8 | 236 | 2.84375 | 3 | [] | no_license | CREATE TABLE `koin`.`semester` (
`id` INT UNSIGNED NOT NULL,
`semester` VARCHAR(10) NOT NULL,
PRIMARY KEY (`id`),
UNIQUE INDEX `semester_UNIQUE` (`semester` ASC))
ENGINE = InnoDB
DEFAULT CHARACTER SET = utf8
COLLATE = utf8_bin;
| true |
490e9d58b824bbfea4d091a156b72703563ed179 | SQL | cdesmarais/WebDB-Test | /WebDB/StoredProcedures/Common/dbo.DNGiftGetGifts.PRC | UTF-8 | 777 | 3.96875 | 4 | [] | no_license | if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[DNGiftGetGifts]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
drop procedure [dbo].[DNGiftGetGifts]
GO
CREATE PROCEDURE dbo.DNGiftGetGifts
(
@points int
)
As
SET NOCOUNT ON
set transaction isolation level read uncommitted
SELECT distinct g.Gif... | true |
91ab40f23a254b17b4aa8375d1cc4a283368e281 | SQL | tanak/patriot-workflow-scheduler | /misc/sqlite3.sql | UTF-8 | 2,065 | 3.5625 | 4 | [
"Apache-2.0"
] | permissive | -- jobs
DROP TABLE IF EXISTS `jobs`;
CREATE TABLE `jobs` (
`id` integer PRIMARY KEY AUTOINCREMENT NOT NULL,
`job_id` varchar(255) NOT NULL UNIQUE,
`job_def_id` varchar(255),
`update_id` integer NOT NULL,
`state` tinyint NOT NULL,
`content` text,
`start_after` datetime,
`node` varchar(255),
`ho... | true |
4b02e4818af9d423bfebbd84220009696a660282 | SQL | ElifKarakutukDinc/dvd_rental | /story_telling_2/total_payment_distrubution_of_customers_by_countries.sql | UTF-8 | 436 | 4.09375 | 4 | [] | no_license | --Total Payment Distrubution of Customers by Countries
select country, count(c.customer_id), sum(amount)
from customer as c
inner join address as a on (c.address_id=a.address_id)
inner join city on (city.city_id=a.city_id)
inner join country on (country.country_id=city.country_id)
inner join rental as r on (c.customer... | true |
8b33814c836c61a432b94819c788d60168a6f3c1 | SQL | librar127/PythonDS | /Leetcode/SQL/Easy/1484.sql | UTF-8 | 235 | 3.359375 | 3 | [] | no_license | # Write your MySQL query statement below
SELECT
SELL_DATE,
COUNT(DISTINCT ProDUCT) num_sold,
GROUP_CONCAT(DISTINCT ProDUCT ORDER BY ProDUCT) AS products
FROM
Activities
GROUP BY
SELL_DATE
ORDER BY
SELL_DATE | true |
0fa19bc0c1e442481ff8b01a62d5eada9b42ae07 | SQL | 2p-offer/dynamicDataSource-JPA | /sql/dynamic_02.sql | UTF-8 | 6,225 | 3.046875 | 3 | [] | no_license | /*
Navicat MySQL Data Transfer
Source Server : localhost
Source Server Version : 50732
Source Host : localhost:3306
Source Database : dynamic_02
Target Server Type : MYSQL
Target Server Version : 50732
File Encoding : 65001
Date: 2021-09-11 19:13:08
*/
SET FOREIGN_KEY_CHECKS=0;
-... | true |
30ce94f81f977f9c4566f1ceb2288188ac85a053 | SQL | jkim3743/Employee-Database-in-SQL | /EmployeeSQL/queries.sql | UTF-8 | 3,264 | 4.78125 | 5 | [] | no_license | -- #1 List the following details of each employee:
-- employee number, last name, first name, sex, and salary.
SELECT employees.emp_no as "Employee #", employees.last_name as "Last name",
employees.first_name as "First name", employees.sex, salaries.salary
from employees
JOIN salaries ON salaries.emp_no = employee... | true |
45076f13198eb02859e06a4044ce24f7f4daa7a9 | SQL | google-code-export/isnet | /dbscript/tutorial/tutorial_schema.sql | UTF-8 | 6,684 | 3.390625 | 3 | [] | no_license | ALTER TABLE TEST_TUTORIAL_DOCUMENT
DROP PRIMARY KEY CASCADE;
DROP TABLE TEST_TUTORIAL_DOCUMENT CASCADE CONSTRAINTS;
CREATE TABLE TEST_TUTORIAL_DOCUMENT
(
TEST_TUTORIAL_DOCUMENT_ID NUMBER NOT NULL,
DOCUMENT_NAME VARCHAR2(500 BYTE),
DOCUMENT_INTRO_AUDIO BLOB,
DOCUMENT_IN... | true |
8ecbf5706d143fb4bfa2002e18363b8c29864080 | SQL | tman2796/AdvancedDatabases-UPS-DB | /Simmons_Travis_Ch7_ProblemSet.sql | UTF-8 | 1,178 | 4.28125 | 4 | [] | no_license | --Ch7P1
SELECT job_id "Job Title", TO_CHAR(MAX(salary),'$999,999') "Highest", TO_CHAR(MIN(salary), '$999,999') "Lowest", TO_CHAR(SUM(salary), '$999,999') "Total", COUNT(job_id) "Number of Employees"
FROM employees
GROUP BY job_id
HAVING COUNT(job_id) > 1
ORDER BY job_id;
--Ch7P2
SELECT department_id "Department", TO_C... | true |
2f1a1e9bd107112a67d4a3e8ee924d1d4af1d317 | SQL | plamen911/softuni-db-fundamentals | /DatabasesBasics/exams/exam2017-10-22/_18AssignEmployee.sql | UTF-8 | 1,220 | 4 | 4 | [] | no_license | CREATE TABLE `departments` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(50) NOT NULL DEFAULT '',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
INSERT INTO `departments` (`id`, `name`)
VALUES
(1,'Infrastructure'),
(2,'Aged Care'),
(3,'Legal'),
(4,'Emergency'),
(5,'Roads Maintenanc... | true |
ea6b351556b0d0e6e6189a4118ed02b737c3781e | SQL | sumeetmishra199189/Advanced-Database-Concepts | /5.Query Optimization in SQL using RA notation/Assignment5.sql | UTF-8 | 17,452 | 3.265625 | 3 | [] | no_license | CREATE DATABASE SumeetM;
\connect sumeetm;
create table Student(sid integer,sname varchar(15),primary key(sid));
create table Book(bookno integer,title varchar(30),price integer,primary key(bookno));
create table Buys(sid integer,bookno integer,primary key(sid,bookno),foreign key(sid) references Student(sid),foreign ... | true |
1ea3cbd6b92bab9c06526e8eb54bda3b17c4e264 | SQL | trandien/graduate-CanTho | /Sql/tracnghiem(insert dl).sql | WINDOWS-1258 | 14,865 | 3.21875 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.1.12
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Mar 29, 2015 at 07:40 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 |
1153ed882a61f79374e0978f2038d7b2c5e224d2 | SQL | CUBRID/cubrid-testcases | /sql/_17_sql_extension2/_02_full_test/_18_system_parameters/_02_string_max_size_bytes/cases/string_max_size_bytes_001.sql | UTF-8 | 1,326 | 2.953125 | 3 | [
"BSD-3-Clause"
] | permissive | --+ holdcas on;
--test related functions
set system parameters 'string_max_size_bytes=1048576';
select length(space(1048576));
select length(space(1048578));
select length(space(129839238));
select length(repeat('x', 1048576));
select length(repeat(B'1', 1048580));
select length(repeat(N'x', 10485766));
select leng... | true |
d67dab3c4613330e0ee01b68f6a4462f607331f7 | SQL | Jgaherity/Bamazon | /bamazon.sql | UTF-8 | 816 | 3.15625 | 3 | [] | no_license | DROP DATABASE IF EXISTS bamazon;
CREATE database bamazon;
USE bamazon;
CREATE TABLE products (
item_id INT NOT NULL AUTO_INCREMENT,
product_name VARCHAR(200) NOT NULL,
department_name VARCHAR(200) NOT NULL,
price DECIMAL(10,2) NOT NULL,
stock_quantity INT NOT NULL,
PRIMARY KEY (item_id)
);
INSERT INTO p... | true |
8ddf1ed2689f99dac24196f92e2803b32a1c278e | SQL | LWT1118/jd_ecshop | /upgrade.sql | UTF-8 | 7,877 | 3.03125 | 3 | [] | no_license | /* 2016-12-27 */
ALTER TABLE `jd_ecshop`.`ecs_users`
ADD COLUMN `id_card_no` VARCHAR(20) NOT NULL DEFAULT '' COMMENT '身份证号' AFTER `headimg`,
ADD COLUMN `bank_card_no` VARCHAR(30) NOT NULL DEFAULT '' COMMENT '银行卡号' AFTER `id_card_no`,
ADD COLUMN `img_bank_card` VARCHAR(255) NOT NULL DEFAULT '' COMMENT '银行卡正面照' AFTER `... | true |
61fbf00344768e12ce6e8569da132ad19f31e6d1 | SQL | ebwolf/OSM-Tools | /create_database.sql | UTF-8 | 2,162 | 3.921875 | 4 | [] | no_license | -- Borrowed from osmium project --
create table nodes (
id INTEGER PRIMARY KEY,
timestamp TEXT,
user TEXT,
lat REAL CHECK ( lat <= 90 AND lat >= -90 ),
lon REAL CHECK ( lon <= 180 AND lon >= -180 )
);
create index nodes_lat ON nodes ( lat );
create index nodes_lon ON nodes ( lon );
create table n... | true |
f5c8f14ba8d4e5424a45dc4626d9b4c4eeed9681 | SQL | phunhog/CTSA-TIN | /TIN/MINOCA-BAT/tuesday2.psql.sql | UTF-8 | 2,193 | 3.53125 | 4 | [] | no_license | SELECT DISTINCT P.PAT_ID as yy,
I.IDENTITY_ID,
PEH.PAT_ENC_CSN_ID,
PEH.HOSP_ADMSN_TIME,
PEH.HOSP_DISCH_TIME
/*
TO_CHAR(HT.SERVICE_DATE, 'MM/DD/YYYY') AS PROC_DATE,
HT.CPT_CODE AS CPT,
SER.PROV_NAME AS prov_name,
HT.PAT_ENC_CSN_ID,
... | true |
41923651289aa50a402a8ee929fa4b6f521a20aa | SQL | Faizamohamoud/ICS-311-01-Database-Management-Systems | /Homework SQL And Advanced SQL.sql | UTF-8 | 4,819 | 4.6875 | 5 | [] | no_license | #In this assignment, you are asked to design #and #create a Weather database that includes weather reports #on wind #and temperature that were collected eight different stations.
Creating the database #and importing data:
The data to be loaded #in the database #is provided to you #in three CSV files. You will use the... | true |
4fe90bf6f1bf202630cd36c1303be4447f2443d6 | SQL | jam2in/arcus-board | /src/main/resources/schema.sql | UTF-8 | 1,949 | 3.875 | 4 | [] | no_license | CREATE TABLE IF NOT EXISTS `user` (
`id` BIGINT UNSIGNED NOT NULL AUTO_INCREMENT,
`name` VARCHAR(128) NOT NULL,
`created_date` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
`updated_date` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (`id`)
);
CREATE TABLE IF N... | true |
3464cbc9a069843603054e48d04feb1a8c66d25e | SQL | danieldiamond/gitlab-analytics | /transform/snowflake-dbt/tests/zuora/zuora_assert_single_ult_parent.sql | UTF-8 | 1,512 | 4.03125 | 4 | [
"LicenseRef-scancode-unknown-license-reference",
"MIT"
] | permissive | -- This asserts that a Zuora subscription lineage only has a single ultimate parent account in Salesforce
WITH parentage AS (
SELECT *
FROM {{ ref('zuora_subscription_parentage_finish') }}
), zuora_subs AS (
SELECT *
FROM {{ ref('zuora_subscription_xf') }}
), zuora_accts AS (
SELECT *
FROM {{ ref('zuora_a... | true |
31b72ae05d837588b781d297c202d0e29beef83b | SQL | someliang/sxw | /document/sxw.sql | UTF-8 | 5,568 | 3.796875 | 4 | [] | no_license | SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0;
SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0;
SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='TRADITIONAL,ALLOW_INVALID_DATES';
CREATE SCHEMA IF NOT EXISTS `sxw` DEFAULT CHARACTER SET utf8 ;
USE `sxw` ;
-- -------------------------------------... | true |
7081ecbbd2fdf7ff233adf06c9a0b89325c26689 | SQL | prateekbh/mtt | /src/main/sql/schema.sql | UTF-8 | 2,931 | 3.65625 | 4 | [] | no_license | --drop table question, contest, student, volunteer, center, volunteer_auth_token, school, config cascade;
drop table question, contest, student, school, answers, place, answer_sheet cascade;
create table if not exists question (
serial_number SERIAL PRIMARY KEY,
short_desc varchar(20),
answered_correct int... | true |
9e09416bb9869684bc38da5418114471b709b72e | SQL | curbee-by-curbees/curbee-be | /sql/setup.sql | UTF-8 | 1,098 | 3.75 | 4 | [] | no_license | DROP TABLE IF EXISTS users CASCADE;
DROP TABLE IF EXISTS finds CASCADE;
DROP TABLE IF EXISTS spots CASCADE;
DROP TABLE IF EXISTS photos;
CREATE TABLE users (
id BIGINT GENERATED ALWAYS AS IDENTITY PRIMARY KEY,
username TEXT NOT NULL UNIQUE,
password_hash TEXT NOT NULL,
phone_number VARCHAR(15) NOT NULL
);
CREA... | true |
98c42d7a899b47c75805bcf0297ac4f951e007f1 | SQL | cvweiss/skillq | /ddl/sql/skq_users.sql | UTF-8 | 436 | 3.203125 | 3 | [
"MIT"
] | permissive |
DROP TABLE IF EXISTS `skq_users`;
CREATE TABLE `skq_users` (
`userID` varchar(32) NOT NULL DEFAULT '',
`characterID` int(32) DEFAULT NULL,
`dateCreated` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`lastAccess` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
PRIMARY KEY (`userID`),
UNIQUE KEY `username`... | true |
742303d8b4e15b5d8c4a3128547965fcaebe9063 | SQL | MadhumithaVangal/SQL_PLSQL | /crsr.sql | UTF-8 | 542 | 3.171875 | 3 | [] | no_license | set serveroutput on;
DECLARE
key INVM10.KEY_1%TYPE;
brch INVM10.BRANCH_NO%TYPE;
cust INVM10.CUSTOMER_NO%TYPE;
bal INVM10.CURR_BAL%TYPE;
avai INVM10.INT_AVAILABLE%TYPE;
CURSOR INV_CUR IS
select key_1,branch_no,customer_no,curr_bal,int_available from INVM10 ;
BEGIN
OPEN INV_CUR;
LOOP
FETCH INV_CUR INTO... | true |
00b4cc7f64d41b695e4fee77f1e3ecaedbf29bab | SQL | ismallboy/CodeStore | /数据库/Mysql/建表.sql | GB18030 | 3,060 | 3.359375 | 3 | [] | no_license |
-- ----------------------------
-- Table structure for product
-- ----------------------------
DROP TABLE IF EXISTS `product`;
CREATE TABLE `product` (
`Id` varchar(32) NOT NULL COMMENT 'ID',
`ProductName` varchar(255) NOT NULL COMMENT 'Ʒ',
`ProductLogo` varchar(512) NOT NULL COMMENT 'ƷLOGO',
`CompanyId` varch... | true |
ef8547b6892d8ef0ed19556f1a9bb8959828d325 | SQL | CECHitsolctr/StudentSuccessDashboard | /src/SSD.Integration.Database/SSD/StoredProcedures/CountRecords.sql | UTF-8 | 429 | 2.96875 | 3 | [] | no_license | CREATE PROCEDURE [SSD].[CountRecords]
--ALTER PROCEDURE [SSD].[CountRecords]
AS
BEGIN
Select 'Items in SSD' as 'Place'
, (Select count(*) from [SSD].[Student]) as 'Students'
, (Select count(*) from [SSD].[School]) as 'Schools'
, (Select count(*) from [SSD].[Teacher]) as 'Teacher'
, (Select count(*) ... | true |
82d096487a9733c7c5312864afcd6c9fbf01787c | SQL | jhonner72/plat | /BusinessProc-Dev/lombard-integration/lombard-integration-store-impl/src/main/resources/for_value_seed-schema.sql | UTF-8 | 221 | 2.609375 | 3 | [] | no_license | CREATE TABLE IF NOT EXISTS REF_FOR_VALUE(
ID INT NOT NULL PRIMARY KEY,
BSB NVARCHAR(6),
ACC NVARCHAR(17),
DOCUMENT_TYPE NVARCHAR(10),
);
CREATE UNIQUE INDEX IF NOT EXISTS IDX_REF_FOR_VALUE ON REF_FOR_VALUE (ID);
| true |
98364013056661a539f30d43081e3514f93cbd07 | SQL | radtek/abs3 | /sql/mmfo/bars/Table/tmp_lics_elpay.sql | UTF-8 | 5,058 | 2.625 | 3 | [] | no_license |
PROMPT =====================================================================================
PROMPT *** Run *** ========== Scripts /Sql/BARS/Table/TMP_LICS_ELPAY.sql =========*** Run **
PROMPT =====================================================================================
PROMPT *** ALTER_POLICY_INFO... | true |
9456ccf22b70ebff8ded91a7858875ef1652ec7e | SQL | silence-do-good/stress-test-Postgres-and-MySQL | /dump/high/day23/select1229.sql | UTF-8 | 178 | 2.671875 | 3 | [] | no_license |
SELECT timeStamp, temperature FROM ThermometerOBSERVATION o
WHERE timestamp>'2017-11-22T12:29:00Z' AND timestamp<'2017-11-23T12:29:00Z' AND temperature>=27 AND temperature<=33
| true |
0f518ae8317edaa1dd0e661581fe414ff230c49e | SQL | arinssanghi/factory-information-management | /Factory Statistics/factory.sql | UTF-8 | 1,456 | 3.484375 | 3 | [] | no_license | create database factorystatistics
create table Registeration
(fname varchar(30) not null,
fcode varchar(10) primary key,
ftype varchar(15) not null,
fprocess varchar(15) not null,
workersnum int not null,
area varchar(5) not null,
dor varchar(10) not null,
hospital varchar(5) not null,
canteen varchar(5) not null,
amb... | true |
4f9b30e4ed8cf2f80b0c2e7c5274cf2506cfc189 | SQL | pdvmoto/pg_scripts | /pg_invent.sql | UTF-8 | 2,434 | 3.109375 | 3 | [] | no_license |
/*==============================================================================
* Filename : PostgreSQLInventory.psql
* Type :
* Keywords :
*==============================================================================
* Author : Celia Muriel
* Version : 0.1
* Date : 2019-11-08
*... | true |
1ef0b1d3eda7a95277fd87e193052a6d7cb0a54d | SQL | shirokun20/share_codeigniter | /ajax_jq_wt_bootstrap/ci_version/db/sampel_database.sql | UTF-8 | 3,407 | 3.703125 | 4 | [
"MIT"
] | permissive | /*
Navicat Premium Data Transfer
Source Server : Local
Source Server Type : MariaDB
Source Server Version : 100136
Source Host : localhost:3306
Source Schema : sampel_database
Target Server Type : MariaDB
Target Server Version : 100136
File Encoding : 65001
Date: 12/... | true |
a9709c88edaaa09a917e6b4c40eeeaa47385a271 | SQL | hkfuertes/eventus | /data/sql/lib.model.schema.sql | UTF-8 | 5,193 | 3.671875 | 4 | [] | no_license |
# This is a fix for InnoDB in MySQL >= 4.1.x
# It "suspends judgement" for fkey relationships until are tables are set.
SET FOREIGN_KEY_CHECKS = 0;
#-----------------------------------------------------------------------------
#-- sf_guard_user_profile
#----------------------------------------------------------------... | true |
f5ca703f3ac097186cae555c45db1725b023ac1f | SQL | SonalSingh93/SafeStay | /SafeStay.sql | UTF-8 | 13,698 | 3.671875 | 4 | [] | no_license | DROP SCHEMA IF EXISTS SafeStay;
CREATE SCHEMA IF NOT EXISTS SafeStay;
USE SafeStay;
DROP TABLE IF EXISTS Requests;
DROP TABLE IF EXISTS Maintains;
DROP TABLE IF EXISTS Comments;
DROP TABLE IF EXISTS Review;
DROP TABLE IF EXISTS Recommendation;
DROP TABLE IF EXISTS Address;
DROP TABLE IF EXISTS EndUsers;
DROP TABLE IF ... | true |
c3128bf6279ee5ef029eceab921ce4ec81060444 | SQL | Inhealthcare/open-inhealthcare | /open-itk-base/src/main/resources/auditdb/SOAPAudit Create.sql | UTF-8 | 489 | 2.8125 | 3 | [
"Apache-2.0"
] | permissive | -- Table: "SOAPAudit"
DROP TABLE "SOAPAudit";
CREATE TABLE "SOAPAudit"
(
id serial NOT NULL,
"timestamp" character(29),
"type" character(12),
"status" character(10),
"conversationId" character(36),
"messageId" character(36),
"creationTime" character(30),
"to" character varying(100),
"action" charact... | true |
21d7b0ac1d2d863a4c37a74769f1d6fdc451fdfe | SQL | ovh/cds | /engine/sql/api/152_template_bulk.sql | UTF-8 | 530 | 3.4375 | 3 | [
"BSD-3-Clause"
] | permissive | -- +migrate Up
CREATE TABLE IF NOT EXISTS "workflow_template_bulk" (
id BIGSERIAL PRIMARY KEY,
user_id BIGINT NOT NULL,
workflow_template_id BIGINT NOT NULL,
operations JSONB
);
SELECT create_foreign_key_idx_cascade('FK_WORKFLOW_TEMPLATE_BULK_USER', 'workflow_template_bulk', 'user', 'user_id', 'id');
SELECT c... | true |
0fc1531730d2f2058c0c256434f9ecb76d39a518 | SQL | datagrok-ai/public | /packages/CDMExplorer/queries/conceptsByIds.sql | UTF-8 | 192 | 2.75 | 3 | [
"LicenseRef-scancode-unknown-license-reference",
"MIT"
] | permissive | --name: conceptsByIds
--connection: Demo:test_queries:PostgresCDM
--input: string ids = in(0) {pattern: int}
select concept_id, concept_name from cdm_synthea_1.concept
where @ids(concept_id);
| true |
cdcde83d80728f1badc0c61256eb18a1c6d3787f | SQL | utcsox/Leetcode-Solutions | /SQL/combine-two-tables.sql | UTF-8 | 152 | 3.140625 | 3 | [] | no_license | SELECT p.FirstName as FirstName, p.LastName as LastName, a.City as City, a.State as State
FROM Person p
LEFT JOIN Address a
on p.PersonID = a.PersonID
| true |
16e6843a3962a2700d5ef12380b48196097c590e | SQL | cogithub/documentos | /dumps/adminsolzul20140725/adminsolzul_cargodet.sql | UTF-8 | 3,160 | 2.921875 | 3 | [] | no_license | CREATE DATABASE IF NOT EXISTS `adminsolzul` /*!40100 DEFAULT CHARACTER SET utf8 */;
USE `adminsolzul`;
-- MySQL dump 10.13 Distrib 5.6.17, for Win32 (x86)
--
-- Host: soporte2 Database: adminsolzul
-- ------------------------------------------------------
-- Server version 5.1.42-community
/*!40101 SET @OLD_CHARA... | true |
39f31d9cb57e08d05326a12e61ba22cf4c73ea26 | SQL | 13679165605/NewSys | /NewSys_0.1/target/classes/sql/barrage_db.sql | UTF-8 | 7,307 | 2.9375 | 3 | [] | no_license | -- MySQL dump 10.13 Distrib 5.7.22, for Win64 (x86_64)
--
-- Host: localhost Database: barrage_db
-- ------------------------------------------------------
-- Server version 5.7.22-log
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS ... | true |
29757e7ac4ca98aed7146e486024a7a0a0fcbc51 | SQL | maheshsabnis/blazejan2021 | /handsOn.sql | UTF-8 | 9,554 | 4 | 4 | [] | no_license | -- Comments
-- Create Database
CREATE database Hospital
-- Use the Database as Default Database for creating Tables/ Views / Stored Procedures
Use Hospital
-- Get the List of all databases
SHOW DATABASES
-- DELETE the database
DROP DATABASE Hospital
-- Create a Table in Hospital Database
-- Step 1: Make sur... | true |
cff182132300ef58ca97e12d277dcef0e95197a5 | SQL | AOzsoylu/plsql-scripts | /sql/dbsize.sql | UTF-8 | 539 | 2.609375 | 3 | [] | no_license | select to_char(sum(bytes)/(1024*1024*1024),'fm99990.00')||' GB Dbf' as sonuc from dba_data_files
union all
select to_char((a.sumb-b.sumb),'fm99990.00')||' GB Used' as sonuc
from (select sum(bytes)/(1024*1024*1024) as sumb from dba_data_files) a,
(select sum(bytes)/(1024*1024*1024) as sumb from dba_free_space) ... | true |
76be7376a470d679dddd2280c4f7c615612454d8 | SQL | TECozens/timesheet-portal-demo | /src/main/resources/schema-test-h2.sql | UTF-8 | 2,802 | 3.765625 | 4 | [] | no_license | SET MODE MySQL;
SET IGNORECASE=TRUE;
-- -----------------------------------------------------
-- Table `user`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `user`
(
`id` int(11) NOT NULL AUTO_INCREMENT,
`username` VARCHAR(45) NOT NULL,
`firstname` VARCHAR(... | true |
ca43473a3cfa5a1460158b9c5337db60346979e9 | SQL | kdyla-griddynamics/Hotel-Multi-Module-Gradle | /HotelRestApp/src/main/resources/data.sql | UTF-8 | 3,262 | 2.75 | 3 | [] | no_license | DROP TABLE IF EXISTS room;
CREATE TABLE room (
number INT PRIMARY KEY,
floor INT NOT NULL,
type VARCHAR NOT NULL,
price INT NOT NULL,
total_size DOUBLE NOT NULL,
booked BOOLEAN NOT NULL,
booked_from DATE,
booked_until DATE,
room_properties VARCHAR NOT NULL
);
INSERT INTO room (number, floor, type, p... | true |
0eb3278349fc7ce65764a186200c7bef81520b96 | SQL | askrana/Oracle_Scripts | /awr_dbtime_trend1.sql | UTF-8 | 11,966 | 3.4375 | 3 | [] | no_license | --formulae based on spawrrac.sql
set ver off pages 50000 lines 140 tab off
accept inst prompt 'Enter instance number (0 or 1,2,3..) : '
accept days_history prompt 'Enter number of days : '
accept interval_minutes prompt 'Enter interval in minutes : '
set linesize 500
col inst for 9
col END_S... | true |
19145b80bbc2ffb5331f7be3b6ba799fe17a5bed | SQL | dakotachantz/postgresql-db | /todo.sql | UTF-8 | 1,216 | 3.796875 | 4 | [] | no_license | -- CREATED TABLE
CREATE TABLE todos
(
id SERIAL PRIMARY KEY,
title VARCHAR(255) NOT NULL,
details TEXT NULL,
priority INTEGER NOT NULL DEFAULT 1,
created_at TIMESTAMP NOT NULL DEFAULT now(),
completed_at TIMESTAMP NULL
);
-- INSERTED TODOS
INSERT INTO todos
(title, priority, created_at)
VALU... | true |
87d78a66cb90dce6c7c241489bab036b42e1d893 | SQL | OliaVM/laravel | /laravel/database/dump/messenger.sql | UTF-8 | 6,035 | 2.96875 | 3 | [
"MIT"
] | permissive | -- phpMyAdmin SQL Dump
-- version 4.7.4
-- https://www.phpmyadmin.net/
--
-- Хост: 127.0.0.1:3306
-- Время создания: Янв 28 2018 г., 13:08
-- Версия сервера: 5.7.19
-- Версия PHP: 5.6.31
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACT... | true |
d9e21fe3285bb6fee494751d58a1751566cf031d | SQL | zvika77/zvika_env | /Mysql/Sql/mysql_dashv2_load_client.sql | UTF-8 | 372 | 2.984375 | 3 | [] | no_license | select job_run_id,job_run_status,start_date,last_update_date,client,run_type,
case when job_run_status = '' then TIMESTAMPDIFF(MINUTE,start_date ,sysdate())
else TIMESTAMPDIFF(MINUTE,start_date ,last_update_date ) end as minutes
,loaded_to_datadog,log_file_path
from insight.dashv2_etl_stats
where client like @1
and ... | true |
aaccab29f032eddc12b2664810e3da07656e0cdb | SQL | merolms/lantern | /x/migrations/sql/20201004_sessions.mysql.sql | UTF-8 | 467 | 3.0625 | 3 | [] | no_license | CREATE TABLE IF NOT EXISTS sessions
(
`id` CHAR(36) CHARACTER SET ascii NOT NULL,
PRIMARY KEY (`id`),
`entity_id` CHAR(36) CHARACTER SET ascii NOT NULL,
`entity_type` INT NOT NULL,
`expires_at` DATETIME NOT NULL,
`created_at` DATETIME ... | true |
a3d2e87de18bad635ceb56e7bc394a4aa61a68b7 | SQL | mdimitris/holidayapp | /epignosis (1).sql | UTF-8 | 4,449 | 3.09375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.7.9
-- https://www.phpmyadmin.net/
--
-- Φιλοξενητής: 127.0.0.1:3306
-- Χρόνος δημιουργίας: 26 Σεπ 2021 στις 07:46:14
-- Έκδοση διακομιστή: 5.7.21
-- Έκδοση PHP: 7.2.4
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101... | true |
d0de9abc0adee5822699e9f054f9cc6b2a029e5a | SQL | SacredCoders/JanSeva | /citizens.sql | UTF-8 | 3,093 | 3.265625 | 3 | [
"Apache-2.0"
] | permissive | -- phpMyAdmin SQL Dump
-- version 4.7.9
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1:3306
-- Generation Time: Aug 11, 2018 at 04:32 PM
-- Server version: 5.7.21
-- PHP Version: 5.6.35
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CH... | true |
a59237f05bb036303a1d65df8e410b86ac59c742 | SQL | liuheping/back | /backend.pinjihui/data/1.0/migrations-sql/00064_alter_table_brand_serieses.sql | UTF-8 | 404 | 2.640625 | 3 | [
"MIT"
] | permissive | -- +goose Up
CREATE TABLE brand_series (
id VARCHAR(32) NOT NULL
constraint brand_series_pkey
primary key,
brand_id VARCHAR(32) NOT NULL,
series VARCHAR(64) NOT NULL,
image VARCHAR(255),
machine_types VARCHAR[] NOT NULL,
sort_order INT NOT NULL DEFAULT 255
);
-- bcsvpsdm54kmvd4pec4g SK250LC brand/2018-... | true |
ac8b73d31defa03e58f8c8f3e0f6c9da19870877 | SQL | dom-mel/DBS | /uebung1/create.sql | UTF-8 | 965 | 3.375 | 3 | [] | no_license | CREATE OR REPLACE TYPE o_gr01_voe AS object (
position number(2),
isbn varchar2(20)
) NOT FINAL;
/
CREATE TYPE nt_gr01_voe AS TABLE OF o_gr01_voe;
/
CREATE OR REPLACE TYPE o_gr01_person AS OBJECT (
name varchar2(30),
vorname varchar2(20),
voe nt_gr01_voe
)
NOT FINAL;
/
CREATE OR REPLACE TYPE o_gr01_buch A... | true |
afbc33e6c352b74848849fb42f1fe35f72a53cd4 | SQL | zhenligod/flink-demo | /flink-sql-client-test/src/main/resources/schema.sql | UTF-8 | 481 | 3.03125 | 3 | [
"MIT"
] | permissive | CREATE TABLE dg
(
id BIGINT,
name STRING,
birthday TIMESTAMP_LTZ
) WITH (
'connector' = 'datagen',
'rows-per-second' = '1'
);
CREATE TABLE KafkaTable WITH (
'connector' = 'kafka',
'topic' = 'test',
'properties.bootstrap.servers' = 'dev:9092',
'properties.group.id' = 'testGroup',
'scan.st... | true |
249d81091e2ee584c6ede36b9d8c6ffafe0e29c8 | SQL | CodeForAfrica/HURUmap-Data | /sql/main_source_of_water_combined.sql | UTF-8 | 49,052 | 2.65625 | 3 | [] | no_license | SET statement_timeout = 0;
SET lock_timeout = 0;
SET client_encoding = 'UTF8';
SET standard_conforming_strings = on;
SELECT pg_catalog.set_config('search_path', '', false);
SET check_function_bodies = false;
SET client_min_messages = warning;
ALTER TABLE IF EXISTS ONLY public.main_source_of_water_combined DROP CONSTRA... | true |
a05b5bbab27bc1dd0bebff6142b5129f7eb1f06a | SQL | koroghli/SLIM-CRUD | /data/scripts/scheme.sqlite.sql | UTF-8 | 533 | 2.953125 | 3 | [
"MIT"
] | permissive | /*////////////////////////////////creation de la base de donnee///////////////////////////////////*/
DROP TABLE IF EXISTS `wines`;
CREATE TABLE `wines` (
`id` INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
`name` VARCHAR(45) DEFAULT NULL,
`year` VARCHAR(45) DEFAULT NULL,
`grapes` VARCHAR(45) DEFAULT NULL,
`coun... | true |
e39cadc8dba190d6a37996e43f36c6175e838f54 | SQL | nandana/wsyld16-morph | /ex2/db.sql | UTF-8 | 188 | 2.703125 | 3 | [] | no_license | DROP SCHEMA IF EXISTS ex1_2;
CREATE SCHEMA ex1_2;
USE ex1_2;
CREATE TABLE Student (
ID integer,
Name varchar(50),
PRIMARY KEY (ID)
);
INSERT INTO Student (ID, Name) VALUES (10, 'Venus');
| true |
4b3ad8bd81f724768f94d50509cefa7ea6e1b0c2 | SQL | vladsuxunun/database | /database/lab8_[Sukhinin]_[Vladislav].sql | UTF-8 | 2,758 | 4.53125 | 5 | [] | no_license | CREATE DATABASE lab8;
CREATE TABLE locations(
location_id serial PRIMARY KEY ,
street_address varchar(25),
postal_code varchar(12),
city varchar(30),
state_province varchar(12)
);
CREATE TABLE departments(
department_id serial PRIMARY KEY ,
department_name varchar(50) unique... | true |
1b8ee6771ca0f543f6dd85662f6337787d38688c | SQL | yaroslav2703/Oracle-Labs | /Лабы/лаба 12/12.sql | WINDOWS-1251 | 5,316 | 4.25 | 4 | [] | no_license | SET serveroutput ON;
--1. TEACHERS BIRTHDAY SALARY,
-- .
ALTER TABLE TEACHER
ADD(
BIRTHDAY DATE NULL,
SALARY DECIMAL(10,2) NULL
);
declare
cursor cur_teacher is select TEACHER,BIRTHDAY, SALARY, PULPIT FROM TEACHER for update;
i int ;
teach teacher.teacher%type;
birth teacher.birthday%type;
sal teacher.sa... | true |
c8dcf2d90093f19aee554c2998c628e6a3dd598e | SQL | orkhanahmadov/hackerrank-solutions | /SQL/Basic Join/Asian Population.sql | UTF-8 | 130 | 3.578125 | 4 | [
"MIT"
] | permissive | SELECT SUM(CITY.POPULATION)
FROM CITY
JOIN
COUNTRY ON CITY.COUNTRYCODE = COUNTRY.CODE
WHERE COUNTRY.CONTINENT = 'Asia' | true |
b5c0599498340ea7b0d2ad672c9e219ea55ed512 | SQL | IrinaGlodeanu/ConDr | /ConDrTw.sql | UTF-8 | 62,069 | 3.015625 | 3 | [
"MIT"
] | permissive | drop table Useri;
drop table Products;
drop table Campaign;
drop table CategCampaign;
drop table ProductProducer;
drop table CampaignCampaignCategory;
drop table support;
drop table avoid;
drop table follow;
drop table supportProductCampaign;
drop table avoidProductCampaign;
drop table statitics;
drop tab... | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.