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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
0f90408fb12d6fc724625553dd603b4ffbe634dc | SQL | gmicheva/SoftUni | /MsSQL/05.SubqueriesAndJOINsExercises/17.HighestPeakAndLongestRiverByCountry.sql | UTF-8 | 687 | 4.71875 | 5 | [] | no_license | --17. Highest Peak and Longest River by Country
SELECT Country, [Highest Peak Name], [Highest Peak Elevation], Mountain FROM(
SELECT CountryName AS [Country],
ISNULL(p.PeakName,'(no highest peak)') AS [Highest Peak Name],
ISNULL(p.Elevation, 0) AS [Highest Peak Elevation],
ISNULL(mn.MountainRange, '(no mounta... | true |
f45b3014fb5abe09b3fd59af34b088faf0552170 | SQL | DianaGumar/DataBaseComparable | /qbq.EPCIS.Repository/Helper/Stored Procedures/usp_Get_Record_Per_Minute.sql | UTF-8 | 790 | 3.3125 | 3 | [] | no_license | -- =============================================
-- Author: <Author,,Name>
-- Create date: <Create Date,,>
-- Description: <Description,,>
-- =============================================
CREATE PROCEDURE Helper.usp_Get_Record_Per_Minute
-- Add the parameters for the stored procedure here
@STARTDATE DATE,
... | true |
b09601918a900882f832ad923542e1b931b8100c | SQL | Optinomic/apps | /ch.forel.apps.actinfo_aus/includes/export_Nora.sql | UTF-8 | 19,596 | 2.6875 | 3 | [] | no_license | SELECT
patient.id AS pid,
patient,
CASE WHEN patient.gender='Male' THEN 'Herr' ELSE 'Frau' END || ' ' || COALESCE(patient.last_name, '') || ' ' || COALESCE(patient.first_name, '') AS patient_name,
patient.four_letter_code,
((cast(response AS json))->>'Institution') as institution,
((cast(response AS json))-... | true |
ca15ac1a70a036aed6037085741845366f5ae4f0 | SQL | shaunscott12/CentraView | /database/update-v0_8.sql | UTF-8 | 504 | 2.734375 | 3 | [] | no_license | -- Changes between version 0.7 and 0.8
-- Naresh's fix for setting existing user's default email accounts in preference
UPDATE `userpreference` up, `emailaccount` ea SET up.`preference_value`=ea.`accountid`
WHERE up.`individualid`=ea.`owner` AND up.`moduleid`=1 AND up.`preference_name`='emailaccountid';
-- Naresh's ... | true |
3745e88af8d1714d68573510af35f30f3bdac715 | SQL | trainsn/SpatialDatabase | /Lab4/1.sql | UTF-8 | 969 | 3.828125 | 4 | [
"MIT"
] | permissive | create extension postgis;
drop table if exists Sales;
create table Sales
(
name varchar(255),
discount float,
month varchar(10),
price float
);
select * from Sales;
delete from Sales;
copy Sales(name,discount,month,price) from 'e:\\SaleData.txt' delimiter '#';
drop table if exists NameMonth;
drop table i... | true |
ef704b8d68f0e470b514fc852dfe7b1ae45fd1e9 | SQL | koupper/poskique | /BaseDatos/Query/ventas.sql | UTF-8 | 458 | 3.203125 | 3 | [] | no_license | if OBJECT_ID('ventas') is not null
drop table ventas;
create table ventas(
id_venta varchar(25) primary key,
total money,
codigo_empleado int,
id_tienda int,
fecha datetime default getdate(),
id_caja varchar(30),
no_ticket int identity--,
--foreign key (codigo_empleado) references usuario(codigo... | true |
e01284c7d115f71cb4ececaef7246f3421dfa237 | SQL | andytanoko/4.2.x_integration | /PDIPFramework/FrameWork/sqlscripts/create-refnum.sql | UTF-8 | 303 | 2.703125 | 3 | [] | no_license | #
# Table structure for table 'referencenum'
#
use appdb;
DROP TABLE IF EXISTS referencenum;
CREATE TABLE IF NOT EXISTS referencenum (
RefName varchar(50) NOT NULL DEFAULT '' ,
LastRefNum bigint(20) NOT NULL DEFAULT '0' ,
MaxRefNum bigint(20) NOT NULL DEFAULT '-1' ,
PRIMARY KEY (RefName)
);
| true |
321c57f5ca8bafc3c5585e9a333d11afac43af34 | SQL | leoesleo1017/pricingshopper | /sql/rutinas_retail/05_subrutina_va_codificacion7.sql | UTF-8 | 2,359 | 3.65625 | 4 | [] | no_license | DROP TABLE IF EXISTS PUBLIC.temp_05_va_codificacion7;
CREATE TABLE PUBLIC.temp_05_va_codificacion7 AS
WITH
_va_codificacion AS (
SELECT *
FROM PUBLIC.temp_05_va_codificacion
WHERE "tipo_codificacion" = 'TIPO_SABOR'
AND "tipo_codificacion" = 'VARIEDAD'
AND "tipo_codificacion" = 'TIPONEG'
AND "tipo_codificacion"... | true |
1dfbc8a8a62d6566e47f1496fc489300317dfe67 | SQL | KanchanChintalwar/Basic-banking-system | /TSF Basic banking system/banking_sysyem.sql | UTF-8 | 3,064 | 3.296875 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 5.1.0
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Jun 19, 2021 at 09:50 AM
-- Server version: 10.4.18-MariaDB
-- PHP Version: 7.3.28
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIE... | true |
ba0edee01188dd15b76e137dc8910403b905d48b | SQL | Zhecha/DB_Labs | /1lab/V13_2.sql | UTF-8 | 850 | 3.78125 | 4 | [] | no_license | SELECT
HumanResources.Department.DepartmentID,
HumanResources.Department.Name
FROM
HumanResources.Department
WHERE HumanResources.Department.Name LIKE 'P%';
SELECT
HumanResources.Employee.BusinessEntityID,
HumanResources.Employee.JobTitle,
HumanResources.Employee.Gender,
HumanResources.Employee.V... | true |
b9d4939d9d60bc17ef48e97f03ae4dc94031fb15 | SQL | jeevan1133/StaCIA | /StaciaInnoDB.sql | UTF-8 | 2,470 | 3.578125 | 4 | [] | no_license | create table if not exists club(
cname varchar(200),
clubDescription varchar(3000),
website varchar(3000),
department varchar(200),
generalPhone varchar(200),
generalEmail varchar(200),
primary key (cname)) engine=InnoDB;
create table if not exists clubSchedule(
schid integer auto_increment,
cname va... | true |
366b06ea522c57dfe550beb22a66316c89014d81 | SQL | igortorati/Programacao_Web | /DB/BD_Prog_Web.sql | UTF-8 | 7,774 | 3.359375 | 3 | [] | no_license | -- MySQL Workbench Forward Engineering
SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0;
SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0;
SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTI... | true |
b5296063c34e90f9ab24b33c908e5e47622fb21f | SQL | todus25/film-database | /film_search.sql | UTF-8 | 8,013 | 3.328125 | 3 | [
"MIT"
] | permissive | -- phpMyAdmin SQL Dump
-- version 4.5.1
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Jan 27, 2017 at 12:10 PM
-- Server version: 10.1.19-MariaDB
-- PHP Version: 5.6.28
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CL... | true |
808c6754ccf698021b4234ac2eda57c37b0fbcd9 | SQL | siriuscomputersolutions/SiriusAboutSnowflake | /query-tags/query_tags.sql | UTF-8 | 2,097 | 3.59375 | 4 | [] | no_license | /*=============================================
Title: query_tags
Usage: N/A
Author: Sirius Computer Solutions, Inc.
--
Create date: 2020-JUN-18
--
Description: Sirius About Snowflake - Query Tag - Demo
Query Tag Demo script
Goal: Demonstrate query tags in Snowflake
Snowflake Functionality ... | true |
e907078dc5231cd30d6d4b12b92dfe6d0dbb03ba | SQL | MatSebMan/GetApp | /web/deltas/ScheduleAvailability.sql | UTF-8 | 243 | 2.578125 | 3 | [] | no_license | CREATE TABLE scheduleAvailability (
id SERIAL PRIMARY KEY,
idDea INT NOT NULL REFERENCES dea (id),
weekday INT NOT NULL CHECK (weekday >= 0) CHECK (weekday < 8),
weekday INT NOT NULL,
startTime TIME NOT NULL,
endTime TIME NOT NULL
); | true |
62f1a3c9a753c97dcb74b40b58d5d2de621cb929 | SQL | ankang1993/Fisher | /data.sql | UTF-8 | 2,868 | 3.640625 | 4 | [] | no_license | drop database if exists fisher;
create database fisher CHARACTER SET 'utf8' COLLATE 'utf8_general_ci';
use fisher;
create table attend_type_inf
(
type_id int auto_increment,
amerce_amount double not null,
type_name varchar(50) not null,
primary key(type_id)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
create table emp... | true |
baefd47914ae3d80a03c43c2d1ef44050aa2eb17 | SQL | ChenShuai1981/flink-sql-submit | /src/main/resources/sql/kafka_file.sql | UTF-8 | 2,026 | 3.734375 | 4 | [
"Apache-2.0"
] | permissive | -- 使用 TableEnvironment
-- source
CREATE TABLE player_source (
player_id DECIMAL,
team_id DECIMAL,
player_name VARCHAR,
height DECIMAL
) WITH (
'connector.type' = 'kafka',
'connector.version' = 'universal',
'connector.topic' = 'player',
'connector.startup-mode' = 'earliest-offset',
'connecto... | true |
a11e98128366eb6ef4398237cf3510cce651f95f | SQL | bellmit/xn-htwt | /docs/backup/bak/schema_xn_htwt_refact.sql | UTF-8 | 26,102 | 3.46875 | 3 | [] | no_license | DROP TABLE IF EXISTS `tdq_credit_jour`;
CREATE TABLE `tdq_credit_jour` (
`code` varchar(32) NOT NULL COMMENT '编号',
`biz_code` varchar(32) DEFAULT NULL COMMENT '业务编号',
`credit_user_code` varchar(32) DEFAULT NULL COMMENT '征信人编号',
`type` varchar(32) DEFAULT NULL COMMENT '类型(微信/支付宝/银行)',
`datetime_start` datetime ... | true |
ce17a539910ce86997129b5b972c680d576caaaf | SQL | jobchoi/study_dbms | /0827.sql | UHC | 4,705 | 4.65625 | 5 | [] | no_license | select salary
from employees
where max(salary);
1. -
2. -
3. ķ - ÷ ÷
4. scalar - select ϴ
5. ȣ - ÷ Ǵ
6. inline view - from ϴ
1.
츮ȸ ľϰ Ѵ.
츮ȸ պ , , ڵ, ȸ
select employee_id, last_name, job_id, salary
from employees
where salary < (select avg(salary) from employees);
150 ... | true |
0a4983c0570ae27bda8c0a947eb59c0397c97e52 | SQL | Darchinyan/Test-Future | /Future/future.sql | UTF-8 | 4,097 | 3.140625 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.5.5.1
-- http://www.phpmyadmin.net
--
-- Хост: 127.0.0.1
-- Время создания: Дек 23 2017 г., 03:12
-- Версия сервера: 5.7.11
-- Версия PHP: 5.6.19
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!... | true |
55b3c379814fddf4e4a05c34002d9331513c2bce | SQL | lichuachua/cp-api | /src/docs/db_cp_api.sql | UTF-8 | 3,888 | 3.40625 | 3 | [] | no_license | /*
Navicat Premium Data Transfer
Source Server : localhost
Source Server Type : MySQL
Source Server Version : 50722
Source Host : localhost:3306
Source Schema : db_cp_api
Target Server Type : MySQL
Target Server Version : 50722
File Encoding : 65001
Date: 31/07/2018 ... | true |
659910cfa31806249f0e431e8eab2be1eaf62122 | SQL | Qzwini/warith | /database/awareness.sql | UTF-8 | 24,131 | 3.25 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 5.0.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Mar 05, 2021 at 04:31 PM
-- Server version: 10.4.17-MariaDB
-- PHP Version: 7.4.13
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIE... | true |
8f19fe3e123a5d9a13b37a28a65c3b0582d2d018 | SQL | AIsacson/Inlupp4 | /Q1.sql | UTF-8 | 166 | 3.328125 | 3 | [] | no_license | SELECT XMLGROUP(title AS "Titel" OPTION ROOT "Resultat" ROW "Bok" AS ATTRIBUTES)
FROM book
WHERE (SELECT COUNT(book)
FROM edition
WHERE book.id = book)>1; | true |
85600383dea942db1b02e56e6a6422c1ac8ce939 | SQL | radtek/abs3 | /sql/mmfo/bars/View/v_dpt_user_delreqs.sql | UTF-8 | 1,898 | 3.3125 | 3 | [] | no_license |
PROMPT =====================================================================================
PROMPT *** Run *** ========== Scripts /Sql/BARS/View/V_DPT_USER_DELREQS.sql =========*** Run
PROMPT =====================================================================================
PROMPT *** Create view V_DP... | true |
d71a0592bd83d4c2a40f1bf366d4450351595458 | SQL | VijayEnt/Daksham | /dfs_mysql/dfs_mstaddress.sql | UTF-8 | 2,531 | 3.03125 | 3 | [] | no_license | CREATE DATABASE IF NOT EXISTS `dfs` /*!40100 DEFAULT CHARACTER SET utf8 */;
USE `dfs`;
-- MySQL dump 10.13 Distrib 5.7.17, for Win64 (x86_64)
--
-- Host: localhost Database: dfs
-- ------------------------------------------------------
-- Server version 5.6.36-log
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@... | true |
b5d103f1a18f67d3d523694f1cc8681ebf82577c | SQL | SeYoung1012/ProjectDOLBOM | /PROJECT_DOLBOM/sql/dolbom.sql | UTF-8 | 5,453 | 4 | 4 | [] | no_license | ------------- 공지사항 테이블 ----------------
CREATE TABLE BOARD (
IDX NUMBER NOT NULL ,
A_ID VARCHAR2(20) NOT NULL,
TITLE VARCHAR2(100) NOT NULL,
CONTENT CLOB NOT NULL,
B_DATE DATE DEFAULT SYSDATE NOT NULL,
FILE_NAME VARCHAR2(100) NULL,
ORI_NAME VARCHAR2(100) NULL,
HIT NUMBER DEFAULT 0 NULL,
CONSTRAINT BOARD_PK ... | true |
7b5e31f05de1f71b99c0cbca542be9a3df8acd32 | SQL | abdilahCoding/Application-Desktop-Gestion-Employ- | /gestionEmp.sql | UTF-8 | 1,830 | 3.078125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.9.2
-- https://www.phpmyadmin.net/
--
-- Hôte : 127.0.0.1:3306
-- Généré le : jeu. 07 jan. 2021 à 20:57
-- Version du serveur : 10.4.10-MariaDB
-- Version de PHP : 7.4.0
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!... | true |
7fdf4f276f5bbc3ebfe98b277471126de86aba3a | SQL | wrotsch/FraternityAlumniDatabaseDesing | /Alumnidatabase DonationDescriptionAnalysis.sql | UTF-8 | 342 | 3.265625 | 3 | [] | no_license | use alumnidatabaseks;
SELECT DONATIONS.DonationDescription, Count(DONATIONS.DonationDescription) AS CountofDonationDescription, Sum(DONATIONS.DonationAmount) AS SumOfDonationAmount, format(Avg(DONATIONS.DonationAmount), 2) AS AvgOfDonationAmount
FROM DONATIONS
GROUP BY DONATIONS.DonationDescription
ORDER BY CountofDon... | true |
5190921912662ed688fcedc619c1a42a28af2aa8 | SQL | mzhao15/mylearning | /sql/leetcode/leetcode579_FindCumulativeSalaryOfANEmployee.sql | UTF-8 | 1,273 | 4.8125 | 5 | [] | no_license | /*
https://circlecoder.com/find-cumulative-salary-of-an-employee/
The Employee table holds the salary information in a year.
Write a SQL to get the cumulative sum of an employee’s salary over a period of 3 months but exclude the most recent month.
The result should be displayed by ‘Id’ ascending, and then by ‘Month’... | true |
67e92f9fd31a7f1ec811958defc12097c7964fae | SQL | Neimarmg/BD | /BD2_2M/T3 - Avalicação 2014-1/View - comissaoes_funcionarios.sql | UTF-8 | 624 | 3.703125 | 4 | [] | no_license |
-- Exe 10
CREATE VIEW comissaoes_funcionarios AS (
SELECT
funcionarios.nome,
SUM((vendas_itens.quantidade_item * produtos.preco_unitario)*comissoes.comissao/100) AS Total_comissao_funcionario
FROM ((vendas_itens INNER JOIN produtos ON vendas_itens.codigo_produto = produtos.idProduto)
and vendas_itens I... | true |
5c65d0a785f7aaebf1743d66b1c97cc502d65312 | SQL | rktdencxukw/pulsar-tutorials | /amazon/src/main/resources/amazon/sql/extract/crawl/x-asin-reviews.sql | UTF-8 | 1,797 | 3 | 3 | [] | no_license | -- noinspection SqlResolveForFile
-- noinspection SqlNoDataSourceInspectionForFile
select
dom_base_uri(dom) as `url`,
dom_first_slim_html(dom_owner_body(dom), '.product-title h1 a, a[data-hook=product-link]') as `asin`,
dom_first_href(dom, 'a.review-title-content, a[data-hook=review-title]') as `reviews_ur... | true |
bf6ffcddddc4511ccdd4256303c272b26d70ac57 | SQL | linux-devops/inception_web | /sql/mysqlcheck.sql | UTF-8 | 14,156 | 3.578125 | 4 | [] | no_license |
-- ----------------------------
-- Added by taolr, 注意, 该脚本只用于初始化
-- ----------------------------
CREATE DATABASE mysqlcheck;
USE mysqlcheck;
SET FOREIGN_KEY_CHECKS=0;
-- ----------------------------
-- Table structure for auth_group
-- ----------------------------
DROP TABLE IF EXISTS `auth_group`;
CREATE TABLE `au... | true |
5c83f41a549ff9db758ba6d5a0b55a6cb138d208 | SQL | McGradyZww/learning-practise | /D2.Designs/D2.Designs/SQL脚本/清算期货/ClearFutuSett_at.sql | UTF-8 | 123,281 | 2.796875 | 3 | [] | no_license | DELIMITER ;;
use db_clfutu;;
# 原子_清算期货_结算_更新获取清算持仓
DELIMITER ;;
DROP PROCEDURE IF EXISTS pra_clfust_UpdateGetPosi;;
DELIMITER ;;
CREATE PROCEDURE pra_clfust_UpdateGetPosi(
IN p_opor_co_no int,
IN p_opor_no int,
IN p_oper_mac varchar(32),
IN p_oper_ip_addr varchar(32),
IN p_oper_info varchar(1024),
... | true |
2489a501594285adf45e5084767c7a194b0ad6e9 | SQL | SteelBIM/fxtcode | /FxtCenterService/onLine_20161031/FxtCenterService.DataAccess/SQL/SPDB/ProjectCaseListSPDB.sql | UTF-8 | 3,496 | 3.71875 | 4 | [] | no_license | select
tb.CityID,
t1.zipcode as CityZipcode,
t1.CityName,
ISNULL(tb.AreaID,0) as AreaID,
t2.AreaName,
ISNULL(tb.SubAreaId,0) as SubAreaId,
t3.SubAreaName,
tb.ProjectId,
tb.ProjectName,
ISNULL(tb.BuildingArea,0) as BuildingArea,
ISNULL(t4.Code,-1) as BuildingTypeCode,
t4.CodeName as BuildingTypeCodeName,
I... | true |
39c86fb42360afcc059fd4784db82c8b30a7d286 | SQL | Pandoro837/jblog | /src/main/webapp/jblog.sql | UTF-8 | 17,032 | 3.140625 | 3 | [] | no_license | --------------------------------------------------------
-- 파일이 생성됨 - 토요일-8월-14-2021
--------------------------------------------------------
--------------------------------------------------------
-- DDL for Sequence SEQ_CATEGORY_NO
--------------------------------------------------------
CREATE SEQUEN... | true |
b649539c367478d13eaa7966c5bf63a4b66d5eef | SQL | AshishThakur10/postgreSQL | /Query/CREATEDATABASE.sql | UTF-8 | 497 | 2.59375 | 3 | [] | no_license | CREATE DATABASE name
[ [ WITH ] [ OWNER [=] user_name ]
[ TEMPLATE [=] template ]
[ ENCODING [=] encoding ]
[ LC_COLLATE [=] lc_collate ]
[ LC_CTYPE [=] lc_ctype ]
[ TABLESPACE [=] tablespace ]
[ CONNECTION LIMIT [=] connlimit ] ]
example
CREATE D... | true |
fc76ce799bf4d56d9619968d16e097d1b8e06c36 | SQL | patricknaka/Nova | /Views LN/VW_NFR_Rascunho_Det.sql | UTF-8 | 3,835 | 2.65625 | 3 | [] | no_license | -- #FAF.022 - 27-mai-2014, Fabio Ferreira, Correções e alteração da origem da informação para os dados da pré-nota
-- #FAF.237 - 22-jul-2014, Fabio Ferreira, Correções
--************************************************************************************************************************************************... | true |
43e06af2d615006dfb79da0b58e799b73104470b | SQL | humber42/tyke-backends | /schoolar-management-service/src/main/resources/db/migration/V8__modifying_theme_asignature_delete_in_cascade.sql | UTF-8 | 481 | 2.953125 | 3 | [] | no_license | ALTER TABLE public.asignatura_tema DROP CONSTRAINT asignatura_tema_id_asignatura_fkey;
ALTER TABLE public.asignatura_tema
ADD CONSTRAINT asignatura_tema_id_asignatura_fkey
FOREIGN KEY (id_asignatura) REFERENCES public.asignatura (id) ON DELETE CASCADE;
ALTER TABLE public.asignatura_tema DROP CONSTRAINT asignatura_tema_... | true |
e48052a092c0bbfb9d108ce3f91e1b4d811ffa1e | SQL | sqlparser/gsp_demo_java | /src/main/java/demos/dbConnect/src/main/resources/demos/sqlenv/netezza/schema.sql | UTF-8 | 591 | 3.6875 | 4 | [] | no_license | SELECT
'"' || clo.TABLE_CAT || '"' AS databaseName ,
'"' || clo.TABLE_SCHEM || '"' AS schemaName,
'"' || clo.TABLE_NAME || '"' AS tableName ,
CASE
WHEN t.TABLE_TYPE = 'SYSTEM VIEW' THEN 'true'
WHEN t.TABLE_TYPE = 'VIEW' THEN 'true'
ELSE 'false'
END AS isView,
'"' || clo.COLUMN_NAME || '"' AS columnName,
cl... | true |
83a6163d47c4f114254b0d9effc27e0b5b485893 | SQL | furkhat/micropayments | /data/schema.sql | UTF-8 | 1,172 | 3.359375 | 3 | [] | no_license | BEGIN TRANSACTION;
-- Etehereum address in hex
CREATE DOMAIN eth_addr AS char(40);
-- Accounts are ethereum accounts.
CREATE TABLE accounts(
id uuid PRIMARY KEY,
eth_addr eth_addr NOT NULL -- ethereum address
CONSTRAINT unique_eth_addr UNIQUE,
public_key text NOT NULL,
private_key text NOT NULL,... | true |
c838a0829a87d57c69520124c4be3358aebd79d4 | SQL | naufalnibros/admin-cms | /api/migrasi/core.sql | UTF-8 | 2,331 | 2.890625 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.5.4.1deb2ubuntu2
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: 26 Sep 2017 pada 15.30
-- Versi Server: 5.7.19-0ubuntu0.16.04.1
-- PHP Version: 7.0.22-0ubuntu0.16.04.1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARA... | true |
96348cacf7c4af3ece925e192b4f607cadfb321b | SQL | forchain/AUSPublication | /Code/SQL/MakeImportMatchByAuthor.sql | UTF-8 | 966 | 3.3125 | 3 | [] | no_license | SELECT CLng(s.ID) AS ScoreID
,CLng(s.PaperID) AS PaperID
,s.WoSID AS WosID
,s.FullName AS PaperFullName
,s.LastName AS PaperLastName
,s.FirstName AS PaperFirstName
,s.MiddleName AS PaperMiddleName
,s.FirstInitial AS PaperFirstInitia... | true |
2854133885362a43dcae3d6b62a07ba7ad7e04b1 | SQL | liujidon/A2ZDigital | /azdigital.sql | UTF-8 | 4,111 | 3.453125 | 3 | [] | no_license | CREATE DATABASE IF NOT EXISTS azdigital;
USE azdigital;
--
-- Table structure for table `clients`
--
CREATE TABLE IF NOT EXISTS `clients` (
`clientNumber` int(11) NOT NULL AUTO_INCREMENT,
`firstName` varchar(50) NOT NULL,
`lastName` varchar(50) NOT NULL,
`phone` varchar(50) NOT NULL,
`address` varchar(256... | true |
ea48f98081e3f4e8ec058038539636787cafc097 | SQL | davidhqaqp/cas_trabajo_final | /bd/calidad.sql | UTF-8 | 7,662 | 2.984375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.7.9
-- https://www.phpmyadmin.net/
--
-- Servidor: 127.0.0.1
-- Tiempo de generación: 16-12-2018 a las 01:45:33
-- Versión del servidor: 10.1.31-MariaDB
-- Versión de PHP: 5.6.34
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";... | true |
253b553fc949758ee7fd5bc01e1ca36b5560e053 | SQL | FeelUsM/form-SANC | /Convert.prc | UTF-8 | 3,360 | 3.15625 | 3 | [] | no_license | #procedure Convert(index)
*********************/
* This procedure converts variables to *
* the internal notation. *
* *
* index = 0 : convert ALL variables *
* index = 1 : convert ONLY masses *
* index = 2 : convert Energy and Beta *
* index = 3 : con... | true |
c2ab0a742efb15fdf3d91891a8c9539d52aaabd3 | SQL | alejandrocfc/Glucemia | /DataBase/ScriptSqlDatabase.sql | UTF-8 | 3,741 | 3.390625 | 3 | [] | no_license | -- MySQL Script generated by MySQL Workbench
-- 09/18/16 22:39:22
-- Model: New Model Version: 1.0
-- 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='TRADITION... | true |
13f4168916679d7e3fb61f737bd4eba5870e7bd7 | SQL | juanmarcoscabezas/holbertonschool-higher_level_programming | /0x0D-SQL_introduction/16-no_link.sql | UTF-8 | 158 | 2.734375 | 3 | [] | no_license | -- This script the number of records with the same score in the table second_table
SELECT score, name FROM second_table WHERE name != "" ORDER BY score DESC;
| true |
a1a1f915696c881af033d6be8a23bd7d1951219f | SQL | ronaldodupra/Dormfinder | /migrations/2020-10-26T1054 (address) (ALTER) - Add lat and long.sql | UTF-8 | 779 | 3.359375 | 3 | [] | no_license | CREATE TABLE IF NOT EXISTS `address` (
`Id` INT(11) NOT NULL AUTO_INCREMENT,
`Province` VARCHAR(50) NULL COLLATE 'utf8mb4_general_ci',
`City` VARCHAR(50) NULL COLLATE 'utf8mb4_general_ci',
`AddressLine1` VARCHAR(50) NULL COLLATE 'utf8mb4_general_ci',
`AddressLine2` VARCHAR(50) NULL COLLATE 'utf8mb4_general_ci',
`... | true |
f5cbd19baa14d3f715128a2260c7ef06de557e41 | SQL | eoaliev/console-scripts | /src/bitrix/mysql/change-stage-for-closed-tasks-by-user-id.sql | UTF-8 | 294 | 3.171875 | 3 | [] | no_license | UPDATE `b_tasks_task_stage` `ts`
INNER JOIN `b_tasks` `t` ON `t`.`ID`=`ts`.`TASK_ID`
INNER JOIN `b_tasks_stages` `s` ON `s`.`ID`=`ts`.`STAGE_ID`
SET `ts`.`STAGE_ID`=119
WHERE
`t`.`STATUS` IN (2, 4, 5) AND
`t`.`RESPONSIBLE_ID`=17 AND
`s`.`ENTITY_TYPE`='U' AND
`s`.`ENTITY_ID`=17
| true |
ea59b6bf2bbf47839217622a64bf1c2ad3b89546 | SQL | JC47/DDB | /Examen2/4_Capitulo19.sql | UTF-8 | 2,028 | 3.890625 | 4 | [] | no_license | CREATE OR REPLACE PROCEDURE PROCESO_1 IS
DIA CHAR(1);
USUARIO VARCHAR2(30);
AUX NUMBER;
AUX2 NUMBER;
BEGIN
SELECT SUBSTR(TO_CHAR(SYSDATE, 'DAY'), 0, 1) INTO DIA FROM DUAL;
IF DIA = 'S' THEN DBMS_OUTPUT.PUT_LINE ('FIN DE SEMANA');
ELSE
DBMS_OUTPUT.PUT_LINE ('NO ES FIN DE SEMANA');
END IF;
DBMS_OUTP... | true |
508fd600fc52fc6d7f36d80c70778a1146e69a9a | SQL | uttgeorge/hyperparameter-project | /SQL/Physical_database/QI JIN USECASE.sql | UTF-8 | 6,724 | 3.890625 | 4 | [
"MIT"
] | permissive | # case 1
# find the best model' name and aucuracy by their measurement: rmse,mse.
# return its model name and auc, and runtime respectively.
DROP VIEW best_model;
CREATE VIEW best_model AS
SELECT
models.model_category,
models.model_id,
models.rmse,
models.mse,
metadata.run... | true |
f669317528f98a805ef6f78b56c84c893924f911 | SQL | superhero2007/slim_cms | /slim_cms_frontend/system/sql/pre_pivot_table_query_2.sql | UTF-8 | 1,698 | 3.765625 | 4 | [] | no_license | SELECT
`client`.`company_name`,
`client_checklist`.`client_checklist_id`,
IF(`client_checklist`.`completed` IS NOT NULL, 'YES', 'NO') as `completed`,
`cc`.`firstname`,
`cc`.`lastname`,
`cc`.`email`,
`checklist`.`name`,
REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(`question`.`question`,'<p>',''),'</p>',''),'<... | true |
5b403adfb13434c6b56db7f9c1ee6b18ffdc58af | SQL | AndrewBrought/database-exercises | /index_lecture.sql | UTF-8 | 4,533 | 3.921875 | 4 | [] | no_license | # USE employees;
#
# DESCRIBE employees;
#
# DESCRIBE departments;
# SHOW CREATE TABLE departments;
# SHOW CREATE TABLE salaries;
# SHOW CREATE TABLE employees;
USE codeup_test_db;
DROP TABLE IF EXISTS pets;
CREATE TABLE pets
(
id INT UNSIGNED,
pet_name VARCHAR(30) NOT NULL,
owner_name VARCHAR(... | true |
55205c72d1ec74e92910ea017e0e020b98e6da83 | SQL | amsoell/rrrrradio | /database/structure.sql | UTF-8 | 1,796 | 3.15625 | 3 | [] | no_license | CREATE TABLE `api_usage` (
`id` int(11) NOT NULL auto_increment,
`api` varchar(20) default NULL,
`user` varchar(200) default NULL,
`executed` int(11) default NULL,
`params` varchar(200) default NULL,
`return` mediumtext,
PRIMARY KEY (`id`),
KEY `params` (`params`)
);
CREATE TABLE `mark` (
`userKey` ... | true |
7f1ff353bdd617f6086a08bc1a704a3d8e72cf67 | SQL | JasonLiu798/leetcode | /src/main/sql/DepartmentHighestSalary.sql | UTF-8 | 1,524 | 4.03125 | 4 | [] | no_license | --Department Highest Salary
--https://com.jason.leetcode.com/problems/department-highest-salary
-- ----------------------------
-- Table structure for Department
-- ----------------------------
DROP TABLE IF EXISTS `Department`;
CREATE TABLE `Department` (
`Id` int(11) DEFAULT NULL,
`Name` varchar(255) CO... | true |
25d9fce2b43976395b8acd90428b6a67c1e605bd | SQL | PNNL-Comp-Mass-Spec/DBSchema_PgSQL_DMS | /dms/t_filter_set_types.sql | UTF-8 | 1,082 | 3.28125 | 3 | [
"Apache-2.0"
] | permissive | --
-- Name: t_filter_set_types; Type: TABLE; Schema: public; Owner: d3l243
--
CREATE TABLE public.t_filter_set_types (
filter_type_id integer NOT NULL,
filter_type_name public.citext NOT NULL
);
ALTER TABLE public.t_filter_set_types OWNER TO d3l243;
--
-- Name: t_filter_set_types_filter_type_id... | true |
4f8cc5abb29d10f708c85a04961151611dd54c74 | SQL | clavesoon/express_wp_endpoint | /triggers_orders.sql | UTF-8 | 423 | 3.140625 | 3 | [] | no_license |
DELIMITER ;;
CREATE TRIGGER `orders_date` BEFORE INSERT ON `orders` FOR EACH ROW
BEGIN
IF (NEW.date is null) THEN
SET NEW.date = current_date;
END IF;
END;;
DELIMITER ;
DELIMITER ;;
CREATE TRIGGER `orders_time` BEFORE INSERT ON `orders` FOR EACH ROW
BEGIN
IF (NEW.time is null) THEN
SET NEW.time = current_time... | true |
271f4d70244663e356cd1fb9550cbf0ae931385f | SQL | jwrona/IIS | /databaze.sql | UTF-8 | 7,977 | 3.84375 | 4 | [] | no_license | -- ---------------------------------------------------------------------------
-- Vytvoreni databaze
-- ---------------------------------------------------------------------------
DROP DATABASE `xwrona00`;
CREATE DATABASE `xwrona00` DEFAULT CHARSET=utf8;
-- ------------------------------------------------------------... | true |
9f8b8e2fa9303ee785ffa19f48c612588017ff8d | SQL | vutuandat999/OTOP-Shop | /emhung.sql | UTF-8 | 4,491 | 2.953125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.6.6
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Generation Time: Jul 06, 2018 at 05:35 AM
-- Server version: 5.7.17-log
-- PHP Version: 5.6.30
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIEN... | true |
172dc5e1a56e90ab55d3e10d9901f8828946b9f2 | SQL | shukra024/shuk024.github.io | /crime.sql | UTF-8 | 4,283 | 2.78125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.9.0.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Sep 08, 2020 at 12:09 PM
-- Server version: 10.4.6-MariaDB
-- PHP Version: 7.3.9
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OL... | true |
e4fe2aa5189e3ac32c70911a2e7484e1db66b73f | SQL | VijayMVC/Synergy | /User/Debbie Ann Chavez/5% CLASS SIZE REQUEST.sql | UTF-8 | 5,120 | 3.828125 | 4 | [] | no_license |
SELECT * FROM
(
--STUDENTS IN HOMEROOM PERIOD 1 --DETAILS
SELECT
ENROLL.SCHOOL_CODE, SCHOOL_NAME, BS.LAST_NAME, BS.FIRST_NAME, BS.SIS_NUMBER, ENROLL.GRADE, BS.SPED_STATUS, BS.ELL_STATUS, BS.RESOLVED_RACE
,SCH.PERIOD_BEGIN, PERIOD_END, SCH.COURSE_ID, SCH.SECTION_ID, SCH.COURSE_TITLE
,PERS.LAST_NAME AS TEACHER_... | true |
d08646ec1778210d4b09895530fbc1cc772b0982 | SQL | Leviatt/Ciclo-2-Mision-TIC-2022 | /Reto4/consultas.sql | UTF-8 | 1,300 | 3.703125 | 4 | [] | no_license | SELECT "consulta 1";
SELECT titulo, descripcion, año FROM tutorias WHERE año=2022;
SELECT "consulta 2";
SELECT * FROM tutorias WHERE id_docente_encargado="joanp@gmail.com";
SELECT "consulta 3";
SELECT * FROM tutorias WHERE id_docente_encargado="pedrom@gmail.com" ORDER BY año DESC;
SELECT "consulta 4";
SELECT usuarios.n... | true |
2bcf964e972c68ba19230632d3319ba4b1be387c | SQL | HarshitaGulwani/library | /data.sql | UTF-8 | 2,948 | 3.265625 | 3 | [] | no_license | /*
SQLyog Community v12.4.3 (64 bit)
MySQL - 5.5.56 : Database - library
*********************************************************************
*/
/*!40101 SET NAMES utf8 */;
/*!40101 SET SQL_MODE=''*/;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN... | true |
832f67fbbb07bcb89df2a1719e1a563060b6d9dd | SQL | Aheal/ShoppingCar | /BD/Marina.sql | UTF-8 | 6,718 | 3.140625 | 3 | [] | no_license | -- MySQL dump 10.13 Distrib 5.7.12, for Win64 (x86_64)
--
-- Host: localhost Database: marina
-- ------------------------------------------------------
-- Server version 5.7.17-log
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
... | true |
c518885af37db9e4e9826d5f833bb4f117d7ab7a | SQL | zogzog/rework | /rework/schema.sql | UTF-8 | 2,185 | 3.65625 | 4 | [] | no_license | create schema if not exists "{ns}";
create table {ns}.monitor (
id serial primary key,
domain text not null,
options jsonb,
lastseen timestamptz default now()
);
create index ix_{ns}_monitor_domain on {ns}.monitor (domain);
create index ix_{ns}_monitor_lastseen on {ns}.monitor (lastseen);
create table {ns}.... | true |
43e33b34fd3495e26ca3c9b615782eeea3b7769c | SQL | CMS-RuDi/Forum | /installempty.sql | UTF-8 | 7,003 | 2.640625 | 3 | [] | no_license | INSERT INTO `#__translations_fields` (`target`, `fields`) VALUES
('forum_forums', '---\ntitle: str\ndescription: str\npagetitle: str\nmeta_keys: str\nmeta_desc: str\n'),
('forum_forum_cats', '---\ntitle: str\npagetitle: str\nmeta_keys: str\nmeta_desc: str\n');
INSERT INTO `#__actions` (`component`, `name`, `title`, `m... | true |
fb4312ce092d6e31f776dd9fcee6c9f30f49c68c | SQL | rikujyounoika/Wenku8ToEpub-Online | /room_init.sql | UTF-8 | 1,191 | 3.59375 | 4 | [
"MIT"
] | permissive | -- 消息
CREATE TABLE message (
-- 发送者,头像(展示变化用)
uid INT,
-- 消息id(排序用)
mid INT,
-- 重要:gid,表明所属以便SELECT
gid INT,
username VARCHAR(512),
head VARCHAR(128),
-- 类型:{'text', 'image', 'file'}
type VARCHAR(32),
-- 不一定是文本内容。如果是image或者file,将包含一个链接。
text VARCHAR(8192)
);
-- 本群基本信息
CR... | true |
00fcbda824a8a4b0113de6a42b6ef2728aff247d | SQL | lter/pasta2geonis | /pgsql/views.sql | UTF-8 | 5,888 | 4.125 | 4 | [] | no_license | --WORKFLOW_D
--package exists, we have not yet counted its spatial nodes
set search_path to workflow_d;
CREATE OR REPLACE VIEW workflow_d.vw_newpackage AS
SELECT packageid, scope, identifier, revision FROM package WHERE spatialcount = -1;
--
--package has spatial node(s), but hasn't been downloaded
CREATE OR REPLACE... | true |
37050b2e77c9dfef356288a9216ecda60dd59289 | SQL | gfis/joeis-lite | /internal/fischer/sql/pastri.sql | UTF-8 | 1,759 | 3.0625 | 3 | [
"Apache-2.0"
] | permissive | -- Patches for CC=pastri(co)
-- @(#) $Id$
-- 2021-10-01: Georg Fischer
--
-- Cf. prep_pascal.pl:
-- print join("\t", $aseqno, $callcode, 0, $lseqno, $rseqno, $pseqno, $skip_parm, $compute_parm) . "\n";
-- # pastrico uses: PARM1 PARM2 PARM3 PARM4 PARM5
-- # pastri ... | true |
2c8392bd324c4ebe3403baf4743ee434cea67a7a | SQL | llyude/pyla | /tradr.sql | UTF-8 | 20,362 | 3.015625 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | -- phpMyAdmin SQL Dump
-- version 4.2.10
-- http://www.phpmyadmin.net
--
-- Client : localhost:8889
-- Généré le : Mer 06 Janvier 2016 à 21:42
-- Version du serveur : 5.5.38
-- Version de PHP : 5.6.2
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
--
-- Base de données : `tradr`
--
-- --------... | true |
2ecd8164a73cdd91c63b7d26252128c54141fd39 | SQL | gclm/payment-code | /out/production/resources/db/schema.sql | UTF-8 | 441 | 2.609375 | 3 | [
"Apache-2.0"
] | permissive | /**
建表语句,创建数据表 pay_user
*/
DROP TABLE IF EXISTS pay_user;
CREATE TABLE pay_user(
id VARCHAR(50) PRIMARY KEY,
username VARCHAR(30),
password VARCHAR (25),
email VARCHAR(100),
nickname VARCHAR (50)
);
/**
建表语句
*/
DROP TABLE IF EXISTS pay_qr;
CREATE TABLE pay_qr(
id VARCHAR(50) PRIMARY KEY,
qr... | true |
2f001e92405772f58d7771a0b2c7fec8e3b4998b | SQL | chrisgraham/ocPortal | /uploads/website_specific/ocportal_erd__newsletter.sql | UTF-8 | 7,457 | 2.53125 | 3 | [] | no_license | CREATE TABLE ocp_newsletter
(
id integer auto_increment NULL,
email varchar(255) NOT NULL,
join_time integer unsigned NOT NULL,
code_confirm integer NOT NULL,
the_password varchar(33) NOT NULL,
pass_salt varchar(80) NOT NULL,
language varchar(80) NOT NULL,
n_forename varchar(255) NOT NULL,
... | true |
278c142ad97c249f77faff0b42b73ee3a3b69f2b | SQL | Ryunosuke-watanabe/ai_tech | /1922040_Lec3/aitech.sql | UTF-8 | 1,849 | 2.984375 | 3 | [] | no_license | CREATE TABLE location_sensitivity(
id SERIAL PRIMARY KEY,
loc TEXT,
lat DOUBLE PRECISION,
lng DOUBLE PRECISION,
balloon TEXT,
fun INTEGER,
history INTEGER,
view INTEGER,
nature INTEGER,
open_time INTEGER,
close_time INTEGER
);
INSERT INTO location_sensitivity(
... | true |
ebc9f8b47b083455c84b68253ad0588618462a87 | SQL | abatros/217-hmis-app | /private/sql/100-create-package-type-scooru.sql | UTF-8 | 1,041 | 2.859375 | 3 | [] | no_license | do $$
plv8.elog(NOTICE, 'Create scooru package-type');
const package_key = 'scooru';
const pretty_name = 'SCOORU';
const pretty_plural = 'SCOORU';
const package_uri = 'abatros.com';
const package_type = 'apm_application';
const initial_install_p = false;
const singleton_p = false;
const implement_subsite_p = false;
co... | true |
533367efc0472459e0dbb2549ffbf123ce065239 | SQL | frendynics/Code1 | /18-CLIENT-INDEX.sql | UTF-8 | 404,072 | 2.578125 | 3 | [] | no_license | SET DEFINE OFF;
CREATE INDEX CFD_IDX_1 ON WWDS.T_CONFIG_FIXED_DATA
(CONFIG_TYPE)
LOGGING
TABLESPACE SEA_TB_INDX_MISC
PCTFREE 10
INITRANS 2
MAXTRANS 255
STORAGE (
INITIAL 64K
NEXT 1M
MINEXTENTS 1
MAXEXTENTS 2147483645
... | true |
fa8879f3bca105e9e7ad17761be4483147d51016 | SQL | Teemo-Yordles/AWS-DevOps-Demo | /db/create_fms_entire_route.sql | UTF-8 | 773 | 3.328125 | 3 | [] | no_license | use `view`;
SET FOREIGN_KEY_CHECKS=0;
-- ---------------------------------------------------------------
-- Table structure for flight entire route table.
-- ---------------------------------------------------------------
DROP TABLE IF EXISTS `fms_entire_route`;
CREATE TABLE `fms_entire_route` (
`id` bigint(20) NO... | true |
8524981255547b52ed3471e76c21a3e970649e96 | SQL | Darshana-Suresh/Exam-Server | /exam.sql | UTF-8 | 5,032 | 3.578125 | 4 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.6.6deb5
-- https://www.phpmyadmin.net/
--
-- Host: localhost:3306
-- Generation Time: Jun 18, 2019 at 08:07 PM
-- Server version: 5.7.26-0ubuntu0.18.04.1
-- PHP Version: 7.1.17-0ubuntu0.17.10.1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHA... | true |
686414f3eda3552e86a7e34edd5d3c7ef280736e | SQL | telegrace/fennel-projects | /imageboard/sql/images.sql | UTF-8 | 2,850 | 3.28125 | 3 | [] | no_license | DROP TABLE IF EXISTS comments;
DROP TABLE IF EXISTS images CASCADE;
CREATE TABLE images(
id SERIAL PRIMARY KEY,
url VARCHAR NOT NULL,
username VARCHAR NOT NULL,
title VARCHAR NOT NULL,
description TEXT,
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);
INSERT INTO images (url, username, title,... | true |
aa012ad8a49ff37dc52768ff224819706ecb251a | SQL | korolov-vv/goit-java-dev-hw-modul-3 | /Home-work-3-2/5.sql | UTF-8 | 562 | 4.53125 | 5 | [] | no_license | SELECT p.project_id, coast, avg_salary
FROM projects p
JOIN
(
SELECT p.project_id, AVG(salary) AS avg_salary
FROM projects p
INNER JOIN developers_on_projects AS dp ON p.project_id = dp.project_id
INNER JOIN developers AS d ON d.developer_id = dp.developer_id
GROUP BY p.project_id
)as min_coast_table
on... | true |
4cc3e0a816f859a0f184fdffd697a800c2e1b929 | SQL | demiralie/huniTest | /target/classes/sql/ontime_count_group_year.sql | UTF-8 | 411 | 3.421875 | 3 | [] | no_license | drop table year_delay;
create table year_delay (
year int,
month int,
count float,
avg float,
min float,
max float,
stddev float
);
insert into year_delay
select year, month,
count(depdelay) as count,
avg(depdelay) as avg,
min(depdelay) as min,
max(depdelay) as max,
stddev(depdelay) as stddev
from ont... | true |
be1f7887eaafdbc25c189a40ea2c2ea564098a57 | SQL | sinjinir1999/Case_Study_SQL | /3.sql | UTF-8 | 173 | 3.59375 | 4 | [] | no_license | SELECT customer_id,
(SELECT MIN(order_date)
FROM
sales AS s2
WHERE s1.customer_id=s2.customer_id)
AS first_order_date
FROM sales AS s1
GROUP BY customer_id;
| true |
3f160237d5213c6907ccd2e80f778bc54ee5e297 | SQL | ChristopherBass/KInspector | /KInspector.Modules/Scripts/Setup/StagingServerSetupModule.sql | UTF-8 | 1,262 | 3.484375 | 3 | [
"MIT"
] | permissive | -- Staging servers modification
-------------------------------
-- Staging server is disabled by appending its URL with '.disabled'
-- so that it is possible to distinguish servers disabled by the customer and by audit.
-- The Enabled state of the server is not modified so the UI is still fully accessible.
-- Select S... | true |
9bc60589c0c5268e6171824fc4c3f92b607e0e39 | SQL | rattvol/ShortLink | /ShortLink_DataBaseDump291219.sql | UTF-8 | 5,131 | 3.328125 | 3 | [] | no_license | -- MySQL dump 10.13 Distrib 8.0.15, for Win64 (x86_64)
--
-- Host: localhost Database: shortlink
-- ------------------------------------------------------
-- Server version 8.0.15
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULT... | true |
ecb13384f641ef67f286e4f940f0ac9da255fe55 | SQL | Maryvone/Dahouet | /Dahouet.sql | UTF-8 | 19,721 | 4 | 4 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.6.6deb4
-- https://www.phpmyadmin.net/
--
-- Client : localhost:3306
-- Généré le : Ven 03 Novembre 2017 à 11:29
-- Version du serveur : 5.7.20-0ubuntu0.17.04.1
-- Version de PHP : 7.0.22-0ubuntu0.17.04.1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!401... | true |
f9239510db7c5ba974250d40dcf73838b913226a | SQL | faizanshabbir/cryptosee | /athena-sql/highest_volume_by_day.sql | UTF-8 | 172 | 3 | 3 | [] | no_license | SELECT name,
DATE(last_updated) as "price_date",
AVG("24h_volume_usd") as "volume_usd"
FROM cryptoprices
GROUP BY name, DATE(last_updated)
ORDER BY volume_usd desc; | true |
5d49ff724910b47d393309a072fc9396cd30b800 | SQL | zrbrown/mindy | /src/main/resources/sql/001_add_author_to_posts.sql | UTF-8 | 498 | 3.8125 | 4 | [
"MIT"
] | permissive | SET SEARCH_PATH TO application;
CREATE TABLE IF NOT EXISTS author_details
(
author TEXT PRIMARY KEY,
display_name TEXT
);
ALTER TABLE application.posts
ADD COLUMN author TEXT,
ADD FOREIGN KEY (author) REFERENCES author_details (author);
INSERT INTO application.author_details(author, display_nam... | true |
95b0566c64c9c88695d545dc9bbfa2dd34f7a667 | SQL | 10milin/JTalk | /JTalk/study.sql | UTF-8 | 528 | 2.953125 | 3 | [] | no_license | drop table study;
create table study(
num int not null auto_increment primary key,
title varchar(300) not null,
content varchar(4000) not null,
writerId varchar(50) not null,
writerName varchar(50) not null,
fileName varchar(100),
originFileName varchar(100),
writeDate Timestamp default current_times... | true |
ccbfc51b911eea4284392fddd5db9f34a7d66f1f | SQL | vibhorkum/pg_background | /sql/pg_background.sql | UTF-8 | 181 | 2.515625 | 3 | [] | no_license | CREATE EXTENSION pg_background;
CREATE TABLE t(id integer);
SELECT * FROM pg_background_result(pg_background_launch('INSERT INTO t SELECT 1')) AS (result TEXT);
SELECT * FROM t;
| true |
5d01893176e11b1c0eca99c03bdbc29b3405b046 | SQL | facundoi22/PF_Project | /Viejo/database/Scripts_Creacion_v1.sql | UTF-8 | 41,267 | 3.6875 | 4 | [] | no_license | DROP DATABASE IF EXISTS PROXIMAFECHA;
CREATE DATABASE PROXIMAFECHA;
USE PROXIMAFECHA;
-- -----------------------------------------------------
-- Table DEPORTES
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS DEPORTES (
DEPORTE_ID INT NOT NULL AUTO_INCREMENT,
DESCRIPCION VARCHA... | true |
b3d47762e2d2eed6a4806d3d757e1595bef73ec0 | SQL | BulkSecurityGeneratorProject/GieldaKryptowalut | /src/main/resources/config/liquibase/changelog/20181126210300_fix_bugs_inDB.sql | UTF-8 | 382 | 3.015625 | 3 | [] | no_license | ALTER TABLE jhi_user DROP CONSTRAINT jhi_user_dane_korespondencyjne;
ALTER TABLE jhi_user
drop COLUMN dane_korespondencyjne_id;
ALTER TABLE dane_korespondencyjne add COLUMN
jhi_user_id int;
ALTER TABLE dane_korespondencyjne ADD CONSTRAINT dane_korespondencyjne_jhi_user
FOREIGN KEY (jhi_user_id)
REFERENC... | true |
13d2f538f79c0d92ff0453c4c5528a1c569ac265 | SQL | GjergjiSh/EasyExam | /resources/testData.sql | ISO-8859-1 | 3,347 | 2.65625 | 3 | [
"MIT"
] | permissive | Insert Into Pruefer(PersNr, Nachname, Vorname) Values (123456,'Speiser','Sebastian');
Insert Into Pruefer(PersNr, Nachname, Vorname) Values (123455,'Hss','Oliver');
Insert Into Pruefer(PersNr, Nachname, Vorname) Values (123457,'Kramer','Ralf');
Insert Into Pruefer(PersNr, Nachname, Vorname) Values (123454,'Lueckemeyer'... | true |
ec6fb5e1b44f4118946c724d9dce375c163b13d0 | SQL | junio-moreira-rocha/SQL-Server | /restricao-null.sql | ISO-8859-1 | 734 | 3.1875 | 3 | [] | no_license | -- RESTRIO NULL:
-- A restrio NOT NULL possui uma inversa: a restrio NULL. Isso no significa que a coluna deva ser nula, o que, certamente no teria utilidade. Ao invs disso simplesmente definido o comportamento padro dizendo que a coluna pode ser nula. A restrio NULL no definida no padro SQL e no deve ser utilizada e... | true |
0051132a38ae72273cdc8a28bcd20f8af1be69f5 | SQL | antiabcdefg/seckill | /seckill.sql | UTF-8 | 8,700 | 3.4375 | 3 | [] | no_license | -- MySQL dump 10.13 Distrib 5.7.33, for Win64 (x86_64)
--
-- Host: localhost Database: seckill
-- ------------------------------------------------------
-- Server version 5.7.33
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!... | true |
6ee7a07430c9438fbc24d16ecfdfe6772f4c46c6 | SQL | santiago-m/TF_Intro_Trans_QVT_2da_Parte | /Transformacion_TF/sql_output/rent_a_car.sql | UTF-8 | 2,076 | 3.375 | 3 | [] | no_license | CREATE DATABASE /*!32312 IF NOT EXISTS*/ rent_a_car;
USE rent_a_car;
set foreign_key_checks=0;
DROP TABLE IF EXISTS `Price_Scale`;
CREATE TABLE `Price_Scale` (
`value` varchar(25),
`code` int(25),
PRIMARY KEY (`code`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
DROP TABLE IF EXISTS `Rent`;
CREATE TABLE `Rent` (
`rent_c... | true |
83a96e7f4a85db15349d72fc53d372b877b76fa2 | SQL | ZVlad1980/excel_api | /test/dv_sr_lspv_det_t/show_dv_sr_lspv_det_t.sql | UTF-8 | 476 | 3.28125 | 3 | [] | no_license | /*
select *
from ERR$_DV_SR_LSPV_DET_T
*/
select d.*
from (select d.*,
count(1)over(partition by d.fk_dv_sr_lspv) cnt,
rowid
from dv_sr_lspv_det_v d -- where d.addition_id is null
) d
where d.cnt > 1
/
select *
from dv_sr_lspv_det_v dt
where dt.year_op = 20... | true |
74071588993a9a6b174704493afef3aff6ed417a | SQL | mbougie/gibbs | /projects/synthesis/intensification/archive/intensification_w_napplication/synthesis_intensification.rfs_intensification_results_counties.sql | UTF-8 | 10,883 | 3.109375 | 3 | [] | no_license | create table synthesis_intensification.rfs_intensification_results_counties as
SELECT
count(a.objectid) as objectid_count,
a.atlas_stco,
--------------------------------------------------------------------------------------
----------- areas ------------------------------------------------------------------
-----... | true |
3cfbcdcb8916c6d80a0688722de966363829166c | SQL | nss-cohort-36/chinook-JohnALong | /sales_agent_customer_count.sql | UTF-8 | 228 | 3.65625 | 4 | [] | no_license | -- Provide a query that shows the count of customers assigned to each sales agent.
SELECT
e.FirstName,
e.LastName,
COUNT(c.CustomerId)
FROM Employee e
JOIN Customer c
ON e.EmployeeId = c.SupportRepId
GROUP BY e.EmployeeId; | true |
40c3daa390494c55d35ae75d5924754040e31348 | SQL | lavila2010/Ironhack-Labs | /module-1/Advanced-mySQL/Advance_mysql_lab.sql | UTF-8 | 964 | 4.28125 | 4 | [] | no_license | use lab_mysql;
CREATE TEMPORARY TABLE summary
select sub1.title_id,sub1.price,sub1.advance,sub1.royalty,sub1.ytd_sales,sub1.title, authors.au_id,sub1.royaltyper
from(
select titles.title_id,price,advance,royalty,ytd_sales,title, au_id,royaltyper
from publications.titles
inner join publications.titleauthor
on publicati... | true |
6ea7a3f3104218d5eeeefee45a455384e4917b78 | SQL | TruptiSamant/SQL1 | /Homework.sql | UTF-8 | 7,717 | 4.5625 | 5 | [] | no_license | USE sakila;
## 1a. Display the first and last names of all actors from the table actor
SELECT first_name, last_name
FROM ACTOR;
## 1b. Display the first and last name of each actor in a single column in upper case letters. Name the column Actor Name.
SELECT upper(CONCAT(first_name, ',', last_name)) as Actor_nam... | true |
1c6d60db311f382713d470c67b19827521b76326 | SQL | KTwilight/SMIS | /SMIS/smis.sql | UTF-8 | 1,442 | 2.984375 | 3 | [] | no_license | # Host: localhost (Version: 5.5.25a)
# Date: 2021-01-10 13:34:26
# Generator: MySQL-Front 5.3 (Build 4.13)
/*!40101 SET NAMES utf8 */;
#
# Source for table "student"
#
DROP TABLE IF EXISTS `student`;
CREATE TABLE `student` (
`stuid` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(255) DEFAULT NULL,
`sex` ti... | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.