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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
3df85b23a12cc6aeba1395fcdb4c55c2dce93078 | SQL | pok1800/Navision-SQL-Queries | /Sql/SalesOrderLineQuery.sql | UTF-8 | 10,625 | 3.296875 | 3 | [
"MIT"
] | permissive | SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
SELECT
/*** Sales Orders ***/
CAST(SL.[Document Type] AS VARCHAR(32)) + '-' + SL.[Document No_] + '-' + CAST(SL.[Line No_] AS VARCHAR(32)) AS SALES_ORDER_LINE_ID,
SH.[Bill-to Customer No_] AS CUSTOMERID_INVOICE,
SH.[Sell-to Customer No_] AS CUSTOMERID_O... | true |
b2996484be5f89136f12373c302eef71c3248dab | SQL | sibedge-ergo/spring-angular-demo | /backend/ergo-service/src/main/resources/db/migration/V00.00.01.0001__add_person_table.sql | UTF-8 | 427 | 3.125 | 3 | [] | no_license | CREATE TABLE "person" (
id BIGSERIAL PRIMARY KEY,
personal_id VARCHAR(50) NOT NULL UNIQUE,
first_name VARCHAR(50) NOT NULL,
last_name VARCHAR(100) NOT NULL,
gender VARCHAR(10) NOT NULL,
date_of_birth DATE NOT NULL,
crea... | true |
33bbab595e90dbd46fd073452892e0cd43e344bd | SQL | DutheilLuc/B2Symfony | /symfonyb2.sql | UTF-8 | 4,454 | 3.21875 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 5.1.1
-- https://www.phpmyadmin.net/
--
-- Hôte : 127.0.0.1
-- Généré le : ven. 15 oct. 2021 à 00:25
-- Version du serveur : 10.4.21-MariaDB
-- Version de PHP : 8.0.10
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SE... | true |
1e1275c6c93919b475fe769151390a775e8903c1 | SQL | Mint-Boy-He/hudi-multistream | /db/task_log.sql | UTF-8 | 979 | 2.984375 | 3 | [] | no_license | create table stream_task_log
(
id bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'pk',
from_topic varchar(100) COMMENT 'kafka topic',
to_source varchar(100) DEFAULT NULL COMMENT 'to source',
to_table varchar(100) DEFAULT NULL COMMENT 'to table',
commit_time varchar(50) DEFAULT NULL,
... | true |
fed53ff0fc04f8d0b718956ecd0b95d98c4be1c1 | SQL | hungpqz/hungpqz.github.io | /samsung/mysql/customer1_data_sample.sql | UTF-8 | 1,206,129 | 2.84375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 5.1.0
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Dec 22, 2022 at 09:20 AM
-- Server version: 10.4.18-MariaDB
-- PHP Version: 7.3.27
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIE... | true |
050833d9df9ff50c795881e364eb60a5de4550e8 | SQL | jollaman999/goodee_spring | /shop1/target/classes/shop.sql | UTF-8 | 915 | 2.609375 | 3 | [] | no_license | create table item (
id int primary key,
name varchar(30),
price int,
description varchar(100),
pictureUrl varchar(30)
);
insert into item values (1, '레몬', 50, '레몬에 포함된 구연산은 피로회복에 좋습니다. 비타민C 도 풍부합니다.','lemon.jpg');
insert into item values (2, '오렌지', 100, '비타민C 가 풍부합니다. 맛도 좋습니다.','orange.jpg');
insert i... | true |
1c7b3e53d3bcdf26507cbc5cc0ff7a114eba7b2a | SQL | clausherther/nfl-dbt | /macros/get_kick_distance.sql | UTF-8 | 353 | 2.515625 | 3 | [
"Apache-2.0"
] | permissive | {%- macro get_kick_distance(distance_yards, yards_100) -%}
{%- set DISTANCE_FROM_GOAL_YARDS = 10.0 -%}
{%- set DISTANCE_FROM_LINE_OF_SCRIMMAGE_YARDS = 7.0 -%}
case when coalesce({{ distance_yards }}, 0) = 0 then
{{ yards_100 }} + {{ DISTANCE_FROM_GOAL_YARDS }} + {{ DISTANCE_FROM_LINE_OF_SCRIMMAGE_YARDS}}
else {{ dista... | true |
4ef29ca135326fa27976a28f087babc82b5c2cad | SQL | goingmyway243/Gym-Equipment-Management-System | /CSDL-QuanLiThietBiPhongGym.sql | UTF-8 | 7,812 | 3.1875 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 5.1.0
-- https://www.phpmyadmin.net/
--
-- Máy chủ: 127.0.0.1
-- Thời gian đã tạo: Th4 20, 2021 lúc 07:50 PM
-- Phiên bản máy phục vụ: 10.4.18-MariaDB
-- Phiên bản PHP: 8.0.3
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARA... | true |
324fe4d98a9fbf531c1529b6c1992e3c9f33a0be | SQL | ws26calvin/cs342 | /08programming/lab08_1.sql | UTF-8 | 764 | 3.46875 | 3 | [] | no_license | CREATE OR REPLACE PROCEDURE add_role(
aID INTEGER, movID INTEGER, role VARCHAR)
IS
number_of_actors INTEGER;
existent_actor INTEGER;
BEGIN
SELECT COUNT(*) INTO number_of_actors
FROM Role
WHERE movieID = movid;
SELECT COUNT(*) INTO existent_actor
FROM Role
WHERE movieID = movID AND act... | true |
c1bd99a1bf0f03e6dd7c122a3b46cd7c8ea46a75 | SQL | gze123/OTP_WIF2003 | /travellerplan.sql | UTF-8 | 8,198 | 3.09375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.8.5
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: May 24, 2019 at 10:37 AM
-- Server version: 10.1.38-MariaDB
-- PHP Version: 7.3.3
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD... | true |
ba681e0d3e1ebb44c365401737829fbdf9cc363c | SQL | GorbunovaMS/Hometask | /flyfoods.sql | UTF-8 | 2,893 | 3.875 | 4 | [] | no_license | -- customers
-- tipe_of_cuisine
-- lunch
-- sushi
-- pizza
-- wok
-- main_courses
-- soups
-- deserts
-- drinks
-- menu
-- comments
-- hits
DROP DATABASE IF EXISTS `flyfoods`;
create database `flyfoods`;
use `flyfoods`;
DROP TABLE IF EXISTS `customers`;
CREATE TABLE `customers`(
`customer_id` SERIAL PRIMARY KEY,
`fir... | true |
4f0939b43cdc273288a6309d9fdbe732882a9605 | SQL | SowmyaNagayya/employee_tracker | /db/seeds.sql | UTF-8 | 801 | 2.75 | 3 | [
"MIT"
] | permissive | INSERT INTO department (name)
VALUES ("Sales"),
("Finance"),
("Engineering"),
("Legal");
INSERT INTO role (title,salary,department_id)
VALUES ("Sales Lead",100000.00,1),
("SalesPerson",80000.00,1),
("Account Manager",160000.00,2),
("Accountant",125000.00,2),
("L... | true |
7b9cc5ff7e83f1247e215cfc76c2468f8a3f62de | SQL | tvkoooo/accc | /MySQL/test/denglu.sql | UTF-8 | 608 | 3.046875 | 3 | [] | no_license | use easydb;
/* Procedure structure for procedure `p_easydb_easytab_denglu` */
/*!50003 DROP PROCEDURE IF EXISTS `p_easydb_easytab_denglu` */;
DELIMITER $$
/*!50003 CREATE DEFINER=`root`@`localhost` PROCEDURE `p_easydb_easytab_denglu`(
OUT `_COMBACK` char(20),
IN `_user_name` char(20),
IN `_user_password` char(20... | true |
e4c38cd13bf5d84c56f692019b989afb76cdc63b | SQL | mdarolon/BBII-FCEQyN | /exportacion/sql_exportacion/creacion_tf_valoracion_academica.sql | UTF-8 | 3,177 | 3.296875 | 3 | [] | no_license | --CREACION DE LA TABLA DE HECHOS: ft_valoracion_academica
--DSA
--Creo una VISTA con los datos que contendra mi TABLA DE HECHOS
DROP VIEW dsa.vw_valoracion_academica;
CREATE VIEW dsa.vw_valoracion_academica AS
SELECT recien_graduado.bi_plan_tecnico,
recien_graduado.bi_interes_cont,
recien_graduado.fecha_fin_e... | true |
b187f02e5d81ff948cd4f6edde72d9a46cf57059 | SQL | isnakhan98/Carsaaz | /metro_bus.sql | UTF-8 | 1,549 | 3.09375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.8.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Aug 19, 2018 at 10:07 AM
-- Server version: 10.1.34-MariaDB
-- PHP Version: 7.2.8
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD... | true |
b780cf24b48a4d7d286b91da5f5dd277126e4cba | SQL | LifeCalendarTeam/life_calendar | /database_scheme.sql | UTF-8 | 882 | 3.875 | 4 | [] | no_license | CREATE TYPE activity_or_emotion AS ENUM ('activity', 'emotion');
CREATE TABLE "users" (
"id" serial PRIMARY KEY,
"first_name" varchar NOT NULL,
"second_name" varchar NOT NULL,
"city" varchar,
"birthday" date,
"avatar" varchar,
"password_hash" varchar NOT NULL
);
CREATE TABLE "days" (
"id" serial PRIMA... | true |
9b03df7a1e6d4d8baf30a8bbc04be02455fc8d56 | SQL | gsampath127/CP | /RightProspectus/Releases/RP2.1/Source/RightProspectusV2/RP_Client/dbo/Stored Procedures/RPV2HostedAdmin_SaveFootnote.sql | UTF-8 | 1,206 | 3.390625 | 3 | [] | no_license | -- =============================================
-- Author: Noel Dsouza
-- Create date: 13th-Oct-2015
-- RPV2HostedAdmin_SaveFootnote
-- =============================================
CREATE PROCEDURE dbo.RPV2HostedAdmin_SaveFootnote
@FootnoteId int,
@TaxonomyAssociationId int,
@TaxonomyAssociationGroupId int,
@Langua... | true |
d6f0807983ec194bb74ece7849163420119afb0c | SQL | kinghaoYPGE/my_python | /remote_project/flask_anime/schema.sql | UTF-8 | 2,217 | 3.734375 | 4 | [
"MIT"
] | permissive | drop database if exists anime_recommend;
create database anime_recommend;
use anime_recommend;
drop table if exists user;
create table user(
id int,
name varchar(20),
primary key(id)
);
drop table if exists anime;
create table anime(
id int,
name varchar(20),
brief varchar(100),
primary key(id)
);
inser... | true |
8e1d0f2fbf1c5bac7d68b22c313d2bfe8e92fa91 | SQL | dp2-anacardo/Acme-Library | /Dump/Acme-Library.sql | UTF-8 | 41,239 | 3.421875 | 3 | [] | no_license | start transaction;
drop database if exists `Acme-Library`;
create database `Acme-Library`;
use 'Acme-Library';
create user 'acme-user'@'%'
identified by password '*4F10007AADA9EE3DBB2CC36575DFC6F4FDE27577';
create user 'acme-manager'@'%'
identified by password '*FDB8CD304EB2317D10C95D797A4BD7492560F55F';
gra... | true |
a79608fae1f9750dd1368da3dc0a23a1dcf2512a | SQL | radtek/abs3 | /sql/mmfo/bars/Function/f_get_s032.sql | WINDOWS-1251 | 2,058 | 3.125 | 3 | [] | no_license |
PROMPT =====================================================================================
PROMPT *** Run *** ========== Scripts /Sql/BARS/function/f_get_s032.sql =========*** Run ***
PROMPT =====================================================================================
CREATE OR REPLACE FUNCTION BA... | true |
d3270c86fc87a41e0217e5d84f61888830d50211 | SQL | tf3604/LogFilePresentation | /LogDemos/04 - DbccSqlPerf_Logspace.sql | UTF-8 | 2,113 | 2.90625 | 3 | [] | no_license | -----------------------------------------------------------------------------------------------------------------------
-- 04 - DbccSqlPerf_Logspace.sql
-- Version 1.0.5
-- Look for the most recent version of this script at www.tf3604.com/log.
-- MIT License; see bottom of this file for details.
------------------... | true |
516012b2b2a6a61a34bd859f5067348ecfc76360 | SQL | zmahdaoui/cowork_api | /cowork.sql | UTF-8 | 15,050 | 3.390625 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.1.14
-- http://www.phpmyadmin.net
--
-- Client : 127.0.0.1
-- Généré le : Mer 11 Décembre 2019 à 14:11
-- Version du serveur : 5.6.17
-- Version de PHP : 5.5.12
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER... | true |
e1b8b0b89137562e0e2bd1c5475587b2a2451573 | SQL | farkasama/2019-Base-de-Donnees-Avancees | /insert_Data.sql | UTF-8 | 2,980 | 3.203125 | 3 | [] | no_license | --commission, depense salariale, depense prospect
SELECT creationgestionnaire(5, 4, 1);
--pseudo, nom, prenom, mdp
SELECT creationutilisateur('siran', 'Sirangelo', 'Cristina', 'mdp');
SELECT creationutilisateur('lapla', 'Laplante', 'Sophie', 'mdp');
SELECT creationutilisateur('jurs', 'Jurski', 'Yan', 'mdp');
SE... | true |
5c5d3e49fd8e9a775bccc76f5f84a1756089843e | SQL | ahrungue/custom-maven-archetypes | /src/main/resources/archetype-resources/doc/BD/003_initial_data.sql | UTF-8 | 868 | 2.953125 | 3 | [] | no_license | #set( $symbol_pound = '#' )
#set( $symbol_dollar = '$' )
#set( $symbol_escape = '\' )
-- Instancia Padrao
INSERT INTO instances VALUES ('2beedae542b840c8b7c57baeca721da8','system-instance');
-- Inserir usuarios - user_id, user_name, user_cpf, user_email, user_login, user_password, enabled, last_login, instance_id
INS... | true |
19fe18761a799068124572a37596ff75f6903030 | SQL | Mariia25/sql_homeworks_ | /Анисимова Мария ДЗ №2.sql | WINDOWS-1251 | 2,532 | 3.953125 | 4 | [] | no_license | --task1
--: , . : .
select class, count(ship)
from outcomes join ships
on outcomes.ship = ships.name
where result = 'sunk'
group by class
--task2
--: , . , . : , .
select ships.class, min (launched)
from ships
group by ships.class
--task3
--: , 3 ... | true |
9fc8e22c544a4af2812cbda17f598e32874d578b | SQL | unica-open/siacdbimpl | /src/sql/postgres/mif/create_table_oil.sql | UTF-8 | 3,735 | 2.953125 | 3 | [] | no_license | /*
*SPDX-FileCopyrightText: Copyright 2020 | CSI Piemonte
*SPDX-License-Identifier: EUPL-1.2
*/
CREATE TABLE siac_t_ente_oil
(
ente_oil_id SERIAL,
ente_oil_aid VARCHAR(50) not null,
ente_oil_abi VARCHAR(50) not null,
ente_oil_progressivo VARCHAR(50) not null,
ente_oil_idTLQWeb VARCHAR(50) not null,
ente_oil... | true |
fa8a551d687c2eefa9052c534d0c6cb055734ff1 | SQL | mayursinh059/sql-data-science-udacity | /4) SQL Subquerries & Temporary Tables/3) Quiz.7 MoreOnSub.sql | UTF-8 | 917 | 4.03125 | 4 | [
"MIT"
] | permissive | -- The average amount of standard paper sold on the first month that any order was placed in the orders table (in terms of quantity).
-- The average amount of gloss paper sold on the first month that any order was placed in the orders table (in terms of quantity).
-- The average amount of poster paper sold on the f... | true |
44f96eee4b38bea06660f641a0c22208fefe4d59 | SQL | The-Ark-Informatics/ark | /ark-database/db-scripts/migration/InvestigateWrongQuantitiesWhichisReallyBioTransactionIssues.sql | UTF-8 | 9,379 | 3.171875 | 3 | [] | no_license | -- See ARK-1323 - https://the-ark.atlassian.net/browse/ARK-1323
select * from
wagerlab.ix_biospecimen
where biospecimenid = '0100SCZ01146H';
select * from
wagerlab.ix_bio_transactions
where biospecimenkey in
(select biospecimenkey from wagerlab.ix_biospecimen
where biospecimenid = '0100SCZ01146H');
-- it has a .... | true |
08b56398604445666f2d32ab86b02b7bb0852f7f | SQL | grg021/eSwing-Project | /portlets/ClubProfile-portlet/docroot/WEB-INF/sql/indexes.sql | UTF-8 | 858 | 2.609375 | 3 | [] | no_license | create index IX_8EBD9B8D on es_ESClub (companyId);
create index IX_CA21A14F on es_ESClub (groupId);
create index IX_C8CB59A4 on es_ESClub (groupId, clubName);
create index IX_9C9ABFC8 on es_ESPlayerClub (clubId, active_);
create index IX_599911EC on es_ESPlayerClub (companyId);
create index IX_33D5236E on es_ESPlayerC... | true |
59e21dcd9e5e9939699a805c84a47d0754f4d8b5 | SQL | silence-do-good/stress-test-Postgres-and-MySQL | /dump/high/day27/select0106.sql | UTF-8 | 191 | 2.765625 | 3 | [] | no_license |
SELECT timeStamp, temperature
FROM ThermometerObservation
WHERE timestamp>'2017-11-26T01:06:00Z' AND timestamp<'2017-11-27T01:06:00Z' AND SENSOR_ID='b2eeba8b_51f8_48bf_88cf_99d25e0430db'
| true |
05ee6e41ec7d46f79cc4edcab0f70d420fe1c71f | SQL | jgarzonext/plsql-testing | /script_plsql/bd_iaxis/script/tables/GARANPROCAP.sql | ISO-8859-1 | 2,141 | 2.875 | 3 | [] | no_license | --------------------------------------------------------
-- DDL for Table GARANPROCAP
--------------------------------------------------------
CREATE TABLE "AXIS"."GARANPROCAP"
( "CRAMO" NUMBER(8,0),
"CMODALI" NUMBER(2,0),
"CTIPSEG" NUMBER(2,0),
"CCOLECT" NUMBER(2,0),
"CGARANT" NUMBER(4,0),
"CACTIVI" ... | true |
ffb187a7fd5f1ac2ef99e4e3ac43421aba1ec2e9 | SQL | flowerKim/kimdahye01 | /kimdahye01Sql.sql | UHC | 2,905 | 3.359375 | 3 | [] | no_license | grant all privileges on *.* to java72@localhost identified by 'java72';
grant all privileges on *.* to java72 identified by 'java72';
--247 page ֱ
insert into tbl_board (title, content, writer)
(select title, content, writer from tbl_board);
-- 370 page Ajax ó
create table tbl_reply (
rno int not n... | true |
0270b6fe9c818f0f4f0d7a5965e2e1156c8c6e96 | SQL | davidyuqiwei/davidyu_stock | /scripts/analysis/liutong_owner/shebao_rank.sql | UTF-8 | 134 | 2.765625 | 3 | [
"MIT"
] | permissive | select stock_index, count(substr(owner_name,4)) as SB_cnt
from
stock_test.QGSB
group by stock_index
order by SB_cnt desc
limit 30
;
| true |
fae0ccd818fa4a0b67c151622cacb81127a54dea | SQL | nss-day-cohort-13/chinook-sulaiman-allen | /sales_agent_total_sales.sql | UTF-8 | 259 | 3.828125 | 4 | [] | no_license | SELECT e.EmployeeId AS EmployeeID, e.FirstName AS FirstName, e.LastName AS LastName, SUM(i.Total) AS Total
FROM Employee e, Invoice i WHERE e.EmployeeId == i.CustomerId
AND (e.Title == "Sales Manager" OR e.Title == "Sales Support Agent")
GROUP BY EmployeeId;
| true |
c4b42aec720438dd9f5d99f0d0d87d13caa97ca5 | SQL | NoobsDevelopers/L2Nextgen | /sql/database_server/skill_trees_special.sql | UTF-8 | 638 | 2.75 | 3 | [] | no_license | DROP TABLE IF EXISTS `skill_trees_special`;
CREATE TABLE IF NOT EXISTS `skill_trees_special` (
`skill_id` int(10) NOT NULL default '0',
`level` int(10) NOT NULL default '0',
`name` varchar(25) NOT NULL default '',
`costid` int(10) NOT NULL default '0',
`cost` int(10) NOT NULL default '0',
PRIMARY KEY (`skil... | true |
48addaf82eb11013789c9c9bfeace725840ea22a | SQL | otobashi/sejiwon_ares | /2.DB2_REP2CNTRY/ETC/TEMP.SQL | UTF-8 | 2,092 | 3.59375 | 4 | [] | no_license | SELECT 'Most Likely '||C.SEQ AS COL_INDEX
,A.SUBSDR_CD AS SUBSDR_CD
,A.APPLY_YYYYMM AS BASE_YYYYMM
,A.KPI_CD AS KPI_CD
,SUM(A.CURRM_USD_AMT) AS AMOUNT
,C.THU AS SORT_KEY
FROM IPTDW.IPTDW_RES_KPI_S... | true |
dd5553f8131920c207cee263d68d2de0f843226f | SQL | hbysdzl/tp5- | /public/static/database.sql | UTF-8 | 4,795 | 3.65625 | 4 | [
"Apache-2.0"
] | permissive |
-- 创建数据库
create database qiyecn charset=utf8;
-- 管理员表
create table qi_manage (
id int unsigned not null auto_increment,
username varchar(50) not null unique comment '管理员名称',
password varchar(32) not null comment '密码',
sex enum('1','0') not null default '1' comment '性别',
realityname varchar(10) not null defaul... | true |
c4fb033158aa2bef8b04a8c42b04bb16ba06fea9 | SQL | taffyb/Spite-Malice-Server | /mysql-setup/sp/sp_deletePlayer.sql | UTF-8 | 268 | 3.0625 | 3 | [] | no_license | DROP procedure IF EXISTS `sp_deletePlayer`;
DELIMITER $$
CREATE PROCEDURE `sp_deletePlayer` (pPlayerUUID varchar(36))
BEGIN
UPDATE tbl_player
SET DELETED=true
WHERE UUID = pPlayerUUID;
SELECT DELETED FROM tbl_player WHERE UUID = pPlayerUUID;
END$$
DELIMITER ; | true |
dfa774a07da8165b9169c1c607b62340ec78454b | SQL | mboyamike/is_project | /database/is_project_database.sql | UTF-8 | 5,868 | 3.203125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 5.0.3
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Dec 18, 2020 at 07:43 AM
-- 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 |
61b10d1c5f1baea209023753fd248c6f3a4729eb | SQL | vaflia/oracle_scripts | /расследуем несовпадения в оборотке.sql | UTF-8 | 1,675 | 2.890625 | 3 | [] | no_license | select /*+ ORDERED */
k.reu,
s.trest,
k.kul,
k.nd,
st.id_status_gr as status,
t.org,
t.uslm,
sum(summa) as summa
from scott.kart k, scott.t_changes_for_saldo t, scott.sprorg u, scott.s... | true |
40ee89bdb2d8feeb76ac07b69ee844ee99aa8c48 | SQL | RedHandedBandit/personal-project | /db/all_cmnts.sql | UTF-8 | 130 | 2.953125 | 3 | [] | no_license | select c.comment, c.date, vg.first_name, vg.last_name, c.cmnt_id
from visor_gang vg
join contact c
on vg.username_id = c.user_id; | true |
8b33f91d2c707bb4e1e3cafc1186eab884ca611c | SQL | kapilankam/HierarchicalDataService | /src/main/resources/liquibase/postgres/centime/initial/data/resource_dao.sql | UTF-8 | 749 | 3.296875 | 3 | [] | no_license | CREATE
OR REPLACE FUNCTION resource_dao$get_child_idsByParentID(p_ParentId INT) RETURNS TABLE(id INT, parent_id INT, name VARCHAR , color VARCHAR )
AS '
WITH RECURSIVE subordinates AS (
SELECT
id,
parent_id,
name,
color
... | true |
4ac873e123488a14ef8834426925de6ee3fd8368 | SQL | silence-do-good/stress-test-Postgres-and-MySQL | /dump/low/day19/select0955.sql | UTF-8 | 191 | 2.703125 | 3 | [] | no_license |
SELECT timeStamp, temperature
FROM ThermometerObservation
WHERE timestamp>'2017-11-18T09:55:00Z' AND timestamp<'2017-11-19T09:55:00Z' AND SENSOR_ID='d2cd54f9_ad2f_4d75_a407_589bac0f1e6d'
| true |
f1ec77837c42f67eb0af2a727cee9e0fd51bddc6 | SQL | eliudnir/school | /cs155a_mysql/155A_01_demo/155A_01-05_demo.sql | UTF-8 | 2,767 | 2.96875 | 3 | [] | no_license | Use a_testbed;
/* demo 01 */
/* additional inserts */
Insert Into zoo_2015 (z_id, z_name, z_type, z_cost, z_dob, z_acquired)
Values (370, 'Anders', 'armadillo', 490.00, '2010-01-15 08:30:00', '2010-04-15');
Insert Into zoo_2015 (z_id, z_name, z_type, z_cost, z_dob, z_acquired)
Values (371, 'Ann... | true |
7370c808107fa641c430feb50d100b85f1419e9c | SQL | nikhilbhatewara/Leetcode | /Newusersdailycount.sql | UTF-8 | 1,141 | 4.40625 | 4 | [
"MIT"
] | permissive | # Write your MySQL query statement below
with logins as
(
select user_id,activity_date , dense_rank() over(partition by user_id order by activity_date asc) logindays
from traffic
where activity = "login"
)
, firstlogins as
(
select user_id,activity_date
from logins
where logindays = 1 and datediff("2019-06-30",acti... | true |
f4d0b65019e0e17feeafae8542f0a4f3f4166e68 | SQL | conecdata/conecsync.old | /integracao_modelo/db/firebird/produtos.sql | UTF-8 | 2,528 | 2.515625 | 3 | [] | no_license | CREATE TABLE produtos
(
pro_pk INT NOT NULL PRIMARY KEY,
pro_fk_grupo INT,
pro_fk_subgrupo INT,
pro_b_ativo VARCHAR(1) DEFAULT 'T',
pro_b_balanca VARCHAR(1) DEFAULT 'F',
pro_b_destaque VARCHAR(1) DEFAULT 'F',
pro_b_estoque VARCHAR(1) DEFAULT 'F',
pro_b_favorito VARCHAR(1) DEFAULT 'F',
... | true |
8358ed4cb6a2788f384c3fe1117b90c012d76220 | SQL | ARJOM/testes-sistema | /tribos/backend/app/database/base.sql | UTF-8 | 1,878 | 4.25 | 4 | [] | no_license | CREATE TABLE genders(
gender_id INTEGER,
gender_name VARCHAR(20) NOT NULL,
CONSTRAINT gender_pk PRIMARY KEY (gender_id)
);
CREATE TABLE users(
email VARCHAR(80),
user_name VARCHAR(80) NOT NULL,
gender INTEGER NOT NULL,
birthday DATE NOT NULL,
password VARCHAR(255) NOT NULL,
CONSTRAINT user_pk PRIMARY KEY (ema... | true |
4f25eef9b9da44965b887b841944847edd234371 | SQL | ct1104/some_Resources | /init.sql | GB18030 | 2,443 | 3.046875 | 3 | [] | no_license | --EMPLOYEE
CREATE TABLE EMPLOYEE(
Fname VARCHAR(10) NOT NULL,
Minit CHAR(1) NOT NULL,
Lname VARCHAR(10) NOT NULL,
Ssn INT NOT NULL,
Bdate DATE NOT NULL,
Address VARCHAR(40) NOT NULL,
Sex CHAR(1) NOT NULL,
Salary INT NOT NULL,
Super_ssn INT,
Dno INT NOT NULL,
PRIMARY KEY(Ssn))... | true |
b9a78194503fdbb42326e0e986cb22a7930312af | SQL | Thessiah/144Project1 | /actors.sql | UTF-8 | 307 | 3.296875 | 3 | [] | no_license | CREATE TABLE Actors(Name char(40), Movie char(80), Year int, Role char(40));
LOAD DATA LOCAL INFILE ~/data/actors.csv INTO TABLE Actors
FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"';;
UPDATE Actors SET Movie = TRIM(Movie);
SELECT Name
FROM Actors
WHERE Movie = Die Another Day;
DROP TABLE Actors;
| true |
2ca5de1e56444c3fd9271ab4d60cf1171e548f8e | SQL | cris93g/my-app | /db/deleteFromCart.sql | UTF-8 | 115 | 2.96875 | 3 | [] | no_license | DELETE FROM cart
WHERE item_id = $1;
SELECT *
FROM items
INNER JOIN cart
ON items.item_id = cart.item_id; | true |
94e7be25ad4caa2130e857ce2b02fb974ad3516f | SQL | sprokushev/Delphi | /MASTER/_DATABASE/Constraints/REPL_TABLE_NonFK.sql | UTF-8 | 569 | 3.078125 | 3 | [] | no_license | --
-- Non Foreign Key Constraints for Table REPL_TABLE
--
ALTER TABLE MASTER.REPL_TABLE ADD (
CHECK ("ID" IS NOT NULL)
DISABLE NOVALIDATE);
ALTER TABLE MASTER.REPL_TABLE ADD (
CHECK ("REPL_OPER" IS NOT NULL)
DISABLE NOVALIDATE);
ALTER TABLE MASTER.REPL_TABLE ADD (
CHECK ("REPL_DATE" IS NOT NULL)
DISABL... | true |
4fa05df0344acbf5ce84b981f2a3c60c498c7762 | SQL | ganeshbabuNN/Databases | /RDMS/Oracle Database/Listing 24_21.sql | WINDOWS-1252 | 423 | 3.140625 | 3 | [] | no_license | declare
cursor c1(psubject varchar2,plmarks number,phmarks number) is
select rn,name,marks
from student
where subject=psubject
and marks between plmarks and phmarks ;
cursor c2 is
select subject from student;
begin
for w in c2 loop
for z in c1(w.subject,50,90) loop
dbms_output.put_line('subject is '||... | true |
09d8e157ce9c15a7708ce4a6e31517c5b95dc260 | SQL | izavasconcelos/algafood-api | /src/main/resources/db/migration/V005__create-orders-table.sql | UTF-8 | 1,690 | 3.6875 | 4 | [] | no_license | create table orders (
id bigint not null auto_increment,
subtotal decimal(10,2) not null,
shipping_fee decimal(10,2) not null,
total decimal(10,2) not null,
restaurant_id bigint not null,
user_client_id bigint not null,
payment_type_id bigint not null,
address_city_id bigint not null,
... | true |
81ae2e087157dc3cc8a8dedbaea5fc1db2f319b1 | SQL | Nikolay-712/CSharp-DB | /Databases Basics - MS SQL Server/SQL/SQLQuery1.sql | UTF-8 | 1,215 | 3.8125 | 4 | [] | no_license |
CREATE TABLE Users
(
Id INT PRIMARY KEY IDENTITY,
Username VARCHAR(30) NOT NULL,
[Password] VARCHAR(30) NOT NULL,
Email VARCHAR(50) NOT NULL
)
CREATE TABLE Repositories
(
Id INT PRIMARY KEY IDENTITY,
[Name] VARCHAR(50) NOT NULL
)
CREATE TABLE RepositoriesContributors
(
RepositoryId INT NOT NULL FOREIGN KEY RE... | true |
bfd9169babc68e5c952f6fae34a35ad387a61538 | SQL | sajrashid/dotnet6api | /setup.sql | UTF-8 | 1,248 | 3.171875 | 3 | [] | no_license |
CREATE TABLE IF NOT EXISTS testdb.Users (
Id INT UNSIGNED AUTO_INCREMENT PRIMARY KEY,
Email VARCHAR(256) NOT NULL,
Salt BINARY (16), Hash VARCHAR(65) NOT NULL,
LastVisit DATETIME,
INDEX (Email, Hash)
);
INSERT INTO testdb.Users (Email, Salt, Hash, LastVisit) VALUES
('testUser@test.com', _binary 0x056d4070a37614c8f3... | true |
ffb2baf8e551776951e64d69393f4d031d50909f | SQL | alvaromoca1/courier | /courier.sql | UTF-8 | 12,005 | 2.953125 | 3 | [
"MIT"
] | permissive | -- phpMyAdmin SQL Dump
-- version 4.9.1
-- https://www.phpmyadmin.net/
--
-- Servidor: 127.0.0.1
-- Tiempo de generación: 23-12-2019 a las 23:03:41
-- Versión del servidor: 10.4.8-MariaDB
-- Versión de PHP: 7.3.10
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
... | true |
607d24bd45d66e30941bb03fdd12f852d860cf00 | SQL | iamshirdi/Data-Structures-and-Algorithms | /introduction to computer science/SQL/fiftyville/log.sql | UTF-8 | 3,060 | 3.4375 | 3 | [] | no_license | -- Keep a log of any SQL queries you execute as you solve the mystery.
-- check what data is and log of interview
-- theft took place at 10.15am
SELECT * FROM crime_scene_reports
WHERE street = "Chamberlin Street"
AND month = 7
AND day = 28
AND year = 2020
;
-- check for 3 interviews description on following day
SEL... | true |
4f7dc50714235f39b682fbf3d57bee5b961d9641 | SQL | MonkeyInitiatives/goty-discord | /db/schema.sql | UTF-8 | 277 | 3.140625 | 3 | [] | no_license | ### Schema
CREATE DATABASE goty_db;
USE goty_db;
CREATE TABLE games
(
id int NOT NULL AUTO_INCREMENT,
gameName varchar(255) NOT NULL,
votes int,
PRIMARY KEY (id)
);
CREATE TABLE users
(
id int NOT NULL AUTO_INCREMENT,
userHash int,
userVotes int,
PRIMARY KEY (id)
); | true |
ff1f07df415e8c515b208c16b74841df74c80264 | SQL | Losajhonny/webscraping | /proyecto_de_clase/script/backupRecover/backup_recovery_selects.sql | UTF-8 | 882 | 2.671875 | 3 | [] | no_license | ALTER SYSTEM SWITCH LOGFILE;
SELECT * FROM user_tablespaces;
SELECT USERNAME, DEFAULT_TABLESPACE, TEMPORARY_TABLESPACE
FROM DBA_USERS
WHERE DEFAULT_TABLESPACE='PRACTICA2';
select log_mode from v$database;
alter session set "_ORACLE_SCRIPT"=true;
-- revisar archive log o no
select log_mode from v$d... | true |
78117e1ad40ede8df15b2479d7c2218a5177e9d9 | SQL | li-keguo/JAVA-01 | /Week_06/x mall 数据库设计/x_mall_xm_consumer_details.sql | UTF-8 | 1,509 | 3.078125 | 3 | [] | no_license | create table xm_consumer_details
(
consumer_details_id bigint auto_increment comment '消费者详情id'
primary key,
consumer_id bigint not null comment '消费者id',
email varchar(200) null comment '邮件地址',
id_card varchar(50)... | true |
6d930e1fc0a8fe1aeeb1cff8ca56789701c738d7 | SQL | IamLam163/holbertonschool-higher_level_programming | /0x0E-SQL_more_queries/7-cities.sql | UTF-8 | 256 | 3 | 3 | [] | no_license | -- create the database
-- and tables
CREATE DATABASE IF NOT EXISTS hbtn_0d_usa;
USE hbtn_0d_usa;
CREATE TABLE IF NOT EXISTS cities (id INT UNIQUE AUTO_INCREMENT PRIMARY KEY NOT NULL, state_id INT NOT NULL REFERENCES states(id), name VARCHAR(256) NOT NULL;
| true |
460164bbe7ad4f76a0e6a5068b14f83ce2d0a30c | SQL | xuan3925/yii2 | /modules/models/shop.sql | UTF-8 | 1,827 | 3.453125 | 3 | [
"BSD-3-Clause"
] | permissive | DROP TABLE IF EXISTS shop_admin;
CREATE TABLE IF NOT EXISTS shop_admin(
adminId INT UNSIGNED NOT NULL AUTO_INCREMENT,
adminUser VARCHAR(32) NOT NULL,
adminPwd CHAR(32) not NULL ,
adminMail VARCHAR(50) NOT NULL ,
loginTime INT UNSIGNED NULL ,
loginIp INT UNSIGNED NULL ,
createTime TIMESTAMP NOT NULL DEFAU... | true |
d13ea99cd4c656f61e8c8e355c2b03dd73af1a87 | SQL | RahilKhan/manageexpense | /Database/ME-DBS_1.0.1/full_install/Common/objects/source/dfp/tab_script/dfp_pq_config.sql | UTF-8 | 2,047 | 3.390625 | 3 | [] | no_license | prompt
prompt Creating table DFP_PQ_CONFIG
prompt ============================
prompt
declare
lv_tbl exception;
pragma exception_init(lv_tbl,-00942);
lv_part_name varchar2(100);
begin
begin
execute immediate 'drop table DFP_PQ_CONFIG purge';
exception
when lv_tbl then
null;
end;
execute... | true |
b887189522197a8355998da93e83a14a0d1a1eb0 | SQL | cdesmarais/WebDB-Test | /WebDB/StoredProcedures/Common/dbo.Admin_GetFraudLogByUserID.prc | UTF-8 | 1,319 | 3.953125 | 4 | [] | no_license | if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[Admin_GetFraudLogByUserID]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
drop procedure [dbo].[Admin_GetFraudLogByUserID]
GO
CREATE PROCEDURE dbo.Admin_GetFraudLogByUserID(
@UserID int,
@IsCaller bit
)
AS
SET NOCOUNT ON
SET TRANSACTION ISOLATION L... | true |
ebc6658df356620b41dabcd1bd5d9f5698af2e01 | SQL | linusyoung/SQLDatabase | /SqlQuery_1.sql | UTF-8 | 308 | 2.765625 | 3 | [] | no_license | /*
Section 2 codes - tables
*/
CREATE TABLE SalesLT.Courier
(
CourierID int NOT NULL,
CourierCode char(3) NOT NULL,
CourierName nvarchar(50) NOT NULL,
PRIMARY KEY (CourierID, CourierCode)
)
ALTER TABLE SalesLT.Courier
ADD Telephone varchar(15) NULL, Email varchar(25) NULL;
DROP TABLE SalesLT.Courier; | true |
7a0dff9e2fea5145e459ddbee7ea42e36ad900fd | SQL | eric2323223/FATPUS | /testscript/Workflow/Actions/conf/relationship.sql | UTF-8 | 543 | 3.234375 | 3 | [] | no_license | /**
To run this script successfully, please make sure 'Quoted identifer' option
(Window->Preferences->Sybase,Inc->Database Development->Connection Level Options)
is unchecked.
*/
DROP TABLE IF EXISTS P;
DROP TABLE IF EXISTS C;
CREATE TABLE dba.P (
pid INT NOT NULL,
pname VARCHAR(20) NULL,
)
IN SYSTEM
;
CREATE ... | true |
3a3540a6a4def4c15c7987dfe01620ee38f508e3 | SQL | skaehddnha/newch | /newch/database/old_db/ndw/board.sql | UTF-8 | 1,568 | 2.671875 | 3 | [] | no_license | CREATE table board (
no number(5) primary key,
title varchar2(100) not null,
writer varchar2(30) not null,
id varchar2(30) not null,
wDate date not null,
count number(10),
orgfilename varchar2(40),
newfilename varchar2(40),
context varchar2(3000) not null,
reCnt number(10),
recommand number(10),
report number(10)
);
c... | true |
772d1f8542f9769f8edb364de27fd690a42babb8 | SQL | tacr-iotcloud/server-db | /pgsql/queries/devices/update.sql | UTF-8 | 247 | 2.515625 | 3 | [] | no_license | UPDATE
beeeon.devices
SET
location_id = $1,
name = $2,
type = $3,
refresh = $4,
battery = $5,
signal = $6,
last_seen = beeeon.now_utc(),
active_since = beeeon.as_utc_timestamp($7)
WHERE
id = beeeon.to_device_id($8)
AND
gateway_id = $9
| true |
9c367e5a44a8f078e64f16827292f22cf09b7aa7 | SQL | verysuper/g_php_train | /php_student/學生成績資料庫_匯入資料/studentdb.sql | UTF-8 | 7,454 | 3.015625 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 2.10.3
-- http://www.phpmyadmin.net
--
-- 主機: localhost
-- 建立日期: Apr 08, 2015, 09:11 AM
-- 伺服器版本: 5.0.51
-- PHP 版本: 5.2.6
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
--
-- 資料庫: `studentdb`
--
-- --------------------------------------------------------
--
-- 資料表格式: `score`
--
CREATE... | true |
fde7a85b091af1490c67cba4e1a542b8d69e8712 | SQL | LombaKompetensiSiswa/web-design-kota_tangerang-2019 | /1_Reza_Juliandri/API.sql | UTF-8 | 9,334 | 3.140625 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.8.5
-- https://www.phpmyadmin.net/
--
-- Host: localhost:3306
-- Generation Time: Feb 14, 2019 at 10:02 AM
-- Server version: 5.7.24
-- PHP Version: 7.2.11
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CH... | true |
a5ca4163c35885d2c28aad7a0bb477a3cd55b4d6 | SQL | children/teamlab.v6.5 | /SQL_Scripts/SQLite/Files.sql | UTF-8 | 4,532 | 3.59375 | 4 | [] | no_license | -- files_bunch_objects
CREATE TABLE IF NOT EXISTS "files_bunch_objects" (
"tenant_id" INTEGER NOT NULL,
"right_node" varchar(255) NOT NULL COLLATE NOCASE,
"left_node" varchar(255) NOT NULL COLLATE NOCASE,
PRIMARY KEY ("tenant_id","right_node")
);
CREATE INDEX IF NOT EXISTS "files_bunch_objects_left_node" ON "fi... | true |
fee7c28039aff4da2ce81c1e14b7c8e59d804532 | SQL | chdtu-fitis/deanoffice-backend | /src/main/resources/db/migration/V30__add_extra_points_table.sql | UTF-8 | 508 | 3.234375 | 3 | [] | no_license | CREATE TABLE extra_points (
id SERIAL PRIMARY KEY,
student_degree_id integer NOT NULL,
semester integer NOT NULL,
points integer NOT NULL
);
ALTER TABLE extra_points
ADD CONSTRAINT fk_extra_points_stud... | true |
e13a9f7ad8e692d3408b779580a9e39420fa9f72 | SQL | RobNobile/photo-depot | /pg_database.sql | UTF-8 | 699 | 3.71875 | 4 | [] | no_license | CREATE TABLE users
(
"userid" serial PRIMARY KEY,
"name" varchar NOT NULL CHECK ( name <> ''),
"profilephoto" varchar NOT NULL
);
SELECT setval('users_userid_seq', 1, false);
CREATE TABLE photos
(
"photoid" serial PRIMARY KEY,
"url" varchar NOT NULL,
"userid" bigint NOT NULL,
"date" varchar NO... | true |
a17b9d0b8c98096f13aa8c1a097d9b810dbd2a78 | SQL | rkarthikraj/Login_SharedPref | /Php/login_db.sql | UTF-8 | 1,920 | 3.0625 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.1.14
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Jan 05, 2017 at 09:28 PM
-- Server version: 5.6.17
-- PHP Version: 5.5.12
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;... | true |
2799da23b00c44017a700d04cb4a55978bd6721c | SQL | thibautdi/Lab1 | /storedProcedures.sql | UTF-8 | 1,351 | 3.46875 | 3 | [] | no_license | //Removing a club by id :
DELIMITER //
CREATE PROCEDURE RemoveClub(IN clubID INT(11))
BEGIN
DELETE FROM clubs WHERE id = clubID;
END //
DELIMITER ;
//Reviewing a club by id :
DELIMITER //
CREATE PROCEDURE ValidateClub(IN clubID INT(11))
BEGIN
UPDATE clubs SET reviewed = 1 WHERE id = clubID;
END //
DELIMITER ;
//Gett... | true |
6cd09c10f1d4650967a600f1934e178198d7b77e | SQL | bsamual/accpramans.com | /uploads/crm_image/purchase/MTQ=/request_client.sql | UTF-8 | 2,578 | 2.796875 | 3 | [
"MIT"
] | permissive | -- phpMyAdmin SQL Dump
-- version 4.4.14
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Oct 25, 2019 at 05:02 PM
-- Server version: 5.6.26
-- PHP Version: 5.6.12
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;... | true |
38e5fa2efd09af6ec17b0bbe022d50b822dc38a0 | SQL | jm-sqribl/core | /repository-scripts/people.cql | UTF-8 | 128 | 2.828125 | 3 | [] | no_license | create table people (
name text,
saying text,
id timeuuid,
primary key((name),id)
) with clustering order by (id desc); | true |
66ed98e7bf63ec8cbb399ff6b6c9f81a1a00815e | SQL | ParfaitG/RANDOM_DATA | /RandomData.sql | UTF-8 | 1,475 | 3.9375 | 4 | [] | no_license | --POSTGRES SQL DIALECT
DROP TABLE IF EXISTS RandomData;
CREATE TABLE RandomData (
"KEY" INT,
"ID" INT,
"GROUP" VARCHAR(5),
"NUM1" DECIMAL(10,2),
"NUM2" DECIMAL(10,2),
"BOOL" BOOL,
"DATE" TIMESTAMP WITH TIME ZONE
);
-- INITIAL ROW
INSERT INTO RandomData
VALUES (1, FLOOR(RANDOM()*(15-1))+1,
SUBS... | true |
0da875bb99d226fb82805b2db2c15a96db1a1800 | SQL | dgoodwin/syncsets | /schema/20201126085459_add_clusters_table.sql | UTF-8 | 509 | 2.625 | 3 | [
"Apache-2.0"
] | permissive | -- +goose Up
-- +goose StatementBegin
CREATE TABLE clusters (
id serial NOT NULL PRIMARY KEY,
name varchar(255) NOT NULL,
namespace varchar(255) NOT NULL,
data jsonb NOT NULL,
unique (name, namespace)
);
CREATE TABLE syncsets (
id serial NOT NULL PRIMARY KEY,
name varchar(255) NOT NULL,
namespace varchar(255) N... | true |
39e5a54c9f621c15292d6ce1c355728627c39f0b | SQL | philtherockstar/limelight_bids | /db/bids.sql | UTF-8 | 780 | 3.25 | 3 | [] | no_license | CREATE TABLE "bids" (
"id" INTEGER PRIMARY KEY,
"property_id" int(11) NOT NULL,
"bid_date" datetime DEFAULT NULL,
"staging_fee" decimal(5,2) DEFAULT NULL,
"distribution_fee" decimal(5,2) DEFAULT NULL,
"rental_weekly" decimal(5,2) DEFAULT NULL,
"rental_monthly" decimal(5,2) DEFAULT NULL,
"rental" decima... | true |
b137dafcd32fa97366fe745f95935a8759ec2cb0 | SQL | idasbrt/a1_t3 | /query_2b.sql | UTF-8 | 127 | 2.796875 | 3 | [] | no_license | SELECT m.LastName, m.FirstName, m.MemberID
FROM Member AS m
WHERE m.JoinDate >= '2013-01-01' AND m.JoinDate <= '2013-12-31';
| true |
f0d074b40900a7c057ac8cf9e9a40e3ce5d6548a | SQL | alex-heritier/Uber2 | /uber2_db.sql | UTF-8 | 3,774 | 2.953125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.7.0
-- https://www.phpmyadmin.net/
--
-- Host: uber2.db
-- Generation Time: Apr 25, 2017 at 08:08 PM
-- Server version: 10.1.18-MariaDB-1~xenial
-- PHP Version: 5.6.28-nfsn1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*... | true |
00afc06509ed72fd9fa5f6c20f457f015ad3a3ec | SQL | tantandesu/washdog | /mysql-init/schema.sql | UTF-8 | 2,142 | 3.359375 | 3 | [] | no_license |
create table user (
id integer not null auto_increment
, email varchar(255) not null unique
, registrationKey varchar(255) not null
, password varchar(255) not null
, verified boolean not null default FALSE
, primary key (id)
);
-- void the API key to... | true |
88a92519c5d2e3320a2bb1feaed509cccf248fff | SQL | KamenRider01/mb01 | /SQLQuery1.sql | GB18030 | 2,382 | 4.40625 | 4 | [] | no_license | create table [dep]
(
[deptno] int primary key,
[dname] char(10) not null
)
create table [emp]
(
empno int primary key,
ename char(50) not null,
job char(20) not null,
mgr char(20),
sal int not null,
deptno int not null
)
insert into [dep]
select 1,'ҵ' union
select 2,'۲' union
select 3,''
inser... | true |
4d5066178e3de5b1564f65f73c4d43484e7c806a | SQL | M1Sh0u/jQVersion.com | /jqversion.sql | UTF-8 | 14,383 | 2.75 | 3 | [] | no_license | --
-- TABLE STRUCTURE `tests`
--
CREATE TABLE IF NOT EXISTS `tests` (
`test_id` bigint(20) NOT NULL AUTO_INCREMENT,
`test_identifier` varchar(255) NOT NULL,
`test_working_version_id` int(11) NOT NULL,
`test_events` varchar(255) NOT NULL,
`test_actions` longtext,
`test_versions_ids` varchar(255) DEFAULT NUL... | true |
88a747306a7f6ad4e51511e5b57df039a44260b3 | SQL | adonisEstrada/sirecoit | /src/java/sirecoitonlychema.sql | UTF-8 | 9,325 | 2.765625 | 3 | [] | no_license | --
-- PostgreSQL database dump
--
-- Dumped from database version 9.5.14
-- Dumped by pg_dump version 9.5.14
-- Started on 2019-03-05 15:19:05 -04
SET statement_timeout = 0;
SET lock_timeout = 0;
SET client_encoding = 'UTF8';
SET standard_conforming_strings = on;
SELECT pg_catalog.set_config('search_path', '', false... | true |
f850df606e7fae52054041273d9319fb880fca28 | SQL | maitiigor/medical_a | /medical_record_app.sql | UTF-8 | 16,189 | 2.734375 | 3 | [
"MIT"
] | permissive | -- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Jul 23, 2021 at 04:45 PM
-- Server version: 10.4.11-MariaDB
-- PHP Version: 7.4.4
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIEN... | true |
d0bd172df2dd88df2fac1c851b7363a47a12b2ca | SQL | gonerkong/sqlzoo_solutions | /SELECT-basics.sql | UTF-8 | 1,129 | 4.28125 | 4 | [] | no_license | /*
#1
Introducing the world table of countries
Q:
The example uses a WHERE clause to show the population of 'France'. Note that strings (pieces of text that are data) should be in 'single quotes';
Modify it to show the population of Germany
*/
SELECT
population
FROM
world
WHERE
NAME = 'Germany';
/*
... | true |
3e7d2d038aab14e1a2b3818dcaad21afe3affaaf | SQL | cwi-crescer-2017-1/jomar.cardoso | /modulo-07/tarefa 2/estados de sorte.sql | UTF-8 | 2,156 | 3.171875 | 3 | [] | no_license | create or replace package body pck_estadosDeSorte is
/*
function buscaEstado(pConcurso in integer) return varchar2 as
v_estadoDeSorte varchar2(2);
begin
select c.Uf, sum(a.Valor)
into v_estadoDeSorte
from Cidade c
inner join Aposta a on c.IDCIDADE = a.IDCIDADE
wh... | true |
ae0241b279c88fd7de8bdab09d758ce345c8125c | SQL | Demigod21/NobleMax-WebCinema | /database/noblemax.sql | UTF-8 | 3,856 | 3.1875 | 3 | [] | no_license | -- Progettazione Web
DROP DATABASE if exists noblemax;
CREATE DATABASE noblemax;
USE noblemax;
-- MySQL dump 10.13 Distrib 5.6.20, for Win32 (x86)
--
-- Host: localhost Database: noblemax
-- ------------------------------------------------------
-- Server version 5.6.20
/*!40101 SET @OLD_CHARACTER_SE... | true |
9b02b27f7d1795bea3c94aef07795a005868d1dd | SQL | Jun3273/mini-reddit | /static/data/schema.sql | UTF-8 | 495 | 3.640625 | 4 | [] | no_license | CREATE TABLE users(
first_name text,
last_name text,
userID text primary key,
hashcode int,
filename1 text
);
CREATE TABLE posts(
post_id text primary key,
title text,
content text,
create_time text,
vote_count int,
userID text,
FOREIGN KEY (userID)
... | true |
db3d46d458a3d2f0135e2694f7544bcf2e6c6344 | SQL | ToborTheGreat/Repository01 | /toolkit.legacy_topo_staging_e911.sql | UTF-8 | 997 | 2.625 | 3 | [] | no_license | --
-- PostgreSQL database dump
--
SET statement_timeout = 0;
SET client_encoding = 'UTF8';
SET standard_conforming_strings = off;
SET check_function_bodies = false;
SET client_min_messages = warning;
SET escape_string_warning = off;
SET search_path = toolkit, pg_catalog;
DROP INDEX toolkit.legacy_topo_staging_e911_i... | true |
78928b9ee98de9d88a059dab3823edbfbe2cf15c | SQL | tehilaamram/Stock-Managment-Osher-Ad | /insertIntegration.sql | UTF-8 | 25,229 | 2.515625 | 3 | [] | no_license | -- area insert
INSERT INTO area (areaId,areaName)
VALUES (002,'Jerusalem');
INSERT INTO area (areaId,areaName)
VALUES (003,'Center');
INSERT INTO area (areaId,areaName)
VALUES (004,'North');
INSERT INTO area (areaId,areaName)
VALUES (005,'Judea-Samaria');
INSERT INTO area (areaId,areaName)
VALUES (008,'Sou... | true |
5d010ba6774afc524d7324a404e4382e3b95a670 | SQL | dalmus/After_Houre | /Stats_jamp!/stats.sql | UTF-8 | 340 | 3.328125 | 3 | [] | no_license | SELECT * FROM players WHERE team = 'NYK' ;
SELECT * FROM players WHERE team = 'IND' and age < 26;
SELECT * FROM players, ORDER BY points;
SELECT name, points/games FROM players ORDER BY points DESC LIMIT 20;
SELECT AVG(age) FROM players;
SELECT AVG(age) FROM players WHERE team = 'OKC';
SELECT AVG(age) FROM player... | true |
f12a50c62fc861d6c8b27b29fffb99dfebf61d3e | SQL | sasidharan10/MySQL | /1 delete duplicate records advanced.sql | UTF-8 | 1,583 | 3.65625 | 4 | [] | no_license | use problems;
Create Table EmpDetail (
ID int not null auto_increment,
EmpName varchar(25),
Departmemt varchar(20),
Age int,
Gender char(1),
Salary Bigint,
primary key(ID)
);
Insert into EmpDetail (EmpName,Departmemt,Age,Gender,Salary) values('James','HR',30,'M',40000);
Insert into EmpDetail (EmpName,Departmemt,Age,G... | true |
447eab162413011c10c2adc76cd1b4c366fa7a13 | SQL | free-way/riverwaveActors | /seeds/roles.sql | UTF-8 | 1,197 | 3.109375 | 3 | [] | no_license | /* Roles */
INSERT into rw_roles (name,slug,created_at,updated_at) values ("Administrator","admin",current_time ,current_time );
/* Permissions */
INSERT INTO rw_permissions (name,created_at,updated_at) VALUES ("READ",current_time ,current_time );
INSERT INTO rw_permissions (name,created_at,updated_at) VALUES ("WRITE... | true |
30c716af96e6e61a93ea9af64e8d9b518d640a2d | SQL | leomastakusuma/myindo | /DB_Myindo.sql | UTF-8 | 3,172 | 2.90625 | 3 | [
"Apache-2.0"
] | permissive | -- phpMyAdmin SQL Dump
-- version 4.0.6deb1
-- http://www.phpmyadmin.net
--
-- Inang: localhost
-- Waktu pembuatan: 13 Jun 2014 pada 16.03
-- Versi Server: 5.5.35-0ubuntu0.13.10.2
-- Versi PHP: 5.5.3-1ubuntu2.3
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@... | true |
ba4a50104d59fdaaa1c2753ba72c6c5ddf08c11b | SQL | hellge83/AI_sql | /les09/les09.sql | WINDOWS-1251 | 3,872 | 4.28125 | 4 | [] | no_license | -- task 06_01
truncate table sample.users;
start transaction;
insert into sample.users (name, birthday_at)
select name, birthday_at from shop.users
where id = 2;
delete from shop.users where id = 2;
commit;
-- task 06_02
use shop;
create view product_to_catalog as
select
p.name as product_name
, c.name as ca... | true |
01ccf1a3adedbd0030e393352bbcfdf6a7ef4c30 | SQL | jinalprajapti/orderitemservice | /src/main/resources/schema.sql | UTF-8 | 286 | 2.828125 | 3 | [] | no_license | DROP TABLE IF EXISTS ORDER_ITEM;
CREATE TABLE ORDER_ITEM (
order_item_id INT(11) NOT NULL AUTO_INCREMENT PRIMARY KEY,
product_code VARCHAR(45) NOT NULL,
product_name VARCHAR(45) NOT NULL,
quantity INT(11) NOT NULL,
order_id INT(11) NOT NULL,
PRIMARY KEY (order_item_id)
); | true |
9c65e132970da41dc55a25bbd203617f49a2b900 | SQL | sogis/gretljobs | /awjf_gewaesser_fischerei_pub/fischerei.sql | UTF-8 | 468 | 2.828125 | 3 | [
"MIT"
] | permissive | SELECT
revierid,
aname,
beschreibung,
eigentum,
CASE
WHEN fischbestand = 'G' THEN 'Gemischt'
WHEN fischbestand = 'E' THEN 'Edelfisch'
ELSE NULL
END AS fischbestand,
fischerei,
ST_Multi(ST_RemoveRepeatedPoints(ST_Union(geometrie), 0.001)) AS geometrie
FROM
... | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.