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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
76a628180ccb7e7bf833a1d9ad1e00818e5afe24 | SQL | fanzhiri/gk_social_contact | /im/dev_explain/im_backtable.sql | UTF-8 | 3,473 | 3.640625 | 4 | [] | no_license | DROP TABLE IF EXISTS `txzh_bsys_superuser`;
DROP TABLE IF EXISTS `txzh_bsys_config`;
DROP TABLE IF EXISTS `txzh_bsys_superlog`;
-- ======== 创建社交系统 后台(管理平台)数据表 ========
DROP TABLE IF EXISTS `txzh_bsys_superuser`;
CREATE TABLE `txzh_bsys_superuser` (
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键id',
`login_name`... | true |
4d3fc5699da3054df6e35fdd6f83c2804bee0a33 | SQL | ezimuel/php-benelux-apigility | /data/db/schema.sql | UTF-8 | 389 | 3.0625 | 3 | [] | no_license | CREATE TABLE speakers (
id INTEGER PRIMARY KEY,
name VARCHAR(80) NOT NULL,
title VARCHAR(80),
company VARCHAR(80),
url VARCHAR(255),
twitter VARCHAR(80)
);
CREATE TABLE talks (
id INTEGER PRIMARY KEY,
title TEXT,
abstract TEXT,
day TEXT,
start_time TEXT,
end_time TEXT
);
CREATE TABLE talks_spe... | true |
57386f4d65d8a8c53bf1e8c6f6668506eb673553 | SQL | iangelmx/NaturalLanguageProcessing | /Chapter5/bd/tokens_tags.sql | UTF-8 | 27,622 | 2.859375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.7.4
-- https://www.phpmyadmin.net/
--
-- Servidor: 127.0.0.1
-- Tiempo de generación: 18-04-2018 a las 07:51:24
-- Versión del servidor: 10.1.26-MariaDB
-- Versión de PHP: 7.1.9
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
... | true |
0b90350feef06625c60992461c4ef8cb6096f524 | SQL | joffreycha/aston-tp-mysql | /beer/tp_beer.sql | UTF-8 | 10,641 | 4.65625 | 5 | [] | no_license | -- 1. Quels sont les tickets qui comportent l’article d’ID 500, afficher le numéro de ticket uniquement ?
SELECT CONCAT(ANNEE, " ", NUMERO_TICKET) AS ID_TICKET FROM ventes
WHERE ID_ARTICLE = 500;
-- 2. Afficher les tickets du 15/01/2014.
SELECT NUMERO_TICKET FROM ticket
WHERE DATE_VENTE = "2014-01-15";
-- 3. Afficher... | true |
f01a2ee85e8c7ada98df6b158fd8203ed940ba77 | SQL | Putthira/Customer_Management | /customer-managment.sql | UTF-8 | 2,377 | 3.015625 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.2.10
-- http://www.phpmyadmin.net
--
-- Host: localhost:3306
-- Generation Time: Jan 28, 2017 at 02:09 PM
-- Server version: 5.5.38
-- PHP Version: 5.6.2
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT... | true |
9a8498159ba79d366130bb275b5c3f47f955af65 | SQL | faamaral/project-poo2-parte1 | /database/trabalho_1.sql | UTF-8 | 1,609 | 3 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 5.0.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Tempo de geração: 03-Dez-2020 às 05:14
-- Versão do servidor: 10.4.11-MariaDB
-- versão do PHP: 7.4.1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @... | true |
549f26947e8330af4c8c4f347341831c322caac8 | SQL | petar97/React-app | /.DATABASE/aplikacija.sql | UTF-8 | 11,433 | 3.671875 | 4 | [
"MIT"
] | permissive | /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET NAMES utf8 */;
/*!50503 SET NAMES utf8mb4 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_N... | true |
98ecfc0a22aca30c912f637446a59ae04de81c1c | SQL | robarsegh/BetterBalancedGame | /sql/new_bbg_belief.sql | UTF-8 | 4,229 | 3.140625 | 3 | [
"MIT"
] | permissive | -- Created by iElden
-- PANTHEON --
-- Earth Godess +1 faith on appeal
UPDATE Modifiers SET SubjectRequirementSetId='PLOT_CHARMING_APPEAL' WHERE ModifierId='EARTH_GODDESS_APPEAL_FAITH_MODIFIER';
-- Dance of aurora only on flat tile
UPDATE ModifierArguments SET Value='0' WHERE ModifierId='DANCE_OF_THE_AURORA_FAITHTUN... | true |
b9198c8893d0fa32a9db1c3360a58911b284559b | SQL | jbroadway/products | /conf/install_mysql.sql | UTF-8 | 1,045 | 3.640625 | 4 | [] | no_license | create table #prefix#products (
id int not null auto_increment primary key,
name char(72) not null,
price int not null,
photo char(255) not null default '',
category char(72) not null default '',
description text not null default '',
download char(255) not null default '',
quantity int not null default 0... | true |
6142450f3316438a88d2cf94928403eec1f58961 | SQL | withelm/Algorytmika | /leetcode/database/MSSQL/Managers with at Least 5 Direct Reports/Managers with at Least 5 Direct Reports.sql | UTF-8 | 182 | 3.40625 | 3 | [] | no_license | /* Write your T-SQL query statement below */
select
e.name
from
Employee as e
left join Employee as e2 on e2.ManagerId = e.Id
group by
e.Name
having
count(1) >= 5 | true |
7cee7c55dfd2595a8607189b0026611b41825e3a | SQL | CUBRID/cubrid-testcases | /sql/_13_issues/_13_2h/cases/bug_bts_9986.sql | UTF-8 | 1,804 | 3.546875 | 4 | [
"BSD-3-Clause"
] | permissive | set system parameters 'dont_reuse_heap_file=yes';
drop table if exists t1,t2;
create table t1 (a int primary key) partition by hash(a) partitions 3;
insert into t1 select rownum from db_class limit 44;
create table t2 (a int primary key) partition by hash(a) partitions 3;
insert into t2 select rownum from db_class... | true |
f458d784a960965fb2e58038b7953348268489fb | SQL | golang/build | /internal/relui/migrations/20210928195553_create_task_logs_table.up.sql | UTF-8 | 515 | 3.1875 | 3 | [
"LicenseRef-scancode-google-patent-license-golang",
"BSD-3-Clause"
] | permissive | -- Copyright 2021 The Go Authors. All rights reserved.
-- Use of this source code is governed by a BSD-style
-- license that can be found in the LICENSE file.
CREATE TABLE task_logs (
id SERIAL PRIMARY KEY,
workflow_id uuid NOT NULL,
task_name text NOT NULL,
body text NOT NULL,
created_at timestamp with time... | true |
97798fcb9e3af2aabfa459c48df47cf96e4b289d | SQL | HilmiMubarok/spps | /db/struktur.sql | UTF-8 | 14,516 | 3.390625 | 3 | [
"MIT"
] | permissive | -- MySQL Script generated by MySQL Workbench
-- Mon May 21 09:30:00 2018
-- 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='TR... | true |
73628b2131208458a7a492a84688034b8fd80e93 | SQL | AditiBajpai/Quiz-Application | /src/db_records.sql | UTF-8 | 2,040 | 3.140625 | 3 | [] | no_license | USE `quiz_db`;
INSERT INTO easy_quiz_table(`question_id`,`questions`,`option1`,`option2`,`option3`,`option4`,`answer`) values
("E0_1","Which animal is known as 'Ship of the Desert'?","Horse","Camel","Giraffe","Elephant","Camel"),
("E0_2", "Which month of the year has the least number of days?", "June","August","Februa... | true |
8f7b7020ed34745d1dc429afa2d6434450f90ec9 | SQL | vsimkiv/DWBI-EPAM-LABOR | /labor-1/3-combinig-sets/17.sql | UTF-8 | 115 | 3.4375 | 3 | [] | no_license | SELECT DISTINCT pr.maker
FROM product pr
WHERE EXISTS(SELECT pc.model
FROM pc
WHERE pr.model = pc.model) | true |
27544d28952f2542269fd3f4f10158269b3566fa | SQL | DarrenSison/zxcojtvbn | /ojt(1).sql | UTF-8 | 4,721 | 3.109375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.6.5.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: May 04, 2018 at 02:42 PM
-- Server version: 10.1.21-MariaDB
-- PHP Version: 5.6.30
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SE... | true |
a43e6e9c1ed0c04a071baaecae1c52c53ea3d0b0 | SQL | lich-uct/cdd2017 | /examples/database/create_drugbank_representation_database.sql | UTF-8 | 837 | 3.421875 | 3 | [] | no_license | create extension if not exists rdkit;
drop schema if exists drugbank cascade;
create schema drugbank;
-- main table
create table drugbank.drugbank (
id text primary key,
smiles text,
molinstance mol,
morganfp bfp,
hba integer,
hbd integer,
mw float,
logp float
)... | true |
bc07cdea82e96cf82c8146becbd7029e0e275264 | SQL | JoparatonSIG/MuseoWalter | /doc/db/migracion/espacios.sql | UTF-8 | 410 | 2.953125 | 3 | [
"MIT"
] | permissive | INSERT INTO
museotest.Espacios
(
id,
espacio,
codigoEspacio,
inmuebles,
codigoInmueble,
ubicacionInmueble,
creacion,
modifica
)
SELECT
IdEspacio,
Espacio,
CodigoEspacio,
Inmuebles,
CodigoInmueble,
UbicaciónInmueble,
now(),
now()
FROM original.espacios ori
LEFT... | true |
4c556a8eeb9ce00b96171f12a4411135a0f929d2 | SQL | clakich15/CHIP_HMIS | /QD Snippets.sql | UTF-8 | 5,175 | 4.25 | 4 | [
"MIT"
] | permissive | ---------------------------------------------------
------------------- NOTES -------------------------
---------------------------------------------------
VI-SPDAT sub-scores are in VISPDATFamily. for family, single, and TAY
VI-SPDAT category scores are in VISPDAT. for family, single, and TAY
-----------------------... | true |
fab97c1f859a2f7604f303ac767a95a93ed65c96 | SQL | srividya-p/Job-Portal | /db/job_portal.sql | UTF-8 | 7,915 | 3.046875 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Generation Time: Dec 09, 2020 at 08:42 AM
-- Server version: 10.4.13-MariaDB
-- PHP Version: 7.4.8
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIEN... | true |
929f32de8d80c98c7a513068f19cccc9a2008a6d | SQL | StanleyDip/NewsBee | /NewsBee_database/newsbee01.sql | UTF-8 | 5,939 | 2.96875 | 3 | [
"MIT"
] | permissive | -- phpMyAdmin SQL Dump
-- version 4.7.0
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Jan 05, 2021 at 07:20 AM
-- Server version: 10.1.25-MariaDB
-- PHP Version: 7.1.7
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD... | true |
42a684a46c59e8f0a80139669c4a815fe079112d | SQL | dsciencebk/netcrackerSQL | /SQLJoins/1-20.sql | UTF-8 | 590 | 3.453125 | 3 | [] | no_license | #Вывести информацию обо всех отделах и состоящих в них сотрудниках.
#В первом столбце - id отдела, во втором - id сотрудника.
#Если в отделе нет ни одного сотрудника, то второй столбец в строке такого отдела должен содержать NULL.
#Решите задачу, используя синтаксис Oracle
SELECT d.department_id, e.employee_id
FROM em... | true |
eb51f24ca0c5490cbe1b11727d3167fc5441b117 | SQL | stilatore/lbi | /2013_06_06/Alive.sql | UTF-8 | 749 | 4.09375 | 4 | [] | no_license | WITH v1 AS
(
SELECT customer_id, MAX(month_of_year) AS max_month
FROM sales_fact s JOIN time_by_day t ON s.time_id = t.time_id
GROUP BY customer_id
)
SELECT customer_id, the_month,
CASE WHEN month_of_year <= max_month THEN 'alive' ELSE 'not alive' END AS alive
FROM v1, time_by_day
GROUP BY customer_id, mon... | true |
fe354c65b56103190b1da621d09c6cb09e542f98 | SQL | CUBRID/cubrid-testcases | /sql/_14_mysql_compatibility_2/_04_table_related/_02_alter_change_column/_27_type_time/cases/1271.sql | UTF-8 | 1,212 | 3.546875 | 4 | [
"BSD-3-Clause"
] | permissive | ---- ALTER TABLE ... CHANGE COLUMN , type change
-- constraints : no constraints
-- ordering : no order defined
-- name : same name
-- type : TIME
-------------- TIME 1 : not change
create table t1 (t time);
insert into t1 values (time'11:12:13');
insert into t1 values (time'21:32:43');
select * from t1 order by 1... | true |
86f5e6bd439909c77880611a32fd35f703db5122 | SQL | TonyNeto89/prjcaos | /Scripts/QryNFACT.sql | UTF-8 | 715 | 3.8125 | 4 | [] | no_license | SELECT act.CODNOT NF_ACT,
act.CODIGO ACT,
ost.CODNOT NF_OST,
ost.CODORD OST,
cte.CODNOT NF_CTRC,
cte.CODCON CTRC,
t.CODFEC
FROM TERCAL t
LEFT JOIN VW_RODCOL_RODICO act ON t.NUMDOC = act.CODIGO AND
t.SERDOC = act.SERCOL AND
t.FILDOC = act.CODFIL
LEFT JOIN VW_RODCOL_ROD... | true |
da292626410ea4c7304d9fe5e93cfe6f516f5d8a | SQL | lolo4992/se4-wpkg | /sources/sql/se3wpkg_new.sql | UTF-8 | 6,812 | 3.171875 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.1.12
-- http://www.phpmyadmin.net
--
-- Client : localhost
-- Généré le : Jeu 05 Septembre 2019 à 10:29
-- Version du serveur : 5.5.59-0+deb7u1
-- Version de PHP : 5.4.45-0+deb7u14
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SE... | true |
bd38ab5b0baf8a2256c45a5165634e07c77a7692 | SQL | jamesravenscroft/resume2021 | /src/components/mysqlVariables.sql | UTF-8 | 374 | 2.78125 | 3 | [] | no_license | -- JamesRavenscroft 2020
SET @ variable_name:= value;
SET @counter:= 100;
SELECT @variable_name:= value;
SELECT
@msrp:=MAX(msrp)
FROM products;
SELECT productCode, productName, productLine, msrp
FROM
products
WHERE msrp=@msrp
SELECT @id:= LAST_INSERT_ID();
SELECT @buyPrice:=buyPrice
FROM products
WHER... | true |
15517e18cdfd8e70fdbe4aba588f010958fbec7f | SQL | dungeonmaster51/commcare-hq | /custom/icds_reports/migrations/sql_templates/database_views/agg_awc_monthly.sql | UTF-8 | 7,520 | 3.296875 | 3 | [
"BSD-3-Clause"
] | permissive | DROP VIEW IF EXISTS agg_awc_monthly CASCADE;
CREATE VIEW agg_awc_monthly AS
SELECT
"awc_location_months"."awc_id" AS "awc_id",
"awc_location_months"."awc_name" AS "awc_name",
"awc_location_months"."awc_site_code" AS "awc_site_code",
"awc_location_months"."supervisor_id" AS "superviso... | true |
7e667b1d51236af7ff9bc4b2c2497a779f5fac22 | SQL | RaphaelBasto/BancoDeDados | /Banco/inserts.sql | UTF-8 | 1,968 | 2.78125 | 3 | [] | no_license | LOAD DATA local INFILE 'HSL_Pacientes_3.csv' INTO TABLE Paciente
FIELDS TERMINATED BY '|' LINES TERMINATED BY '\n' IGNORE 1 LINES
(@col1,@col2,@col3,@col4,@col5,@col6,@col7) set ID_PACIENTE = @col1,
IC_SEXO = @col2, AA_NASCIMENTO = @col3, CD_PAIS = @col4, CD_UF = @col5, CD_MUNICIPIO = @col6, CD_CEPREDUZIDO = @col7 ;
... | true |
915e84f09845098f490147ae22fcac3be349c008 | SQL | cvetomirgrigorov/Work | /1.sql | UTF-8 | 2,886 | 4 | 4 | [] | no_license | # Work
DZI
Клиент, полица, вид застраховка:
Какво да се извлече като информация (select clause):
1. име на клиент (p_people.name)
2. 'ФЛ' / 'ЮЛ' в зависимост дали клиентът е физичско или юридическо лице (ако p_people.man_comp = 1 => ФЛ, 2 => ЮЛ; употреба на decode или case конструкция)
3. номер("име") на полица (pol... | true |
f7914ef5e6fb40eb101f352200bd2705d380641b | SQL | cipz/TutorMeister | /sql/population/competenza_corso.sql | UTF-8 | 1,827 | 2.78125 | 3 | [] | no_license | DELETE FROM competenza_corso;
SET FOREIGN_KEY_CHECKS=0;
-- INSERT INTO competenza_corso VALUES (id_competenza_corso, descrizione, tariffa, email_tutor, fk_corso_studio);
INSERT INTO competenza_corso (descrizione, tariffa, email_tutor, fk_corso_studio)
VALUES ('Passato con 30L', 15, 'davide@gmail.com', 'IN04111234')... | true |
ab38d31c8a2a7f39a0a353a4a72a28099a69673b | SQL | MacRylynn/kill | /src/main/resources/sql/schema.sql | UTF-8 | 2,471 | 4.34375 | 4 | [] | no_license | -- #数据库初始化脚本
--#将sql文件导入linux服务器的时候,注释需要--# (必须要加# !!!)
-- #创建数据库
DROP database IF EXISTS seckill;
CREATE database seckill DEFAULT CHARSET utf8 COLLATE utf8_general_ci;
-- #使用数据库
use seckill;
-- #建表seckill,秒杀商品信息表
-- #ENGINE是引擎,有MyIASM和INNODB两种,MyIASM读取速度更快,且不大量占用内存。INNoDB支持事物
-- #AUTO_INCREMENT规定自增的起点
-- #索引加快搜索速度,但... | true |
176c65af89f6411fa03611b51199cb0c06d39e61 | SQL | cadenajohn85/database-exercises | /practice_ad_migration.sql | UTF-8 | 781 | 3.921875 | 4 | [] | no_license | drop database if exists practice_ad_db;
create database practice_ad_db;
use practice_ad_db;
create table users (
id INT UNSIGNED NOT NULL AUTO_INCREMENT,
email varchar(100) NOT NULL,
password varchar(50) NOT NULL,
PRIMARY KEY (id)
);
create table ads (
id INT UNSIGNED NOT NULL AUTO_INCREMENT,
... | true |
651f03e29adad5bd04949a36474dd0243f8671c0 | SQL | agreenwalrus/Review-Assistant | /SQLdata.sql | UTF-8 | 5,424 | 2.90625 | 3 | [] | no_license | SET NAMES 'utf8';
SET CHARACTER SET 'utf8';
SET SESSION collation_connection = 'utf8_general_ci';
USE trtpo_system;
INSERT INTO lecturers(full_name)
VALUES ('Искра Наталья Александровна');
INSERT INTO lecturers(full_name)
VALUES ('Яночкин Алексей Леонидович');
INSERT INTO users(username, password, id_lecturer)
VALUE... | true |
d75b0a312429e0141a61e1fca9ec5801c9970f77 | SQL | hqottsz/MXI | /assetmanagement-database/src/upgrade/plsql/lib/liquibase/8/1/1/0/sql/api/view/acor_jic_tools_v1.sql | UTF-8 | 998 | 3.484375 | 3 | [] | no_license | --liquibase formatted sql
--changeSet acor_jic_tools_v1:1 stripComments:false
CREATE OR REPLACE FORCE VIEW acor_jic_tools_v1
AS
SELECT
task_task.alt_id AS task_id,
eqp_bom_part.bom_part_cd AS part_group_code,
eqp_bom_part.bom_part_name AS part_group_name,
task_tool_list.sched_hr ... | true |
267fd748397e329501b6af77a8c827b0eb84bc1d | SQL | Gaupemor/SQL | /Timeliste/Main.sql | UTF-8 | 2,271 | 3.640625 | 4 | [] | no_license | -- Oblig3 IN2090 Selmafs
-- Har gjeve namn på kolonnane for aggregatverdiar for å gjera resultatet meir leseleg.
-- Oppg. 2
-- a) Timelistelinjer for timelistenr 3
SELECT * FROM Timelistelinje
WHERE timelistenr = 3;
-- b) Tal på timelister
SELECT COUNT(*) ant_timelister FROM Timeliste;
-- c) Tal på timelister som det ... | true |
c0d4e9179c0689c7416163880e84eb4dd782b284 | SQL | natealcon/Basic-Supplier-Database | /OpenPO.sql | UTF-8 | 2,390 | 3.578125 | 4 | [] | no_license | set heading off
set echo off
set feedback off
set verify off
spool C:\SQL\Project\OpenPO.txt
prompt
prompt
prompt ************O P E N O R D E R************
prompt
prompt
SELECT 'Today''s Date: ', TO_CHAR(sysdate) FROM dual;
prompt
prompt
column Pnum heading 'Item Number' format a25;
prompt Here is a list of produc... | true |
a764cfbf7127469e0115db3c7efd0326858a37dc | SQL | frankiegu/analytics-server | /schema/create.sql | UTF-8 | 5,300 | 3.140625 | 3 | [] | no_license | /*
Navicat Premium Data Transfer
Source Server : localhost
Source Server Type : MySQL
Source Server Version : 50727
Source Host : localhost:3306
Source Schema : analytics
Target Server Type : MySQL
Target Server Version : 50727
File Encoding : 65001
Date: 13/06/2020 ... | true |
dbb2693a2d0632d433c80d48b7711e1ca34bbc96 | SQL | cody-a-m/cnsdatacore | /DB/clinical_repository_bpi.sql | UTF-8 | 5,191 | 2.96875 | 3 | [] | no_license | CREATE DATABASE IF NOT EXISTS `clinical_repository` /*!40100 DEFAULT CHARACTER SET latin1 */;
USE `clinical_repository`;
-- MySQL dump 10.13 Distrib 5.6.23, for Win64 (x86_64)
--
-- Host: cns5.med.ucla.edu Database: clinical_repository
-- ------------------------------------------------------
-- Server version 5.6... | true |
fa23def4d57af6432949fdb982cb1d05b6893f29 | SQL | divy-saxena95/sql-assignments | /paytm/paytm.sql | UTF-8 | 1,272 | 4.03125 | 4 | [] | no_license | CREATE DATABASE IF NOT EXISTS paytm;
USE paytm;
/* strong entity*/
CREATE TABLE IF NOT EXISTS branches (
branchID INT NOT NULL PRIMARY KEY,
name VARCHAR(45) ,
address VARCHAR(45) ,
IFSCcode VARCHAR(45));
/*weak entity*/
CREATE TABLE IF NOT EXISTS accounts(
acct_number INT NOT NULL PRIMARY KEY,
type VARCHAR(... | true |
cd84825f86591bfcf50792de16faed068c611fbe | SQL | Jerem33320/relaisduphare | /dump.sql | UTF-8 | 8,874 | 3.1875 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 5.0.0-dev
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Generation Time: May 09, 2019 at 09:43 AM
-- Server version: 10.3.11-MariaDB
-- PHP Version: 7.2.10
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET... | true |
2f8f112c5164756a50a3a5cf055462aadafabddc | SQL | jgchk/rate-our-music | /server/migrations/20210410004237_artist.sql | UTF-8 | 635 | 3.5625 | 4 | [] | no_license | CREATE TABLE artist
(
id INT GENERATED BY DEFAULT AS IDENTITY PRIMARY KEY
, name TEXT NOT NULL
);
CREATE INDEX artist_trgm_idx ON artist USING GIN (name gin_trgm_ops);
CREATE TABLE release_artist
(
release_id INT REFERENCES release (id)
, artist_id INT REFERENCES a... | true |
0b1518de38f70bb3424edd60fb78a8ceba6b3bbe | SQL | user109436/mini-inventory-app-DSA-finals | /miniappInventoryRedesign.sql | UTF-8 | 3,036 | 3.3125 | 3 | [] | no_license | CREATE DATABASE IF NOT EXISTS miniappinventory;
CREATE TABLE IF NOT EXISTS suppliers(
id INT(11) NOT NULL PRIMARY KEY AUTO_INCREMENT,
name VARCHAR(255) NOT NULL,
date TIMESTAMP
);
CREATE TABLE IF NOT EXISTS categories (
id INT(11) NOT NULL PRIMARY KEY AUTO_INCREMENT,
name VARCHAR(255) NOT NULL,
date TIMESTAMP
);
CREA... | true |
e19a918e3b235cd6bcbdf76eb02d2cf563517bb5 | SQL | mattqiu/zlin | /imall/install/v3-fenxiao-update/utf8.sql | WINDOWS-1252 | 776 | 2.546875 | 3 | [] | no_license |
#ALTER TABLE `zhilin_goods_common` MODIFY COLUMN `goods_fenxiao` float UNSIGNED NOT NULL DEFAULT 0 COMMENT '' AFTER `goods_discount`;
ALTER TABLE `zhilin_cart` ADD `up_id` INT( 10 ) NOT NULL ,ADD `up_name` VARCHAR( 100 ) NOT NULL;
ALTER TABLE `zhilin_goods` ADD `up_id` INT( 10 ) NOT NULL ,ADD `up_name` VARCHAR(... | true |
a5ca8b3bb1ad881e28988390297f13d4a70ab16e | SQL | 8904076/hadoop-data-warehouse-book | /ch06/6-2-1-textfile-json.sql | UTF-8 | 442 | 2.84375 | 3 | [] | no_license | -- 建立TEXTFILE格式的表
-- 建立TEXTFILE格式的表
use test;
create table t_textfile(c1 string, c2 int, c3 string, c4 string)
row format delimited fields terminated by ',' stored as textfile
;
-- 向表中导入数据:
-- sudo -u hdfs hadoop fs -mkdir /user/test
-- sudo -u hdfs hadoop fs -put hivedata/data.csv /user/test
load data inpath '/user/te... | true |
2f82325b74e944e59a5fd451c6f5bcdecbe77cf2 | SQL | wang-nima/DBHW1 | /q7.sql | UTF-8 | 410 | 3.796875 | 4 | [] | no_license | create view x as
(select vid, sum(trunc(r.edate - r.sdate)) num
from reservation r
where
((sdate between to_date('20140101','yyyymmdd') and to_date('20141231','yyyymmdd'))
or
(edate between to_date('20140101','yyyymmdd') and to_date('20141231','yyyymmdd')))
group by vid);
select *
from
(
select x.vid, vill... | true |
af5113e6b240acf3412d7c1faf3ad840eab625df | SQL | townscript/heroes-merchant-api | /src/main/sql/create_transactional_detail.sql | UTF-8 | 627 | 2.84375 | 3 | [] | no_license |
CREATE TABLE `transaction_data_table` (
`TXN_ID` int(11) NOT NULL AUTO_INCREMENT,
`MERCHANT_ID` int(11) NOT NULL,
`TXN_AMOUNT` float(11,2) DEFAULT '0.00',
`TXN_PG_ID` int(11) DEFAULT NULL,
`CURRENCY` varchar(100) DEFAULT 'INR',
`PAYMENT_GATEWAY_ID` varchar(100) DEFAULT NULL,
`UNIQUE_ORDER_ID` varchar(100... | true |
a08224182f3fc18508858a3bed6eda70ac2dd764 | SQL | tanyasangal21/project_mgmt | /1122518.sql | UTF-8 | 328,421 | 3.296875 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 3.5.8
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: May 11, 2016 at 01:44 AM
-- Server version: 5.5.32
-- PHP Version: 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 */;
/*... | true |
a0e8e4531643d3b07695549cf889fdf723aa3f00 | SQL | Wangtingting007/learngit | /bms_userInfo.sql | UTF-8 | 578 | 3.140625 | 3 | [] | no_license |
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
DROP TABLE IF EXISTS `bms_userinfo`;
CREATE TABLE IF NOT EXISTS `bms_userinfo` (
`openid` varchar(40) NOT NULL COMMENT 'openid',
`uid` int(8) NOT NULL AUTO_INCREMENT COMMENT '用户id',
`nickname` varchar(40) NOT NULL COMMENT '用户昵称',
`weight` varchar(3) NULL COMMENT '用户体重',... | true |
38353b93818c3a917a91c9cdd1b7a6f62861bb83 | SQL | PRITHWISHDEY/Nagarro-TSQL-Assignment-Answers | /Exercise 2/Exercise 2.sql | UTF-8 | 1,341 | 4.625 | 5 | [] | no_license | --Write separate queries using a join, a subquery, a CTE, and then an
--EXISTS to list all AdventureWorks customers who have not placed an order.
USE AdventureWorks2019
--USING JOIN
SELECT DISTINCT P.BusinessEntityID, P.LastName, P.MiddleName, P.FirstName
FROM Person.Person P
LEFT JOIN Sales.Customer C
ON P.Business... | true |
d51198eb67a75c51711d9d5b74d0eb3646fa4deb | SQL | xBarbosa/SQL-SERVER | /Functions/fnStripCharacters_(remove_specified_characters).sql | UTF-8 | 824 | 3.015625 | 3 | [] | no_license | CREATE FUNCTION GEN_FN_StripCharacters
(
@strInputString NVARCHAR(MAX),
@strMatchExpression VARCHAR(255)
)
/*
---Created By : Ram
--Date : 15-Feb-2013
--- Purpose : To remove the specified Characters in the Given String
Alphabetic only: SELECT dbo.fn_StripCharacters('a1!s2@d3#f4$', '^a-z')
Numeric only: S... | true |
e8060a3a60d1d850b60caa2b017268bd5855a3a0 | SQL | riveramatthew/ra_data_warehouse | /models/warehouse/w_marketing/wh_email_lists_dim.sql | UTF-8 | 400 | 2.625 | 3 | [
"Apache-2.0"
] | permissive | {% if not var("enable_mailchimp_email_source") or (not var("enable_marketing_warehouse")) %}
{{
config(
enabled=false
)
}}
{% else %}
{{
config(
unique_key='list_pk',
alias='email_lists_dim'
)
}}
{% endif %}
WITH lists AS
(
SELECT * from {{ ref('int_email_lists') }}
)
select... | true |
201f2ed848f38711ea709bc0e2c58a18dedeaac9 | SQL | tatianacelan/tc_verifica3settimana_sql | /dichi_tatiana.sql | WINDOWS-1252 | 7,850 | 3.4375 | 3 | [] | no_license | create database DischiAlbum
create table Band (
IdBand int Identity(1,1) not null,
NomeBand nvarchar(30) unique,
NumeroComponenti Int not null,
constraint PK_Band primary key (IdBand)
)
insert into Band values( 'Maneskin',4) --verifica
select * from Band
create table Album (
IdAlbum int identity... | true |
35bb53ba14a3cf2e3218a88da67dc31db6345089 | SQL | martindipaolo/dds-juego-de-tronos | /schema.sql | UTF-8 | 2,607 | 3.65625 | 4 | [] | no_license |
create table Casas (
id bigint not null auto_increment,
anioFundacion integer not null,
nombre varchar(255),
patrimonio integer not null,
lugarOrigen_id bigint,
vasallaDe_id bigint,
primary key (id)
)
create table Castillos (
cantidadMurallas... | true |
1433f37d5128de3bcee41c32cb786f90e3ca781c | SQL | DeboraVillca/Sql | /SQLQuery1_INTEGRADOR.sql | UTF-8 | 1,135 | 4.0625 | 4 | [] | no_license | CREATE PROCEDURE territorios_por_empleado
@empleadoDesde INT, @empleadoHasta INT
AS
SELECT COUNT(ET.TerritoryID) AS Can_territorio,
E.[EmployeeID],
E.[FirstName]
FROM Employees E
INNER JOIN EmployeeTerritories ET ON E.EmployeeID= et.EmployeeID
INNER JOIN Territories t ON t.TerritoryID=ET.TerritoryID
... | true |
053800ff6d82f1f63912d10921890786051ad137 | SQL | Dziuhan/RetroCars | /RetroCars/sql/create.sql | UTF-8 | 2,053 | 3.515625 | 4 | [] | no_license | connect 'jdbc:derby://localhost:1527/SummaryTask4;create=true;user=user;password=pass';
drop table reviewsCars;
drop table orders;
drop table cars;
drop table users;
drop table roles;
CREATE TABLE roles(
id INTEGER GENERATED ALWAYS AS IDENTITY PRIMARY KEY,
role varchar(20) not null unique
);
CREATE TA... | true |
cef2c90829632b62856b9ca7c91c951995b3001a | SQL | alpayatess/OgrenciYurt_BMT311-db-project | /db/table.sql | UTF-8 | 798 | 2.859375 | 3 | [] | no_license | CREATE TABLE yogrenci(
OgrId number,
OgrAd varchar(25),
OgrSoyad varchar(25),
OgrTC char(11),
OgrTelefon char(10),
OgrDogum date,
OgrBolumId number,
OgrOdaId number,
OgrPass varchar(40),
OgrVeliAdSoyad varchar(50),
OgrVeliTelefon char (10),
OgrVeliAdres varchar(100)
);
CREATE TABLE yo... | true |
515572f9cbc83c5257185b30c7d0937d7e6156d2 | SQL | alexandreabeh/TigerTaxOnline | /DbUp/Scripts/Script0001 - Create tables.sql | UTF-8 | 1,616 | 3.515625 | 4 | [] | no_license | CREATE TABLE Users
(
UserId INT PRIMARY KEY,
FirstName NVARCHAR(50) NOT NULL,
LastName NVARCHAR(50) NOT NULL,
Username NVARCHAR(50) NOT NULL,
Email NVARCHAR(50) NOT NULL,
UserPassword NVARCHAR(50) NOT NULL
);
CREATE TABLE Rules
(
RuleId INT PRIMARY KEY,
UserId INT REFERENCES Users(User... | true |
4f31a2b0abdf23a055f2fad8eccf55a578b1b50c | SQL | petepara/SimpleWebApp | /src/main/resources/database.sql | UTF-8 | 770 | 3.28125 | 3 | [] | no_license | CREATE TYPE GENDER AS ENUM ('MALE', 'FEMALE');
CREATE TABLE employee
(
employee_id SERIAL PRIMARY KEY,
first_name VARCHAR(25) NOT NULL ,
last_name VARCHAR(50) NOT NULL,
department_id int NOT NULL,
job_title VARCHAR(100) NOT NULL,
gender GENDER NOT NULL,
date_of_... | true |
426538007f89843f9a5a6d266af50c6583b973b7 | SQL | nyvieirameli/bootcamp-banco-de-dados | /MoviesDB/SQL2-MoviesDB.sql | UTF-8 | 3,148 | 4.96875 | 5 | [] | no_license | -- SQL 2 - MOVIES DB
-- 1. O que é chamado de JOIN em um banco de dados?
-- Um cruzamento de tabelas.
-- 2. Nomeie e explique 2 tipos de JOIN.
-- RIGHT JOIN: irá priorizar os dados da tabela da direita da query pegando apenas os dados relacionais na esquerda.
-- LEFT JOIN: irá priorizar os dados da tabela da esq... | true |
e3f801aed72e0fbff15154b61bdd90fb7343afa9 | SQL | alexbfreitas/workshop | /workshop/src/main/resources/db/migration/V04__orderitem.sql | UTF-8 | 349 | 3.46875 | 3 | [] | no_license | CREATE TABLE item_order(
id int(20) PRIMARY KEY AUTO_INCREMENT,
id_order int(20) NOT NULL,
id_product int NOT NULL,
price DECIMAL(12,2) NOT NULL,
quantity int NOT NULL,
total DECIMAL(12,2) NOT NULL,
FOREIGN KEY (id_order) REFERENCES orders(id),
FOREIGN KEY (id_product) REFERENCES product(id)
) ENGINE=I... | true |
5c0270cb44061aeef0cae3e73e02deac044d19fd | SQL | zhangxiangfeng/myabtis-source-analysis | /src/test/java/org/apache/ibatis/submitted/dynsql/CreateDB.sql | UTF-8 | 1,584 | 2.8125 | 3 | [
"BSD-3-Clause",
"Apache-2.0"
] | permissive | --
-- Copyright 2009-2012 the original author or 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
--
-- Unles... | true |
72e9db014c30cb7b8445ec5dd30e84d680e6d9ca | SQL | xiaochong2dai/bigDataHadoop | /Hive/yahooFinance.sql | UTF-8 | 6,535 | 3.90625 | 4 | [] | no_license | -- 1. prepare file
hadoop fs -mkdir /user/guan01/hive/yahooFinance
hadoop fs -copyFromLocal yahooFinance.csv /user/guan01/hive/yahooFinance
hadoop fs -ls /user/guan01/hive/yahooFinance
-- 2. beeline connection
!connect jdbc:hive2://192.168.1.13:10000/default
-- 3. create databases
CREATE DATABASE IF NOT EXISTS guan_d... | true |
c7bf435bf826d9054828b0c75932aaac0015f258 | SQL | yefc/CBOE | /subprojects/Classic/Consulting/DFCI/ChemInv/config/oracle_install_scripts/Create_blank_ChemInv_DB/sql/PLSQL/Functions/f_IsGridLocation.sql | UTF-8 | 333 | 2.75 | 3 | [] | no_license | create or replace function
"ISGRIDLOCATION"
(p_location_id in inv_locations.location_id%type)
return integer
is
rec_count integer;
begin
select count(*) into rec_count from inv_vw_grid_location_lite where location_id = p_location_id;
if rec_count = 0 then
return 0;
else
return 1;
end if;
end IsGridLocation;
/... | true |
adcd584e7e7563b1ed1f46aa3589c3b0ae268a8b | SQL | ZelinLiu2016/shanggang | /sql/project.sql | UTF-8 | 979 | 3.28125 | 3 | [] | no_license | CREATE DATABASE `shanggang` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;
USE shanggang;
DROP TABLE IF EXISTS project;
CREATE TABLE `project` (
`PROJECT_ID` int(10) unsigned NOT NULL AUTO_INCREMENT,
`PROJECT_NAME` varchar(100) NOT NULL,
`DUMPINGAREA` varchar(100) NOT NULL,
`SQUARE_VOLUME` varchar(100) NOT ... | true |
ead8cae7798c62b153915a171b82e8762014f051 | SQL | GittiMcHub/code-snippets | /db/exasol/elasticsearch/ELASTIC_SEARCH_SINGLE_FIELD_QUERY_SAMPLE.sql | UTF-8 | 4,065 | 3.28125 | 3 | [] | no_license | CREATE OR REPLACE JAVA SCALAR SCRIPT ELASTIC_SEARCH_QUERY_SAMPLE ("searchParam" VARCHAR(255) UTF8) RETURNS VARCHAR(100000) UTF8 AS
/*
Creates and ElasticSearch Post Query
queries a single field
and returns an Entry from defined doucments
TODO: Adjust parameters and datatypes for your query
*/
import java.sql.SQLE... | true |
0d94dc782476b359cb88c62bbb21a505f9ed9a10 | SQL | amineprog/CI_Chat_Private | /db.sql | UTF-8 | 5,541 | 3.546875 | 4 | [
"LicenseRef-scancode-unknown-license-reference",
"MIT",
"Apache-2.0"
] | permissive | -- MySQL Script generated by MySQL Workbench
-- 03/24/16 16:35:27
-- 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 |
c3c8ecf35e1cbb6d7c9aad0d3f10e98690605437 | SQL | 8jclxbl/sqlLearning | /salary_of_ordinary_employees.sql | UTF-8 | 335 | 3.96875 | 4 | [] | no_license | SELECT dept.dept_no, t.emp_no, t.salary FROM
(SELECT e.emp_no,salary FROM
(SELECT emp_no
FROM employees emp
WHERE emp.emp_no NOT IN (SELECT emp_no FROM dept_manager)) AS e
INNER JOIN salaries sal ON e.emp_no = sal.emp_no AND sal.to_date = '9999-01-01') t
INNER JOIN dept_emp dept ON dept.emp... | true |
d2652c6a692051f5758d36238ffc4d371d55a9f2 | SQL | Thomas-JavaOps/TI_Fullstack | /sqlToCreateDB.sql | UTF-8 | 566 | 3.421875 | 3 | [] | no_license | DROP TABLE IF EXISTS type_user;
CREATE TABLE type_user (
id int(11) NOT NULL AUTO_INCREMENT,
type varchar(45) DEFAULT NULL,
PRIMARY KEY (id)
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=latin1;
DROP TABLE IF EXISTS user;
CREATE TABLE user (
id int(11) NOT NULL AUTO_INCREMENT,
name varchar(45) DEFAULT N... | true |
57d2c7a3114bbd7bb75339611e34c7e2fb0af801 | SQL | AlexyGor/GB-MySQL | /lesson6/ff6.sql | UTF-8 | 168,462 | 2.84375 | 3 | [] | no_license | -- --------------------------------------------------------
-- Хост: 127.0.0.1
-- Версия сервера: 8.0.19 - MySQL Community Server - GPL
-- Операционная система: Win64
-- HeidiSQL Версия: 11.3.0.6295
-- ------------------------------------------------------... | true |
77fa0517f73d5f7b486898fd3d45a1615ecac51d | SQL | informaticahlcm/prueba2 | /CMACKENNA.sql | UTF-8 | 150,106 | 3.171875 | 3 | [] | no_license | SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
CREATE TABLE IF NOT EXI... | true |
40739ba497659d948b77c3331b2067e73442595a | SQL | hemdash/databasedesign2013 | /HMunguiaDatabase/HMunguiaReferenceTableScript.sql | UTF-8 | 2,413 | 3.21875 | 3 | [] | no_license | CREATE TABLE languages (
language_id int NOT NULL AUTO_INCREMENT,
language_name varchar(255) NOT NULL,
PRIMARY KEY (language_id)
) ENGINE=InnoDB;
--creates language reference table
INSERT INTO languages (
language_name) VALUES
('British English'),
('American English'),
('German'),
('French'),
('Italian... | true |
1dbf4c840ce3021f8b14c8f81e21d8cfc368ef60 | SQL | zoidberg-8/Max_Proxy | /modules/Therese_Service/schema.sql | UTF-8 | 490 | 2.890625 | 3 | [] | no_license | DROP DATABASE IF EXISTS prodimgs;
CREATE DATABASE prodimgs;
USE prodimgs;
CREATE TABLE products (
id int NOT NULL AUTO_INCREMENT,
name varchar(40) NOT NULL,
price int NOT NULL,
category varchar(30) NOT NULL,
product_url varchar(100) NOT NULL,
main_img varchar(100) NOT NULL,
front_view varchar(100) NOT ... | true |
ba88f6f2f56322f87c544183f5c964af7c8113d4 | SQL | nickallen89/07-MySQL-HW | /MYSQL_HW.NickAllen.sql | UTF-8 | 4,220 | 4.25 | 4 | [] | no_license | USE sakila;
SELECT first_name, last_name FROM actor;
SELECT CONCAT(first_name, ' ', last_name) AS Actor_Name FROM actor;
SELECT actor_id, first_name, last_name FROM actor WHERE first_name = 'joe';
Select first_name, last_name From actor WHERE last_name LIKE '%GEN%';
SELECT last_name, first_name FROM actor WHERE la... | true |
6f65f5ac34edc16fe9f6f3d5d6e0ba019bb74e5b | SQL | unepwcmc/SAPI | /db/views/api_cites_quotas_view/20141230193844.sql | UTF-8 | 2,913 | 4.46875 | 4 | [
"BSD-3-Clause"
] | permissive | WITH cites_quotas AS (
SELECT
tr.id,
tr.type,
tr.taxon_concept_id,
tr.notes,
tr.url,
tr.start_date,
tr.publication_date::DATE,
tr.is_current,
tr.geo_entity_id,
tr.unit_id,
CASE WHEN tr.quota = -1 THEN NULL ELSE tr.quota END AS quota,
tr.public_display,
tr.nomenclatu... | true |
912898c86e4441299c2659a1595f0d275c3d40e9 | SQL | bohacc/dealinteal-home | /sql/v1.37.6/update.sql | UTF-8 | 6,141 | 3.46875 | 3 | [] | no_license | alter table sales add unit_cost numeric(17,2);
alter table sales add total_cost numeric(17,2);
alter table sales add total_common_cost numeric(17,2);
alter table sales add total_common_profit numeric(17,2);
--------------------------------------------------------
alter table users_login add exch_user character varying... | true |
b5278a0d2575368c9a9825d1c9b39a75525f2dd4 | SQL | kunalkalbande/SQLDM | /Development/Idera/rameshwar/SQLdm/CollectionService/Probes/Sql/Batches/DatabaseConfiguration2000.sql | UTF-8 | 3,246 | 2.609375 | 3 | [] | no_license | --------------------------------------------------------------------------------
-- Batch: Database Configuration 2005
-- Tables: master.sys.databases
-- Returns:
-- Database Name
-- Collation
-- IsAnsiNullDefault
-- IsAnsiNullsEnabled
-- IsAnsiPaddingEnabled
-- IsAnsiWarningsEnabled
-- IsArithmeticAbortEnabled
-- I... | true |
62cac985eb95f6534ac916983d5275198952d0c9 | SQL | YasarBici/php-week1-les2 | /sql_statements.sql | UTF-8 | 815 | 3.640625 | 4 | [] | no_license | CREATE DATABASE project1;
-- gebruik dit als je de database wil selecteren asl je default.
-- USE project1;
-- Ik heb een TABLE gemaakt voor accounts met als primary key (id).
CREATE TABLE ACCOUNT (
id INT NOT NULL AUTO_INCREMENT,
email VARCHAR(250) UNIQUE NOT NULL,
password VARCHAR(250) NOT NULL,
PR... | true |
dc7f881e5a412c61803b1d0432cfb55b8e4f50b1 | SQL | NicoAntonelli/MySQL-2019 | /workspace/Práctica 12 - Stored Procedures - Functions/Ejercicios 08-09-10.sql | UTF-8 | 976 | 3.328125 | 3 | [] | no_license | /*
8) Crear un procedimiento almacenado llamado alumno_inscripcion que dados los datos de un alumno y un curso
lo inscriba en dicho curso el día de hoy y genere la primera cuota con fecha de emisión hoy para el mes próximo.
*/
# DNI Alumno, Plan, Curso
call alumno_inscripcion(24242424, "Marketing 3", 1);
############... | true |
655298b3b7538d791178a8920b5087da901f3e6a | SQL | nitishtalekar/Software-Development | /FeedbackSystem/FeedbackDatabases/DivWise/fea/feedback_inst_temp.sql | UTF-8 | 4,475 | 3.3125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.9.0.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Oct 16, 2019 at 09:24 AM
-- Server version: 10.3.16-MariaDB
-- PHP Version: 7.3.7
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @O... | true |
29087ae805aeef177eb9d0f9637c1c074433447c | SQL | eobaah/practice-4 | /src/models/db/schema/schema.sql | UTF-8 | 577 | 3.34375 | 3 | [
"MIT"
] | permissive | CREATE TABLE album (
id SERIAL PRIMARY KEY,
title VARCHAR(255) NOT NULL,
artist VARCHAR(255) NOT NULL
);
CREATE TABLE member (
id SERIAL PRIMARY KEY,
name VARCHAR(255) NOT NULL,
email VARCHAR(255) NOT NULL UNIQUE,
password VARCHAR(255) NOT NULL,
date_joined TIMESTAMP DEFAULT now(),
pic_url VARCHAR(1... | true |
91da1c69adc314136acd2af2b881511209f6cc46 | SQL | Antonybarbosa/inovace | /Ac. Faceamento/Sankhya Produção~36.sql | UTF-8 | 281 | 3.09375 | 3 | [] | no_license | SELECT
TO_CHAR(DTFERIADO,'d')
FROM
(SELECT
to_char(dtferiado,'dd/mm'), to_char(:dtini,'yy')
FROM
TSIFER
WHERE TO_CHAR(dtferiado,'MM') IN (TO_CHAR(to_date(:dtfim,'dd/mm/yyyy'),'mm'), to_char(to_date(:dtini,'dd/mm/yyyy'),'mm')))
WHERE
TO_CHAR(DTFERIADO,'d') not in (1,7) | true |
a780effae69289cd3eb669692439f7b5a09257db | SQL | wtie1997/SQL-Zoo | /SUM_and_COUNT.sql | UTF-8 | 1,317 | 4.5 | 4 | [] | no_license | /*
This tutorial is about aggregate functions such as COUNT, SUM and AVG. An aggregate function takes many values and delivers just one value.
*/
--#1
/*
Show the total population of the world.
world(name, continent, area, population, gdp)
*/
SELECT SUM(population) AS 'Total Population of the World'
FROM world
--#2
... | true |
ac61a38938bdd655cd76b09238b4fa8d0fd94d36 | SQL | laurenbrown108/pizza-party | /db/schema.sql | UTF-8 | 240 | 2.734375 | 3 | [
"MIT"
] | permissive | DROP DATABASE IF EXISTS pizzas_db;
CREATE DATABASE pizzas_db;
USE pizzas_db;
CREATE TABLE pizza (
id INTEGER(3) AUTO_INCREMENT NOT NULL,
pizza_name VARCHAR(50) NOT NULL,
devoured BOOLEAN DEFAULT false,
PRIMARY KEY (id)
); | true |
f02be639265111e84d15f12d43f3744deb38b1e2 | SQL | balena/sqlp | /tests/v6_pc_isql/xts746.sql | UTF-8 | 905 | 3.03125 | 3 | [
"BSD-3-Clause"
] | permissive | -- MODULE XTS746
-- SQL Test Suite, V6.0, Interactive SQL, xts746.sql
-- 59-byte ID
-- TEd Version #
-- AUTHORIZATION CTS1
SELECT USER FROM HU.ECCO;
-- RERUN if USER value does not match preceding AUTHORIZATION comment
ROLLBACK WORK;
-- date_time print
-- TEST:7046 Presence of LATIN1 in CHARA... | true |
bc6393690651bb03d5e8da1caacd0f3c4104aef3 | SQL | mwolf1963/improvement-tracker | /triggers.sql | UTF-8 | 1,033 | 3.5 | 4 | [
"Apache-2.0"
] | permissive | DROP TRIGGER customerExists;
CREATE TRIGGER customerExists
BEFORE INSERT ON customers
FOR EACH ROW
WHEN (EXISTS(SELECT * FROM customers WHERE customer_name = NEW.customer_name))
BEGIN
SELECT RAISE(ABORT, "This customer already exsists");
END;
DROP TRIGGER departmentExists;
CREATE TRIGGER departmentExists
BEFORE INS... | true |
5408716b05bd8a50414b2bb746c789dd3428b8a2 | SQL | Brombe74/IT | /QUINTA/SQL/Azienda-Tirocinante/queryAzienda.sql | UTF-8 | 1,050 | 3.046875 | 3 | [
"MIT"
] | permissive | -- Inserimento Aziende
INSERT INTO 191126Azienda ('id', 'Nome', 'Luogo', 'Settore', 'Tipologia') VALUES
(1, 'abc', 'Mi', 'informatica', 'z'),
(2, 'abc', 'Mi', 'informatica', 'z'),
(3, 'hjk', 'Mi', 'informatica', 'b'),
(4, 'bcz', 'Mi', 'informatica', 'z'),
(5, 'ppq', 'Mi', 'informatica', 'a'),
(6, 'frt', 'Mi', 'informa... | true |
aedbf567218e31efaf38dfdd3c7858f4f44545d1 | SQL | coleman-buffa/employee-tracker | /employee-seed.sql | UTF-8 | 303 | 2.734375 | 3 | [
"MIT"
] | permissive | INSERT INTO employee (first_name, last_name, role_id, manager_id)
VALUES ("Bob", "Smith", 3, null), ("Aaron", "Rowe", 2, 2);
INSERT INTO role (title, salary, department_id)
VALUES
("Senior Engineer", 200000, 1),
("Engineer", 90000, 1);
INSERT INTO department (name)
VALUES ("Software Development"); | true |
e05c1a24f3f24f1bcb5676ab50b1e0ee02f5853c | SQL | VelizarVeli/SoftUni-Software-Engineering | /03.C#DBFundamentals/01.Databases Basics - MS SQL Server/ExamPreparations/2016.12.15TheNerdHerd/Ex15.12.2016TheNerdHerd/2. Insert.sql | UTF-8 | 513 | 3.65625 | 4 | [] | no_license | INSERT INTO Messages(Content, SentOn, ChatId, UserId)
SELECT CONCAT(u.Age, '-', u.Gender, '-', l.Latitude, '-', l.Longitude) AS Content,
CONVERT(DATE, GETDATE()) AS SentOn,
CASE u.Gender
WHEN 'F' THEN CEILING(SQRT(u.Age * 2))
WHEN 'M' THEN CEILING(P... | true |
eb585c9bf82bcfd642de611dae644a0661a4c519 | SQL | bellmit/origin | /family_order/sql/TI_R_SOCIETYDISTRIBUTE_DOWN/SEL_BY_RECORDDATE.sql | UTF-8 | 312 | 2.5625 | 3 | [] | no_license | SELECT IMEI TERMINAL_ID,MATERIALCODE MATERIAL_CODE,DISTRIBUTETYPE,COMPANYCODE,
DISTRIBUTETIME,'0' CPORDER_CODE,OPRNUMB OPER_TRADE_ID,OPRFLAG,'0' ARRIVAL_STATE
FROM TI_R_SOCIETYDISTRIBUTE_DOWN
WHERE 1=1
AND DEALFLAG = :DEALFLAG
AND OPRFLAG = :OPRFLAG
AND RECORDDATE <= TO_DATE(:END_DATE, 'yyyy-mm-dd hh24:mi:ss') | true |
3c7f3ef141dd87e7ea2a8bde364c1406e5002392 | SQL | bellmit/flexdb | /2.HOST/3.Procedure/mr9006.sql | UTF-8 | 10,560 | 3.1875 | 3 | [] | no_license | CREATE OR REPLACE PROCEDURE mr9006 (
PV_REFCURSOR IN OUT PKG_REPORT.REF_CURSOR,
pv_OPT IN VARCHAR2,
pv_BRID IN VARCHAR2,
pv_CUSTDYCD IN VARCHAR2,
pv_AFACCTNO IN VARCHAR2
)
IS
-- --------- ------ -------------------------------------------
... | true |
e2471b1256ef56b9dbb024e9aee1a9f1569b6491 | SQL | RochelManatsoa/labo | /sql/categorie.sql | UTF-8 | 3,372 | 3.078125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.8.3
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Generation Time: Sep 05, 2019 at 02:47 PM
-- Server version: 5.5.60-MariaDB
-- PHP Version: 7.2.10
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD... | true |
22eb41e5526b53933e1d3f5126f8a9bff37985c6 | SQL | jgarzonext/plsql-testing | /script_plsql/bd_iaxis/script/tables/PREGUNTAB_COLUM.sql | ISO-8859-1 | 1,732 | 3.078125 | 3 | [] | no_license | --------------------------------------------------------
-- DDL for Table PREGUNTAB_COLUM
--------------------------------------------------------
CREATE TABLE "AXIS"."PREGUNTAB_COLUM"
( "CPREGUN" NUMBER(4,0),
"CCOLUMN" VARCHAR2(50 BYTE),
"CTIPCOL" NUMBER(1,0),
"TCONSULTA" VARCHAR2(4000 BYTE),
"SLITERA"... | true |
4def164cde2b93df69200333cd6746061e4f77d4 | SQL | WillZWL/project | /database/change script/shop.eservicesgroup.com/20160516.sql | UTF-8 | 2,306 | 2.859375 | 3 | [] | no_license | INSERT INTO `application` (`id`, `app_name`, `parent_app_id`, `description`, `display_order`, `status`, `display_row`, `url`, `app_group_id`, `create_on`, `create_at`, `create_by`, `modify_on`, `modify_at`, `modify_by`)
VALUES
('SUP0020', 'Create ASN for CPS Accelerator Tansfer ', NULL, 'Create ASN for CPS Accelera... | true |
1d8df3d4fbb0e080833d1e0642d3e26fc97b6ab8 | SQL | jmmenah/front-end-exercises | /Tema 7/banco/banco.sql | UTF-8 | 3,406 | 3.1875 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 5.0.4
-- https://www.phpmyadmin.net/
--
-- Servidor: 127.0.0.1
-- Tiempo de generación: 09-03-2021 a las 00:15:32
-- Versión del servidor: 10.4.16-MariaDB
-- Versión de PHP: 7.4.12
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD... | true |
c5263551c84fb502bc8e80f7de671526c0bce805 | SQL | PaolaMedinaB/Mentor-a-8 | /punto_3.sql | UTF-8 | 382 | 3.9375 | 4 | [] | no_license | SELECT employees.first_name, employees.last_name, employees.department_id, jobs.job_title,departments.department_name, locations.city
FROM employees
INNER JOIN jobs
ON employees.JOB_ID = jobs.JOB_ID
INNER JOIN departments
ON employees.DEPARTMENT_ID = departments.DEPARTMENT_ID
INNER JOIN locations
ON departments.LOCATI... | true |
06415d238c07e498e676a0d914a713f76fb1bd0b | SQL | mmyrland/swiffer | /swiffer-service/src/main/resources/db/adminscripts/create_file_admin.sql | UTF-8 | 488 | 2.9375 | 3 | [] | no_license | -- run these as superuser (e.g., postgres) on your database
-- client_application is the user that can do CRUD operations on the database
CREATE ROLE file_application LOGIN
PASSWORD 'file_application';
-- client_admin is the user that performs schema changes. Flyway uses this account.
CREATE ROLE file_admin LOGIN
PAS... | true |
0763163501ec42c648755e9570ab09b7e8eaca95 | SQL | korezonzi/-NB_SQL | /theme-b/66.sql | UTF-8 | 429 | 3.5 | 4 | [] | no_license | -- select P.id,P.名称 as なまえ,P.職業コード as 職業
-- from パーティー P
-- --
SELECT P.ID,
COALESCE(P.名称, '仲間になっていない!') AS なまえ,
S.コード名称 AS 職業
FROM パーティー P
RIGHT JOIN (SELECT コード値, コード名称
FROM コード
WHERE コード種別 ='1') S
ON P.職業コード = S.コード値
| true |
df0d6fde8a67381bb6ce0d4f3813e4b5451d07f4 | SQL | evanwelty/Gotv-shift-export | /vr.sql | UTF-8 | 1,618 | 4.1875 | 4 | [] | no_license | select state
, count (distinct vanid) as total_vr
,canvassmonth
from (
select t.vanid
, split_part(surveyquestionname, ' ', 1) as state
, surveyresponsename as turf
, date_trunc('month', d.datecanvassed) as canvassmonth
--Subtract 1 so Monday report pulls pre... | true |
ffb698d8584d7d49770d91cfe1260ae77cc872c0 | SQL | LoneGazebo/Community-Patch-Mod-Files | /Community Patch (v 1)/CommunityOptions.sql | UTF-8 | 1,828 | 2.984375 | 3 | [] | no_license | --DO NOT MODIFY THIS--
CREATE TABLE IF NOT EXISTS COMMUNITY (
Type text,
Value variant default 0
);
--DO NOT MODIFY ABOVE--
/*
_______________Community Patch for Brave New World ________________
Thank you for downloading the Community Patch!
_______________OPTIONS FOR Community Patch____________________
All options... | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.