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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
b14230b89655c2d0f1860cee3a73ccc8be91580c | SQL | cfpb/hmda-platform | /hmda-sql-doc/institutions_history_notes.sql | UTF-8 | 2,161 | 2.890625 | 3 | [
"CC0-1.0"
] | permissive | --
-- PostgreSQL database dump
--
-- Dumped from database version 10.6
-- Dumped by pg_dump version 10.5
-- Started on 2018-06-18 13:13:03 EDT
SET statement_timeout = 0;
SET lock_timeout = 0;
SET idle_in_transaction_session_timeout = 0;
SET client_encoding = 'UTF8';
SET standard_conforming_strings = on;
SELECT pg_ca... | true |
bc34269918c96f97a68aeaf48e58137788be9d0a | SQL | KOVCHENKO/fias_parser | /script.sql | UTF-8 | 1,374 | 3.0625 | 3 | [] | no_license | -- Table: public.addresses
-- DROP TABLE public.addresses;
CREATE TABLE public.addresses
(
"ACTSTATUS" integer,
"AOGUID" character varying(36),
"AOID" character varying(36),
"AOLEVEL" integer,
"CENTSTATUS" integer,
"CURRSTATUS" integer,
"ENDDATE" timestamp without time zone,
"FORMALNAME" character var... | true |
a74f4efa3e696307aa24a6807bf948a3980f4c84 | SQL | TylerWilhelmWD/cs313-php | /web/notebook.sql | UTF-8 | 535 | 3.234375 | 3 | [] | no_license | psql -u postgres
CREATE DATABASE notebook
\c notebook
CREATE TABLE course
(
id SERIAL PRIMARY KEY NOT NULL,
name VARCHAR(80) NOT NULL,
number VARCHAR(10) NOT NULL UNIQUE
);
CREATE TABLE notebook
(
id SERIAL PRIMARY KEY NOT NULL,
course_id INT NOT NULL REFERENCES course(id),
content TEXT NOT NULL,
date DATE ... | true |
fb697eb7ba0b35cdfc2679539049e70fb4e10f7b | SQL | inlm/schema-generator-leanmapper | /tests/cases/lm-has-many/dump-mysql.sql | UTF-8 | 907 | 3.875 | 4 | [
"BSD-3-Clause"
] | permissive | SET foreign_key_checks = 1;
SET time_zone = "SYSTEM";
SET sql_mode = "TRADITIONAL";
CREATE TABLE `book` (
`id` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
`name` TEXT NOT NULL,
PRIMARY KEY (`id`)
)
ENGINE=InnoDB
CHARACTER SET=utf8mb4
COLLATE=utf8mb4_czech_ci;
CREATE TABLE `tag` (
`id` INT(10) UNSIGNED NOT NULL AUTO... | true |
bced9fb12998846a11f26881300190bb6ba092f1 | SQL | Sage-Bionetworks/audit | /sql/report_tcga_file_users.sql | UTF-8 | 1,866 | 4.1875 | 4 | [] | no_license | -- Non-Sage users accessing TCGA content (file and code)
SELECT
NSU.ID AS USER_ID,
NSU.EMAIL AS USER_EMAIL,
COUNT(DISTINCT AR.SESSION) AS SESSION_COUNT
FROM
AUDIT_ACCESS_RECORDS_TCGA AR,
AUDIT_NON_SAGE_USERS NSU,
JDONODE NODE
WHERE
AR.ENTITY_ID = NODE.ID AND
AR.USER_ID = NSU.ID AND
N... | true |
ff7654233f8dbca52e95058c9324b34c07c0cfe4 | SQL | xutian0521/SQL | /sql脚本/MySQL-SQL学习3_增删改查.sql | UTF-8 | 433 | 2.953125 | 3 | [] | no_license | USE Test; --使用Test库
SELECT * FROM Person; --查询所有记录
--插入
INSERT INTO Person(LastName, Age) VALUES('zs', 18);
INSERT INTO Person(LastName, Age) VALUES('ls', 20);
(##INSERT INTO t_Movie(Title,FanHao,Source,Cover,CreateTime) VALUES('电影2','HQ-456','http://192.168.2.100/','2.jpg','2019-1-15 16:56:58');)
--更新
UPDATE Perso... | true |
980b03dd3468cd9060dd37a0904300f46e832735 | SQL | WillOrtquist/Hire-Will | /ElevateSweetsCapstone/backend/database/OurQuery.sql | UTF-8 | 2,130 | 3.5625 | 4 | [] | no_license | USE CakesDB
--INSERT INTO styles (available, style, price_multiplier)
--VALUES ( 1, 'Sheet cake', 1)
--INSERT INTO styles (available, style, price_multiplier)
--VALUES ( 1, 'Layer cake', 1)
--INSERT INTO styles (available, style, price_multiplier)
--VALUES ( 1, 'Cupcake', 1)
--INSERT INTO fillings (available, filli... | true |
f0d05d622016b1723be53580a349887019418d4f | SQL | L200150047/Project_keuangan | /kategori.sql | UTF-8 | 1,833 | 2.875 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.2.11
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Aug 04, 2021 at 04:58 PM
-- Server version: 5.6.21
-- PHP Version: 5.6.3
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
... | true |
77fc4063206ed767ce2da00195e66cf650e1bd7b | SQL | ordnaelmedeiros/ids-treina1 | /recursos-api/V0.0.4__telefone.sql | UTF-8 | 318 | 2.875 | 3 | [
"Apache-2.0"
] | permissive | CREATE SEQUENCE SEQ_PESSOATELEFONE;
CREATE TABLE PESSOATELEFONE (
PESSOATELEFONEID NUMERIC(20) NOT NULL,
PESSOAID NUMERIC(20),
TIPO VARCHAR(50),
NUMERO VARCHAR(11),
CONSTRAINT PK_PESSOATELEFONE PRIMARY KEY (PESSOATELEFONEID),
CONSTRAINT FK_PESSOATELEFONE1 FOREIGN KEY (PESSOAID) REFERENCES PESSOA (PESSOAID)
);
| true |
3cd64e459eafd4dace53d3bb6cd8fe8b911c9bd1 | SQL | wanxiaowei/talk | /talk.sql | UTF-8 | 594 | 3.046875 | 3 | [] | no_license | CREATE DATABASE IF NOT EXISTS talk;
USE talk;
DROP TABLE IF EXISTS user;
DROP TABLE IF EXISTS permission;
CREATE TABLE user (id INTEGER PRIMARY KEY AUTO_INCREMENT,
name VARCHAR(100) NOT NULL,
password VARCHAR(100) NOT NULL,
permission_level INTEGER NOT NULL DEFAU... | true |
32544ad20538a8287ebee602ee6c1390108d8117 | SQL | AmbyrShae/DB-Spring2016 | /Queries.sql | UTF-8 | 19,680 | 4.5 | 4 | [] | no_license | -- B. Crump, A. Jarrell
-- 1. List a company’s workers by names. **WORKS** Returns Dave and ALEX for GE
SELECT name
FROM Job_company NATURAL JOIN Has_Job NATURAL JOIN Person
WHERE comp_id = 100; -- input actual comp_id
-- 2. List a company’s staff by salary in descending order. **WORKS** Returns 60,000(Dave) 45,000(A... | true |
7fbecd28a61e639b44df2de5a953310322a7b202 | SQL | rafailiadimaki/online-school-management-system-part-b | /5. A list of students that belong to more than one courses.sql | UTF-8 | 196 | 3.515625 | 4 | [
"MIT"
] | permissive | SELECT stud_id,first_name, last_name
FROM students
WHERE students.stud_id IN (SELECT courseregistrations.stud_id
FROM courseregistrations
GROUP BY courseregistrations.stud_id
HAVING COUNT(*) > 1); | true |
1ddf6262343cb1053e0227f39a136eb389e9b20f | SQL | madrider/sqll | /All.sql | UTF-8 | 915 | 4.03125 | 4 | [] | no_license | use Northwind
--simple select
select * from Customers
--where condition
select CompanyName,ContactName,City
from Customers where
City='London'
--Like Operator
select CompanyName,ContactName
from Customers
where City Like ('L%')--group of characters
select CompanyName,ContactName
from Customers
wher... | true |
aef439e2c2a24d3a9585de214b9da19a2bd3bbf7 | SQL | saisankargochhayat/xtasy-old | /xtasy.sql | UTF-8 | 19,922 | 2.953125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.4.14
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Feb 07, 2016 at 09:10 AM
-- Server version: 5.6.26
-- PHP Version: 5.6.12
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;... | true |
d90ae897fb911874821b005a7c985594cbc9395b | SQL | robinmurphy/stdbank | /src/main/resources/db/changelog/db-changelog-liquibase-jpa-hsqldb.sql | UTF-8 | 472 | 3.109375 | 3 | [] | no_license | CREATE TABLE SBG.PRODUCTS (
PRODUCT_KEY BIGINT NOT NULL,
DESCRIPTION VARCHAR(100) NOT NULL,
ITEM_PRICE DOUBLE NOT NULL,
QUANTITY INT NOT NULL,
PRIMARY KEY (PRODUCT_KEY)
);
CREATE TABLE SBG.VENDING_SALES (
ORDER_ID BIGINT NOT NULL,
DATE_OF_SALE TIMESTAMP NOT NULL,
N... | true |
84e33c68daa715e9010205ae1c4a47a82c9e2d77 | SQL | Nestor2021/Dase_de_Datos | /SQLQuery_HospitalBD.sql | ISO-8859-1 | 7,766 | 3.546875 | 4 | [] | no_license | --Nestor Alexis Zamora Orellana
--Creamos la Base de Datos
create database HospitalBD;
use HospitalBD;
--Tabla sexo
create table Sexo(
id_sexo integer NOT NULL identity (1,1) primary key,
N_Sexo varchar(10)NOT NULL,
);
--Tabla Telefono
create table Telefono(
id_telefono integer NOT NULL identity (1,1) primary key,
T... | true |
31a0cd09a423aa5d5766de2ef4e5abc99aeef7d8 | SQL | horatioh/AUBrowserGit | /AUApp/root/sql/au_fields/input_feld_2_feld_hierarchie.sql | ISO-8859-2 | 20,681 | 3.328125 | 3 | [] | no_license | --
-- ----------------------------------------------------------------------------------------
-- (-1) Ausschluss nicht bentigten Programme
-- ----------------------------------------------------------------------------------------
--
insert into exclude_pgm values (12385);
delete from exclude_pgm;
--
-- ------... | true |
326af3726fb4c0018b720806841be198fdfa53a2 | SQL | codypotter/php-mysql-MVC | /dogsrus.sql | UTF-8 | 4,445 | 3.5625 | 4 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.7.9
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: May 02, 2018 at 08:17 AM
-- Server version: 10.1.31-MariaDB
-- PHP Version: 7.2.3
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD... | true |
f36ae5f4a4485481657fb950c647197b8bfbe15a | SQL | DeyanParushev/MyStudentProjects | /MS SQL/More Excercises/Exam Prep 1/Problem 1.sql | UTF-8 | 1,034 | 3.53125 | 4 | [] | no_license | CREATE TABLE Users (
Id INT PRIMARY KEY IDENTITY,
Username NVARCHAR(30) NOT NULL,
[Password] NVARCHAR(30) NOT NULL,
Email NVARCHAR(30) NOT NULL
)
CREATE TABLE Repositories (
Id INT PRIMARY KEY IDENTITY,
[Name] NVARCHAR(50) NOT NULL
)
CREATE TABLE RepositoriesContributors (
RepositoryId INT REFERENCES Repositor... | true |
18050350b4eb09f32931e26b39771c69334f6df0 | SQL | polavarapup2/CTRP_4x_PA | /pa/data-warehouse/sql/prime.sql | UTF-8 | 2,007 | 3.25 | 3 | [] | no_license | /*
Script needs to be run on any tiers which have data warehouse after refresh from production
*/
CREATE TABLE IF NOT EXISTS DW_STUDY_AUDIT (
NCI_ID character varying (50),
DATE timestamp,
USERNAME character varying (255),
FIRST_NAME character varying(255),
LAST_NAME character varying(255),
TYPE cha... | true |
6209fc6bed2e22b9fdb891ff3a49880e5fa47abe | SQL | c-shah/radius-connect | /postgres.sql | UTF-8 | 729 | 2.53125 | 3 | [] | no_license | drop table oauth_configuration;
create sequence oauth_configuration_seq START 101;
create table oauth_configuration (
id integer default nextval('oauth_configuration_seq'),
code varchar(200),
issued_at varchar(200),
refresh_token varchar(200),
instance_url varchar(200),
... | true |
75215c193f1ecbeda886c0749073bf84ecde4741 | SQL | efrem005/mysql_lv1 | /lesson9/lesson9.sql | UTF-8 | 6,355 | 4.21875 | 4 | [] | no_license | /* Практическое задание по теме “Транзакции, переменные, представления” */
/*
В базе данных shop и sample присутствуют одни и те же таблицы, учебной базы данных.
Переместите запись id = 1 из таблицы shop.users в таблицу sample.users. Используйте транзакции.
*/
START TRANSACTION;
INSERT INTO sample.users SELECT id, n... | true |
7f2caa84db40a94a84bcabc3bf89478fb9daa222 | SQL | bhujyo/Data_science | /SQL/sql9_alt.sql | UTF-8 | 503 | 3.921875 | 4 | [] | no_license | CREATE VIEW freq_ext AS
SELECT docid, term, count FROM frequency
UNION
SELECT 'q' as docid, 'washington' as term, 1 as count
UNION
SELECT 'q' as docid, 'taxes' as term, 1 as count
UNION
SELECT 'q' as docid, 'treasury' as term, 1 as count;
SELECT MAX(val) FROM(
SELECT y.docid, sum(c1 * c2) as val FROM
(SELECT term,... | true |
72208854f74cfecb334454fdc9a7e02524174e63 | SQL | rosouza/spring-boot-rest-api-redis-liquibase-docker | /supplier-api/sql/create-tables.sql | UTF-8 | 438 | 3 | 3 | [] | no_license | CREATE SCHEMA supplier;
CREATE SEQUENCE supplier.supplier_seq
INCREMENT BY 1
MINVALUE 1
MAXVALUE 9223372036854775807
START 1
CACHE 1
NO CYCLE;
CREATE TABLE supplier.t_supplier (
id int8 NOT NULL,
name varchar(100) NOT NULL,
country varchar(100) NOT NULL,
state varchar(100) NOT NULL,
city varchar(100) NO... | true |
5b616b033b01f8549f983e26faacb25c73553d48 | SQL | lamb0711/DoItForBeef | /DoitforBeef.sql | UTF-8 | 11,079 | 2.921875 | 3 | [] | no_license | -- MySQL dump 10.13 Distrib 8.0.15, for osx10.14 (x86_64)
--
-- Host: localhost Database: test
-- ------------------------------------------------------
-- Server version 8.0.15
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!... | true |
1028ed0a24c3c4c75466b8e984633ca86e7191fb | SQL | Irene-Busah/holbertonschool-higher_level_programming-1 | /0x0D-SQL_introduction/16-no_link.sql | UTF-8 | 394 | 3.171875 | 3 | [] | no_license | -- Script to lists all records of the table second_table of the database hbtn_0c_0
-- Dont list rows without a name value
-- Results should display the score and the name (in this order)
-- Records should be listed by descending score
-- The database name will be passed as an argument to the mysql command
SELECT `score... | true |
c5a318878dcc3a079f853ec21c26502d00aab2e7 | SQL | rajeshyalamarthi/BarChartAzureApp | /LCC_Chatbot/SQLQuery1.sql | UTF-8 | 1,106 | 3.265625 | 3 | [] | no_license | use [Freshers-Training]
create table rajesh_SecretQuestions
(
Id int identity(1,1) primary key,
Intent nvarchar(100) not null,
Questions nvarchar(4000) not null,
);
select * from rajesh_SecretQuestions
insert into rajesh_SecretQuestions(Intent,Questions) values('Register','What is your pet name');
insert in... | true |
51c63056f50ddb4e95f42557e9663c9f44ea0984 | SQL | ipwnosx/Neptune | /Neptune.sql | UTF-8 | 2,256 | 3.21875 | 3 | [
"MIT"
] | permissive | -- Adminer 4.1.0 MySQL dump
SET NAMES utf8;
SET time_zone = '+00:00';
DROP TABLE IF EXISTS `neptune_blog`;
CREATE TABLE `neptune_blog` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`title` text NOT NULL,
`content` longtext NOT NULL,
`author` text NOT NULL,
`created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
... | true |
3eb13d0f0d0816a34700240b509b82787ef5375e | SQL | wxl954136/eladmin | /sql/eladmin.sql | UTF-8 | 55,888 | 3.015625 | 3 | [
"Apache-2.0"
] | permissive | /*
Navicat Premium Data Transfer
Source Server : localhost
Source Server Type : MySQL
Source Server Version : 50562
Source Host : localhost:3306
Source Schema : eladmin
Target Server Type : MySQL
Target Server Version : 50562
File Encoding : 65001
Date: 22/12/2019 15... | true |
de5add93482049668a215d9652ed6bfabdded418 | SQL | mnyeste/plsql-csvsort | /test_all.sql | UTF-8 | 3,665 | 3.53125 | 4 | [
"MIT"
] | permissive | declare
v_strings t_strings:=t_strings('one','two', 'abc','ydf');
v_sorted_strings t_strings;
v_count integer;
v_original dbms_utility.lname_array;
begin
dbms_utility.comma_to_table('ab,fgh', v_count, v_original);
select * bulk collect into v_sorted_strings from table(v_strings) order by 1;
se... | true |
078e6d9837ff162815d1c325001f99d9b017a6e4 | SQL | MiguelVera08/database-exercises | /update_exercises.sql | UTF-8 | 380 | 3.046875 | 3 | [] | no_license | USE codeup_test_db;
SELECT * FROM albums;
SELECT * FROM albums
WHERE release_date < 1980;
SELECT * FROM albums
WHERE artist = 'Michael Jackson';
# UPDATE albums
# SET sales = (sales * 10);
# UPDATE albums
# SET release_date = REPLACE(release_date, 19, 18)
# WHERE release_date < 1980;
# UPDATE albums
# SET artist ... | true |
8a38122476915856acafb8e66749abf06548ae58 | SQL | ramazanaras/SQLQueries | /ibrahimoz-sorgular/ibrahimoz-kumelemefonksiyonları.sql | ISO-8859-9 | 1,000 | 3.5 | 4 | [] | no_license | --Kmeleme fonksiyonlar:Birletirme,kesiim ve fark olmak zere 3'e ayrlr
--Farkl iki sorgu zerinde yukarda belirtilen ilemleri yapar.
--nemli bir kural vardr.Yukarda tm ilemlerde iki sorgudaki kolon says ve kolon tipleri ayn olmak zorundadr.
--Birletirme-->Union
--Fark -->Except
--Kesiim -->intersect
--Union:
--Tm car... | true |
f7c59b892921d68409c2830a4f47b4f5de090996 | SQL | helloitcluj/householdtrackerC1D | /ux/src/main/resources/createSchema.sql | UTF-8 | 407 | 3.453125 | 3 | [] | no_license | DROP SCHEMA PUBLIC CASCADE;
CREATE TABLE Users (
id INTEGER IDENTITY PRIMARY KEY,
username VARCHAR(50),
password VARCHAR (50),
disabled BOOLEAN
);
CREATE CACHED TABLE Expenses (
id INTEGER IDENTITY PRIMARY KEY,
amount DOUBLE,
date TIMESTAMP,
description VARCHAR(30),
userId IN... | true |
35e8a7302fc650e25934c6596e4c4d7488c14c68 | SQL | NelsonGomesNeto/BD1 | /Exercise 2/3.sql | UTF-8 | 161 | 3.375 | 3 | [] | no_license | select Especialidade.nome, count(Medico.especialidade)
from Especialidade
inner join Medico on Medico.especialidade = Especialidade.codEsp
group by Especialidade | true |
5ca41501035af7fbefeee6ce6590ea04ff6ff2f9 | SQL | mbarretogit/sql | /AJUSTE_RELATORIO_RPS.sql | UTF-8 | 4,633 | 3.359375 | 3 | [] | no_license | select
convert(varchar,c.COBRANCA) as COBRANCA,
ISNULL(C.ESTORNO,'N') AS COBRANCA_ESTORNADA,
isnull((select top 1 ld.descricao from LY_LANC_DEBITO ld join ly_item_lanc il on ld.LANC_DEB = il.LANC_DEB where COBRANCA = c.COBRANCA),'') as DESCRICAO,
c.ALUNO,
a.nome_compl as ALUNO_NOME,
isnull... | true |
aaa933767043c0c7c1027107aff1d174bdbbb7bf | SQL | EdenServer/eden-web | /sql/queries/samples/auctionhouse_entry.sql | UTF-8 | 496 | 3 | 3 | [
"ISC"
] | permissive |
SET @sellerName = 'Godmode';
SET @buyerName = 'Godmode';
SET @itemId = 1;
SET @stack = 0; -- 0 if single, otherwise it's a stack
SET @sellPrice = 42;
-- Add auction house entry
SET @seller = (SELECT charid FROM chars WHERE charname = @sellerName);
SET @date = UNIX_TIMESTAMP();
SET @sellDate = @date;
INSERT INTO serv... | true |
dfda74e0ee3e0673c196cc55d3bc53629b4ab6d6 | SQL | MarcoEncina/sqlslayer | /DBACentral/trunk/stage/SQLRestarts/hist.SQLRestarts_History.sql | UTF-8 | 740 | 3.15625 | 3 | [] | no_license | IF OBJECT_ID('hist.SQLRestarts_History','U') IS NULL
BEGIN
CREATE TABLE [hist].[SQLRestarts_History]
(
[SQLRestartHistoryID] INT IDENTITY(1,1) NOT NULL
,[HistServerID] INT NOT NULL CONSTRAINT [FK__SQLRestarts_History__HistServerID__ServerIDs__HistServerID] FOREIGN KEY REFERENCES [hist].[ServerInventory_Ser... | true |
969b9636635e0f192a9c8c6694765e4571dff091 | SQL | mcavanaugh/Summertime | /db/structure.sql | UTF-8 | 6,553 | 2.890625 | 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_cat... | true |
ac85c2b1ee3e033caa8365bff8f31d294fca72da | SQL | chenjuntao/jonoerp | /erp/SymmetricDS/symservice.sql | UTF-8 | 21,940 | 2.75 | 3 | [] | no_license | delete from sym_trigger_router;
delete from sym_trigger;
delete from sym_router;
delete from sym_channel where channel_id in ('item_channel', 'sale_channel');
delete from sym_node_group_link;
delete from sym_node_group;
delete from sym_node_identity;
delete from sym_node_security;
delete from sym_node_host;
de... | true |
58dea9f730a5d55930bcf6873dbd37950be6f4a1 | SQL | pabloIO/heroes-digitales | /database/scripts/heroes-digitales-no-users1.5.sql | UTF-8 | 2,572 | 3.3125 | 3 | [
"MIT"
] | permissive | -- phpMyAdmin SQL Dump
-- version 4.6.5.2
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Generation Time: Oct 02, 2017 at 06:28 PM
-- Server version: 10.1.21-MariaDB
-- PHP Version: 7.1.1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET... | true |
0f5860ab1912e6530c8fac61b8b0959e7507f2a3 | SQL | cwinchell2883/winchelldesign.com | /projects/phpwebsite/mod/categories/boost/install.sql | UTF-8 | 478 | 3.03125 | 3 | [] | no_license | -- @author Matthew McNaney <mcnaney at gmail dot com>
-- @version $Id: install.sql 5919 2008-06-04 15:44:22Z matt $
CREATE TABLE categories (
id int NOT NULL default 0,
title varchar(255) NOT NULL,
description text,
parent int NOT NULL default 0,
icon int NOT NULL default 0,
PRIMARY KEY (id)
);
CREATE TA... | true |
5ab445734d951d1975b750bc3b145f1f6b864077 | SQL | cisalpina/EV2021D22 | /sql/Export Voter Data.sql | UTF-8 | 1,226 | 2.84375 | 3 | [] | no_license | Select 'id','last_name ','first_name ','middle_initial ','street_address','apartment_number ','city ','zip_code ','zip_code_plus4 ','birth_date ','gender ','party ','party_other ','election_district ','assembly_district ','registration_date ','year_last_voted ','telephone ','email ','age ','SuperTriplePrime ','SuperTri... | true |
f60ab8f04ad23937d19e817ac1e61891d83e7ea4 | SQL | scharmory/sistemadevendas | /banco_bkp/controledevendas.sql | UTF-8 | 2,368 | 2.984375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.6.5.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: 07-Jun-2018 às 17:40
-- Versão do servidor: 10.1.21-MariaDB
-- PHP Version: 5.6.30
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SE... | true |
a2e0174a173539e2f181dd1dee32721075412be7 | SQL | silence-do-good/stress-test-Postgres-and-MySQL | /dump/high/day10/select0229.sql | UTF-8 | 178 | 2.65625 | 3 | [] | no_license |
SELECT timeStamp, temperature FROM ThermometerOBSERVATION o
WHERE timestamp>'2017-11-09T02:29:00Z' AND timestamp<'2017-11-10T02:29:00Z' AND temperature>=48 AND temperature<=77
| true |
8fc94facab89b263c9c4320acbe02531dcd3e773 | SQL | hillscottc/git-hill | /umg/RDx SQL/Stored Procedures/DRA/EntityRightsPeriodLoad/DRA.EntityRightsPeriodLoadUpdate.proc.sql | UTF-8 | 1,039 | 3.296875 | 3 | [] | no_license | -- ============================================
-- Description: Updates records in DRA.EntityRightsPeriod
-- =============================================
CREATE PROCEDURE DRA.EntityRightsPeriodLoadUpdate
AS
BEGIN
update DRA.EntityRightsPeriod
set
[ENTITY_CLEARANCE_SET_ID] = l.[ENTITY_CLEARANCE_SET_ID]
... | true |
a552e8e1c4daadef97e1ded032d02cdfd5955b4d | SQL | TamasNeumer/CodeFights-Arcade-Solutions-in-Java | /src/main/java/Database/84_tictactoeTournament.sql | UTF-8 | 2,866 | 4.3125 | 4 | [] | no_license | /* FROM https://codefights.com/challenge/XYuNi4cW3L7hQFB3T */
CREATE PROCEDURE tictactoeTournament()
SELECT
ELT(d, name_naughts, name_crosses) name,
sum((r=d)*2 + (r=3)) points,
sum(1) played,
sum(r=d) won,
sum(r=3) draw,
sum(r=3-d) lost
FROM
(SELECT
... | true |
c9c5c0338d71d47d8901233ed6b73768a64b2674 | SQL | StarNeit/SolarSpeedRack-Yii2 | /migrations/message.sql | UTF-8 | 2,111 | 3.6875 | 4 | [
"BSD-3-Clause"
] | permissive |
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
CREATE TABLE IF NOT EXISTS `message` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`user_id` int(11) NOT NULL,
`message` text,
`title` varchar(255) DEFAULT NULL,
`file` varchar(255) DEFAULT NULL,
`mark_read` tinyint(4) DEFAULT '1',
`status` tinyi... | true |
561de66e74ae2c86bec4867a41a054c3087308ae | SQL | skvimpact/VS | /dim/Costcenter_GetStage.sql | UTF-8 | 293 | 3.09375 | 3 | [] | no_license | -- exec [dwh].[Costcenter_GetStage]
CREATE PROCEDURE [dwh].[Costcenter_GetStage]
AS begin
set nocount on;
SELECT
d.Code,
d.[Name]
FROM
[Dimension Value] AS d
WHERE
(d.[Dimension Code] = 'COSTCENTER')
AND (d.[Dimension Value Type] <> 4)
end
| true |
904eb61a03519ae677a3cb22670043124338eb4e | SQL | openacs/dotlrn | /sql/oracle/applet-sc-create.sql | UTF-8 | 12,412 | 2.9375 | 3 | [] | no_license | --
-- Copyright (C) 2001, 2002 MIT
--
-- This file is part of dotLRN.
--
-- dotLRN is free software; you can redistribute it and/or modify it under the
-- terms of the GNU General Public License as published by the Free Software
-- Foundation; either version 2 of the License, or (at your option) any later
-- vers... | true |
6a83f6bad9508efe0ea4723204c440a40b60f775 | SQL | giathurton/SQL-Workshops | /Thurton_Lab_3.sql | UTF-8 | 1,347 | 4.125 | 4 | [] | no_license | CREATE DATABASE IF NOT EXISTS bank;
USE bank;
CREATE TABLE IF NOT EXISTS accounts(
account_id INT AUTO_INCREMENT PRIMARY KEY,
balance double,
account_type varchar(30),
date_opened datetime,
account_status varchar(30)
);
CREATE table IF NOT EXISTS transactions(
transaction_id int auto_increment primary key,
date_time... | true |
e48208960e5204959c73f05c3094cd1fb654a2ff | SQL | Ramuboorsu/scpwd | /dwsc_complaints.sql | UTF-8 | 22,158 | 3.078125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.0.10deb1ubuntu0.1
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Dec 13, 2018 at 07:31 AM
-- Server version: 5.5.62-0ubuntu0.14.04.1
-- PHP Version: 5.5.9-1ubuntu4.26
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARAC... | true |
be754754a94967d43644f6c1e9d42a50dd85e507 | SQL | YASH01009/Course-Projects | /DBMS_lab/08.02.2021_Lab_04/setup_q3.sql | UTF-8 | 488 | 3.625 | 4 | [] | no_license | -- creating tables
CREATE TABLE account (
acctno INT PRIMARY KEY,
name VARCHAR(32),
branch VARCHAR(32),
balance INT
);
CREATE TABLE transaction (
acctno INT NOT NULL,
tdate DATE NOT NULL,
amount INT NOT NULL,
FOREIGN KEY (acctno) REFERENCES account(acctno)
);
-- inserting tuples
INSERT ALL
INTO account(acct... | true |
067bdb91c46a5e975a7847e3bbda334735df38f7 | SQL | 3dlink/3dlinkweb | /Config/Schema/3dlink.sql | UTF-8 | 21,612 | 3.03125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.2.11
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Jul 27, 2016 at 12:13 AM
-- Server version: 5.6.21
-- PHP Version: 5.6.3
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
... | true |
c801b0ace9cbee07c12a8d4eb0f022d73b4cd8b4 | SQL | sprokushev/Delphi | /MASTER/_DATABASE/Views/V_TEMP_UNP_GARFIK_PARAMS.sql | UTF-8 | 554 | 3.21875 | 3 | [] | no_license | --
-- V_TEMP_UNP_GARFIK_PARAMS (View)
--
CREATE OR REPLACE FORCE VIEW MASTER.V_TEMP_UNP_GARFIK_PARAMS
(BEGIN_DATE, END_DATE, PROD_ID_NPR, PLAT_ID, DOG_NUMBER,
GRP_ID_NPR, FROM_GRP_ID, TO_GRP_ID)
AS
SELECT
r.BEGIN_DATE,
r.END_DATE,
r.PROD_ID_NPR,
r.PLAT_ID,
r.DOG_NUMBER,
r.GRP_ID_NPR,
(CASE WHEN GRP_I... | true |
466d40749f4edce02356441af7f8745ce3e92256 | SQL | alex94115/SocialEQ | /rodlaver/src/main/resources/sql/dbcr/20140812-dbcr.sql | UTF-8 | 25,135 | 3.90625 | 4 | [] | no_license | /* Make it possible to override the tweet rate limits on a client-by-client basis */
CREATE TABLE `seller_tweet_rate_limits` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`user_id` bigint(20) NOT NULL,
`per_ten_seconds` int(11) NOT NULL,
`per_five_minutes` int(11) NOT NULL,
`per_hour` int(11) NOT NULL,
`per_tw... | true |
ede4db92400e66e87398fb1149c51b6096fc4e1e | SQL | AndreSaxton/Kanban | /database.sql | UTF-8 | 1,914 | 3.640625 | 4 | [] | no_license | /*IF NOT EXISTS (SELECT * FROM sys.databases WHERE name = N'DBNAME')
BEGIN
CREATE DATABASE projkanban;
END;
*/
CREATE TABLE IF NOT EXISTS projkanban.collum(
cd_collum INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
nm_collum VARCHAR(50) NOT NULL,
cd_order_collum INT NOT NULL
);
... | true |
816a43ddedd1fbc8e73081d4ceaaf32783af2fc0 | SQL | greenlion/PHP-SQL-Parser | /tests/expected/creator/issue124.sql | UTF-8 | 67 | 2.984375 | 3 | [
"BSD-3-Clause"
] | permissive | SELECT t1.c1, t2.c2 FROM t1 LEFT JOIN t2 ON (LEFT(t1.c2,6) = t2.c1) | true |
2445a49c9cf5c1e11be3f09a412c88f270d564e2 | SQL | FirebirdSQL/x-cvs-vulcanj | /VulcanJ/ddl/nist/cdr011.sql | UTF-8 | 1,052 | 2.578125 | 3 | [] | no_license | SET NAMES ASCII;
CREATE DATABASE 'test.fdb' DEFAULT CHARACTER SET ISO8859_1;
INPUT ddl/input/sun-tab1.sql;
INSERT INTO STAFF_C VALUES('E1','Alice',12,'Deale',NULL);
INSERT INTO STAFF_C VALUES('E2','Betty',10,'Vienna','E1');
INSERT INTO STAFF_C VALUES('E3','Carmen',13,'Vienna','E2');
INSERT INTO STAFF_C VALUES('E4... | true |
2d5f3c348de86f4da03e93e67501b3a2402df626 | SQL | MarceloLeite2604/mercado | /sql/scripts/classes.sql | UTF-8 | 653 | 3.578125 | 4 | [] | no_license | CREATE TABLE classes (
stra_acco_owner VARCHAR2(64 CHAR) NOT NULL,
stra_currency VARCHAR2(4 CHAR) NOT NULL,
name VARCHAR2(256 CHAR) NOT NULL
)
LOGGING;
CREATE UNIQUE INDEX class_stra_acco_owner_stra_currency_name_idx ON
classes (
stra_acco_owner
ASC,
stra_currency... | true |
e01be567b745f9ab9950569aba52c6a3f712f45a | SQL | 52North/OpenSensorSearch | /service/src/test/resources/db/test.sql | UTF-8 | 940 | 3.40625 | 3 | [
"W3C",
"LicenseRef-scancode-warranty-disclaimer",
"SAX-PD",
"LicenseRef-scancode-unknown-license-reference",
"LGPL-2.1-or-later",
"GPL-2.0-only",
"MPL-2.0",
"BSD-3-Clause",
"LGPL-2.1-only",
"Apache-2.0",
"LicenseRef-scancode-public-domain",
"LicenseRef-scancode-other-permissive",
"CDDL-1.1",... | permissive | SELECT status.sensor_id_sir, status.property_name, status.property_value, status.uom, status.time
FROM sensor_service, service, sensor, phenomenon, sensor_phen, status
WHERE (((true)) AND ((true)) AND ((true)) AND ((true)) AND ((true)) AND ((true)) AND ((true))
AND (sensor.sensor_id_sir = sensor_service.sensor_id_si... | true |
06a44f1102f1bc59686679a94963562522e30e6b | SQL | anegramotnov/firebird_parser | /tests/sources/join_on.sql | UTF-8 | 1,704 | 3.171875 | 3 | [
"WTFPL"
] | permissive | begin
select 1
from rdb$database
where exists(select 1
from temp_rights t
left outer join lang_to_ter lt on (lt.ter_id = t.ter_id)
inner join ter_relations tr on tr.p_id = t.ter_id
and tr.p_isparent_to_t = 1
... | true |
d0995c58e7dfaec48ce4573ba5f17bbcda7c352c | SQL | JessieW0010/LighthouseBnB | /1_queries/most_visited_cities.sql | UTF-8 | 204 | 3.421875 | 3 | [] | no_license | -- Our product managers want a query to see a list of the most visited cities.
SELECT city, COUNT(*)
FROM reservations
JOIN properties ON properties.id = property_id
GROUP BY city
ORDER BY COUNT(*) DESC; | true |
19e4dacf6ef47c20dc81e14ad3d1255c2b545039 | SQL | asha365/aims-all-project | /Aims-365/Islam_(15-DEC-2018)_mvc_crud_aims365_01/Database/mvc_crud_aims365_01.sql | UTF-8 | 1,824 | 2.875 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.8.3
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Dec 15, 2018 at 01:38 PM
-- Server version: 10.1.37-MariaDB
-- PHP Version: 7.2.12
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OL... | true |
a805611148b811c777dc657ff657326cbfc6f982 | SQL | rong9x/Module-2-Java-Web-Back-end | /session9/create_PK_FK/script.sql | UTF-8 | 589 | 3.546875 | 4 | [] | no_license | create table customers (
customer_id int primary key auto_increment,
fullname varchar(255),
address varchar(255),
email varchar(100),
phone varchar(20)
);
create table accounts (
account_id int primary key auto_increment,
account_type varchar(40) default 'Normal',
day_create date,
balance double default 0,
customer_nu... | true |
0ae88792b7fbe9e1ba6b9bd78b4b9408d1b66862 | SQL | suhridbuddha/Clinical_Action_KD | /Sepsis_Bundle/src/ED_SI_LOC.sql | UTF-8 | 1,703 | 3.484375 | 3 | [] | no_license | /*******************************************************************************/
/*@file ED_SI_LOC.sql
/*
/*in: SI_case_ctrl,observation_fact, concept_dimension
/*
/*params: &&i2b2_db_schema, &&within_d
/*
/*out: ED_SI_LOC
/*
/*action: write
/*******************************************************************... | true |
4b3787597a8e247908678d7a8e143da3cafdf23d | SQL | ilich2/ilich2.github.io | /database.sql | UTF-8 | 513 | 2.53125 | 3 | [] | no_license | CREATE TABLE `users` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`email` varchar(255) DEFAULT NULL,
`password` varchar(255) DEFAULT NULL,
`level` enum('admin', 'user') NOT NULL,
`access` tinyint(4) NOT NULL,
`registrationDate` int(11) NOT NULL,
`code` varchar(255) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=Inno... | true |
4acfe808b0cd2cb8d690fcb91709a48b8a697002 | SQL | RasmusAgergaard/CodeSnippets | /SQL/Commands.sql | UTF-8 | 1,964 | 5 | 5 | [] | no_license | /* Create table */
CREATE TABLE Customer
(
Id INT PRIMARY KEY IDENTITY(1,1), -- Sets a primary key, starts with 1, and increse with 1
FirstName VARCHAR(50),
LastName VARCHAR(50),
Age INT,
City VARCHAR(50)
);
/* Insert */
INSERT INTO dbo.Customer (FirstName, LastName, Age) values ('Joey', 'Blue', 40... | true |
6d10efa4b9058e44797760c825ec61b450064b40 | SQL | bydan/pre | /erp_ejb/src_puntoventa/com/bydan/erp/puntoventa/resources/general/ComprobanteTarjeta_Postgres.sql | UTF-8 | 1,105 | 3.09375 | 3 | [
"Apache-2.0"
] | permissive | select f.fecha,
f.secuencial,
f.codigo_cliente,
f.nombre_cliente,
f.subtotal,
f.iva,
f.descuento,
f.financiamiento,
f.flete,
f.ice,
f.total,
(select nombre from puntoventa.caja c where id=f.id_caja)as nombre_caja,
... | true |
9c70c2644b7c2906790f544e7b2dcb154ad878ed | SQL | yensei/estoque | /db_estructura/database.sql | UTF-8 | 3,179 | 3.125 | 3 | [] | no_license | SET SQL DIALECT 3;
/* CREATE DATABASE 'C:\Users\julio\Documents\Workspace\Estoque\dados\ESTOQUE.GDB' PAGE_SIZE 4096
DEFAULT CHARACTER SET */
/* Table: BAIRRO, Owner: SYSDBA */
CREATE TABLE "BAIRRO"
(
"BAIRRO_CODIGO" INTEGER NOT NULL,
"BAIRRO_NOME" VARCHAR(30) NOT NULL,
CONSTRAINT "BAIRRO_PK" PRIMARY KEY ("BA... | true |
f2818c691053f1535dab98566154ba32387a7de9 | SQL | SkeathyTomas/site_selection | /sql code.sql | UTF-8 | 876 | 3.78125 | 4 | [] | no_license | -- build a table of features with id,lat,lng
-- join Starbucks with different feartures,need to change the second fearture
SELECT * From Starbucks,Mrt
--caculate distance in R
--check R script in R Studio
--caculate num of features of Starbucks
SELECT StarbucksId,
count(CASE WHEN distance <= 0.1 THE... | true |
a34fdeeb88cff40bd5c42215d0902ff2fdd440e0 | SQL | xxrepo/elite | /Scripts/0193.SQL | ISO-8859-1 | 15,783 | 3.65625 | 4 | [
"MIT"
] | permissive | /*
** ICMS NA TRANSFERENCIA
*/
ALTER TABLE TRANSFERENCIAS ADD ICMS PORCENTO;
UPDATE TRANSFERENCIAS SET ICMS = 0;
ALTER TABLE MOVESTOQUE DROP CONSTRAINT MOVESTOQUE_FK03;
UPDATE RDB$RELATION_FIELDS SET
RDB$FIELD_SOURCE = 'STR40_VALIDO'
WHERE (RDB$FIELD_NAME = 'STATUS') AND
(RDB$RELATION_NAME = 'MOVESTOQU... | true |
18b8569d56e50f1f5d6913cae3ded6c67cfe451c | SQL | symkat/OpenNewsWire | /Database/etc/schema.sql | UTF-8 | 4,304 | 3.9375 | 4 | [] | no_license | CREATE EXTENSION IF NOT EXISTS citext;
CREATE TABLE person (
id serial PRIMARY KEY,
name citext not null unique,
email citext unique,
is_enabled boolean not null default true,
c... | true |
d7cc0d3bd4c7b8b2524df487633fedaa8d540360 | SQL | tw-darkHorse/tw-rental-backend-on-boarding | /src/main/resources/db/migration/V20210816152025__create_house.sql | UTF-8 | 363 | 2.6875 | 3 | [] | no_license | CREATE TABLE IF NOT EXISTS `rental_database`.`house` (
`id` bigint(0) NOT NULL AUTO_INCREMENT,
`name` nvarchar(100) NULL,
`location` nvarchar(500) NULL,
`price` decimal(19,6) NULL,
`established_time` TIMESTAMP NULL,
`status` nvarchar(20) NULL,
`created_time` TIMESTAMP NULL,
`updated_time... | true |
2b6a29fed11bbfede4f4d0ba99db62cde04a6848 | SQL | freeman9998/MyCoding | /Itwill/04.DATABASE_REPORT/2021-01-19/정나리/04.SELECT-문자열함수REPORT.sql | UTF-8 | 1,330 | 4.03125 | 4 | [] | no_license | --1. Student 테이블에서 jumin 컬럼을 이용해서 1전공이 101번인 학생들의이름과 태어난월일,생일을 출력하시요
SELECT NAME,
SUBSTR(JUMIN, 3, 4) "Birthday"
FROM STUDENT WHERE DEPTNO1 = 101;
SELECT NAME,
CONCAT(CONCAT(SUBSTR(JUMIN, 3, 2), '월'), CONCAT(SUBSTR(JUMIN, 5, 2), '일')) "Birthday"
FROM STUDENT WHERE DEPTNO1 = 101;
--2. Student 테이블을 참조해서 1전공이(dept... | true |
4527dc67f16323b6ec0a8b459a62b4c57d9c9f49 | SQL | kumarRaj/dataBase | /exceptions.sql | UTF-8 | 1,180 | 3.5625 | 4 | [] | no_license | set verify off;
set serveroutput on;
declare
v_student_id number := &sv_student_id;
v_enrolled varchar2(3) := 'NO';
begin
dbms_output.put_line('Check if the student is enrolled');
select 'YES' into v_enrolled from enrollment
where student_id = v_student_id;
dbms_output.put_line('The student is enrolled into one ... | true |
65ed2a90a6f8b3c5b700bce510558790db0e4b0d | SQL | siddhantpandey/polytricks | /politrix-rating-app/bin/politrix.sql | UTF-8 | 1,277 | 2.515625 | 3 | [] | no_license | CREATE DATABASE politrix;
CREATE TABLE states (state varchar(20));
INSERT INTO states VALUES("Andhar Pradesh");
INSERT INTO states VALUES("Arunanchal Pradesh");
INSERT INTO states VALUES("Assam");
INSERT INTO states VALUES("Bihar");
INSERT INTO states VALUES("Chattisgarh");
INSERT INTO states VALUES("Goa");
INSERT IN... | true |
44c02cf1dc15fbeccd7575be56714ecbd8b4634d | SQL | dhavalfuerte/laptop-shop-php | /miracle/db/miracle_shop.sql | UTF-8 | 6,331 | 2.890625 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 3.1.3.1
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Sep 01, 2017 at 12:15 PM
-- Server version: 5.1.33
-- PHP Version: 5.2.9
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER... | true |
deef9fd87d2dbc716b0422090344ab78f4b008c4 | SQL | CeruttiMaicon/NetBeansProjects | /CURSO_EM_VIDEO_MySQL/Aula05.sql | UTF-8 | 318 | 2.5625 | 3 | [] | no_license |
use cadastro;
INSERT INTO Pessoas
( nome, nascimento, sexo, peso, altura, nacionalidade)
VALUES
('Maria', '1999-12-03', 'F', '55.2', '1.65', 'Portugal');
INSERT INTO Pessoas
( nome, nascimento, sexo, peso, altura, nacionalidade)
VALUES
('Creuza', '1920-12-03', 'F', '50.2', '1.65', DEFAULT);
select * from pessoas; | true |
90e4eed57f29f0f0a100023cfd371f1ecf2e77fa | SQL | tom750407/Oracle | /20180916/上課材料/練習/05多表查詢/lab5_1.sql | UTF-8 | 278 | 3.765625 | 4 | [] | no_license | SELECT last_name, department_id, department_name
FROM employees JOIN departments USING (department_id);
---------------------------------------------
SELECT a.last_name, a.department_id, b.department_name
FROM employees a, departments b
WHERE a.department_id = b.department_id;
| true |
5febbc95762e315f82af5b33ba53b2f1a1a9d9f8 | SQL | samlafell-SQL/SQL | /SQL Mastery Course/Transactions/01_Transactions.sql | UTF-8 | 666 | 2.546875 | 3 | [] | no_license | -- Transactions
/*
A group of SQL statements that represent a single unit of work
Bank Transactions -- Transfer $10 from your account to your friend
Two operations -- Withdrawl and Deposit.
Both operations should complete successfully, and if not, neither operation should occur
ACID Properties
-- Atomicity: Unb... | true |
c3e16956e2b734e53bfede26aca22bda01b06aba | SQL | hamzah2894/Project-Database_Foundations_for_Business_Analytics | /Code.sql | UTF-8 | 3,783 | 4.125 | 4 | [] | no_license | create database Nurses_DB
use Nurses_DB;
create table Nurses_DB.Nurses_OP.Doctor (
D_EmployID VARCHAR (50) PRIMARY KEY,
D_FirstName VARCHAR (50) NOT NULL,
D_LastName VARCHAR (50) NOT NULL,
D_PhoneNum VARCHAR (50) NOT NULL,
D_Address VARCHAR (255) NOT NULL
);
create table Nurses_DB.Nurses... | true |
96c652d8194202185b5c56118e475cf555c5cf39 | SQL | IlyaMarkevichV/ISchedule | /Schedule/be/sql/schema.sql | UTF-8 | 4,657 | 4.15625 | 4 | [] | no_license | create
database
project;
use
project;
create table user_role
(
role_id smallint not null auto_increment,
role_name varchar(30) not null,
primary key (role_id)
);
create table user_account
(
account_id bigint not null auto_increment,
login varchar(30) not null,
account_passwo... | true |
d878966582b0aadaf01142149795b9eecb972256 | SQL | amcheyre-nw/Invisible-Institute-Chicago-Reporter-Collaboration-Public | /The Spectacular Sailors/Checkpoint_1/src/scrach files.sql | UTF-8 | 1,519 | 3.921875 | 4 | [] | no_license |
/* Milan's Space
SELECT disciplined FROM officers_cohorts_data
where
disciplined IS Null
or disciplined = 'False';
DROP TABLE IF EXISTS officers_cohorts_data;
CREATE TEMP TABLE officers_cohorts_data AS (
SELECT "oc".officer_id,
"oc".crew_id,
"oc".community_id,
"oc".cohort,
... | true |
07ba6266f4a4e0a07a4332fbcf074ad1c9044370 | SQL | Vikt33/new_home | /New_bd.sql | UTF-8 | 1,199 | 3.28125 | 3 | [] | no_license | CREATE TABLE IF NOT EXISTS Genre (
Id SERIAL PRIMARY KEY,
Title VARCHAR(30) UNIQUE NOT NULL
);
CREATE TABLE IF NOT EXISTS Performers (
Id SERIAL PRIMARY KEY,
Name VARCHAR(30) NOT NULL
);
CREATE TABLE IF NOT EXISTS Albums (
Id SERIAL PRIMARY KEY,
Title VARCHAR(30) NOT NULL,
Year_release INTE... | true |
2ad473268528fa3436f286ab56bf5924cc3e9233 | SQL | daodhoa/doan3 | /ngohoa_hoctap.sql | UTF-8 | 30,145 | 3.171875 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.5.4.1deb2ubuntu2.1
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Dec 19, 2018 at 12:39 AM
-- Server version: 5.7.24-0ubuntu0.16.04.1
-- PHP Version: 7.0.32-0ubuntu0.16.04.1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD... | true |
a804cb80db167ecac8a0a6a3cd7e4f12f4039713 | SQL | WslyStvnChng/Bamazon | /bamazon.sql | UTF-8 | 1,819 | 3.0625 | 3 | [] | no_license | DROP DATABASE IF EXISTS bamazonDB;
CREATE DATABASE bamazonDB;
USE bamazonDB;
CREATE TABLE products (
id INT AUTO_INCREMENT NOT NULL,
item_id INT NOT NULL,
product_name VARCHAR(50),
department_name VARCHAR(20),
price DECIMAL(10,2) NOT NULL,
stock_quantity INTEGER(10),
PRIMARY KEY(id)
);
#MO... | true |
42fa4c9f28bf10b61f7aa9a2157cb847eb001fd2 | SQL | mrRodrigo/Spring-Boot-API | /src/main/resources/db/migration/mysql/V1__init.sql | UTF-8 | 2,200 | 3.65625 | 4 | [] | no_license | CREATE TABLE `company` (
`id` bigint(20) NOT NULL,
`cnpj` varchar(255) NOT NULL,
`update_date` datetime NOT NULL,
`create_date` datetime NOT NULL,
`name` varchar(255) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE `worker` (
`id` bigint(20) NOT NULL,
`cpf` varchar(255) NOT NULL,
... | true |
a8ad243ac6077ce3ddafd216e3447157bedc1d8f | SQL | emoalb/MYSQL_QUERIES | /CRUD/soft_uni_database_select_all_departments_fileds.sql | UTF-8 | 1,968 | 4 | 4 | [] | no_license | USE `soft_uni`;
SELECT * FROM `departments`
ORDER BY `department_id`;
SELECT `name` FROM `departments`
ORDER BY `department_id`;
SELECT `first_name`, `middle_name`,`last_name` FROM `employees`
ORDER BY `employee_id`;
SELECT concat(`first_name`,'.',`last_name`,'@softuni.bg') AS `full_email_address`
FROM `employees` O... | true |
76cc3a9e0225f10fcbf62324e74b88b11ff02a6f | SQL | postgresqlacademy/pwaf | /pwaf-core/src/00_pwaf/00_system/40_sequence.sql | UTF-8 | 367 | 3.015625 | 3 | [
"MIT"
] | permissive | --
DO
$body$
BEGIN
IF NOT EXISTS (
SELECT 1 FROM pg_type JOIN pg_namespace ON typnamespace=pg_namespace.oid WHERE nspname='pwaf' AND typname='g_seq'
) THEN
CREATE SEQUENCE pwaf.g_seq
INCREMENT 1
MINVALUE 1
MAXVALUE 9223372036854775807
START 1000000
CACHE 1;
END IF;
END
$body$... | true |
e8038e181dc22995adf3f86637f0908ae3bd944d | SQL | swarm64/pg-wat | /sql/schema.sql | UTF-8 | 2,640 | 3.28125 | 3 | [
"MIT"
] | permissive | CREATE TABLE query_plans(
db VARCHAR(255)
, ts TIMESTAMPTZ
, query_name VARCHAR(255)
, plan JSON
);
CREATE TABLE pgwat.query_node_stats(
id BIGSERIAL PRIMARY KEY
, query_name VARCHAR(100)
, db_name VARCHAR(100)
, plan_id UUID
, node_id INTEGER
, node_type VARCHAR(100)
, custom_plan_provider V... | true |
db81f7ca8c6fa084a542a8fbc0bae746fdbc4de7 | SQL | SvistunDM/otus-mssql-2020-06SvistunDM | /HW08-Pivot/HW08_pivot.sql | UTF-8 | 6,404 | 3.96875 | 4 | [] | no_license | /*Pivot и Cross Apply
1. Требуется написать запрос, который в результате своего выполнения формирует таблицу следующего вида:
Название клиента
МесяцГод Количество покупок
Клиентов взять с ID 2-6, это все подразделение Tailspin Toys
имя клиента нужно поменять так чтобы осталось только уточнение
например исходное Tails... | true |
4c49f2aa004c754f7de99d358899a88309860a91 | SQL | manuelhe/car-showroom | /docs/test_carshowroom.sql | UTF-8 | 2,784 | 3.140625 | 3 | [
"Unlicense"
] | permissive | -- MySQL dump 10.13 Distrib 5.5.29, for osx10.6 (i386)
--
-- Host: localhost Database: test_carshowroom
-- ------------------------------------------------------
-- Server version 5.5.29
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULT... | true |
4da55e2d614a752458d60dc4ba1e143df27bbe05 | SQL | Khush-08/sparkbanksystem | /customers.sql | UTF-8 | 2,691 | 3.390625 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.7.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Jun 10, 2021 at 09:20 AM
-- Server version: 10.1.30-MariaDB
-- PHP Version: 7.2.1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD... | true |
30684fc0e5decced3b31cee444c2c3a28238046f | SQL | JessicaMedina/Parcial | /db/baseD.sql | UTF-8 | 5,022 | 3.140625 | 3 | [] | no_license | create database baseD;
use baseD;
CREATE TABLE `usuarios` (
`id` int(10) NOT NULL,
`nombre` varchar(255) NOT NULL,
`apellido` varchar(255) NOT NULL,
`genero` varchar(20) NOT NULL,
`email` varchar(255) NOT NULL,
`clave` varchar(255) NOT NULL,
`cargo` varchar(1) NOT NULL
) ENGINE=InnoDB... | true |
3a789d63d69e864f2ec867e8a4a4a430070401a8 | SQL | qornanali/simple-sinatra | /docker/update_database_schema.sql | UTF-8 | 691 | 2.890625 | 3 | [] | no_license | CREATE DATABASE IF NOT EXISTS `food_oms_development`;
GRANT ALL ON `food_oms_development`.* TO 'foo'@'%';
USE food_oms_development;
DROP TABLE IF EXISTS `foods`;
CREATE TABLE `foods` (
`id` int(11) AUTO_INCREMENT NOT NULL,
`name` varchar(255) DEFAULT NULL,
`price` int(11) DEFAULT NULL,
PRIMARY KEY (`id`)
) E... | true |
cea6e3424ee0804b25bc02c6217c0f3ab430a130 | SQL | shafin071/SQL_Practice | /SQL Advanced Course/section 4/excercise_traffic_source_trending.sql | UTF-8 | 261 | 3.6875 | 4 | [] | no_license |
SELECT
MIN(DATE(created_at)) AS week_start_date,
COUNT(distinct website_session_id) as sessions
FROM
website_sessions
WHERE created_at < '2012-05-10' AND utm_source = 'gsearch' AND utm_campaign = 'nonbrand'
GROUP BY YEAR(created_at), WEEK(created_at)
;
| true |
0678a1440ae6d617c95c37674f7575558958eb31 | SQL | ChLang0508/book | /src/main/resources/sql/sql.sql | UTF-8 | 4,217 | 3.578125 | 4 | [] | no_license | /* ---------------------------------------------------- */
/* Generated by Enterprise Architect Version 15.0 */
/* Created On : 10-3月-2020 00:46:23 */
/* DBMS : MySql */
/* ---------------------------------------------------- */
SET FOREIGN_KEY_CHECKS=0
;
/* Drop Tables */
DROP TABLE IF EXISTS `... | true |
6ff25a6c1581be7708dee9033e24fa552d0b2460 | SQL | ShiboXing/Database_Stuff | /SQL_review/hw2-sample-data.sql | UTF-8 | 7,151 | 2.8125 | 3 | [] | no_license |
----------------------------------------
--- Sample Data ---
----------------------------------------
SET TRANSACTION READ WRITE;
INSERT INTO TECH_PERSONNEL values(1110001, 'Bob','Hoffman','bh1','Unix systems','412-624-8404',1110001);
INSERT INTO TECH_PERSONNEL values(1110002, 'Terry','Wood','tw1','Hardware','412-62... | true |
8f6f8ddc6075220e50a61858546918b420356bf9 | SQL | AlbertoHV23/PSM | /doubts/doc/Tables.sql | UTF-8 | 1,205 | 3.484375 | 3 | [] | no_license | CREATE TABLE IF NOT EXISTS tbl_usuario (
id_usuario INT AUTO_INCREMENT,
nombre VARCHAR(256) NULL,
apellidos VARCHAR(256) NULL,
email VARCHAR(256) NOT NULL,
contrasena VARCHAR(256) NOT NULL,
avatar BLOB NULL,
PRIMARY KEY (id_usuario)
);
CREATE TABLE IF NOT EXISTS tbl_categoria (
... | true |
13a7194f9761ff3aa105fdcae9ccb4b80e4c414f | SQL | mgvit2021/Vanswer-website | /website.sql | UTF-8 | 10,115 | 3.078125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.7.9
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1:3306
-- Generation Time: Apr 21, 2019 at 12:24 PM
-- Server version: 5.7.21
-- PHP Version: 5.6.35
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CH... | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.