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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
682744b14ff870dbeca05f3f8a1fa4f342e2367b | SQL | ricknussell31/Fall-2014-CMPT308-Database | /Final Database Project Scripts TEMP.sql | UTF-8 | 21,497 | 3.34375 | 3 | [] | no_license | --Nicholas Russell--
--Professor Labouseur --
--Final Database Project: World Cup 2014--
--create teams table --
drop table teams;
create table countries(
cid text NOT NULL PRIMARY KEY,
country text UNIQUE,
qualifyingZone text,
preWorldCupRanking int,
postWorldCupRanking int,
timesInWCIncluding2014 int
);
... | true |
b56b7bd13c76e4399a195e758fc3bd228a166394 | SQL | marcoliverteschke/kloenschnack | /sql/0004.sql | UTF-8 | 144 | 2.578125 | 3 | [] | no_license | ALTER TABLE posts ADD COLUMN user_id INT NOT NULL REFERENCES users(id);
ALTER TABLE files ADD COLUMN user_id INT NOT NULL REFERENCES users(id);
| true |
17f8ca7f66b881215744cb8fe042335562116417 | SQL | leodockerhub/leo | /todoVal.sql | UTF-8 | 1,647 | 3.40625 | 3 | [] | no_license | CREATE TABLE lists (
`id` INT UNSIGNED NOT NULL auto_increment,
`uuid` CHAR(36) NOT NULL default '',
`ow` INT NOT NULL default 0,
`name` VARCHAR(50) NOT NULL default '',
`d_created` INT UNSIGNED NOT NULL default 0,
`d_edited` INT UNSIGNED NOT NULL default 0,
`sorting` TINYINT UNSIGNED NOT NULL default 0,
`publi... | true |
ba569e9c874cb33a0ad636ce871e69e0eb173cc3 | SQL | profchiso/nig-e-vote | /db/nimc (2).sql | UTF-8 | 11,199 | 3.140625 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.8.0.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Sep 08, 2019 at 07:17 AM
-- Server version: 10.1.32-MariaDB
-- PHP Version: 5.6.36
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @... | true |
0a199aef010f62622a91fbd21c1980bad13df673 | SQL | AlbLioDam/Serveur_Rest | /Script suricat FINAL.sql | UTF-8 | 28,967 | 3.296875 | 3 | [
"MIT"
] | permissive | #------------------------------------------------------------
# Script MySQL.
#------------------------------------------------------------
DROP DATABASE IF EXISTS suricat;
CREATE DATABASE IF NOT EXISTS suricat;
USE suricat;
#------------------------------------------------------------
# Table: Users
... | true |
91a244d424a9112d24e4eeff0f02ca4c15ec3b55 | SQL | vitalik-lapushkin/telegramFSBsnitchBot | /src/resources/dbScripts/script.sql | UTF-8 | 221 | 2.734375 | 3 | [] | no_license | create schema fsb_snitch_bot;
create table fsb_snitch_bot.users(
id integer CONSTRAINT userPK PRIMARY KEY,
username varchar(150),
alias varchar(150),
rating integer CHECK (rating>=0) default 0
);
| true |
3b4e1d780a40d0bd6670c2e24499c22ed9acfc50 | SQL | zhaoy1992/xtbg-whtjy-new | /.svn/pristine/3b/3b4e1d780a40d0bd6670c2e24499c22ed9acfc50.svn-base | UTF-8 | 1,019 | 3.421875 | 3 | [] | no_license | -- Create table
create table TA_OA_TRAIN
(
TR_ID VARCHAR2(40) not null,
TR_LEVEL VARCHAR2(100),
TR_TITLE VARCHAR2(200),
TR_CONTENT VARCHAR2(2000),
TR_TIME DATE,
TR_HOUR NUMBER,
TR_ADDRESS VARCHAR2(200),
TR_MONEY NUMBER,
TR_USERSN VARCHAR2(40)
);
-- Add comments to the co... | true |
1007f623d9bab5596afb88e98a21b1466aad6705 | SQL | drishh207/Paytm-Database | /SQL dump/paytm_metro_locations.sql | UTF-8 | 2,559 | 3.0625 | 3 | [] | no_license | -- MySQL dump 10.13 Distrib 8.0.21, for Win64 (x86_64)
--
-- Host: localhost Database: paytm
-- ------------------------------------------------------
-- Server version 8.0.21
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40... | true |
8313cf55055dd3c6db1b72491397445ec47e303a | SQL | DianaSanchezOrdonez/NEST-Nerdery-Challenge | /prisma/migrations/20210619045134_create_table_user/migration.sql | UTF-8 | 560 | 3.609375 | 4 | [] | no_license | -- CreateEnum
CREATE TYPE "Role" AS ENUM ('MANAGER', 'CLIENT');
-- CreateTable
CREATE TABLE "User" (
"id" SERIAL NOT NULL,
"first_name" TEXT NOT NULL,
"last_name" TEXT NOT NULL,
"email" VARCHAR(255) NOT NULL,
"password" TEXT NOT NULL,
"email_verified" BOOLEAN NOT NULL DEFAULT false,
"userna... | true |
6a3874555f3dd1587b13a9aeddcfc2d1b0d7de46 | SQL | hoquangnam45/CSDLTH2 | /sql file/Import course basic information.sql | UTF-8 | 3,863 | 2.84375 | 3 | [] | no_license | -- nhập Course
INSERT INTO Course_table VALUES ('000000014','Machine learning', 'Lorem ipsum dolor sit amet',0,100,'crignall1',0);
INSERT INTO Course_table VALUES ('000000015','Database 101','Lorem ipsum dolor sit amet',0,1000,'rabbs7',1);
INSERT INTO Course_table VALUES ('000000016','Financial 101','Lorem ipsum dolor... | true |
b47f87395e1f80c5484aade188e173eddd9b2ad3 | SQL | Jlima2016306/Tonys-kinal | /base de datos/DBTonysKinal2016306_.sql | UTF-8 | 34,359 | 3.640625 | 4 | [] | no_license | #Julio Samuel Isaac Lima Donis
drop database if exists DBTonysKinal2016306;
create database DBTonysKinal2016306;
use DBTonysKinal2016306;
###########################################################
###########################################################
################ EMPRESAS ############################... | true |
bfdd5db3c2c05ab7895747bae0501e80aa1a19a6 | SQL | seeRoseCode/SQL-bear-organizer-lab-atlanta-web-042219 | /lib/insert.sql | UTF-8 | 995 | 2.578125 | 3 | [
"LicenseRef-scancode-unknown-license-reference",
"LicenseRef-scancode-public-domain"
] | permissive |
INSERT INTO bears(name, age, gender, color, temperament, alive)
VALUES ("Mr. Chocolate", 5, "male", "brown", "hungry", TRUE);
INSERT INTO bears(name, age, gender, color, temperament, alive)
VALUES ("Rowdy", 1, "male", "black", "hungry", TRUE);
INSERT INTO bears(name, age, gender, color, temperament, alive)
VALUES ("... | true |
feb4a1ec32ed7f2200923d2568ed7af251b2391c | SQL | ProgRB/SalProject | /AddRetention/Queries/Rep_SalaryTransferImportToXml.sql | WINDOWS-1251 | 3,269 | 3.265625 | 3 | [] | no_license | with v_cartulary as
(
select owner_family, owner_name, owner_middle_name, number_account,
sum(sum_sal) sum_sal
from
{1}.view_SALARY_transfer
join {0}.transfer using (transfer_id)
join {1}.client_account using (client_account_id)
join {1}.type_bank using... | true |
ef0d79cb72154a81b4ef4e523b811a93b64bbbee | SQL | smarek/dotacni-parazit | /SQL/splatka_kalendar.sql | UTF-8 | 869 | 3.375 | 3 | [] | no_license | CREATE TABLE `splatka_kalendar` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`about` varchar(150) COLLATE utf8_bin NOT NULL,
`castkaSplatkaPlanovana` decimal(10,2) DEFAULT NULL,
`castkaSplatkaSkutecna` decimal(10,2) NOT NULL,
`uroceniIndikator` varchar(5) COLLATE utf8_bin DEFAULT NULL,
`zaznamAktualizaceDatumCas... | true |
2b147cc9a0e830326438b1fe115de1c3126fb058 | SQL | marksniper/SpringHibernateSemantic | /db/createDBFromModel.sql | UTF-8 | 3,907 | 3.375 | 3 | [
"MIT"
] | permissive | -- MySQL Workbench Forward Engineering
SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0;
SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0;
SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTI... | true |
f971789d88546f335f85563f2c1605035ac0699d | SQL | parkseoeun5322/Class_Example | /Oracle/수업자료/2020_05_28_DB_lecture.sql | UHC | 16,336 | 4.5 | 4 | [] | no_license | ǥ : ''(Ȭǥ )
ڵͿ ¥ʹ Ȭǥ('') ǥؾ Ѵ.
ڵʹ ҹڸ Ѵ.
07. King
, ̸, μڵ ȸ
SELECT employee_id, first_name, last_name
FROM employees
WHERE last_name = 'King'; -- King;
--⺻ ¥ ȸ
ý ¥ ȯϴ Լ - SYSDATE
ٸ Լʹ ĶͰ () .
SELECT *
FROM v$nls_parameters;
SELECT VALUE
FROM NLS_SESSION_PARAMETERS
WHERE PARAMETER = 'NLS_DATE_FORM... | true |
33eb7ed33323344c6995311593d928d56c883163 | SQL | PhilCR/web-trocaverde.com | /BD/17_jadder_5.sql | UTF-8 | 964 | 3.375 | 3 | [] | no_license | USE trocaverde;
DROP PROCEDURE atualiza_cliente;
DELIMITER |
CREATE PROCEDURE atualiza_cliente(app_email1 VARCHAR(70), app_nome VARCHAR(200), app_snome VARCHAR(50), app_tel VARCHAR(11),
app_celular VARCHAR(11), app_data_nasc DATE, app_email2 VARCHAR(70), app_cpf VARCHAR(11),
app_rua VARCHAR(200), app_num INTEGER... | true |
c01dd361e5ba8345b29ae2dd9a1414e3363dc61a | SQL | kgalieva/cinarra | /cassandra-service/src/main/resources/auction.cql | UTF-8 | 317 | 3.140625 | 3 | [] | no_license | CREATE TABLE auction.product_transactions (
product_id text,
transaction_date bigint,
transaction_id text,
win_price decimal,
PRIMARY KEY((product_id, transaction_date), transaction_id)
);
CREATE TABLE auction.products (
transaction_date bigint,
product_id text,
PRIMARY KEY(transaction_date, product_id)
);
| true |
71578984a045bc7c8d5bd46b3299400b37f2b225 | SQL | DashaDasha88/grid | /server/db/db.sql | UTF-8 | 1,309 | 2.9375 | 3 | [] | no_license | CREATE TABLE plants (
id SERIAL PRIMARY KEY NOT NULL,
name VARCHAR(50) NOT NULL,
genus_species VARCHAR(50) NOT NULL,
description TEXT
);
INSERT INTO plants (name, genus_species, description) VALUES ('Common Sage', 'Salvia officinalis', 'Fragrant herb, member of the mint family, native to the Mediterranean');
I... | true |
a73d3410dfe5bfb9362e8fb86a97ca698569f7d4 | SQL | IgorGato/MySQL-Banco-de-Dados- | /AULA1/exemplo_sql.sql | UTF-8 | 1,070 | 3.59375 | 4 | [] | no_license | -- criar banco de dados
create database db_servico_rh;
-- acesso ao db
use db_servico_rh;
-- cria uma tabela
create table tb_funcionario(
id bigint(5) auto_increment,
nome varchar(255) not null,
salario float not null,
idade int not null,
primary key(id)
);
-- busca da tabela funcionario
select * from tb_funcion... | true |
545ffcd8e06678ebd54751dd8c5f2ec240e0da50 | SQL | chenqifeng92/JavaDemos | /ServletJspCurd/src/main/webapp/workers_mysql.sql | UTF-8 | 557 | 3.46875 | 3 | [] | no_license | -- 创建一个id主键自增,带表注释的workers表
CREATE TABLE workers (id INT(10) NOT NULL AUTO_INCREMENT PRIMARY KEY,
name VARCHAR(20) COMMENT '姓名',
salary DOUBLE(10,2) COMMENT '工资,精确到小数点后两位',
age INT(10) COMMENT '年龄');
-- 插入数据
INSERT INTO workers (name,salary,age) VALUES ('杜雯',55000.00,28);
-- 删除数据
DELETE FROM workers WHERE id=?;
-- ... | true |
4be3e531d94906442981dd94f096c172171e6c8f | SQL | reginapilip/upload-app | /inc/db/user-registrations.sql | UTF-8 | 2,259 | 3.125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.8.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: May 09, 2019 at 07:41 PM
-- Server version: 10.1.37-MariaDB
-- PHP Version: 7.3.0
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD... | true |
9fe755664fdddf7dc79f7017d500ee1220a06676 | SQL | pingting420/LeetCode_SQL_Solutions | /Medium/LC1285. Find start and end number of consective.sql | UTF-8 | 155 | 3.328125 | 3 | [] | no_license | select min(log_id) as start_id, max(log_id) as end_id
from
(select log_id, log_id - rank_over()partition(order by log_id) as diff
from Logs)
group by diff
| true |
2f80931bc63c86668e991f4320d8de25443caa8c | SQL | jobovy/segue-maps | /sql/kdwarf.sql | UTF-8 | 1,836 | 2.734375 | 3 | [] | no_license | select spp.mjd, spp.plate, spp.fiberID,
s.ra as RA, s.dec as Dec, s.b as b, s.l as l, spp.ebv,
s.psfMag_u as u, s.extinction_u as ext_u,
s.psfMag_u-s.extinction_u as dered_u, s.psfMagErr_u as u_err,
s.psfMag_g as g, s.extinction_g as ext_g,
s.psfMag_g-s.extinction_g as dered_g, s.psfMagErr_g as g_err,
s.psfMag_... | true |
8aa3453d6a6016f85ae98622154d15690f460bec | SQL | OHDSI/Vocabulary-v5.0 | /working/packages/vocabulary_pack/py_git_release.sql | UTF-8 | 1,023 | 3.140625 | 3 | [
"Unlicense"
] | permissive | CREATE OR REPLACE FUNCTION vocabulary_pack.py_git_release(git_repo text, release_title text, release_body text, release_tag text, git_token text)
RETURNS text AS
$BODY$
#A small script for publishing a release on GitHub
#Returns the release_id if success
import json
from urllib.request import urlopen, Request
... | true |
7ff9741c7879b4c17258d35d6ad6730e385aa764 | SQL | vmware-archive/greenplum-5-introduction-workshop | /workshop-exercises/Workshop/01_Create_Tables/02_create_load_table.sql | UTF-8 | 3,280 | 2.84375 | 3 | [
"Apache-2.0"
] | permissive | /* *******************************************************************************************************
Copyright (C) 2019-Present Pivotal Software, Inc. All rights reserved.
This program and the accompanying materials are made available under the terms of the under the Apache
License, Version 2.0 (the "License"); y... | true |
de88ed01785ff94256ec370a8e73204003cf390a | SQL | patricknaka/Nova | /Views Bunzl/VW_BZL_DEV_DEVOLUCAO.sql | UTF-8 | 8,784 | 3.15625 | 3 | [] | no_license | SELECT
-- O campo CD_CIA foi incluido para diferenciar NIKE(13) E BUNZL(15)
--**********************************************************************************************************************************************************
CAST((FROM_TZ(TO_TIMESTAMP(TO_CHAR(cisli940dev.t$rcd_utc, 'DD-MON-YYYY HH24:MI:SS'), ... | true |
64d360f52ae0f06c69dce4e7c3ba65eb4e608875 | SQL | DanAlbert/whdsched | /scripts/schema.mysql.sql | UTF-8 | 3,016 | 3.765625 | 4 | [] | no_license | CREATE TABLE consultants
(
id INT NOT NULL AUTO_INCREMENT,
first_name VARCHAR(40) NOT NULL,
last_name VARCHAR(40) NOT NULL,
engr VARCHAR(20) NOT NULL,
phone VARCHAR(10) NOT NULL,
preferred_email VARCHAR(255) DEFAULT NULL,
max_hours INT NOT NULL DEFAULT 20,
recv_nightly BOOLEAN NOT NULL DEFAULT 1,
recv_instant ... | true |
ad777ec73eb915d0d393fa9a0f346836763432f0 | SQL | kknd9819/blog | /src/main/java/com/zz/blog/tables.sql | UTF-8 | 317 | 2.515625 | 3 | [] | no_license | drop table if exists `t_article`;
create table `t_article` (
`id` int not null auto_increment,
`title` varchar(36) not null,
`summary` varchar(100) not null,
`content` text not null,
`img_url` varchar(40),
`create_date` datetime not null,
PRIMARY key(`id`)
) ENGINE=INNODB DEFAULT charset = 'utf8mb4';
| true |
eb9447c13d6162b8fcdc367f3b80eac8c957c43b | SQL | zhengbingyanbj/JavaSE | /JavaEE就业班多线程和数据库/作业题1/day20_work/答案/test02.sql | UTF-8 | 3,889 | 4.59375 | 5 | [] | no_license | 需求1:多表练习
1.1:为甚么使用多表操作?
答:为了使数据的使用和维护更加的方便
3.2:表与表之间如何产生联系?
答:表与表之间依靠外键产生联系。
3.3:多表关系中是存在主表和从表的,那么什么是主表,什么是从表。
答:
主表 :数据来源表,主键ID所在的表
例如:分类表----是分类名称数据的来源表,主键CID所在表
从表: 数据引用表,外键所在的表
例如:商品表---引用了分类表数据,外键category_cid所在表
3.4:外键的特点?
从表外键指向了主表的主键。
从表的外键的数据类型和长度 与主表的主键的数据类型一致。
3.5:什么是外键约束?
... | true |
836752d71c2d5e9d91802e4368a454fd16523b57 | SQL | SPDEVGUY/VotingInfoWebsite | /VotingInfo/Database/SQL/Alter/04-Views/Client/Candidates.sql | UTF-8 | 479 | 3.140625 | 3 | [
"MIT"
] | permissive | CREATE VIEW [Client].[Candidates] WITH SCHEMABINDING
AS
SELECT
C.[CandidateId],
C.[ContentInspectionId],
C.[CandidateName],
C.[OrganizationId],
CI.[IsArchived],
CI.[IsBeingProposed],
CI.[ProposedByUserId],
CI.[ConfirmedByUserId],
CI.[FalseInfoCount],
CI.[TrueInfoCount],
CI.[AdminInpsected],
CI.... | true |
98c3c993a1679c5ecd67fae8dad1fca1bd2b29ed | SQL | Falcomfr/Cours-obj-3w | /Sql/exportPopo.sql | UTF-8 | 4,452 | 3.0625 | 3 | [] | no_license | -- MySQL dump 10.16 Distrib 10.1.31-MariaDB, for Win32 (AMD64)
--
-- Host: localhost Database: popo
-- ------------------------------------------------------
-- Server version 10.1.31-MariaDB
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_R... | true |
7ed750204bb91c54befca1eeb3cc5861cb028ed5 | SQL | NTXpro/NTXbases_de_datos | /DatabaseNTXpro/ERP/Stored Procedures/Procs1/Usp_Sel_MovimientoTesoreria_Borrador.sql | UTF-8 | 852 | 3.75 | 4 | [] | no_license | CREATE PROC [ERP].[Usp_Sel_MovimientoTesoreria_Borrador]
@IdEmpresa INT
AS
BEGIN
SELECT MT.ID,
MT.Orden,
ETD.NumeroDocumento,
MT.Nombre NombreMovimiento,
CTM.Nombre NombreCategoriaMovimiento,
MT.Fecha,
MT.IdTipoMovimiento,
CASE WHEN MT.IdTipoMovimiento = 1 THEN --INGRE... | true |
600db4eb7285ab4d414925770929667114a533e5 | SQL | ZVlad1980/pipelined_exam | /sql/Views/pension_agreements_v.sql | UTF-8 | 1,342 | 3.140625 | 3 | [] | no_license | create or replace view pension_agreements_v as
select bcn.fk_document fk_base_contract,
cn.fk_document fk_contract,
cn.cntr_number cntr_number,
pa.state state,
p... | true |
e96e3ad91b9f8b1f0bcad3bd13386561d25731e8 | SQL | dalmem/database | /제약조건quiz.sql | UTF-8 | 995 | 3.78125 | 4 | [] | no_license | create table members(
m_name varchar(5),
m_num number(10),
reg_date date,
gender varchar(1),
loca number(10)
);
alter table members modify m_name varchar(5) not null;
alter table members add constraints mem_memnum_pk primary key(m_num);
alter table members modify reg_date date not null;
... | true |
7e5877cbf109123e58d8ccd4a637e99d581649cf | SQL | OHDSI/Achilles | /inst/sql/sql_server/analyses/2201.sql | UTF-8 | 519 | 3.765625 | 4 | [
"Apache-2.0"
] | permissive | -- 2201 Number of note records, by note_type_concept_id
--HINT DISTRIBUTE_ON_KEY(stratum_1)
select 2201 as analysis_id,
CAST(m.note_type_CONCEPT_ID AS VARCHAR(255)) as stratum_1,
cast(null as varchar(255)) as stratum_2, cast(null as varchar(255)) as stratum_3, cast(null as varchar(255)) as stratum_4, cast(null a... | true |
86b3ad533d145c92ed6c0302194f255fc9795173 | SQL | amit12nig96/resurgence2017smvdu | /amit/registered_users.sql | UTF-8 | 1,788 | 2.890625 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.6.5.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Feb 22, 2017 at 06:17 PM
-- Server version: 10.1.21-MariaDB
-- PHP Version: 5.6.30
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SE... | true |
b80c1ce6a54dbcd3c5fe37ddeccf8a422ebace64 | SQL | Wribbe/SQL_the_hard_way | /ex4.sql | UTF-8 | 1,290 | 3.46875 | 3 | [] | no_license | CREATE TABLE person (
id INTEGER PRIMARY KEY,
first_name TEXT,
last_name TEXT,
age INTEGER
);
CREATE TABLE pet (
id INTEGER PRIMARY KEY,
name TEXT,
breed TEXT,
age INTEGER,
dead INTEGER
);
CREATE TABLE person_pet (
person_id INTEGER,
pet_id INTEGER
);
CREATE TABLE car (
id INTIGER PRIMARY KEY... | true |
a94c970a6362497c22c6eaadb3b10225529b90b3 | SQL | ezen1130/ezen1130 | /ImployeeManagement/src/TeamProject.sql | UTF-8 | 468 | 3.625 | 4 | [] | no_license | CREATE TABLE employee2(
id varchar2(10),
name varchar2(15),
position varchar2(15)
)
alter table employee2 add constraint pk_employee_id primary key(id)
CREATE TABLE attendee(
id varchar2(10),
name varchar2(15),
intime date,
exittime date
)
alter table attendee add constraint pk_ettendee_id primary key... | true |
e33ef695b28515295dde713e1c3d09e7368e9420 | SQL | anisahnq/cutionline | /cuti.sql | UTF-8 | 2,262 | 2.9375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.5.1
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Dec 12, 2017 at 05:28 AM
-- 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 |
7b0d530fa4b81a90d3af3023c44b8a09b68def22 | SQL | silence-do-good/stress-test-Postgres-and-MySQL | /dump/low/day14/select2330.sql | UTF-8 | 178 | 2.65625 | 3 | [] | no_license |
SELECT timeStamp, temperature FROM ThermometerOBSERVATION o
WHERE timestamp>'2017-11-13T23:30:00Z' AND timestamp<'2017-11-14T23:30:00Z' AND temperature>=21 AND temperature<=90
| true |
4aeb7d46bd402db741cb9ba076059a23b8d726e5 | SQL | PabloYepes27/holbertonschool-higher_level_programming | /0x0D-SQL_introduction/7-insert_value.sql | UTF-8 | 259 | 2.6875 | 3 | [] | no_license | -- inserts a new row in the table first_table (database hbtn_0c_0) in your MySQL server.
-- INSERT INTO table (columns) VALUES (values) -> Insert value to selected columns
INSERT
INTO first_table (
id,
name
)
VALUES (
89,
'Holberton School'
)
| true |
0c15a40376c6c4977012f5d3e2c57eca35b782e6 | SQL | Nashipae/PostgreSQL_Getting_Started | /PostgreSQL Fundamentals/Module 1-3.sql | UTF-8 | 8,477 | 3.5 | 4 | [] | no_license | -----------------------------------
-- O'reilly Online Training -------
-- PostgreSQL fundamentals --------
-- Module 1.3: Accessing Objects --
-----------------------------------
-- https://github.com/ami-levin/OReilly-Training/tree/master/PostgreSQL%20Fundamentals
-----------------------------------------------... | true |
dd535201e7bff4787a76a8a42217ebf97df611de | SQL | sf-burgos/dataBaseOracleAndSql | /proyectoDeCurso/atributos.sql | UTF-8 | 419 | 2.578125 | 3 | [] | no_license |
ALTER TABLE INFORMACION_PERSONAL ADD CONSTRAINT CK_CORREO_INFORMACION_PERSONAL CHECK(correo NOT LIKE '%@%@%');
ALTER TABLE REFERENCIA ADD CONSTRAINT CK_CORREO_REFERENCIA CHECK(correo NOT LIKE '%@%@%');
ALTER TABLE LIBRO ADD CONSTRAINT CK_N_PAGE CHECK(numero_paginas>1);
ALTER TABLE LIBRO ADD CONSTRAINT CK_N_DIS CHEC... | true |
a3f3e9bcb489e4a301edc4626096b5735f376082 | SQL | rzhang86/test | /conf/evolutions/default/1.sql | UTF-8 | 532 | 2.6875 | 3 | [] | no_license | # --- Created by Ebean DDL
# To stop Ebean DDL generation, remove this comment and start using Evolutions
# --- !Ups
create table stroke (
id bigint auto_increment not null,
ip varchar(255),
name varchar(255),
date_time datetim... | true |
2ed2857916ee8e15f947d035e34e39d26431b439 | SQL | sunhome1220/ULTicket | /WebContent/scripts/sample.sql | UTF-8 | 1,800 | 4.0625 | 4 | [] | no_license | --由票根號查出某人索票資料
SELECT * FROM proctick where tickname+ticktel in(
SELECT tickname+ticktel FROM proctick where tickid=22409)
--以某張回條查出該票索票人索得票出席狀況
SELECT * FROM showtick where tickid in(
SELECT tickid FROM proctick where tickname+ticktel in(
SELECT tickname+ticktel FROM proctick where tickid=22409))
SELECT count(*) FRO... | true |
523c59b6308c43e3fc64498f25f31969fd7fd92b | SQL | TharikH/sql-pl-sql | /pl-sql-blocks/update_table.sql | UTF-8 | 235 | 2.625 | 3 | [] | no_license | declare
cust_id integer:=1;
val float;
begin
select emi into val from customer where id=cust_id;
if(val ~= 0 and val is not null)then
update customer set emi=val/2 where id=cust_id;
else
dbms_output.put_line('not poss');
end if;
end; | true |
8702c11ae51e5dc8d2a48a5af18fc8fc6a885c0f | SQL | rendrooy/CRUD-Laravel | /obat.sql | UTF-8 | 8,064 | 3.109375 | 3 | [
"MIT"
] | permissive | -- phpMyAdmin SQL Dump
-- version 5.0.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Jul 07, 2020 at 10:19 PM
-- Server version: 10.4.11-MariaDB
-- PHP Version: 7.3.15
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OL... | true |
b55c79b6ae075ed1e6bf108b46c11a7b5c4fa20c | SQL | FloridaGeologicalSurvey/KORI | /sql/views/rnoaa_coops.sql | UTF-8 | 346 | 2.953125 | 3 | [] | no_license | --View that is oriented towards R users
CREATE OR REPLACE VIEW public.rcoops
(
site_name,
date_time,
val,
var,
dataset
)
AS
SELECT S.site_name, COOPS.date_time, COOPS.wle as val, text 'tidal_wle' as var, text 'COOPS' as dataset FROM (extra.coops AS COOPS INNER JOIN extra.s... | true |
38a9451ef639659689307d715a997b6f0d863f49 | SQL | meera-ramesh19/sololearn-python | /advancedlevel2/class2/if then statement in groupby.sql | UTF-8 | 1,185 | 4.4375 | 4 | [] | no_license | /*Pull the total shipping gross margin $ (ship rev - ship cost) by city and state.
Any city/state that had a ship profit dollar less than or equal to $0, label it as
No Profit. If the profit dollar is greater than $0, label as profit.*/
select Zip.city,
Zip.State,
sum(Shipping_Carrier.Shipping_Revenues-Shipping_Carri... | true |
b2e98133acf09ba9ba82e6c1591d5363b691ea09 | SQL | fiffu/arisa2 | /database/schema_colours.sql | UTF-8 | 280 | 2.515625 | 3 | [] | no_license | DROP TABLE IF EXISTS colours;
CREATE TABLE "colours" (
userid BIGINT NOT NULL,
mutateorreroll TEXT NOT NULL,
tstamp TIMESTAMP NOT NULL,
colour TEXT,
is_frozen BOOLEAN,
PRIMARY KEY (userid, mutateorreroll)
);
| true |
f2830c871cf5abffcba854efc3302895b3a03a9e | SQL | LeonidSergeev/mail_analytics | /SQL/Restrictions_android.sql | UTF-8 | 422 | 2.578125 | 3 | [] | no_license | SELECT count(*)
,dtEvent
FROM moosic_analytics.mytracker_custom_events
WHERE
eventName in ('Purchase_cache','Purchase_background','Purchase_audio_adv','Purchase_restricted','Purchase_banner','Purchase_profile','Purchase_feed','Purchase_special_project','Track_region_restricted')
AND idAppVersionTitl... | true |
f5fe17c30d8bb3fed0b0a507680aa5c83594fb18 | SQL | 1141125335/Group9_DayCareManagementSystem | /daycare/sql.sql | UTF-8 | 8,505 | 3.515625 | 4 | [] | no_license | -- Adminer 4.3.1 MySQL dump
SET NAMES utf8;
SET time_zone = '+00:00';
SET foreign_key_checks = 0;
SET sql_mode = 'NO_AUTO_VALUE_ON_ZERO';
DROP DATABASE IF EXISTS `daycaresystem`;
CREATE DATABASE `daycaresystem` /*!40100 DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci */;
USE `daycaresystem`;
DROP TABLE IF EXISTS ... | true |
4bae3e0fee4620e82669e6f1ebe39c6f60e1ffc5 | SQL | mpdevs/mplib | /src/mplib/scripts/hql/dnr/l_motherbaby_user_denoise.sql | UTF-8 | 1,133 | 3.828125 | 4 | [] | no_license | USE transforms;
DROP TABLE IF EXISTS motherbaby_user_noise;
CREATE TABLE motherbaby_user_noise AS
SELECT
user_id,
COUNT(*) AS cnt
FROM l_motherbaby.post
WHERE noise = '1'
GROUP BY
user_id
HAVING COUNT(*) >= 5;
USE l_motherbaby;
DROP TABLE IF EXISTS user_tmp;
CREATE TABLE user_tmp LIKE user;
INSERT INTO ... | true |
493f5ab8c9df7538791c5ed06ee83a4ca2494489 | SQL | AbrahamMendoza/A-la-mano-Brenda-Daniel-Abraham | /bd1.sql | UTF-8 | 570 | 3.0625 | 3 | [] | no_license | DROP DATABASE IF EXISTS Proyecto;
CREATE DATABASE Proyecto;
USE Proyecto;
DROP TABLE IF EXISTS producto;
CREATE TABLE producto(
codigo VARCHAR(10) NOT NULL PRIMARY KEY,
nombre VARCHAR(30) NOT NULL,
descripcion VARCHAR(50) NOT NULL,
cveCategoria INT NOT NULL,
cantidad INT NOT NULL,
precioCompra DOUBLE NOT NULL,
prec... | true |
413e6a16d222761c14ac78972e3db44118e0aeda | SQL | ibzan79/BEDU | /ejercicios_sesion02.sql | UTF-8 | 2,930 | 4.25 | 4 | [] | no_license | USE classicmodels;
# 1. Dentro de la tabla employees, obtén el número de empleado, apellido y nombre de todos los empleados cuyo nombre empiece con A.
SELECT employeeNumber, lastName, firstName
FROM employees
WHERE firstName LIKE 'A%';
# 2. Dentro de la tabla employees, obtén el número de empleado, apellido y nombre ... | true |
ebd78ed6e6635cdb7de2a31e790fad208c1ea7df | SQL | darold/pgFormatter | /t/pg-test-files/expected/async.sql | UTF-8 | 809 | 2.796875 | 3 | [
"Artistic-2.0"
] | permissive | --
-- ASYNC
--
--Should work. Send a valid message via a valid channel name
SELECT
pg_notify('notify_async1', 'sample message1');
SELECT
pg_notify('notify_async1', '');
SELECT
pg_notify('notify_async1', NULL);
-- Should fail. Send a valid message via an invalid channel name
SELECT
pg_notify('', 'samp... | true |
e173901bf621600a81a4bfd53ff6531f84adb915 | SQL | jgomezatse/plsql | /TRESbodyBACK.sql | WINDOWS-1252 | 23,130 | 3.375 | 3 | [] | no_license | create or replace PACKAGE BODY TRES is
--------------------------------------------------------------------------------
-- Normaliza caracteres Portafirmas
--------------------------------------------------------------------------------
function nz(vIn varchar2) return varchar2 is
begin
return translate(vIn,
'... | true |
ae48f5bca14d9cee4897000f0bc14c7e7af4425a | SQL | cckmit/wits-frameworks | /DevDocs/dbdesign/bsc_authmngcfg.sql | UTF-8 | 77,166 | 2.71875 | 3 | [] | no_license | /*==============================================================*/
/* DBMS name: MySQL 5.0 */
/* Created on: 2018/12/29 15:21:11 */
/*==============================================================*/
drop table if exists fdb_metam_attr_spec;
drop ta... | true |
4cf0997723ed6d8a5014450563e97070c3c5b0d8 | SQL | viniciusmjvm/Dr_Cell1_tcc | /Dr_Cell/Base/relacionamento.sql | UTF-8 | 1,743 | 4.09375 | 4 | [] | no_license |
//=================================================================
/* SELECT DE CONTAS*/
SELECT C.*,
fn.nome as fornecedor
FROM DBO.contas C
INNER JOIN fornecedores FN ON FN.cod_fornecedor = C.cod_fornecedor
ORDER BY C.vencimento
//=================================================================
/* SELECT DE VE... | true |
a1e01ab19df3a813d6c3ec90bbf3a01ece83782a | SQL | DimitarSamarov07/SoftUni-Software-Engineering | /C# DB/Databases Basics - MS SQL Server/Joins, Subqueries, CTE and Indices - Excercises/02AddressesWithTowns.sql | UTF-8 | 221 | 3.578125 | 4 | [] | no_license | SELECT
TOP (50)
FirstName
,
LastName
,
Name
,
AddressText
FROM Employees
INNER JOIN Addresses A ON Employees.AddressID = A.AddressID
INNER JOIN Towns T ON T.TownID = A.TownID
ORDER BY FirstName, LastName | true |
20d94ea739ac2dcc711feaf36a63a494b3c4de31 | SQL | prabodhaSA/Prabo_IT19176666_PAF_Assignment | /IT19176666/Dump20210514.sql | UTF-8 | 4,088 | 3.0625 | 3 | [] | no_license | -- MySQL dump 10.13 Distrib 8.0.19, for Win64 (x86_64)
--
-- Host: localhost Database: gadgetbadgetsys
-- ------------------------------------------------------
-- Server version 8.0.19
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS... | true |
fa8baf13ba630d1e0606d57e6ff90f2242bf5b1c | SQL | rameshv1210/mdm | /src/dbscripts/mysql/mdm_device/sps/saveIosSecurityInfo.sql | UTF-8 | 1,826 | 3.546875 | 4 | [] | no_license | DROP PROCEDURE IF EXISTS `mdm_device`.`saveIosSecurityInfo`;
DELIMITER $$
CREATE DEFINER=`root`@`localhost` PROCEDURE `mdm_device`.`saveIosSecurityInfo`(IN `userId` BIGINT(20), IN `deviceUuid` VARCHAR(255), IN `hardwareEncryptionCaps` int,
IN `passcodeCompliant` VARCHAR(10), IN `passcodeCompliantWithProfiles` VAR... | true |
1e5634e5eaa11d16cf95fd587b57fcb9b039b9a7 | SQL | captam3rica/SCCMWMIQueries | /disk_usage_sms_g_logical_disk.sql | UTF-8 | 452 | 2.796875 | 3 | [] | no_license | /*###################################################################
\\ Another Query for Disk Usage just from Logical Disk Table //
###################################################################*/
select distinct
SMS_G_System_LOGICAL_DISK.SystemName,
SMS_G_System_LOGICAL_DISK.ResourceID,
SMS_G_System_LOG... | true |
bd1d9ace32e39dbdf23c92db1be73c31b772bbc6 | SQL | DimitarSamarov07/SoftUni-Software-Engineering | /C# DB/Databases Basics - MS SQL Server/Exam Preparation 2/07StudentsToGo.sql | UTF-8 | 182 | 3.875 | 4 | [] | no_license | SELECT CONCAT(FirstName, ' ', LastName) AS [Full Name]
FROM Students
LEFT JOIN StudentsExams SE ON Students.Id = SE.StudentId
WHERE SE.StudentId IS NULL
ORDER BY [Full Name] | true |
ff38601c1598bcd2c4936b70ec2f2f453df1582e | SQL | bb4321/Startup-Info | /database/database.sql | UTF-8 | 1,853 | 2.9375 | 3 | [] | no_license |
create database startup;
user startup;
CREATE TABLE `student` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` text,
`pass` text,
`email` text,
`mobile` text,
`addr` text,
`dob` text,
`gender` text,
`pin` text,
`location` text,
`imagess` longblob,
`status` text,
`qualification` text,
PRIMA... | true |
c6d8cd4b3a0bd628952ab8090e746f7a1bd37390 | SQL | NaGoo/readyassist-mtm | /nagarajan.sql | UTF-8 | 1,046 | 3.09375 | 3 | [] | no_license | CREATE DATABASE readyasssist;
USE readyassist;
CREATE TABLE Candidates
(
id int auto_increment not null primary key,
Candidate_name varchar(25)null,
Candidate_mail varchar(25)null,
Candidate_gender varchar(25)null,
Candidate_age int not null
);
insert into
Candidates(id,candidate_name,candidate_mail,candidate_gender,c... | true |
eaf67f52a016d00e0c48e16f323a4af410639c6b | SQL | bukky24/Git-girl-project-2 | /query.py | UTF-8 | 624 | 4.09375 | 4 | [] | no_license | /* query to determine the countries that have the most invoices*/
SELECT BillingCountry, count(*) as Invoices
FROM invoices
GROUP BY BillingCountry
ORDER BY Invoices DESC
/*query that shows the city with the best customer*/
SELECT BillingCity as City, sum(Total) as InvoiceTotals
FROM Invoices
GROUP BY B... | true |
f3f73b5f68cb6e9346cda17e598773da713a4f07 | SQL | VelizarVeli/SoftUni-Software-Engineering | /03.C#DBFundamentals/01.Databases Basics - MS SQL Server/14.JoinsSubquerieCTEInd/14.JoinsSubquerieCTEInd/11.MinAverageSalary.sql | UTF-8 | 165 | 3.5625 | 4 | [] | no_license | SELECT MIN(AverageSalaryByDepartment) AS MinAverageSalary FROM (
SELECT AVG(Salary) AS AverageSalaryByDepartment FROM Employees
GROUP BY DepartmentID) AS AVGSalaries | true |
947ea2b7655151604a775a066c3af62e158bd410 | SQL | Jahidinsh/Aplikasi-Penjualan-VB.net | /dbpenjualan.sql | UTF-8 | 8,247 | 3.046875 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 5.1.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Waktu pembuatan: 14 Nov 2021 pada 08.11
-- Versi server: 10.4.21-MariaDB
-- Versi PHP: 7.3.31
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@C... | true |
79bf1bd6e5ecd45041514fc07da965f01d7111da | SQL | ArshanAlam/sandbox | /databases/postgres/initdb/init.sql | UTF-8 | 284 | 2.828125 | 3 | [] | no_license | CREATE DATABASE db;
-- Connect to the database
\c db;
-- Create tables
CREATE TABLE IF NOT EXISTS users (
id uuid DEFAULT gen_random_uuid (),
email varchar(320) NOT NULL UNIQUE,
PRIMARY KEY (id)
);
-- Insert default values
INSERT INTO users (
email)
VALUES (
'admin@mydomain.io');
| true |
ee4c4bbd344249bed90ffe9fca7dd7a95dfb579c | SQL | cgroane/bartender | /db/search_recipes.sql | UTF-8 | 121 | 2.75 | 3 | [] | no_license | select * from recipes
join ingredient on ingredient.recipe_id = recipes.recipe_id
where LOWER (ingredient.title) like $1; | true |
0dcb15a83c1e91bf7d5adce6360868e7c414fb44 | SQL | flitzmo-hso/flitzmo_agv_control_system | /Dokumentationen/MySQL_Documentation/MySQL_Dump/Dump20210527/ERRORHANDLING_ERRORHANDLING.sql | UTF-8 | 2,586 | 3.046875 | 3 | [
"MIT"
] | permissive | -- MySQL dump 10.13 Distrib 8.0.25, for Linux (x86_64)
--
-- Host: localhost Database: ERRORHANDLING
-- ------------------------------------------------------
-- Server version 8.0.25-0ubuntu0.20.04.1
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARAC... | true |
f3f1629b39a1c2e634966023c078af3dcf577ce1 | SQL | quangquyet05t3/CodeIgniter | /code_igniter.sql | UTF-8 | 3,574 | 3.359375 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | /*
SQLyog Ultimate v11.33 (64 bit)
MySQL - 10.1.19-MariaDB : Database - code_igniter
*********************************************************************
*/
/*!40101 SET NAMES utf8 */;
/*!40101 SET SQL_MODE=''*/;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FORE... | true |
3b0331fc0b809aa552fa8817d92eedd707e49e11 | SQL | victormerch/Proyecto-7.5 | /Proyecto 7.5 Base de Datos Larios Alex, Gomez Marc i Merchan Victor/Consultas Proyecto_V.Merchan_M.Gomez_A.Larios.sql | UTF-8 | 5,057 | 3.921875 | 4 | [] | no_license | -- 1 Mostrar la Carta inicial más repetida por cada jugador(mostrar nombre jugador y carta).
-- 2 Jugador que realiza la apuesta más alta por partida. (Mostrar nombre jugador).
select nombre,max(apuesta),idpartida from
(select case
when username is not null then usuario.username
else descripcion end
as nombre,max(t... | true |
3419ce9bf0e1d4c0f594ac6517efe4f1c4bdcda2 | SQL | bertair7/schoolprojects | /cpe365/Lab4/katzenjammer/KATZENJAMMER-info.sql | UTF-8 | 2,035 | 3.96875 | 4 | [] | no_license | -- Ryan Blair rablair@calpoly.edu
-- Tracklist of 'Le Pop'
SELECT s.Title
FROM Albums a, Songs s, Tracklists t
WHERE s.SongId = t.Song
AND a.AId = t.Album
AND a.Title = 'Le Pop'
ORDER BY t.Position;
-- Instruments each performer for 'Rock-Paper-Scissors'
SELECT b.Firsname, i.Instrument
FROM Songs s, Instruments i, Ba... | true |
b7c60d577dd0a62c197063e731e8a4126b36fcdd | SQL | DudaPereira/senai_sprint_1bd | /sprint-1-bd/exercicios/1.5-exercicio-ecommerce/ecommerce_02_DML.sql | ISO-8859-1 | 1,152 | 2.96875 | 3 | [] | no_license | USE Ecommerce;
INSERT INTO Loja(Nome, Endereco, Telefone, CNPJ)
VALUES ('DudaBeleza', 'Rua Maruara N10', '994982838', '000.567.980/0001-50')
,('LuanaBeleza', 'Rua Baro de Maua N80', '965455454', '000.123.314/0001-24');
INSERT INTO Categoria(NomeCat, idLoja)
VALUES ('Beleza', 2 )... | true |
3c4e82f7152309bce90838dace0ea5e995b77044 | SQL | daniel-stach/web_przychodnia | /SQL/0_All.sql | UTF-8 | 2,996 | 3.34375 | 3 | [] | no_license | CREATE USER 'SmartMED'@'localhost' IDENTIFIED BY '*gi3q3r*';
CREATE DATABASE SmartMED CHARACTER SET utf8 COLLATE utf8_general_ci;
GRANT ALL PRIVILEGES ON SmartMED.* TO 'SmartMED'@'localhost';
FLUSH PRIVILEGES;
CREATE TABLE IF NOT EXISTS konta (
id int(11) NOT NULL AUTO_INCREMENT,
login varchar(50) NOT NULL,
ha... | true |
fe299144917780335130b69961aca35c4a783228 | SQL | Abadila-LTF/Nexteer | /nexteer/Datalayer/our_users.sql | UTF-8 | 5,201 | 2.859375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 5.1.0
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Jun 03, 2021 at 11:51 PM
-- Server version: 10.4.19-MariaDB
-- PHP Version: 7.4.19
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIE... | true |
e78cefbcaf81384628b5bb00886236f63ce85f19 | SQL | radtek/Oracle-4 | /SQL/Administração/!Script Leandro/Constraints.sql | UTF-8 | 950 | 2.890625 | 3 | [] | no_license | Prompt #############################################################
Prompt # #
Prompt # Lista script disbale/ enable constraint #
Prompt # #
Prompt #####################################... | true |
49315abd656fb09a8780578bc51e21579c68732b | SQL | mjkubba/PostgresReport | /postgres/sql/sql9.sql | UTF-8 | 352 | 3.28125 | 3 | [] | no_license | SELECT
schemaname, relname,last_vacuum, cast(last_autovacuum as date), cast(last_analyze as date), cast(last_autoanalyze as date),
pg_size_pretty(pg_total_relation_size(table_name)) as table_total_size
from pg_stat_user_tables a, information_schema.tables b where a.relname=b.table_name ORDER BY pg_total_relation_... | true |
070f14fe2f8816be2cbe2a62054c61c9b598e8f8 | SQL | safetyh546/NY_RealEstate_Dashboard | /Resources/Data/Testing.sql | UTF-8 | 1,499 | 4.0625 | 4 | [] | no_license | select count(*) ,min(cast(gross_square_feet as int) ), max(cast(gross_square_feet as int) )
from sales
where gross_square_feet <> ' - '
and cast(gross_square_feet as int) > 0
--order by sale_price
select borough_name, ROUND((sale_price/cast(gross_square_feet as money))::numeric,2) , sale_price, gross_square_feet... | true |
0b12e6e11f0a8f14365a7f69358fc7a460e834de | SQL | cronox5790/UNIDAD-4-ACTIVIDAD-2 | /rolesdeusuario.sql | UTF-8 | 4,097 | 3.078125 | 3 | [] | no_license | CREATE DATABASE IF NOT EXISTS `rolesdeusuario` /*!40100 DEFAULT CHARACTER SET utf8 */;
USE `rolesdeusuario`;
-- MySQL dump 10.13 Distrib 5.7.17, for Win64 (x86_64)
--
-- Host: localhost Database: rolesdeusuario
-- ------------------------------------------------------
-- Server version 5.7.18-log
/*!40101 SET @OL... | true |
ed0fa7327bd0fad70e020e293d72d03f03c3e3f8 | SQL | bracealround/Online_Judge_Solved-Problems | /Hackerrank/Weather Observation Station 17.sql | UTF-8 | 79 | 3.109375 | 3 | [] | no_license | SELECT ROUND(LONG_W,4) FROM STATION WHERE LAT_N>38.7880 ORDER BY LAT_N LIMIT 1; | true |
6cad61fe233c477200293208c28c50cbe5fbefcc | SQL | gopi158/Sample | /FinaoDb/Stored Procedures/whotofollow.sql | UTF-8 | 4,482 | 3.953125 | 4 | [] | no_license | DELIMITER //
DROP PROCEDURE IF EXISTS whotofollow //
CREATE PROCEDURE `whotofollow`(IN u_name VARCHAR(256) )
BEGIN
/********************************************************************************************************
--------------------VARIABLE DECLARATION---------------section START-... | true |
4dbdad52aa68888a1cb2205e9f4bdb472d3c7915 | SQL | jenobpj/BootcampX | /1_queries/nonGmailStudents.sql | UTF-8 | 97 | 2.84375 | 3 | [] | no_license | SELECT name,email,id,cohort_id
FROM students
WHERE email NOT LIKE '%gmail.com'
AND phone IS NULL; | true |
2be21b207c6da9f5cf32b92dd710b3c3a3cc3550 | SQL | lancebrown42/SQLIntro | /placeholder.sql | UTF-8 | 3,053 | 3.109375 | 3 | [] | no_license | CREATE TABLE TEventCorporateSponsorshipTypes
(
intEventCorporateSponsorshipTypeID INTEGER NOT NULL
,intCorporateSponsorID INTEGER NOT NULL
,intEventID INTEGER NOT NULL
,dblSponsorshipCost DECIMAL NOT NULL
,blnSponsorshipAvailable BOOLEAN NOT NULL
,CONSTRA... | true |
b2b7cb8789ec0043583501f8663ddfc0ffd00ccf | SQL | smartcodev/dw_smartco | /dw_smartco/database/Database/DDL.sql | UTF-8 | 2,615 | 3.3125 | 3 | [] | no_license | ALTER TABLE SMARTCO.MIS_TF001_PORTA_BLOQUEADA
DROP CONSTRAINT MIS_PB_TF001_PORTA_BLOQUE_FK1;
ALTER TABLE SMARTCO.MIS_TF001_PORTA_BLOQUEADA
DROP CONSTRAINT MIS_PB_TF001_PORTA_BLOQUE_FK2;
ALTER TABLE SMARTCO.MIS_TF001_PORTA_BLOQUEADA
DROP CONSTRAINT MIS_PB_TF001_PORTA_BLOQUE_FK3;
DROP TABLE SMARTCO.MIS_TF0... | true |
40b68cb117b911f0ef1d95e7f67a7dad4f0fe6d4 | SQL | julito2000/DAM1 | /BD/BD04/Tarea BD04/Datos.sql | UTF-8 | 3,680 | 3.171875 | 3 | [] | no_license | CREATE TABLE CENTRO(
codcentro number(2) not null,
direccion varchar2(30) not null,
localidad varchar2(20) not null);
insert into centro values (01,'Rambla Nova','Tarragona');
insert into centro values (02,'Alcala','Madrid');
insert into centro values (03,'Sierpes','Sevilla');
alter table centro add constraints pk... | true |
a7ff570b57e4132902821224572216d5d50a313a | SQL | JavaTeam2/Foodmart | /FoodHouse/food.sql | UTF-8 | 11,037 | 2.875 | 3 | [
"Apache-2.0"
] | permissive | CREATE TABLE IF NOT EXISTS `food` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`name` nvarchar(45) COLLATE utf8_bin NOT NULL,
`price` double NOT NULL,
`price_promotion` double NOT NULL,
`kindOfFood` nvarchar(100),
`image` varchar(500) NOT NULL,
`description` nvarchar(1000) COLLATE utf8_bin ... | true |
3a580d0f1f8f43bdb7a28573991e58eb78857e4b | SQL | jlemonis/myhotel | /hotel.sql | UTF-8 | 2,102 | 2.8125 | 3 | [] | no_license | /*
Navicat MySQL Data Transfer
Source Server : localhost_3306
Source Server Version : 50710
Source Host : localhost:3306
Source Database : hotel
Target Server Type : MYSQL
Target Server Version : 50710
File Encoding : 65001
Date: 2016-01-30 13:40:53
*/
SET FOREIGN_KEY_CHECKS=0;
-... | true |
1704ec6da6dfa6073f7665d00ede3be46e6c612c | SQL | andrehertwig/admintool | /admin-tools-security/admin-tools-security-dbuser/src/main/resources/sql/postgres/TableInitialization_DDL.sql | UTF-8 | 4,091 | 3.78125 | 4 | [
"MIT"
] | permissive | CREATE TABLE "at_client"
(
uuid varchar(40) PRIMARY KEY NOT NULL,
created timestamp NOT NULL,
created_by varchar(255),
modified timestamp,
modified_by varchar(255),
jpaversion int NOT NULL,
active bool NOT NULL,
description varchar(255),
display_name varchar(255),
name varchar(2... | true |
e25fef17df3d6e38aa92e886256d0fd0172d8ee0 | SQL | edigonzales-dumpster/agi_mopublic_20190424 | /postscript.sql | UTF-8 | 3,200 | 2.828125 | 3 | [
"MIT"
] | permissive | COMMENT ON SCHEMA
agi_mopublic_pub
IS
'Vereinfachtes Datenmodell der Daten der amtlichen Vermessung. Fragen: stefan.ziegler@bd.so.ch'
;
GRANT USAGE ON SCHEMA agi_mopublic_pub TO public, ogc_server, sogis_service, gretl;
GRANT SELECT ON ALL TABLES IN SCHEMA agi_mopublic_pub TO public, ogc_server, sogis_service... | true |
b898c8bf65555db6b08b3ddcf1315c676d96a9b5 | SQL | furkon/example | /db_example.sql | UTF-8 | 2,468 | 3.109375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.8.3
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Apr 15, 2019 at 05:32 AM
-- Server version: 10.1.36-MariaDB
-- PHP Version: 5.6.38
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OL... | true |
a4bd82e99c4c175b150c16d00c162c0310a12549 | SQL | ddc67cd/database-scripts | /to_sort/oracle_apps/GL/gl_code_combinations_query.sql | UTF-8 | 1,253 | 2.859375 | 3 | [] | no_license | SELECT code_combination_id
, chart_of_accounts_id
, account_type
, segment1||'-'||segment2||'-'||segment3||'-'||segment4||'-'||segment5||'-'||segment6 ccid
, case
when to_char(last_update_date,'yyyy')= '2013' then
'Y'
else
'N'
... | true |
a5ff63abbda494ab36153bdbabc4b4a11dbbc68e | SQL | shevchu/sql | /drivers.sql | UTF-8 | 260 | 4.1875 | 4 | [] | no_license | SELECT driver.last_name, COUNT(car.brand)
FROM driver
JOIN car_driver ON driver.id = car_driver.driver_id
JOIN car ON car.id = car_driver.car_id
WHERE YEAR(driver.birth_date) >= 1995
AND car.brand LIKE 'Honda'
GROUP BY car.brand
HAVING COUNT(car.brand) >= 2; | true |
c5938acd18655ffd44cb38053060523403ce6308 | SQL | silence-do-good/stress-test-Postgres-and-MySQL | /dump/high/day21/select0008.sql | UTF-8 | 178 | 2.59375 | 3 | [] | no_license |
SELECT timeStamp, temperature FROM ThermometerOBSERVATION o
WHERE timestamp>'2017-11-20T00:08:00Z' AND timestamp<'2017-11-21T00:08:00Z' AND temperature>=18 AND temperature<=80
| true |
7f3bd28e417948f88a84747480dcea88a2ed268a | SQL | Tair111/gastronomy | /gastronomy.sql | UTF-8 | 5,475 | 3.15625 | 3 | [
"BSD-3-Clause"
] | permissive | -- phpMyAdmin SQL Dump
-- version 4.6.5.2
-- https://www.phpmyadmin.net/
--
-- Хост: 127.0.0.1
-- Время создания: Апр 04 2017 г., 18:28
-- Версия сервера: 10.1.21-MariaDB
-- Версия PHP: 7.1.1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIE... | true |
52648097da33bd93158ac7fd23c923cf0cb23a9b | SQL | EvgeniyKevbrin/otus | /HW_8/HW8_2.sql | UTF-8 | 961 | 3.375 | 3 | [] | no_license | /*
2. Для всех клиентов с именем, в котором есть Tailspin Toys
вывести все адреса, которые есть в таблице, в одной колонке
Пример результатов
CustomerName AddressLine
Tailspin Toys (Head Office) Shop 38
Tailspin Toys (Head Office) 1877 Mittal Road
Tailspin Toys (Head Office) PO Box 8975
Tailspin Toys (Head Of... | true |
281d3c9f8129bb58b43ded3768a9f0a5c2bde930 | SQL | mswertz/molgenis-maven-experimental | /molgenis-auth/src/main/generated-sources/count_per_table.sql | UTF-8 | 1,104 | 2.59375 | 3 | [] | no_license | SELECT 'MolgenisRole' AS entity, count(*) AS count FROM molgenisRole
UNION
SELECT 'MolgenisGroup' AS entity, count(*) AS count FROM molgenisGroup
UNION
SELECT 'MolgenisRoleGroupLink' AS entity, count(*) AS count FROM molgenisRoleGroupLink
UNION
SELECT 'Person' AS entity, count(*) AS count FROM person
UNIO... | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.