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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
35783257fd8d327b7c3348b5fc2ce009385c8dfb | SQL | bradeac/dockerized-web-app | /src/structure sql/structure.sql | UTF-8 | 713 | 2.703125 | 3 | [] | no_license | CREATE DATABASE PROIECT_CAMIL;
CREATE TABLE ANGAJATI
(
ID INT PRIMARY KEY auto_increment,
NUME VARCHAR(64),
PRENUME VARCHAR(64),
FUNCTIE VARCHAR(64),
SALAR_NEGOCIAT INT,
SALAR_REALIZAT INT,
VECHIME INT,
SPOR INT,
PREMII_BRUTE INT,
COMPENSATIE INT,
TOTAL_BRUT INT,
BRUT_IMPOZABIL INT,
IMPOZIT INT,
CAS IN... | true |
5dd067febd372d641ac6f9f08731937837523b1a | SQL | mirunachindea/Databases | /ASSIGNMENT3/Queries/query1.sql | UTF-8 | 350 | 3.78125 | 4 | [] | no_license | select lines.name, lines.type, route.direction, route.start, route.stop, neighborhood.name
from ( assignment3.lines join route on lines.name = route.bus) join neighborhood on lines.name = neighborhood.busline
where neighborhood.name = 'Center'
group by lines.name, route.direction, route.start, route.stop, neighborhood.... | true |
1b15aebff644f235ad249278a0aa0d0a07b7d932 | SQL | bellmit/origin | /family_order/sql/TF_F_USER_DISCNT/INS_ALL_NOUSER.sql | UTF-8 | 520 | 2.515625 | 3 | [] | no_license | INSERT INTO tf_f_user_discnt(partition_id,user_id,user_id_a,product_id,relation_type_code,inst_id,package_id,discnt_code,spec_tag,start_date,end_date,update_time,update_staff_id,update_depart_id)
SELECT MOD(a.user_id, 10000),a.user_id,user_id_a,product_id,relation_type_code,inst_id,package_id,discnt_code,spec_tag,start... | true |
0633fda8e46e57445767d4db3f1a06d9ede984e2 | SQL | equipe-tetris/ConsultCAR | /Scripts/Views_API.sql | UTF-8 | 10,694 | 2.734375 | 3 | [] | no_license | -- VIEWS
-- Tabela com todos os municípios inseridos até o momento no banco de dados.
CREATE VIEW municipios_cadastrados AS
SELECT
cod_imovel AS codigo_imovel,
num_area AS area,
cod_estado AS estado,
nom_munici AS municipio,
num_modulo AS modulo,
tipo_imove AS tipo_imovel,
situacao,
condicao_i ... | true |
1ea2f61c6e1857b396a8674666a2421c2be6ff84 | SQL | SugihartonoTri24/MTAL2018 | /mahasiswa.sql | UTF-8 | 2,405 | 2.984375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 3.5.2
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Jun 04, 2018 at 05:18 AM
-- Server version: 5.5.25a
-- PHP Version: 5.4.4
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*... | true |
9f5b89b84723c5e587d5f798f9cd30ec4f873e74 | SQL | MarceloSilvarolla/YFM-Database-and-Fusion-Guide | /Query database and create temporary tables/createCardsThatBeat.sql | UTF-8 | 508 | 3.578125 | 4 | [] | no_license | DROP TABLE IF EXISTS CardsThatBeat;
CREATE TEMPORARY TABLE CardsThatBeat AS
SELECT C1.CardName, C1.GuardianStar1, C1.GuardianStar2, C1.CardType, C1.CardSecTypes, C1.Attack, C1.Defense
FROM Cards AS C1
JOIN Cards AS C2
WHERE C2.CardName = 'Twin-headed Thunder Dragon' AND (
MAX(C1.Attack, C1.Defense) >= C2.Attack... | true |
aa424fb3a09a5550f321e66c9010fd6fcce99e0e | SQL | h3kker/tearDrop | /db/master_schema.sql | UTF-8 | 3,703 | 3.34375 | 3 | [
"Artistic-2.0"
] | permissive | DROP TABLE IF EXISTS projects CASCADE;
CREATE TABLE projects (
name text primary key,
title text not null unique,
description text,
forskalle_group text not null,
status text
);
DROP TABLE IF EXISTS db_sources CASCADE;
CREATE TABLE db_sources (
id serial primary key,
name text not null unique,
descrip... | true |
574304b6ed164a9743c61f2a9b8ca6199d9b3cc0 | SQL | M4th3m4tic4l/wow-emulator-archive | /WoWD - 03.2006/wowd-sql/accounts.sql | UTF-8 | 926 | 2.71875 | 3 | [] | no_license | SET FOREIGN_KEY_CHECKS=0;
#----------------------------
# Table structure for accounts
#----------------------------
CREATE TABLE `accounts` (
`acct` bigint(20) NOT NULL auto_increment,
`login` varchar(255) NOT NULL default '',
`password` varchar(28) NOT NULL default '',
`s` longtext NOT NULL,
`v` longtex... | true |
47a27a2939c80ae14ca005739ceca4c553beea30 | SQL | shurun19851206/framework | /jtademo/src/sql/init.sql | UTF-8 | 538 | 2.609375 | 3 | [] | no_license | CREATE DATABASE IF NOT EXISTS `jta1` DEFAULT CHARACTER SET utf8;
CREATE DATABASE IF NOT EXISTS `jta2` DEFAULT CHARACTER SET utf8;
use jta1;
DROP TABLE IF EXISTS `jtatest`;
CREATE TABLE `jtatest` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`name` varchar(50) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT ... | true |
3927e35bba976eb092009c91ba6a3ad6c1409906 | SQL | daniloef/strangemetrics | /app/database/schema.sql | UTF-8 | 5,294 | 2.984375 | 3 | [] | no_license | # ************************************************************
# Sequel Pro SQL dump
# Version 4499
#
# http://www.sequelpro.com/
# https://github.com/sequelpro/sequelpro
#
# Host: 127.0.0.1 (MySQL 5.5.46-0ubuntu0.14.04.2)
# Database: strangemetricsorg
# Generation Time: 2017-05-14 22:43:52 +0000
# ********************... | true |
6426a5da43fff207a051b59d24230a1d29d87880 | SQL | escalantegc/mupumchoto | /sql/mupum.sql | UTF-8 | 44,481 | 2.828125 | 3 | [] | no_license | --
-- PostgreSQL database dump
--
-- Dumped from database version 9.5.12
-- Dumped by pg_dump version 9.5.12
-- Started on 2018-05-28 20:27:53 -03
SET statement_timeout = 0;
SET lock_timeout = 0;
SET client_encoding = 'UTF8';
SET standard_conforming_strings = on;
SELECT pg_catalog.set_config('search_path', '', false... | true |
64a3a41960543004a498642bfc9cf70db68ce719 | SQL | muratsungu/Kodluyoruz-MSSQL-Oracle-SQL-Studies | /Oracle/Murat Süngü Kodluyoruz Week2 Oracle Query Ödevi.sql | ISO-8859-9 | 7,137 | 3.859375 | 4 | [] | no_license | --Kodluyoruz SQL W2 devi
--Murat Sng
--Banking sorular cevaplar
--***************************
--Yln 4. aylarnda en ok hangi amala kredi ekilmitir? ----Banking emas iin
SELECT PURPOSE,COUNT(*) FROM LOANS WHERE MONTH=4 GROUP BY PURPOSE;
-- Bankann 50 ve ya 51 yanda kadn mterilerinden ayn isme sahip olan mterisi/mteri... | true |
217a40c7458bad1887ee8c38ce4d304a6c8bc045 | SQL | 2Nifty/PFC | /_My Workorders/_Closed/WO 1028 - Nav5.0 Integration Task - CustomerMaster Update/NV-MissingFields.sql | UTF-8 | 5,258 | 3.09375 | 3 | [] | no_license | select
'' AS [Notification Process Code],
3 AS [Queue Priority], --This appears to be populated with other values in 3.7
0 AS [FQA Required],
0 AS [Cert Required],
'' AS [Rebate Group],
0 AS [Backorder], --This appears to be populated with other values in 3.7
'' AS [Delivery Route],
'' AS [Delivery Stop],
0... | true |
a46990ad1b758a5d63394c447d2751fd6ab868ca | SQL | micktusker/shiny-server | /gene_lookup/schema.sql | UTF-8 | 1,474 | 2.765625 | 3 | [] | no_license | CREATE TABLE hgnc_genes(
hgnc_id TEXT NOT NULL,
symbol TEXT,
name TEXT,
locus_group TEXT,
locus_type TEXT,
status TEXT,
location TEXT,
location_sortable TEXT,
alias_symbol TEXT,
alias_name TEXT,
prev_symbol TEXT,
prev_name TEXT,
gene_family TEXT,
gene_family_id TE... | true |
ba738831d11597ee752ec80eb01f0a72b2857222 | SQL | Afrostream/afrostream-api-stats | /sql/issue-#0-build.sql | UTF-8 | 2,666 | 3.4375 | 3 | [] | no_license | -- db structure
CREATE DATABASE cdnselector;
-- custom types
CREATE TYPE event_types AS ENUM
('bandwidthIncrease',
'bandwidthDecrease',
'error',
'buffering',
'start',
'stop');
-- ALTER TYPE event_types OWNER TO postgres;
CREATE TYPE uri_scheme AS ENUM
('http',
'https');
-- ALTER TYPE uri_... | true |
3c7a98e86d243b677008e9e42483929927a1d93b | SQL | troazz/nodejs_simple_api | /database.sql | UTF-8 | 5,156 | 3.03125 | 3 | [] | no_license | SET FOREIGN_KEY_CHECKS=0;
-- ----------------------------
-- Table structure for categories
-- ----------------------------
DROP TABLE IF EXISTS `categories`;
CREATE TABLE `categories` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(100) DEFAULT NULL,
`description` text,
`parent` int(11) DEFAULT NULL,
... | true |
c6c19a39d756d8d49bef0d0cd89c337d12df0e6e | SQL | chelunike/Clase2111DAWM | /BD/Examenes/Examen2/Jose Luis Montes Ramon .sql | ISO-8859-1 | 1,826 | 3.796875 | 4 | [
"MIT"
] | permissive |
--Actividad 1
--Actividad 2
create database BDA2Donantes
use BDADonantes
create table persona(
idper int identity(1,1) primary key,
nombre varchar(40)
)
insert into persona
values --('David Castro'),
('Juan Lopez'),
('Elena Ruiz'),
('Jesus Sanchez'),
('Ana Fernandez'),
('Luis Bueno'),
('Miguel Cara... | true |
9aa8dabfc90b47d24ec8c9f161021af16a3fe38e | SQL | unica-open/siacdbimpl | /src/plsql/function/execute_fnc_siac_valorizza_tbe_movSpesa.sql | UTF-8 | 10,383 | 3.171875 | 3 | [] | no_license | /*
*SPDX-FileCopyrightText: Copyright 2020 | CSI Piemonte
*SPDX-License-Identifier: EUPL-1.2
*/
select * from fnc_siac_valorizza_tbe_movSpesa(18,'batch_tbe','N')
select * from log_fnc_siac_valorizza_tbe_movSpesa where ente_proprietario_id = 18
-- elenco movimenti di USCITA da aggiornare
select * from siac_d_movgest_t... | true |
b1651b6416ed1b82591d1270430dc48eae6e95ab | SQL | ZucchiniZe/til | /src/clj/til/db/sql/tils.sql | UTF-8 | 863 | 4.375 | 4 | [] | no_license | -- :name create-tils-table :! :raw
-- :doc create the table for the tils
CREATE TABLE IF NOT EXISTS tils (
id serial PRIMARY KEY,
title varchar(100),
body varchar(2000),
tags text,
user_id integer,
created_at timestamp,
FOREIGN KEY(user_id) REFERENCES users (id)
);
-- :... | true |
dab50802d48df767b1cb432451fa477a7d62f088 | SQL | jmarcelletti/jazzhands | /database/ddl/views/create_v_limited_users.sql | UTF-8 | 2,760 | 3.390625 | 3 | [] | no_license | -- Copyright (c) 2005-2010, Vonage Holdings Corp.
-- All rights reserved.
--
-- Redistribution and use in source and binary forms, with or without
-- modification, are permitted provided that the following conditions are met:
-- * Redistributions of source code must retain the above copyright
-- notice, this ... | true |
9426bc1e3bc5a8af336e943440e259338a35473d | SQL | igorsitdikov/senla-courses | /task-10/task-1/queries.sql | UTF-8 | 4,659 | 4.21875 | 4 | [] | no_license | -- task 1
SELECT model, speed, hd
FROM pc
WHERE price < 500;
-- task 2
SELECT DISTINCT maker
FROM product
WHERE type = 'Printer';
-- task 3
SELECT model, ram, screen
FROM laptop
WHERE price > 1000;
-- task 4
SELECT code, model, color, type, price
FROM printer
WHERE color = 'y';
-- task 5
SELECT model, speed... | true |
ddcdf8521d29fdab19925344f10b8cdcc85bf5c5 | SQL | santlalvishwakarma/RootBranch | /PortalBase/database/mysql/store_procedures/retail/modules/registerationpanel/sp_retail_register_user.sql | UTF-8 | 2,449 | 3.53125 | 4 | [] | no_license | DELIMITER $$
DROP PROCEDURE IF EXISTS sp_retail_register_user $$
CREATE PROCEDURE sp_retail_register_user(
IN p_login_name VARCHAR(100),
IN p_first_name VARCHAR(50),
IN p_last_name VARCHAR(50),
IN p_primary_email_id VARCHAR(100),
IN p_conditions_accepted TINYINT(1),
IN p_password VARCHAR(50),
IN p_primary_... | true |
886417df1860ccc33a879833b32db7180be308bc | SQL | grodak/SQL | /RHTPensionDeductionFile.sql | UTF-8 | 1,127 | 3.640625 | 4 | [] | no_license | SELECT cov.PEFROMDT, Trim(med.G7USEDF7) AS G7USEDF7, par.GPLAST, par.GPFIRST, par.GPMI, Trim(Left(cov.PECOVCAT,3)) AS COV1, Trim(Mid(cov.PECOVCAT,4,3)) AS COV2, Trim(Mid(cov.PECOVCAT,7,3)) AS COV3,
Trim(Mid(cov.PECOVCAT,10,3)) AS COV4, Trim(Left(cov.PEPLAN,20)) AS PLAN1, Trim(Mid(cov.PEPLAN,21,20)) AS PLAN2, Trim(Mid... | true |
0941c21d9258854d3836bc422004d3f1b2f0aea2 | SQL | GoogleCloudParaProgramadores/TaskListDB | /tasks-table.sql | UTF-8 | 258 | 2.859375 | 3 | [] | no_license | CREATE TABLE `TASKS` (
`ID` INT(11) NOT NULL AUTO_INCREMENT,
`TITLE` TEXT NULL,
`DESCRIPTION` TEXT NULL,
`STATUS` INT(11) NULL DEFAULT NULL,
`DATE` TEXT NULL,
PRIMARY KEY (`ID`)
)
COLLATE='utf8_general_ci'
ENGINE=InnoDB
AUTO_INCREMENT=1210
; | true |
58fc1d03d1a45ffc08839e1fe6a76439cd5b8e5d | SQL | Zeldorine/pfe_aqs | /sql/script_creation.sql | UTF-8 | 4,513 | 3.609375 | 4 | [] | no_license | ----------------------------------------- Suppression des tables et contraintes si existantes ---------------------------------------
DROP TABLE IF EXISTS Entreprise CASCADE;
DROP TABLE IF EXISTS Utilisateur CASCADE;
DROP TABLE IF EXISTS Audit CASCADE;
DROP TABLE IF EXISTS Formulaire CASCADE;
------------------... | true |
0783d03d259c3c6b803a4a834cca62159bdd1ee2 | SQL | gladieschanggoodluck/SQL-question-sets-and-query | /index/index.sql | UTF-8 | 532 | 4 | 4 | [] | no_license | ## index
## 100,000, 000 records
## no index
SELECT COUNT(*)
FROM person;
## create index
CREATE INDEX person_first_name_idx
ON person(first_name);
SELECT COUNT(*)
FROM person
WHERE first_name = 'Julia';
SELECT COUNT(*)
FROM person
WHERE last_name = 'Smith';
## multicolumn indexes
CRE... | true |
a4e86d442e7bdbd409d6636f852fdddc1b3308cf | SQL | emeraldjava/bhaa-zend | /sql/bhaa_racestandard.sql | UTF-8 | 6,371 | 4.1875 | 4 | [] | no_license |
DROP TABLE IF EXISTS `racestandard`;
CREATE TABLE IF NOT EXISTS `racestandard` (
`race` int(8) NOT NULL,
`standard` int(3) NOT NULL,
`runners` int(4) NOT NULL,
`expected` time NOT NULL,
`min` time NOT NULL,
`avg` time NOT NULL,
`max` time NOT NULL,
`std` double NOT NULL,
`diff` double NOT ... | true |
924af8abf1bdf87f11ee3fd425e89ad46a7e1f83 | SQL | meetyourmm/book-store | /src/main/resources/db/test.sql | UTF-8 | 1,980 | 3.265625 | 3 | [] | no_license | /*
Navicat Premium Data Transfer
Source Server : 192.168.1.128-vm
Source Server Type : MySQL
Source Server Version : 50719
Source Host : 192.168.1.128:3306
Source Schema : test
Target Server Type : MySQL
Target Server Version : 50719
File Encoding : 65001
Date: 27/02... | true |
a0b0f223a29296957b030966272be3cd4326245e | SQL | paux86/Databases | /FinalProject/sql/sp_customerBilled.sql | UTF-8 | 176 | 2.703125 | 3 | [] | no_license | use project;
DELIMITER //
create procedure customerBilled(IN inv_id int)
BEGIN
update customer_invoice set invoice_billed = now() where invoice_id = inv_id;
END //
DELIMITER ; | true |
4410aaebab64e67a8a2a997cbdc6c3a41517fbb1 | SQL | derMacon/workshop-organizer-docker | /spring-project/src/main/resources/schema.sql | UTF-8 | 1,782 | 3.765625 | 4 | [] | no_license | create table if not exists app_user
(
user_id serial primary key,
username varchar(500) unique not null,
password varchar(5000) not null,
role varchar(5000) not null
);
create table if not exists persistent_logins
(
username varchar(500) not null,
series varchar(64) primary... | true |
7b47ca29776bca527c7f60dc9a507f213f4416ca | SQL | jfishy/Galleries-and-Gigs | /art.sql | UTF-8 | 1,877 | 2.6875 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 3.5.1
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Jun 02, 2016 at 12:20 PM
-- Server version: 5.5.24-log
-- PHP Version: 5.4.3
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;... | true |
c6f538d43bfb8c4ed68bfebb9e745d17e66821cf | SQL | George97/TotalizatorWebApp | /TotalizatorWebApp.Database/Scripts/INSERT.sql | UTF-8 | 2,153 | 2.71875 | 3 | [] | no_license |
INSERT INTO Leagues (Name) VALUES ('Premier League'),('Champions League')
INSERT INTO Stages (Name,MatchDay,LeagueId)
VALUES ('Round',34,1),('Quarter-Final',8,2),('Semi-Final',9,2),('Round',36,1);
INSERT INTO Teams (Name)
VALUES ('Chelsea FC'),('Tottenham Hotspur FC'),('Liverpool FC'),('Manchester City FC'),
... | true |
f5ccddf50a523a8d041588a035613037bcf994aa | SQL | TakeActionNow/OSM | /Ronin/Database1/contact/Tables/contact_displayname_rel.sql | UTF-8 | 674 | 3.671875 | 4 | [] | no_license | CREATE TABLE [contact].[contact_displayname_rel] (
[contact_displayname_id] INT IDENTITY (1, 1) NOT NULL,
[contact_id] INT NOT NULL,
[displayname_id] INT NOT NULL,
[create_date] DATETIME NULL,
[modify_date] DATETIME NULL,
[delete_date] ... | true |
d9044b63794ef0545ef7fc96970b2e4df1e15448 | SQL | krishnamohankaruturi/secret | /aart-web-dependencies/db/ddl/388.sql | UTF-8 | 754 | 3.28125 | 3 | [] | no_license |
-- 388.sql
drop table testcutscores;
CREATE TABLE testcutscores
(
id bigserial NOT NULL,
schoolyear bigint NOT NULL,
assessmentprogram bigint NOT NULL,
subject bigint NOT NULL,
grade bigint NOT NULL,
testid1 bigint,
testid2 bigint,
level bigint not null,
levelLowCutScore character varying(100),
l... | true |
42b68e29c51628a72dba2f1a317b3f7863792621 | SQL | lozanovictor/banco_imagens_2018 | /banco_imagens.sql | UTF-8 | 10,539 | 2.84375 | 3 | [] | no_license | psql -U ibm18g3 -h dcmshare.ffclrp.usp.br centroimg
2340
-- -----------------------------------------------------
-- Table Funcionario
-- -----------------------------------------------------
DROP TABLE IF EXISTS Funcionario CASCADE;
CREATE TABLE Funcionario (
idFuncionario INTEGER NOT NULL,
CPF VARCHAR(11) NOT ... | true |
930901c9a7c9e964b8c0680be4ffe99d0b459cfe | SQL | npatta01/datasci_course_materials | /assignment2/multiply.sql | UTF-8 | 298 | 2.921875 | 3 | [] | no_license | SELECT a.row_num, b.col_num, SUM(a.value * b.value)
FROM a, b
WHERE a.col_num = b.row_num
GROUP BY a.row_num, b.col_num;
A=[[0 0 0 55 78];[19 0 21 3 81];[0 48 50 1 0];[0 0 33 0 67];[95 0 0 0 31]];
B=[[0 73 0 0 42];[0 0 82 0 0];[83 13 0 57 0];[48 85 18 24 0];[98 7 0 0 3]];
C=A*B; | true |
657f1bcdb323ef58b00893d6f6013650e2bcb161 | SQL | AngusAllen/udacity-tournament | /tournament.sql | UTF-8 | 776 | 3.734375 | 4 | [
"CC0-1.0",
"LicenseRef-scancode-public-domain"
] | permissive | -- Author: Angus Allen.
-- Date: 13 July 2016.
-- Summary: Creates database, database schema and tables for thd tournament project.
-- Note: Queries on database are run from the file tournament.py
-- Start with statements: create database tournament; \c tournament; \i tournament.sql.
DROP DATABASE IF EXISTS tournament... | true |
d8ad79b8b3ed0ec69f4847e579ef5bbad8a463dd | SQL | SolomonWorku/rentalSystem | /db/pk_ims.sql | UTF-8 | 6,761 | 2.953125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.5.1
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Jul 31, 2017 at 06:04 PM
-- Server version: 10.1.19-MariaDB
-- PHP Version: 5.6.28
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CL... | true |
7cd9b0a58a93559104ef5652caae12f7d3a736bc | SQL | BigG1947/record_book | /src/testData.sql | UTF-8 | 28,301 | 2.765625 | 3 | [] | no_license | DELETE from marks;
ALTER TABLE marks AUTO_INCREMENT=0;
DELETE FROM loads;
ALTER TABLE loads AUTO_INCREMENT=0;
DELETE FROM discipline;
ALTER TABLE discipline AUTO_INCREMENT=0;
DELETE FROM sensitive_data;
ALTER TABLE sensitive_data AUTO_INCREMENT=0;
DELETE FROM student;
ALTER TABLE student AUTO_INCREMENT=0;
DELETE FROM e... | true |
3c5be7cc04630a619029199d8da0e8d90722ef2f | SQL | JianChi8/BookMarket | /docs/sql/tables_sql/ums_member_tag.sql | UTF-8 | 858 | 3 | 3 | [
"LicenseRef-scancode-mulanpsl-1.0-en"
] | permissive | /*
Navicat MySQL Data Transfer
Source Server : localhost_root
Source Server Version : 100137
Source Host : localhost:3306
Source Database : bookmarket
Target Server Type : MYSQL
Target Server Version : 100137
File Encoding : 65001
Date: 2020-02-23 19:31:10
*/
SET FOREIGN_KEY_CHECK... | true |
eaf05612d0e09322cbbde38cb45a54f9352be551 | SQL | OHDSI/WebAPI | /src/main/resources/db/migration/oracle/V2.6.0.20181001200021__estimation_prediction.sql | UTF-8 | 1,428 | 3.625 | 4 | [
"Apache-2.0"
] | permissive | -- Estimation
CREATE SEQUENCE ${ohdsiSchema}.estimation_seq;
CREATE TABLE ${ohdsiSchema}.estimation
(
estimation_id NUMBER(19),
name VARCHAR(255) NOT NULL,
type VARCHAR(255) NOT NULL,
description VARCHAR(1000),
specification CLOB NOT NULL,
created_by_id INTEGER,
created_date TIMESTAMP,
modified_by_id I... | true |
3347fb8e8a3a5e7ea8464a5709fe25c3913f6936 | SQL | abzamer/bamazon | /bamazonSchema.sql | UTF-8 | 959 | 3.15625 | 3 | [] | no_license | CREATE DATABASE bamazon_db;
USE bamazon_db;
-- item_id (unique id for each product)
-- product_name (Name of product)
-- department_name
-- price (cost to customer)
-- stock_quantity (how much of the product is available in stores)
CREATE TABLE products (
item_id INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
product_name ... | true |
09358a442ebacb6087ec0dd73959265aca054d01 | SQL | MarijnvandenHeuvel/Tutorials | /21-Databases/3-SomeMoreQueries/subqueries-solutions.sql | UTF-8 | 2,745 | 3.953125 | 4 | [] | no_license | -- 1.
SELECT last_name , salary
FROM employees
WHERE salary > (SELECT salary
FROM employees
WHERE employee_id = 103)
-- 2.
SELECT department_id , department_name
FROM departments
WHERE location_id = (SELECT location_id
FROM departments
... | true |
4624280de8b13d886f56fb3fc7ad9399b8efd8b5 | SQL | nianglao/leetcode | /183.customers-who-never-order.sql | UTF-8 | 187 | 3.296875 | 3 | [] | no_license | # Write your MySQL query statement below
select distinct Customers.Name as `Customers`
from Customers
left join Orders on Customers.Id = Orders.CustomerId
where Orders.CustomerId is null | true |
170b158d3d09603ea263bfdb417f8d07048a981b | SQL | mmcgoldr/DAT5_BOS_students | /mmcgoldr/mmcgoldr_hwc4_code.sql | UTF-8 | 3,151 | 4.5 | 4 | [] | no_license | --Megan McGoldrick
--GA Data Science Class 4 HW
--Average at bats among Yankees players who began their second season on/after 1980 = 197.7
--STEPS:
--A. Find first year played for Yankees
--B. Find second year played for Yankees
--C. Exludes players with: 1) only one season 2) second Yankees season before 1980 (assu... | true |
3f3010127b373a3611810a308fd08691360beb56 | SQL | Lucsanro/sql-classes | /ddl-create-2.sql | UTF-8 | 588 | 3.390625 | 3 | [] | no_license | -- DDL (ALTER)
-- (ALTER - ADD / MODIFY)
-- ALTER ADD
ALTER TABLE tbalunos
ADD sexo CHAR(1)
AFTER nome;
USE faculdade;
SHOW TABLES;
SELECT * FROM tbalunos;
-- ALTER MODIFY
ALTER TABLE tbalunos
MODIFY sexo CHAR(1) NOT NULL
AFTER nome;
-- INSERT IN tbalunos
INSERT INTO tbalunos
(rgm, nome, sexo, email, dtnascto)
... | true |
f48e601937d5124bed2a3c7e6ad75704f3b4dbf8 | SQL | JenBroz/SQL_Challenge | /SQL_queries/FrequencyLN.sql | UTF-8 | 197 | 3.71875 | 4 | [] | no_license | --In descending order, list frequency of employee last names
SELECT employees.last_name, COUNT(employees.last_name) as frequency
from employees
group by last_name
order by
count (last_name) DESC;
| true |
480dfd106dd16dafc6a3dc132e769246c871b400 | SQL | xiaoningzhao/cartpool | /DB_DDL.sql | UTF-8 | 9,007 | 3.640625 | 4 | [] | no_license | DROP DATABASE IF EXISTS cartpool;
CREATE DATABASE cartpool;
USE cartpool;
CREATE TABLE cart_pool (
id INTEGER NOT NULL AUTO_INCREMENT,
pool_id VARCHAR(50) UNIQUE NOT NULL,
name VARCHAR(100) NOT NULL,
neighborhood VARCHAR(100) NOT NULL,
description VARCHAR(500),
zip VARCHAR(5) NOT NULL,
lead... | true |
cce8ae19d24df249d617d5cc8d014332e4b05e08 | SQL | merq-rodriguez/Proyecto-Tuberculosis | /src/config/bdv4.sql | UTF-8 | 28,182 | 3.515625 | 4 | [] | no_license | CREATE DATABASE IF NOT EXISTS tuberculosis;
USE tuberculosis;
CREATE TABLE IF NOT EXISTS departamento(
idDepartamento INT PRIMARY KEY NOT NULL AUTO_INCREMENT,
nombre VARCHAR(255),
estado CHAR(1) DEFAULT 1
);
CREATE TABLE IF NOT EXISTS municipio(
idMunicipio INT PRIMARY KEY NOT NULL AUTO_INCREMENT,
nombre VARCHA... | true |
db2d94b490247bb983c300844303c6fa2209b8b7 | SQL | babynus/projeqtor | /branches/V4.2/projeqtor/db/projeqtor_V4.2.0.sql | UTF-8 | 19,314 | 3.171875 | 3 | [] | no_license | -- ///////////////////////////////////////////////////////////
-- // PROJECTOR //
-- //-------------------------------------------------------//
-- // Version : 4.2.0 //
-- // Date : 2014-01-11 //
... | true |
7b04b3ce76b60f937aa7a789079fd1b3850635df | SQL | leoramos1292/The-Tech-Academy-SQL-Coding-Projects | /Final SQL Assignment/Values.sql | UTF-8 | 6,936 | 2.953125 | 3 | [] | no_license | use books_Library;
INSERT INTO Borrower
(CardNo, Name, Address, Phone)
values
('4308886204430311', 'Aiden Collins', 'Portland, OR', '(503) 258-9743'),
('4278126905777181', 'Chloe Williams', 'Portland, OR', '(503) 264-1649'),
('4997255895956099', 'Michael Thomas', 'Milwaukie, OR', '(503) 369-7412'),
('4251440833... | true |
28e3e650e9fbec278782ba5836638b6169619050 | SQL | cokyya/Web-Application-Design | /cine.sql | UTF-8 | 14,662 | 3.28125 | 3 | [] | no_license | use cine;
create table members (
username varchar(20),
password varchar(40),
email varchar(40),
name varchar(20),
primary key (username)
);
create table movieinfo
(
movieid int unsigned not null auto_increment primary key,
moviename varchar(256) not null,
PG char(50) not null,
cast varchar(1024) not null,
d... | true |
ea512f2401c8be3bb2f524d41fb548e53a8eb5ce | SQL | apache/spark | /sql/core/src/test/resources/sql-tests/inputs/cross-join.sql | UTF-8 | 1,218 | 4.5 | 4 | [
"BSD-3-Clause",
"CC0-1.0",
"CDDL-1.1",
"Apache-2.0",
"LicenseRef-scancode-public-domain",
"BSD-2-Clause",
"LicenseRef-scancode-unknown-license-reference",
"EPL-2.0",
"CDDL-1.0",
"MIT",
"LGPL-2.0-or-later",
"Python-2.0",
"LicenseRef-scancode-generic-cla",
"LicenseRef-scancode-free-unknown",... | permissive | -- Cross join detection and error checking is done in JoinSuite since explain output is
-- used in the error message and the ids are not stable. Only positive cases are checked here.
create temporary view nt1 as select * from values
("one", 1),
("two", 2),
("three", 3)
as nt1(k, v1);
create temporary view nt2... | true |
305153c9423ee3e002469e74dcfdda1cb384141c | SQL | rarpal/BestPracticeETL | /ETL/DataWarehouse/Script.v1_PostDeployment.sql | UTF-8 | 1,229 | 3.578125 | 4 | [] | no_license | /*
Post-Deployment Script Template
--------------------------------------------------------------------------------------
This file contains SQL statements that will be appended to the build script.
Use SQLCMD syntax to include a file in the post-deployment script.
Example: :r .\myfile.sql
... | true |
05f1f993e044813b73c60eddaeeedd5dbd6d200a | SQL | RevatureGentry/1806-SNOW | /SQL/CHINOOK-SNOW.sql | WINDOWS-1252 | 2,939 | 4.25 | 4 | [] | no_license | -- Select all records from the Employee Table
select * from employee;
-- Select all records from the Employee Table where the lastname is 'King'
select * from employee where lastname = 'King';
-- Select all records from the Employee Table where the firstname is 'Andrew' and REPORTSTO is null
select * from employee wh... | true |
e6349ddd954b1dc5b6bcedd319a98350db9cceca | SQL | xxdoc/vb6-winpricing400 | /scripts/2_user_account.sql | UTF-8 | 642 | 2.6875 | 3 | [] | no_license |
CREATE TABLE USER_ACCOUNT
(
USER_ID ID_TYPE NOT NULL,
USER_NAME USERNAME_TYPE NOT NULL,
USER_PASSWORD PASSWORD_TYPE NOT NULL,
USER_DESC DESC_TYPE,
USER_STATUS FLAG_TYPE,
GROUP_ID ID_TYPE NOT NULL,
CHECK_EXPIRE FLAG_TYPE NOT NUL... | true |
c93ad0d72b5943bd3fa6576df7b2013c345a550d | SQL | MMeaney/General-Code | /SQL/EDEN/User Edit Membership.sql | UTF-8 | 2,446 | 3.609375 | 4 | [
"Apache-2.0"
] | permissive | -- *******************************************
-- *** Update user organisation memebership
USE [EdenSSO-PRD]
-- 7C310BE0-C20F-DE11-B526-0022642A33B2 EPA STG Org
-- 66298E85-AC36-4634-A8FF-5D7383204F7B Barry Houlihan
-- 566E449A-AC49-4365-BD52-943B73FB10D6 Maurice Meaney
BEGIN TRANSACTION
INSERT INTO db... | true |
adccc2f71aee8086875f0fffc4cc16cf5cbd603c | SQL | gap6033/SQL-and-Python | /movies/1.sql | UTF-8 | 130 | 2.671875 | 3 | [] | no_license | -- In 1.sql, write a SQL query to list the titles of all
-- movies released in 2008.
SELECT title
FROM movies
WHERE year = 2008;
| true |
cb91c97981ea446b07b5d74521e4b8f86f973ecd | SQL | Nixus6/Licitaciones | /BasedeDatos/Licitaciones.sql | UTF-8 | 24,451 | 2.90625 | 3 | [] | no_license | drop database if exists LicitacionesFinal;
create DATABASE LicitacionesFinal;
USE LicitacionesFinal;
drop table if exists Oferta ;
CREATE TABLE `aboga` (
`id` INT(12) NOT NULL,
`nombre_aboga` VARCHAR(100) NOT NULL,
`valido_id` INT(12) NOT NULL
) ENGINE=INNODB DEFAULT CHARSET=UTF8MB4;
CREATE TABLE... | true |
9fb7295e1dc14b2e30eb85baa53a940861a17276 | SQL | LE2002GHInc/comparables | /PLSQLCallBackFrmQueue.sql | UTF-8 | 6,177 | 2.96875 | 3 | [] | no_license | BEGIN
DBMS_AQADM.DROP_QUEUE_TABLE(queue_table => 'order_queue_table',force => true);
END;
/
DROP TABLE orders PURGE;
DROP TYPE orders_lisT_tt;
DROP TYPE order_ot;
--------------*****---------------------
CREATE TABLE orders(
order_id NUMBER
, order_total NUMBER
, ordered DA... | true |
c856ed22575782735736d2404b74a6ebb00d26b9 | SQL | JonathanCHEMLA/ma-formation | /cours de MySQL/union.sql | UTF-8 | 1,264 | 3.3125 | 3 | [] | no_license |
--# UNION permet de fusionner plusieurs résulltats DANS UNE MEME COLONNE. Regrouper +eurs requetes en 1 seul resultat.
USE bibliotheque;
--# RASSEMBLER et afficher les auteurs et les abonnés DANS UNE SEULE ET MEME COLONNE
SELECT prenom AS 'liste des abonnés' FROM abonne UNION select auteur FROM livre;
--#
SELECT ... | true |
ea73fc4c334726d25acada27c2f77258996315d5 | SQL | fuchunhong/myStudy | /src/main/resources/db/migration/V3__create.table.sql | UTF-8 | 301 | 2.71875 | 3 | [] | no_license | DROP TABLE IF EXISTS `dada`;
CREATE TABLE `dada` (
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
`name` varchar(20) NOT NULL COMMENT 'EVENT NAME',
`create_date` TIMESTAMP DEFAULT CURRENT_TIMESTAMP COMMENT 'create_date',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; | true |
62f999befad22f2bfba12ebcadb607d4e630fbd4 | SQL | florchus/Actividad-1.2 | /1-1/1-1.sql | UTF-8 | 707 | 3.8125 | 4 | [] | no_license | /*
Relacion 1 a 1. Actividad 1.2.
Se crean las tablas Alumnos y Usuarios. La relacion 1 a 1 se da porque un alumno puede tener un solo
usuario y un usuario puede pertenecer solo a un alumno.
*/
Create Database unoAuno
Use unoAuno
Create Table Alumnos(
DNI varchar(8) not null unique ,
Legajo bigint unique ide... | true |
394a485ab0d3f07bfa5b9e9cf07b0591e0b397e8 | SQL | feleHaile/Data-Warehousing-for-Business-Intelligence-Specialization | /Course 3 Relational Database Support for Data Warehouses/Course3Module3Assignment/query.sql | UTF-8 | 3,369 | 3.9375 | 4 | [] | no_license | --Query1
SELECT name, SUM(extcost) AS SUMextcost,
RANK() OVER (ORDER BY SUM(extcost) DESC) AS costRank
FROM inventory_fact, cust_vendor_dim
WHERE cust_vendor_dim.custvendorkey = inventory_fact.custvendorkey
AND transtypekey = 5
GROUP BY name;
--Query2
SELECT state, name, SUM(extcost) AS SUMextcost,
RANK() OVER (PARTI... | true |
4552f9f1acfda1ba4aec8475e7031c9e0b31c3f7 | SQL | vah-michael/Data_Bases | /Lesson_4/Lesson_4.sql | UTF-8 | 4,252 | 3.609375 | 4 | [] | no_license | -- DML (data manipulation language) - язык манипулирования данными
-- CRUD (create, read, update, delete, truncate)
use vk_test;
INSERT INTO `users` (`id`, `firstname`, `lastname`, `email`, `phone`)
VALUES ('58', 'Dean', 'Satterfield', 'orin69@example.net', '9160120629');
INSERT INTO users VALUES
('3', 'Reuben', 'N... | true |
25cd82668ca0d1a8e7568ced1bb9f9a328540a98 | SQL | cloris-cc/SC-alibaba | /sharding-sphere/src/main/resources/sql/t_order.sql | UTF-8 | 1,025 | 3.0625 | 3 | [] | no_license | /*
Navicat MySQL Data Transfer
Source Server : localhost_3306
Source Server Type : MySQL
Source Server Version : 80017
Source Host : localhost:3306
Source Schema : demo_ds_master_0_slave_1
Target Server Type : MySQL
Target Server Version : 80017
File Encoding : 65001
... | true |
dfb8c150f3fbb03d4fe064b6b592769319d21d63 | SQL | pmirand6/soliris | /base_datos/diego_local/ST_CONTROL_MODIFICAR_VENTA.sql | UTF-8 | 3,026 | 3.671875 | 4 | [] | no_license | -- --------------------------------------------------------
-- Host: 127.0.0.1
-- Versión del servidor: 5.6.11-log - MySQL Community Server (GPL)
-- SO del servidor: Win64
-- HeidiSQL Versión: 11.0.0.5919
-- -------------------------------------------------------... | true |
ac54b5b765f33cfd1353bf27182e89c58957b0be | SQL | albertomattos/SQL_gerais | /DBA/Memória.sql | UTF-8 | 769 | 3.640625 | 4 | [] | no_license | select
sid,
username,
round(total_user_mem/1024,2) mem_used_in_kb,
round(100 * total_user_mem/total_mem,2) mem_percent
from
(select
b.sid sid,
nvl(b.username,p.name) username,
sum(value) total_user_mem
from
sys.v_$statname c,
sys.v_$sesstat a,
sys.v_$session b,
... | true |
4c7e01ca7dcbfc29e598f5bd34339dcfaa4e51b4 | SQL | Fred-huu/Projects | /database/data.sql | UTF-8 | 4,551 | 3.453125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.0.10deb1
-- http://www.phpmyadmin.net
--
-- 主机: localhost
-- 生成日期: 2015-06-12 12:47:32
-- 服务器版本: 5.5.43-0ubuntu0.14.04.1
-- PHP 版本: 5.5.9-1ubuntu4.9
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
... | true |
56111d9fc96ee2943350ca69530a2849feeaa8ce | SQL | Elvis-1/newproject | /cars.sql | UTF-8 | 7,211 | 3.09375 | 3 | [
"MIT"
] | permissive | -- phpMyAdmin SQL Dump
-- version 5.0.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: May 14, 2021 at 02:38 PM
-- Server version: 10.4.11-MariaDB
-- PHP Version: 7.4.3
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD... | true |
784dc00417e200e55ebe873d4d3f424b083601c5 | SQL | lp-apidae/conception | /tables/MLR1.SQL | ISO-8859-1 | 5,065 | 3.515625 | 4 | [] | no_license | -- -----------------------------------------------------------------------------
-- Gnration d'une base de donnes pour
-- Oracle Version 10g
-- (6/12/2018 11:59:21)
-- -----------------------------------------------------------------------------
-- Nom d... | true |
1c05d5bc8463dc9e902139009ac9513b346d625a | SQL | mundodron/arduino-bot-aurelio | /Querys/~ebAB85.sql | UTF-8 | 415 | 2.6875 | 3 | [] | no_license | select * from customer_id_acct_map where external_id = '999979750763'
select account_no,bill_ref_no from bill_invoice where bill_ref_no = 199330702
select p.*,
(select tira_acento(description_text) from descriptions dt where dt.description_code = P.ELEMENT_ID and dt.language_code = 2) "PRO... | true |
28cf64f86ebaa356df6d98e27f4b86e94af5d351 | SQL | cdesmarais/WebDB-Test | /WebDB/StoredProcedures/Common/dbo.SFBIncrementOpenEmailCount.prc | UTF-8 | 781 | 3.640625 | 4 | [] | no_license | if exists (select * from dbo.sysobjects where ID = object_id(N'[dbo].[SFBIncrementOpenEmailCount]') and OBJECTPROPERTY(ID, N'IsProcedure') = 1)
drop procedure [dbo].[SFBIncrementOpenEmailCount]
go
-- updates the count of the number of times a Share Feedback Email was opened
-- returns 0 on success, -1 for error
create... | true |
66e9fc26d437e4bd2449d1de2236e64e823e9412 | SQL | arowla/openFEC | /data/sql_updates/create_committee_detail_view.sql | UTF-8 | 6,400 | 3.296875 | 3 | [
"CC0-1.0",
"LicenseRef-scancode-public-domain"
] | permissive | drop view if exists ofec_committee_detail_vw;
drop materialized view if exists ofec_committee_detail_mv_tmp;
create materialized view ofec_committee_detail_mv_tmp as
select distinct
row_number() over () as idx,
dimcmte.cmte_sk as committee_key,
dimcmte.cmte_id as committee_id,
dd.cmte_dsgn as designatio... | true |
7591527ce3fee0995494d1a53813782628beb46c | SQL | ZamboniL/m-zat | /prisma/migrations/20211016143229_permission/migration.sql | UTF-8 | 1,405 | 3.8125 | 4 | [
"MIT"
] | permissive | /*
Warnings:
- You are about to alter the column `title` on the `Bucket` table. The data in that column could be lost. The data in that column will be cast from `VarChar(191)` to `VarChar(100)`.
- Added the required column `creatorId` to the `Bucket` table without a default value. This is not possible if the tab... | true |
2b51bd1c79600e2850c6acff918e6d00866ab457 | SQL | tacr-iotcloud/server-db | /pgsql/queries/roles_in_gateway/fetch_by_gateway_id.sql | UTF-8 | 291 | 3.453125 | 3 | [] | no_license | SELECT
r.id AS id,
r.gateway_id AS gateway_id,
r.identity_id AS identity_id,
r.level AS level,
extract(epoch FROM r.created)::bigint AS created,
i.email AS identity_email
FROM
beeeon.roles_in_gateway AS r
JOIN
beeeon.identities AS i
ON
r.identity_id = i.id
WHERE
r.gateway_id = $1
| true |
227d5791bddb63af6c246f5ea0a1a36873b112c3 | SQL | Djok216/Wegas | /BD/Script Creare/create_user_chess.sql | UTF-8 | 651 | 2.984375 | 3 | [] | no_license | DROP TABLESPACE chess INCLUDING CONTENTS and datafiles CASCADE CONSTRAINTS;
CREATE TABLESPACE chess
DATAFILE 'chess_perm_0001.dat'
SIZE 500M
REUSE
AUTOEXTEND ON NEXT 50M MAXSIZE 2000M;
/
CREATE TEMPORARY TABLESPACE aplicatie
TEMPFILE 'chess_temp_0001.dbf'
SIZE 5M
AUTOEXTEND ON;
/
CR... | true |
7da9130630d4722dc6715d7217eb0d0ecbc5672a | SQL | GlobalFishingWatch/paper-global-squid | /queries/carrier_positions_in_squidregions_v20220525.sql | UTF-8 | 7,165 | 3.953125 | 4 | [] | no_license | #standardsql
-----------------------------------------
-- Identify carrier positions in squid
-- regions for carriers that have at
-- least one loitering event in a squid
-- region. These may still be carriers
-- that primarily meet longlines given
-- the overlap in the Pacific.
--
-- results are saved in paper_global_... | true |
03c1d1f6add3bc8e2e72b2d69d6d7df80877e38b | SQL | javiperales/BasesDeDatos | /pruebaDeExamentriggers.sql | UTF-8 | 3,151 | 3.875 | 4 | [] | no_license | alter table empleados2 add(foreign key(mgr) references empleados2(dni));
/*ejercicio1 crea un trigger sobre la tabla emp para que no se permita que un empleado sea jefe(mgr) de mas
de cinco empleados*/
create or replace trigger prueba11
before insert on empleados2
for each row
declare
supervisa integer;
begin
select... | true |
1fa2cf9a6e42c57cd4040be6cfdb012662f9395f | SQL | ezheidtmann/sfrs-activities | /modules/s4rs_activity_nav/breadcrumb_setup.sql | UTF-8 | 3,432 | 3.4375 | 3 | [] | no_license | /**
* @file Dump of "custom_breadcrumb" table, to document custom_breadcrumbs
* settings for S4RS Activity Pages and Extensions.
*
* The data included here is included for documentation purposes; unless you
* are on a fresh install you should probably not simply run this SQL.
*/
-- MySQL dump 10.13 Distrib 5.5.... | true |
d6b2505f6d15ec9a00f26c5d069010f3efd70325 | SQL | downfang888/coffcms | /data/backup/v1.3.5/sql/v1.3.2.sql | UTF-8 | 1,744 | 3.28125 | 3 | [] | no_license | UPDATE `ey_config` SET `value` = '0' WHERE `name` = 'web_exception' AND `inc_type` = 'web';
UPDATE `ey_guestbook` SET `channel` = '8' WHERE `aid` > 0;
DROP TABLE IF EXISTS `ey_users_menu`;
CREATE TABLE `ey_users_menu` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增ID',
`title` varchar(30) DEFAULT '' CO... | true |
424f11ea98468dc5793c4aac692299fab9f290ff | SQL | plifis/job4j_cars | /db/schema.sql | UTF-8 | 786 | 3.453125 | 3 | [] | no_license | create table users(
id serial primary key,
name varchar (100) NOT NULL,
email varchar (50) NOT NULL UNIQUE,
password varchar (20) NOT NULL
);
create table cars(
id serial primary key,
description varchar (1000),
mark varchar (50) NOT NULL,
... | true |
cad9d8fb6877e5ed838aff8614a4ae4504606329 | SQL | Yudhapradana/pkl | /db/sumber_dana (1).sql | UTF-8 | 3,119 | 3.0625 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | -- phpMyAdmin SQL Dump
-- version 4.8.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Apr 01, 2019 at 05:47 AM
-- Server version: 10.1.33-MariaDB
-- PHP Version: 7.2.6
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD... | true |
b6fcedfa3f0ae7ad8c8b0629300a21aaf88ba95a | SQL | 181221/dat104 | /lab4/oppgave2/bruker.sql | UTF-8 | 199 | 2.609375 | 3 | [] | no_license | DROP TABLE IF EXISTS bruker CASCADE;
CREATE TABLE bruker (
bruker_id SERIAL NOT NULL,
brukernavn VARCHAR(20),
PRIMARY KEY(bruker_id)
);
INSERT INTO bruker (brukernavn) VALUES('peder') | true |
da5495542e2416e2e57a448ccd328f5261904478 | SQL | finleysg/clubmanager-api | /registration_payment_view.sql | UTF-8 | 1,146 | 3.578125 | 4 | [] | no_license | ALTER VIEW club.online_payment_view AS
SELECT
e.id AS event_id
,e.name
,e.event_type
,e.start_date
,g.signed_up_by_id
,u.first_name
,u.last_name
,g.payment_amount
,g.payment_confirmation_code
,g.payment_confirmation_timestamp
,g.id AS record_id
,'group-payment' AS record_type
,concat(g.id, 'g... | true |
859b29cf1a7336df3effec6dbfc26a3f447cf838 | SQL | littlepai/O2O-Coupon-Usage-Forecast | /code/pai/create_tab.sql | GB18030 | 3,885 | 3.828125 | 4 | [] | no_license | --drop ѵݱ
drop table train_online_stage2;
--create ѵݱ
create table train_online_stage2
(
user_id varchar2(100),
merchant_id varchar2(100),
action varchar2(100),
coupon_id varchar2(100),
discount_rate varchar2(100),
date_received varchar2(100),
date_pay varchar2(100)
);
comment on column train_online_sta... | true |
3dff41b02b9adee6c195678b632755ca2f430e92 | SQL | fwu96/SQL-JDBC | /Query9.sql | UTF-8 | 1,453 | 4.40625 | 4 | [] | no_license | WITH storedeptallsale AS(
SELECT store,dept,sum(weeklysales) AS all_sale
FROM sales
GROUP BY store,dept
), inf AS(
SELECT dept, SUM(all_sale/SIZE) AS normsales
FROM storedeptallsale
JOIN stores ON storedeptallsale.store = stores.store
GROUP BY dept
), deps AS (
SELECT dept AS d
FROM inf
ORDE... | true |
4f16b35016360928edf85c9555080b1d05543f24 | SQL | alexxg98/The-Hive | /TheHive.sql | UTF-8 | 2,772 | 3.71875 | 4 | [] | no_license | DROP DATABASE IF EXISTS TheHive;
CREATE DATABASE TheHive;
use TheHive;
CREATE TABLE users(
username VARCHAR(25),
email VARCHAR(25),
PRIMARY KEY(username, email),
password VARCHAR(25),
reputation_score INT DEFAULT 0,
user_type ENUM('OU', 'VIP', 'SU'),
status VARCHAR(5) NULL,
votes INT DE... | true |
2fde398c7e0b8ff7884e03c153b12716cf5df898 | SQL | TH1NKFASTER/sqlex | /exercises/063.sql | UTF-8 | 211 | 3.359375 | 3 | [] | no_license | SELECT name
FROM (SELECT DISTINCT ID_psg
FROM Pass_in_trip
GROUP BY ID_psg, place
HAVING COUNT(trip_no) > 1) AS x
INNER JOIN Passenger
ON Passenger.ID_psg = x.ID_psg
| true |
31deeb8f82f9184eb21ad41eff95e7d082e0cd65 | SQL | Melec-H/ec-code-2020-codflix-php | /codflix.sql | UTF-8 | 14,357 | 3.359375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.8.3
-- https://www.phpmyadmin.net/
--
-- Hôte : localhost:8889
-- Généré le : jeu. 25 juin 2020 à 18:28
-- Version du serveur : 5.7.23
-- Version de PHP : 7.2.8
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
--
-- Base de données : `codflix`
--
-- ----------... | true |
26dc33eecad59390acaad31129cef5eb33d9dfab | SQL | oerpli/MONitERO | /sql/queries/monthly_stats.sql | UTF-8 | 3,188 | 4.0625 | 4 | [
"MIT"
] | permissive | \timing on
-- name of new table
\set name monthly_stats
-- aggregate over month/day/year/whatever?
\set granularity month
-- desired precision of various floats in the table. a precision of 2 should be enough for everybody (abraham hinteregger)
\set fprecision 2
-- creat quoted version of variable
\set q_granularity '... | true |
1dfc2be273cbefe291294f2bdf0fd055220ea4cd | SQL | jichuangsi/69Vedio_console | /data/20191217.sql | UTF-8 | 614 | 3.09375 | 3 | [
"Apache-2.0"
] | permissive | DROP TABLE IF EXISTS `ms_member_location`;
CREATE TABLE `ms_member_location` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`latitude` decimal(15,11) unsigned NOT NULL DEFAULT '0.00' COMMENT '经度',
`longitude` decimal(15,11) unsigned NOT NULL DEFAULT '0.00' COMMENT '维度',
`address` text default '' COMMENT '详细地址... | true |
fd3c01aa2c3acec92ad70dd80cf0d1deb98da0ba | SQL | dgupta-apttus/EDA | /Snowflake/SNAPSHOT/ViewDDL/LMA_LICENSE_C1_HISTORY.sql | UTF-8 | 5,483 | 2.71875 | 3 | [] | no_license | --DROP VIEW APTTUS_DW.SNAPSHOTS.FMA_VALUES_HISTORY ;
CREATE OR REPLACE VIEW APTTUS_DW.SNAPSHOTS.LMA_LICENSE_C1_HISTORY
COMMENT = 'Union LMA_LICENSE_C1 snapshots to make complete history'
AS
WITH the_union AS (
SELECT
ACCOUNT_SUSPENDED__C
, BA_EMAIL__C
, BA__C
, COMPANY_FROM_LEAD__C
, CONGA_EDITION__C
, CREATE... | true |
579daa025858ddd7aba336e33c5047f2f413157f | SQL | sevdalin/Software-University-SoftUni | /CSharp-DB-Fundamentals/Databases Basics - MS SQL Server/08. Functions, Triggers and Transactions/Problem 3 - Town Names Starting With.sql | UTF-8 | 130 | 2.921875 | 3 | [
"MIT"
] | permissive | CREATE PROC usp_GetTownsStartingWith (@TownName nvarchar(20))
AS
SELECT t.Name FROM Towns AS [t]
WHERE t.Name LIKE @TownName + '%' | true |
db8162db94454a348c254096697708327be6f15c | SQL | Rufaidamugalli/springacademy- | /Spring-data-jdbc-relationships-sample/src/main/resources/schema.sql | UTF-8 | 281 | 2.765625 | 3 | [] | no_license | drop table if exists rental;
drop table if exists movie;
create table movie(
id serial primary key,
title text,
description text
);
create table rental(
id serial primary key,
movie integer references movie(id),
movie_key text,
duration text,
price integer
); | true |
fbea51ca0a79bb02b389a9c626a67f3651033a5b | SQL | IF65/script | /SQL/accoda_giornata.sql | UTF-8 | 996 | 2.828125 | 3 | [] | no_license | delete archivi.`riepvegi` from archivi.`riepvegi` join
(select distinct substr(`NEGOZIO`,1,2) as `societa`,substr(`NEGOZIO`,3,2) as `negozio`,str_to_date(`DATA`,'%Y%m%d') as `data` from rvg.`RIEPVEGI_RIE`) as rr
on archivi.`riepvegi`.`RVG-CODSOC`=rr.`societa` and archivi.`riepvegi`.`RVG-CODNEG`=rr.`negozio` and archiv... | true |
83a795c6717b623dff47712c5c636e3170d03d25 | SQL | KHNRV/FlashQuiz | /db/00_schema/03_questions.sql | UTF-8 | 263 | 3.078125 | 3 | [] | no_license | DROP TABLE IF EXISTS questions CASCADE;
CREATE TABLE questions (
id SERIAL PRIMARY KEY,
quiz_id INTEGER REFERENCES quizzes(id) ON DELETE CASCADE,
prompt TEXT NOT NULL,
time_limit INTEGER NOT NULL DEFAULT 8000 --default time_limit is 8000 milliseconds
);
| true |
9202510b0c8f9d452dc9eeb99ae52bfc5e3dcd44 | SQL | SkillHard/Diplom | /modules/core/db/update/postgres/19/190624-2-updateConnection04.sql | UTF-8 | 664 | 2.671875 | 3 | [] | no_license | alter table ABITCARD_CONNECTION rename column direction_id to direction_id__u40288 ;
drop index IDX_ABITCARD_CONNECTION_ON_DIRECTION ;
alter table ABITCARD_CONNECTION drop constraint FK_ABITCARD_CONNECTION_ON_DIRECTION ;
alter table ABITCARD_CONNECTION rename column disciplin_three to disciplin_three__u27775 ;
alter ta... | true |
ac6eb542b64687e208d4763f5c9ee3a0e44df56c | SQL | PhanVanNam1998/DoAn_K57 | /test1.sql | UTF-8 | 2,686 | 3.234375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 5.0.1
-- https://www.phpmyadmin.net/
--
-- Máy chủ: 127.0.0.1
-- Thời gian đã tạo: Th8 27, 2020 lúc 04:46 AM
-- Phiên bản máy phục vụ: 10.4.11-MariaDB
-- Phiên bản PHP: 7.4.3
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!... | true |
72203043b4e0dd8b875accf0dcaa31c452b4ca5d | SQL | nabla-containers/rumprun-packages | /mysql/mysql_rump_bootstrap.sql | UTF-8 | 318 | 2.5625 | 3 | [
"CC0-1.0"
] | permissive | -- Rump-specific bootstrap for MySQL.
-- For demonstration purposes, drop all users except 'rump' which is made
-- equivalent to the 'root' user and allowed to login from any host.
USE mysql;
UPDATE user SET User = 'rump', Host = '%' WHERE User = 'root' AND Host = 'localhost';
DELETE from user WHERE User != 'rump';
| true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.