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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
c891e6e8df0ccc9f661ebe80b8b5173ff2d47658 | SQL | shivdeepmodi/Setup | /sqlpath/obj_count.sql | UTF-8 | 638 | 3.734375 | 4 | [] | no_license | Accept owner char prompt 'Give the owner : '
set verify off
Column owner heading 'Owner' format a20
Column object_type heading 'Object Type' format a30
Column count(*) heading 'Count' format 99999
break on owner
compute sum label 'Total Objects' of count(*) on owner
select a.owner, a.object... | true |
2445d78a7ec39182b44edffad2e57b69ce96d197 | SQL | vitorhartmann/ProjectYeet | /sql/yeetVazioDados.sql | UTF-8 | 5,714 | 3.390625 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.5.1
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Tempo de geração: 27/11/2018 às 19:09
-- Versão do servidor: 5.7.11-log
-- Versão do PHP: 5.6.15
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIEN... | true |
38e672944e3a0d0fbb1c3a1887892514aa446e95 | SQL | nurkhofifahhayati/Semua-Tugas-PBO-A | /Tugas Pertemuan 9 MVC/praktikum.sql | UTF-8 | 1,401 | 2.953125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.9.0.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Jan 04, 2021 at 06:28 PM
-- Server version: 10.3.16-MariaDB
-- PHP Version: 7.3.7
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @O... | true |
48cffe7d4dd945e8ad12e088bb5415884ede2bcd | SQL | DaniaAlmazanSanchez/SQL | /05_Agrupamiento/agrupamiento.sql | UTF-8 | 619 | 3.46875 | 3 | [] | no_license | /*COUNT*/
SELECT COUNT(film_id) FROM film WHERE rental_duration=3;
SELECT rental_duration, COUNT(film_id) AS "total" FROM film WHERE rental_duration=7;
/*GROUP*/
/*Grupo ordenado por renta_id de mayor-menor*/
SELECT rental_duration, COUNT(film_id) AS "TOTAL" FROM film GROUP BY rental_duration ORDER BY rental_id DESC... | true |
d8c9c7b868655c630ea5a3359db53d37eb39177a | SQL | reeclark/lab19 | /mynorthwind.sql | UTF-8 | 865 | 3.609375 | 4 | [] | no_license | select * from customers;
select distinct country from customers;
select * from customers where customerid like "b1%";
select * from orders limit 100;
select * from customers where postalcode= ('1010','3012','12209','05023');
select * from orders where shipregion is not null;
select * from customers order by country, ci... | true |
df1f80fbe37370a4fab4bbe2eaeabc4fcc8a29a3 | SQL | sqiu46/atlanta-garden-database-project | /admin and visitor functionality.SQL | UTF-8 | 6,771 | 4.4375 | 4 | [] | no_license | -- Phase 2 Create Table Statements:
CREATE TABLE User(
Username varchar(50),
Email varchar(50) NOT NULL,
Password char(32) NOT NULL, --because of md5 hash, yours might be different
UserType enum('ADMIN', 'OWNER', 'VISITOR') NOT NULL,
PRIMARY KEY(Username),
UNIQUE(Email)
);
CREATE TABLE Property(
ID int CHECK (I... | true |
9e7774ef45252e8c6a984ed2a469cb987c704909 | SQL | itzhangxuhui/laravel | /shop.sql | UTF-8 | 13,596 | 3 | 3 | [
"MIT"
] | permissive | /*
Navicat MySQL Data Transfer
Source Server : localhost
Source Server Version : 50553
Source Host : localhost:3306
Source Database : shop
Target Server Type : MYSQL
Target Server Version : 50553
File Encoding : 65001
Date: 2019-10-29 16:30:30
*/
SET FOREIGN_KEY_CHECKS=0;
-- ----... | true |
0bcc32f230fb56e38859a1ec1d9228edf2fe0c16 | SQL | jeondele/hanaTI | /SQL/island_sports.sql | UHC | 10,743 | 3.8125 | 4 | [] | no_license | -- ̺
DROP TABLE locations cascade CONSTRAINTS;
DROP TABLE address cascade CONSTRAINTS;
DROP TABLE departments cascade CONSTRAINTS;
DROP TABLE jobs cascade CONSTRAINTS;
DROP TABLE commissions cascade CONSTRAINTS;
DROP TABLE employees cascade CONSTRAINTS;
DROP TABLE customers cascade CONSTRAINTS;
DROP TABLE credits cas... | true |
52162224c2bd052173aa485a41c1d60414b6590a | SQL | JolverQuevedo/multi_bkp | /SCRIPTS/duplicados.sql | UTF-8 | 1,318 | 3.1875 | 3 | [] | no_license | select * into rs_almovd0001_duplicados from rs_almovd0001
-- count = 945735 -->946740
SELECT calma, ctd , cnumdoc, citem, col3=count(*)
INTO holdkey
FROM rs_almovd0001
GROUP BY calma, ctd , cnumdoc, citem
HAVING count(*) > 1
order by calma, ctd , cnumdoc, citem
-- count = 472800 --> 472798
SELECT DISTINCT t1.CALMA,... | true |
3b4c6129fd9798c893e96eaeffb330bb58026b27 | SQL | miltonf55/insigniis | /insigV03.sql | UTF-8 | 5,969 | 2.90625 | 3 | [] | no_license | -- MySQL dump 10.13 Distrib 5.7.17, for Win64 (x86_64)
--
-- Host: localhost Database: insigniisDB
-- ------------------------------------------------------
-- Server version 5.7.17-log
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_... | true |
6f6627aef07ca32196134cd24b340ee2ff6c5dc2 | SQL | unkmc/RTK-Server | /database/scripts/2020-07-04-15-04_FixErrors.sql | UTF-8 | 1,279 | 3.6875 | 4 | [] | no_license | USE RTK;
SET @script = '2020-07-04-15-04_FixErrors.sql';
DELIMITER $$
DROP PROCEDURE IF EXISTS sp $$
CREATE PROCEDURE sp(
IN scriptName VARCHAR(255)
)
BEGIN
IF NOT EXISTS (SELECT * FROM MigrationHistory WHERE Script = scriptName) THEN
-- ----------------------------
-- Having no records in the Character tabl... | true |
0f5479cc4822dabadbffb822d87514257a3c3380 | SQL | CUBRID/cubrid-testcases | /sql/_27_banana_qa/issue_12367_comment/cases/comment_on_table_column_01.sql | UTF-8 | 2,780 | 3.640625 | 4 | [
"BSD-3-Clause"
] | permissive | drop table if exists t_comment;
create table t_comment(id int primary key auto_increment comment'this is primary key column', name char(8) comment'this is common column');
insert into t_comment values(1,'Hello');
insert into t_comment values(2,'comment');
select attr_name,class_name,comment from db_attribute where cla... | true |
ea18da910f64dc9d30e16f7d46d2db4e2a3eff8f | SQL | loganwolf619/Snakes-and-Ladder-Database-Coding | /Snakes and Ladder/Procedure 10. List All Admins.sql | UTF-8 | 449 | 3.25 | 3 | [
"MIT"
] | permissive | USE SnakesAndLadder;
drop procedure if exists ListAllAdmins;
DELIMITER //
Create procedure ListAllAdmins (pPermission varchar (10))
BEGIN
START TRANSACTION;
Select AdminPermission from Account
where AdminPermission = pPermission;
if pPermission = 'Yes' then
SELECT Username, AccountStatus
FROM Account
where Admi... | true |
ab14a45d40cfaa42b894e4ff83731e1331182e46 | SQL | Elisabetenisriwasi/tugas-13 | /pertemuan_11.sql | UTF-8 | 6,938 | 2.984375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.9.0.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Jan 16, 2021 at 04:07 PM
-- Server version: 10.4.6-MariaDB
-- PHP Version: 7.2.22
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @O... | true |
754a51c665cbb8cd26198b2b4fbb61a5d5571f68 | SQL | arunkumarmarndi/TwitterDataAnalysis | /TwitterDataProject/hive/hive_raw.sql | UTF-8 | 7,318 | 3.203125 | 3 | [] | no_license | ADD JAR json-serde-1.1.6-SNAPSHOT-jar-with-dependencies.jar;
CREATE EXTERNAL TABLE tweets_raw (
id BIGINT,
created_at STRING,
source STRING,
favorited BOOLEAN,
retweet_count INT,
retweeted_status STRUCT<
text:STRING,
user:STRUCT<screen_name:STRING,name:STRING>>,
entities STRUCT<
... | true |
253bc1cbe7aee309c4e88690c6bc47b7c5285c0e | SQL | kambojankit/angular2-spring | /docs/schema/updated DB_SCRIPT-1.sql | UTF-8 | 17,122 | 3.171875 | 3 | [] | no_license | 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='TRADITIONAL,ALLOW_INVALID_DATES';
-- -----------------------------------------------------
-- Schema batch-repo
-- -----------------------------------... | true |
de67d8a2c683e24554baf5820d3733442cbb7538 | SQL | Nurulapriani/DQLab-DQLab-Course | /DQLab-PandoraBox/SQL/day-4.sql | UTF-8 | 389 | 3.65625 | 4 | [
"MIT"
] | permissive | use employees;
select
d2.emp_no,
d2.dept_no as d2,
d1.dept_no as d1,
d2.from_date as d2_from_date,
d2.to_date as d2_to_date, d1.from_date as usia_bergabung_divisi,
d1.to_date as d1_to_date
from
dept_emp as d1,
dept_emp as d2
where d1.emp_no = d2.emp_no
and d1.dept_no != d2.dept_no and d1.dept_no ='d003'
and d2.dept_n... | true |
55ee0517a35231cf1e31f3610bd385ffda795e09 | SQL | andremco/cursos-api | /database/tables.sql | UTF-8 | 503 | 3.78125 | 4 | [] | no_license | create table Category(
Id Int IDENTITY (1,1) Not Null,
Name Varchar(100) Not Null,
CONSTRAINT PK_Category PRIMARY KEY CLUSTERED (Id)
)
create table Course(
Id Int IDENTITY (1,1) Not Null,
CategoryId Int Not Null,
Name Varchar(100) Not Null,
Description Varchar(250) Not Null,
StartDate DateTime Not Null,
EndD... | true |
b4fc48ce7c1ad60a6c2e7ebbe47c812f0a2ba3f3 | SQL | silence-do-good/stress-test-Postgres-and-MySQL | /dump/high/day17/select0606.sql | UTF-8 | 177 | 2.5625 | 3 | [] | no_license |
SELECT timeStamp, temperature FROM ThermometerOBSERVATION o
WHERE timestamp>'2017-11-16T06:06:00Z' AND timestamp<'2017-11-17T06:06:00Z' AND temperature>=2 AND temperature<=21
| true |
f91d19e2cc9e018e61cc0837982f211107ad525b | SQL | bpasbuddies/buddies2 | /MyProjects/eEMRT/EEMRT/Procedures/SP_MERGE_STAGE2_DETAIL.sql | UTF-8 | 4,297 | 3.109375 | 3 | [] | no_license | CREATE OR REPLACE PROCEDURE eemrt.SP_MERGE_STAGE2_DETAIL(
p_PStatus OUT VARCHAR2)
IS
/*
Procedure : SP_MERGE_STAGE2_DETAIL
Author: Sridhar Kommana
Date Created : 03/17/2015
Purpose: Update DELPHI_CONTRACT_DETAIL with changes from DELPHI_CONTRACT_STAGE table on a daily basis.
DELPHI_CONTRACT_STAG... | true |
c4c3e98673c246168f58f2b2188a92868c168636 | SQL | angelGarciaSantos/leisure | /src/main/sql/createTables.sql | UTF-8 | 4,406 | 3.921875 | 4 | [] | no_license | -- CREATE TABLE `Employee` (
-- `id` int(11) NOT NULL AUTO_INCREMENT,
-- `age` int(11) NOT NULL,
-- `name` varchar(255) DEFAULT NULL,
-- PRIMARY KEY (`id`)
-- )
DROP TABLE Rating;
DROP TABLE Comment;
DROP TABLE User_Artist;
DROP TABLE User_Event;
DROP TABLE Interest;
DROP TABLE User;
DROP TABLE Event_Artist;
D... | true |
775e168623697c57112420f2c842669d5350e2c2 | SQL | erda-project/erda | /pkg/database/sqlparser/testdata/318-2.sql | UTF-8 | 273 | 2.53125 | 3 | [
"Apache-2.0"
] | permissive | /*
为dice_api-asset_version_specs.spec 添加Fulltext索引
*/
CREATE FULLTEXT INDEX ft_specs
ON dice_api_asset_version_specs (spec);
/*
为dice_api_asset_versions增加字段swagger_version
*/
ALTER TABLE dice_api_asset_versions
ADD swagger_version varchar(16);
| true |
805bb40d386b5d4fc2301e199ce2e802754941de | SQL | creativehardbeat1/project_sprindik | /database/barthi_update_241117_1727.sql | UTF-8 | 1,343 | 3.453125 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | /*
SQLyog Enterprise - MySQL GUI v8.05
MySQL - 5.7.18-log : Database - dbsprindik
*********************************************************************
*/
/*!40101 SET NAMES utf8 */;
/*!40101 SET SQL_MODE=''*/;
insert into `ref_status`(`id`,`kode_status`,`status`,`keterangan`) values (7,'98','Dokumen ... | true |
183c900ceb9ba5694ca24e04709cb25350f7db6c | SQL | jyzjyz/jyzjyz | /easyrent.sql | UTF-8 | 13,711 | 3.390625 | 3 | [] | no_license | /*
Navicat MySQL Data Transfer
Source Server : pj2
Source Server Version : 50519
Source Host : localhost:3306
Source Database : easyrent
Target Server Type : MYSQL
Target Server Version : 50519
File Encoding : 65001
Date: 2017-04-19 22:31:19
*/
SET FOREIGN_KEY_CHECKS=0;
-- ------... | true |
f264e6c7f3ed1db071fa0cbb3f9aa8d9fe5d78b6 | SQL | asirhameem/university-management | /public/uploads/course-content/1609873432.sql | UTF-8 | 11,448 | 3 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 5.0.3
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Jan 03, 2021 at 08:16 PM
-- Server version: 10.4.14-MariaDB
-- PHP Version: 7.2.34
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIE... | true |
969b2e1fae3af6b5f9a5f2ae01d88df62b74d0f4 | SQL | eprincev-egor/grapeql | /tests/QueryBuilder/HardJoinFile/up.sql | UTF-8 | 2,052 | 3.984375 | 4 | [
"MIT"
] | permissive |
CREATE TABLE country (
id serial,
name text NOT NULL,
code text NOT NULL,
CONSTRAINT country_pk PRIMARY KEY (id),
CONSTRAINT country_code_uniq UNIQUE (code),
CONSTRAINT country_name_uniq UNIQUE (name)
);
CREATE TABLE company (
id serial,
name text NOT NULL,
inn text NOT NULL,
id_country integer NO... | true |
1a4f363c8c2897bac4531b43152d7def58376f6a | SQL | ylscj/zup-boot | /src/main/resources/cn/zup/bi/dao/TopicDao_updateTopic.sql | UTF-8 | 325 | 2.71875 | 3 | [] | no_license | UPDATE bi_topic bt SET
<#if topic.topic_Caption?exists>
bt.TOPIC_CAPTION = '${topic.topic_Caption}',
</#if>
<#if topic.biz_Table_Name?exists>
bt.BIZ_TABLE_NAME = '${topic.biz_Table_Name}',
</#if>
<#if topic.topic_Name?exists>
bt.TOPIC_NAME = '${topic.topic_Name}'
</#if>
WHERE bt.TOPIC_ID = ${topic.topic_Id}
... | true |
b83099a53d55cd8408811793087d3028f5b54235 | SQL | dystudio/athena | /src/Athena.Data/Migrations/src/20180215110432_Identity.sql | UTF-8 | 837 | 3.671875 | 4 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | CREATE TABLE IF NOT EXISTS users (
id UUID PRIMARY KEY NOT NULL REFERENCES students(id) ON DELETE CASCADE,
username TEXT NOT NULL,
normalized_username TEXT UNIQUE NOT NULL,
email TEXT NOT NULL,
normalized_email TEXT NOT NULL,
email_confirmed BOOLEAN NOT NULL
);
CREATE TABLE IF NOT EXISTS roles (
id UUID ... | true |
43f77b7d098b3843a8b28a324824828170f48a4b | SQL | elyasedm/ngekost | /ngekost.sql | UTF-8 | 13,280 | 2.796875 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.7.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Dec 20, 2018 at 03:24 AM
-- Server version: 10.1.28-MariaDB
-- PHP Version: 5.6.32
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OL... | true |
6acc8fac7fad69c7d64ce0bffa1242adabeffd4e | SQL | hechao-ustc/Java_misosha | /miaosha.sql | UTF-8 | 6,384 | 3.140625 | 3 | [] | no_license | /*
Navicat MySQL Data Transfer
Source Server : localhost_3306
Source Server Type : MySQL
Source Server Version : 50725
Source Host : localhost:3306
Source Schema : miaosha
Target Server Type : MySQL
Target Server Version : 50725
File Encoding : 65001
Date: 11/06/2020... | true |
187d837231156104f8b0caa3059c21811a5afcc7 | SQL | x-cpu/SQL | /Weekly_Production_counts_LONDON.sql | UTF-8 | 1,947 | 4.15625 | 4 | [] | no_license | select distinct t.Year, t.Week, count(t.batchname) Batches, sum(t.DCSID) DCSIDs, sum(t.Docs) Docs, sum(t.Images) Images
FROM
(select distinct d.pbatch BatchName, count(distinct d.dcsid) DCSID,
count(d.ImageID) Docs,
sum(d.NumPages) Images, YEAR(d.ImageDateTime) Year, datepart(WEEK, d.ImageDateTime) Week
from d... | true |
ef8bfe7e080c8faa047ce9523b04be66d24f8c4a | SQL | Anita-B/Flashcard-Creator-Node-Express-MySQL-Handlebars | /db/schema.sql | UTF-8 | 1,080 | 3.5 | 4 | [] | no_license | ### Flashcards Schema
CREATE DATABASE flashcards_db;
USE flashcards_db;
SELECT * FROM users;
SELECT * FROM sets;
SELECT * FROM flashcards;
SELECT * FROM categories;
-- DROP TABLE users;
-- DROP TABLE sets;
-- DROP TABLE flashcards;
-- DROP TABLE categories;
CREATE TABLE users
(
user_id int NOT NULL AUTO_INCREM... | true |
a1d04a00b588fd72a5e08c5a4956c8c2d14e5c3c | SQL | DaTrueBrad/sql-2-answers | /alter-table.sql | UTF-8 | 388 | 3.046875 | 3 | [] | no_license | -- #2
ALTER TABLE animals
ADD COLUMN location VARCHAR(30)
-- #3
insert into animals (
name,
type,
location,
age
) values (
'ricky',
'koala',
'san diego',
5
), (
'bobby',
'kangaroo',
'salt lake',
4
), (
'nascar',
'jackrabbit',
'sydney',
2
)
-- #4
ALTER TABLE animals
RENAME COLUMN type to ... | true |
785da5f8a258d5cdcb8073071487ed8335bce992 | SQL | miguelazevedolopes/FEUP-BDAD | /PART-3/src/queries/int9.sql | UTF-8 | 724 | 3.765625 | 4 | [] | no_license | /* ==================================================================================================================
* Listagem de todos os trabalhadores de serralves incluindo o valor idade (calculado a partir da data de nascimento)
* =================================================================================... | true |
4e22fa2678a2c76f3ed7d81ecb8e201d7a6addfd | SQL | mroadev/Clase-02-08-2018 | /Scripts_Clase_02-08-2018.sql | UTF-8 | 858 | 2.96875 | 3 | [] | no_license | use ventas
CREATE TABLE Cliente(
codCliente INT NOT NULL AUTO_INCREMENT,
nombreCliente VARCHAR(100),
tipoCliente VARCHAR(10),
PRIMARY KEY (codCliente)
);
CREATE TABLE Producto(
codProducto INT NOT NULL AUTO_INCREMENT,
producto VARCHAR(100),
precio INT,
PRIMARY KEY (codProducto)
);
insert in... | true |
e4b2fac7d3d924c88b30a0329bf727ff05087667 | SQL | ajohnson2205/helo | /back/db/setup/createTables.sql | UTF-8 | 752 | 3.21875 | 3 | [] | no_license | CREATE TABLE users (
firstName VARCHAR(40),
lastName VARCHAR(40),
genderID INTEGER REFERENCES genders (id),
hairColorID INTEGER REFERENCES haircolors (id),
eyeColorID INTEGER REFERENCES eyeColors (id),
hobbyID INTEGER REFERENCES hobbies (id),
picture TEXT,
email TEXT,
authID TEXT,
birthDate DATE,
... | true |
2675713ded8d48d7ad6a6564adb0085b9d8f3508 | SQL | sqlfluff/sqlfluff | /test/fixtures/dialects/postgres/join_no_space.sql | UTF-8 | 142 | 2.84375 | 3 | [
"MIT"
] | permissive | -- Not missing space before ON
SELECT * FROM "my_table2"
INNER JOIN "my_database"."my_schema"."my_table"ON ("my_table2".foo = "my_table".foo)
| true |
8bcd50ec5b3dbe5c2c869f22012ded9003dcb470 | SQL | jpnance/PicksLeague | /splits/byspread.sql | UTF-8 | 8,192 | 3.5625 | 4 | [] | no_license | SELECT
u.user_name,
nsevenw.count AS nsevenW,
nsevenl.count AS nsevenL,
nsixw.count AS nsixW,
nsixl.count AS nsixL,
nfivew.count AS nfiveW,
nfivel.count AS nfiveL,
nfourw.count AS nfourW,
nfourl.count AS nfourL,
nthreew.count AS nthreeW,
nthreel.count AS nthreeL,
ntwow.count AS ntwoW,
ntwol.count AS ntwoL,... | true |
b5eeea2402f76ab1d47411841c7ceada52df0861 | SQL | oradrs/tpt-oracle | /measure_io.sql | UTF-8 | 2,543 | 3.84375 | 4 | [
"Apache-2.0"
] | permissive | -- Copyright 2018 Tanel Poder. All rights reserved. More info at http://tanelpoder.com
-- Licensed under the Apache License, Version 2.0. See LICENSE.txt for terms & conditions.
--------------------------------------------------------------------------------
--
-- File name: measure_io.sql (v0.1)
-- Purpose: Mea... | true |
e06dcbcdd1e0f3e48f05eac3185f5e9ba1220f9c | SQL | blavoie/oracle-scripts | /_blos/exttools/sqlt/utl/spm/display_cur.sql | UTF-8 | 1,819 | 3.1875 | 3 | [] | no_license | REM $Header: 215187.1 display_cur.sql 12.1.02 2013/09/09 carlos.sierra mauro.pagano $
ACC sql_text_piece PROMPT 'Enter SQL Text piece: '
SET PAGES 200 LONG 80000 ECHO ON;
COL sql_text PRI;
SELECT sql_id, sql_text /* exclude_me */
FROM v$sqlarea
WHERE sql_text LIKE '%&&sql_text_piece.%'
AND sql_text... | true |
12101e3c4328cef32899100f6d9637d22a3b646f | SQL | equipoviajestransparentes/ViajesTransparentes | /DOCUMENTACION BD/Script BD IFAI/Scripts individuales con datos/ifai_tema_de_viaje_catalogo.sql | UTF-8 | 2,599 | 2.625 | 3 | [
"MIT"
] | permissive | -- MySQL dump 10.13 Distrib 5.6.17, for Win32 (x86)
--
-- Host: localhost Database: ifai
-- ------------------------------------------------------
-- Server version 5.6.21-log
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */... | true |
586ab6c7332785fd7093047e609fa61f7ced2ccc | SQL | timothynegron/sql-queries | /ms2-function-discount-price.sql | UTF-8 | 311 | 3.578125 | 4 | [] | no_license | -- Create a function that returns the discount price for a specified item
CREATE FUNCTION fnDiscountPrice
(
@ItemID INT
)
RETURNS INT
AS
BEGIN
RETURN
(SELECT (ItemPrice - DiscountAmount) AS 'The Discounted Price'
FROM tblOrderItems
WHERE ItemID = @ItemID)
END
-- Tester
SELECT dbo.fnDiscountPrice(1) | true |
a750d392cc9f9dddf5cdb8359aac306e08ccd71b | SQL | TestingTestings/Project_4 | /doc/sql/t_casehandle.sql | UTF-8 | 1,175 | 3.03125 | 3 | [] | no_license | -- ----------------------------
-- Table structure for t_case
-- ----------------------------
DROP TABLE IF EXISTS `t_casehandle`;
CREATE TABLE `t_casehandle` (
`id` int(5) auto_increment,
`case_id` int(5),
`content` text,
`state` enum('申诉','修正'),
`happentime` datetime,
`handletime` datetime,
`state2` en... | true |
2de5e16ec28d4c5a9b3950e3bdee3c568a5e70b2 | SQL | AnaCarolcs/SBD2 | /Soluções/aula1exer2EvolucaoOracle_AnaCarolinaCarvalho_19-0063441 (1)/aula1exer2EvolucaoOracleControle_AnaCarolinaCarvalho_19-0063441.sql | UTF-8 | 1,032 | 3.109375 | 3 | [] | no_license | -- -------- << Aula 1 Exercicio 2 Evolucao Oracle Controle >> ---- --
-- --
-- SCRIPT DE CONTROLE
--
-- Data Criacao ..........: 02/04/2019
-- Autor(es) .............: Ana Carolina Carvalho da Silva
-- Banco de Dados ........: MySQL
-- Base de Dados(nome) ...: bdAula1Exer2Evol3
--
-- Da... | true |
af02dfa62cf07f3321feaeb92bad62b56c768e9f | SQL | Jose-Henrique-Melo/Projeto-Teste-Vendas | /src/test/resources/scripts/tests_vendas.sql | UTF-8 | 1,370 | 2.75 | 3 | [] | no_license | INSERT INTO PRODUTO (ID, DESCRICAO, PRECO, DESCONTO)
VALUES (1, 'PRODUTO TESTE COM DESCONTO', 32.00, 0.1);
INSERT INTO PRODUTO (ID, DESCRICAO, PRECO)
VALUES (2, 'PRODUTO TESTE SEM DESCONTO', 55.00);
INSERT INTO CLIENTE (ID, CPF_CNPJ, NOME_COMPLETO)
VALUES (1, '555.553.444-44', 'JOSE CLIENTE PARA TESTE 2');
INSERT IN... | true |
e59fdde1ba1e492ddfa3038ffa3125b799319da8 | SQL | kleingeist1/firewall-orchestrator | /roles/database/files/sql/creation/fworch-create-indices.sql | UTF-8 | 10,448 | 2.65625 | 3 | [
"Apache-2.0"
] | permissive |
Create unique index "firewall_akey" on "device" using btree ("mgm_id","dev_id");
Create index "kunden_akey" on "tenant" using btree ("tenant_name");
Create unique index "kundennetze_akey" on "tenant_network" using btree ("tenant_net_id","tenant_id");
Create unique index "management_akey" on "management" using btre... | true |
5b75b620b63b9e5a7c324c0486bcb416dce64a38 | SQL | zhazh/OpenBlog | /Public/db/create_table.sql | UTF-8 | 1,325 | 3.78125 | 4 | [] | no_license | /*
连接数据库后创建相关表
ob_image 图像表
ob_user: 用户表
ob_user_relation: 用户关系表,
ob_article: 微博文章表
ob_article_comment: 文章评论表
*/
create table if not exists ob_image(
id bigint not null auto_increment,
url varchar(500),
primary key(id)
);
create t... | true |
aab41e56e2ab884b944f92028ab7ac7512d617fd | SQL | SeaGoUnlimited/CitizenScienceDataManagement | /queries/weather_view.sql | UTF-8 | 408 | 2.8125 | 3 | [] | no_license | CREATE VIEW spotter_pro_weather AS
SELECT
row_id,
trip_id,
create_date,
"Beaufort Scale" AS beaufort_scale,
(COALESCE("Swell",'') || " " || COALESCE("Swell (keyboard)", '')) AS "swell",
(COALESCE("Visibility",'') || " " || COALESCE("Visbility (Keyboard)", '')) AS "visibility",
(COALESCE("Cloud Cover",'') || " " || COAL... | true |
bf06bd73377eb4683a0e6ea24d9401ed7cafe46f | SQL | radtek/abs3 | /sql/mmfo/bars/Table/dpt_vidd_branch.sql | WINDOWS-1251 | 4,279 | 3.15625 | 3 | [] | no_license |
PROMPT =====================================================================================
PROMPT *** Run *** ========== Scripts /Sql/BARS/Table/DPT_VIDD_BRANCH.sql =========*** Run *
PROMPT =====================================================================================
PROMPT *** ALTER_POLICY_INFO... | true |
3d148fcebf9922b3daaf760b9e7b4cbe4cf7876a | SQL | Kanu99/LearnMySQL | /20.USING_clause.sql | UTF-8 | 535 | 3.84375 | 4 | [] | no_license | USE sql_store;
SELECT
o.order_id,
c.first_name,
sh.name AS shipper
FROM orders o
JOIN customers c
-- ON o.customer_id = c.customer_id
USING(customer_id)
LEFT JOIN shippers sh
USING(shipper_id);
SELECT *
FROM order_items oi
JOIN order_item_notes oin
USING(order_id,product_id);
-- example
USE sq... | true |
5465c14f20e125b51d2585f64fb0db3c34b3b296 | SQL | pjainL1/AMAP_SPECTRUM | /src/sql/metro.sql | UTF-8 | 15,659 | 2.9375 | 3 | [] | no_license |
CREATE TABLE "TIMBER"."NWATCH"
( "DA" CHAR(8 CHAR),
"SPONSOR_KEY" NUMBER(*,0),
"SPONSOR_LOCATION" NUMBER(*,0),
"TRANSACTION_DATE" DATE,
"TOTAL_SPEND" NUMBER,
"TRANSACTION_COUNT" NUMBER,
"ISNEW" NUMBER(*,0)
) SEGMENT CREATION IMMEDIATE
PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 NOCOMPRESS LOG... | true |
3259ba08232e32243cf4f4d6a2d87cbdfb2d1f91 | SQL | devPablo/Apalabrados | /creacionTablas.sql | UTF-8 | 2,005 | 3.375 | 3 | [] | no_license | CREATE TABLE USUARIO
(
NOMBRE VARCHAR2(25) NOT NULL UNIQUE,
PARTIDAS_JUGADAS NUMBER DEFAULT 0,
PARTIDAS_GANADAS NUMBER DEFAULT 0,
PARTIDAS_PERDIDAS NUMBER DEFAULT 0,
CONSTRAINT USUARIO_PK PRIMARY KEY (NOMBRE)
);
CREATE TABLE TABLERO
(
ID NUMBER NOT NULL,
JUGADOR_1 VARCHAR2(25) NOT NULL,
... | true |
a5227444bcd3dcf7c154643bd6d9e13ad2cb7345 | SQL | CesarPerezMolaguero/Base-de-datos-contactos-post-usuarios | /P28-contactos.sql | UTF-8 | 2,518 | 3.421875 | 3 | [] | no_license | CREATE TABLE USUARIOS(
ID_U NUMBER(20) CONSTRAINT USUARIOS_PK PRIMARY KEY ,
USUARIO VARCHAR2(30) CONSTRAINT USUARIOS_UK1 UNIQUE
CONSTRAINT USUARIOS_NN1 NOT NULL ,
E_MAIL VARCHAR2(60) CONSTRAINT USUARIOS_UK2 UNIQUE
CONSTRAINT USUARIOS_NN2 NOT NULL ,
NOMBRE VARCHAR2... | true |
e4c973943551d0ff44a4fbf130d1c62350640a9f | SQL | mathias-mike/DBMS | /CWC.sql | UTF-8 | 7,887 | 4.5625 | 5 | [] | no_license | -- CONSISTENCY WITH CONSTRAINTS
-- Adding contraints to database assides the one provided by the data types of each columns
-- UNIQUE CONTRAINTS - Syntax
ALTER TABLE "users" ADD UNIQUE ("username");
ALTER TABLE "users" ADD CONSTRAINT "unique_usernames" UNIQUE ("username");
CREATE TABLE "users" (
"id" SERIAL,
"... | true |
788fc25eb31ee60ed686f3731878bcec681c84cc | SQL | dandraden/Database-Scripts | /Oracle/sql/SOS_CRIA_TUDO_VIEW.sql | ISO-8859-1 | 2,041 | 2.859375 | 3 | [] | no_license | rem | Gera relatrio (sos_cria_&aplic.sql) com as informaes de uma
rem | aplicacao informado
rem |
rem | parametros: nome da aplicacao
rem |
-- parametrizao necessaria
set line 132
set pause "click <enter>....."
set pause off
set heading off
set echo off
set verify off
SET FEEDBACK OFF
S... | true |
0dec0ec31394e7871002802e1021501cae9a828c | SQL | chuck-kelly/DataGrip.PokemonSqlLab | /answers/q6.sql | UTF-8 | 132 | 3.5625 | 4 | [] | no_license | --What is each pokemon's primary type?
SELECT p.name, t.name as primary_type
FROM pokemons p
JOIN types t
ON p.primary_type = t.id; | true |
99b7841555cf8c48f431a8b8494e63f80d0e1126 | SQL | lorstenoplo/GoFromScratchCourse | /Module7/goworld/dbscripts/createdb.sql | UTF-8 | 2,886 | 4.03125 | 4 | [] | no_license | /************ TABLES **************************/
-- user who books room
CREATE TABLE IF NOT EXISTS users (
id SERIAL PRIMARY KEY,
firstname VARCHAR(20),
lastname VARCHAR(20),
email VARCHAR(100) NOT NULL UNIQUE
);
-- HOTELS (hotels, guest rooms) available
CREATE TABLE IF NOT EXI... | true |
d17aceb305d184ffb51fdc5b98d7e3e85839f1ec | SQL | BinduBirol/Queries | /burner category count.sql | UTF-8 | 113 | 2.546875 | 3 | [] | no_license | select customer_id, count(*) from BURNER_QNT_CHANGE
group by customer_id
having count(*)>1
order by count(*) desc | true |
fa01e5c9ecbb5565e07537675affceace1ef4421 | SQL | maossssis/simpleforum | /core/install_update/data/v1.1.5to1.2.0.sql | UTF-8 | 2,340 | 2.96875 | 3 | [
"MIT"
] | permissive | ALTER TABLE `simple_topic` ADD COLUMN `access_auth` tinyint(1) unsigned NOT NULL default 0 AFTER `closed`;
ALTER TABLE `simple_topic` ADD COLUMN `good` smallint(6) unsigned NOT NULL default 0 AFTER `favorite_count`;
OPTIMIZE TABLE `simple_topic`;
ALTER TABLE `simple_comment` ADD COLUMN `good` smallint(6) unsigned NOT ... | true |
789b39dee679800bea9d636080ee111ff20a4509 | SQL | tongthinhung/Railway_05 | /SQL/Final_Exam_SQL2/TongThiNhung_SQL_Final Exam 2sql.sql | UTF-8 | 3,640 | 4.28125 | 4 | [] | no_license | drop database if exists ThucTap;
create database ThucTap;
use ThucTap;
-- 1. Tạo table với các ràng buộc và kiểu dữ liệu Thêm ít nhất 3 bản ghi vào table
create table GiangVien(
magv tinyint unsigned primary key,
hoten varchar(100),
luong int unsigned
);
create table SinhVien(
masv tinyint unsigned primary key,
hote... | true |
352889358d3c01d4b0010ff14d45d6fb0fe61b02 | SQL | yanguohongchen/ssc | /data/db.sql | UTF-8 | 2,459 | 3.296875 | 3 | [] | no_license |
drop database ssc_db;
create database ssc_db character set utf8 default character set utf8 collate utf8_general_ci default collate utf8_general_ci;
use ssc_db;
create table t_cq_stage
(
id varchar(255) comment "期号",
stagetime bigint comment "时间",
stagenumber varchar(255) comment '开奖号码',
c... | true |
de304828e4ce773faa0ac76c87295f3109051af0 | SQL | meliodas73/siaf | /bd/reporte-ufv.sql | UTF-8 | 365 | 2.78125 | 3 | [] | no_license | SELECT
configuraciones.ufv AS configuraciones_ufv,
configuraciones.fechaufv AS configuraciones_fechaufv,
configuraciones.idconfiguracion AS configuraciones_idconfiguracion
FROM
configuraciones configuraciones
WHERE
configuraciones.fechaufv >= $P{p_start} AND configuraciones.fechaufv <= $P{p_end}
O... | true |
0fe399464c584ffd045c125e7015a4b720485226 | SQL | truongquangkhai99/truyen | /ApplicationFile/database/4_create-trigger.sql | UTF-8 | 143 | 2.65625 | 3 | [] | no_license | create trigger truyenchu.delete_author
after delete ON truyenchu.author
for each row
update book set
authorid = 0
where authorid = OLD.authorid | true |
3e093e6fac7d2f21bcb8a7ed1727b743674dc080 | SQL | cavasanchez/TFG | /Originales/BBDD normalizadas/NewBLO3_airportcapacitiesdiscrete.sql | UTF-8 | 2,966 | 2.8125 | 3 | [] | no_license | -- MySQL dump 10.13 Distrib 5.7.18, for Linux (x86_64)
--
-- Host: 127.0.0.1 Database: NewBLO3
-- ------------------------------------------------------
-- Server version 5.7.18-0ubuntu0.16.04.1
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SE... | true |
cd1beccac72eeb5635ae7902fb0848ae5b1505b0 | SQL | dzianissokalau/sql_analysis | /sql/n_day_retention.sql | UTF-8 | 1,706 | 5.0625 | 5 | [
"MIT"
] | permissive | -- calculate retention rate for every cohort_date and day_number pair
-- calculate retention rate as proportion of users opened the app on the day N and day 0
-- solving no visits days problem with sequence generator
WITH cohorts AS (
SELECT cohort_date
, day_number
, users / MAX(users) OVER (PARTI... | true |
883d735278c7a5d82b9934ce303204baa7ba4694 | SQL | annaqiyanafy/laravelta | /laraveltugasakhir.sql | UTF-8 | 5,356 | 2.890625 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Waktu pembuatan: 02 Jun 2021 pada 17.59
-- Versi server: 10.4.13-MariaDB
-- Versi PHP: 7.4.8
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CH... | true |
75146043e666a1c544e3340093fda80d1279481d | SQL | lithium3812/ecommerce-company-database-analysis | /AnalyzingWebsitePerformance/top_entry_pages.sql | UTF-8 | 484 | 4.03125 | 4 | [] | no_license | /*
Top landing pages
*/
-- First page of each website session
CREATE TEMPORARY TABLE entry_pages
SELECT
website_session_id,
MIN(website_pageview_id) AS entry_page_id
FROM website_pageviews
GROUP BY website_session_id;
SELECT
wp.pageview_url,
COUNT(ep.website_session_id) AS sessions
FROM entry_pages AS... | true |
fa7e32885803c2f3234460a1acb80844f3004c56 | SQL | nawalpro/cours | /bd/1-sql/pratique/solutions/sql/vehiculeRougeEtVert3.sql | UTF-8 | 126 | 3.28125 | 3 | [] | no_license | select *
from vehicule
left join couleur on couleur.id = vehicule.id_couleur
where couleur.nom in ("rouge", "vert")
| true |
1a2bd5f84eb99dd7bd648a71ced0bdccfb848e4f | SQL | bshin19/class-repo | /08-01/express_calc/Unsolved/schema.sql | UTF-8 | 699 | 3.359375 | 3 | [] | no_license | -- Created the DB "wizard_schools_db" (only works on local connections)
DROP DATABASE if Exists the_office_db;
CREATE DATABASE the_office_db;
USE the_office_db;
-- Created the table "schools"
CREATE TABLE actors (
id int AUTO_INCREMENT,
name varchar(30) NOT NULL,
rating FLOAT(3) NOT NULL,
attitude varchar(30)... | true |
033233524242c2bdac6d769d776dea27f5d4afd8 | SQL | mebelousov/antlr_psql | /src/test/resources/sql/select/9743cbd9.sql | UTF-8 | 180 | 2.5625 | 3 | [
"MIT"
] | permissive | -- file:horology.sql ln:312 expect:true
SELECT '' AS four, f1 AS abstime, date(f1) AS date
FROM ABSTIME_TBL
WHERE isfinite(f1) AND f1 <> abstime 'now'
ORDER BY date, abstime
| true |
a7bdea5f57cc4f1eabcb8c8f902869475887bc99 | SQL | wolfcall/COMP353OAMC | /sql/Generated_Schema.sql | UTF-8 | 16,498 | 3.25 | 3 | [] | no_license | -- 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='TRADITIONAL,ALLOW_INVALID_DATES';
-- -----------------------------------------------------
-- Schema OAMC_2.2
... | true |
1aae0f2d97077bbe5d3fd7878a4be47d70850f0f | SQL | tsmiecho/PDS | /PersonalDataStorage/src/main/resources/init.sql | UTF-8 | 415 | 2.515625 | 3 | [] | no_license | CREATE DATABASE PDS
DEFAULT CHARACTER SET utf8
DEFAULT COLLATE utf8_polish_ci;
CREATE TABLE Person
(
id int UNSIGNED NOT NULL AUTO_INCREMENT,
name varchar(255) NOT NULL,
msisdn varchar(32) NULL,
email varchar(128) NULL,
person_comment longtext NULL,
photo_url varchar(255) NULL,
city varchar(255) NULL,
street varc... | true |
61ddb37b978239d64ee1e1509f14f06d55eba781 | SQL | jsickler/Week-3-SQL-Assignment | /assignment2.sql | UTF-8 | 1,219 | 3.609375 | 4 | [] | no_license |
-- 1. Videos Table
create table videos(uniqueID TEXT, videoLength DECIMAL, URL TEXT);
insert into videos values(
'iP1wOSsKjW8',
751,
'https://www.youtube.com/watch?v=iP1wOSsKjW8');
insert into videos values(
'FAXhXI2Gxdc',
529,
'https://www.youtube.com/watch?v=FAXhXI2Gxdc');
insert into videos values(
'6BfofgkrI... | true |
dca4246347f829e37657ad89e3ee00ae7b2f77cd | SQL | NMDSdevopsServiceAdm/NMDSDB-SFC | /UAT/V1.8-patch.sql | UTF-8 | 621 | 2.890625 | 3 | [] | no_license | -- V1.8 is post WDF Report and Revised Skeleton Record
-- identified during migration two missing countries in target database
-- LAOS and Isle of Man additional counties, but in alphabetical sequence
-- [Ilse of Man] increase sequence number after 117 (Ireland) but before (Israel)
update cqc."Country" set "Seq" = "Se... | true |
ac6b1cc308de91da87ff0b52b21fbc7fac62ed62 | SQL | kctrey/onehand | /mariadb_solitaire.sql | UTF-8 | 752 | 3.15625 | 3 | [] | no_license | CREATE DATABASE /*!32312 IF NOT EXISTS*/ `SOLITAIRE` /*!40100 DEFAULT CHARACTER SET utf8mb4 */;
USE `SOLITAIRE`;
--
-- Table structure for table `games`
--
DROP TABLE IF EXISTS `games`;
CREATE TABLE `games` (
`game_id` int(11) NOT NULL AUTO_INCREMENT,
`game_type` varchar(8) DEFAULT NULL,
`win` tinyint(4) DEFAU... | true |
ed67a6d37a2ee2d57f36c8a9a89adaa2783bbab8 | SQL | chengjingming060241/gizwits-lease | /sql/0.2/product_service_model.sql | UTF-8 | 1,276 | 3.3125 | 3 | [] | no_license | ALTER TABLE `product_service_mode`
ADD COLUMN `command` VARCHAR(500) COMMENT '在没收费模式详情的时候需要的指令,如免费模式时需要下发的指令',
ADD COLUMN `is_deleted` INT(1) NOT NULL DEFAULT 0 COMMENT '是否删除:0,否;1,是' ;
ALTER TABLE `product_service_detail`
ADD COLUMN `is_deleted` INT(1) NOT NULL DEFAULT 0 COMMENT '是否删除:0,否;1,是',
CHANGE COLUMN `num` `... | true |
64708347b63213ea28c55839bdd229924b6dc778 | SQL | ichaeeun/javaexp | /javaexp/database/a01_begin.sql | UTF-8 | 5,071 | 4 | 4 | [] | no_license | /*
# Database
1. 데이터베이스란 무엇인가?
데이터베이스는 여러 사람이 [공유]하여 사용할 목적으로 체계화를 통해, 관리하는 데이터의 집합이다.
작성된 목록으로써 여러 응용 시스템들의 [통합된 정보]들을 [저장]하여 [운영]할 수 있는
공용 데이터들의 묶음이다.
2. 웹프로그래밍에서 데이터베이스의 역할과 데이터베이스 식별
1) 고정되어 유지하는 데이터를 체계적으로 저장 관리하는 역할을 한다.
ex) 회원정보, 물품정보, 업무상 필요한 프로세스 정보
ex) 리스트 정보
select title, imgs... | true |
95dfd2a486eddaea18a711acbb0ac484f8cba7b9 | SQL | Effobless2/JCCPokemon | /Scripts/Tables/Entity.sql | UTF-8 | 278 | 2.625 | 3 | [] | no_license | CREATE TABLE Entity(
EntityId UNIQUEIDENTIFIER PRIMARY KEY DEFAULT newsequentialid(),
FrenchName nvarchar(max),
EnglishName nvarchar(max),
PokedexNumber int,
ImageUrl nvarchar(max),
EntityTypeId UNIQUEIDENTIFIER,
FOREIGN KEY (EntityTypeId) REFERENCES EntityType(TypeId)
) | true |
00c8515b7daf09672491bcf9eb9d7ed9c5a8c7d6 | SQL | sekoudosso82/InterviewPrep | /Postgresql/retrieveIiformsation.sql | UTF-8 | 2,828 | 4.09375 | 4 | [] | no_license | postgres=# \l
postgres=# \c kineteco
SELECT * FROM manufacturing.products;
SELECT COUNT (manufacturing.products.name) FROM manufacturing.products;
SELECT COUNT (name) FROM manufacturing.products;
Select count(manufacturing_cost) From manufacturing.products;
Select AVG (category_id) From manufacturing.products;
... | true |
676c02084e6c5edb85ca0803462e0dd80ed653a2 | SQL | Aliceai/StrataScratch | /Classify each business as either a restaurant, cafe, taqueria, kitchen, garden, school, or other.sql | UTF-8 | 509 | 2.921875 | 3 | [] | no_license | SELECT DISTINCT business_name,
CASE
WHEN business_name ILIKE '%restaurant%' THEN 'Restaurant'
WHEN business_name ILIKE '%cafe%' THEN 'Cafe'
WHEN business_name ILIKE '%taqueria%' THEN 'Taqueria'
WHEN business_name ILIKE '%kitchen%' THEN 'Kitchen'
WHEN busine... | true |
50c3381e29f3fdb67927767868de137e97620a53 | SQL | humblejok/jok_statistics_engine | /src/com/eim/utility/contribution/database/WEBFOLIO_PORTFOLIO_EVALUATIONS_WITHIN_PERIOD.SQL | UTF-8 | 1,254 | 3.71875 | 4 | [] | no_license | -- OK for: CH, UK, PT
SELECT pa.paseedid AS eval_id, -- Evaluation ID
pa.padate AS eval_date, -- Evaluation date
pa.internalcode AS eval_status, -- Evaluation status
pa.calculationdate AS eval_calculation_date, -- Evaluation calculation date
pa.orgarrest AS ref_eval_id, -- Reference evaluation ID
pa_ref.padate AS ref_e... | true |
390a7b7e2c8a35fd8e007ef1cc4a3b8a3ad4ace6 | SQL | huynt57/SE2014-Group-2-K57CA-UET-BlueBee | /database/uet_study1332014.sql | UTF-8 | 7,243 | 3.078125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.0.9
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Mar 12, 2014 at 06:43 PM
-- Server version: 5.5.34
-- PHP Version: 5.4.22
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
... | true |
d846a1a1ac8c1eb76530fe4b2694e6df3394e779 | SQL | icculp/holbertonschool-machine_learning | /pipeline/0x02-databases/16-glam_rock.sql | UTF-8 | 127 | 2.765625 | 3 | [] | no_license | -- SQL COMMENT
SELECT band_name, ((IFNULL(split, 2020)) - formed) AS lifespan
FROM metal_bands
WHERE style LIKE '%glam rock%'; | true |
8efc643d87486b7c7baa8d07549b1d349f56713f | SQL | phantomxc/CB-VPS | /random/cbre.sql | UTF-8 | 4,098 | 2.984375 | 3 | [] | no_license | create table employees (
id serial,
email text,
password text,
fname text,
lname text
);
create table transactions (
id serial,
client_id integer,
company_id integer,
division_id integer,
region_id integer,
area_id integer,
trans_manager integer,
property_id integer,... | true |
98a37d22844a965479d5010580c7bba250aeb8b3 | SQL | bpodgursky/hubris | /src/main/resources/com/bpodgursky/hubris/db/migration/v2_create_game_states.sql | UTF-8 | 284 | 3.140625 | 3 | [] | no_license | CREATE TABLE IF NOT EXISTS game_states (
id INT PRIMARY KEY NOT NULL AUTO_INCREMENT,
game_id INT NOT NULL,
cookies_id INT NOT NULL,
time TIMESTAMP NOT NULL,
state LONGTEXT NOT NULL,
INDEX(game_id),
FOREIGN KEY (cookies_id)
REFERENCES np_cookies(id)
) ENGINE=INNODB;
| true |
9dfc2648f2330d7a19e15f23837c9e08d37fd1ad | SQL | NICTA/TrackAssist | /sql/util/tracks_annotations.sql | UTF-8 | 206 | 3.359375 | 3 | [] | no_license | select *
from ct_tracks t
inner join ct_tracks_detections td on t.pk_track = td.fk_track
inner join ct_detections d on d.pk_detection = td.fk_detection
where t.fk_solution = 11
order by fk_detection | true |
4e1966439b187c0169ccd9622e9d13fd08e969fb | SQL | thisperfect/dhsx | /backup/database/table/faction.sql | UTF-8 | 1,376 | 3.546875 | 4 | [] | no_license | DROP TABLE IF EXISTS `faction`;
CREATE TABLE `faction`
(
`id` INTEGER NOT NULL AUTO_INCREMENT COMMENT '帮派ID'
,`class_id` INTEGER NOT NULL COMMENT '阵营阵营ID'
,`name` VARCHAR(20) NOT NULL COMMENT '帮派名称'
,`level` ... | true |
301459a69afedbcc585928cf55c4d72e3867c91e | SQL | Maruf-Reaz/SchoolManagementApp | /db_tables/db_student_deactivations.sql | UTF-8 | 721 | 2.625 | 3 | [] | no_license | /*
SQLyog Community v13.0.1 (64 bit)
MySQL - 10.1.32-MariaDB
*********************************************************************
*/
/*!40101 SET NAMES utf8 */;
create table `db_student_deactivations` (
`id` int (11),
`student_id` int (11),
`deactivation_date` date
);
insert into `db_student_deactivations` (`id... | true |
bf9b979f17768da90afc6f5748c68bd15b501fdc | SQL | OrionJoshi/SQL | /Subquries_HR_DB/problem43.sql | UTF-8 | 2,158 | 3.65625 | 4 | [] | no_license | -- 43. Write a query in SQL to display the full name,email, and
-- designation for all those employees who was hired after the employee whose ID is 165
-- Sample table: employees
-- Table
-- ---------------+-------------+-------------+----------+--------------------+------------+------------+----------+------------... | true |
c35b66ebba707f25df3761e254b1971e152271f5 | SQL | lutece-platform/lutece-core | /src/sql/upgrade/update_db_lutece_core-3.0.1-3.0.2.sql | UTF-8 | 603 | 2.84375 | 3 | [
"BSD-3-Clause",
"LicenseRef-scancode-free-unknown"
] | permissive | --
-- Table structure for table core_mail_queue
--
DROP TABLE IF EXISTS core_mail_queue;
CREATE TABLE core_mail_queue (
id_mail_queue int default 0 NOT NULL,
is_locked smallint default 0,
PRIMARY KEY (id_mail_queue)
);
CREATE INDEX is_locked_core_mail_queue ON core_mail_queue (is_locked);
--
-- Table ... | true |
a9c8558086ef8b3c5af5d3baa1e9060f50b6fa55 | SQL | sywin1004/01_sql | /day13.sql | UHC | 17,906 | 4.09375 | 4 | [] | no_license | -- day13
-------------------------------------------------
-- Ŭ Ư ÷ 2
-- : ڰ ڵ Ǵ ÷
-- 1. ROWID : ũ ġ Ű
-- ġ̹Ƿ ݵ ۿ
-- ORDER BY ʴ
-- 2. ROWNUM : ȸ ù° 1 ϴ
--------------------------------------------------------------
-- ) emp ̺ 'SMITH' ȸ
SELECT rowid -- Ŭ ִ ȸ
,... | true |
730c674e8228b2e6da160fd5c1b4669956ba9777 | SQL | dougbthompson/WC | /database/biologging.sql | UTF-8 | 21,662 | 2.90625 | 3 | [] | no_license |
CREATE TABLE acoustic_detections (
id integer NOT NULL,
file_id bigint NOT NULL,
receiver_name character varying(255) NOT NULL,
transmitter_id character varying(255) NOT NULL,
"timestamp" timestamp with time zone NOT NULL,
sensor_value real,
sensor_unit character varying(255),
duplicate... | true |
1c8bd3de3bbff6fda6c3cbb3714d4253f8027f54 | SQL | nss-day-cohort-18/Chinook-AdamMyers | /Exercises/top_2013_track.sql | UTF-8 | 915 | 4.09375 | 4 | [] | no_license | --Exercise 24
/*Provide a query that shows the most purchased track of 2013.*/
select aggregateData.Name, aggregateData.Number
from ( select Track.Name as Name, count(Track.Name) as Number
from Track
left join InvoiceLine
on Track.TrackId = InvoiceLin... | true |
9f40800bea60265d02311e42dee307dd438f6385 | SQL | Beescast/Beeslm | /No.2490-Bees-master/api/bees.sql | UTF-8 | 19,585 | 3.015625 | 3 | [] | no_license | /*
SQLyog Ultimate v11.27 (32 bit)
MySQL - 5.7.10 : Database - bees
*********************************************************************
*/
/*!40101 SET NAMES utf8 */;
/*!40101 SET SQL_MODE=''*/;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@... | true |
2e218f89084d76982fe14fe9c36d1f45a2c14784 | SQL | JiangHuYiXiao/PythonStudy | /MySQL/db1.sql | UTF-8 | 21,194 | 3.171875 | 3 | [] | no_license | /*
Navicat MySQL Data Transfer
Source Server : mysql
Source Server Version : 50505
Source Host : localhost:3306
Source Database : db1
Target Server Type : MYSQL
Target Server Version : 50505
File Encoding : 65001
Date: 2019-11-29 14:57:32
*/
SET FOREIGN_KEY_CHECKS=0;
-- ---------... | true |
43e188faa59e9ab0ecae2541cdbff4154e09669a | SQL | RachaelMSimmonds/ISTE-500-501-01 | /SQLscripts/buildDBschema.sql | UTF-8 | 2,201 | 3.921875 | 4 | [] | no_license | #Script Ver 1.2
DROP DATABASE IF EXISTS testdb;
CREATE DATABASE testdb;
USE testdb;
#Table Schema
#Ordered Tables from least to most dependencies
#Tables with zero dependencies
CREATE TABLE users (
userId int NOT NULL AUTO_INCREMENT,
firstName varchar(25) NOT NULL,
lastName varchar(25) NOT NULL,
email va... | true |
ff4217f855b1b6f8d4c1dc8f76728e4af3b33985 | SQL | fazahidah/SIPERAG | /siperag_new.sql | UTF-8 | 8,184 | 2.9375 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | -- phpMyAdmin SQL Dump
-- version 4.9.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Jun 25, 2021 at 11:09 AM
-- Server version: 10.4.11-MariaDB
-- PHP Version: 7.4.1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD... | true |
f770958dc3bb76adfefb0f3fef0856f73c94c883 | SQL | fornaroale/TapTenance | /Deliverable/Consegna x18-05-17/Progetto Marzorati (x18-05-17)/Marzorati_Tap/taptenance.sql | UTF-8 | 1,585 | 2.90625 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.6.5.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Creato il: Mag 18, 2017 alle 16:39
-- Versione del server: 10.1.21-MariaDB
-- Versione PHP: 5.6.30
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET... | true |
190955d341fd2eae0318f6785dd08f6f83f5799d | SQL | hw233/gsnkf_server_php | /module/user/doc/t_user_world.sql | UTF-8 | 922 | 3.4375 | 3 | [] | no_license | set names utf8;
create table if not exists t_user_world_0
(
pid int unsigned not null comment 'pid',
server_id int unsigned not null comment 'server_id',
base_goldnum int unsigned not null comment '创建用户所需要参考的基础金币数量',
primary key(pid,server_id)
)engine = InnoDb default charset utf8;
dr... | true |
db190c828ba56bf2a940a5650384bdfdfaff118a | SQL | aly-ba/SqlServer | /08-sql-server-xml du lourds/materials/t-sql-and-the-clr-ii-exercise-files/Examples/Aggregate.sql | UTF-8 | 542 | 3.3125 | 3 | [] | no_license | create table [#values]
(
value int
);
insert into [#values] values (1);
insert into [#values] values (2);
insert into [#values] values (1);
insert into [#values] values (2);
insert into [#values] values (null);
delete [#values] where value is null;
select dbo.SumSpecial(value) from [#values]
select Sum(value) from... | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.