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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
81b9fc66bf505c70f03c80d948e30e70aff2880b | SQL | GaganRaghunath/QandAForum | /databases/question_answer.sql | UTF-8 | 3,894 | 3.6875 | 4 | [] | no_license | CREATE TABLE IF NOT EXISTS `student_table`(
`srn` varchar(255) NOT NULL PRIMARY KEY,
`name` varchar(255) NOT NULL,
`department` int NOT NULL,
`semester` int NOT NULL,
`section` varchar(2) NOT NULL,
`email` varchar(255) NOT NULL,
`password` varchar(255) NOT NULL,
`security_question` varchar(255) NOT NULL... | true |
43198207dfe3a058afcf6cb87cdbc4d17bfae640 | SQL | pacmaninbw/ExperimentSimpleBkLibInvTool | /ExperimentSimpleBkLibInvTool/devMySql/DB_backup_Dump04122019.sql | UTF-8 | 23,102 | 3.046875 | 3 | [] | no_license | -- MySQL dump 10.13 Distrib 8.0.11, for Win64 (x86_64)
--
-- Host: 127.0.0.1 Database: pacswlibinvtool
-- ------------------------------------------------------
-- Server version 8.0.11
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS... | true |
800b324a949839e7d0bddd4a34a8242573134e29 | SQL | augjun/devops | /APP/FERMAT/SI/11P1/INT/SCRIPT/SQL/drop_worksp.sql | UTF-8 | 285 | 2.765625 | 3 | [] | no_license | --&1: connection string
--&2: workspaces list
connect &1
prompt &2
begin
for cur_wsp in
(
select distinct WORKSPACE_ID from CONTEXTS where CONTEXT_TYPE <> 'B' and To_char(WORKSPACE_ID) not in &2
)
loop
pack_context.drop_workspace(cur_wsp.WORKSPACE_ID);
end loop;
end;
/ | true |
f6fe436ece56f988776d16b17cee715117c389ab | SQL | BlauUCE/InfoClavePHP | /script.sql | UTF-8 | 796 | 2.578125 | 3 | [] | no_license |
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
CREATE TABLE `data` (
`id` int(11) NOT NULL,
`info` varchar(255)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
ALTER TABLE `data`
ADD PRIMARY KEY (`id`);
ALTER TABLE `data`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=1;
INSE... | true |
83807fad8a3c87f74e68b6d6d9d5c08150cadb8d | SQL | DerRustam/WebInterface | /WebView/src/java/SQLScripts/Software_getAll.sql | UTF-8 | 252 | 3.671875 | 4 | [] | no_license | SELECT s.software_id, sc.class_name, p.publisher_name, s.title, s.release_date, s.esrb, s.actual_price
FROM "Software" s
JOIN "Software Class" sc ON s.class_id =sc.class_id
JOIN "Publisher" p ON s.publisher_id = p.publisher_id
ORDER BY s.title; | true |
180be14b5e2981556c01cdcecbba19d78fb7828d | SQL | ldvalle/SALT_STORED | /CasoGenerico/getRutaLectura.sql | UTF-8 | 2,356 | 3.359375 | 3 | [] | no_license | drop procedure get_rutalectura;
CREATE PROCEDURE mi_get_rutalectura(
p_tipo_cliente char(2),
p_sucursal char(4),
p_partido char(3),
p_comuna char(3),
p_cod_calle char(6),
altura char(5))
RETURNING smallint as sector, integer as zona, integer as correlativo_ruta;
DEFINE ret_sector smallin... | true |
a0090144e885b012440ffeadb474e02b9561308c | SQL | silence-do-good/stress-test-Postgres-and-MySQL | /dump/high/day17/select0502.sql | UTF-8 | 177 | 2.625 | 3 | [] | no_license |
SELECT timeStamp, temperature FROM ThermometerOBSERVATION o
WHERE timestamp>'2017-11-16T05:02:00Z' AND timestamp<'2017-11-17T05:02:00Z' AND temperature>=9 AND temperature<=35
| true |
5f8ce20adc070c2dfe6b35c3e99c620826341e94 | SQL | NicholasRFrintz/murach | /SQL Server 2012/Scripts/Chapter 05/Figure 5-02a.sql | UTF-8 | 221 | 3.125 | 3 | [] | no_license | USE AP;
SELECT 'After 9/1/2011' AS SelectionDate, COUNT(*) AS NumberOfInvoices,
AVG(InvoiceTotal) AS AverageInvoiceAmount,
SUM(InvoiceTotal) AS TotalInvoiceAmount
FROM Invoices
WHERE InvoiceDate > '2011-09-01';
| true |
ffc838ef456e5acd6c57f2aa0f41f6696354afcc | SQL | luckypool/lucky-comic | /db-schema/DB_PUBLISHER__.sql | UTF-8 | 352 | 2.78125 | 3 | [] | no_license | CREATE DATABASE comic_publisher;
USE comic_publisher;
DROP TABLE if EXISTS publisher;
CREATE TABLE publisher (
id int unsigned auto_increment NOT NULL,
title varchar(64) NOT NULL,
author varchar(64) NOT NULL,
main_id int unsigned NOT NULL,
updated_on timestamp NOT NULL,
PRIMARY KEY (id)
) ENGIN... | true |
d17381120279eb8762b738de879096a61448fc7c | SQL | dbhage/qasp | /src/sqlstatements/createStatements.sql | UTF-8 | 3,599 | 3.78125 | 4 | [
"BSD-2-Clause"
] | permissive | -- session table
create table session (
sessionid varchar(10) not null,
timeStarted bigint not null,
timeEnded bigint,
primary key (sessionid)
) engine=InnoDB;
-- definition table
create table definition (
defid int not null auto_increment,
trig text not null,
primerep text not null,
... | true |
a1a9650158b5bc4140b124f8a79e45f625fce23e | SQL | jackzerocheng/knowyou | /environments/doc/sql/wx_rules.sql | UTF-8 | 539 | 3.125 | 3 | [] | permissive | create table wx_rules (
id int(11) AUTO_INCREMENT comment '规则ID',
key_word varchar(30) not null default '' comment '需要替换的关键词',
to_word varchar(255) not null default '*' comment '替换目标词',
status tinyint(4) not null default 1 comment '规则状态,1启用',
type tinyint(4) not null default 1 comment '关键词',
created_at time... | true |
8ac86c687fecd64ffd10375498ce1c786fc60990 | SQL | CUBRID/cubrid-testcases | /sql/_14_mysql_compatibility_2/_07_show_statements/_02_show_columns/cases/1004.sql | UTF-8 | 267 | 2.71875 | 3 | [
"BSD-3-Clause"
] | permissive | -- SHOW COLUMNS -- collection types + inner collection
create table tt4 (s1 sequence (integer, char varying, integer));
create table tt5 (s1 set (char varying, integer, double));
show columns from tt4;
show columns from tt5;
drop table tt4;
drop table tt5;
| true |
72f408db21461521c318e8128764466e9afa5e25 | SQL | luohua13/charts-examples | /tsf-region/tsf-mysql/tsf-mysql/mysql/sql/1.0.0/init_tsf_apm.sql | UTF-8 | 3,686 | 3.671875 | 4 | [] | no_license | -- Create tsf_apm schema
DROP SCHEMA IF EXISTS `tsf_apm`;
CREATE SCHEMA `tsf_apm` ;
-- Create Account
DROP USER IF EXISTS `tsf_apm`;
CREATE USER `tsf_apm`@'%' IDENTIFIED BY 'Tcdn@2007';
GRANT ALL PRIVILEGES ON tsf_apm.* TO 'tsf_apm'@'%' IDENTIFIED BY 'Tcdn@2007';
FLUSH PRIVILEGES;
-- Create Tables of tsf_apm
-- TSF_C... | true |
9bd4222151c8ba361b7ccd02234903ddee4c84a6 | SQL | KaigeO/MS-SQL | /Case.sql | ISO-8859-1 | 848 | 3.890625 | 4 | [] | no_license | --USE CASE Col WHEN ???
SELECT CASE PersonID WHEN 5 THEN 'CarriBurney'
WHEN 6 THEN 'MakedaWilbanks'
WHEN 7 THEN 'HeidyFarone'
WHEN 8 THEN 'KarynJanson'
WHEN 9 THEN 'OwenCobos'
END AS PersonName
,Amount,TransactionDate FROM Transactions
WHERE PersonID BETWEEN 5 AND 9
--USE CASE W... | true |
76b8d00f66b294aab231166e71ef907793736728 | SQL | jgarzonext/plsql-testing | /script_plsql/bd_iaxis/script/tables/CODPLANBENEF.sql | ISO-8859-1 | 1,790 | 3.03125 | 3 | [] | no_license | --------------------------------------------------------
-- DDL for Table CODPLANBENEF
--------------------------------------------------------
CREATE TABLE "AXIS"."CODPLANBENEF"
( "CEMPRES" NUMBER(2,0),
"CPLAN" NUMBER(6,0),
"NORDEN" NUMBER(6,0),
"CACCION" NUMBER(3,0),
"CGARANT" NUMBER(4,0),
"NVALOR" ... | true |
c1f31e99e8f0b0cd898faf01b910db3216c3eda3 | SQL | skoleni-wigym/mysql-php | /cviceni/mysql/3-update.sql | UTF-8 | 609 | 3.171875 | 3 | [] | no_license | -- magicky udělej ze všech psíků Corgi
UPDATE `dogs` SET `breed` = 'Corgi';
-- změn Kubíka zpátky na Pitbulla
UPDATE `dogs` SET `breed` = 'Pitbull'
WHERE `name` = 'Kubík';
-- pozor! Pokud vyhovuje podmínce více záznamů, budou změněny všechny
-- změň všechny Bubliny na Vestaje (Vesnické tajemství)
UPDATE `dogs` SET `b... | true |
0fa92fe7f49c346a6d2290fe356a2b99da3aac1b | SQL | larryhe/me | /db/table.sql | UTF-8 | 436 | 3.359375 | 3 | [] | no_license | CREATE TABLE user (
name varchar(30) primary key,
password varchar(30) ,
role varchar(30)
);
CREATE TABLE blog (
id INTEGER PRIMARY KEY AUTOINCREMENT,
title varchar(50),
content text ,
tag int,
created_date varchar(10),
status int, /*1 drafted, 2 published, 3 deleted*/
FOREIGN K... | true |
9909b8cc3138127088aa96b463c9de644f3e683a | SQL | mikepenson/fleamarket1 | /WebRoot/resources/fleamarket1.sql | UTF-8 | 9,923 | 3.015625 | 3 | [] | no_license | /*
Navicat MySQL Data Transfer
Source Server : localhost_3306
Source Server Version : 50505
Source Host : localhost:3306
Source Database : fleamarket1
Target Server Type : MYSQL
Target Server Version : 50505
File Encoding : 65001
Date: 2016-09-27 15:25:36
*/
SET FOREIGN_KEY_CHECKS... | true |
5512b740f82cd45e29a2905288fb298a5a6b2c5c | SQL | coleHafner/colehafner.com | /data/20110208_cms.sql | UTF-8 | 8,938 | 2.875 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 3.2.5
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Feb 09, 2011 at 11:21 PM
-- Server version: 5.1.44
-- PHP Version: 5.3.2
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_S... | true |
4cc3d368dfbacbe42b4dc08b92deaa661d25d43e | SQL | s13009/oracle.test | /141028-1.sql | UTF-8 | 81 | 2.625 | 3 | [] | no_license | select empno,ename,deptno,dname
FROM employees JOIN departments
USING (deptno)
/
| true |
f5c8656a9fd0f8a3a6bcdf9fa9f7b0cdade9901d | SQL | wla312/Storefront | /bamazonSeeds.sql | UTF-8 | 1,965 | 3.765625 | 4 | [] | no_license | -- drops the bamazon_db if it exists currently
DROP DATABASE IF EXISTS bamazon_db;
-- Creates the "bamazon_db" database
CREATE DATABASE bamazon_db;
-- "use" makes it so all of the following code will affect bamazon_db
USE bamazon_db;
-- create the table 'products' within bamazon_db
CREATE TABLE products (
item_id I... | true |
a6455eb3a43cb4a9a4ed9b055625638210f40948 | SQL | Konstantin751/glinv | /web/db/migrations/6_create_inventory_groups_table.up.sql | UTF-8 | 671 | 3.046875 | 3 | [
"MIT"
] | permissive | CREATE TABLE inventory_groups (
id SERIAL NOT NULL PRIMARY KEY,
environment VARCHAR (10) NOT NULL,
parent_id INTEGER DEFAULT 0 NOT NULL,
value VARCHAR (100) NOT NULL,
approved BOOL DEFAULT false,
delete BOOL DEFAULT false,
description TEXT,
tags JSONB,
meta JSONB,
pr... | true |
656ca70d7e0747c075d9238bd7834e980b823a05 | SQL | xiaotmh/recruitmentSystem | /recruitment4.sql | UTF-8 | 12,871 | 3.125 | 3 | [] | no_license | /*
Navicat Premium Data Transfer
Source Server : 1
Source Server Type : MySQL
Source Server Version : 50645
Source Host : localhost:3306
Source Schema : recruitment4
Target Server Type : MySQL
Target Server Version : 50645
File Encoding : 65001
Date: 16/04/2020 22:43... | true |
732ef9a962089afe5dbe5ee04034309bfe457b0b | SQL | vohoaiviet/mypractise | /trunk/mypractise/src/com/Oracle/SOA/dequeueProc.sql | UTF-8 | 3,666 | 2.84375 | 3 | [] | no_license | CREATE PROCEDURE oe.explicit_dq (consumer IN VARCHAR2) AS
deqopt DBMS_AQ.DEQUEUE_OPTIONS_T;
mprop DBMS_AQ.MESSAGE_PROPERTIES_T;
msgid RAW(16);
payload ANYDATA;
new_messages BOOLEAN := TRUE;
ord oe.order_event_typ;
cust oe.customer_event_typ;
tc ... | true |
92c0c56b90e0fbba37542eb408f01a61dcf71781 | SQL | arthurpbarros/URI | /SQL/2619.sql | UTF-8 | 259 | 3.421875 | 3 | [] | no_license | select products.name,providers.name,products.price from products
inner join providers on (providers.id = products.id_providers)
inner join categories on (categories.id = products.id_categories)
where categories.name = 'Super Luxury' and products.price > 1000; | true |
046877d0f4e8ccbd99608d7b5d0cbc506b89e9b8 | SQL | MarizzaM/QA-Architect-22.03.2021 | /Exercise_24.sql | UTF-8 | 257 | 2.578125 | 3 | [] | no_license | --(a)
INSERT INTO PRODUCS (ID,NAME,PRICE)
VALUES (1, 'bamba', 9.90 );
INSERT INTO PRODUCS (ID,NAME,PRICE)
VALUES (2, 'cheetos', 14.90 );
--(b)
SELECT * FROM PRODUCS
--(c)
DELETE FROM PRODUCS
WHERE ID = 2
--(d)
UPDATE PRODUCS
SET PRICE = 4.9
WHERE ID = 1
| true |
7c2df87c795ea431efc2cc47b011da09ad400171 | SQL | jerryjung/tpch-kit | /queries_set/queries_orc/q14_promotion_effect.sql | UTF-8 | 365 | 3.453125 | 3 | [] | no_license | select
100.00 * sum(case
when p_type like 'PROMO%'
then l_extendedprice*(1-l_discount)
else 0.0
end
) / sum(l_extendedprice * (1 - l_discount)) as promo_revenue
from
o_part p join o_lineitem l
on
l.l_partkey = p.p_partkey and l.l_shipdate >= '1... | true |
97a65910ec6c697c8c60f58b77f8af040ecf7e27 | SQL | making/spring-socks | /order-api/src/main/resources/db/migration/V1__create_initial_tables.sql | UTF-8 | 1,529 | 3.453125 | 3 | [
"Apache-2.0"
] | permissive | CREATE TABLE IF NOT EXISTS `order`
(
order_id VARCHAR(40) NOT NULL,
customer_id VARCHAR(40) NOT NULL,
customer_first_name VARCHAR(64) NOT NULL,
customer_last_name VARCHAR(64) NOT NULL,
customer_username VARCHAR(64) NOT NULL,
address_number ... | true |
45ee86f6b5618eb8462c0a595ed4c6871e54c1ab | SQL | enadz/BankAccProject | /Project2.sql | UTF-8 | 15,197 | 3.328125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.8.3
-- https://www.phpmyadmin.net/
--
-- Host: localhost:8889
-- Generation Time: Jan 13, 2019 at 09:12 PM
-- Server version: 5.7.23
-- PHP Version: 7.2.10
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIE... | true |
d03ad265e79a4581b01431cfd29180f60d4af71f | SQL | CUBRID/cubrid-testcases | /sql/_23_apricot_qa/_02_performance/_02_function_based_index/cases/function_based_index_ALTER_002.sql | UTF-8 | 1,804 | 3.125 | 3 | [
"BSD-3-Clause"
] | permissive | --+ holdcas on;
set system parameters 'dont_reuse_heap_file=yes';
create table t1 (FirstName varchar(20),LastName varchar(20),Age int,gender char (1));
insert into t1 value('yin', 'jian ye',31,'M');
--TEST Create successfully
CREATE INDEX first_name_lower ON t1 (LOWER(FirstName));
--Test should use index first_name_lo... | true |
3cc8db712d94f752f5059abd78875d0eb367b175 | SQL | suthyscott/dm-instructor | /assessments/databases/seed.sql | UTF-8 | 606 | 3.546875 | 4 | [] | no_license | CREATE TABLE animals(
animal_id SERIAL PRIMARY KEY,
species_id INT NOT NULL REFERENCES animal_species(species_id),
animal_name VARCHAR(20),
animal_age INT,
animal_weight INT,
animal_color VARCHAR(20)
);
CREATE TABLE animal_species(
species_id SERIAL PRIMARY KEY,
species_name VARCHAR(20)
);
CREATE TA... | true |
e30fa42cb094f4b7ae4b47f944907fb45c595bcc | SQL | OneMoreLera/qualifyingWork | /ДляДип/Dump20170514.sql | UTF-8 | 13,552 | 3 | 3 | [] | no_license | CREATE DATABASE IF NOT EXISTS `mysqldip` /*!40100 DEFAULT CHARACTER SET utf8 */;
USE `mysqldip`;
-- MySQL dump 10.13 Distrib 5.7.17, for Win64 (x86_64)
--
-- Host: localhost Database: mysqldip
-- ------------------------------------------------------
-- Server version 5.7.18-log
/*!40101 SET @OLD_CHARACTER_SET_CL... | true |
2849ed436253c6d03639fae968b12b821cdac25d | SQL | mgeorgic/sql-challenge | /EmployeeSQL/Code/Query.sql | UTF-8 | 2,661 | 4.71875 | 5 | [] | no_license | -- 1. List the following details of each employee: employee
-- number, last name, first name, sex, and salary.
SELECT
e.emp_no,
e.last_name,
e.first_name,
e.sex,
s.salary
FROM employees as e
LEFT JOIN salaries as s
on e.emp_no = s.emp_no
ORDER BY emp_no;
-- 2. List first name, last name, and hire date for employe... | true |
20960136eea2b8957603ad66b404c48da6ed4cf5 | SQL | jdrizo/portafolio_completo | /BaseDatos/parking_zone.sql | UTF-8 | 4,805 | 3.328125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 5.1.1
-- https://www.phpmyadmin.net/
--
-- Servidor: 127.0.0.1
-- Tiempo de generación: 07-10-2021 a las 15:51:55
-- Versión del servidor: 10.4.21-MariaDB
-- 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... | true |
03cdeff1af9d1fc8402871377b168b188e67d123 | SQL | KirilPecev/CSharp-DB-Fundamentals | /02. Databases Basics - Exams/06. Databases MSSQL Server Exam - 24 April 2017/20. Vendor Preference.sql | UTF-8 | 1,077 | 3.96875 | 4 | [] | no_license | WITH cte_PartsQuantity
AS (SELECT m.MechanicId,
v.VendorId,
SUM(op.Quantity) AS [PartsCount]
FROM Mechanics AS m
JOIN Jobs AS j ON j.MechanicId = m.MechanicId
JOIN Orders AS o ON o.JobId = j.JobId
JOIN OrderParts AS op ON op.Order... | true |
3c6d7f5b5c7090c23b806c1ee51c5a7925b49c73 | SQL | JonathanMaillard/BCBB-Forum | /forum.sql | UTF-8 | 3,555 | 3.46875 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.9.5deb2
-- https://www.phpmyadmin.net/
--
-- Host: localhost:3306
-- Generation Time: Nov 19, 2020 at 12:02 PM
-- Server version: 10.3.25-MariaDB-0ubuntu0.20.04.1
-- PHP Version: 7.4.3
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+0... | true |
1992d221ca0d1653bb8009ef31411e50fb550b98 | SQL | itvisionhub/LuckyDraw_System | /database/lucky_draw_system.sql | UTF-8 | 13,154 | 3.25 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.9.0.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Oct 14, 2019 at 08:12 AM
-- Server version: 10.4.6-MariaDB
-- PHP Version: 7.3.9
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OL... | true |
48a34c40a885121743d685dd8b543486da74b414 | SQL | gladiopeace/digital-data-syn | /documents/oms/TB_PUBLR.sql | GB18030 | 2,297 | 3.3125 | 3 | [] | no_license | /*
================================================================================
ṹ:TB_PUBLR
ṹ:ֽ춯
ṹĿ:
================================================================================
*/
drop sequence SEQ_TB_PUBLR;
drop index AK_TB_PUBLR;
drop table TB_PUBLR;
create table TB_PUBLR (
PUBLR_ID INTEGER ... | true |
6aa2f3ad093264e92d33b92e149adc2944ae87a8 | SQL | somanmia/PRIMARY-SCHOOL-MANAGEMENT-IN-PHP | /Information for Admin/Database files/academic_cost.sql | UTF-8 | 1,823 | 3.15625 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.7.9
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Dec 29, 2020 at 04:05 AM
-- Server version: 10.1.31-MariaDB
-- PHP Version: 7.2.3
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD... | true |
86faafefaf15b129412e3611c899176fe537b51e | SQL | smaccoun/smaccoun-homepage | /db/migrations/002.sql | UTF-8 | 242 | 2.546875 | 3 | [] | no_license | CREATE TABLE public.blog_posts
(
id UUID DEFAULT gen_random_uuid() PRIMARY KEY NOT NULL,
title TEXT NOT NULL,
content TEXT,
updated_at TIMESTAMP WITH TIME ZONE NOT NULL,
created_at TIMESTAMP WITH TIME ZONE DEFAULT now() NOT NULL
);
| true |
75d7582c72252edd562fc87826c8c3ce96358086 | SQL | OlafMd/MedCon1.0 | /mm-libs/dbaccess/Level 5/CL5_Zugseil_PickingPreparation/Atomic/Retrieval/SQL/cls_Get_ShippmentHeaderDetails_and_CustomerOrder_with_Positions_for_ShipmentID.sql | UTF-8 | 2,811 | 3.265625 | 3 | [] | no_license |
Select
log_shp_shipment_headers.LOG_SHP_Shipment_HeaderID,
log_shp_shipment_headers.ShipmentHeader_Number,
log_shp_shipment_positions.LOG_SHP_Shipment_PositionID,
cmn_pro_products.CMN_PRO_ProductID,
cmn_pro_products.Product_Name_DictID,
cmn_pro_products.Product_Number,
cmn_pro_product_variants.CM... | true |
2822dcf2589d7bbdbf70625f4f421ff21313bd62 | SQL | douglastycho/desafiopfa | /mysql/dbs/db.sql | UTF-8 | 379 | 2.984375 | 3 | [] | no_license | DROP DATABASE IF EXISTS nodedb;
CREATE DATABASE nodedb CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
USE nodedb;
CREATE TABLE Courses(
id INT NOT NULL AUTO_INCREMENT,
name VARCHAR(255),
PRIMARY KEY(id)
);
INSERT INTO Courses(name) VALUES
('Docker'),
('Padroes e tecnicas avancadas com Git e G... | true |
1fb56f1d9d6dedf64b29df7db7a6b1a7d2be4cca | SQL | Martouf/yopyop | /sql/yopyop.sql | UTF-8 | 21,763 | 2.796875 | 3 | [] | no_license | # Yopyop V 0h00
# http://martouf.ch
# Sequel Pro dump
# Version 2492
# http://code.google.com/p/sequel-pro
#
# Host: 127.0.0.1 (MySQL 5.1.45)
# Database: yopyop
# Generation Time: 2010-12-22 11:24:54 +0100
# ************************************************************
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER... | true |
a1cc06459cbaa41153316cecb8c705ff1845449c | SQL | zhangluyuan/SQL-course-work | /Lesson 1 Basic SQL/OR.sql | UTF-8 | 1,209 | 4.0625 | 4 | [] | no_license | 1. Find list of orders ids where either gloss_qty or poster_qty is greater than
4000. Only include the id field in the resulting table.
my answer:
SELECT id
FROM orders
WHERE gloss_qty > 4000 OR poster_qty > 4000;
solution:
SELECT id
FROM orders
WHERE gloss_qty > 4000 OR poster_qty > 4000;
2. Write a qu... | true |
8e78542e9389117ce6b19d77c8786ec871c0da0d | SQL | IgorKukhtin/DSD | /DATABASE/MEAT/VIEW/MovementItem/MovementItem_PromoGoods_View.sql | WINDOWS-1251 | 13,111 | 3.09375 | 3 | [] | no_license | --
DROP VIEW IF EXISTS MovementItem_PromoGoods_View;
CREATE OR REPLACE VIEW MovementItem_PromoGoods_View AS
SELECT
MovementItem.Id AS Id --
, MovementItem.MovementId AS MovementId -- <>
, MovementItem.ObjectId AS... | true |
df741a5603fabe6120ddb2c7402e455f4baf8f62 | SQL | Auros1805/tp16-java | /BDD et shema/tapas.sql | UTF-8 | 1,518 | 3.765625 | 4 | [] | no_license | DROP DATABASE IF EXISTS Restorant_Tapas;
CREATE DATABASE Restorant_Tapas
CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
USE Restorant_Tapas;
CREATE TABLE Categorie
(
idCategorie INT(11) NOT NULL AUTO_INCREMENT,
nomCategorie VARCHAR(64),
PRIMARY KEY(idCategorie)
);
CREATE TABLE Tapas
(
idTapas INT... | true |
70efd67836c7236ca12fd495871bade1dc534293 | SQL | cms-sw/cmssw | /OnlineDB/EcalCondDB/sql/dump_monitoring.sql | UTF-8 | 936 | 3.65625 | 4 | [
"Apache-2.0"
] | permissive | SET ECHO OFF;
SET FEEDBACK OFF;
SET LINESIZE 1000;
SET PAGESIZE 1000;
col location format a8
col gen_tag format a15
col run_type format a15
col config_tag format a15
col mon_ver format a15
ALTER SESSION SET NLS_DATE_FORMAT='YYYY-MM-DD HH24:MI:SS';
SELECT ri.run_num, mi.subrun_num, d.num_chan, ld.location, rt.gen_tag,... | true |
3cafbf89a1a4a40f3164353fc7458d806f148cba | SQL | MuhammadRyandaNM/FP_PBKK2019 | /avagames (3).sql | UTF-8 | 4,446 | 2.96875 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.7.7
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Waktu pembuatan: 20 Bulan Mei 2019 pada 05.31
-- Versi server: 10.1.30-MariaDB
-- Versi PHP: 7.2.2
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD... | true |
d069b62713572671fa6e64e81ce83ace4d57187d | SQL | ahristoff/Database-Basic-SQL | /4_Built-InFunctions/BUILD_IN FUNCTIONS/BUILD_IN FUNCTIONS/03_Task.sql | UTF-8 | 147 | 2.90625 | 3 | [] | no_license | USE SoftUni
SELECT FirstName FROM Employees
WHERE (DepartmentID = 3 OR DepartmentID = 10)
AND DATEPART(YEAR,HireDate) BETWEEN 1995 AND 2005
| true |
02e63c72abb6fe5ae8802608cf7d08b4156a9c0e | SQL | epicinin/origin | /models/northwind/mart/dim_categories.sql | UTF-8 | 439 | 2.859375 | 3 | [] | no_license | {{ config(materialized='table') }}
with
staging as (
select *
from {{ ref('stg_public_categories')}}
)
, transformed as (
select
row_number() over (order by category_id) as category_sk -- auto-incremental surrogate key
,category_id
,ca... | true |
03e36224571aa2023228b0238a8f94aca1a6b650 | SQL | lars-gaechter/log-reg-page | /table_users.sql | UTF-8 | 449 | 2.9375 | 3 | [] | no_license | /*
Creates a new database login system with a table users in which users will be saved.
*/
DROP DATABASE IF EXISTS loginsystem;
CREATE DATABASE loginsystem;
USE loginsystem;
DROP TABLE IF EXISTS users;
CREATE TABLE users (
user_id INT(11) NOT NULL AUTO_INCREMENT PRIMARY KEY,
user_first VARCHAR(256) NOT NULL,
user_la... | true |
64aebaf496a834a27246f283087b6e5489e1be66 | SQL | edimaudo/SQL | /Ecomm_Clickstream_Sample.sql | UTF-8 | 4,127 | 3.65625 | 4 | [] | no_license | CREATE TABLE EDWPRDBW..LMS_RPT AS
(
WITH GET_AGE_PC AS
(
SELECT
'LOYALTY' AS GRP,
LMSDATA.LOYALTY_NUMBER_EVAR56,
CUSTADD.POSTAL_CD,
(CASE WHEN SUBSTR(CUSTADD.POSTAL_CD,2,1) = '0' THEN CUSTADD.POSTAL_CD ELSE SUBSTR(CUSTADD.POSTAL_CD,1,3) END) AS FSA,
(CASE WHEN (DATE_PART('YEAR',CURRENT_DATE) - DATE_PART('YEA... | true |
ff355e8bc34ee3ff9341e75cf0de888216d68173 | SQL | aryangomes/librorum | /modelagem_banco/auth_item_child_inserts.sql | UTF-8 | 2,064 | 3.09375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.5.2
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: 30-Jul-2016 às 21:16
-- Versão do servidor: 10.1.10-MariaDB
-- PHP Version: 5.6.19
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CL... | true |
91f1a3776aa43edc9e4a9833ee095f387ea8511a | SQL | andrecatanho/software | /responsivo/blog.sql | UTF-8 | 1,633 | 2.8125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.1.14
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: 29-Jun-2018 às 02:46
-- Versão do servidor: 5.6.17
-- PHP Version: 5.5.12
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;... | true |
c582483869ac578c06ea0cb24c37038b6ea66619 | SQL | github4n/cloud | /database/1230/DDL/create_table_device_type_to_goods.sql | UTF-8 | 623 | 3.328125 | 3 | [] | no_license | CREATE TABLE IF NOT EXISTS iot_db_device.`device_type_to_goods` (
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键' ,
`device_type_id` bigint(20) NOT NULL COMMENT '设备类型Id' ,
`goods_code` varchar(50) NOT NULL COMMENT '增值服务id' ,
`create_by` bigint(20) NULL COMMENT '创建人' ,
`create_time` datetime NULL COMMENT '创建时间... | true |
c1afcfcdc09e8250adef329f8943d39f237c6d7f | SQL | mohammadsalman22/wsibw-kel6-b_bws | /crud_pdo_mohammad_salman/db_crud_pdo.sql | UTF-8 | 1,593 | 3.171875 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.7.0
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Generation Time: Dec 31, 2020 at 04:03 PM
-- Server version: 10.1.25-MariaDB
-- PHP Version: 5.6.31
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OL... | true |
bd9b86e8611a73940a724910ba8e55d686e40174 | SQL | bellmit/origin | /family_order/sql/TD_S_CPARAM/SEL_TRADETYPE_LIMIT_DISCNT2.sql | UTF-8 | 1,195 | 2.984375 | 3 | [] | no_license | SELECT A.PARTITION_ID,
A.USER_ID,
A.USER_ID_A,
A.DISCNT_CODE,
A.SPEC_TAG,
A.RELATION_TYPE_CODE,
A.INST_ID,
A.CAMPN_ID,
TO_CHAR(A.START_DATE,'YYYY-MM-DD HH24:MI:SS') START_DATE,
TO_CHAR(A.END_DATE,'YYYY-MM-DD HH24:MI:SS') END_DATE,
A.UPDATE_TIME,
... | true |
ce257fe7dab149bdc8b32570a1103eb8313c474a | SQL | cuongyura/C0720G1_HoManhCuong_Modules3 | /_4_commons_functions/bai_tap/_1_paractice_commons_functions/pararactice_commons_function.sql | UTF-8 | 732 | 3.390625 | 3 | [] | no_license | create database `exciers`;
use `exciers`;
create table student(
student_id int,
student_name varchar(20),
age int,
course varchar(20),
money float
);
insert into student values (1, "Hoang", 21, "CNTT", 40000.0);
insert into student values (2, "Viet", 19, "DTVT", 320000.0);
insert into student values (3, "Thanh", 18, ... | true |
d2a390f104061bea8d2cbfcb2df3927f0bfe7ca9 | SQL | OutOfBandDevelopment/MasterDataTools | /src/MasterDataTools/MyDataTools.Db/Vehicles/Views/FillUps_Locations.sql | UTF-8 | 721 | 3.65625 | 4 | [
"MIT"
] | permissive |
CREATE VIEW [Vehicles].[FillUps_Locations]
AS --
SELECT
[Stations].[StationID]
,[FillUps].[FillUpID]
,[FillUps].[CarID]
,[Cars].[DriverID]
,ISNULL([Stations].[Name], [FillUps].[Station]) AS [Station]
,[Stations].[Address1]
,[Stations].[City]
,[Stations].[State]
,[Stations].[ZipCode]
,[FillUps].[TankMiles] ... | true |
8e116123b476cf51cc90df89067b8eaf377798a0 | SQL | japanese-goblinn/labs | /term6/SUBD/untitled.sql | UTF-8 | 22,543 | 4.21875 | 4 | [
"MIT"
] | permissive | USE `byTickets`;
DROP procedure IF EXISTS `firstnameAndLastnameID`;
DELIMITER $$
USE `byTickets`$$
CREATE DEFINER=`root`@`%` PROCEDURE `firstnameAndLastnameID`(
IN firstnameVal VARCHAR(64),
IN lastnameVal VARCHAR(64)
)
BEGIN
DECLARE firstnameID MEDIUMINT;
DECLARE lastnameID MEDIUMINT;
SELECT id INTO firstnam... | true |
8c2c49e0cd61a59d42f54536b46af103141db427 | SQL | bsodergren/cwp_media | /src/Database/mysql/cwp_table_paper_count.sql | UTF-8 | 604 | 2.53125 | 3 | [] | no_license | DROP TABLE IF EXISTS paper_count;
CREATE TABLE IF NOT EXISTS `paper_count` (
`id` integer NOT NULL PRIMARY KEY AUTO_INCREMENT,
`paper_id` int NOT NULL,
`pcs_carton` int DEFAULT NULL,
`back_lift` int DEFAULT NULL,
`front_lift` int DEFAULT NULL,
`max_carton` int DEFAULT NULL,
`max_half` int DEFAULT NULL,
`max_fu... | true |
b7032c2d63ca991eb464f929f5bd691562a4dc41 | SQL | jgarzonext/plsql-testing | /script_plsql/bd_iaxis/script/indices/POS_SAL_DETALLE_PK.sql | UTF-8 | 364 | 2.6875 | 3 | [] | no_license | --------------------------------------------------------
-- DDL for Index POS_SAL_DETALLE_PK
--------------------------------------------------------
CREATE UNIQUE INDEX "AXIS"."POS_SAL_DETALLE_PK" ON "AXIS"."POS_SAL_DETALLE" ("IDOBJETO", "CRAMO", "SPROCES", "CODIGO", "CAGENTE")
PCTFREE 10 INITRANS 2 MAXTRANS 25... | true |
e79d19c10975137bdd76af4d156ecea84fcf0895 | SQL | MattiasWW/ExamenTrainer | /examengebruikers.sql | UTF-8 | 2,029 | 3.046875 | 3 | [
"MIT"
] | permissive | -- phpMyAdmin SQL Dump
-- version 4.0.4.2
-- http://www.phpmyadmin.net
--
-- Machine: localhost
-- Genereertijd: 18 mrt 2019 om 10:21
-- Serverversie: 5.6.13
-- PHP-versie: 5.4.17
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40... | true |
9e4158e438057f560637ba7640ebd946b8c87965 | SQL | thingsboard/thingsboard | /application/src/main/data/upgrade/3.3.4/schema_update.sql | UTF-8 | 4,494 | 3.34375 | 3 | [
"Apache-2.0"
] | permissive | --
-- Copyright © 2016-2023 The Thingsboard Authors
--
-- Licensed under the Apache License, Version 2.0 (the "License");
-- you may not use this file except in compliance with the License.
-- You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicabl... | true |
5451bda064faadb20f093b3c3f27c333c8f425d1 | SQL | openmaptiles/openmaptiles-tools | /sql/CleanNumeric.sql | UTF-8 | 573 | 3.359375 | 3 | [
"MIT",
"BSD-3-Clause"
] | permissive | /******************************************************************************
### CleanNumeric ###
Returns the input text as an numeric if possible, otherwise null.
__Parameters:__
- `text` i - Text that you would like as an numeric.
__Returns:__ `numeric`
*********************************************************... | true |
a4497875512202b66047969a7cce5eaf46474c57 | SQL | jampaniuday/VTS_DBA_SQL | /db_cr_hr.sql | UTF-8 | 2,694 | 3.953125 | 4 | [] | no_license | set pages 900 lines 200 trims on
break on hour skip 1 on report
compute sum of cnt tott on report
PROMPT Concurrent Program Profile;
--
COLUMN hour HEADING 'Date' FORMAT A4;
COLUMN qn HEADING 'Queue|Name' FORMAT A25;
COLUMN cnt HEADING 'Total|Jobs' FORMAT 999,990;... | true |
93a0dba8c972d6f5b487855864917381a4ab6f2c | SQL | hychrisli-org/Dish-Order-System | /DDL/dish-order-system-ddl.sql | UTF-8 | 12,165 | 3.640625 | 4 | [
"Apache-2.0"
] | permissive | DROP DATABASE IF EXISTS dos;
CREATE DATABASE dos;
USE dos;
/*==============================================================*/
/* Table: BRANCH */
/*==============================================================*/
create table BRANCH
(
BRANCH_ID smallint not ... | true |
3d9a385e5e56e2446687473f43cab93dbdb6f302 | SQL | dlsktmfdl/naseul | /hoempage/WebContent/WEB-INF/sql/member.sql | UTF-8 | 3,564 | 4.0625 | 4 | [] | no_license | DROP TABLE member;
select * from member;
--테이블 생성
CREATE TABLE member(
id VARCHAR(10) not null, --아이디 중복x
passwd varchar(20) not null, --패스워드 영문조합
mname varchar(20) not null,
tel varchar(14) null, --전번
email varchar(50) not null unique, --전자우편 중복x
zipcode varchar(7) null, --우편번호
address1 varch... | true |
4b770224ddbd2364d5f99e1b7b37c08e328ee9a4 | SQL | shadobladez/Armadyne | /html/Sql/Products.sql | UTF-8 | 1,056 | 2.921875 | 3 | [] | no_license | DROP TABLE IF EXISTS Products;
CREATE TABLE IF NOT EXISTS Products
( id BIGINT NOT NULL AUTO_INCREMENT
, updated_by BIGINT DEFAULT NULL
, updated_at DATETIME DEFAULT NULL
, status VARCHAR(32) DEFAULT 'Active'
, product_code VARCHAR(255) DEFAULT NULL #
, product_name VARCHAR(255) DEFAU... | true |
3f3716161f6691ae5be76512e71ec60e9e1f6f21 | SQL | dailongao/NexusPHP | /20131108_db_structure.sql | GB18030 | 52,524 | 3.359375 | 3 | [] | no_license | SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
-- --------------------------------------------------------
--
-- Ľṹ `adclicks`
--
CREATE TABLE IF NOT EXISTS `adclicks` (
`id` int(11) unsigned NOT NULL auto_increment,
`adid` int(11) unsigned default NULL,
`userid` int(11) unsigned default NULL,
`added` datetime defaul... | true |
3fe6bd51c666a32dec629a73746d60e6db33af59 | SQL | xiaoyangLee/BookManager | /db_book.sql | UTF-8 | 3,821 | 3.59375 | 4 | [] | no_license | /*
Navicat MySQL Data Transfer
Source Server : JavaMySQL
Source Server Version : 50067
Source Host : localhost:3306
Source Database : db_book
Target Server Type : MYSQL
Target Server Version : 50067
File Encoding : 65001
Date: 2017-06-27 19:03:01
*/
SET FOREIGN_KEY_... | true |
d58043b57e258d29ae0d4c6ce876ae06e90bc11f | SQL | edos11/NWT--AB12 | /baza.sql | UTF-8 | 4,890 | 3.1875 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.5.2
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: May 18, 2016 at 10:12 PM
-- Server version: 5.7.9
-- PHP Version: 5.6.16
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/... | true |
920435c0cf9b291894efda847e3fddad1fc343aa | SQL | REYJDR/P3TOP3 | /SCRIPT_P3_TO_P3.sql | UTF-8 | 8,845 | 3.09375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.0.10.18
-- https://www.phpmyadmin.net
--
-- Host: localhost:3306
-- Generation Time: Aug 24, 2017 at 10:37 AM
-- Server version: 5.6.35-cll-lve
-- PHP Version: 5.6.30
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
--
-- Database: `p32p3_LOVINGMYMOBILESA`
--
-- -... | true |
d0cbe0d20ab3188ad781a1276dcb76823b2bc4d7 | SQL | shrmanator/Group106 | /query1.sql | UTF-8 | 1,248 | 4.0625 | 4 | [] | no_license |
-- Test that the correct foreign keys were create
CREATE TABLE client (
id INT(11) AUTO_INCREMENT PRIMARY KEY,
first_name VARCHAR(255) NOT NULL,
last_name VARCHAR(255) NOT NULL,
email VARCHAR(255) NOT NULL,
CONSTRAINT full_name UNIQUE (first_name,last_name)
)ENGINE=InnoDB;
CREATE TABLE employee(
... | true |
5cceed67e879a1ede1ab5f87fbd5255899fb1986 | SQL | lorenzocesconetto/Buscamed | /SQL/analytics.sql | UTF-8 | 326 | 2.828125 | 3 | [] | no_license | SELECT * FROM product_detail_click;
SELECT * FROM searches ORDER BY timestamp DESC;
SELECT COUNT(*) FROM searches WHERE timestamp > '2021-03-07';
SELECT ean, COUNT(*) AS clicks FROM product_detail_click GROUP BY ean ORDER BY clicks DESC;
SELECT * FROM item WHERE ean=7896015518875;
SELECT * FROM item WHERE ean=78964225... | true |
75f948c9c3cdab6d217adf946f3418a75925fc9b | SQL | pauljstuart/Scripts | /sess/locked_object.sql | UTF-8 | 1,231 | 3.796875 | 4 | [] | no_license |
col P_USERNAME new_value 1 format A20
col P_SQL_ID new_value 2 format A20
col P_INST new_value 3 format A20
select null P_USERNAME, null P_SQL_ID, null P_INST from dual where 1=2;
select nvl( '&1','&_USER') P_USERNAME, nvl('&2','%') P_SQL_ID, nvl('&3','%') P_INST from dual ;
define USERNAME=&1
define SQL_ID=&... | true |
20b503f1a253d0e601a614200a9c1352db955a90 | SQL | dearx02/dearindependentproject2559 | /project/127_0_0_1.sql | UTF-8 | 4,802 | 3.078125 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | -- phpMyAdmin SQL Dump
-- version 4.5.1
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Dec 15, 2015 at 05:20 AM
-- Server version: 10.1.8-MariaDB
-- PHP Version: 5.6.14
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLI... | true |
8b961d086744e32ce15c0ab40734f01a49dc5ac8 | SQL | Baymurat/Contacts | /core/src/main/resources/db.changelog/v1.0.0/script.sql | UTF-8 | 1,463 | 3.15625 | 3 | [] | no_license | create table persons
(
id serial not null
constraint persons_pk
primary key,
name varchar(50) not null,
surname varchar(50) not null,
middlename varchar(50) not null,
citizenship varchar(50),
familystatus varchar(50),
website ... | true |
f33facaced63ce990cf9261a013921dc0f488936 | SQL | 0xRnato/crossover-tech-trial | /database.sql | UTF-8 | 10,942 | 3.265625 | 3 | [] | no_license | -- MySQL Script generated by MySQL Workbench
-- Fri 03 Nov 2017 01:58:34 AM -02
-- Model: New Model Version: 1.0
-- MySQL Workbench Forward Engineering
SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0;
SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0;
SET @OLD_SQL_MODE=@@SQL_MODE, SQL_M... | true |
8f0c30a74e499269856f74116f94183eb20e4ba6 | SQL | serg239/db | /mysql/elt/01_release_scripts/28_truncate_unused_log_tables.sql | UTF-8 | 4,474 | 3.84375 | 4 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | /*
Version:
2012.01.16.01
Script:
28_truncate_unused_tables.sql
Description:
Truncate log tables not described in src_tables table.
-- ====================================
Input:
* debug_mode - Debug Mode.
Values:
* TRUE (1) - show SQL statements
... | true |
50668c81bfb3c3db49d47a3a067f26994734cce9 | SQL | f0y/dbintro | /src/ex_view_core/2.sql | UTF-8 | 177 | 2.625 | 3 | [] | no_license | CREATE TRIGGER BOO INSTEAD OF UPDATE OF stars ON LateRating FOR EACH ROW
BEGIN
UPDATE Rating
SET stars = new.stars
WHERE new.mID = mID AND new.ratingDate = ratingDate;
END | true |
d815a02f6635edc813f5880f56ee8a40c181faf0 | SQL | luoyanghua/word | /初始化脚本/FollowUp/00 Index_FollowUp.sql | UTF-8 | 5,176 | 3 | 3 | [] | no_license | /*==============================================================*/
/* DBMS name: MySQL 5.0 */
/* Created on: 2017/12/8 10:58:01 */
/*==============================================================*/
/*================================================... | true |
632bfe194578019abdc80b1c50b66b3ec701fcfc | SQL | drewbanin/talk | /models/source.sql | UTF-8 | 180 | 3 | 3 | [] | no_license |
with gen as (
select
row_number() over (order by random()) as i
from {{ ref('moby_dick') }}
)
select
now() - (interval '1 minute' * i) as loaded_at
from gen
| true |
17c7c1e8a3363700f38b49d91f8f736679612b07 | SQL | mrogove/InformaticaPCManagement | /find OBJECT, KEY CHARACTERISTICS/ORACLE find keys.sql | UTF-8 | 599 | 3.40625 | 3 | [] | no_license | /*
My most used non-Informatica-specific query, though could be used against PC_REPO if needed.
Return keys/constraints present in system.
Crucial in orchestration of ETL, especially in consideration of dropping/adding keys for BULK insert procedures.
*/
SELECT cols.table_name
, cols.column_name
, cols.positio... | true |
c47fc9975bdc1809d33cf48ec7fc290a1bd35dd8 | SQL | mitchmathias/MitchsBurgers | /db/schema.sql | UTF-8 | 327 | 2.953125 | 3 | [
"MIT"
] | permissive | DROP DATABASE IF EXISTS goodBurgerDB;
-- Create the database moviePlannerDB and specified it for use.
CREATE DATABASE goodBurgerDB;
USE goodBurgerDB;
-- Create the table watchlist.
CREATE TABLE burgers (
id int NOT NULL AUTO_INCREMENT,
name varchar(255) NOT NULL,
devoured BOOLEAN DEFAULT false,
PRIMARY KEY (... | true |
19546aae348e50629c147f331067ff5b183c206b | SQL | cesarramos95/projetoengsoftware2 | /boutique.sql | UTF-8 | 1,257 | 3.59375 | 4 | [
"MIT"
] | permissive | drop database if exists boutique;
create database boutique;
use boutique;
CREATE TABLE IF NOT EXISTS cliente(
cpf VARCHAR(15) primary key not NULL,
nome VARCHAR(45) NOT NULL,
sexo varchar(15),
email varchar(45),
cidade varchar(45),
rua varchar(45),
num int,
estado varchar(45),
tel int
);... | true |
1ef81bb1edaca866bb3da3bf6e4d11677fbfa391 | SQL | Altinity/ClickHouse | /tests/queries/0_stateless/02494_query_cache_passive_usage.sql | UTF-8 | 1,232 | 3.46875 | 3 | [
"Apache-2.0"
] | permissive | -- Tags: no-parallel
-- Tag no-parallel: Messes with internal cache
-- Start with empty query cache (QC).
SYSTEM DROP QUERY CACHE;
-- By default, don't write query result into QC.
SELECT 1;
SELECT COUNT(*) FROM system.query_cache;
SELECT '-----';
-- Try to retrieve query from empty QC using the passive mode. Do thi... | true |
31b1a15995221c2f7a06b079c8545f838eea17e3 | SQL | dodi258/SQL_study | /aug26_2020/Programmers-있는데요없었습니다.sql | UTF-8 | 266 | 3.296875 | 3 | [] | no_license | -- 문제 출처: https://programmers.co.kr/learn/courses/30/lessons/59043
SELECT `IN`.ANIMAL_ID, `IN`.`NAME`
FROM ANIMAL_INS AS `IN`
JOIN ANIMAL_OUTS AS `OUT`
ON `IN`.ANIMAL_ID = `OUT`.ANIMAL_ID
WHERE `OUT`.`DATETIME` < `IN`.`DATETIME`
ORDER BY `IN`.`DATETIME`; | true |
97266108ab04efaa91e3d7458af2add208a9b04c | SQL | gavioto/ActionGUI-ehrmapp-v2.5 | /vm/src/test/resources/sql/init-2.sql | UTF-8 | 3,969 | 3.5625 | 4 | [] | no_license | use eHRMApp;
/*
enum Role {
0:DEFAULT
1:DIRECTOR
2:ADMINISTRATIVE
3:DOCTOR
4:NURSE
5:SYSTEM
}
*/
-- Insert the professionals
insert into Professional (pk,user,password,name,surname,role,asNurse,asDoctor,asDirector,asAdministrative) values (1,'david','1111','David','Griffin',3,null,1,null,null)... | true |
2b6d439cf0b179643664f7869a638d6c8f623661 | SQL | danielriquelme/DIDI_BI_Challenge | /1. Q 1-3/question3.sql | UTF-8 | 660 | 3.859375 | 4 | [] | no_license | SET DATEFIRST 1
select weeknum, weeksum, prevWeekSum, format(cast(weeksum as float)/prevWeekSum -1 ,'P') as WoWGwth FROM
(select
dates.weeknum,
sum(reserve_visitors) as weekSum,
lag(sum(reserve_visitors)) over (order by dates.weeknum) as prevWeekSum
from restaurants_visitors rv
inner join
... | true |
f46ef43d0411eeedd0c04e39c9fb9ae53d618a8b | SQL | rtdonin/JavaClasswork | /DDWA/M1/Assessment/DoninMargaret-HotelData.sql | UTF-8 | 4,442 | 3.125 | 3 | [] | no_license | -- Created by: Margaret Donin
-- Date created: 08/05/20
-- Date revised:
USE HotelSoftwareGuild;
INSERT INTO `Amenity` (`Name`)
VALUES ('Microwave'),
('Jacuzzi'),
('Refrigerator'),
('Oven');
INSERT INTO `RoomType` (`Name`, `StandardOccupancy`, `MaximumOccupancy`, `BasePrice`, `ExtraPerson`)
VALUES ('Double', 2, 4... | true |
311e69930b98104617799da7e711fae3f7e8dccd | SQL | ninoslavjaric/y-news | /sql/dbdump.sql | UTF-8 | 3,440 | 3.5 | 4 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.5.4.1deb2ubuntu2
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Sep 19, 2017 at 12:39 AM
-- Server version: 5.7.19-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 |
24f093a4afcf3864c53441c929cbd24635106158 | SQL | troi-k/AppalquilerCodeigniter | /apartamentos.sql | UTF-8 | 3,911 | 2.984375 | 3 | [
"MIT"
] | permissive | -- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Servidor: 127.0.0.1
-- Tiempo de generación: 27-05-2021 a las 00:31:54
-- Versión del servidor: 10.4.13-MariaDB
-- Versión de PHP: 7.4.8
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_... | true |
526756d58d7854c61ec778d98f90f229ca075206 | SQL | sinaheidari11/my-cs50 | /sql movies/9.sql | UTF-8 | 245 | 3.8125 | 4 | [] | no_license | -- listing people who starred in a movie relesed in 2004 order by birth year.
SELECT name
FROM people JOIN stars ON stars.person_id = people.id JOIN movies ON movies.id = stars.movie_id
WHERE year = 2004
GROUP BY name, person_id
ORDER BY birth; | true |
321e0e0e2b8cae8732e375d5ce1a8fb11a1cfe7b | SQL | rvladi/esports | /utils/esports_db.sql | UTF-8 | 3,695 | 3.578125 | 4 | [] | no_license | DROP DATABASE IF EXISTS esports;
CREATE DATABASE esports;
USE esports;
CREATE TABLE games
(
id INT NOT NULL AUTO_INCREMENT,
name VARCHAR(255) NOT NULL,
image VARCHAR(255),
PRIMARY KEY (id)
);
INSERT INTO
games(name, image)
VALUES
('Call of Duty: Black Ops 4', 'call_of_duty.jpg'),
('Counter-Strike: G... | true |
4cb0c2061405175bd9c86c134a5a4228d0087e22 | SQL | bitgittry/BaseCodeAnalysis | /trunk/dbv/stored_routines/SportsBookGetPlayerBetHistory.sql | UTF-8 | 5,183 | 4 | 4 | [] | no_license | DROP procedure IF EXISTS `SportsBookGetPlayerBetHistory`;
DELIMITER $$
CREATE DEFINER=`bit8_admin`@`127.0.0.1` PROCEDURE `SportsBookGetPlayerBetHistory`(clientStatID BIGINT, startDate DATETIME, endDate DATETIME)
BEGIN
-- optimized
SET @client_stat_id=clientStatID;
SET @start_date=startDate;
SET @end_date=endDate;
(
S... | true |
5753a9136860beb81f9effd93b7b59e19f6f0082 | SQL | satya9090/TalentPool | /TalentPool/TalentPool/talent_pool.sql | UTF-8 | 5,768 | 3.5 | 4 | [] | no_license |
CREATE TABLE `talent_pool`.`talent_locations` (
`location_id` INT NOT NULL AUTO_INCREMENT COMMENT 'Unique ID',
`country` VARCHAR(50) NOT NULL COMMENT 'Country Name',
`state` VARCHAR(50) NULL COMMENT 'state',
`city` VARCHAR(50) NULL,
PRIMARY KEY (`location_id`),
UNIQUE INDEX `location_id_UNIQUE` (`location_... | true |
c56799578f5dbcced6a42401066c7f67a629de32 | SQL | JayathmaChathurangani/InternWork | /Reference/LicenseManager/Database/license_manager_new_tables.sql | UTF-8 | 2,131 | 3.1875 | 3 | [] | no_license | CREATE TABLE LM_ORGANIZATION(
ORGANIZATION_ID INTEGER NOT NULL PRIMARY KEY AUTO_INCREMENT,
ORGANIZATION_NAME VARCHAR(300) NOT NULL
)ENGINE=MyISAM AUTO_INCREMENT=32 DEFAULT CHARSET=latin1;
CREATE TABLE LM_REPOSITORYTYPE(
REPOSITORYTYPE_ID INTEGER NOT NULL PRIMARY KEY AUTO_INCREMENT,
REPOSITORYTYPE_KEY VARCHAR(100)... | true |
7f1c81046b9738a19810a23875b0b3337ded9cb1 | SQL | TundraJake/fake_bank | /muh_bank_app/schema.sql | UTF-8 | 912 | 3.484375 | 3 | [] | no_license | /*
Jacob McKenna
UAF CS492 Computer Security I
MySQL Bank Database
*/
-- Create Database if it doesn't exist.
CREATE Database IF NOT EXISTS MuhBank;
-- Create table if it doesn't exist.
-- User must belong to a bank.
CREATE TABLE IF NOT EXISTS User (
id INTEGER PRIMARY KEY NOT NULL AUTO_INCREMENT,
fname VARCHAR(40... | true |
5ee511d9d6a5d691eb63c90b51bd855b98c0e4e6 | SQL | QinganZhao/LXXtCode | /Hackerrank/African Cities.sql | UTF-8 | 99 | 2.96875 | 3 | [
"MIT"
] | permissive | SELECT ci.NAME
FROM CITY ci, COUNTRY co
WHERE ci.COUNTRYCODE = co.CODE
AND co.CONTINENT = 'Africa'
| true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.