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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
d19e69066221645be03b09a55230f1aa28715735 | SQL | logepoge1/electiontweets | /scripts/setup.sql | UTF-8 | 2,154 | 3.359375 | 3 | [] | no_license | CREATE USER 'twitter_user'@'localhost' identified by 'twitter_user_password';
CREATE DATABASE IF NOT EXISTS `twitter_handle` DEFAULT CHARACTER SET latin1 COLLATE latin1_swedish_ci;
GRANT ALL ON twitter_database.* TO 'twitter_user'@'localhost';
USE `twitter_twitter_database`;
CREATE TABLE IF NOT EXISTS `candidates` (
... | true |
5919b084420e34a78f7d1534262ff389ff374770 | SQL | icabezas/examenAjax | /www/instapp.sql | UTF-8 | 3,565 | 3.5625 | 4 | [] | no_license |
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*... | true |
f666d18aa50149680438553066693a6245a31680 | SQL | oramoslao/draw-manager-server | /src/DrawManager.ImportTool/Data/Sql/populate-entrants.sql | UTF-8 | 254 | 2.65625 | 3 | [
"MIT"
] | permissive | DELETE FROM "Entrants";
UPDATE SQLITE_SEQUENCE SET SEQ=0 WHERE NAME='Entrants';
INSERT INTO "Entrants" ([Code], [Name], [City])
SELECT [Identificacion] ,[Nombre] , 'NACIONAL' FROM "Data" GROUP BY [Identificacion], [Nombre];
SELECT * FROM "Entrants"; | true |
6455b888a4964339b2950a85e1c01c6db17b89b7 | SQL | StudyLzpvit/YuBlog | /.idea/dataSources/a127817b-8369-450f-bab9-60ae70f489b2/storage_v2/_staging_/schema/blog.oi8uAA/routine/user_select_by_id.EzDsJw.sql | UTF-8 | 194 | 2.8125 | 3 | [] | no_license | DROP PROCEDURE IF EXISTS user_select_by_id;
CREATE PROCEDURE user_select_by_id(IN _id INT, OUT _username VARCHAR(20))
BEGIN
SELECT username INTO _username FROM user WHERE id = _id;
END;
| true |
0f82f4b6d42bd1c21ce42a602ed36d2afc8e186f | SQL | idarlington/nsdiruptions | /flink-processor/src/main/resources/db/migration/V1__create_tables.sql | UTF-8 | 222 | 2.578125 | 3 | [] | no_license | CREATE TABLE disruptions(
"station_code" VARCHAR(100) NOT NULL,
"start_time" VARCHAR(100) NOT NULL,
"end_time" VARCHAR(100) NOT NULL,
CONSTRAINT disruptions_pkey PRIMARY KEY (station_code, start_time, end_time)
);
| true |
ab4758fec523a02e758f2a6a1c6b7f571507d3f0 | SQL | Zloied/CarRental | /src/main/resources/SQL tables 2.1.sql | UTF-8 | 937 | 3.546875 | 4 | [] | no_license | CREATE TABLE car_rental.users(
id BIGINT PRIMARY KEY,
name VARCHAR(30),
password VARCHAR(30),
role VARCHAR(8),
status VARCHAR(12),
email VARCHAR(30)
);
CREATE TABLE car_rental.cars(
id BIGINT PRIMARY KEY ,
model VARCHAR(30),
mark VARCHAR(30),
car_class VARCHAR(12),
cost INT
);
CREATE TABLE c... | true |
bca0e282867ceaa3a0057c4fc7623a499c3b9f6f | SQL | xiaosatufu/thinkphp-oa-demo | /thinkphp-oa-sql/sp_knowledge.sql | UTF-8 | 1,420 | 2.875 | 3 | [] | no_license | /*
Navicat MySQL Data Transfer
Source Server : localhost
Source Server Version : 50709
Source Host : localhost:3306
Source Database : db_oa
Target Server Type : MYSQL
Target Server Version : 50709
File Encoding : 65001
Date: 2017-02-23 11:34:52
*/
SET FOREIGN_KEY_CHECKS=0;
-- ---... | true |
708e0d39039d38bb2b0a51f588318c20e91bf410 | SQL | turntlane/sql-basics | /invoice.sql | UTF-8 | 565 | 3.453125 | 3 | [] | no_license | SELECT * FROM invoice
SELECT
COUNT(*)
FROM
invoice
WHERE
billing_country ~ 'USA'
SELECT MAX(total)
FROM invoice
SELECT MIN(total)
FROM invoice
SELECT
total
FROM
invoice
WHERE
total > 5;
SELECT
COUNT(total)
FROM
invoice
WHERE
total < 5
SELECT * FROM invoice
SELECT COUNT(total... | true |
9e2c13fcd8dd0359645c347fa33e77242520bff2 | SQL | letannguyen/quanlixemay | /qlxemay1.sql | UTF-8 | 17,597 | 3.578125 | 4 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Máy chủ: 127.0.0.1
-- Thời gian đã tạo: Th4 09, 2021 lúc 03:09 AM
-- Phiên bản máy phục vụ: 8.0.21
-- Phiên bản PHP: 7.4.8
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_... | true |
136f09701ae5a0e1d67e7a40b309a06f89626f3f | SQL | myzero1/yii2-restbyconf | /src/example/models/z1_user.sql | UTF-8 | 1,249 | 2.921875 | 3 | [
"MIT"
] | permissive | /*
Navicat MySQL Data Transfer
Source Server : 127.0.0.1
Source Server Version : 50505
Source Host : localhost:3306
Source Database : yii2advanced
Target Server Type : MYSQL
Target Server Version : 50505
File Encoding : 65001
Date: 2019-10-31 10:49:10
*/
SET FOREIGN_KEY_CHECKS=0;
... | true |
0bc1936c1f98980bd7370dd2795508c86de4f5bb | SQL | ozonva/ova-purchase-api | /db/migration/20210903120708_init.sql | UTF-8 | 840 | 3.578125 | 4 | [] | no_license | -- +goose Up
-- +goose StatementBegin
create table purchases
(
id bigserial primary key,
user_id bigint,
total float8,
created_at timestamp default now() not null,
updated_at timestamp not null,
status varchar(255) not null
);
-- +goose StatementEnd
-... | true |
7d53f2fff37eb8303bda9a8e45469e9f8d3ed782 | SQL | NapStudio/ficBlog | /src/sql/test-data.sql | UTF-8 | 2,779 | 2.796875 | 3 | [] | no_license | -- Inserts some test data into the tables
INSERT INTO usuario VALUES ('Christopher', 'Gomez', 'chrisgomez', '123456', 'chris', true);
INSERT INTO usuario VALUES ('SMITH', 'CLERK', 'SmithClerk', '123456', 'clerk', true);
INSERT INTO usuario VALUES ('ALLEN', 'SALESMAN', 'ALLENSALESMAN', '123456', 'ALLEN', true);
INSERT I... | true |
abbf08080430411900fe8843de7917a4750027ee | SQL | shreyasabharwal/Estimating-On-street-Paid-Parking-Occupancy | /PostgreSQL Scripts/join.sql | UTF-8 | 8,569 | 3.734375 | 4 | [] | no_license | SELECT a.*
,parking_spaces as total_spots_survey
,total_vehicle_count as occupied_spots_survey
,study_time as time_of_survey
,w."hour" as weather_at_hour
,w."AvgTempF" as average_temp
,w."TotPrecin" as rain_inches
,w."RelHum" as humidity
,g."FAC_NAME" as parking_lot_name
,g."RTE_1HR"... | true |
656d1eb1b6efe2101042dcbf4be0d9dd17d3750e | SQL | sprokushev/Delphi | /MASTER/_DATABASE/Procedures/RENEW_KLS_TABLPOK.sql | UTF-8 | 1,314 | 3.359375 | 3 | [] | no_license | --
-- RENEW_KLS_TABLPOK (Procedure)
--
CREATE OR REPLACE PROCEDURE MASTER.RENEW_KLS_TABLPOK (DATE_BEG DATE:=TRUNC(SYSDATE,'MONTH') ,DATE_END DATE:=SYSDATE, param1 VARCHAR2:='', param2 VARCHAR2:='', param3 VARCHAR2:='') IS
BEGIN
-- RETURN;
UPDATE KLS_TABLPOK
SET (NPP,SORTBY,NORMTU,DATEUPLOAD) =
(SELECT A.NPP... | true |
283ff7595d3f391ccdf27cd776f676341ba98b86 | SQL | SunRey/Database_Exercises | /join_exercises.sql | UTF-8 | 2,174 | 4.09375 | 4 | [] | no_license | INSERT INTO users (name, email, role_id) VALUES
('sam', 'sam@example.com', 2),
('jule', 'jule@example.com', 2),
('eli', 'eli@example.com', 2),
('rob', 'rob@example.com', null);
SELECT *
FROM users AS u
JOIN roles AS r ON u.role_id = r.id;
SELECT *
FROM users AS u
LEFT JOIN roles AS r ON u.role = r.id;
SELECT *
FRO... | true |
e447f0431b8c34589afb33126952636e2bf68274 | SQL | rosylu/Mysql | /chiehjul_pa2/q11.sql | UTF-8 | 916 | 4.09375 | 4 | [] | no_license | SELECT f1, f2, count(*) as cnt
FROM (
SELECT r1.customer_id, r1.rental_date as r1_rd, r1.film_id as f1,
r2.rental_date as r2_rd, r2.film_id as f2
FROM (
SELECT film_id, customer_id, rental_date
FROM sakila.inventory inv, sakila.rental ren
WHERE inv.inventory_id = ren.inventory_id
) r1, (
SELECT film_id, c... | true |
4ab00820dd0e7574bad6970c2276ed0a17da3d20 | SQL | patrickelliott/Powershell_Scripts | /ADHOC_STUDENT_NOTES/STUDENTNOTES.sql | UTF-8 | 355 | 3.4375 | 3 | [] | no_license | select n.pupil_number, sc.school, coalesce(N.MOD_DATE, n.entry_date) Note_Date, replace(replace( (select EDP_CONV.note_long_to_varch (n.pupil_number, coalesce(N.MOD_DATE, n.entry_date)) from dual), CHR(10)), CHR(13)) from notes n
inner join students s on n.pupil_number = S.PUPIL_NUMBER
inner join schools sc on S.SCHO... | true |
ab44e79ab9f8ca133ed48db7c94e82758fa1bff0 | SQL | kiranjv/iphonescell | /build/App Store-iphoneos/safecell 2.app/migration-4.sql | UTF-8 | 2,298 | 3.09375 | 3 | [] | no_license | CREATE TABLE IF NOT EXISTS "emergency_contacts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL , "name" VARCHAR, "number" VARCHAR);
DROP TABLE IF EXISTS "fake_location_manager_settings";
CREATE TABLE IF NOT EXISTS "fake_location_manager_settings" ("id" INTEGER PRIMARY KEY NOT NULL ,"item" TEXT NOT NULL ,"value"... | true |
16a983701fb44a8af9c2557fe8f7cd8c733c8ef8 | SQL | hxmn/WIM | /WIM/MViews_Obsolete/Install/BUSINESS_ASSOCIATE.sql | UTF-8 | 4,214 | 3.421875 | 3 | [] | no_license | DROP MATERIALIZED VIEW PPDM.BUSINESS_ASSOCIATE;
CREATE MATERIALIZED VIEW PPDM.BUSINESS_ASSOCIATE
TABLESPACE PPDMDATA
PCTUSED 40
PCTFREE 0
INITRANS 2
MAXTRANS 255
STORAGE (
INITIAL 1M
NEXT 1040K
MINEXTENTS 1
MAXEXTENTS ... | true |
899e4055bb411dce4a73bfaaf3c6085de8215531 | SQL | edu-go/java-bootcamp | /TopicFINALPROJECT/src/main/resources/import.sql | UTF-8 | 1,778 | 2.734375 | 3 | [
"Apache-2.0"
] | permissive | INSERT INTO category (description, name) VALUES('Smartphones, etc', 'Celulares');
INSERT INTO category (description, name) VALUES('Smart TV, LCD, Plasma, etc', 'Televisores');
INSERT INTO category (description, name) VALUES('Mouse, Teclados, etc', 'Perifericos');
INSERT INTO product (description, name, price, quantity... | true |
2b48ba5be59b912ea5ab6952522fca68ec80cc06 | SQL | NaydenPaunov/Software-University | /MySQL-Database Basics/Lab and Exercises/Buildin_functions - Database Basics - Exercises.sql | UTF-8 | 2,475 | 4.0625 | 4 | [] | no_license | /*USE soft_uni;*/
/* exr 1 */
/*
SELECT first_name,last_name FROM employees
WHERE SUBSTRING(first_name,1,2) = 'Sa';
*/
/* exr 2 */
/*
SELECT first_name,last_name FROM employees
WHERE last_name LIKE '%ei%' ORDER BY employee_id;
*/
/* exr 3 */
/*
SELECT first_name FROM employees
WHERE department_id IN(3,10) AND YEAR... | true |
bf3f1de68f83005e28467faea4059c138e0842a3 | SQL | jdavid459/ca-providers-py | /sql/highestproviders_zipcode.sql | UTF-8 | 984 | 3.828125 | 4 | [] | no_license | -- This SQL takes the liberty of assuming the CSVs in /outputs are tables in a database.
/* I'd take a longer look at this one with more time. I don't have address nor zip in the API data. Maybe its worth joining to one of the other
data sets to get that info - though it might be inexact. For now I'm just using th... | true |
db60c4e0c81dad9ed0cef7b5cd71aa3b7c429fe5 | SQL | kalyan0510/Airport-Website | /airport.sql | UTF-8 | 4,296 | 3.359375 | 3 | [] | no_license | CREATE database IF NOT EXISTS Airport;
USE Airport;
CREATE TABLE plane(
plane_id int ,
service_years int,
serviced_on TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
color varchar(10),
PRIMARY KEY(plane_id)
);
CREATE TABLE plane_type(
model_id int,
model_name varchar(20),
weight double,
PRIMARY KEY(model_id)
);
CREATE T... | true |
c998000d164271d03400201a8c7cb08cb349e0cd | SQL | Wilczek01/alwin-projects | /alwin-middleware-grapescode/db-schema/src/main/dbschema/1.3.0/ddl/003_alter_issue_type_duration.sql | UTF-8 | 583 | 2.875 | 3 | [] | no_license | ALTER TABLE ISSUE_TYPE_DURATION RENAME TO ISSUE_TYPE_CONFIGURATION;
ALTER TABLE ISSUE_TYPE_CONFIGURATION
ADD COLUMN create_automatically BOOLEAN NOT NULL DEFAULT FALSE,
ADD COLUMN dpd_start NUMERIC(4),
ADD COLUMN min_balance_start NUMERIC(18, 2);
COMMENT ON COLUMN ISSUE_TYPE_CONFIGURATION.create_automatically ... | true |
51b485a5f457da600a63f64a84488176f870d9c9 | SQL | hortonworks/cloudbreak | /freeipa/src/main/resources/schema/app/20210803104047_CB-13650_freeipa_multiaz_support.sql | UTF-8 | 4,420 | 3.8125 | 4 | [
"LicenseRef-scancode-warranty-disclaimer",
"ANTLR-PD",
"CDDL-1.0",
"bzip2-1.0.6",
"Zlib",
"BSD-3-Clause",
"MIT",
"EPL-1.0",
"LicenseRef-scancode-proprietary-license",
"LicenseRef-scancode-jdbm-1.00",
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | -- // CB-13650 Integrate Multi AZ with FreeIPA controller layer
-- Migration SQL that makes the change goes here.
CREATE TABLE IF NOT EXISTS instancegroupnetwork (
id bigint NOT NULL,
cloudPlatform CHARACTER VARYING(255),
attributes TEXT,
stack_network_id bigint,
instancegroup_id bigint,
subnet... | true |
1214730b876cb98e5dd5519fac259e0e2e04c4f6 | SQL | hispindia/HP-2.7 | /resources/sql/recreate_datamart_indexes.sql | UTF-8 | 927 | 2.90625 | 3 | [
"BSD-3-Clause"
] | permissive | drop index aggregateddatavalue_index;
drop index aggregatedindicatorvalue_index;
drop index aggregateddatasetcompleteness_index;
drop index aggregatedorgunitdatavalue_index;
drop index aggregatedorgunitindicatorvalue_index;
CREATE INDEX aggregateddatavalue_index ON aggregateddatavalue (dataelementid, categoryoptioncom... | true |
ad60bb087086628057548485ee8ff26b5a752af1 | SQL | ESR97/NNMySQL | /sql/group_by.sql | UTF-8 | 2,644 | 3.984375 | 4 | [] | no_license | CREATE table dept(
deptno mediumint unsigned not null default 0,
dname varchar(20) not null default "",
loc varchar(13) not null default ""
);
INSERT into dept values(10, 'ACCOUNTING', 'NEW YORK'),
(20, 'RESEARCH', 'DALLAS'),
(30, 'SALES', 'CHICAGO'),
(40, 'OPERATIONS', 'BOSTON');
CREATE TABLE... | true |
5fff629b861d80cc9a744df5cf6b3533bc61c2ec | SQL | exastro-suite/it-automation | /ita_install_package/ITA/ita-sqlscripts/ja_JP_mysql_ita_model-m.sql | UTF-8 | 140,233 | 3.078125 | 3 | [
"Apache-2.0",
"LGPL-3.0-only",
"MIT"
] | permissive | -- *****************************************************************************
-- *** ***** CreateParameterMenu Tables ***
-- *****************************************************************************
-- -------------------------
-- パラメータシート作成情報
-- -------------------------
CRE... | true |
308e84f9368d551e8cc69206adc16871cd0f3797 | SQL | OneDrizzle/UnitIT | /UnitITICBM/idunno.sql | UTF-8 | 1,256 | 3.640625 | 4 | [] | no_license | CREATE TABLE CITypes(
TypeID INT PRIMARY KEY,
TypeName VARCHAR(50));
CREATE TABLE CIs(
CI_ID INT PRIMARY KEY IDENTITY (1,1),
TypeID INT,
AttributeMappingID INT,
CustomerID INT,
ServiceID INT);
CREATE TABLE Attributes(
AttributeID INT PRIMARY KEY,
AttributeName VARCHAR(50),
StringValue VARCHAR(50),
TemplateName VARCH... | true |
0abbbc8037e9c785dbe5c03bec4140c8c248fd0e | SQL | kusalTest/php-example | /invapp/invapp.sql | UTF-8 | 3,035 | 3.09375 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | -- phpMyAdmin SQL Dump
-- version 4.7.0
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Generation Time: Mar 07, 2018 at 05:02 PM
-- Server version: 10.1.25-MariaDB
-- PHP Version: 5.6.31
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OL... | true |
d376f364ec75943927b4c0cfc9ba7f1720ab6fce | SQL | devanshsharma-bigdata/HackerRank-Solutions | /SQL Project Planning.sql | UTF-8 | 331 | 3.71875 | 4 | [
"MIT"
] | permissive | select proj1.start_date,
(select min(proj2.end_date) from projects proj2 where proj2.end_date not in (select start_date from projects) and proj2.end_date > proj1.start_date) as req_date
from projects proj1 where proj1.start_date not in (select end_date from projects)
order by req_date-proj1.start_date asc, proj1.start... | true |
5a6742c5c96f674968946a5f6c62f4309fb13e5e | SQL | Emerson-Gabriel/tecwebc | /SQLs/bd - Copia - Copia - Copia.sql | UTF-8 | 18,558 | 3.34375 | 3 | [] | no_license | -- --------------------------------------------------------
-- Servidor: 127.0.0.1
-- Versão do servidor: 5.7.20 - MySQL Community Server (GPL)
-- OS do Servidor: Win32
-- HeidiSQL Versão: 9.5.0.5284
-- --------------------------------------------------------
/*... | true |
b838127db484ea61250bec03c01c78bf45741418 | SQL | shiguosun/scripts | /other/database/result/scripts/20120110063007_create_mission.sql | UTF-8 | 542 | 2.75 | 3 | [] | no_license | --// Create new table.
SET NAMES UTF8;
DROP TABLE IF EXISTS mission;
CREATE TABLE IF NOT EXISTS mission (
`id` integer,
`uid` bigint(20),
`mainmission_id` integer NOT NULL DEFAULT '2',
`mainmission_status` integer NOT NULL DEFAULT '0',
`submission_id` integer NOT NULL DEFAULT '0',
`submission_status` intege... | true |
93edfddd6ae31cc7097e08a77e7a27fed53443fd | SQL | Wendy-Omondi/alx-backend-storage | /0x00-MySQL_Advanced/4-store.sql | UTF-8 | 182 | 3.140625 | 3 | [] | no_license | -- SQL script that creates a trigger
CREATE TRIGGER order_decrease BEFORE INSERT ON orders
FOR EACH ROW UPDATE items
SET quantity = quantity - NEW.number
WHERE name = NEW.item_name;
| true |
97e0c74ce09d6840376ca7748e5d3cf8edaaa012 | SQL | LiuYuann/PHP-Advanced-Programming | /sql/itcast_goods.sql | UTF-8 | 2,441 | 3.1875 | 3 | [
"Apache-2.0"
] | permissive | /*
Navicat MySQL Data Transfer
Source Server : t2
Source Server Type : MySQL
Source Server Version : 100208
Source Host : localhost:3306
Source Schema : web
Target Server Type : MySQL
Target Server Version : 100208
File Encoding : 65001
Date: 05/05/2018 14:50:00
*/
... | true |
eea1961c7b70cf4edf99143bc4c840e3e7179aeb | SQL | shanewwarren/amazon-scraper | /db/schema.sql | UTF-8 | 686 | 3.140625 | 3 | [] | no_license | DROP TABLE IF EXISTS Store;
CREATE TABLE Store (
Id INTEGER PRIMARY KEY
Name TEXT
);
DROP TABLE IF EXISTS Product;
CREATE TABLE Product(
Id INTEGER PRIMARY KEY,
Name TEXT,
Description TEXT,
Price DECIMAL,
StoreId INTEGER,
Url TEXT,
Created DATETIME,
Modified DATETIME
);
DROP TABLE IF EXISTS Change... | true |
872995c5a54bc535d7e5354d228c67e97ccfc12f | SQL | dxccm666/reportcenter | /ReportCenter/ReportCenter/sql/01_core/07_reports/03_reportparameters.sql | UTF-8 | 1,130 | 3.78125 | 4 | [] | no_license | CREATE SEQUENCE REPORTPARAMETERSEQ;
CREATE TABLE REPORTPARAMETERS (
ID VARCHAR2(10) NOT NULL,
ROWSTAMP VARCHAR2(10) NOT NULL,
REPORTID VARCHAR2(10) NOT NULL,
PARAMETERNUMBER NUMBER(5) DEFAULT 1 NOT NULL,
PARAMETER VARCHAR2(200),
PARAMETERTYPE VARCHAR2(20),
LISTNAME VARCHAR2(200),
PRIMARY KEY (ID),
CONSTRAINT ... | true |
d2beb2cb29a6a783fe95ec887f997eb69068daa7 | SQL | hpereira98/MDDBS-NorthWind | /etl/data_warehouse_creation.sql | UTF-8 | 8,578 | 3.65625 | 4 | [] | 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='ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTI... | true |
e16d9d5e29b81070a8eb46fe2778bbf479023705 | SQL | awatin/idena-indexer | /resources/scripts/explorer/identityRewardsOld.sql | UTF-8 | 482 | 3.71875 | 4 | [] | no_license | select a.address,
ei.epoch,
0 block_height,
vr.balance,
vr.stake,
dert.name "type"
from validation_rewards vr
join epoch_identities ei on ei.address_state_id = vr.ei_address_state_id
join address_states s on s.id = ei.address_state_id
join addresses ... | true |
524971ff028f8a9ad3bb5a7c3ba951f633930986 | SQL | marianarinaldi/project-research | /db/research.sql | UTF-8 | 2,442 | 3.296875 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 5.0.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Jul 26, 2021 at 10:26 PM
-- Server version: 10.4.17-MariaDB
-- PHP Version: 7.3.25
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIE... | true |
035be9a4c5b535345768da4276d6fb24756f1566 | SQL | AnaiDominick/burger | /db/schema.sql | UTF-8 | 334 | 3.296875 | 3 | [] | no_license | -- Drops the todolist if it exists currently --
DROP DATABASE IF EXISTS burgers_db;
-- Creates the "todolist" database --
CREATE DATABASE burgers_db;
USE burgers_db;
CREATE TABLE 'burgers' (
'id' Int( 11 ) AUTO_INCREMENT NOT NULL,
'burger_name' varchar(255) NULL,
'devoured' boolean,
PRIMARY KEY ( 'id' )
);
SELECT *... | true |
e6bc272718b4f3bb881801ba395adc62b80d359d | SQL | bbakdoga/StudentTracker | /api/database/queries/DeleteUserGroup/DeleteUserGroupInteractions.sql | UTF-8 | 199 | 2.953125 | 3 | [] | no_license | delete interaction from interaction
join student_tracker.group on interaction.int_grp_id = student_tracker.group.grp_id
where student_tracker.group.grp_id= ? and student_tracker.group.grp_usr_id = ?; | true |
c5307d88074b9d32771a351b532907b2fa9ef165 | SQL | JavierHerreraM/take-notes-database | /procedures/notes/select_notes.sql | UTF-8 | 410 | 3.359375 | 3 | [] | no_license | DELIMITER $$
CREATE PROCEDURE `select_notes`(user_id_value INT, skip_number_value INT, amount_records_value INT)
BEGIN
IF skip_number_value IS NULL OR amount_records_value IS NULL THEN
SELECT note_id, title, text FROM notes WHERE user_id = user_id_value;
ELSE
SELECT note_id, title, text FROM notes WHERE user_id =... | true |
2c3c6cfa010950d0b68cdd0e15b09b57f6e3254e | SQL | marinaguzvic/PicketLinkSecurity | /ControllerUserMenagementSystem/src/main/resources/database/token_base.sql | UTF-8 | 11,501 | 2.890625 | 3 | [] | no_license | /*
SQLyog Community v13.1.2 (64 bit)
MySQL - 10.1.38-MariaDB : Database - token_base
*********************************************************************
*/
/*!40101 SET NAMES utf8 */;
/*!40101 SET SQL_MODE=''*/;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREI... | true |
e110bc2d4a9f6df925182d20934efe0aa27a2948 | SQL | xp137221357/sql_personal_business | /2017-03-06/qwe.sql | UTF-8 | 888 | 3.453125 | 3 | [] | no_license |
select * from(
select distinct o.USER_ID USER_ID_, u.*-- ,te.CHANNEL_NO
from game.t_order_item o
inner join forum.t_user u on u.USER_code=o.USER_ID and o.CHANNEL_CODE='jrtt-jingcai'
-- inner join forum.t_user_event te on u.USER_ID=te.USER_ID and t... | true |
a8ce58a8db5e6bbc5a96bdcf410f1d3296adad91 | SQL | ProjetWeb-TodoApp/Application-Todo-listes | /base_todo_app.sql | UTF-8 | 8,076 | 3.359375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.7.0
-- https://www.phpmyadmin.net/
--
-- Hôte : 127.0.0.1
-- Généré le : ven. 22 juin 2018 à 16:51
-- Version du serveur : 5.7.17
-- Version de PHP : 5.6.30
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OL... | true |
3f961b84837b8308f11db027ba0a011f4b7aa739 | SQL | callmewindow/AppPlatService | /resources/database/appplat20150606.sql | UTF-8 | 11,187 | 2.875 | 3 | [] | no_license | /*
Navicat MySQL Data Transfer
Source Server : localhost
Source Server Version : 50528
Source Host : localhost:3306
Source Database : appplat
Target Server Type : MYSQL
Target Server Version : 50528
File Encoding : 65001
Date: 2015-06-06 15:26:43
*/
SET FOREIGN_KEY_CHECKS=0;
-- --... | true |
9373f940f437b52c5f8c4b95aab94ac5d74de3ac | SQL | angel202001/Intro_javascript | /ejercicio con datos/ejercicio_Vargas_Angel.sql | UTF-8 | 1,027 | 3.5 | 4 | [] | no_license |
// Querys de la practica
1- SELECT nombre_tienda , estado, FROM tienda WHERE estado ='WA';
2- SELECT tipo FROM titulos;
3- SELECT titulo, fecha_pub FROM titulos;
4- SELECT titulo, precio FROM titulos WHERE precio >10;
5- SELECT titulo, tipo FROM titulos WHERE tipo ='business';
6- SELECT titulo FROM titulos WH... | true |
0189b9f1bd970fc41c9cecd3eb3abef92e31cb82 | SQL | MrD0079/portal | /sql/vacation_create_replacement.sql | UTF-8 | 507 | 2.703125 | 3 | [] | no_license | /* Formatted on 23/06/2015 13:24:12 (QP5 v5.227.12220.39724) */
SELECT u.tn,
u.fio,
u.pos_name,
u.dpt_name,
d.sort,
a.*
FROM user_list u, departments d, assist a
WHERE d.dpt_id = u.dpt_id
AND u.datauvol IS NULL
AND u.is_spd = 1
AND u.t... | true |
33b2da2dbf0d69718c04c1783d499e39d00115a4 | SQL | sabrina170/InvenUsu | /inventariobd.sql | UTF-8 | 3,092 | 3.171875 | 3 | [] | no_license |
-- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Servidor: 127.0.0.1
-- Tiempo de generación: 12-06-2020 a las 23:47:19
-- Versión del servidor: 10.4.11-MariaDB
-- Versión de PHP: 7.4.6
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OL... | true |
c97efb808a69a7cfe3d48d8b6c4e83923a6384f1 | SQL | keithj0nes/personalproject | /db/get_product_by_name.sql | UTF-8 | 400 | 4.125 | 4 | [] | no_license | -- SELECT * FROM products WHERE UPPER(name) LIKE UPPER($1);
SELECT DISTINCT on (products.id) products.*, prices.price FROM products
INNER JOIN product_price_size ON products.id = product_price_size.productId
INNER JOIN prices ON prices.id = product_price_size.priceId
WHERE UPPER(name) LIKE UPPER($1) AND active = true... | true |
5873c71adc3e0445fb99d67bc9b23f1d3cf795ec | SQL | aselvendran/SampleCode | /airflow_code_sample_data_migration/sql/create_analytics_staging_tables.sql | UTF-8 | 487 | 3.09375 | 3 | [] | no_license |
--- Analytics Address table
CREATE TABLE public.address(
account_id integer,
address_1 text,
city text,
state text,
zip text
);
--- Analytics Account table
CREATE TABLE public.account(
id integer,
name text,
account_number text,
status text
);
--- Analytics Statement table
C... | true |
8af00504a1e429d34b0a4b7d50b6d78ab5b57fe8 | SQL | rmntiwari/myci | /codeigniter_pagination/application/models/info.sql | UTF-8 | 1,644 | 3.078125 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | -- phpMyAdmin SQL Dump
-- version 4.0.4
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Nov 28, 2014 at 12:16 PM
-- Server version: 5.6.12-log
-- PHP Version: 5.4.16
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT ... | true |
7733fd546f31dddbfe04ce73d79417127a3381b6 | SQL | aragonopendata/Huracan | /gpx_sql_schemas/track_points.sql | UTF-8 | 2,179 | 3.078125 | 3 | [] | no_license | --
-- PostgreSQL database dump
--
SET statement_timeout = 0;
SET lock_timeout = 0;
SET client_encoding = 'UTF8';
SET standard_conforming_strings = on;
SET check_function_bodies = false;
SET client_min_messages = warning;
SET search_path = public, pg_catalog;
SET default_tablespace = '';
SET default_with_oids = fals... | true |
9291f6fea72a06d4751ba5859fa3670ab2d4441b | SQL | Alamin-Juma/School-mobile-game-platform | /game.sql | UTF-8 | 2,173 | 3.109375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.9.0.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Mar 12, 2020 at 06:00 PM
-- Server version: 10.4.6-MariaDB
-- PHP Version: 7.1.32
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @O... | true |
c3ddf2caa94439e52a6fe33f6834576f6046eae2 | SQL | CarlosGutierrezArdila/BeegoAPIDockerExample | /db_files/db_prueba_docker.sql | UTF-8 | 1,311 | 3.421875 | 3 | [] | no_license | -- Database generated with pgModeler (PostgreSQL Database Modeler).
-- pgModeler version: 0.9.2-alpha1
-- PostgreSQL version: 11.0
-- Project Site: pgmodeler.io
-- Model Author: ---
-- Database creation must be done outside a multicommand file.
-- These commands were put in this file only as a convenience.
-- -- obj... | true |
ab49bc592ca8b894e2ff4c80e8056a77b13f6ee6 | SQL | dbalinux237/OraclePerfSurvivalGuide | /Ch23/flush_time.sql | UTF-8 | 1,506 | 3.34375 | 3 | [] | no_license | rem ***********************************************************
rem
rem File: flush_time.sql
rem Description: redo log flush frequency and wait times
rem
rem From 'Oracle Performance Survival Guide' by Guy Harrison
rem Chapter 23 Page 682
rem ISBN: 978-0137011957
rem See www.guyharrison.net for further... | true |
d87e785407b48d148c239554d1f7d3176ccce9ee | SQL | Perl-Evozon/PearlBee | /db_patches/setup_pgsql.sql | UTF-8 | 4,509 | 3.796875 | 4 | [] | no_license | CREATE TYPE user_status AS ENUM (
'deactivated',
'activated',
'suspended',
'pending'
);
CREATE TYPE user_roles AS ENUM (
'author',
'admin'
);
CREATE TYPE post_status AS ENUM (
'published',
'trash',
'draft'
);
CREATE TYPE comment_status AS ENUM (
'approved',
'spam',
'pe... | true |
3cabe4cad8309f7f31daeb675056794f4c7ab42e | SQL | Robinkolk100/inf1a-herkansing | /sql_collection.sql | UTF-8 | 1,450 | 3.359375 | 3 | [
"MIT"
] | permissive |
--standard insert functions for all tables
INSERT INTO `users` (`userID`, `userName`, `userEmail`, `userPass`) VALUES ('', '', '', '');
INSERT INTO `projects` (`projectID`, `projectGroup`, `projectPeriode`, `projectYear`, `ProjectName`) VALUES (NULL, '', '', '', '');
INSERT INTO `documents` (`documentID`, `document... | true |
eed22e165f0f5dc5b6f7b75492ac0f77573b63aa | SQL | team-chim/ddl | /sql_construct/11_table_semester.sql | UTF-8 | 654 | 3.046875 | 3 | [] | no_license | USE rexchula;
DROP TABLE IF EXISTS semester;
CREATE TABLE semester
(
`Year` INT UNSIGNED,
Semester INT UNSIGNED,
SemesterStartDate DATE NOT NULL,
SemesterEndDate DATE NOT NULL,
RegisterStartDate DATE NOT NULL,
RegisterEndDate DATE NOT NULL,
AddingStartDate DATE NOT NULL,
AddingEndDate DAT... | true |
cde76addb71d5d1404f3a3e83a8e9ecb08252c60 | SQL | sanv2c18471/sql | /SQLQuery8.sql | UTF-8 | 7,992 | 3.59375 | 4 | [] | no_license | create table Rk_TableCustomers
(
CustomersID int identity(1,1) primary key,
CustomersName varchar(100),
CustomersCity varchar(100),
CustomersMail varchar(100)
)
select * from Rk_TableCustomers
insert into Rk_TableCustomers( CustomersName, CustomersCity,CustomersMail) values('Mohan','Salem','Mohan... | true |
b21bea36c517dbce35c658ffaafda18791c2b934 | SQL | guobaolin/SelfServer | /spring-cloud-micro/txlcn-server/doc/t_tx_exception.sql | UTF-8 | 1,246 | 3.1875 | 3 | [] | no_license | /*
Navicat MySQL Data Transfer
Source Server : 192.168.120.141
Source Server Version : 80016
Source Host : 192.168.120.141:3306
Source Database : tx-manager
Target Server Type : MYSQL
Target Server Version : 80016
File Encoding : 65001
Date: 2019-07-12 10:58:02
*/
create database ... | true |
062642599e11926dca6cd2975a3c14831badd132 | SQL | nhenault/CSCI_3308_Team_105-7_Project_Code | /BackEnd/plantdb.sql | UTF-8 | 2,868 | 2.828125 | 3 | [] | no_license | --
-- PostgreSQL database dump
--
-- Dumped from database version 10.12 (Ubuntu 10.12-0ubuntu0.18.04.1)
-- Dumped by pg_dump version 10.12 (Ubuntu 10.12-0ubuntu0.18.04.1)
SET statement_timeout = 0;
SET lock_timeout = 0;
SET idle_in_transaction_session_timeout = 0;
SET client_encoding = 'UTF8';
SET standard_conforming... | true |
6be6f2ec8d93a70f9443344512c6e02cf9ebe0a5 | SQL | Anythingwill/fydp | /fydp/sql/useful.sql | UTF-8 | 1,127 | 3.328125 | 3 | [] | no_license | --DROP TABLE IF EXISTS Sensor1;
--CREATE TABLE Sensor1(flow DOUBLE NOT NULL, sensTime DATETIME NOT NULL);
INSERT INTO Sensor1 VALUES(4, NOW());
SELECT * FROM Sensor1 ORDER BY sensTime;
--SELECT * FROM Sensor1 ORDER BY sensTime HAVING sensTime <= STR_TO_DATE('2013,7,24', '%Y,%m,%d');
--SELECT * FROM Sensor1 WHE... | true |
937641bb51b404363ec1899d275ef59fe0d80532 | SQL | davidnd/fyp-patent-analysis | /scripts/trigger_on_count_subclass.sql | UTF-8 | 356 | 3.578125 | 4 | [] | no_license | USE patent;
drop trigger if exists patent.update_count_subclass;
DELIMITER //
create trigger update_count_subclass after UPDATE on patent.subclasses
FOR EACH ROW
BEGIN
DECLARE diff integer;
set @diff := NEW.count - OLD.count;
IF @diff > 0 THEN
UPDATE patent.classes SET count=count+@diff WHERE id = NEW.class_id... | true |
20b88ce7f94414b0b9877d704fb3c561e5d43d83 | SQL | serenawanggit/learngit | /audit/.svn/pristine/7f/7f53200c047540c645e1348ffa456ffc64ebe823.svn-base | UTF-8 | 6,588 | 3.0625 | 3 | [] | no_license | DROP TABLE AS_GJ_REPORTTABLE
---质量报表
CREATE TABLE AS_GJ_REPORTTABLE(
REPORTID INT PRIMARY KEY IDENTITY(1,1), --报表id
REPORTNAME VARCHAR(225), --报表名
REPORTURL VARCHAR(225), --报表模板路径
REPORTCONTENT VARCHAR(500), --报表说明
OBJECT_TABLE VARCHAR(225) ) --对应存储表
insert into AS_GJ_REPORTTABLE (reportname,reporturl,reportcontent,O... | true |
0caa1d1f9cde27c7cc4e7f28b23d61251eb68db8 | SQL | apsaraujo/Fayra-Tolentino | /SEMANA16/D4/aula/tabelaUsuarioProduto.sql | UTF-8 | 593 | 3.015625 | 3 | [] | no_license | -- tabela vários para vários tabela de compras usuários e produtos comprados -> tabela de junção
CREATE TABLE relational_sale (
user_id VARCHAR(255),
product_id VARCHAR(255),
FOREIGN ... | true |
5010c46a1fbf4f9ffbb8d4d586ef355808a959da | SQL | John3791/Samee | /database/scripts/createtableparentlinktype.sql | UTF-8 | 320 | 2.921875 | 3 | [] | no_license | CREATE TABLE ParentLinkType
(ParentLinkTypeCd char(4) not null primary key,
Description varchar (128) not null)
INSERT INTO ParentLinkType values ('OWNR', 'Owner - Package is owned by the parent.')
INSERT INTO ParentLinkType values ('IMPT', 'Import - Package is imported into the parent.')
SELECT * from ParentLinkType | true |
6207c6a740f70c8251a711a46c36dc5e7a1d224b | SQL | Valannos/PoroMeetLink | /src/test/resources/data.sql | UTF-8 | 1,103 | 3.265625 | 3 | [] | no_license |
INSERT INTO secteur (libelle) VALUES ('DEVELOPPEMENT');
INSERT INTO secteur (libelle) VALUES ('CHIMIE');
INSERT INTO competence (intitule, id_secteur) VALUES ('C#', (SELECT id
FROM secteur
WHERE l... | true |
31e0fb2fee12caced25dfd7bf293a283c4b6bab3 | SQL | tokongs/database | /insert.sql | UTF-8 | 994 | 2.953125 | 3 | [] | no_license | INSERT INTO Employee(Name, BirthYear, OriginCountry)
VALUES ("Tom Hanks", "1959", "USA");
INSERT INTO Company(Name, URL, Country, Address)
VALUES("20th Centry Fox", "HTTPS://MYCOMPANY", "USA", "1600 Pennsylvanie Ave.");
INSERT INTO Company(Name, URL, Country, Address)
VALUES("Disney", "HTTPS://MYCOMPANY", "USA", "160... | true |
043f2adc6116e89cdd3df070adc6778b1dd871fa | SQL | jampaniuday/oracle_ETL_Monitoring | /tune_vsqlstats_merge.sql | UTF-8 | 6,963 | 4.28125 | 4 | [] | no_license |
-- elapsed time 04 mins:16 sec
SELECT s.*, SYSDATE, (SELECT startup_time
FROM v$instance) AS dbuptime, count(*) over()
FROM v$sqlstats s JOIN monitor_dw.mondw_vsession_snap sessionsnp
ON (s.sql_id = sessionsnp.sql_id)
WHERE sessionsnp.SID NOT IN (
SELECT ... | true |
15afcf48f77a09d3dcc3c403fcc53dde3c3e3a7f | SQL | Anil1111/knneo.github.io | /klassic-note-table/sql/HallOfFame_CollectionArtists.sql | UTF-8 | 1,286 | 3.5625 | 4 | [] | no_license | --Collection Artists
select parentartist, count(parentartist) from song where ParentArtist <> 'V.A.' group by parentartist having count(parentartist) >= 18 order by count(parentartist) desc
select 'Ikimonogakari' as 'Artist Title',
(select count(*) from song where KNYEAR = '2007' and ParentArtist = 'Ikimonogakari') as ... | true |
64aca8251a8de5c29cf4c5bcc11837b7fd821609 | SQL | renatoayron/task-manager-jsp | /TaskManagerJSP/sql/create-task-table.sql | UTF-8 | 505 | 3 | 3 | [] | no_license | #DROP SCHEMA IF EXISTS taskdb;
CREATE SCHEMA taskdb;
USE taskdb;
CREATE TABLE `tasks` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(45) DEFAULT NULL,
`description` varchar(100) DEFAULT NULL,
`type` varchar(45) DEFAULT NULL,
`status` varchar(45) DEFAULT NULL,
`atribPara` varchar(45) DEFAULT NULL,
... | true |
0c1296c92efaaa11fcc54f2117308dbe618089f6 | SQL | pacificnm/pnm | /module/Acl/sql/acl.sql | UTF-8 | 14,255 | 2.796875 | 3 | [] | no_license | --
-- Table structure for table `acl`
--
CREATE TABLE IF NOT EXISTS `acl` (
`acl_id` int(20) NOT NULL AUTO_INCREMENT,
`role` varchar(100) NOT NULL,
`resource` varchar(100) NOT NULL,
PRIMARY KEY (`acl_id`)
) ENGINE=InnoDB AUTO_INCREMENT=344 DEFAULT CHARSET=latin1;
--
-- RELATIONS FOR TABLE `acl`:
--
--
-- Dum... | true |
caacfdd8f4a9270af4dd22eaa935f19397f7edf3 | SQL | HTTPArchive/almanac.httparchive.org | /sql/2020/markup/pages_almanac_by_device_and_script_type_frequency.sql | UTF-8 | 1,068 | 3.953125 | 4 | [
"Apache-2.0"
] | permissive | #standardSQL
# pages almanac metrics grouped by device and element attribute use (frequency)
CREATE TEMP FUNCTION AS_PERCENT (freq FLOAT64, total FLOAT64) RETURNS FLOAT64 AS (
ROUND(SAFE_DIVIDE(freq, total), 4)
);
CREATE TEMPORARY FUNCTION get_almanac_attribute_info(almanac_string STRING)
RETURNS ARRAY<STRING> LANG... | true |
ec4c4721a0878292aacc4a575242f8ed1de6fb6d | SQL | jeromanm/kronos | /views/custom-made/planilla_pago/v_calcular_planilla.sql | UTF-8 | 1,750 | 3.203125 | 3 | [] | no_license | create or replace view v_calcular_planilla as
select pp.planilla,
pp.mes,
pp.ano,
a.codigo,
pp.codigo codigo_pp,
p.cedula ||','|| p.nombres ||' '||p.apellidos nombres,
d.id pension,
c.nombre nombre_pension,
p.id id_persona,
p.cedula cedula_persona,
... | true |
1e48107f36510f419bc3a739599a08d0eea987c8 | SQL | pemmaapps/PIFMSDBMain | /PIFMSMain/Market/Tables/MarketInfo.sql | UTF-8 | 499 | 2.65625 | 3 | [] | no_license | CREATE TABLE [Markets].[MarketInfo]
(
[SysId] INT NOT NULL PRIMARY KEY IDENTITY ,
[Name] NVARCHAR(200) NOT NULL,
[Description] NVARCHAR(200) NOT NULL,
[OwnerId] BIGINT NOT NULL,
[ClientId] UNIQUEIDENTIFIER NOT NULL,
[ClientSecret] NVARCHAR(MAX) NOT NULL,
[SecretExpiresOn] DATETIME NO... | true |
518f4635e9616760ee1bdba4ef07e45a75512d19 | SQL | ptprakhar/meetup_api | /__db_dump/databaseDump.sql | UTF-8 | 26,584 | 2.9375 | 3 | [
"MIT"
] | permissive | -- phpMyAdmin SQL Dump
-- version 4.9.7
-- https://www.phpmyadmin.net/
--
-- Host: sql12.freemysqlhosting.net
-- Generation Time: Nov 29, 2020 at 08:33 PM
-- Server version: 5.5.62-0ubuntu0.14.04.1
-- PHP Version: 7.2.24-0ubuntu0.18.04.7
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SE... | true |
635611aecc7e72845f109f939d9a4d92bbedb541 | SQL | RapaTachos/Databases | /testes/teste.sql | UTF-8 | 2,364 | 4.625 | 5 | [] | no_license | SELECT Duration, Year, Title FROM MOVIE
WHERE Duration<120 AND Year >2000
ORDER BY Duration DESC, Year, Title DESC
LIMIT 25;
SELECT GENRE.Label, COUNT(MOVIE_GENRE.MovieId) AS N, SUM(MOVIE.Duration)
FROM GENRE JOIN MOVIE_GENRE USING(GenreId) JOIN MOVIE USING(MovieId)
WHERE MOVIE.Year < 1980
GROUP BY GENRE.Label... | true |
255f05db388c8ca5e05d016eea25dee689e06a33 | SQL | blackamd/IA-Project | /project/Internet Application Project/house_site.sql | UTF-8 | 3,336 | 3.1875 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.7.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Nov 28, 2017 at 03:33 PM
-- Server version: 10.1.26-MariaDB
-- PHP Version: 7.1.9
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD... | true |
16122d0eaec500e896d5ce156c453610a282e138 | SQL | ireapps/census | /tools/sql/ire_export/ire_P38F.sql | UTF-8 | 1,463 | 2.75 | 3 | [
"MIT"
] | permissive | -- P38F. FAMILY TYPE BY PRESENCE AND AGE OF OWN CHILDREN (SOME OTHER RACE ALONE HOUSEHOLDER)
-- designed to work with the IRE Census bulk data exports
-- see http://census.ire.org/data/bulkdata.html
CREATE TABLE ire_p38f (
geoid VARCHAR(11) NOT NULL,
sumlev VARCHAR(3) NOT NULL,
state VARCHAR(2) NOT NULL,
county... | true |
caf084f7c06c0755595246ba93bb314cca756853 | SQL | Gihihi/maimaiSpider | /Database/ddl.sql | UTF-8 | 3,792 | 2.875 | 3 | [] | no_license | /*
Navicat MySQL Data Transfer
Source Server : maimai
Source Server Version : 50718
Source Host : 192.168.1.105:3306
Source Database : maimai
Target Server Type : MYSQL
Target Server Version : 50718
File Encoding : 65001
Date: 2017-07-08 21:57:39
*/
SET FOREIGN_KEY_... | true |
95a1700f8ef20f53b69367dc22dc338e34478edb | SQL | E1000y/FilRougeMCMP | /jalon 1/Requetes/3-requetes.sql | ISO-8859-1 | 4,462 | 4.375 | 4 | [] | no_license | --Requtes pour les adhrents
--Afficher les activits venir en commenant par la plus rcente
select nom_activite, description_activite, date_activite from activite where date_activite > sysdate order by date_activite;
--Afficher les 3 dernires nouvelles publies destination des adhrents
select id_publication, descriptio... | true |
274f5188ad647fa9d1c771defb0337fd400ccbbc | SQL | silviagonzalez98/lab-sql-subqueries | /Solutions-sql-subqueries.sql | UTF-8 | 2,858 | 4.625 | 5 | [] | no_license | USE sakila;
-- 1- How many copies of the film Hunchback Impossible exist in the inventory system?
SELECT f.title, count(i.inventory_id)
FROM inventory i
JOIN film f
ON i.film_id = f.film_id
GROUP BY f.title
HAVING f.title = 'Hunchback Impossible';
-- 2- List all films whose length is longer than the average of all th... | true |
a2bf48bc4b116bb91e4102c3ca827de7c3e5b558 | SQL | arnassavickas/CS50-2020 | /pset7/movies/11.sql | UTF-8 | 208 | 3.921875 | 4 | [] | no_license | SELECT title FROM movies
JOIN ratings ON movies.id = ratings.movie_id
WHERE id IN
(SELECT movie_id FROM stars WHERE person_id =
(SELECT id FROM people WHERE name = "Chadwick Boseman")) ORDER BY rating DESC LIMIT 5; | true |
47168da33cf07cb20d25f969a36db844ec5ac676 | SQL | Acceleratore/LogroconTest | /script/script.sql | UTF-8 | 1,179 | 3.859375 | 4 | [] | no_license | CREATE TABLE logrocon.Officer
(
ID serial NOT NULL,
FirstName character varying COLLATE pg_catalog."default" NOT NULL,
Surname character varying COLLATE pg_catalog."default",
Patronymic character varying COLLATE pg_catalog."default",
BirthDate date,
CONSTRAINT Officer_pkey PRIMARY KEY (ID)
);
A... | true |
de3fd37e396ca79680c9f75379ff5e1c9c3a65ec | SQL | kellerd/Platypus | /Files/04_HRSR_PT_HOURS_TABLE.SQL | UTF-8 | 9,041 | 3.28125 | 3 | [] | no_license |
CREATE TABLE AH101_HRSR_PT_HOUR_SCHEDULE
(
HRSR_REQUEST_CD VARCHAR2(20) NOT NULL ,
MONDAY1_HOURS_NUM NUMBER(5,3) NULL ,
TUESDAY1_HOURS_NUM NUMBER(5,3) NULL ,
WEDNESDAY1_HOURS_NUM NUMBER(5,3) NULL ,
THURSDAY1_HOURS_NUM NUMBER(5,3) NULL ,
FRIDAY1_HOURS_NUM NUMBER(5,3) NULL ,
SAT... | true |
f9d98ab8a945a25fb113f084c5096e71ad48995b | SQL | somniumAddvalues/study | /taebin/demo/bin/test/data.sql | UTF-8 | 1,071 | 2.671875 | 3 | [] | no_license | insert into person(id,name, age, blood_type,year_of_birthday,month_of_birthday,day_of_birthday) values(1,'martin',10,'A',1991,8,15);
insert into person(id,name, age, blood_type,year_of_birthday,month_of_birthday,day_of_birthday)values(2,'david',9,'B',1992,7,10);
insert into person(id,name, age, blood_type,year_of_bi... | true |
21b0a5d99e120a4cd325b337b71c4f716a3b8263 | SQL | danieljameschadwick/events | /ddl/09/LOCA_CORE.sql | UTF-8 | 2,712 | 3.953125 | 4 | [] | no_license | USE Locations;
SET FOREIGN_KEY_CHECKS = 0;
DROP TABLE IF EXISTS ublCountry;
DROP TABLE IF EXISTS ublRegion;
DROP TABLE IF EXISTS tblAddress;
SET FOREIGN_KEY_CHECKS = 1;
CREATE TABLE ublCountry
(
intCountryId INT(70) NOT NULL AUTO_INCREMENT,
strCountryName VARCHAR(70) NOT NULL,
strCountryCode VARCH... | true |
8d1c5964013371f059bac03edd445275304aaad5 | SQL | DarkzStorm/PPM-NEW | /e-Library/project.sql | UTF-8 | 11,296 | 3.34375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.2.11
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Apr 27, 2015 at 06:08 PM
-- Server version: 5.6.21
-- PHP Version: 5.6.3
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
... | true |
742dceaad70dd878a9d38f355b624f3c47ce8fd0 | SQL | LMLokesh/dallas | /new_setup_server.sql | UTF-8 | 9,867 | 2.96875 | 3 | [
"MIT"
] | permissive |
SET FOREIGN_KEY_CHECKS=0;
truncate attendance_count;
truncate checkins;
truncate comm_details;
truncate comm_masters;
truncate comm_templates;
truncate events;
truncate event_attedance;
truncate giving;
truncate households;
truncate household_user;
truncate insights;
truncate locations;
truncate master_lookup_data;
tr... | true |
2e4a772b3fecc0cd0af523640ead027969210bab | SQL | dev-lang/UTN | /Universidad_Paso-3_FIX.sql | UTF-8 | 915 | 3.34375 | 3 | [
"CC0-1.0"
] | permissive | -- fix db
-- PASO 1
-- Se agregan columnas faltantes en Profesores
ALTER TABLE Profesores ADD Pro_Apellido char(50);
ALTER TABLE Profesores ADD Pro_FecNac datetime;
--
-- SELECT * FROM Profesores;
-- PASO 2 (MS SQL)
-- cambiar nombre de CarrerasMaterias, CursosAlumnos y MateriasProfesores para que incluya un _ com... | true |
c6d22489216cad244eca825cbe269da04d02328e | SQL | BMorge/empti-project | /src/main/resources/shema.sql | UTF-8 | 778 | 3.390625 | 3 | [
"MIT"
] | permissive | CREATE TABLE USERS (
USERNAME VARCHAR(10) NOT NULL,
PASSWORD VARCHAR(30) NOT NULL,
ENABLED SMALLINT DEFAULT '1',
PRIMARY KEY (USERNAME)
);
CREATE TABLE AUTHORITIES (
USERNAME VARCHAR(10) NOT NULL,
AUTHORITY VARCHAR(30) NOT NULL,
FOREIGN KEY (USERNAME) REFERENCES ... | true |
537e7fbcc0305ebb45016f26963105fe35a83a86 | SQL | qcarlox/hackerRank | /SQL/Advanced Select/what-type-of-triangle.sql | UTF-8 | 200 | 3.078125 | 3 | [] | no_license | #https://www.hackerrank.com/challenges/what-type-of-triangle
SELECT IF(A+B>C && A+C>B && C+B>A,IF(A=B && B=C,"Equilateral",IF(A=B || B=C || C=A,"Isosceles","Scalene")),"Not A Triangle") FROM TRIANGLES | true |
85d656a830f7b6bbc211cb8f48e5866d3bc8d015 | SQL | polypheny/Polypheny-Client | /src/main/resources/tpch/population/queries/q4.sql | UTF-8 | 515 | 3.4375 | 3 | [
"MIT"
] | permissive | -- (Q4) Order Priority Checking Query
-- tables: tpch_orders, tpch_lineitem
/*SELECT
o_orderpriority,
count(*) AS order_count
FROM
tpch_orders
WHERE
o_orderdate >= DATE '1993-07-01'
AND o_orderdate < DATE '1993-07-01' + INTERVAL '3' MONTH
AND EXISTS (
SELECT
*
FROM
tpch_lineitem
WHER... | true |
5833f0cb8b2153619086e30b46606935ae7e5264 | SQL | comradez/backend-demo | /migrations/2021-03-09-095542_user_and_post/up.sql | UTF-8 | 385 | 3.1875 | 3 | [] | no_license | -- Your SQL goes here
PRAGMA FOREIGN_KEYS = ON;
CREATE TABLE user (
id INTEGER NOT NULL PRIMARY KEY,
name TEXT NOT NULL,
register_date DATETIME NOT NULL
);
CREATE TABLE message (
id INTEGER NOT NULL PRIMARY KEY,
user INTEGER NOT NULL,
title TEXT NOT NULL,
content TEXT NOT NULL,
pub_date... | true |
04e84744986f53ce10b0e21b997b4e12ea627389 | SQL | 120399/student | /Oblig1/CreateCdLibrary.sql | UTF-8 | 1,186 | 3.125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 3.5.8.1
-- http://www.phpmyadmin.net
--
-- Generation Time: Aug 18, 2013 at 08:28 PM
-- Server version: 5.6.11-log
-- PHP Version: 5.4.14
--
-- Database: `oppstartsoving`
--
-- --------------------------------------------------------
--
-- Table structure for table `cd`
--
CREATE T... | true |
0635ddad8104ef1ff643c3e1a20c5e65a55c6de8 | SQL | FabioBeneditto/projeto_alicerce | /arquivos/db_projeto_alicerce.sql | UTF-8 | 879 | 3.5 | 4 | [
"MIT"
] | permissive | /**
* ESTRUTURA DO BANCO DE DADOS E TABELAS 'SIS'
*/
CREATE DATABASE projeto_alicerce CHARACTER SET utf8 COLLATE utf8_general_ci;
/**
* USUÁRIOS
*/
create table projeto_alicerce.sis_usuario
(
id_usuario integer not null auto_increment primary key,
nome varchar(50) not null,
email varchar(200) null,
... | true |
615780db21c387ad2e7eafb5c1e5db28317d8220 | SQL | irisgomez74/SQL | /project.sql | UTF-8 | 1,665 | 3.8125 | 4 | [] | no_license | --Create a videos table
CREATE TABLE videos (
title_id VARCHAR(50) PRIMARY KEY,
title VARCHAR(50) UNIQUE NOT NULL,
video_length SMALLINT NOT NULL,
url VARCHAR(400) UNIQUE NOT NULL
);
SELECT * FROM videos
--Populate the videos table
INSERT INTO videos (title_id, title, video_length, url)
VALUES ('1001'... | true |
0cd17cd46b250f89e445377be8ef5e10fce0de1e | SQL | Diaj3/ProjetoBD | /Hotel.sql | UTF-8 | 4,730 | 3.625 | 4 | [] | no_license | CREATE SCHEMA MANAGEMENT;
/*Completed*/
CREATE TABLE MANAGEMENT.CUSTOMER(
NIF CHAR(9) NOT NULL,
Fname VARCHAR(20) NOT NULL,
Lname VARCHAR(20) NOT NULL,
PhoneNum INT NOT NULL CHECK(PhoneNum > 0),
[Address] VARCHAR(50),
Pass VARCHAR(30) NOT NULL CHECK(LEN(Pass) > 7),
PRIMARY KEY(NIF)
);
/*Completed*/
... | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.