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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
1862116c4332ec8ac62e4e0921091ff7e97d3f0a | SQL | mooncs/TIL | /5_db/00_DB/SQL/12_alter.sql | UTF-8 | 701 | 3.6875 | 4 | [] | no_license | -- 1. TABLE 이름 변경
-- ALTER TABLE table_name RENAME To new_name;
ALTER TABLE articles RENAME To news;
-- 2. 테이블에 새로운 column 추가
-- ALTER TABLE table_name ADD COLUMN column_name data_type;
ALTER TABLE news ADD COLUMN created_at TEXT NOT NULL;
-- 기존의 데이터에는 없는 columns이기 때문에 error발생
-- 해결 1. NOT NULL 설정 없이 추가하기
ALTER TABLE ... | true |
2e51686956cbb5cf4ffcfa8354a1ca190393544f | SQL | kemedina/inventario | /inventario.sql | UTF-8 | 3,163 | 3.078125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 3.5.1
-- http://www.phpmyadmin.net
--
-- Servidor: localhost
-- Tiempo de generación: 24-01-2017 a las 03:55:18
-- Versión del servidor: 5.5.24-log
-- Versión de PHP: 5.4.3
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARA... | true |
798ac22746e8f6ecf4219cb0ef6f01daaac543b7 | SQL | jiayuasu/bitmap-postgresql | /src/pl/plpython/sql/plpython_schema.sql | UTF-8 | 1,098 | 3.546875 | 4 | [
"PostgreSQL"
] | permissive |
CREATE TABLE users (
fname text not null,
lname text not null,
username text,
userid serial,
PRIMARY KEY(lname, fname)
) ;
CREATE INDEX users_username_idx ON users(username);
CREATE INDEX users_fname_idx ON users(fname);
CREATE INDEX users_lname_idx ON users(lname);
CREATE INDEX users_userid_idx ON users(useri... | true |
2da5dce37412809bfa7b31531f4313f525aef8dd | SQL | Eleniitha/MiniProtect | /mini_proyecto.sql | UTF-8 | 2,067 | 3.0625 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.2.11
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Apr 14, 2015 at 08:43 PM
-- Server version: 5.6.21
-- PHP Version: 5.5.19
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;... | true |
1bc055f74c8360a1ad75a2f090f977aed889d2af | SQL | NobuyukiInoue/LeetCode | /Problems/0500_0599/0584_Find_Customer_Referee/resolve.sql | UTF-8 | 167 | 2.640625 | 3 | [] | no_license | # Write your MySQL query statement below
# 416ms - 580ms
SELECT Customer.name from Customer where Customer.id not in (select id from Customer where referee_id = 2);
| true |
35cb3863ccc055c7cd866af3812bc80b0c22008f | SQL | rondado/sisconet_taruma | /Exec/Dados/Scripts/PROC_GRAVA_PERDA_COMUNICA_BC.sql | UTF-8 | 2,323 | 3.484375 | 3 | [] | no_license | SET TERM ^ ;
create or alter procedure PROC_GRAVA_PERDA_COMUNICA_BC (
COMUNICACAO integer,
NUM_BICO varchar(2),
EI double precision)
as
declare variable V_ID_BICO integer;
declare variable V_NUM_BICO varchar(2);
declare variable V_DESCRICAO varchar(90);
declare variable V_EF double precision;
declare varia... | true |
fcc563ca65a39ba544523d1cfb3da4e7fee0aa47 | SQL | Cutecurtain/Databases | /tables.sql | UTF-8 | 4,360 | 3.96875 | 4 | [] | no_license |
--Program(_name_, abbreviation)
CREATE TABLE Program (
name TEXT PRIMARY KEY,
abbreviation TEXT NOT NULL
);
--Department(_name_, abbreviation)
-- UNIQUE abbreviation
CREATE TABLE Department (
name TEXT PRIMARY KEY,
abbreviation TEXT UNIQUE NOT NULL
);
--Hosts(_department_, _program_)
-- department -> De... | true |
5d80b4e6083819db56d342baff6cd815810a34ad | SQL | ThiagoCamiloNonatoWenceslau/CadastroDeContasApi | /src/Querys/TipoConta/UspExcluirTipoConta.sql | UTF-8 | 127 | 2.53125 | 3 | [] | no_license | Create Procedure UspTipoContaExcluir
@Id int
As
Begin
Delete From
TipoConta
Where
Id = @Id
Select @Id As Retorno
End | true |
8500708060afd1b58ac2f959559ec52b53dfd50c | SQL | tiagodiana/os_sistema_pyqt | /banco.sql | UTF-8 | 768 | 3.484375 | 3 | [] | no_license | create database os;
use os;
create table clientes(
id int auto_increment primary key,
nome varchar(40) not null,
cpf char(11) not null,
telefone varchar(15),
celular varchar(15) not null,
rua varchar(40) not null,
bairro varchar(40) not null,
cidade varchar(40) not null,
estado char(2) not null,
CEP varchar... | true |
5ae8c179e0a455fb12905a71a1437fec12344aa7 | SQL | tayduivn/Rhomicom-DB-Scripts | /ORACLE_SQL/SHARED_FUNCTIONS/07_GST/07F015_gst.getgnrlrecid1.sql | UTF-8 | 1,002 | 3.140625 | 3 | [
"MIT"
] | permissive | /* Formatted on 12-14-2018 6:01:31 PM (QP5 v5.126.903.23003) */
-- Function: gst.getgnrlrecid1(VARCHAR2, VARCHAR2, VARCHAR2, VARCHAR2, integer)
-- DROP FUNCTION gst.getgnrlrecid1(VARCHAR2, VARCHAR2, VARCHAR2, VARCHAR2, integer);
CREATE OR REPLACE FUNCTION gst.getgnrlrecid1 (tblnm VARCHAR2,
... | true |
d8037c83c53630f7dfd648fa4868c66855e5b1b8 | SQL | navneetkaur-coder/Multimedia-turnitin-GroupB | /musicmania.sql | UTF-8 | 3,158 | 3.1875 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.8.5
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Jul 30, 2019 at 09:07 PM
-- Server version: 10.1.40-MariaDB
-- PHP Version: 7.1.29
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OL... | true |
ae123c0ccc589a47c4673f77a6f68fa0cd5557af | SQL | molooo/mybishe | /sql/20151203_lyx.sql | GB18030 | 2,068 | 3.78125 | 4 | [] | no_license |
CREATE TABLE `NoteCate` (
`Id` int(11) NOT NULL AUTO_INCREMENT COMMENT '',
`Name` varchar(50) NOT NULL COMMENT '',
PRIMARY KEY (`Id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='';
CREATE TABLE `Category` (
`Id` int(11) NOT NULL AUTO_INCREMENT COMMENT '',
`Name` varchar(50) NOT NULL COMMENT '',
PRIMAR... | true |
2095eb62bfcb2841a32fdcfd852746cea8741d4d | SQL | eschwert/Breakbulk | /org.openanzo.datasource.nodecentric/src/main/resources/nodecentric/common/xmlsql/Backup.sql | UTF-8 | 6,064 | 3.140625 | 3 | [] | no_license | <?xml version="1.0" encoding="UTF-8"?>
<!--
#*******************************************************************************
# Copyright (c) 2009 Cambridge Semantics Incorporated.
# All rights reserved. This program and the accompanying materials
# are made available under the ter... | true |
a963e7fec032c117360e5dc8d2609c6e7c7ffdb3 | SQL | top430/sql | /shopping.sql | UTF-8 | 3,375 | 3.90625 | 4 | [] | no_license | #alter table [추가할테이블명] add constraint [제약조건명] foreign KEY(컬럼명)
#references [부모테이블명] (PK컬럼명) [ON DELETE CASCADE / ON UPDATE CASECADE];
#alter table [테이블명] drop foreign key [제약조건명];
DROP TABLE IF EXISTS customers ;
CREATE TABLE customers (
customer_id INT NOT NULL,
customer_pw VARCHAR(45) NULL,
customer_na... | true |
d71253f683f915bb2c1170d05832fad51782ba0e | SQL | BrandonFowler/SchoolWork | /Later Work/Database Theory And Programming Practice/Lab 1/database2.sql | UTF-8 | 8,089 | 3.046875 | 3 | [] | no_license | SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
--
-- Table structure for table `CUSTOMERS`
--
CREATE TABLE IF NOT EXISTS `CUSTOMERS` (
`CUST_NUM` int(11) NOT NULL,
`COMPANY` varchar(20) NOT NULL,
`CUST_REP` int(11) DEFAULT NULL,
`CREDIT_LIMIT` decimal(9,2) DEFAULT NULL,
PRIMARY KEY (`CUST_NUM`),
KEY `HASREP` (`CUS... | true |
3c4caef5074b60768d6a676d6e50dbd2b10207e5 | SQL | kristen-foong/CPSC304 | /Project/project.sql | UTF-8 | 31,501 | 3.75 | 4 | [] | no_license | DROP TABLE EvolvesInto;
DROP TABLE has_a;
DROP TABLE Mega_Item;
DROP TABLE ofType;
DROP TABLE WeakAgainst;
DROP TABLE is_of;
DROP TABLE has;
DROP TABLE Mega_Evolution;
DROP TABLE Evo_Item;
DROP TABLE Status_Item;
DROP TABLE p_uses;
DROP TABLE P_Type;
DROP TABLE P_Stats;
DROP TABLE Item;
DROP TABLE Pokemon;
DROP TABLE S... | true |
ce3e1489710c45ad7dceb391c8d5a0b25cdbf01f | SQL | syamthampiv/atto_dev_new | /V1_33__target_user_liset_view_ver2.sql | UTF-8 | 1,897 | 3.4375 | 3 | [] | no_license | create or replace view v_activity_source_target_list
(source_user_id ,
activity_name ,
target_user_id
)
as select a.follower_id as source_user_id,'FOLLOW_COMPANY'::character varying as activity_name,e.id as target_user_id
from follow a left outer join users b on (a.follower_id = b.id)
left ou... | true |
c89d8b3a27385aa38421da1e942b6a433d51e05c | SQL | mrozenbaum/chinook-mrozenbaum | /ChinookDatabase1.4_CompleteVersion/top_2009_agent.sql | UTF-8 | 324 | 3.671875 | 4 | [] | no_license | /*Which sales agent made the most in sales in 2009?
Hint: Use the MAX function on a subquery. */
select MAX(Total) as TopSales, Employee.EmployeeId, Invoice.Total
from Employee join Customer on Employee.EmployeeId=Customer.SupportRepId
join Invoice on Customer.CustomerId=Invoice.CustomerId
where Invoice.InvoiceDate='20... | true |
9f5f34705fd69f6caf60582f46eaea922659c68a | SQL | radtek/abs3 | /sql/mmfo/bars/Procedure/op_reg_exfl.sql | MacCyrillic | 2,558 | 2.71875 | 3 | [] | no_license |
PROMPT =====================================================================================
PROMPT *** Run *** ========== Scripts /Sql/BARS/Procedure/OP_REG_EXFL.sql =========*** Run *
PROMPT =====================================================================================
PROMPT *** Create procedure... | true |
019ecad0e64fa40431836cb1e59df5c210857618 | SQL | nlytridis/Data-Bases | /sql.entoles/4.1.sql | UTF-8 | 585 | 3.5 | 4 | [] | no_license | WITH SUM_TRUE AS (
select count(idroom) AS katilimena,"hotelID" as hotel1 from rooms B1
where B1.vacant='f'
group by "hotelID" order by "hotelID" ASC),SUM_1 AS(
SELECT count(idroom) AS sinolo_dwmatiwn,"hotelID" as hotel2 from rooms
group by "hotelID" order by "hotelID" ASC)
-- SELECT ONOM... | true |
f7fcc77ff4fe6625e5de8d659e1fe7b078e22ebd | SQL | gusqudgh980904/OraclePractice | /day0325_1.sql | UHC | 1,292 | 3.796875 | 4 | [] | no_license | --chek,nut null,default
--̴ 20~30븸 Է,̸ ݵ Է,Է Ǹ ڵ尡 ߰Ǵ ¥ ߰
create table other_constraint(
num number(5),
name varchar2(30 byte) not null,
age number(2) check(age between 20 and 39),
input_date date default sysdate
);
-- Ȯ
select * from user_constraints
where table_name='OTHER_CONSTRAINT';
--default Ȯ
se... | true |
d6c557847cc4894043a06285074d06bb50c1961f | SQL | Bootz/IceCreamdb | /arctic_world/items_localized.sql | UTF-8 | 908 | 2.734375 | 3 | [] | no_license | /*
Navicat MySQL Data Transfer
Source Server : arcticdev
Source Server Version : 50509
Source Host : localhost:3306
Source Database : arctic_world
Target Server Type : MYSQL
Target Server Version : 50509
File Encoding : 65001
Date: 2012-04-04 17:24:24
*/
SET FOREIGN_KEY_CHECKS=0;
... | true |
59f9bdd7aeb7eea6189685ea91d51d21130b8641 | SQL | hqottsz/MXI | /assetmanagement-database/src/base/plsql/maintenix/plsql/utl_parallel_pkg_spec.sql | UTF-8 | 10,113 | 2.53125 | 3 | [] | no_license | --liquibase formatted sql
--changeSet utl_parallel_pkg_spec:1 stripComments:false endDelimiter:\n\s*/\s*\n|\n\s*/\s*$
CREATE OR REPLACE PACKAGE UTL_PARALLEL_PKG IS
----------------------------------------------------------------------------
-- Object Name : utl_parallel_pkg
-- Object Type : Package Spec
-... | true |
58053a6f5176db875f834ed72d90de5c51c4f1f2 | SQL | michaelBielang/persistence-playground | /none-hibernate-managed-sequence/src/main/resources/schema.sql | UTF-8 | 266 | 2.96875 | 3 | [] | no_license | CREATE SEQUENCE SEQUENTIAL_PERSON_SEQUENCE
START WITH 1
INCREMENT BY 1
MINVALUE 1;
CREATE TABLE SEQUENTIAL_PERSON
(
ID LONG NOT NULL,
FIRST_NAME VARCHAR(255) NOT NULL,
LAST_NAME VARCHAR(255) NOT NULL,
PRIMARY KEY (ID)
)
| true |
d3a3aae393201851278d04f620e26f190a4644b5 | SQL | jani72/LMSCF-Hans-Juergen-Janos-CR11 | /cr11_janos_petadoption.sql | UTF-8 | 7,179 | 3.15625 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Erstellungszeit: 25. Jul 2020 um 16:32
-- Server-Version: 10.4.13-MariaDB
-- PHP-Version: 7.4.7
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@... | true |
b3b8a6813c1c1c5675e5713339ea349371564818 | SQL | AdeelGalileo/GTM-App | /dbChanges/tables/client_qb_reference.sql | UTF-8 | 732 | 2.6875 | 3 | [] | no_license | CREATE TABLE `client_qb_reference` (
`client_qb_ref_id` INT(11) NOT NULL AUTO_INCREMENT,
`client_qb_ref_client_id` INT(11) NOT NULL DEFAULT '0',
`client_qb_ref_division_id` INT(11) NOT NULL DEFAULT '0',
`client_qb_ref_qb_id` INT(11) NOT NULL DEFAULT '0',
`client_qb_ref_qb_class` VARCHAR(100) NOT NULL DEFAULT '',
... | true |
f5beab149ec0f7d5af5d9a418b3a87a9f23a3ccf | SQL | ghulamm123/FYP-Management-system | /id8403841_fypms.sql | UTF-8 | 15,617 | 2.984375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.8.5
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Generation Time: Sep 02, 2019 at 02:52 AM
-- Server version: 10.3.16-MariaDB
-- PHP Version: 7.3.2
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OL... | true |
50de9baa70735160aeacb12945b901cf22e5cc03 | SQL | lidegui/little-drawer-server | /little_drawer.sql | UTF-8 | 6,314 | 3.34375 | 3 | [
"Apache-2.0"
] | permissive | /*
Navicat MySQL Data Transfer
Source Server : lidegui
Source Server Version : 50718
Source Host : localhost:3306
Source Database : little_drawer
Target Server Type : MYSQL
Target Server Version : 50718
File Encoding : 65001
Date: 2019-05-06 22:07:33
*/
SET FOREIGN_KEY_CHECKS=0;
... | true |
cd18197944197008074807412d5e910b0ea668b0 | SQL | DanielHe4rt/Cadastro_Apse | /excel.sql | UTF-8 | 5,898 | 3.046875 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Tempo de geração: 16-Set-2020 às 18:44
-- Versão do servidor: 10.4.13-MariaDB
-- versão do PHP: 7.2.32
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_C... | true |
454d0b3ce26177a81423cf9f5beb162837f6fb40 | SQL | ferkopar/ToDoSchema | /USER_IS_IN_ROLE.sql | UTF-8 | 719 | 2.984375 | 3 | [] | no_license | --------------------------------------------------------
-- DDL for Function USER_IS_IN_ROLE
--------------------------------------------------------
CREATE OR REPLACE FUNCTION "USER_IS_IN_ROLE" (P_USER_NAME IN VARCHAR2,
P_ROLE_ID IN NUMBER)
RETURN NUMBER
... | true |
01db6a5e83c8b4cb4e494e6aa1d8a32f61dff750 | SQL | TotenDev/IrcMan | /create.sql | UTF-8 | 613 | 3.0625 | 3 | [
"MIT"
] | permissive | DROP SCHEMA IF EXISTS `ircMan` ;
CREATE SCHEMA IF NOT EXISTS `ircMan` DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ;
SHOW WARNINGS;
USE `ircMan` ;
-- -----------------------------------------------------
-- Table `ircMan`.`messages`
-- -----------------------------------------------------
CREATE TABLE IF NOT EX... | true |
ac4fbd5ee19a3432d1c35b0b3acdf6ade4998f81 | SQL | hoseinmohajer/darkstore | /darkstore.sql | UTF-8 | 16,155 | 2.5625 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.0.10deb1
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Jan 02, 2015 at 10:10 AM
-- Server version: 5.5.40-0ubuntu0.14.04.1
-- PHP Version: 5.5.9-1ubuntu4.5
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CL... | true |
e1dea4375777fbed8862b9f07b68de9a0a9ab191 | SQL | Shyamswami/toolbox | /show_space.sql | UTF-8 | 1,428 | 3.203125 | 3 | [] | no_license | create table object_storage_space( obj_owner varchar2(30),
obj_name varchar2(30),
obj_type varchar2(20),
total_bytes number(30),
unused_bytes number(30),
used_bytes number(30));
Create or Replace Procedure Object_Space_Check(obj_owner in
varchar2,obj_type in varchar2)
is
total_blocks number;
t... | true |
ab4d618563e2e6c16ba4447f87985163a05477b0 | SQL | chrzasz/databases.sda | /indexes.sql | UTF-8 | 2,131 | 4.09375 | 4 | [] | no_license | /* Cw 20
W bazie classicmodels przeszukaj kolumnę nieindeksowaną z użyciem operatora LIKE.
Następnie nałóż na tę samą kolumnę indeks FULL TEXT. Ponów wyszukiwanie tego samego tekstu przy
pomocy operatorów MATCH AGAINST. Jaka jest różnica w czasie wyszukiwania?
Podpowiedź: Aby sprawdzić, czy tabela ma indeks(y) FULL TE... | true |
d85325954e8e6d168351e9d128040b148e94e3b7 | SQL | masterUNG/UngAicApp | /api/aic.sql | UTF-8 | 6,103 | 3.09375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 5.0.1
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Generation Time: Jan 21, 2021 at 03:58 PM
-- Server version: 10.4.11-MariaDB
-- PHP Version: 7.4.2
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD... | true |
5dd3b8c881dbc28f7211ef753847fcbf32715728 | SQL | youda97/StorkDB | /SQLs/Queries/Query5.sql | UTF-8 | 391 | 3.953125 | 4 | [] | no_license | #Queries for every sighting account for a specific user account since Jan 1st, 2008 and displays all the birds the user has sighted with a timestamp.
Select useraccounts.UserName, Sightings.ScientificName, Timestamp
from Sightings
Inner join useraccounts ON useraccounts.UserID = sightings.UserID
Where UserName = '2UX9N... | true |
6ddc0a6da866f0e29fdaf4738715b7566f89b7b5 | SQL | thaib91/lyfe | /db/update_interests.sql | UTF-8 | 198 | 2.78125 | 3 | [] | no_license | UPDATE interests
SET user_interests = ${user_interests}
WHERE interests_id = ${interests_id}
AND user_id = ${user_id};
SELECT * FROM interests WHERE user_id = ${user_id}
ORDER BY interests_id DESC; | true |
44549582510a8c151ca3a7bcf84039606522ac78 | SQL | Ewocker/CMPS180-DataBase | /Lab1/load_values_lab1.sql | UTF-8 | 844 | 3.34375 | 3 | [] | no_license | -- Inserting values to Stores table
INSERT INTO Stores VALUES
(100, '700 Front St, Santa Cruz', 'Jennifer Williams'),
(200, '600 Front St, Santa Cruz', 'John Smith'),
(300, '1700 Mission St, Santa Cruz', 'Robert Davis');
-- Inserting values to Customers table
INSERT INTO Customers VALUES
(1, 'George', '401 Heller Dr... | true |
752769b3d4b2b8e004f2616bbf9720592702906e | SQL | SeniorDeveloper111/Flask-CRUD | /product.sql | UTF-8 | 1,381 | 3.234375 | 3 | [] | no_license | /*
SQLyog Enterprise - MySQL GUI v8.05
MySQL - 5.5.5-10.1.38-MariaDB : Database - flask_db
*********************************************************************
*/
/*!40101 SET NAMES utf8 */;
/*!40101 SET SQL_MODE=''*/;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
... | true |
a45b0382f86e39bedbe474703a00b149338e9890 | SQL | ashish4994/Oracle-Db-Scripts | /Rollout/Rollout/Validations/350_NOTIFYatCAS_MK1050_PKG_RO_VAL.sql | UTF-8 | 1,287 | 3.03125 | 3 | [] | no_license | /*
Script: 350_NOTIFYatCAS_MK1050_PKG_RO_VAL.sql
Author: FMASSARINI
Date: 02/24/2021
Purpose: Validates PKGs
*/
SET TERMOUT ON
SET ECHO OFF
SET LINESIZE 80
--SET ESCAPE ^
--SET DEFINE OFF
SET SERVEROUTPUT ON SIZE 10000
WHENEVER SQLERROR EXIT ROLLBACK
column filename NEW_VAL f... | true |
3a7371c585d208c47711f4264352f7bcbad003f7 | SQL | LUAgam/hf | /HfStuPTJobSys/db/test.sql | UTF-8 | 13,443 | 3.046875 | 3 | [] | no_license | /*
Navicat MySQL Data Transfer
Source Server : 192.168.169.132
Source Server Version : 50722
Source Host : 192.168.169.132:3306
Source Database : test
Target Server Type : MYSQL
Target Server Version : 50722
File Encoding : 65001
Date: 2018-05-01 07:01:16
*/
SET FOR... | true |
26a786c70faf8f75cbc727d4b1c7e6c45a963015 | SQL | augustusborges/daab_site | /scripts/montabanco.sql | UTF-8 | 7,619 | 3.265625 | 3 | [] | no_license | /*use testes;
CREATE TABLE `testes`.`empresa` (
`idempresa` INT NOT NULL AUTO_INCREMENT,
`nomeempresa` VARCHAR(200) NULL,
PRIMARY KEY (`idempresa`));
CREATE TABLE `testes`.`colaborador` (
`idcolaborador` INT NOT NULL AUTO_INCREMENT,
`nomecolaborador` VARCHAR(200) NULL,
`idempresa` INT NULL,
PRIMARY KEY ... | true |
52607a7d6532b56ac3708ee0bed1f79ab72f3512 | SQL | AkshathaShettyR/chat | /laravel6_rest_api.sql | UTF-8 | 21,687 | 2.640625 | 3 | [
"MIT"
] | permissive | -- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Dec 11, 2020 at 08:36 AM
-- Server version: 10.4.11-MariaDB
-- PHP Version: 7.4.5
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIEN... | true |
42677e18f2da09b9c9cae3d9906b8abc2e912212 | SQL | ikulah/Fonet-USS | /Diğer/1.sql | UTF-8 | 2,667 | 2.953125 | 3 | [] | no_license | SELECT "RK"."ID" AS DETAY_ID,
"P"."P_TCKIMLIK" AS HEKIM_KIMLIK_NUMARASI
FROM SKR_KAYIT RK
INNER JOIN FONETHBYSADM.SKR_RAPORTANIM RT ON RT.ID = RK.RAPORTURID AND RT.RAPORGRUBU = 4
INNER JOIN SKR_KAYITDOKTOR KD ON KD.KAYITID = RK.ID
LEFT JOIN FONETHBYSADM.H_PERSON P ON P.P_ID= KD.DOKTOR1
WHERE NVL(KD.DOKTOR1,-1) ... | true |
aa7753b17c43d9c7db908672ed3dc54f25f8efd4 | SQL | peteykun/mplayer | /target/ddl.sql | UTF-8 | 2,476 | 3.15625 | 3 | [] | no_license |
drop table admin cascade constraints;
drop table album cascade constraints;
drop table artist cascade constraints;
drop table playlist cascade constraints;
drop table playlist_tracks cascade constraints;
drop table registered_user cascade constraints;
drop table track cascade constrai... | true |
cd8f8d193f1bab3bb0b6e116613f3c104a4c2504 | SQL | schmex/PHP | /kr/kr.sql | UTF-8 | 801 | 3.328125 | 3 | [] | no_license | // 1
CREATE TABLE T1(N int AUTO_INCREMENT, name varchar(50), type varchar(50), firm varchar(50), PRIMARY KEY(N));
// 2
INSERT INTO T1(name, type, firm)
VALUES("Access", "Реляционная", "Microsoft"),
("Foxpro", "Реляционная", "Microsoft"),
("Oracle7", "Реляционная", "Oracle"),
("Orion3", "ОО", "Orion"),
("Orion... | true |
a78a4605621e0f0c07f557f31cb75e43a7b6e739 | SQL | gconway012/Hair_Salon_No-Show | /mysql_scripts/future_bookings_table.sql | UTF-8 | 2,904 | 3.71875 | 4 | [
"MIT"
] | permissive | #####################################################
## ##
## This script relates to all matters pertaining to the ##
## "future_bookings" table. ##
## ##
#####################################################
############################
# S... | true |
33a8acff52f84952f9e75e1fe5b193d049c37fa3 | SQL | yujiatay/cs2102-project | /backend/src/db/migrations/0004-sample2.sql | UTF-8 | 13,630 | 2.96875 | 3 | [] | no_license | -- Remove existing sample entities
DELETE FROM Diners WHERE username = 'batman';
DELETE FROM Diners WHERE username = 'superman';
DELETE FROM Restaurants WHERE username = 'burntends';
DELETE FROM Restaurants WHERE username = 'saltedplum';
-- Create sample entities
INSERT INTO Diners (username, password, email, referral... | true |
a3902274c549cc1659f006fe057e18ffa6410d8f | SQL | lydiacupery/cs342 | /project/query.sql | UTF-8 | 4,794 | 4.75 | 5 | [] | no_license | /* Query 1: selects all books for a given user, including the quantity and condition
For this example, no user is specified so selects this information for all users
This would be useful in order for a user to see all of his/her books and the condition of those books
*/
SELECT P.lastName || ', ' || P.firstName || ' h... | true |
2c104b1e252bf9ae353f66d620ede9ee674d8152 | SQL | LucasMali/puzzlesolver | /puzzle_2021-01-22.sql | UTF-8 | 1,303 | 3.140625 | 3 | [] | no_license | /*!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 */;
SET NAMES utf8mb4;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CH... | true |
a206a5fe14755eb2653df9e046b29142d77268e6 | SQL | jgarzonext/plsql-testing | /script_plsql/bd_iaxis/script/indices/ANURIESGOS_IR_ORDENES_PK.sql | UTF-8 | 383 | 2.671875 | 3 | [] | no_license | --------------------------------------------------------
-- DDL for Index ANURIESGOS_IR_ORDENES_PK
--------------------------------------------------------
CREATE UNIQUE INDEX "AXIS"."ANURIESGOS_IR_ORDENES_PK" ON "AXIS"."ANURIESGOS_IR_ORDENES" ("SSEGURO", "NRIESGO", "NMOVIMI", "CEMPRES", "SORDEN")
PCTFREE 10 INI... | true |
fbed81edaa58aee954c5fe410fe3509c0c1d5d4b | SQL | AzizPW/Oracle | /OEM Reconfigure_2.sql | UTF-8 | 5,289 | 3 | 3 | [] | no_license | OEM Reconfigure
---------------
http://blog.mclaughlinsoftware.com/oracle-architecture-configuration/changing-windows-hostname-and-oracle-enterprise-manager/
One mistake can lead to a lot of work. When you’ve installed Oracle Database 11g, you can’t change the Windows Hostname without reinstalling Oracle Enterprise Ma... | true |
78a91e486dee54560a891fc8331d02707ec51d04 | SQL | jrjr-randy/backoffice | /sql/build_new_db/prometheus_tables/zipsales_local.table.sql | UTF-8 | 1,419 | 3.59375 | 4 | [] | no_license | DROP PROCEDURE IF EXISTS table_create_prometheus_zipsales_local;
DELIMITER //
CREATE PROCEDURE table_create_prometheus_zipsales_local()
BEGIN
IF NOT EXISTS ( SELECT DISTINCT 1 FROM `information_schema`.`TABLES` WHERE `TABLE_SCHEMA` = DATABASE() AND `TABLE_NAME` = 'zipsales_local' ) THEN
CREATE TABLE `zip... | true |
0875294c6772c3d81976d678d3ee23f909324b07 | SQL | mlsama/maimai | /maimai-admin/maimai-admin-service/src/main/resources/sql/tb_content(内容).sql | UTF-8 | 896 | 3.28125 | 3 | [
"MIT"
] | permissive | SET FOREIGN_KEY_CHECKS=0;
-- ----------------------------
-- Table structure for tb_content
-- ----------------------------
DROP TABLE IF EXISTS `tb_content`;
CREATE TABLE `tb_content` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`category_id` bigint(20) NOT NULL COMMENT '内容类目ID',
`title` varchar(200) DEFAULT NULL... | true |
aa444c0972b13f931fc078fdd783b29579a630c7 | SQL | Igor-Nosatov/simple-mvc-blog | /database.sql | UTF-8 | 3,043 | 3.359375 | 3 | [
"MIT"
] | permissive | -- phpMyAdmin SQL Dump
-- version 4.8.0
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Generation Time: Apr 28, 2018 at 12:19 AM
-- Server version: 10.1.32-MariaDB
-- PHP Version: 7.2.5
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD... | true |
5afc4f6ed1bf4046440510712cc3b1e81bfbfd3b | SQL | vailv/INFO6210-DatabaseDesign | /lecture/week07/W7-8Simple XML Examples.sql | UTF-8 | 369 | 2.65625 | 3 | [] | no_license |
USE AdventureWorks2008R2;
-- Create query result in the Element Centric XML format
SELECT FirstName, MiddleName, LastName
FROM Person.Person AS Person
FOR XML AUTO, ROOT('FullName'), Elements;
-- Create query result in the Attribute Centric XML format
SELECT FirstName, MiddleName, LastName
FROM Person.... | true |
377a350f6098723362f8a78680ef03f4cb8e4f6d | SQL | franciscocarbone/melProyecto | /modificaciones_esquema_BD_grupo_39.sql | UTF-8 | 1,270 | 3.109375 | 3 | [] | no_license | --MODIFICACION TABLA ENTIDAD RECEPTORA
--Eliminacion FK contacto
alter table entidad_receptora drop foreign key contacto_fk;
--Borrado de columna contacto en entidad receptora
alter table entidad_receptora drop column contacto_id;
--MODIFICACION TABLA DONANTE
--Eliminacion FK contacto
alter table donante drop foreig... | true |
fac48a5b8c1cb700f865e45284451113153c92b0 | SQL | pvto/neur | /script/neur_schema.sql | UTF-8 | 4,946 | 3.78125 | 4 | [] | no_license | DROP VIEW "PUBLIC"."RREC_AVG_ORD";
DROP VIEW "PUBLIC"."run_percentages_2";
DROP TABLE "PUBLIC"."RREC_AVG";
DROP TABLE "PUBLIC"."RREC";
DROP TABLE "PUBLIC"."RUN";
DROP VIEW "PUBLIC"."SAMPLE";
DROP TABLE "PUBLIC"."D_VALIDATION_SET";
DROP TABLE "PUBLIC"."D_DATAITEM";
DROP TABLE "PUBLIC"."D_SPECIMEN";
DROP TABLE "PUBLIC"."... | true |
ce961d4c60e0c9626bf7a64a156546dd333d941b | SQL | basteln3rk/StackWho | /server/queries.sql | UTF-8 | 2,146 | 4.1875 | 4 | [
"MIT"
] | permissive | SELECT id,(data) FROM people LIMIT 1
-- build the application index
-- create a custom aggregator to be able to get all the all the tags belonging to one user into one row
DROP AGGREGATE IF EXISTS array_accum(anyelement);
CREATE AGGREGATE array_accum (
sfunc = array_append,
basetype = anyelement,
stype... | true |
00b7666e967b3efb38bdde6426bce80a29d8352b | SQL | cncf/devstats | /metrics/kubernetes/num_stats.sql | UTF-8 | 1,873 | 4.5625 | 5 | [
"Apache-2.0"
] | permissive | select
'nstats;All;comps,devs,unks' as name,
count(distinct affs.company_name) as n_companies,
count(distinct ev.actor_id) as n_authors,
count(distinct ev.actor_id) filter (where affs.company_name is null) as n_unknown_authors
from
gha_events ev
left join
gha_actors_affiliations affs
on
ev.actor_id = affs... | true |
cc3ca4fc15235dc2ee52fa7480d32a5d5ce99cb7 | SQL | AndreOikawa/cs348 | /pop.sql | UTF-8 | 36,176 | 3.9375 | 4 | [] | no_license | -- Example commands for (re) creating the STUDENT-COURSE database.
-- NOTE: "insert" commands should be modified to create appropriate
-- test data.
connect to cs348
drop table course
create table course ( \
cnum varchar(5) not null, \
cname varchar(40) not null, \
primary key (cnum) )
inser... | true |
da060e7dc41a6fc2f1cf2c2c82a406cd359a6984 | SQL | dailondolojan/SQL | /Lab 3/script6.sql | UTF-8 | 1,511 | 4.46875 | 4 | [] | no_license | /* 3.7 More Queries */
/* 1.Write a statement that will change the active attribute to true for every row in mg_customers
where active is NULL and the customer’s last name starts with ’B’ or ’C’ */
UPDATE mg_customers
SET active = true
WHERE active = NULL AND (last_name LIKE 'B_%' OR last_name LIKE 'C_%');
/* 2.John... | true |
8cf9ada01cf75eb0f2030ecfeb87734d5cb06dac | SQL | MinaProtocol/mina | /src/app/replayer/test/archive_db.sql | UTF-8 | 121,211 | 3.1875 | 3 | [
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | --
-- PostgreSQL database dump
--
-- Dumped from database version 10.21 (Ubuntu 10.21-0ubuntu0.18.04.1)
-- Dumped by pg_dump version 13.1 (Ubuntu 13.1-1.pgdg18.04+1)
SET statement_timeout = 0;
SET lock_timeout = 0;
SET idle_in_transaction_session_timeout = 0;
SET client_encoding = 'UTF8';
SET standard_conforming_stri... | true |
c3c548fd56fc6bf3bef4fb2673e7b7309ece78bb | SQL | togunchan/SQL | /queries.sql | UTF-8 | 997 | 3.984375 | 4 | [] | no_license | -- Seçilen Kayıtların Başka Tabloya Eklenmesi
insert into employee_performance(employee_id,fullname,email,satis_adeti)
select e.id, concat(e.first_name,' ',e.last_name) as fullname, e.email_address, count(o.id) as adet
from employees e left join orders o on e.id = o.employee_id
group by e.id
-- Join ile Update
update ... | true |
b764da347a82f040adac58aa766166559cb8a68f | SQL | SuperMap/GAF | /gaf-cloud/gaf-commons/gaf-common-base-data/src/main/resources/com/supermap/gaf/base/data/ddl/auth_post.sql | UTF-8 | 1,494 | 3.34375 | 3 | [
"Apache-2.0"
] | permissive | -- liquibase formatted sql logicalFilePath:ddl/auth_post
-- changeset SYS:20210406-0
CREATE TABLE "auth_post" ("post_id" VARCHAR(36) NOT NULL, "tenant_id" VARCHAR(36) NOT NULL, "department_id" VARCHAR(36) NOT NULL, "sort_sn" INTEGER, "post_name" VARCHAR(255) NOT NULL, "name_en" VARCHAR(255), "code" VARCHAR(100), "stat... | true |
f7791ba6bf2ac11037dd665dd185953fae565e58 | SQL | adaneslavo/More-Unique-Components-for-VP | /China/XiafanGuanjun/XiafanGuanjun.sql | UTF-8 | 10,214 | 2.5625 | 3 | [] | no_license | --==========================================================================================================================
-- CIVILIZATIONS
--==========================================================================================================================
--------------------------------
-- Civilization_U... | true |
18e8cd24336a47c845e4f6197e2b1e73c85945b8 | SQL | MontufarEric/spark | /sql/core/src/test/resources/sql-tests/inputs/datetime-parsing-invalid.sql | UTF-8 | 927 | 3.203125 | 3 | [
"Apache-2.0",
"CC0-1.0",
"LicenseRef-scancode-public-domain",
"Python-2.0",
"CDDL-1.1",
"LicenseRef-scancode-unknown-license-reference",
"BSD-2-Clause",
"BSD-3-Clause",
"EPL-2.0",
"CDDL-1.0",
"MIT",
"LGPL-2.0-or-later",
"GCC-exception-3.1",
"LicenseRef-scancode-generic-cla",
"CC-BY-SA-3.... | permissive | --- TESTS FOR DATETIME PARSING FUNCTIONS WITH INVALID VALUES ---
-- parsing invalid values with pattern 'D'
select to_timestamp('366', 'D');
select to_timestamp('9', 'DD');
-- in java 8 this case is invalid, but valid in java 11, disabled for jenkins
-- select to_timestamp('100', 'DD');
select to_timestamp('366', 'DD'... | true |
f69f5a4cbd38cde89b890b895a859790627e0c92 | SQL | esk04/Keisanchan | /Keisanchan/sql/keisan.sql | UTF-8 | 967 | 2.578125 | 3 | [] | no_license | set names utf8;
set foreign_key_checks = 0;
drop database if exists keisanchan0;
create database if not exists keisanchan0;
use keisanchan0;
drop table if exists login_user_transaction;
create table login_user_transaction(
id int not null primary key auto_increment,
login_id varchar(16) unique,
login_pass varc... | true |
9f3ccd838bf05671c96ac4d87dc18690e1eef6cd | SQL | jgomesrj/desafio | /src/database/database.sql | UTF-8 | 490 | 2.78125 | 3 | [] | no_license | CREATE DATABASE desafio;
CREATE TABLE client(
client_id SERIAL PRIMARY KEY,
description VARCHAR(255)
);
create table clients(
id serial primary key,
name varchar(100) not null,
phone varchar(30),
adress varchar(200),
number integer,
city varchar(100),
state varchar(50),
country varchar... | true |
603773534d8ec1b56ad33f883d3fb431dac79542 | SQL | zhanghanlin/portal | /portal-web/src/sql/m_user.sql | UTF-8 | 1,033 | 3.46875 | 3 | [] | no_license | -- ------------------------------
-- Table structure for `template`
-- ------------------------------
DROP TABLE IF EXISTS `m_user`;
CREATE TABLE `m_user` (
`id` INT(11) NOT NULL AUTO_INCREMENT,
`user_name` VARCHAR(100) NOT NULL
COMMENT '登录名',
`display_name` VARCHAR(100) NOT NULL
COMMENT '姓名',
... | true |
cfab6940c9908fcd2b91d34cca4fa238fb7c9231 | SQL | DEFRA/clean-air-zones-api | /taxi-phv-data/src/main/resources/db/changelog/rawSql/0011-1.0-add-reporting-user.sql | UTF-8 | 984 | 3.171875 | 3 | [
"OGL-UK-3.0"
] | permissive | DO $$
BEGIN
IF NOT EXISTS (SELECT 1 FROM pg_roles WHERE rolname = 'reporting_readonly_role') THEN
CREATE ROLE reporting_readonly_role WITH
NOLOGIN
NOSUPERUSER
NOINHERIT
NOCREATEDB
NOCREATEROLE
NOREPLICATION;
END IF;
END
$$;
GRANT CONNECT ON DATABASE taxi_phv TO reporting_readonly_role;
GRAN... | true |
353d330dd03a8e353496b2e559df3bf9a71d96e9 | SQL | marcelo-bonora/Bandtec-2020 | /2020_1 Banco de Dados/Aula Online/Exercicicos p entregar/BD - Exercícios Práticos 07/BD - Exercicio - Prática 07 - q02.sql | UTF-8 | 2,544 | 3.953125 | 4 | [] | no_license | create database AlunoProjeto;
use AlunoProjeto;
create table aluno (
ra int primary key auto_increment,
nomeAluno varchar(40),
telefoneFixo int,
telefoneCel int,
fkRepresentante int, foreign key (fkRepresentante) references aluno (ra)
) auto_increment = 100;
create table projeto (
idProjeto int ... | true |
99c41f000912ed19dce0ce1ebd0ced162b76d68d | SQL | bduman/blog-php | /public/install/database.sql | UTF-8 | 6,198 | 3.046875 | 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 |
29493a05f55872fada52f4422e724b4cf588d482 | SQL | kiwon-seo/SQL | /using-null.sql | UTF-8 | 2,771 | 4.8125 | 5 | [] | no_license | /*
Eighth section of sqlzoo, Using NULL
*/
--#1
/*
List the teachers who have NULL for their department.
Q) 선생님의 부서가 NULL 값인 명단을 보여라.
*/
SELECT name
FROM teacher
WHERE dept IS NULL
POINT
1. WHERE dept IS NULL
WHERE (X) IS NULL 절로 공백인 행 추출
##### Left,Right,Outer,Inner JOIN 설명 중요!~!~!
Inner- 두 테이블의 교집합 (그냥 JOIN이 INNE... | true |
2a4b88b1e250229b3b6be71e3ea5fc12acfef0f3 | SQL | OnsJannet/holbertonschool-web_back_end | /0x0C-MySQL_Advanced/5-valid_email.sql | UTF-8 | 291 | 3.453125 | 3 | [] | no_license | --SQL script that creates a trigger that resets
--the attribute valid_email only when the email has been changed.
DELIMITER $$
CREATE TRIGGER updated_email BEFORE UPDATE ON users
FOR EACH ROW
BEGIN
IF OLD.email != NEW.email THEN
SET NEW.valid_email = 0;
END IF;
END$$
DELIMITER ;
| true |
ba0ea56d9c679db256ee60ae54158e7260321d72 | SQL | rlminers/rick | /sql/ash/top-sql-by-cputime.sql | UTF-8 | 304 | 2.9375 | 3 | [] | no_license | SELECT
module,
COUNT(*) dim_cputime,
round(COUNT(*) / SUM(COUNT(*)) OVER(), 2) * 100 pctload
FROM
v$active_session_history
WHERE
sample_time > sysdate - 1 / 24 / 60
AND session_type <> 'BACKGROUND'
AND session_state = 'ON CPU'
GROUP BY
module
ORDER BY
COUNT(*) DESC;
| true |
5aa7f804db51f0defb64b62f3a7164eb8f1e38ae | SQL | krunalaventus/avantus-dashboard | /api/sql/godesiapp.sql | UTF-8 | 12,010 | 3.234375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.9.1
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Generation Time: Jul 10, 2020 at 12:43 PM
-- Server version: 10.4.8-MariaDB
-- PHP Version: 7.1.32
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD... | true |
b97d2f3d14a7b7ced77d63b29315cd72db24fabb | SQL | ttxxss99/ttxxss | /db_music.sql | UTF-8 | 7,099 | 3.546875 | 4 | [] | no_license | /*
Navicat Premium Data Transfer
Source Server : txs
Source Server Type : MySQL
Source Server Version : 50515
Source Host : localhost:3306
Source Schema : db_music
Target Server Type : MySQL
Target Server Version : 50515
File Encoding : 65001
Date: 29/06/2019 08:03:2... | true |
514ab9c99ac58697a0b0009eb77ac5d335eb563c | SQL | Royachmad/sidigo | /sidigo.sql | UTF-8 | 4,994 | 2.546875 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | -- phpMyAdmin SQL Dump
-- version 4.6.5.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: 01 Jul 2021 pada 04.07
-- Versi Server: 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_SET_CL... | true |
3cf6ed39df04a3b3db2c8d01a62f9e6dd854c983 | SQL | deanmsw/seir48-homework | /Joshua Mu/Homework/17-10-21/create_games.sql | UTF-8 | 616 | 3.015625 | 3 | [] | no_license | CREATE TABLE games {
id INTEGER PRIMARY KEY AUTOINCREMENT,
name TEXT,
description TEXT,
rating INTEGER(2),
creators TEXT
};
INSERT INTO games (name, description, rating) VALUES ("Dota 2", "A MOBA created by Valve faithfully based on the Warcraft 3 mod called 'DOTA'", 6);
INSERT INTO games (name, de... | true |
6348874428e018741148d9f0ff0b48aca6558f1d | SQL | ajbd2106/Benchmarking-Big-SQL-Systems | /spark_sql/spark_tpcds/src/queries/query16.sql | UTF-8 | 1,191 | 4.34375 | 4 | [
"Apache-2.0"
] | permissive |
SELECT count(distinct cs_order_number) as order_count,
sum(cs_ext_ship_cost) as total_shipping_cost,
sum(cs_net_profit) as total_net_profit
FROM catalog_sales cs1
JOIN customer_address ca ON (cs1.cs_ship_date_sk = ca.ca_address_sk)
JOIN call_center c ON (cs1.cs_call_center_sk = c.cc_call_... | true |
6ff6ef1d5515b623a2a635859d7fc1c3176f7f76 | SQL | next-fire-starter/postgrestest | /DB/initdata.sql | UTF-8 | 633 | 2.671875 | 3 | [] | no_license | --初期データ メモ
INSERT INTO techsc.memo (title, note) VALUES ('買い物', '歯ブラシと洗濯洗剤');
INSERT INTO techsc.memo (title, note) VALUES ('打合せ予定', 'パワポ資料の用意');
INSERT INTO techsc.memo (title, note) VALUES ('週末の予定1', '洗車');
INSERT INTO techsc.memo (title, note) VALUES ('週末の予定2', 'クリーニング');
--初期データ 従業員
INSERT INTO techsc.employee(nam... | true |
804bfa13b152887bc7d1e34af80296a074e3e753 | SQL | sprokushev/Delphi | /MASTER/_DATABASE/Views/ISU_VIEW_DOCS_EXIST_PACK.sql | WINDOWS-1251 | 417 | 3.265625 | 3 | [] | no_license | --
-- ISU_VIEW_DOCS_EXIST_PACK (View)
--
CREATE OR REPLACE FORCE VIEW MASTER.ISU_VIEW_DOCS_EXIST_PACK
(" ", " ")
AS
select DOC_NUM as " ",
DOC_DATE as " "
from ISU_TAX_EXIST
JOIN ISU_TAX_DOCS ON ISU_TAX_EXIST.DOC_ID=ISU_TAX_DOCS.ID AND ISU_TAX_DOCS.PACKAGE_ID IS NOT NULL;
| true |
5b17268606a3d55ef3ea0324d13070a37b2aecd8 | SQL | avshatalov48/bitrix-core-business | /modules/bizproc/install/db/mysql/install.sql | UTF-8 | 9,621 | 3.578125 | 4 | [] | no_license | CREATE TABLE b_bp_workflow_template (
ID int NOT NULL auto_increment,
MODULE_ID varchar(32) NULL,
ENTITY varchar(64) NOT NULL,
DOCUMENT_TYPE varchar(128) NOT NULL,
DOCUMENT_STATUS VARCHAR(50) NULL,
AUTO_EXECUTE int NOT NULL DEFAULT 0,
NAME varchar(255) NULL,
DESCRIPTION text NULL,
TEMPLATE mediumblob NULL,
PA... | true |
920e8355c2db824e083442a0372af0ea78f6df49 | SQL | ninalouw/typography-wk8 | /sql/category.sql | UTF-8 | 1,059 | 2.921875 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.6.5.2
-- https://www.phpmyadmin.net/
--
-- Host: localhost:8889
-- Generation Time: Oct 28, 2017 at 09:14 PM
-- Server version: 5.6.35
-- PHP Version: 7.0.15
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
--
-- Database: `typography_db`
--
-- -------------------... | true |
3b1817d3906c62e6aa8bf7fd0c631a2cfae74297 | SQL | KevinJBenoit/EHR-Lite | /sql/dataDefinitions.sql | UTF-8 | 11,170 | 3.9375 | 4 | [
"Apache-2.0"
] | permissive | -- Tables initialization
DROP TABLE IF EXISTS providersClinics;
DROP TABLE IF EXISTS patientsClinics;
DROP TABLE IF EXISTS visits;
DROP TABLE IF EXISTS procedures;
DROP TABLE IF EXISTS diagnoses;
DROP TABLE IF EXISTS clinics;
DROP TABLE IF EXISTS patients;
DROP TABLE IF EXISTS providers;
CREATE TABLE `clinics` (
... | true |
fbb20e0837309a31ebc70947b8a06aa1415fe585 | SQL | jessicap5159/employee-tracker | /db/seeds.sql | UTF-8 | 387 | 2.703125 | 3 | [
"MIT"
] | permissive | INSERT INTO departments (department_name) VALUES
('Sales'), ('Research'), ('Finance');
INSERT INTO roles (title,salary,departments_id) VALUES
('Manager', '100000.00', 1), ('Assistant', '50000.00', 1), ('Representative', '60000.00', 1);
INSERT INTO employees (first_name,last_name,roles_id, manager_id) VALUES
('Bob', '... | true |
1d045e2979cce78db1ceb5fd20a384a7442aeb83 | SQL | rafiq/codeWars | /aug2021/upAndDown.sql | UTF-8 | 303 | 3.03125 | 3 | [
"MIT"
] | permissive | SELECT
CASE WHEN sum(number1) % 2 = 0
THEN MIN(number1) number1
ELSE MAX(number1) number1
FROM
numbers
SELECT
CASE WHEN(sum(number1)%2=0) THEN max(number1) ELSE min(number1) END as number1,
CASE WHEN(sum(number2)%2=0) THEN max(number2) ELSE min(number2) END as number2
FROM numbers | true |
572aa21032772f3fa44fd6a915c5da74990220b0 | SQL | Yurlik/WebCoder_testTask | /webcoder.sql | UTF-8 | 2,589 | 3.234375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.8.3
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1:3306
-- Generation Time: Sep 14, 2021 at 10:32 PM
-- Server version: 5.7.23
-- 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_CH... | true |
c701fc10d729f79f9b9cf4c550c786f4aa9bc15e | SQL | mikelu92/cse135 | /cse135-populated.sql | UTF-8 | 6,987 | 3.171875 | 3 | [] | no_license | --
-- PostgreSQL database dump
--
SET statement_timeout = 0;
SET client_encoding = 'UTF8';
SET standard_conforming_strings = on;
SET check_function_bodies = false;
SET client_min_messages = warning;
--
-- Name: plpgsql; Type: EXTENSION; Schema: -; Owner:
--
CREATE EXTENSION IF NOT EXISTS plpgsql WITH SCHEMA pg_cata... | true |
bf0d4b3ec92ca73d6e7731c0a08b3442e3f00a26 | SQL | sasa-us/appmonstaTest | /sql/game_app_finder.sql | UTF-8 | 7,100 | 3.234375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.6.4
-- https://www.phpmyadmin.net/
--
-- Host: localhost:3306
-- Generation Time: Jun 30, 2018 at 08:27 PM
-- Server version: 5.6.33
-- PHP Version: 7.0.12
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
--
-- Database: `game_app_finder`
--
-- ----------------------... | true |
4f46390c793999a9a03bb9fe7c52892feb821183 | SQL | Pica4x6/TDA357 | /tutorials/4-triggers/exercise1-solution-question1.sql | UTF-8 | 366 | 3.125 | 3 | [] | no_license | CREATE OR REPLACE VIEW Itineraries AS
SELECT
reference, passenger, flight, date,
departure.city as departure, destination.city as destination
FROM
Bookings
JOIN Flights ON Bookings.flight = Flights.code
JOIN Airports AS Departure ON departureAirport = Departure.code
JOIN Airports AS Destinat... | true |
2047850730a2d80abbb8383b61d88e26bd711b32 | SQL | actcmsvn/cms | /src/db/install.sql | UTF-8 | 6,640 | 2.96875 | 3 | [
"MIT"
] | permissive | CREATE TABLE IF NOT EXISTS `accounts` (
`id` int(10) unsigned NOT NULL,
`account_info` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`account_info_id` int(10) unsigned NOT NULL,
`username` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`password` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`remember_tok... | true |
78f6a0a4438f59a4c8eafed7a93f7d740888d8f0 | SQL | Shahzayb/task-list | /database/schema.sql | UTF-8 | 2,855 | 3.34375 | 3 | [] | no_license | CREATE DATABASE IF NOT EXISTS `task_list` /*!40100 DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci */;
USE `task_list`;
-- MySQL dump 10.13 Distrib 8.0.15, for Win64 (x86_64)
--
-- Host: localhost Database: task_list
-- ------------------------------------------------------
-- Server version 8.0.15
/*!40... | true |
735bb9241f06cb8aeb64691bb4e7acb51e05ff1e | SQL | juanJvargas/proyectobases | /src/sql/SQL.sql | UTF-8 | 13,348 | 3.703125 | 4 | [] | no_license | /*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
/**
* Author: juan
* Created: 15-dic-2017
*/
DROP TABLE IF EXISTS area CASCADE;
CREATE TABLE area(
codigo_area INTEGER PRIMARY K... | true |
b5b6e2f95ab679fb2a41459898e34e4058cbdf38 | SQL | soronto3603/haruharu-book | /haruharu.sql | UTF-8 | 3,065 | 2.71875 | 3 | [] | no_license | -- MySQL dump 10.16 Distrib 10.3.9-MariaDB, for Win32 (AMD64)
--
-- Host: localhost Database: haruharu
-- ------------------------------------------------------
-- Server version 10.3.9-MariaDB
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET... | true |
81b74eb53c73a759b5dbf7d2831f49d97c6bfb22 | SQL | levonaramyan/CodeFights_Tasks | /Arcade/Databases/09_Time_River_Revisited.sql | UTF-8 | 1,574 | 3.875 | 4 | [] | no_license | ------ Important Events -------
-------------------------------
CREATE PROCEDURE importantEvents()
BEGIN
select id,name,event_date,participants from events
order by weekday(event_date) asc, participants desc;
END
-------------------------------
------- Date Formatting -------
-------------------------------
CREATE... | true |
db47f99805de26dad3004e13bbf5b0aab2d0b585 | SQL | DevartVasiliyK/MySQL_rep | /Views/sales_by_store.sql | UTF-8 | 796 | 3.875 | 4 | [] | no_license | CREATE VIEW `sales_by_store`
AS
SELECT
CONCAT(`c`.`city`, _utf8mb3 ',', `cy`.`country`) AS `store`,
CONCAT(`m`.`first_name`, _utf8mb3 ' ', `m`.`last_name`) AS `manager`,
SUM(`p`.`amount`) AS `total_sales`
FROM (((((((`payment` `p`
JOIN `rental` `r`
ON ((`p`.`rental_id` = `r`.`rental_id`)))
JOIN `... | true |
d51611f9b023df838f3d9c1fb3a32510b20311f3 | SQL | smadol/Yubei | /www/application/yubei.sql | UTF-8 | 6,621 | 3.609375 | 4 | [
"Apache-2.0"
] | permissive | /*
Navicat MySQL Data Transfer
Source Server : 本地数据库
Source Server Version : 50553
Source Host : localhost:3306
Source Database : yubei
Target Server Type : MYSQL
Target Server Version : 50553
File Encoding : 65001
Date: 2018-05-11 21:13:56
*/
SET FOREIGN_KEY_CHECKS=0;
-- -------... | true |
9f8afb96caf2bd9baafec475a1b4f0827665d81d | SQL | blaq-swan/alx-higher_level_programming | /0x0E-SQL_more_queries/5-unique_id.sql | UTF-8 | 250 | 2.796875 | 3 | [] | no_license | -- a script that creates the table unique_id on your MySQL server.
-- unique_id description:
-- id INT with the default value 1 and must be unique
-- name VARCHAR(256
CREATE TABLE IF NOT EXISTS unique_id(id INT UNIQUE DEFAULT 1, name VARCHAR(256));
| true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.