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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
dd0c69c07b1f365648daaff6c55ce029bb1cec71 | SQL | datapolitan/cartodb20 | /lib/sql/test/CDB_QueryTablesTest.sql | UTF-8 | 818 | 2.828125 | 3 | [
"BSD-2-Clause"
] | permissive |
WITH inp AS ( select 'SELECT * FROM geometry_columns'::text as q )
SELECT q, CDB_QueryTables(q) from inp;
WITH inp AS ( select 'SELECT a.attname FROM pg_class c JOIN pg_attribute a on (a.attrelid = c.oid)'::text as q )
SELECT q, CDB_QueryTables(q) from inp;
WITH inp AS ( select $quote$CREATE table "my'tab;le" as s... | true |
5841212ed364da0e19bf34153e5b5fe31e201782 | SQL | olanaso/MobilityDB | /test/queries/22_temporal_tbl.test.sql | UTF-8 | 24,154 | 2.9375 | 3 | [
"PostgreSQL"
] | permissive | --------------------------------------------------------------------------------
-- Send/receive functions
-------------------------------------------------------------------------------
COPY tbl_tbool TO '/tmp/tbl_tbool' (FORMAT BINARY);
COPY tbl_tint TO '/tmp/tbl_tint' (FORMAT BINARY);
COPY tbl_tfloat TO '/tmp/tbl_... | true |
6a9d0d8fdb1644174d667281f3c6150c34ee20da | SQL | iin1996/siompu_website | /siompu_website_db (1).sql | UTF-8 | 12,155 | 3 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.6.5.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Jul 08, 2018 at 10:13 AM
-- Server version: 10.1.21-MariaDB
-- PHP Version: 7.1.1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET... | true |
b22e85a611103fb8e30f9e5b86b3aa0947456339 | SQL | altamira/visualstudio | /Sistema de Informação Altamira/EGISSQL.Database/dbo/Views/vw_nfe_servico_nota_fiscal.sql | UTF-8 | 1,950 | 3.0625 | 3 | [] | no_license |
CREATE VIEW vw_nfe_servico_nota_fiscal
------------------------------------------------------------------------------------
--sp_helptext vw_nfe_servico_nota_fiscal
------------------------------------------------------------------------------------
--GBS - Global Business Solution ... | true |
6d5243fe487b807d09509dcaf40a374910348202 | SQL | zhaoy1992/xtbg-whtjy-new | /mobile_sql/产品/通讯录/通讯录.sql | GB18030 | 2,742 | 3.59375 | 4 | [] | no_license |
-- Create table
create table M_BB_ADBOOK
(
ID VARCHAR2(50),
TYPE VARCHAR2(50),
OPERATION VARCHAR2(50),
VERSION VARCHAR2(50)
);
-- Add comments to the columns
comment on column M_BB_ADBOOK.ID
is 'ûid/id';
comment on column M_BB_ADBOOK.TYPE
is 'û O:U:û';
comment on column M_BB... | true |
9db00dcf014233e07922802d3f8a2d1859d87462 | SQL | Dalgim/SQLDB | /count.sql | UTF-8 | 1,093 | 4.21875 | 4 | [] | no_license | /*
uso de count en sql
count nos ayuda a contar los registros existentes en una determinada
tabla
*/
select
-- asi manda el conteo de todos los registros (incluidos duplicados)
count(customer_id),
-- podemos contar los registros que no sean con el mismo id
count(distinct customer_id) as Unicos
from payment;... | true |
a095a4cdeb477c698a40bc426eb50129dd168d64 | SQL | angel-utn/laboratorio3-20202c | /Clase 12/ejemplo.sql | UTF-8 | 711 | 3.9375 | 4 | [] | no_license | -- Creación de la Vista
Create view VW_ReporteInscripciones as
Select dat.ID, dat.Apellidos + ', ' + dat.Nombres as Usuario, c.Nombre, i.Costo,
isnull(sum(p.importe), 0) as Total
From Datos_Personales as dat
Inner Join Inscripciones as i on dat.id = i.IDUsuario
inner join Cursos as c on c.id = i.IDCurso
left join Pagos... | true |
6c585ff27b4383f5353699e901420df8ff0e49bc | SQL | alexanderlakhneko/Big-Digitals | /users.sql | UTF-8 | 1,646 | 2.921875 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.6.5.2
-- https://www.phpmyadmin.net/
--
-- Хост: 127.0.0.1
-- Время создания: Май 17 2017 г., 18:00
-- Версия сервера: 10.1.21-MariaDB
-- Версия PHP: 7.1.1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIE... | true |
7001debf12d0f0bdd564f3eec17b019fcb15a7e8 | SQL | Shubhradeep007/Hotel-management-System | /hms (1).sql | UTF-8 | 9,623 | 2.953125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 5.1.0
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Jun 13, 2021 at 10:24 PM
-- Server version: 10.4.18-MariaDB
-- PHP Version: 8.0.5
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIEN... | true |
3ac3465191683f2ce8d598040aeaa7bd6ea190bf | SQL | ToborTheGreat/Repository01 | /xops.agg_assembly.sql | UTF-8 | 1,029 | 2.71875 | 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 = xops, pg_catalog;
ALTER TABLE ONLY xops.agg_assembly DROP CONSTRAI... | true |
0f1412d85c0483c3bd2f707005adf920e97691e4 | SQL | s-rifat/Kinship-Domain-Using-Distributed-Database-System | /10 Trigger.sql | UTF-8 | 410 | 2.5625 | 3 | [] | no_license | SET SERVEROUTPUT ON;
CREATE OR REPLACE TRIGGER trig
AFTER INSERT
ON Parent1
DECLARE
BEGIN
DBMS_OUTPUT.PUT_LINE('Value inserted on Parent1');
END;
/
CREATE OR REPLACE TRIGGER trig2
AFTER INSERT
ON Male1
DECLARE
BEGIN
DBMS_OUTPUT.PUT_LINE('Value inserted on Male1');
END;
/
CREATE OR REPLACE TRIGGER trig3
AFTER I... | true |
e2a2d6c8008d64e81de7c4e6fbe7ab69d3f8c88b | SQL | Invenietis/CK-DB | /CK.DB.Auth.AuthScope/Res/Model.CK.AuthScopeTable.Install.1.0.1.sql | UTF-8 | 751 | 3.46875 | 3 | [] | no_license | --[beginscript]
--
-- Holds the scopes: these are non null nvarchar(255) without space in them.
-- Collation is strict (EMAIL is not the same scope as email) to honor any potential case
-- sensitivity of authentication provider (the RFC 6749 states that scopes are case sensitive).
-- Note that ScopeId = 0 does not exi... | true |
c631f221ace21d4cf2e7f6abecd4b25310f4191d | SQL | JuanFrAguirre/Queries_db_libreria | /tp_mock_mecanicos_veterinaria.sql | WINDOWS-1252 | 13,668 | 4.09375 | 4 | [] | no_license | -------------------------------------------------------------
-----------------PARCIALES PRACTICA
-------------------------------------------------------------
-----------------------------------
--Mecanicos / Mantenimientos
--1.1. Se quiere saber dentro del ao en curso, cunto fue el total pagado en concepto d... | true |
f35670f4d3eba38678a27038af9366184aaf2005 | SQL | gseals/Chinook | /25. top_5_tracks.sql | UTF-8 | 219 | 3.640625 | 4 | [] | no_license | -- Provide a query that shows the top 5 most purchased songs.
SELECT TOP 5 t.TrackId, SUM(quantity) AS numberofpurchases
FROM Track t
JOIN InvoiceLine il
ON t.TrackId = il.TrackId
GROUP BY t.TrackId
ORDER BY 2 DESC
| true |
45c85d524df66fa8a881082a290f5c5b0cbf6117 | SQL | akashkarthick17/mini-shopping-cart | /product-service/src/sql/get-products-by-category.sql | UTF-8 | 549 | 3.890625 | 4 | [] | no_license | SELECT
p.id,
p.name as name,
price,
description,
features,
discount_percentage as discountPercentage,
image_url as imageUrl,
brand_name as brand,
sc.name as subCategory,
c.name as category,
ps.warehouse_id as warehouseId,
ps.stock_count as stockCount,
p.created_at as createdAt
FROM
product p... | true |
2a8ca1095dae067e29923169b764c6b064bbecae | SQL | Mag8sara/DFND-SQLCodes | /Code1.sql | UTF-8 | 150 | 3.359375 | 3 | [] | no_license | select AVG(Product.UnitPrice) As 'AVG'
From Product
Join Supplier
on Supplier.Id = Product.SupplierId
where Supplier.CompanyName = "Tokyo Traders" | true |
85a885d91ad889a39e7b4f60748ad237d456ae34 | SQL | MobiDevOS/TestMyBaties | /src/main/java/sqlbat.sql | UTF-8 | 1,559 | 3.6875 | 4 | [] | no_license |
create database mybatis;
use mybatis;
#基础测试
CREATE TABLE users(id INT PRIMARY KEY AUTO_INCREMENT, NAME VARCHAR(20), age INT);
INSERT INTO users(NAME, age) VALUES('Tom', 12);
INSERT INTO users(NAME, age) VALUES('Jack', 11);
#测试表明和类字段名称不统一
CREATE TABLE orders(
order_id INT PRIMARY KEY AUTO_INCREMENT,
order_no... | true |
a4437a6608ce3c8ef54522e157995f09d3aedee9 | SQL | ysugiyama12/Docker-webapp | /postgres/init/2_create_table.sql | UTF-8 | 215 | 2.609375 | 3 | [] | no_license | CREATE TABLE my_user (
id bigserial primary key,
name varchar(255) NOT NULL,
email varchar(255),
created_at timestamp default current_timestamp,
updated_at timestamp default current_timestamp
);
| true |
25d747d9eb41f1f347db66c28dd00850ff393f08 | SQL | blackdeman/salary-system | /setup/db/03-salary-system-fillDB.sql | UTF-8 | 1,363 | 3.109375 | 3 | [] | no_license | use salary_system;
INSERT INTO `department_tbl`(`department_id`,`name`) VALUES
(2001,'personnel department'),
(2002,'sales department');
INSERT INTO `role_tbl`(`role_id`,`name`) VALUES
(1001,'admin'),
(1002,'accountant');
INSERT INTO `user_tbl`(`username`,`password`,`role_id`) VALUES
('admin','admin',1... | true |
d1a1d122e9631b1738e0b5a19ecd317a08a5e7b1 | SQL | Hjw52/yooki | /ykdb.sql | UTF-8 | 13,422 | 3.390625 | 3 | [] | no_license | /*
Navicat Premium Data Transfer
Source Server : cc
Source Server Type : MySQL
Source Server Version : 50562
Source Host : localhost:3306
Source Schema : ykdb
Target Server Type : MySQL
Target Server Version : 50562
File Encoding : 65001
Date: 10/09/2019 15:04:58
*/
... | true |
9c318c619c65c0ac7efb9bfacd81bc956596d4fc | SQL | zarrinan/Emotions-Detector | /db/seeds/emotions.sql | UTF-8 | 505 | 2.65625 | 3 | [] | no_license | \c emotions_db_dev
INSERT INTO users (user_name) VALUES
('Mischelle'),
('Andy'),
('Devin'),
('Aileen'),
('Chris'),
('Sarah'),
('Jason');
INSERT INTO emotions (happiness, sadness, anger, fear, comments, user_name_id) VALUES
(
5,
4,
9,
2,
'I feel okay today',
2
),
(
9,
0,
0,
2,
'I feel happy tod... | true |
6550de496e7a7439d14e4c329ddf433893fc533f | SQL | chasefarmer2808/RumbaughArt | /db/init/init_test_db.sql | UTF-8 | 977 | 3.453125 | 3 | [] | no_license | CREATE USER IF NOT EXISTS 'test_user'@'%' IDENTIFIED BY 'password';
CREATE DATABASE IF NOT EXISTS test_db;
USE test_db;
DROP TABLE IF EXISTS lychee_photos;
DROP TABLE IF EXISTS lychee_albums;
CREATE TABLE lychee_photos
(
id INTEGER AUTO_INCREMENT,
title TEXT,
album INTEGER,
url TEXT,
thumbUrl TEX... | true |
fb58365158461de6f098baafd4c77e684d5e539e | SQL | wangsungtaek/Do-it-oracle | /database/ch15.sql | UTF-8 | 2,706 | 4.21875 | 4 | [] | no_license |
/*
# 15-1 사용자 관리
데이터베이스 스키마란?
데이터베이스에서 데이터 간 관계, 데이터 구조, 제약 조건 등 데이터를 저장 및 관리하기 위해
정의한 데이터베이스의 구조의 범위를 스키마(schema)를 통해 그룹 단위로 분류합니다.
*/
/*
# 15-2 권한 관리
시스템 권한이란?
오라클 데이터베이스의 시스템 권한(system privilege)은 사용자 생성과 정보 수정 및 삭제,
데이터베이스 접근, 오라클 데이터베이스의 여러 자원과 객체 생성 및 관리 등의 권한을 포함합니다.
*/
-- SYSTEM 계정으로 접속하여 사용자(ORCLSTUDY) ... | true |
12a79e9b5ed9791b84cc9e10ef306c6355026e81 | SQL | alzbeta-voldanova/engeto_datova_akademie | /engeto_sql/postup/SQL_v2.sql | UTF-8 | 2,319 | 4.125 | 4 | [] | no_license | # casove promenne
SELECT
cbd.`date`,
CASE
WHEN WEEKDAY(`date`) IN (0, 1, 2, 3, 4) THEN 1
WHEN WEEKDAY(`date`) IN (5, 6) THEN 0
ELSE 'ERROR'
END AS 'workday/weekday',
CASE
WHEN MONTH(`date`) IN (3, 4, 5) THEN 0
WHEN MONTH(`date`) IN (6, 7, 8) THEN 1
WHEN MONTH(`date`) IN (9, 10, 11) THEN 2... | true |
33eb7fcf9778f84ddb31901e8f343d95be37cbff | SQL | Vol97/EJournal | /EJournalDB/dbo/Stored Procedures/Students/UpdateStudent.sql | UTF-8 | 484 | 2.53125 | 3 | [] | no_license | CREATE PROCEDURE [EJournal].[UpdateStudent] @Id INT
,@Name NVARCHAR(100)
,@Surname NVARCHAR(100)
,@Email NVARCHAR(100)
,@Phone NVARCHAR(16)
,@Git NVARCHAR(100) = NULL
,@City NVARCHAR(100) NULL
,@TeacherAssessment int
,@AgreementNumber NVARCHAR(50)
AS
UPDATE [EJournal].[Students]
SET Name = @Name
,Surname = @S... | true |
3bfc265e511cd37b37fba551cff47cbd41905091 | SQL | Hiroaki-Inomata/ORCA-5-1 | /jma-receipt.r_5_1_branch/sql/2.8/orcadbup_tensu_2.8.0-2.sql | EUC-JP | 14,745 | 2.578125 | 3 | [] | no_license | -- --
-- ޥ ơ֥ѹ --
-- --
-- ܤɲ --
-- ɥʡʬʬ DONORKBN --
-- --
-- Create Date : 2006/03/15 --
-- --
-- TBL_TENSUWK --
CREATE T... | true |
d5f211b4fb4fb62184f95c90c40b274e5054370b | SQL | fxavier/vectorlinksys-api | /src/main/resources/db/migration/V03__create_table_district_opsite_locality_village.sql | UTF-8 | 1,301 | 3.578125 | 4 | [] | no_license | CREATE TABLE province(
id BIGSERIAL,
name VARCHAR(100) NOT NULL,
country_id INTEGER,
active BOOLEAN NOT NULL DEFAULT 'true',
PRIMARY KEY(id),
CONSTRAINT fk_province_country
FOREIGN KEY(country_id) REFERENCES country(country_id)
);
CREATE TABLE district(
id BIGSERIAL NOT NULL,
name VARCHAR(100) NOT NULL,
province... | true |
0f244c9c23ef5fe7dff1a3170e0e5b67a2536012 | SQL | fredyw/leetcode | /src/main/sql/Problem577.sql | UTF-8 | 179 | 3.4375 | 3 | [
"MIT"
] | permissive | -- https://leetcode.com/problems/employee-bonus/description/
select e.name, b.bonus
from Employee e left join Bonus b on e.empid = b.empid
where b.bonus is null or b.bonus < 1000; | true |
37cb03abf55cc43ffcd1e1def5fde576f7ca6a18 | SQL | rasal2609/docker-examples | /doag_2019/utilities/Skripte_190307/Skripte_VM/Performance/query_dml_usage.sql | UTF-8 | 1,305 | 3.125 | 3 | [] | no_license | /********************************************************************
** File: query_dml_usage.sql
** Name: MySQL Administration Workshop (DB-MY-01) / ORDIX AG
** Desc: performance about the dml / query ratio
** Auth: Matthias Jung
** Date: 07/2012
/*************************************************************... | true |
020ca1c5bac5314a542c00d8652c9a2d1ea475a2 | SQL | hieunhan1/all-website4 | /chat/merchant-php-1.0.4/DATABASE_MYSQL40.sql | UTF-8 | 2,884 | 3.265625 | 3 | [
"BSD-3-Clause"
] | permissive | -- MySQL dump 10.9
--
-- Host: localhost Database: merchant
-- ------------------------------------------------------
-- Server version 4.1.16-log
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECT... | true |
161973fc6d6a2e2e04904c013103cdc7bf06dbd3 | SQL | altus-ace/ACDW_CLMS_SHCN_MSSP | /ACDW_CLMS_SHCN_MSSP/adw/Functions/2020_tvf_Get_KPISumByNPIChapter.sql | UTF-8 | 7,011 | 3.078125 | 3 | [] | no_license |
CREATE FUNCTION [adw].[2020_tvf_Get_KPISumByNPIChapter]
(
@EffectiveAsOfDate DATE,
@KPIEffYear INT,
@KPIEffMth INT
)
RETURNS TABLE
AS RETURN
(
SELECT DISTINCT mm.EffectiveAsOfDate, mm.KPIEffYear, mm.KPIEffMth, mm.AttribNPI, mm.AttribNPIName
,mm.AttribTIN, mm.AttribTINName
,pcp.PCP_POD as Chapter
,mm... | true |
c52841bcd0fe9019047fb6794da66f4207d3ea74 | SQL | FranAdrianArroyo/testline | /project.sql | UTF-8 | 11,835 | 3.1875 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.8.5
-- https://www.phpmyadmin.net/
--
-- Servidor: 127.0.0.1:3306
-- Tiempo de generación: 22-03-2021 a las 18:49:43
-- Versión del servidor: 5.7.26
-- Versión de PHP: 7.3.5
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*... | true |
1590a795c0ee08e3ab03d438025aac20f10777fd | SQL | FranciscoSepul/BDFerme | /Procedimientos Almacenados/Procedimientos Ventas/Listar Venta por Run.sql | UTF-8 | 593 | 3.375 | 3 | [] | no_license | ---------LISTAR VENTA POR RUN---------
create or replace PROCEDURE LISTARVENTARUN(C_MEMORIA OUT SYS_REFCURSOR, P_RUN IN NUMBER)
AS
BEGIN
OPEN C_MEMORIA FOR SELECT VEN.ID, CLI.RUNCLIENTE, CLI.NOMBRE || ' ' || CLI.APELLIDO AS NOMBRE, DET.FECHACOMPRA, DET.TOTAL FROM VENTAS VEN
INNER JOIN CLI... | true |
4aa472ca3c2d8fee878e711970e99135d6fd70b8 | SQL | benleibert/channel-software | /ChannelPackage/BaseSQL/channel_db.sql | UTF-8 | 88,419 | 3.5625 | 4 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 3.5.1
-- http://www.phpmyadmin.net
--
-- Client: localhost
-- Généré le: Jeu 16 Juillet 2015 à 08:26
-- Version du serveur: 5.5.24-log
-- Version de PHP: 5.3.13
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLI... | true |
baac1f04f9b56d108ee1f2c27726611fd0e9f334 | SQL | DK00451671/RoutePromoData | /NEw project2- Rico/Updated docs/database_0.sql | UTF-8 | 23,036 | 3.109375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 3.5.8
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Jan 13, 2014 at 03:53 PM
-- Server version: 5.5.32-31.0-log
-- PHP Version: 5.3.17
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIE... | true |
3274779fc39fa836c5bf763fa566ac11c8f9c9af | SQL | DimitarSamarov07/SoftUni-Software-Engineering | /C# DB/Databases Basics - MS SQL Server/Database Programmability and Transactions - Exercises/14CreateTableLogs.sql | UTF-8 | 446 | 3.8125 | 4 | [] | no_license | CREATE TABLE Logs
(
LogId INT PRIMARY KEY IDENTITY,
AccountId INT NOT NULL FOREIGN KEY REFERENCES Accounts (Id),
OldSum MONEY NOT NULL,
NewSum MONEY NOT NULL
)
CREATE TRIGGER tr_sumUpdate
ON Accounts
FOR UPDATE
AS
BEGIN
INSERT INTO Logs(AccountId, OldSum, NewSum)
SELECT D... | true |
e419646845db753646be1f1731c1a4858a12956f | SQL | vlexster/e-shop | /SQL_DB_Model.sql | UTF-8 | 3,286 | 3.078125 | 3 | [] | no_license | -- MySQL dump 10.13 Distrib 5.6.23, for Win64 (x86_64)
--
-- Host: 127.0.0.1 Database: eshop2
-- ------------------------------------------------------
-- Server version 5.6.21
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!4... | true |
a15ae32af75d513a6c3ce8a39dfe26a2596a5277 | SQL | davidgreenspan15/sql-library-lab-nyc-web-051319 | /lib/insert.sql | UTF-8 | 1,309 | 2.921875 | 3 | [
"LicenseRef-scancode-unknown-license-reference",
"LicenseRef-scancode-public-domain"
] | permissive | INSERT INTO series (id, title, author_id, subgenre_id) VALUES (1, "Harry Potter", 1, 1), (2, "GOT", 2, 2);
INSERT INTO subgenres (id, name) VALUES (1, "majic"), (2, "fantasy");
INSERT INTO authors (id, name) VALUES (1, "JK Rowling"), (2, "another person");
INSERT INTO books (id, title, year, series_id) VALUES (1, "S... | true |
79e77c7eaf3dd42a50bfc40966e378e593437ad3 | SQL | murodin/rest-api-encrypt-decrypt | /src/main/resources/createdb.sql | UTF-8 | 425 | 2.578125 | 3 | [] | no_license | CREATE DATABASE DB_CRYPT;
DROP TABLE IF EXISTS DB_CRYPT.ENCRYPT;
CREATE TABLE IF NOT EXISTS DB_CRYPT.encrypt
(
ID DECIMAL(38) NOT NULL,
FIO VARCHAR(255) NOT NULL,
PRIMARY KEY (ID)
);
INSERT INTO DB_CRYPT.encrypt (ID, FIO)
VALUES (0, 'Tds Testovy');
INSERT INTO DB_CRYPT.encrypt (ID, FIO)
VALUES (1, 'Tes... | true |
3fbd0ad925353a5fa0a4de94cdd2f03f4307e2bb | SQL | Tracy02022/Personal-Blogs | /insert_socialnetwork.sql | UTF-8 | 11,078 | 2.625 | 3 | [] | no_license | insert into USER_PROFILE values
(0,0,'Tian','01-JAN-1988', 'male', 'Football',1,0);
insert into USER_PROFILE values
(1,1,'Jbj','26-DEC-1950', 'male', 'Basketball',0,1);
insert into USER_PROFILE values
(2,2,'Wang','31-MAR-1989', 'male', 'DOTA',0,2);
insert into USER_PROFILE values
(3,3,'Xin','10-OCT-1991', 'female',... | true |
3a6b465fa1fddeacbd90733f6ae6505d1f7c6159 | SQL | maximlamanovskiy/OmSU-WEB | /src/main/resources/db/migration/V1_2__addMessageTable.sql | UTF-8 | 547 | 4.21875 | 4 | [] | no_license | CREATE TABLE IF NOT EXISTS MESSAGES
(
id VARCHAR(36) PRIMARY KEY,
message VARCHAR(255) NOT NULL
);
CREATE TABLE IF NOT EXISTS MESSAGES_FROM_USER
(
message_id VARCHAR(36) NOT NULL REFERENCES MESSAGES (id) ON DELETE CASCADE,
user_id VARCHAR(36) NOT NULL REFERENCES USERS (id) ON DELETE CAS... | true |
52ef04d4255c4d65e569d2c5f6c8fe2ec9db63df | SQL | darkvelopoer/accountTransactionApi | /accountTransaction/src/main/resources/data.sql | UTF-8 | 1,199 | 3.5 | 4 | [] | no_license |
CREATE TABLE IF NOT EXISTS `CUSTOMERS`(
customer_no BIGINT AUTO_INCREMENT PRIMARY KEY,
customer_id VARCHAR(30) NOT NULL,
customer_name VARCHAR(30) NOT NULL,
password VARCHAR(500) NOT NULL
);
INSERT INTO CUSTOMERS (customer_id, customer_name, password) VALUES
('222', 'Paul Allen','8d969eef... | true |
43766162053fd5832a4cae34dda3ec00e8460423 | SQL | pjamenaja/onixlegacy | /lib_wis_erp_framework/frameworks/patch/ONIX_1.5.6.20172310.sql | UTF-8 | 8,568 | 2.71875 | 3 | [] | no_license | CREATE SEQUENCE IF NOT EXISTS API_HISTORY_SEQ START 1;
CREATE SEQUENCE IF NOT EXISTS DOCUMENT_NUMBER_SEQ START 1;
CREATE SEQUENCE IF NOT EXISTS ENTITY_SEQ START 1;
CREATE SEQUENCE IF NOT EXISTS INVENTORY_DOC_SEQ START 1;
CREATE SEQUENCE IF NOT EXISTS INVENTORY_TX_SEQ START 1;
CREATE SEQUENCE IF NOT EXISTS ITEM_SEQ STAR... | true |
b1f51e77640e283ed91c5a528e064dbcf4fbb991 | SQL | patch72/Logger | /source/scripts/grant_logger_to_user.sql | UTF-8 | 678 | 2.5625 | 3 | [
"MIT"
] | permissive | -- Grants privileges for logger objects from current user to a defined user
-- Parameters
define to_user = '&1' -- This is the user to grant the permissions to
whenever sqlerror exit sql.sqlcode
grant execute on logger to &to_user;
grant select, delete on logger_logs to &to_user;
grant select on logger_logs_apex_i... | true |
12e758bef7b255d0ccc46cb8da64a35bafb03dd3 | SQL | r6group/qof | /QOF60-KPI01-DM(ระยอง).sql | UTF-8 | 1,328 | 3.8125 | 4 | [] | no_license | SET @b_year:=(SELECT yearprocess FROM sys_config LIMIT 1);
SET @start_d:=concat(@b_year-1,'-04-01');
SET @end_d:=concat(@b_year,'-03-31');
SET @start_a:='1941-04-01';
SET @end_a:='1981-03-31';
SELECT DM_Screen.*
/*HOSPCODE
,COUNT(cid) B1
,COUNT(if(bslevel>0 ,CONCAT(bslevel) ,NULL)) A1
,COUNT(if(bsleve... | true |
601450f8e774285bdfa1a29f175a8a11e287a395 | SQL | samgans/dbt-re-data | /macros/meta/information_schema.sql | UTF-8 | 3,042 | 3.734375 | 4 | [] | no_license | {% macro get_monitored_columns(for_schema) %}
{% set splitted = for_schema.split('.') %}
{% set splitted_length = splitted | length %}
{% if splitted_length == 2 %}
{{ adapter.dispatch('get_monitored_columns', 're_data')(splitted[1], splitted[0]) }}
{% else %}
{{ adapter.dispatch('get_mo... | true |
727d6e421c38c7a201721f033fe1e3a6f25bf663 | SQL | ivergil/bamazon | /bamazon_db.sql | UTF-8 | 1,522 | 3.375 | 3 | [] | no_license | DROP DATABASE IF EXISTS bamazon_db;
CREATE DATABASE bamazon_db;
USE bamazon_db;
CREATE TABLE products (
item_id INT NOT NULL AUTO_INCREMENT,
product_name VARCHAR(45) NOT NULL,
department_name VARCHAR(50) NOT NULL
price DECIMAL(10,2) NOT NULL,
stock_quantity INT NOT NULL,
PRIMARY KEY (item_id)
);
INSERT ... | true |
b8a15995c7c7e2dd75c8ae93d0968eed0b9ce7d0 | SQL | silence-do-good/stress-test-Postgres-and-MySQL | /dump/high/day26/select0117.sql | UTF-8 | 191 | 2.765625 | 3 | [] | no_license |
SELECT timeStamp, temperature
FROM ThermometerObservation
WHERE timestamp>'2017-11-25T01:17:00Z' AND timestamp<'2017-11-26T01:17:00Z' AND SENSOR_ID='86daf7f2_52ea_409a_80d5_78e4835c1cce'
| true |
00a68c780dc9e5375247a1cbf7f623205ec61846 | SQL | an1tra/an1tra.github.io | /Bamazon/bamazon.sql | UTF-8 | 1,251 | 3.625 | 4 | [] | no_license | ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'root';
DROP DATABASE IF EXISTS bamazon_db;
CREATE DATABASE bamazon_db;
USE bamazon_db;
CREATE TABLE products (
item_id INTEGER NOT NULL AUTO_INCREMENT,
product_name VARCHAR(100) NOT NULL,
price DECIMAL(10,2) NOT NULL,
stock INTEGER... | true |
1c2e1055800806a20b2c114e86a558279954c33f | SQL | plnorris97/first-php-website | /db/install.sql | UTF-8 | 8,629 | 3.234375 | 3 | [] | no_license | # ************************************************************
# Sequel Pro SQL dump
# Version 4541
#
# http://www.sequelpro.com/
# https://github.com/sequelpro/sequelpro
#
# Host: localhost (MySQL 5.5.5-10.1.9-MariaDB-log)
# Database: phpgrid_custom_crm
# Generation Time: 2017-01-13 06:33:07 +0000
# ******************... | true |
7c8c950a4ccf0a24b8a209e8f22e1e59d37e4729 | SQL | vanwicked/internship | /DOCUMENTACION-VERSION 1/Modelo Base de Datos/Base de Datos-anterior/database1.sql | UTF-8 | 2,323 | 3.34375 | 3 | [] | no_license | drop database internship;
create database internship;
use internship;
create table carreras (
cod_carreras int primary key,
descripcion varchar (50)
);
create table requisitos (
cod_requisitos int primary key,
tipo_requisitos varchar (50)
);
create table pasantia(
cod_pasantia int primary key,
inic... | true |
19ffbed9b4c8a43b8e58962f3e183ff231b2597c | SQL | EGRaY5/school_transport | /school_transport/school_transport.sql | UTF-8 | 24,582 | 2.875 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.6.5.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Nov 29, 2017 at 10:56 AM
-- Server version: 10.1.21-MariaDB
-- PHP Version: 5.6.30
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SE... | true |
7a0cacb6889064ea4d07ee8fe7bc346dba4e69ec | SQL | Aleksiysh/stepic_trenager_SQL | /internet_store/2.4.13_1.sql | UTF-8 | 214 | 4.09375 | 4 | [] | no_license | SELECT
SUM(buy_book.amount) AS Количество
FROM
book
JOIN
buy_book USING (book_id)
GROUP BY genre_id
ORDER BY Количество DESC
LIMIT 1 | true |
f8c939f59f4fd650c7e0624de3895e29d18a8a0b | SQL | soovincho/Thinkful-Projects | /U1L2A4no1.sql | UTF-8 | 208 | 3.53125 | 4 | [] | no_license | SELECT
duration,
zip_code
FROM
weather
JOIN
trips
ON
trips.zip_code = weather.ZIP
AND
substr(trips.start_date, 0, 10) = substr(weather.Date, 0, 10)
WHERE
Events = 'Rain'
ORDER BY duration DESC
LIMIT 3
| true |
26a100684ec433df831967ede0d0ee664313d8d6 | SQL | IsmaelRAJAOMANIRY/cntemad | /L3I/sql/resolved/1/12 JUILLET 2016.sql | UTF-8 | 1,517 | 4 | 4 | [] | no_license | #Langage SQL 12 JUILLET 2016
-- Membre(IdMembre, NomMembre, Sexe, Age)
-- Formation(IdFormation, Designation, Duree, FraisDeParticipation)
-- Participation(NumParticipation, IdMembre, IdFormation)
#A. Requête "SQL":
1
CREATE TABLE Participation(
NumParticipation INT PRIMARY KEY,
IdMembre INT, IdFormat... | true |
b5846aa317aa5b40a02cfb07a137dbd6b9858894 | SQL | kangdechen/FinalProject-1 | /Sql.sql | UTF-8 | 3,390 | 4.25 | 4 | [
"Apache-2.0"
] | permissive | use movies;
drop table if exists UserSession;
create table UserSession
(
id int not null auto_increment,
userName varchar(30),
sessionId varchar(30),
PRIMARY KEY (`id`)
);
/*Alter table recommendation drop foreign key fk_recommendation_userName; */
drop table if exists users;
create table users
(
userI... | true |
c8a960dd7892f5e1510cd1f4007319f28685138c | SQL | zona-script/betasoft | /login/axxets/mlm.sql | UTF-8 | 30,910 | 3.453125 | 3 | [] | no_license | SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+05:30";
DROP TABLE IF EXISTS `admin`;
CREATE TABLE `admin` (
`id` int(11) NOT NULL,
`name` varchar(200) NOT NULL,
`username` varchar(100) NOT NULL,
`password` varchar(100) NOT NULL,
`email` varchar(250) NOT NULL,... | true |
be091ee6b432d64a87437bd455dbfb63c9c78283 | SQL | snowflakedb/libsnowflakeclient | /deps/arrow-0.17.1/dev/benchmarking/ddl/1_09_table_public_unit.sql | UTF-8 | 1,339 | 3.640625 | 4 | [
"Apache-2.0",
"MIT",
"BSD-3-Clause",
"BSD-2-Clause",
"ZPL-2.1",
"BSL-1.0",
"LicenseRef-scancode-public-domain",
"CC-BY-3.0",
"NTP",
"LicenseRef-scancode-unknown-license-reference",
"OpenSSL",
"Zlib",
"CC-BY-4.0",
"LicenseRef-scancode-protobuf",
"NCSA",
"JSON",
"CC0-1.0"
] | permissive | /*
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may no... | true |
1ce9ed1fa389f484d754442760b975eb00b9491a | SQL | maradarin/Spotify-Database | /spotify.sql | UTF-8 | 6,289 | 3.625 | 4 | [] | no_license | -- Section 6
-- Package implementing functionalities alike the ones provided by Spotify
CREATE OR REPLACE PACKAGE spotify AS
PROCEDURE top5(utilizator user_log.username%TYPE); -- will print a user's top 5 musical genres, based on the songs found in his/her playlists
PROCEDURE cantece_asem... | true |
39f80d10ea670a55437befc197ba0818ca312184 | SQL | readium/readium-lcp-server | /dbmodel/mysql_db_setup_lcpserver.sql | UTF-8 | 768 | 2.734375 | 3 | [
"BSD-3-Clause"
] | permissive | CREATE TABLE `content` (
`id` varchar(255) PRIMARY KEY NOT NULL,
`encryption_key` varbinary(64) NOT NULL,
`location` text NOT NULL,
`length` bigint(20),
`sha256` varchar(64),
`type` varchar(255) NOT NULL DEFAULT 'application/epub+zip'
);
CREATE TABLE `license` (
`id` varchar(255) PRIMARY KE... | true |
7d4cc13ad301fb9b130e26716b4f270cc737d18a | SQL | silence-do-good/stress-test-Postgres-and-MySQL | /dump/low/day26/select2119.sql | UTF-8 | 178 | 2.703125 | 3 | [] | no_license |
SELECT timeStamp, temperature FROM ThermometerOBSERVATION o
WHERE timestamp>'2017-11-25T21:19:00Z' AND timestamp<'2017-11-26T21:19:00Z' AND temperature>=40 AND temperature<=75
| true |
fbbb6d65f8c55e23d97d380843fbcbc3741c2915 | SQL | crystalwanyulee/data_science_projects | /SQL_project/Shopper Behavior Analysis/database buildup.sql | UTF-8 | 1,945 | 3.5 | 4 | [] | no_license | -- Preliminaries
DROP DATABASE IF EXISTS db_consumer_panel;
CREATE DATABASE db_consumer_panel;
USE db_consumer_panel;
-- Create tables
CREATE TABLE households(
hh_id INT unsigned NOT NULL AUTO_INCREMENT,
hh_race INT unsigned,
is_latinx INT unsigned,
hh_in... | true |
781940625c688091c035c8509bc38aaffc46ea58 | SQL | maxiaoxiaoxiao/FinancialSystem | /src/main/resources/SQL/fund_product.sql | UTF-8 | 2,417 | 3.1875 | 3 | [] | no_license | /*
Navicat Premium Data Transfer
Source Server : yuncang
Source Server Type : MySQL
Source Server Version : 50620
Source Host : 12.168.3.75:3306
Source Schema : test
Target Server Type : MySQL
Target Server Version : 50620
File Encoding : 65001
Date: 18/04/2021 13:04... | true |
72968fb1f3c66e0e736d04d45873250ca002ca97 | SQL | HectorLiceaga/TP-3.4_Universidad | /database/db_universidad.sql | UTF-8 | 2,506 | 3 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.9.0.1
-- https://www.phpmyadmin.net/
--
-- Servidor: 127.0.0.1
-- Tiempo de generación: 01-05-2020 a las 03:25:24
-- Versión del servidor: 10.4.6-MariaDB
-- Versión de PHP: 7.3.9
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";... | true |
216def9f0241831f439ce88156409397ee44a5ee | SQL | anserwaseem/DEBS | /debs1.sql | UTF-8 | 32,590 | 3.65625 | 4 | [] | no_license | create database debs1;
show tables from debs1;
use debs1;
CREATE TABLE `user` (
`id` int NOT NULL AUTO_INCREMENT,
`username` varchar(255) NOT NULL,
`password` varchar(255) NOT NULL,
`name` varchar(255) DEFAULT NULL,
`birthday` varchar(255) DEFAULT NULL,
`country` varchar(255) DEFAULT NULL,
`occupation` v... | true |
561f9bb67bee59c789654e743ea8a14c0fde6a77 | SQL | apereo-tesuto/tesuto | /tesuto-reports-services/tesuto-reports-core/src/flyway/resources/db.migration/V5.0__initialize.sql | UTF-8 | 1,912 | 3.5625 | 4 | [
"LicenseRef-scancode-warranty-disclaimer",
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference",
"EPL-1.0"
] | permissive | CREATE TABLE report_assessment_structure (
assessment_id character varying(100) NOT NULL,
item_id character varying(100),
assessment_scoped_identifier character varying(100) NOT NULL,
assessment_scoped_id character varying(255) NOT NULL,
item_scoped_identifier character varying(255) NOT NULL,
parent_testlet... | true |
966891e8229953c84cf69df5b77191064e056d50 | SQL | wzhonggo/LiferayDemo | /Oauth2-portlet/docroot/WEB-INF/sql/tables.sql | UTF-8 | 4,553 | 2.578125 | 3 | [] | no_license | create table labimo_LiferayTincanManifestAct (
id_ LONG not null primary key,
activityId VARCHAR(75) null,
name VARCHAR(75) null,
description VARCHAR(75) null,
launch VARCHAR(75) null
);
create table labimo_LiferayUser (
id_ LONG not null primary key IDENTITY,
liferayUserId LONG,
name VARCHAR(75) null,
prefer... | true |
391659c7dc4c3caddd845712a75782ed688604fe | SQL | AbhishekScariyaMB/S2_Abhishek_Scariya_DBMS | /experiment9/experiment9.sql | UTF-8 | 1,278 | 3.96875 | 4 | [] | no_license | create table clientmaster (client_no int primary key not null, cname varchar(20), city varchar(26));
create table salesmaster (salesmanno int primary key,sname VARCHAR(20),city VARCHAR(10));
create table salesorder (order_no varchar(20) primary key not null check (order_no like '0%'),client_no int REFERENCES clientmast... | true |
38a277f7ab9447119689e7890356f5ba3a3afe7c | SQL | Gerstep/news360-user-anatytics | /serversessions.sql | UTF-8 | 326 | 2.921875 | 3 | [] | no_license | SELECT * FROM ( SELECT AccountGuid, COUNT(*) AS num FROM UserStats.ApplicationStarts WITH(NOLOCK)
WHERE ActionTime
BETWEEN ('2/01/2015 00:00:00') AND ('3/01/2015 23:59:59')
AND ActionTime < '3/01/2015 00:00:00'
GROUP BY AccountGuid) TMP
WHERE num... | true |
becfc3e43833ee9098dfbc59f5c9742f8a7a6f55 | SQL | petercai/Vision | /src/main/sql/feed_tag.sql | UTF-8 | 505 | 2.78125 | 3 | [] | no_license | SELECT `FEEDENTRIES`.`url`,
`FEEDENTRYTAGS`.`name`,
`FEEDENTRYSTATUSES`.`read_status`,
`FEEDENTRYSTATUSES`.`starred`,
`FEEDENTRYCONTENTS`.`title`,
`FEEDENTRYCONTENTS`.`content`
FROM `FEEDENTRYSTATUSES`
INNER JOIN `FEEDENTRIES` ON `FEEDENTRYSTATUSES`.`entry_id` = `FEE... | true |
a793dd064bf87de24c2a84417938ab21be84cc3c | SQL | camromere/cmrsql | /red-gate-monitor-queries.sql | UTF-8 | 683 | 3.296875 | 3 | [
"MIT"
] | permissive |
IF OBJECT_ID('tempdb..[#DeadlockData]') IS NOT NULL
DROP TABLE #DeadlockData;
WITH xml
AS ( SELECT CAST(event_data AS XML) AS XMLDATA
FROM sys.fn_xe_file_target_read_file('system_health*.xel', NULL, NULL, NULL) )
SELECT xml.XMLDATA
INTO #DeadlockData
FROM xml
WHERE xml.XMLDATA.value('(/event... | true |
4437479f41ac1ba047f6c95d65ac6c50c4679e65 | SQL | RKWKomZe/RkwEtracker | /ext_tables.sql | UTF-8 | 8,983 | 2.765625 | 3 | [] | no_license | #
# Table structure for table 'tx_rkwetracker_domain_model_report'
#
CREATE TABLE tx_rkwetracker_domain_model_report (
uid int(11) NOT NULL auto_increment,
pid int(11) DEFAULT '0' NOT NULL,
name varchar(255) DEFAULT '' NOT NULL,
description text NOT NULL,
recipient text NOT NULL,
groups varchar(255) DEFAULT '' ... | true |
d5677183035d484a546a57ad0e6d5e7d0854b538 | SQL | rrmchathura/NSBm-Gym-Management-System | /gym_mgmt_system (1).sql | UTF-8 | 18,913 | 2.96875 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.2.11
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Nov 27, 2020 at 04:41 PM
-- Server version: 5.6.21
-- PHP Version: 5.6.3
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
... | true |
c718fccfda33554295d7f8ca5a145175037d0c63 | SQL | pfs-haibv/projpscd | /script/TEST_VW_CHECK_TB_PS.sql | UTF-8 | 5,635 | 3.21875 | 3 | [] | no_license | -- Start of DDL Script for View TEST.VW_CHECK_TB_PS
-- Generated 03/10/2013 2:29:07 PM from TEST@DCNC
CREATE OR REPLACE VIEW vw_check_tb_ps (
short_name,
rid,
table_name,
err_id,
field_name,
update_no,
ma_cqt,
check_app )
AS
(--Check ma_tk ton tai trong danh muc
SELECT short_nam... | true |
20269f246f2773f07f88ab6bda87c40c01f3b4f4 | SQL | layliaiyong/RPQuery | /doc/db_script.sql | GB18030 | 3,504 | 3.421875 | 3 | [] | no_license | -------------------------------------------------------------------ṹ
CREATE TABLE `admin_group`(
`groupid` TINYINT NOT NULL AUTO_INCREMENT,
`groupname` CHAR(32) DEFAULT '' COMMENT '',
`m` VARCHAR(10) NOT NULL COMMENT 'ӿmodule',
`c` VARCHAR(10) NOT NULL COMMENT 'ӿcontrol',
`a` VARCHAR(10) NOT NULL COMMENT 'ӿact... | true |
7eda425eb7a0b35d024c2431ffe504ce92872fdf | SQL | paulkirkwood/anthology-perl | /001-sqlite.sql | UTF-8 | 2,409 | 3.59375 | 4 | [] | no_license | --
-- Drops just in case you are reloading
---
PRAGMA foreign_keys = ON;
DROP TABLE IF EXISTS tracks;
DROP TABLE IF EXISTS albums;
DROP TABLE IF EXISTS band_members;
DROP TABLE IF EXISTS bands;
DROP TABLE IF EXISTS people;
DROP TABLE IF EXISTS band_instruments;
DROP TABLE IF EXISTS instruments;
DROP TABLE IF EXISTS so... | true |
271001947ed50f61a93fa72e38f8dd4511070e5d | SQL | jiafeiyan/xops | /app/sqlGenerated/siminfo_SimInfo_clear.sql | GB18030 | 5,729 | 2.96875 | 3 | [
"Apache-2.0"
] | permissive | -- սϵͳ
truncate table siminfo.t_TradeSystem;
-- չ̨ϵͳ
truncate table siminfo.t_BrokerSystem;
-- սϵͳ̨ϵͳӦϵ
truncate table siminfo.t_TradeSystemBrokerSystem;
-- չ̨ϵͳӦϵ
truncate table siminfo.t_BrokerSystemSettlementGroup;
-- ս
truncate table siminfo.t_Exchange;
-- սϵͳձ
truncate table siminfo.t_TradeSys... | true |
d88f99b9608b17d7e78596af64c0b3ec0caa2f2b | SQL | silence-do-good/stress-test-Postgres-and-MySQL | /dump/high/day22/select0113.sql | UTF-8 | 425 | 3.484375 | 3 | [] | no_license |
SELECT obs.sensor_id, avg(counts)
FROM (SELECT sensor_id, date_trunc('day', timestamp), count(*) as counts
FROM WiFiAPObservation WHERE timestamp>'2017-11-21T01:13:00Z' AND timestamp<'2017-11-22T01:13:00Z' AND SENSOR_ID = ANY(array['wemo_06','aeb9a588_82ed_45aa_bb34_540c3d43f0c4','3141_clwe_1100','3144_clwa_40... | true |
fbd6e0465ba312eb5032007a31fbd4a18089a1a6 | SQL | pierrickjr/friendlyfish | /src/main/resources/ddl.sql | UTF-8 | 1,070 | 2.671875 | 3 | [] | no_license | DROP TABLE `DataBasePoissons`;
CREATE TABLE `DataBasePoissons` (
`id` mediumint(8) unsigned NOT NULL auto_increment,
`Poisson` varchar(255) default NULL,
`Temperature` mediumint default NULL,
`Acidite` mediumint default NULL,
'Capacite' mediumint default NULL,
'Eau' varchar(255) default NULL,
PRIMARY KEY... | true |
14d293dd3bd3547e0470c5991e0863b16ea30266 | SQL | PierreFROELICH/cours | /SLAM3/20190401 - SLAM3 - Fin DemGuiv et Cinema - Eleves/Cinema/Correction/Q8_NomCritiqueEtFilmBestEval.sql | UTF-8 | 261 | 3.53125 | 4 | [] | no_license | SELECT C.NOM_CRITIQUE , F.TITRE_FILM
FROM CINEMA.CRITIQUE C
INNER JOIN CINEMA.EVALUATIONS E
ON C.ID_CRITIQUE = E.ID_CRITIQUE
INNER JOIN CINEMA.FILMS F
ON F.ID_FILM = E.ID_FILM
WHERE E.NOMBRE_ETOILES = 9.4
(SELECT MAX(NOMBRE_ETOILES) FROM CINEMA.EVALUATIONS )
| true |
96901c2e8fd99845988ec2e6d9cb7a6511bbda36 | SQL | RomanTymochko/internet_shopv2 | /src/main/resources/database.sql | UTF-8 | 2,563 | 4 | 4 | [] | no_license | create database shop_version_2;
use shop_version_2;
-- Table: User
CREATE TABLE User (
id INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
username VARCHAR(50) NOT NULL,
password VARCHAR(255) NOT NULL,
contacts_id INT,
FOREIGN KEY (contacts_id) REFERENCES Contacts(id)
)
ENGINE = InnoDB;
-- Table: ... | true |
c0f00e29204cdab489fb6168981b2cde81ffd486 | SQL | idirdroid/starwars | /requetes.sql | UTF-8 | 1,356 | 4.46875 | 4 | [] | no_license | select character.name, height, mass, birth_year, g.gender, p.name
from character
join gender g on g.id_gender = character.id_gender
join planet p on character.id_planet = p.id_planet;
-- les 10 planètes les plus peuplées
SELECT *
from planet
WHERE population IS NOT null
ORDER BY population DESC
LIMIT... | true |
d19407148b35d3899dcc9bc99261d45832599d04 | SQL | giovanni-cerqueira/Bloco-II-Generation | /MySQL/Lista de Exercícios 02/EX03/Tabelas.sql | UTF-8 | 1,794 | 4.09375 | 4 | [] | no_license | /*
Crie um banco de dados para um serviço de farmácia de uma empresa, o nome do banco deverá ter o seguinte nome db_farmacia_do_bem, onde o sistema trabalhará com as informações dos produtos desta empresa.
O sistema trabalhará com 2 tabelas tb_produto e tb_categoria.
siga exatamente esse passo a passo:
Crie... | true |
fe6b88ba84d9e186b95a8e1886762522dfb23e66 | SQL | JucaRei/PL-SQL-aprendendo | /Recuperando_Registros_com_Cursor2.sql | UTF-8 | 334 | 2.59375 | 3 | [] | no_license | DECLARE
v_segmercado_id cliente.SEGMERCADO_ID%type := 2;
CURSOR cur_cliente2 is -- basicamente um resultSET
select ID
from CLIENTE;
begin
for cli_rec IN cur_cliente2
loop
ATUALIZAR_CLI_SEG_MERCADO(cli_rec.ID, v_segmercado_id);
end loop;
commit;
end;
select *... | true |
7eeefb6fc7cf92f7559e5c7884050a93ad06441d | SQL | fpozzas/fic | /mix/bd1/consultas.sql | UTF-8 | 6,689 | 3.59375 | 4 | [] | no_license | --========================================================================
--PRACTICA 1 DE BASES DE DATOS 1
--AUTORES:
-- Juan Font Alonso - infjfa00 - EI - 2ºA-2
-- Daniel Fernández Núñez - infdfn02 - EI - 2ºA-2
... | true |
645db074e725f88b698fa7a55eb730352cefe16d | SQL | ZacheryGlass/Mental-Math-Competition | /Create_Math.SQL | UTF-8 | 7,841 | 3.140625 | 3 | [] | no_license | --
-- Create_Math.SQL by Zachery Glass
-- This file contains a PostgreSQL script that,
-- when executed, creates the Math schema & tables.
--
DROP SCHEMA IF EXISTS Math CASCADE ;
CREATE SCHEMA Math ;
--
CREATE TABLE Math.Competitor
( ID SERIAL PRIMARY KEY,
Username VARCHAR(32) NOT NULL,
--... | true |
f04d4e6c5aa23826b193d59b1afb291f7c463b0b | SQL | bellmit/origin | /family_order/sql/BOF_SYNC/INS_ACCOUNT.sql | UTF-8 | 1,658 | 2.75 | 3 | [] | no_license | INSERT INTO TI_B_ACCOUNT
(SYNC_SEQUENCE, SYNC_DAY, MODIFY_TAG, TRADE_ID, PARTITION_ID, ACCT_ID,
CUST_ID, PAY_NAME, PAY_MODE_CODE, ACCT_DIFF_CODE, ACCT_PASSWD, ACCT_TAG,
NET_TYPE_CODE, EPARCHY_CODE, CITY_CODE, BANK_CODE, BANK_ACCT_NO,
SCORE_VALUE, CREDIT_CLASS_ID, BASIC_CREDIT_VALUE, C... | true |
c9fad286aceda1d09e68c8dfedce9ddee991d184 | SQL | apkhaithong/jqw | /Create_Table.sql | UTF-8 | 5,649 | 2.9375 | 3 | [] | no_license | drop table invlocat;
create table invlocat
(
idno serial,
locatcd character (8) not null,
locatnm varchar (100),
shortl varchar (2) not null,
locaddr1 varchar (100),
locaddr2 varchar (100),
telp varchar (20),
aumpcod character (5),
provcod character (5),
postcod character ... | true |
d51c9cbc29be2b837625c83a3f7c9531a931216e | SQL | Tech-Pirates-Aspiring-Minds/license-api-test-component | /src/main/resources/DB/user.sql | UTF-8 | 321 | 2.984375 | 3 | [] | no_license | --
-- Table structure for table `user`
--
CREATE TABLE `user` (
`user` varchar(50) NOT NULL,
`password` varchar(50) NOT NULL,
`status` int(11) NOT NULL,
`role` varchar(50) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Indexes for table `user`
--
ALTER TABLE `user`
ADD PRIMARY KEY (`user`);
COMMIT;
... | true |
908ac83bcf52f5ef029f9daee3002d6a0fe7a787 | SQL | lexi-lambda/ut2k4-team-stats | /query.sql | UTF-8 | 3,313 | 4.46875 | 4 | [] | no_license | -- Calculates the best teams for Instagib CTF matches based on the data
-- contained in a MySQL database running the UT2k4 Stats system.
--
-- MySQL doesn't support WITH clauses, which would be very helpful for DRYing
-- up this query, but in the absence of that, this query just ends up being
-- long and repetitive.
S... | true |
ce19189dd41d7b865e945ab0bd7fdb291bb41c78 | SQL | DebugKing-GoGoGo/mysql | /paas_aom/20190719研发计划.sql | UTF-8 | 918 | 2.625 | 3 | [] | no_license | -- /aom/RandDplanDetail?sourceViewId=1260&recordId=203
[{"url":"/aom/applicationProjectDetail?sourceViewId=916&recordId=","IDValKey":"ID","aValKey":"S_PRJNOS"}]
-- 研发计划:
/*
研发计划编号、研发计划名称、计划总金额、计划状态、操作类型、审批状态、所属部门、计划开始时间、计划结束时间、计划费用成本
*/
SELECT
id, S_PLANCODE, S_PLANNAME `研发计划名称`,
DL_ALLMONEY `计划总金额`,
ngoss.translate... | true |
417096c6ad665df6eeef55a6c1b37e26845c52b1 | SQL | revio101101/SAHRIL-UKK-2021 | /pengaduan.sql | UTF-8 | 9,225 | 2.734375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 5.0.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Apr 05, 2021 at 10:19 AM
-- Server version: 10.4.17-MariaDB
-- PHP Version: 8.0.0
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIEN... | true |
8dcea95528fec94fc9bd8125f159a2c3608c0082 | SQL | syureu/Hellog2 | /backend/src/main/resources/DDL/equipmentExercise.sql | UTF-8 | 625 | 3.796875 | 4 | [
"Apache-2.0"
] | permissive | CREATE TABLE `equipment_exercise` (
`equipment_exercise_id` bigint(20) NOT NULL AUTO_INCREMENT,
`equipment_id` bigint(20) DEFAULT NULL,
`exercise_id` bigint(20) DEFAULT NULL,
PRIMARY KEY (`equipment_exercise_id`),
KEY `equipment_exercise_FK` (`equipment_id`),
KEY `equipment_exercise_FK_1` (`exercise_id`),
... | true |
ef3936164c65f56e15e640639f32cd01cbcb82ed | SQL | mftutui/bd-class | /secao3aula11(insert).sql | UTF-8 | 798 | 2.828125 | 3 | [] | no_license | /* INSERINDO INFORMACOES NA TABELA*/
/* FORMA 01 - EXCLUINDO AS COLUNAS */
INSERT INTO CLIENTE VALUES('JOAO', 'M', 'JOAO@GMAIL.COM', 09876565432, '22345678', 'MARIA LACERDA - ESTACIO - RIO DE JANEIRO - RJ');
INSERT INTO CLIENTE VALUES('MARIA', 'F', 'MARIA@GMAIL.COM', 08765432109, '987765454', 'ARACY - ESTREITO - FLOR... | true |
46e8870f8ae9253ac7da12c2316f5a80cb8d78e5 | SQL | AleksandarK837/MySQL | /5. join/join - MOVIE.sql | UTF-8 | 1,963 | 4.21875 | 4 | [] | no_license | -- 1.Напишете заявка, която извежда името на продуцента и имената на филмите,
-- продуцирани от продуцента на ‘Star Wars’
select me.name, m.title
from movieexec me
join movie m on me.cert = m.producerc
where me.name in (select name from movieexec
where cert in (select producerc from movie
... | true |
0962b82017abfa2b1c1d80bda3e0756ff36f02b7 | SQL | radtek/abs3 | /sql/mmfo/barsupl/Table/tmp_upl_dm_status.sql | WINDOWS-1251 | 3,587 | 3.53125 | 4 | [] | no_license | PROMPT =====================================================================================
PROMPT *** Run *** ======== Scripts /Sql/BARSUPL/Table/TMP_UPL_DM_STATUS.sql =======*** Run
PROMPT =====================================================================================
PROMPT *** Drop temporary table TM... | true |
6b33ed840d66bc930b747b6a04acb2dc499e34b1 | SQL | atul-anand/zemoso-training | /sql/IMDB/trigger_series.sql | UTF-8 | 327 | 3.28125 | 3 | [] | no_license | DELIMITER ;;
CREATE TRIGGER IMDB.trigger_series BEFORE INSERT ON IMDB.TV_Series_Actor FOR EACH ROW
BEGIN
UPDATE IMDB.Actor a
SET a.shows_count = a.shows_count + 1
WHERE a.actor_id = new.actor_id;
UPDATE IMDB.TV_Series t
SET t.actor_count = t.actor_count + 1
WHERE t.show_id = new.show_id;
END;;
DELIM... | true |
35fedbf876c758e712460cd8a72b29522d81607c | SQL | sams248/PostgreSQL | /34. FULL JOIN.sql | UTF-8 | 218 | 3.21875 | 3 | [] | no_license | SELECT companyname, orderid
FROM orders
FULL JOIN customers ON customers.customerid=orders.customerid;
SELECT productname, categoryname
FROM categories
FULL JOIN products ON products.categoryid=categories.categoryid;
| true |
3691fcbfd00fb20381642838906c16825bf56c07 | SQL | FELLSAT/Procedimientos | /Procedimientos/Parte 2/H3i_SP_CONS_LUGARESATENCION.sql | UTF-8 | 1,199 | 3 | 3 | [] | no_license | CREATE OR REPLACE PROCEDURE H3i_SP_CONS_LUGARESATENCION
-- =============================================
-- Author: FELIPE SATIZABAL
-- =============================================
(
v_CODIGOENTIDAD IN NUMBER,
cv_1 OUT SYS_REFCURSOR
)
AS
v_conteo NUMBER(10,0);
BEGIN
OPEN cv_1 FOR
SELE... | true |
be072c180377b1de3a3a76273162614c553a719c | SQL | raykroeker/thinkparity | /remote/model/src/main/resources/database/query/tpsd_select_contacts.sql | UTF-8 | 261 | 3.421875 | 3 | [] | no_license | select U.USER_ID "user id",U.USERNAME "user",UC.USER_ID "contact id",
UC.USERNAME "contact"
from TPSD_CONTACT C
inner join TPSD_USER U on U.USER_ID=C.USER_ID
inner join TPSD_USER UC on UC.USER_ID=C.CONTACT_ID
order by U.USER_ID desc,UC.USER_ID desc
| true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.