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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
469240c8bced41f4bfd3b28bae71174ae9fce32f | SQL | lijielife/Stock-33 | /stock.sql | UTF-8 | 7,864 | 3.09375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.6.4
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Generation Time: 27-Nov-2016 às 01:10
-- Versão do servidor: 5.7.16
-- PHP Version: 5.6.26
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */... | true |
707a038f753162703c5aae7249786cae1bf1ff3f | SQL | rlee1957/familyexplorer | /database/hits.sql | UTF-8 | 780 | 2.859375 | 3 | [] | no_license |
CREATE DATABASE /*!32312 IF NOT EXISTS*/ `hits` /*!40100 DEFAULT CHARACTER SET latin1 */;
USE `hits`;
--
-- Table structure for table `pagehits`
--
DROP TABLE IF EXISTS `pagehits`;
CREATE TABLE `pagehits` (
`page` varchar(255) default NULL,
`hits` int(11) default NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
--... | true |
ecab09676e857c574acef520593f5f21d0a81b2f | SQL | vijaydairyf/TimelyFish | /SolomonApp/dbo/Views/dbo.vp_10400_UpdateARCOGS_INTranOM.sql | UTF-8 | 1,276 | 3.078125 | 3 | [] | no_license |
CREATE VIEW vp_10400_UpdateARCOGS_INTranOM As
SELECT T.BatNbr,
T.CpnyId,
CurPer = (RIGHT(RTRIM(I.PerNbr), 2)),
CurYr = (SUBSTRING(I.PerNbr, 1, 4)),
T.Id,
FiscYr = (SUBSTRING(T.PerPost, 1, 4)),
T.JrnlType,
T.InvtMult,
T.TranType,
... | true |
dc2b1be38235989dd5dffcc350016a459c42483c | SQL | kirilpetrov36/DB-labs | /Лабораторна 10/lab10.sql | UTF-8 | 661 | 4.09375 | 4 | [] | no_license | use lab2;
drop procedure if exists getSubject;
DELIMITER //
CREATE PROCEDURE `getSubject` (IN groupe VARCHAR(10), IN subject VARCHAR(50), IN day VARCHAR(15))
BEGIN
SELECT s.number, s.type, c.classroom_number, b.buildings
FROM schedule s
INNER JOIN classrooms c ON s.classroom_id = c.id
INNER JOIN bu... | true |
396a39463d11473cf1d4a29985f9d0fee50c3a40 | SQL | silence-do-good/stress-test-Postgres-and-MySQL | /dump/low/day11/select1544.sql | UTF-8 | 178 | 2.609375 | 3 | [] | no_license |
SELECT timeStamp, temperature FROM ThermometerOBSERVATION o
WHERE timestamp>'2017-11-10T15:44:00Z' AND timestamp<'2017-11-11T15:44:00Z' AND temperature>=16 AND temperature<=52
| true |
96634be88d2137af6f9230e562a98867616bde88 | SQL | bnandikanti/Employee_DB_Analysis | /query.sql | UTF-8 | 2,389 | 4.46875 | 4 | [] | no_license | --1. List the following details of each employee: employee number, last name, first name, gender, and salary.
SELECT emp.emp_no, last_name, first_name, gender, salary FROM employee AS emp
INNER JOIN salary AS sal
ON emp.emp_no = sal.emp_no;
--2. List employees who were hired in 1986.
SELECT last_name, first_name
FR... | true |
48a57e3df4b377fcfbcc6b3e808ee8971dd7d383 | SQL | cloner3000/fisdas | /database/absensi_v1.0.sql | UTF-8 | 20,926 | 2.953125 | 3 | [] | no_license | -- --------------------------------------------------------
-- Host: 127.0.0.1
-- Server version: 10.1.13-MariaDB - mariadb.org binary distribution
-- Server OS: Win32
-- HeidiSQL Version: 9.3.0.4984
-- ------------------------------------------------... | true |
4e2d8ad562d4544c605694835e06f3a64e42df89 | SQL | kuanglitang/klt | /tang/onethink.sql | UTF-8 | 47,911 | 3.40625 | 3 | [
"Apache-2.0"
] | permissive | --
-- 数据库: `onethink`
--
-- --------------------------------------------------------
--
-- 表的结构 `think_action`
--
CREATE TABLE IF NOT EXISTS `think_action` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键',
`name` char(30) NOT NULL DEFAULT '' COMMENT '行为唯一标识',
`title` char(80) NOT NULL DEFAULT '' CO... | true |
3fb23fd12c77e6879506cee971db61a0aa834847 | SQL | IlyaKhalafi/Online-Shop | /MySQL Database/Dump Files/shop_db_tokens.sql | UTF-8 | 2,950 | 3.03125 | 3 | [] | no_license | -- MySQL dump 10.13 Distrib 8.0.23, for Win64 (x86_64)
--
-- Host: localhost Database: shop_db
-- ------------------------------------------------------
-- Server version 8.0.23
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!... | true |
d5e55a50ecbdc231ee7a3204f2d4a28ef9213a5c | SQL | Resco/hangman-project | /src/main/sql/003_create_games.sql | UTF-8 | 354 | 2.953125 | 3 | [] | no_license | create table games (
game_id varchar(255) not null,
player_id varchar(255) not null,
started timestamp not null,
finished timestamp,
score integer not null,
code varchar(255) not null,
primary key (game_id),
FOREIGN KEY (player_id) REFERENCES players (player_id) ON UPDATE CASCADE ON DELETE CASCADE
);
u... | true |
58aa40245807353e11d42064d6bc2c849a7a1c7f | SQL | jesssubin/BootcampX | /1_queries/query_1.sql | UTF-8 | 790 | 4.21875 | 4 | [] | no_license |
-- students in cohort 1
SELECT id, name
FROM students
WHERE cohort_id = 1
ORDER BY name ASC;
--total students in first 3 cohorts
SELECT COUNT(id)
FROM students
WHERE cohort_id IN (1,2,3);
-- all students dont have email/phone number
SELECT name, id
FROM students
WHERE email IS NULL OR phone IS NULL;
-- all st... | true |
fe2d514a30e8f71223d47203ae3b5f49c60f1c97 | SQL | MathiasGartner/TOR | /db/scratch_20220426.sql | UTF-8 | 9,728 | 3.515625 | 4 | [] | no_license | use tor;
select * from client;
select Id, Position, IP, Material, Latin from client;
select * from diceresult order by id desc;
select * from job;
select * from jobqueue;
WITH ranked_jobs AS (
SELECT j.ClientId, j.JobCode, ROW_NUMBER() OVER (PARTITION BY ClientId ORDER BY id DESC) AS rj
FROM jobqueue AS j
)
S... | true |
2b496fd1e94b5b57065e27d42ff22e21f7e3c218 | SQL | BlankEason/tx_fashion | /tx_fashion_serve/tx_fashion.sql | UTF-8 | 13,250 | 2.75 | 3 | [
"Apache-2.0"
] | permissive |
SET NAMES UTF8;
DROP DATABASE IF EXISTS tx_fashion;
CREATE DATABASE tx_fashion CHARSET=UTF8;
USE tx_fashion;
/*用户表*/
CREATE TABLE tx_user(
uid INT PRIMARY KEY AUTO_INCREMENT,
uname VARCHAR(50),
upwd VARCHAR(32),
email VARCHAR(32),
phone VARCHAR(32),
user_name VARCHAR(32)
);
... | true |
719403ed521dcff1c0cbc594a04256cb91e67fd4 | SQL | adamdecaf/customers | /migrations/013_chnage_validations_add_index.up.sql | UTF-8 | 95 | 3.03125 | 3 | [
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | create index idx_validations_validation_account_ids on validations (validation_id, account_id)
| true |
1a9e1083e0d5a2a3422f6bf3ce28690da3d6cb30 | SQL | schmalle/honeyalarmg2 | /install.sql | UTF-8 | 613 | 2.546875 | 3 | [
"Apache-2.0"
] | permissive | CREATE USER 'honeyalarmdev'@'localhost' IDENTIFIED BY 'honeyalarmpw';
CREATE USER 'honeyalarmprod'@'localhost' IDENTIFIED BY 'honeyalarmpw';
CREATE DATABASE honeyalarmdev;
CREATE DATABASE honeyalarmprod;
GRANT ALL PRIVILEGES ON honeyalarmdev.* TO 'honeyalarmdev'@'localhost' WITH GRANT OPTION;
GRANT ALL PRIVILEGES ON ... | true |
7c6c73080e04b96b8927f1dd0db68787b62a579f | SQL | jiaxf/rssminer | /src/rssminer.sql | UTF-8 | 5,338 | 3.125 | 3 | [] | no_license | SET COMPRESS_LOB DEFLATE;
----
SET DEFAULT_LOCK_TIMEOUT 120000;
----
set WRITE_DELAY 3000; -- default 500ms
----
CREATE TABLE users (
id INTEGER PRIMARY KEY auto_increment,
email VARCHAR UNIQUE,
name VARCHAR,
conf VARCHAR, -- json string
model VARCHAR, -- json string
... | true |
b00c2e573aa8792543ef4a7a5d4de561b0eb83aa | SQL | UFOP-CSI477/2019-02-atividades-mateusmpbr | /Prova/bd/create_complete_tcc_project.sql | UTF-8 | 3,086 | 3.421875 | 3 | [
"Apache-2.0"
] | permissive | -- MySQL Script generated by MySQL Workbench
-- Thu Dec 5 19:47:31 2019
-- 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_MODE='ON... | true |
0b945ea435ac8dfcb4d0c65fa60909a17e94e8db | SQL | babergma/javadogs-final-capstone | /final-capstone-theme-1/mvc_java/database/dogschema.sql | UTF-8 | 5,088 | 3.78125 | 4 | [] | no_license |
BEGIN TRANSACTION;
DROP TABLE IF EXISTS person, measurementType, goal, category, ingredient, person_goal, recipe, mealPlan, person_mealPlan, recipe_mealPlan, recipe_category, groceryList, ingredient_recipe, dayOfWeek, timeOfDay CASCADE;
CREATE TABLE person
(
user_id serial,
goal_id int,
firstN... | true |
6388226354e393d18d5945540ee35114543554c8 | SQL | chrpin/MIRROR | /examples/mysql/example4.sql | UTF-8 | 7,263 | 3.8125 | 4 | [
"Apache-2.0"
] | permissive | 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';
-- CREATE SCHEMA hotel_manager;
-- USE hotel_manager;
-- -----------------------------------------------------
-- Table pais
-- -------... | true |
fd1ef00b792ab3b74ff7b1b5a33c0343a828df79 | SQL | liu121633/ki-in-mis-framework-core | /sql.sql | UTF-8 | 1,736 | 3.421875 | 3 | [] | no_license |
/*缴费记录表添加两个字段*/
ALTER TABLE `payment`
ADD COLUMN paylessonnumber INT COMMENT '缴费课时';
ALTER TABLE `payment`
ADD COLUMN benefactorlessonnumber INT COMMENT '赠送课时';
/*添加课时记录表*/
DROP TABLE IF EXISTS hourrecord;
CREATE TABLE hourrecord(
hourrecordid INT AUTO_INCREMENT PRIMARY KEY COMMENT '编号主键自增',
StudentNumber VARC... | true |
91614ac6dd87a617e953516ef93a4c8b37895d58 | SQL | manfred0608/cloud-project | /backend/mysql/twitter/tweets-init.sql | UTF-8 | 1,083 | 3.515625 | 4 | [] | no_license | CREATE TABLE `tweets` (
`id` bigint(64) unsigned NOT NULL,
`user_id` bigint(64) unsigned NOT NULL,
`created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`text_censored` varchar(1023) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`sentiment_score` int(10) NOT NULL DEFAULT '0'
)
ENGINE=MyISAM
DEFAULT ... | true |
c30455982c45a3fac9d4db8d273f7b1658a47ea9 | SQL | janesk90/dba | /storps.sql | UTF-8 | 7,280 | 3.640625 | 4 | [] | no_license | DELIMITER $$
CREATE DEFINER=`root`@`localhost` PROCEDURE `set_active`(_id INT, _isactive INT)
BEGIN
START TRANSACTION;
UPDATE customers
SET
customers_active = _isactive
WHERE
customers_id = _id;
COMMIT;
END$$
DELIMITER ;
DELIMITER $$
CREATE DEFINER=`root`@`localhost` PROCEDURE `add_custome... | true |
4d48ac1cf75e7f6d8e040087c8cf8a9e48c031e3 | SQL | Purushottam-BCA/SQL-Practise | /7. Update.SQL | UTF-8 | 1,991 | 3.015625 | 3 | [] | no_license | SQL> select * from dept;
DEPTNO DNAME LOCATION
---------- --------------- --------------------
1 ACCOUNTING NEW YORK
2 RESEARCH DALLAS
3 SALES CHICAGO
4 OPERATIONS BOSTON
5 LAB DELHI
6 Store BUXAR
/---... | true |
5676799dca6fa4372da3f582f88ddb5331d2efd1 | SQL | Dmart331/chinook-Dmart331 | /invoice_sales_2011.sql | UTF-8 | 253 | 3.28125 | 3 | [] | no_license | select InvoiceId,
InvoiceDate,
BillingCountry,
(select sum(total) from Invoice WHERE InvoiceDate BETWEEN "2010-12-32 00:00:00" AND "2011-12-31 00:00:00") total
from Invoice
WHERE InvoiceDate BETWEEN "2010-12-32 00:00:00" AND "2011-12-31 00:00:00" | true |
c1d28dcf0e6448573512b616b6fbd776b41b5833 | SQL | ovgusev/2019-11-otus-spring-gusev | /31 Lesson/31-docker/src/main/resources/schema.sql | UTF-8 | 926 | 3.859375 | 4 | [] | no_license | DROP TABLE IF EXISTS COMMENTS;
DROP TABLE IF EXISTS BOOKS;
DROP TABLE IF EXISTS AUTHORS;
DROP TABLE IF EXISTS GENRES;
CREATE TABLE AUTHORS(
ID INTEGER GENERATED ALWAYS AS IDENTITY PRIMARY KEY,
NAME VARCHAR(255) NOT NULL,
CONSTRAINT AUTHORS_UK UNIQUE(NAME)
);
CREATE TABLE GENRES(
ID INTEGER GENERATED ALWAYS AS I... | true |
6a8221de93cc945c3f1fa59969bdc6166cc45ed6 | SQL | sparkaochong/sql | /sql/14_事务.sql | UTF-8 | 3,564 | 4.53125 | 5 | [] | no_license | -- 事务(transaction)
-- 账户表
CREATE TABLE account(
id NUMBER(4),
name VARCHAR2(20),
money NUMBER(18,2)
);
INSERT INTO account(id,name,money) VALUES(1,'zhangsan',300);
INSERT INTO account(id,name,money) VALUES(2,'lisi',400);
COMMIT;
-- 业务:张三给李四转账200元
UPDATE account SET money = money - 200 WHERE name='zhangsan... | true |
4b22c842245010f7624af37dc4440c56e31d0eb9 | SQL | ivanknow/provamovel-web-client | /provamovelserverplay/conf/evolutions/default/1.sql | UTF-8 | 3,383 | 3.578125 | 4 | [
"Apache-2.0"
] | permissive | # --- Created by Ebean DDL
# To stop Ebean DDL generation, remove this comment and start using Evolutions
# --- !Ups
create table alternativa (
id bigint auto_increment not null,
indice bigint,
titulo varchar(255),
questao_id big... | true |
7c87712e7f5ddb67a91ee2d9e0abc81299a8acf4 | SQL | joelzeal/fullstack-nanodegree-vm | /vagrant/tournament/tournament.sql | UTF-8 | 1,156 | 3.984375 | 4 | [] | no_license | -- Table definitions for the tournament project.
--
-- Put your SQL 'create table' statements in this file; also 'create view'
-- statements if you choose to use it.
--
-- You can write comments in this file by starting them with two dashes, like
-- these lines here.
-- drop the tournament database if it alreadty exis... | true |
728aafad3741bf8f248b44509e01e3b7d6ec2e0d | SQL | whvixd/course-selection-system | /src/test/resoueces/ocls.sql | UTF-8 | 55,503 | 3.15625 | 3 | [] | no_license | /*
Navicat MySQL Data Transfer
Source Server : localhost
Source Server Version : 50718
Source Host : localhost:3306
Source Database : ocls
Target Server Type : MYSQL
Target Server Version : 50718
File Encoding : 65001
Date: 2017-06-08 15:54:41
*/
SET FOREIGN_KEY_CHECKS=0;
-- ----... | true |
d4bc0d332ec37004dbabfad152c6e4934135289e | SQL | abdulazizsalic/Mini-Project | /Sql/payrolls.sql | UTF-8 | 1,480 | 2.703125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.7.9
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1:3306
-- Generation Time: May 22, 2018 at 07:11 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 |
0a8f00aef210c78375142cb209eb6b0e989079e2 | SQL | michaelcunningham/oracledba | /scripts/implement_resource_plan.sql | UTF-8 | 3,291 | 3.296875 | 3 | [] | no_license | set echo on time on timing on
set heading on
set serveroutput on
spool implement_resource_plan.log
DECLARE
begin
sys.dbms_resource_manager.clear_pending_area();
sys.dbms_resource_manager.create_pending_area();
sys.dbms_resource_manager.create_consumer_group(CONSUMER_GROUP=>'CPU_QUERY_TIME_LIMIT_GRP',
... | true |
bd9de84e4746b1fe925d632c679c9bf966613a75 | SQL | boenkkk/Java-Desktop | /java_db.t_person.sql | UTF-8 | 917 | 3.4375 | 3 | [] | no_license | use java_db;
create table java_db.T_PERSON (
id integer auto_increment primary key,
`name` varchar(100) unique not null,
password varchar(200) not null
) engine=InnoDB;
select * from java_db.t_person;
select count(*) from T_PERSON where name ='a' and password='a';
DELETE FROM java_db.t_person where id=4;
#Proc;... | true |
1db1cbd589f61c9b887354bd304c93cee9633a78 | SQL | AlanNggg/takeaway_king | /takeaway_king.sql | UTF-8 | 19,199 | 3.328125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.8.2
-- https://www.phpmyadmin.net/
--
-- 主機: 127.0.0.1
-- 產生時間: 2018 年 12 月 29 日 09:48
-- 伺服器版本: 10.1.34-MariaDB
-- PHP 版本: 7.2.7
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARA... | true |
ef36b3cbe5daf1b58f440942640a1548567ee0ea | SQL | hunkhl/skynet-qp-server | /db_sql_files/gamedb-struct-2021-09-15.sql | UTF-8 | 46,343 | 3.53125 | 4 | [] | permissive | /*
Navicat Premium Data Transfer
Source Server : jlb-mysql
Source Server Type : MySQL
Source Server Version : 50733
Source Host : :3306
Source Schema : gamedb
Target Server Type : MySQL
Target Server Version : 50733
File Encoding : 65001
Date: 15/09/2021 19:34:35
*/
... | true |
324df345451b73b52067ce9166982df1af5a6eda | SQL | chaesiong/rtp-database | /production/SYSTEM/tables/logmnrc_seq_gg.sql | UTF-8 | 1,091 | 3.21875 | 3 | [] | no_license | CREATE TABLE "SYSTEM"."LOGMNRC_SEQ_GG" SHARING=METADATA
( "LOGMNR_UID" NUMBER NOT NULL ENABLE,
"OBJ#" NUMBER NOT NULL ENABLE,
"COMMIT_SCN" NUMBER NOT NULL ENABLE,
"DROP_SCN" NUMBER,
"SEQ_FLAGS" NUMBER NOT NULL ENABLE,
"OWNER#" NUMBER NOT NULL ENABLE,
"OWNERNAME" VARCHAR2(384) NOT NULL ENABLE,
... | true |
cb4da8f2fda6b5ef69fa89dfe62c99cff264f37c | SQL | zhengbingyanbj/JavaSE | /JavaEE就业班多线程和数据库/day17/sql文件/03_修改表.sql | UTF-8 | 870 | 3.65625 | 4 | [] | no_license | /*
修改表 添加列
alter table 表名 add 列名 数据类型(长度) [约束];
给分类表添加一列数据 desc varchar(100)
*/
ALTER TABLE category ADD `desc` VARCHAR(100);
/*
修改列 数据类型
将desc的类型改为int类型
alter table 表名 modify 列名 数据类型(长度) [约束];
*/
ALTER TABLE category MODIFY `desc` INT;
/*
修改列 修改列名 数据类型 约束
将desc的列 改为 description varchar(100) not null
a... | true |
c4ebf3b85d15d2c1652c74154c4e26ce7e53fc93 | SQL | salvadorhm/kuorra | /mvc/data/schema.sql | UTF-8 | 724 | 3.234375 | 3 | [] | no_license | DROP DATABASE acme_store_mvc;
CREATE DATABASE acme_store_mvc;
USE acme_store_mvc;
CREATE TABLE products (
id_product int(11) NOT NULL AUTO_INCREMENT PRIMARY KEY,
product varchar(100) NOT NULL,
stock float NOT NULL,
description varchar(200) NOT NULL,
purchase_price float NOT NULL,
price_sale float NOT NUL... | true |
cc315eaf948ed38bdba67ec9ab4c06bdb5a9dff3 | SQL | noackorama/MurmelnPlugin | /murmeln_install.sql | ISO-8859-1 | 299 | 2.84375 | 3 | [] | no_license | --
-- Tabellenstruktur fr Tabelle `murmeln_highscore`
--
CREATE TABLE IF NOT EXISTS `murmeln_highscore` (
`id` int(10) unsigned NOT NULL auto_increment,
`score` int(10) unsigned NOT NULL,
`name` varchar(100) NOT NULL,
`user_id` varchar(32) NOT NULL,
PRIMARY KEY (`id`)
) TYPE=MyISAM; | true |
5b9f9015189cd5b2cda77c94a3db647f536a7c85 | SQL | bkjeon1614/java-example-code | /spring-boot-security-mybatis/src/main/resources/static/db/user.sql | UTF-8 | 639 | 3.125 | 3 | [] | no_license | CREATE TABLE `role` (
`role_id` int(11) NOT NULL AUTO_INCREMENT,
`role` varchar(255) DEFAULT NULL,
PRIMARY KEY (`role_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
INSERT INTO `role` VALUES (1,'ADMIN');
CREATE TABLE `user` (
`user_id` int(11) NOT NULL AUTO_INCREMENT,
`active` int(11) DEFAULT 0,
`login_id` va... | true |
def566e923bd873f0027bf8ff34cf774f66e92b4 | SQL | apache/cloudstack | /setup/db/create-database.sql | UTF-8 | 1,902 | 3 | 3 | [
"GPL-2.0-only",
"Apache-2.0",
"BSD-3-Clause",
"MIT",
"GPL-1.0-or-later",
"LicenseRef-scancode-public-domain",
"BSD-2-Clause",
"LicenseRef-scancode-unknown"
] | permissive | -- Licensed to the Apache Software Foundation (ASF) under one
-- or more contributor license agreements. See the NOTICE file
-- distributed with this work for additional information
-- regarding copyright ownership. The ASF licenses this file
-- to you under the Apache License, Version 2.0 (the
-- "License"); you may... | true |
b5ba263bdc665574a97474b08372fa947c58c7a3 | SQL | templatevk/GalaxyEclipse | /sql1/insert.sql | UTF-8 | 5,358 | 3.53125 | 4 | [] | no_license | use ge;
# dictionaries
insert into item_type
(item_type_name)
values
('engine'),
('weapon'),
('bonus'),
('sale'),
('money');
insert into bonus_type
(bonus_type_name)
values
('armor'),
('hp_regen'),
('energy_regen'),
('speed_rotation'),
('speed_move'),
('acceleration_rotation'),
('accelerat... | true |
571ec051f0812acf7656193bb5b952249ecba93e | SQL | mhoffman123/Dental-sql | /reservation_resources.sql | UTF-8 | 2,010 | 3.328125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.8.3
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Nov 30, 2018 at 12:15 AM
-- Server version: 10.1.36-MariaDB
-- PHP Version: 7.2.11
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OL... | true |
19f24eeb02683e18a8641fe63b71af4fadf7c2de | SQL | daking0/b_OracleDB | /_2019_04_25/_39_SELECT_Question.sql | UHC | 3,163 | 4.375 | 4 | [] | no_license | -- ذϼ
1. ȭа 1г л л ˻ϼ
SELECT AVG(avr)
FROM student;
SELECT *
FROM student
WHERE avr <= (SELECT AVG(avr)
FROM student
)
AND syear = '1'
AND major = 'ȭ';
2. Ϲ ȭ ϴ л л ̸ ˻ϼ
SELECT sname
FROM student
NATURAL JOIN course
NATURAL JOIN score
W... | true |
75a7d52462431783b23f46820f5d44ecfd284e21 | SQL | echalkpad/t4f-data | /sql/statement/src/main/resources/io/datalayer/sql/group/select-group-by-2.sql | UTF-8 | 330 | 3.4375 | 3 | [
"Apache-2.0"
] | permissive | SELECT
pings,
MIN(pageview_id) as min_pageview_id,
MAX(pageview_id) as max_pageview_id,
COUNT(*) as pageviews
FROM
(
SELECT
pageview_id,
COUNT(*) as pings
FROM
table1
WHERE
contract_id = "name" and
recorddate = "2013-06-10"
GROUP BY
pagview_id
) pvoverview
GROUP BY pings
ORDER BY pings desc
L... | true |
3ac7ea303703fec494ade331a7249535cc673882 | SQL | BTKMarioPandi/balatmas | /balatmas_pekanbaru.sql | UTF-8 | 5,334 | 2.953125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.8.5
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Jul 25, 2019 at 12:52 PM
-- Server version: 10.1.38-MariaDB
-- PHP Version: 7.2.16
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OL... | true |
e9978fb72223a597357f476e4c7189ff4dce4a74 | SQL | 964349930/ybao | /database.sql | UTF-8 | 3,749 | 3.046875 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.0.10deb1
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Sep 22, 2014 at 10:52 AM
-- Server version: 5.5.38-0ubuntu0.14.04.1
-- PHP Version: 5.5.9-1ubuntu4.3
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CL... | true |
e82dad9416277a41ea1e6222eea528340ab9acb4 | SQL | Djamil17/ERNIE | /Analysis/generic_network/generic.sql | UTF-8 | 4,506 | 3.8125 | 4 | [
"MIT"
] | permissive | \set ON_ERROR_STOP on
\set ECHO all
-- Script to extract relevant data for Generic csv input of wosIDs
-- Author: George Chacko 12/29/2017
-- Either replace generic with case study name or rename case-study input file with generic
-- The output of this file should be passed to the .R batch file in the same Github... | true |
938fff564b56a0bbbd1b8c1f2013c65fb1846682 | SQL | leehojae/taekbae | /taetaetae/docs/spms-data.sql | UTF-8 | 3,986 | 2.703125 | 3 | [
"Unlicense"
] | permissive | /* MEMBERS DATA*/
INSERT INTO MEMBERS
( MNAME , EMAIL , TEL , PWD )
VALUES ('홍길동','1','111-1111','1111');
INSERT INTO MEMBERS
( MNAME , EMAIL , TEL , PWD )
VALUES ('임꺽정','2','222-2222','1111');
INSERT INTO MEMBERS
( MNAME , EMAIL , TEL , PWD )
VALUES ('장보고','3','333-3333','1111');
INSERT INTO MEMBERS
( M... | true |
bb712553798b668f5ac7191fa4006a39de9252eb | SQL | fekete20/B5T3ZNdBMScGyak | /B5T3ZN_210330/webshop.sql | UTF-8 | 2,547 | 3.828125 | 4 | [] | no_license | CREATE TABLE customers (
id INT PRIMARY KEY NOT NULL,
fullName VARCHAR(50),
age INT CHECK(age > 0)
);
CREATE TABLE orders (
id INT PRIMARY KEY NOT NULL,
customer INT,
FOREIGN KEY (customer) REFERENCES customers(id) ON DELETE CASCADE
);
CREATE TABLE products (
id INT PRIMARY KEY NOT NULL,
productNa... | true |
5d82a05b53abddaa1bca299d4aeaf6acc5d878e6 | SQL | its-gio/spon-me | /db/events/get_attendees.sql | UTF-8 | 136 | 3.09375 | 3 | [] | no_license | SELECT eu.event_id, eu.user_id, u.first_name, u.last_name, eu.has_arrived
FROM users u
JOIN event_users eu
ON u.user_id = eu.user_id | true |
ec11428ee273580e052c63be7afeda014eb375e3 | SQL | wisdman/oitp-iso | /sql/initdb.d/300-training/14-image-differences/01-data.sql | UTF-8 | 1,536 | 3.796875 | 4 | [] | no_license | -- DROP TABLE trainer.image_differences_data CASCADE;
CREATE TABLE trainer.image_differences_data (
"id" integer NOT NULL,
"imageA" smallint NOT NULL,
"imageB" smallint NOT NULL,
"differences" jsonb NOT NULL,
"enabled" boolean NOT NULL DEFAULT TRUE,
CONSTRAINT trainer__image_differences_data__pkey PRIMAR... | true |
5f5a00896bfd8699c09ee00e7092dafec9ea61ca | SQL | jasonish/evebox | /resources/sqlite/migrations/V1__Initial.sql | UTF-8 | 1,516 | 3.75 | 4 | [
"MIT"
] | permissive | CREATE TABLE events (
-- Implicit rowid column is the event id and primary key.
-- Timestamp in nanoseconds since the epoch.
timestamp INTEGER NOT NULL,
-- The archived flag is stored as a column as I don't think you can update
-- json fields with an update statement.
archived INTEGER DEFAULT 0,
-- Es... | true |
2c727f8a29eac098631696fb6bf882680bcfb202 | SQL | breakrider/TP2_Base | /TP2_etape_6.sql | UTF-8 | 1,008 | 4.03125 | 4 | [] | no_license | #1
select concat(tbl_usager.nom_usager, " ", tbl_usager.prenom_usager) as nom_prenom,
tbl_local.nom_local,
tbl_poste.desc_poste
from tbl_usager
left join tbl_poste
on tbl_usager.pk_id_usager= tbl_poste.pk_id_poste
inner join tbl_local
on tbl_usager.fk_tbl_local_id_local = tbl_local.pk_id_local;
#2
select
(select count... | true |
93d25683c1bcec337547065bb88bd25c5f4db401 | SQL | rwahs/import-scripts | /importScripts/sql/testImports/conservation.sql | UTF-8 | 2,179 | 3.59375 | 4 | [
"MIT"
] | permissive | # find at least 2 representative values for each field
(SELECT PrimaryKey_Object_Table
FROM ObjectsExport
WHERE ConditionReport IS NOT NULL
LIMIT 2)
UNION (SELECT PrimaryKey_Object_Table
FROM ObjectsExport
WHERE ConditionSurveyedBy IS NOT NULL
LIMIT 2)
UNION (SELECT PrimaryKey... | true |
9228576fde557d79d48164f72877d13b86d41cfa | SQL | payssion/bankapi | /TABLES/messages.sql | UTF-8 | 481 | 2.96875 | 3 | [
"MIT"
] | permissive | CREATE TYPE messagestate AS ENUM ('SENDING','SENT','UNPROCESSED', 'PROCESSING', 'PROCESSED', 'ERROR');
CREATE TABLE Messages (
MessageID text not null,
MessageType text not null,
FileID text not null,
FromBankID text not null,
ToBankID text not null,
Cipherdata bytea not null,
DeliveryReceipt bytea,
Datestamp timestam... | true |
9e6647c9b2e441f5a9b8593b6260544cd998f47c | SQL | DpadamsX/DpadamsX | /views/dba/_Earlier_or_scratch/target_count_plus.sql | UTF-8 | 559 | 2.859375 | 3 | [] | no_license | DROP VIEW IF EXISTS api.target_count_plus;
CREATE VIEW api.target_count_plus AS
select coalesce(hsys.name_,'') AS hsys_name,
tc.qualified_name,
tc.records_count,
tc.count_date,
tc.count_dts
from target_count tc
left join hsys on hsys.id = tc.hsys_id;
ALTER VIEW dba.test_failed_focus
OWN... | true |
5c6232c6a0bb4acfbbbc7542645b83fdbec6056d | SQL | Zuxelator/job4j_grabber | /ex.sql | UTF-8 | 684 | 3.984375 | 4 | [] | no_license | --В одном запросе получить
--имена всех person, которые не состоят в компании с id = 5;
--название компании для каждого человека.
select person.name, company.name from person LEFT JOIN company on company_id = company.id where company_id != 5;
--Необходимо выбрать название компании с максимальным количеством человек + ... | true |
8531c33807a7b42795a32fc365b225efd4d626a1 | SQL | forsman5/Challonge-Elo-Calculator | /Stored Procedures/DeletePlacings.sql | UTF-8 | 177 | 2.78125 | 3 | [] | no_license | DROP PROCEDURE IF EXISTS DeletePlacings;
DELIMITER //
CREATE PROCEDURE DeletePlacings
(
IN id INT
)
BEGIN
DELETE FROM placings
WHERE player_id = id;
END //
DELIMITER ; | true |
61c0a5347881527c66722d5b4965605d487cfcb3 | SQL | SrAjinkyaY/Covid_Health_Care | /Database/covid_health_care.sql | UTF-8 | 15,101 | 2.8125 | 3 | [] | no_license | CREATE DATABASE IF NOT EXISTS `covid_health_care` /*!40100 DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci */ /*!80016 DEFAULT ENCRYPTION='N' */;
USE `covid_health_care`;
-- MySQL dump 10.13 Distrib 8.0.22, for Win64 (x86_64)
--
-- Host: 127.0.0.1 Database: covid_health_care
-- ----------------------... | true |
c106d35ac6ef2d1a722e3dca6e648a37d304e995 | SQL | captainM1/PMFKG | /II godina/Zimski semestar/BP1/Kolokvijumi/2. kolokvijum/2015-2016/Regularni/Resenja asistenata/II_regularni_2015-16_rešenje.sql | UTF-8 | 4,894 | 3.828125 | 4 | [
"MIT"
] | permissive | /*
Resenje redovnog kolokvijuma 2015-2016
*/
use socialNetwork
-- 1. zadatak
select max(p.datumObjave)
from Post p join tipPosta tp on p.idTipa = tp.idTipa and tp.tip = 'slika'
-- 2. zadatak
select k.ime , (
select count(*)
from Prijatelji p
where k.id = p.idKorisnika1
) a... | true |
a5ffa211e73acd4ebc1ade1e8793a1ef09d4e461 | SQL | kmamalias/Scala | /Spark-Scala/input/Solutions/Task 3 Table and Job Definition.ddl | UTF-8 | 2,487 | 4.0625 | 4 | [] | no_license | /*
Assume that everytime a csv file is processed, we will collect information from that load.
At the beginning of the job, we will refer to the load history table to check if the same file has been processed already.
If an identical input file is transferred to the system, the procedure LOAD_CLICKLOG_MERGE, is exe... | true |
5083f53b913118a671b184fa36208634c34bf32f | SQL | ELLINM/coding_tutorial | /Web/190628/sql.sql | UTF-8 | 821 | 3.859375 | 4 | [] | no_license |
CREATE TABLE CUSTOMER (
CUSTOMERID VARCHAR2(30) primary key,
CUSTOMERPW VARCHAR2(30),
NAME VARCHAR2(30),
PHONE VARCHAR2(30),
BIRTHDATE VARCHAR2(60) DEFAULT SYSDATE, --원하면 VARCHAR2로 수정가능
ADDRESS VARCHAR2(60),
INDATE DATE DEFAULT SYSDATE
);
CREATE TABLE PRODUCT(
PRODUCTSEQ NUMBER(6) PRIMARY KEY,
NAME VARCHAR2(30),
QUA... | true |
59b657c8cafc7af8c07087d5c5845baa752f7eab | SQL | mikoto20000/railsgun | /config/init.mysql | UTF-8 | 4,585 | 3.3125 | 3 | [] | no_license | /*********************************************************************
* トラッカーの設定
********************************************************************/
/*** サポートをタスクに変更 ***/
UPDATE trackers SET name='タスク' WHERE name='サポート';
/*** レビュー依頼のトラッカーの設定 ***/
INSERT INTO trackers (name,position,is_in_roadmap) VALUES ('レビュー依頼... | true |
811e1a8a9c0de41593d921d32357f7132ee76b03 | SQL | jianajavier/csc343_a2 | /A2/part-1/q6.sql | UTF-8 | 1,457 | 4.15625 | 4 | [] | no_license | SET search_path TO artistdb;
CREATE VIEW CanadianArtists AS
SELECT name, artist_id
FROM Artist
WHERE nationality = 'Canada';
-- create scenario with two in one year, it doesnt exist right now
CREATE VIEW FirstAlbum AS
SELECT album_id, Album.artist_id, title, year
FROM Album, (SELECT CanadianArtists.artist_... | true |
d34e2facc0b7ad4459f8b57928e9c747e7508bac | SQL | zakipuzo/burgermachine | /Database/burgermachinedb.sql | UTF-8 | 2,885 | 3.515625 | 4 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.8.4
-- https://www.phpmyadmin.net/
--
-- Hôte : 127.0.0.1:3306
-- Généré le : ven. 01 mai 2020 à 05:32
-- Version du serveur : 5.7.24
-- Version de PHP : 5.6.40
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET... | true |
2c1e6bad76e97a8b2825656d50008f30fe3cb993 | SQL | logonin/pop | /src/main/resources/china_pop.sql | UTF-8 | 257,176 | 2.875 | 3 | [] | no_license | /*
Navicat MySQL Data Transfer
Source Server : 10.1.9.99
Source Server Version : 50717
Source Host : 10.1.9.99:3305
Source Database : myinsure
Target Server Type : MYSQL
Target Server Version : 50717
File Encoding : 65001
Date: 2019-01-09 13:44:19
*/
SET FOREIGN_KEY_CHECKS=0;
-- ... | true |
f514867e747bc01c282520185a909d23dccbdc85 | SQL | martinwojtus/extension-blog | /DDL.sql | UTF-8 | 823 | 3.203125 | 3 | [
"LicenseRef-scancode-warranty-disclaimer"
] | no_license |
ALTER TABLE pk_blog_post ADD tag1 VARCHAR(100);
ALTER TABLE pk_blog_post ADD tag2 VARCHAR(100);
ALTER TABLE pk_blog_post ADD tag3 VARCHAR(100);
ALTER TABLE pk_blog_post ADD tag4 VARCHAR(100);
ALTER TABLE pk_blog_post ADD tag5 VARCHAR(100);
ALTER TABLE pk_blog_post ADD tag6 VARCHAR(100);
ALTER TABLE pk_blog_post ADD ta... | true |
3178bfcca705842f91a17f4e9909a2acf56955d8 | SQL | paulus-22/12S2203-Project | /DatabasePbo Versi 1.0.sql | UTF-8 | 2,481 | 3.75 | 4 | [] | no_license | -- proyek database pbo
CREATE DATABASE ParkSytemDB
ON
PRIMARY (NAME = ParkSytemDBPrimary,
FILENAME ='E:\Materi kuliah\Semester 4\PBO\Database.mdf',
SIZE = 30MB,
MAXSIZE = 200MB,
FILEGROWTH = 10% )
LOG ON
(NAME = ParkSytemDBLog,
FILENAME ='E:\Materi kuliah\Semester 4\PBO\Database.ldf... | true |
4fd4f2bbc061976fd54d6d9b25403df2843750a4 | SQL | FallenMap/SalvandoVidas | /Scripts/(13) Script procedimientos almacenados y funciones.sql | UTF-8 | 15,015 | 3.515625 | 4 | [] | no_license | -- ------------------------------------------------------------------------------------
-- Procedimientos relacionados a actualizaciones y borrados
-- procedimiento upgrade mascota
drop procedure if exists proc_up_mascota;
DELIMITER $$
create procedure proc_up_mascota(
in id int,
in tipo_id int,
in col... | true |
d64cd5b01a55fa7ae93c5ee016d05a37b2055011 | SQL | vito-dante/empezando-con-git | /Inventario/database inventory.sql | UTF-8 | 7,350 | 3.375 | 3 | [] | no_license | /*==============================================================*/
/* DBMS name: MySQL 5.0 */
/* Created on: 7/12/2014 4:22:31 AM */
/*==============================================================*/
drop table if exists CARGO;
drop table if exists ... | true |
6ecd72dd55f545a265978b18b683d9ae61546890 | SQL | hjj183153/mypro-ui | /vue_server_00/db.sql | UTF-8 | 363 | 2.59375 | 3 | [] | no_license | USE xz;
CREATE TABLE xz_login(
id INT PRIMARY KEY AUTO_INCREMENT,
uname VARCHAR(50),
upwd VARCHAR(32)
);
INSERT INTO xz_login VALUES(null,'tom',md5('123'));
INSERT INTO xz_login VALUES(null,'jerry',md5('123'));
#为商品表添加一列
ALTER TABLE xz_laptop ADD img_url VARCHAR(255);
#每一个商品图片
UPDATE xz_laptop SET img_url = ... | true |
3cf898f221cee37137a2446deaa5f93a91fdeb1f | SQL | candrasaputra/codewars | /5kyu/calculatingRunningTotal.sql | UTF-8 | 203 | 3.203125 | 3 | [] | no_license | SELECT
DATE(created_at) as date,
COUNT(created_at) as count,
SUM(COUNT(created_at)) OVER (ORDER BY DATE(created_at))::integer as total
FROM posts
GROUP BY DATE(created_at)
ORDER BY DATE(created_at) | true |
40117ef7a7517325d415517fb865a7903a37652e | SQL | rrighetti/cscripts | /sql/deprecated/tablespaces_over_32gb.sql | UTF-8 | 1,750 | 3.625 | 4 | [] | no_license | SET HEA ON LIN 500 PAGES 100 TAB OFF FEED OFF ECHO OFF VER OFF TRIMS ON TRIM ON TI OFF TIMI OFF;
COL current_time NEW_V current_time FOR A15;
SELECT 'current_time: ' x, TO_CHAR(SYSDATE, 'YYYYMMDD_HH24MISS') current_time FROM DUAL;
COL x_host_name NEW_V x_host_name;
SELECT host_name x_host_name FROM v$instance;
COL x_d... | true |
fdff59b997c763fe93bf59e35b2ca0e5f116047b | SQL | richobaltasar/Library-KairosTest | /Database/dbo/Stored Procedures/UserData/SP_GetUserDataMaster.sql | UTF-8 | 280 | 2.84375 | 3 | [] | no_license | CREATE PROCEDURE SP_GetUserDataMaster
@Id bigint,
@search nvarchar(max)
AS
BEGIN
SET NOCOUNT ON;
if(@Id = 0)
begin
select*from UserData where NamaLengkap like '%'+@search+'%'
end
else if(@Id != 0 and @search = '')
begin
select*from UserData where id = @Id
end
END | true |
d53c160d77199507c9ab307f54b87d413ebfdcf2 | SQL | kostz/website-monitor | /sql/create_database.sql | UTF-8 | 312 | 3.515625 | 4 | [] | no_license | create table if not exists website(
id serial,
url varchar,
primary key (id),
unique(url)
);
create table if not exists website_mon(
request_time timestamp,
website_id int not null,
elapsed int,
http_status_code int,
pattern_match boolean,
foreign key (website_id) references website(id)
);
| true |
45b51672108ec79535b3e5730ffce9828c2dbb8f | SQL | UpVent/php-inventory-system | /db.sql | UTF-8 | 13,941 | 3.25 | 3 | [
"MIT"
] | permissive | --
-- PostgreSQL database dump
--
-- Dumped from database version 11.5 (Debian 11.5-1+deb10u1)
-- Dumped by pg_dump version 11.5 (Debian 11.5-1+deb10u1)
SET statement_timeout = 0;
SET lock_timeout = 0;
SET idle_in_transaction_session_timeout = 0;
SET client_encoding = 'UTF8';
SET standard_conforming_strings = on;
SEL... | true |
21dd2f092a2d4d0a7aede9ad0533ae2b0a94f0e7 | SQL | silence-do-good/stress-test-Postgres-and-MySQL | /dump/high/day28/select0021.sql | UTF-8 | 178 | 2.625 | 3 | [] | no_license |
SELECT timeStamp, temperature FROM ThermometerOBSERVATION o
WHERE timestamp>'2017-11-27T00:21:00Z' AND timestamp<'2017-11-28T00:21:00Z' AND temperature>=12 AND temperature<=72
| true |
a9f55a45c6098de3bfb940702f916efc00e0f12f | SQL | ainanitajriyan/sampahpwpb | /db_pwpb_convod(1).sql | UTF-8 | 27,768 | 2.765625 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.9.0.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: May 25, 2020 at 07:27 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 |
ffeadd7b743adb34e3a3569f7d933825ef6b5f56 | SQL | sirlatrom/persistent-ds-cplusplus | /build/gofigure_sequential.sql | UTF-8 | 530 | 3.109375 | 3 | [] | no_license | select load_extension('/home/s062372/lib/libsqlitefunctions.so');
select
operation,
implementation,
count,
avg(duration/1e6) as 'avg dur (ms)',
1.96*stdev(duration/1e6) as '1.96*stdev of avg dur (ms)',
avg(duration/1e6/count) as 'avg dur (ms)',
1.96*stdev(duration/1e6/count) as '1.96*stdev of avg dur (ms)... | true |
e9ecb700ab39e70bf09708b2cb130fe7354d6217 | SQL | Frechman/SQLSamples | /Stepic/PostgreSQL/module10/task1.sql | UTF-8 | 410 | 3.40625 | 3 | [] | no_license | --https://stepik.org/lesson/57264/step/2
WITH bar AS (
SELECT tag, count AS count
FROM (
SELECT (each(wiki)).key as tag, COUNT(*)
FROM planet
WHERE wiki @> 'danger => 1'
GROUP BY tag
) AS foo
WHERE tag in ('dinosaurs', 'weapons', 'pirates', 'earthquakes'... | true |
d0be1c59e2cac43026337ae5c334d4cdbb26e75a | SQL | psallandre/IVRM | /ETS/Database/ServiceScript/DeleteOptionWithSyntheticRootFromTradeTable.sql | UTF-8 | 206 | 2.859375 | 3 | [] | no_license | -- Get SU Options with 'select *' and delete them with 'delete Trade'
--delete Trade
select *
FROM Trade JOIN OptionRoot
ON OptionRoot.OptionrootID = Trade.OptionrootID
WHERE OptionRoot.isSynthetic = 1
| true |
7af9aa2915ac5ca977eaf667604dff5d75a1e5d1 | SQL | mmiroshnichenko/spring-basics-grom | /src/main/sql/CREATE_PASSENGER_TABLE.sql | UTF-8 | 279 | 2.6875 | 3 | [] | no_license | CREATE TABLE PASSENGER (
ID NUMBER,
CONSTRAINT PASSENGER_PK PRIMARY KEY(ID),
LAST_NAME NVARCHAR2(50),
NATIONALITY NVARCHAR2(50),
DATE_OF_BIRTH TIMESTAMP,
PASSPORT_CODE NVARCHAR2(20)
);
CREATE SEQUENCE PASSENGER_SEQ MINVALUE 1 START WITH 1 INCREMENT BY 1; | true |
2be7c8eb41e41d811de29fdcb3bf88bf6151d5e8 | SQL | jjljjl/pets-town | /sql/order.sql | UTF-8 | 506 | 3.421875 | 3 | [] | no_license | CREATE TABLE `t_user_order` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`u_id` int(11) DEFAULT NULL,
`pet_price` double DEFAULT NULL,
`pet_count` int(11) DEFAULT NULL,
`create_on` datetime DEFAULT NULL,
`p_id` int(11) DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `user_id` (`u_id`),
KEY `pet_id` (`p_id`),
CONST... | true |
d071db5ce5241dce76a2b451cdc52475f7123e5f | SQL | Ankit-k-karan/SQL-Common | /SQL Script/RFP 1/Migration sdms/08 district sector combination.sql | UTF-8 | 125,510 | 3.640625 | 4 | [] | no_license | --CREATE TABLE MD_DISTRICT_SECTOR
--(ID bigint not null identity(1,1)
-- , Stateid bigint
-- , Districtid bigint
-- ,SectorId Bigint
-- ,IsActive bit default 1)
insert into MD_DISTRICT_SECTOR(Stateid,Districtid,SectorId)
select distinct d.State_Name,d.id ,a.sectorid from md_Districts d inner join (
select '1' stat... | true |
d2917245968941234c1836964df4f33739d18207 | SQL | sengeiou/effect_platform | /hive/hive_rpt/lz_rpt_ep_client_summary_top.sql | UTF-8 | 2,079 | 3.328125 | 3 | [] | no_license | -- ##########################################################################
-- # Owner:nanjia.lj
-- # Email:nanjia.lj@taobao.com
-- # Date:2012/10/25
-- # ------------------------------------------------------------------------
-- # Description:月光宝盒无线产出汇总表
-- # Input:lz_fact_ep_wireless_ownership
-- # Onput:lz_rpt_e... | true |
a30cbfd5ac7d651041052ac6e748fe6172a9569e | SQL | hw233/xiangjingchuangshuo_server-c- | /Config/sql/region/Record.sql | UTF-8 | 2,439 | 3.609375 | 4 | [] | no_license | #点唱机数据
drop table if exists `music`;
create table `music` (
`zoneid` int(10) unsigned not null default 0, # 区id
`charid` bigint(20) unsigned not null default 0, # 玩家guid
`demandtime` int(10) unsigned not null default 0, # 点播时间
`status` int(10) unsigned not null default 0, # 状态
`mapid` int(10) unsigne... | true |
4c91914b720fd9bddf63376de822de01838472cb | SQL | zhenyang9261/web-hw12-node-mysql-bamazon | /schema.sql | UTF-8 | 541 | 3.328125 | 3 | [] | no_license | CREATE DATABASE bamazon_db;
USE bamazon_db;
CREATE TABLE products (
item_id INT NOT NULL AUTO_INCREMENT,
product_name VARCHAR(100) NOT NULL,
department_name VARCHAR(100) NULL,
price DECIMAL(10,2) NOT NULL,
quantity INT NOT NULL,
PRIMARY KEY (item_id)
);
CREATE TABLE departments (
department_id INT NOT ... | true |
70a3a961a345bcfceb7ba4f5f2c0985e80a5ea08 | SQL | kamaroly/bus | /bus.sql | UTF-8 | 3,869 | 2.96875 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.1.14
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Jan 02, 2015 at 01:53 PM
-- Server version: 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 |
da3ffa2bae4b441a49a369e16ee9a213050659cf | SQL | moujanmrj/Twitter- | /query/followings.sql | UTF-8 | 1,041 | 2.53125 | 3 | [] | no_license | insert into follow (username,followings)
select 'moujanmrj' , 'dayanamov'
where (exists(select username from users))and ('dayanamov' not in(select followings from follow where username = 'moujanmrj'));
insert into follow (username,followings)
select 'moujanmrj' , 'dayanamov'
where (exists(select username from user... | true |
5105e5507d2b804dd8e14ff63d089cb450682428 | SQL | HippocampusCoronatus/kasan | /src/main/resources/data/Kasan.sql | UTF-8 | 8,521 | 3.375 | 3 | [] | no_license | -- MySQL Script generated by MySQL Workbench
-- 12/04/17 00:03:31
-- 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_MODE='TRADITION... | true |
994f5b715ed19666bc96c9be148ec480c2749fb8 | SQL | venkatp1997/Big-Data-Project-2 | /product_region_sales_partition.sql | UTF-8 | 802 | 3.8125 | 4 | [] | no_license | CREATE TABLE IF NOT EXISTS nomosql_sales.product_region_sales_partition (orderid int, salespersonid int, customerid int, productid int, name varchar, price decimal(38,4), quantity int, amount decimal(38,4))
PARTITIONED BY (region varchar, year int, month int)
COMMENT 'Parquet products sales materialized table partition... | true |
69c3a17bd7b37d654270c475be29af62afc7b450 | SQL | joshuawhite/castle-age-tools | /database/Castle_Age_DDL.sql | UTF-8 | 3,031 | 3.703125 | 4 | [] | no_license | # Castle Age Database Definition
# DROP SCRIPT
DROP TABLE CA_Joshua;
DROP TABLE Guild_Member;
DROP TABLE Guild;
DROP TABLE Char_Achieve;
DROP TABLE Achievement;
DROP TABLE Stats;
DROP TABLE CA_Character;
# Base character table (minimal info from guild listing)
#
# CASUSER - Castle Age internal ID
# NAME - Player name... | true |
2cffb90ab6f91b4a9f9d2ac6ea6c8a9a0b1724e1 | SQL | JMPennington/Capstone | /com.WanderingTurtle/com.WanderingTurtle.EventDatabase/dbo/Stored Procedures/spSelectEventItem.sql | UTF-8 | 247 | 3.34375 | 3 | [] | no_license | CREATE PROCEDURE spSelectEventItem(@EventItemID int)
AS
SELECT EventItemID, EventItemName, EventTypeID, EventOnsite, Transportation, EventDescription, Active
FROM EventItem
WHERE Active = 1
AND EventItemID = @EventItemID
RETURN @@ROWCOUNT | true |
7c43748574f8fb6e34a7399a777d19b716783ba5 | SQL | charlye917/BaseDatos | /Scripts/Practica6/s-06-CAL-prueba-blobs.sql | UTF-8 | 1,206 | 3.484375 | 3 | [] | no_license | --@Elaborado por: Arteaga Lira Carlos Alberto
--@Fecha creación: 24/04/18
--@Descripción: Este script realiza una prueba para validar el manejo de BLOBs en un solo PDB.
--creando un objeto DIRECTORY para acceder al directorio /tmp/bdd
Prompt conectando a calbd_s2 como SYS
Prompt Proporcione el password de SYS
connect... | true |
6225cc9125815bbb47ac7fcaa5788b3c18777fe4 | SQL | wilianlk/empres | /app/config/database/estructura_proveedor.sql | UTF-8 | 2,810 | 3.140625 | 3 | [
"MIT"
] | permissive | -- MySQL dump 10.16 Distrib 10.2.15-MariaDB, for debian-linux-gnu (x86_64)
--
-- Host: localhost Database: atributos
-- ------------------------------------------------------
-- Server version 10.2.15-MariaDB-10.2.15+maria~xenial-log
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @O... | true |
36388b283bc306091d2e9c3d383c0f10977f35c8 | SQL | pepwork/oracle-scripts | /scripts/sqlplus/dbcompiler.sql | UTF-8 | 1,915 | 2.875 | 3 | [] | no_license | rem ------------------------------------------------------------------
rem PeP Software Development
rem ------------------------------------------------------------------
rem Projekt..........: PePWork
rem Script...........: compiler.sql
rem Developer........: Perry Pakull (PeP), perry.pakull@trivadis.com
rem... | true |
89164fb97ca4e71061e5ebc365d7cba88658a0ae | SQL | brulecap/coding_dojo | /mySQL/the_wall/database/walldb.sql | UTF-8 | 5,528 | 3.265625 | 3 | [] | no_license | -- MySQL dump 10.13 Distrib 5.7.20, for Win64 (x86_64)
--
-- Host: localhost Database: walldb
-- ------------------------------------------------------
-- Server version 5.7.20-log
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
... | true |
4f0cb22f1ce833913bac8057f9b22babf594f316 | SQL | u-ashikov/DB-Basics | /Joins, Subqueries, CTE and Indices/3.Sales_Employee.sql | UTF-8 | 558 | 4.34375 | 4 | [] | no_license | SELECT * FROM Employees
SELECT * FROM Departments
SELECT
e.EmployeeID,e.FirstName,e.LastName, d.Name AS DepartmentName
FROM Employees AS e
INNER JOIN Departments AS d
ON e.DepartmentID = d.DepartmentID
WHERE d.Name = 'Sales'
ORDER BY e.EmployeeID
SELECT
e.EmployeeID,e.FirstName,e.LastName,d.Name AS DepartmentN... | true |
b46a5b99793e026ff8a26067c894f92d305fe1f6 | SQL | gebeto/nulp | /databases/db/sql/2.data.sql | UTF-8 | 2,441 | 2.828125 | 3 | [
"MIT"
] | permissive | INSERT INTO "city" (name, post_code) VALUES
('Зашків', 80375),
('Вінниця', 21000),
('Волинь', 43000),
('Дніпропетровськ', 49000),
('Донецьк', 83000),
('Житомир', 10000),
('Закарпаття', 88000),
('Запоріжжя', 69000),
('Івано-Франківськ', 76000),
('Київ', 07000),
('Кіровоград', 25000),
('Луганськ', 91000),
('... | true |
13bc4bf41f42b653058729bbb19b9f966dbeb105 | SQL | DaniellKondoff/Databases----MS-SQL-Server | /2.Basic CRUD/24. Countries and Currency (Euro Not Euro).sql | UTF-8 | 136 | 3.203125 | 3 | [] | no_license | SELECT CountryName,CountryCode,
(Case CurrencyCode
When 'EUR' THEN 'Euro'
ELSE 'Not Euro' END)
FROM Countries
Order by CountryName ASC | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.