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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
ea695baff577e5b02173a71156af6adb4c196ccb | SQL | JonathanRH07/Control-de-versiones | /DB ICAAVweb/Suite_mig_demo/Stored_Procedures/sp_glob_sat_productos_servicios_c.sql | UTF-8 | 761 | 3.265625 | 3 | [] | no_license | DELIMITER $$
CREATE DEFINER=`suite_deve`@`%` PROCEDURE `sp_glob_sat_productos_servicios_c`(
IN pr_valor VARCHAR(100),
OUT pr_message VARCHAR(500))
BEGIN
/*
@nombre: sp_glob_sat_productos_servicios_c
@fecha: 07/03/2017
@descripcion : Sp de consulta sat_productos_servicios
@autor : Hugo Luna
*/
D... | true |
343f382d8adca3fa286cc688fac84cd51f3b3abb | SQL | gicadmin/allo | /PHENIX/Tables/FISCAL_CALENDAR_WEEKS.sql | UTF-8 | 1,560 | 3.53125 | 4 | [] | no_license | CREATE TABLE phenix.fiscal_calendar_weeks (
fcw_fca_year NUMBER(4) NOT NULL,
fcw_fca_period NUMBER(2) NOT NULL,
fcw_week NUMBER(2) NOT NULL,
fcw_start_date DATE NOT NULL,
fcw_end_date DATE NOT NULL,
fcw_week_of_year NUMBER(2) NOT NULL,
fcw_exception_week_switch NUMBER(1) DEFAULT 0 NOT NULL CONSTRAINT fcw_... | true |
023f6d8a7b2f2d2a55a94e4e1ff039bf44413b67 | SQL | raj638111/kafkanotes | /c10_KafkaStream/b18_Aggregation/a10_Example_Rolling_Aggregation(Non-windowed).sql | UTF-8 | 3,110 | 4.40625 | 4 | [] | no_license |
# 2 Aggregate Example
+ KGroupedStream > KTable
+ KGroupedTable > KTable
Rolling aggregation. Aggregates the values of (non-windowed) records by
the grouped key. Aggregating is a generalization of reduce and allows,
for example, the aggregate value to have a different type than the input values
When aggrega... | true |
056d2c3aee3d94e62c864968e3d00a141174981f | SQL | yevhenii-filatov/BulletinBoard | /bulletin-board/data/data.sql | UTF-8 | 16,662 | 3.203125 | 3 | [] | no_license | create table if not exists roles
(
id bigint auto_increment
primary key,
name varchar(20) null
);
INSERT INTO extrawest.roles (id, name) VALUES (1, 'ROLE_ADMIN');
INSERT INTO extrawest.roles (id, name) VALUES (2, 'ROLE_MODERATOR');
INSERT INTO extrawest.roles (id, name) VALUES (3, 'ROLE_USER');
crea... | true |
23d6e395888cb3c5c0ca9989c7f308ae12e17021 | SQL | scrdataaitsp/SatoriStreamingEventHubs | /StreamAnalytics.sql | UTF-8 | 1,180 | 2.875 | 3 | [] | no_license | WITH firstRows AS
(
SELECT
header.[user-data] AS 'provider',
System.Timestamp AS 'datetime',
GetArrayElement(entity, 0) firstRow
FROM
<eventhub_input> TIMESTAMP BY DATEADD(second, header.timestamp, '1970-01-01T00:00:00Z')
)
SELECT
provider,
[datetime],
firstRow.vehicle.trip.trip_id AS 'tr... | true |
d9f38c146b7c9f7eeaaea39aa3179a8b826a5913 | SQL | markarowabove/analysis | /raft/raft_membership_opportunities.sql | UTF-8 | 1,257 | 3.859375 | 4 | [] | no_license | -- membership to opportunity
use raftdb2den;
-- diff - additional records
if (object_id('tempdb..#ids') is not null) begin drop table #ids end;
select a.membershipID as Id into #ids from membership a
left join raftdb2den_old.dbo.membership b on a.membershipID = b.membershipID
where b.membershipID is null;
--select * ... | true |
1b30c8e1486506ffd3edb39748ac2a903b1ec799 | SQL | ahmadtechcampus2/ahmad4 | /برنامج الامين المحاسبي/Bin/System/fnGetDirection.sql | UTF-8 | 607 | 2.8125 | 3 | [] | no_license | ##################################################################
CREATE FUNCTION fnGetDirection(@InOutMode [INT], @buDirection [INT])
RETURNS [INT]
AS BEGIN
/*
this function is used to convert bu direction to support
user defined directions, following these rules:
@InOutMode = 0 -> INPUT +, OUTPUT +
@InOutMode = 1... | true |
96947defd5c36e76d2a8b40a9675fed915e39d55 | SQL | joiceli/questionnaire | /asia_user.sql | UTF-8 | 878 | 2.546875 | 3 | [] | no_license | /*
Navicat Premium Data Transfer
Source Server : localhost
Source Server Type : MySQL
Source Server Version : 50723
Source Host : localhost
Source Database : email
Target Server Type : MySQL
Target Server Version : 50723
File Encoding : utf-8
Date: 11/05/2018 14:47:08 ... | true |
b86bdc2885bfde8bb15706db56548ee2586c123f | SQL | kuang-lingxi/springDemo | /springdemo.sql | UTF-8 | 1,321 | 2.953125 | 3 | [] | no_license | /*
Navicat Premium Data Transfer
Source Server : localhost
Source Server Type : MySQL
Source Server Version : 100132
Source Host : localhost:3306
Source Schema : springdemo
Target Server Type : MySQL
Target Server Version : 100132
File Encoding : 65001
Date: 28/03/20... | true |
ce8180bb221463ac34fd6f078330a2d52b44fb9f | SQL | inoknalv/dataV2-labs | /module-1/MySQL-Select/your-code/solutions.sql | UTF-8 | 1,365 | 4.1875 | 4 | [] | no_license |
SELECT authors.au_id AS 'Author ID', au_lname AS 'Last name', au_fname AS 'First name', title AS 'Title', pub_name AS 'Publisher name'
FROM titles
INNER JOIN titleauthor ON titles.title_id = titleauthor.title_id
INNER JOIN authors ON authors.au_id = titleauthor.au_id
INNER JOIN publishers ON publishers.pub_id = ti... | true |
13f3dee2b6c8d0fe160ef933a9c3b650921e82dd | SQL | szachovy/School-and-Training | /Project Data Bases/select_db.sql | UTF-8 | 1,863 | 4.03125 | 4 | [
"MIT"
] | permissive |
--zapytania z usuwaniem tabeli sa w pliku drop_db.sql
--znajdz instruktora ktory w tej chwili nie prowadzi kursow
SELECT id,imie,nazwisko FROM instruktorzy
WHERE id NOT IN
(SELECT id_instruktora FROM kurs)
ORDER BY id;
--wyswietl instruktorow ktorzy prowadza wiecej niz jeden kurs
SELECT * FROM instruktorzy... | true |
9ea3aa10e3bbbeab81279fc9e20b83051323ff20 | SQL | pythonoras/Toontown-Private-Server-Webend | /conf/evolutions/default/6.sql | UTF-8 | 304 | 2.859375 | 3 | [] | no_license | # --- !Ups
create table website_visit (
id integer auto_increment not null,
fingerprint integer,
user_id integer,
`time` datetime,
constraint pk_website_visit primary key (id)
);
# --- !Downs
drop table website_visit; | true |
9416edc597da334da541d6f841322cdc3dca934a | SQL | DexterDiolola/macStat-v3.0.0 | /database/procedures/ALERTS.sql | UTF-8 | 868 | 3.640625 | 4 | [] | no_license | DELIMITER $$
CREATE DEFINER=`root`@`localhost` PROCEDURE `ALERTS`(IN `cond` VARCHAR(50), IN `mac` VARCHAR(50), IN `label` VARCHAR(50), IN `owner` VARCHAR(50), IN `alertType` VARCHAR(50), IN `alertMsg` VARCHAR(255), IN `dateCreated` VARCHAR(50))
NO SQL
BEGIN
IF cond = 'truncate' THEN
TRUNCATE TABLE aler... | true |
84ea1545733a47e7ded39fcf4fb7e5534e9b1eb1 | SQL | thuydang2412/landslide | /data/sql/warning_level.sql | UTF-8 | 1,527 | 3 | 3 | [
"MIT"
] | permissive | /*
Navicat MySQL Data Transfer
Source Server : localhost
Source Server Version : 50717
Source Host : 127.0.0.1:3306
Source Database : canhbao
Target Server Type : MYSQL
Target Server Version : 50717
File Encoding : 65001
Date: 2017-02-22 00:27:58
*/
SET FOREIGN_KEY_CHECKS=0;
-- -... | true |
1474bd61adcadffb0e48caebc3e55a1408c89024 | SQL | MigueAJM/DataBase_cf | /Sentencias.sql | UTF-8 | 11,849 | 4.125 | 4 | [
"Apache-2.0"
] | permissive | DROP DATABASE IF EXISTS libreria; --Condicionar sentencias
CREATE TABLE IF NOT EXISTS libreria;
USE libreria;
CREATE TABLE IF NOT EXISTS autor(
autor_id INT,
nombre VARCHAR(25),
apellido VARCHAR(25),
genero CHAR(1),
fecha_nacimiento DATE,
pais_origen VARCHAR(15)
);
-- SHOW TABLES;
-- SELECT DATABSE();
-- DR... | true |
342d6d18244a1454568882b330c362c91fd747b0 | SQL | goh12/vef2-2018-h1 | /schema.sql | UTF-8 | 1,016 | 3.828125 | 4 | [] | no_license | CREATE TABLE users (
id serial primary key,
username varchar(255) NOT NULL UNIQUE,
password varchar(255) NOT NULL,
name varchar(255) NOT NULL,
imgurl varchar(255),
CONSTRAINT CHK_username CHECK (LENGTH(username) >= 3),
CONSTRAINT CHK_password CHECK (LENGTH(password) >= 6),
CONSTRAINT CHK_name CHECK (LEN... | true |
b9e20d62bf57b09852eaabfc97f1a55b41a6312b | SQL | mindis/MonetDBLite-C | /src/sql/scripts/39_analytics_hge.sql | UTF-8 | 1,309 | 2.921875 | 3 | [] | no_license | -- This Source Code Form is subject to the terms of the Mozilla Public
-- License, v. 2.0. If a copy of the MPL was not distributed with this
-- file, You can obtain one at http://mozilla.org/MPL/2.0/.
--
-- Copyright 1997 - July 2008 CWI, August 2008 - 2018 MonetDB B.V.
create aggregate stddev_samp(val HUGEINT) retu... | true |
4fc5cf04cc42b4501cb31f60493f09ebcc177f7e | SQL | bykanutii/website | /src/main/sql/999_test_data_initialisation.sql | UTF-8 | 1,167 | 2.71875 | 3 | [] | no_license | insert into users (id, userName, name, password, email, sex)
values (1, 'vkuchyn', 'Viktor Kuchyn', '5f4dcc3b5aa765d61d8327deb882cf99', 'kuchin.victor@gmail.com', 'MALE');
alter sequence users_id start with 2;
insert into company (id, companyName, companyPhone, companyLogoUrl, companyAddress, companyWebPage) values
... | true |
c407aca625979a730752293b10f655bc77185231 | SQL | salvador-barboza/tc1009db-final-project | /mysql/procedures/delete.sql | UTF-8 | 878 | 2.8125 | 3 | [] | no_license | DROP PROCEDURE IF EXISTS deletePaciente;
CREATE PROCEDURE deletePaciente (IN idPaciente INT)
BEGIN
DELETE FROM DiagnosticoConsulta
WHERE consultaId IN (SELECT id
FROM Consulta
WHERE pacienteId = idPaciente);
DELETE FROM Consulta
WHERE pacienteId = idP... | true |
3ffd79acce34ca0c121e9bf36fe0f61caef3e51a | SQL | taromaru04/sistemaPos | /bd_ventas.sql | UTF-8 | 17,005 | 3.140625 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 5.0.1
-- https://www.phpmyadmin.net/
--
-- Servidor: 127.0.0.1
-- Tiempo de generación: 29-02-2020 a las 19:46:47
-- Versión del servidor: 10.4.11-MariaDB
-- Versión de PHP: 7.4.2
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
... | true |
2907e53461aae8bb9f40ed574a298160b898c0df | SQL | helloworld755/MySQL | /kurs_ddl.sql | MacCyrillic | 3,645 | 3.625 | 4 | [] | no_license | DROP DATABASE IF EXISTS netflix;
CREATE DATABASE netflix;
USE netflix;
DROP TABLE IF EXISTS genres;
CREATE TABLE genres(
id SERIAL,
genre_name VARCHAR(50)
) COMMENT ' , , , ..';
DROP TABLE IF EXISTS `all`;
CREATE TABLE `all` (
id BIGINT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY,
`type` VARCHAR(30) C... | true |
d97e6c8439b022eb10a9d90e0c3c4462efc16883 | SQL | yallyyally/HappyHouse_Backend | /DBScript/final_DB/DB관련SQL문.sql | UTF-8 | 12,644 | 3.125 | 3 | [] | no_license | -- -----------------------------------------------------
-- Schema happyhouse
-- -----------------------------------------------------
CREATE SCHEMA IF NOT EXISTS `happyhouse` DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci ;
USE `happyhouse` ;
-- -----------------------------------------------------
-- Table... | true |
229ee58a75ec3532c5c51dc7cf66d7238f989c0a | SQL | JuanOlivares1/holbertonschool-web_back_end | /0x0C-MySQL_Advanced/5-valid_email.sql | UTF-8 | 282 | 3.265625 | 3 | [] | no_license | -- Resets valid_email when email has been updated
DROP TRIGGER IF EXISTS updateEmail;
DELIMITER ;$
CREATE TRIGGER updateEmail BEFORE UPDATE ON users
FOR EACH ROW
BEGIN
IF NEW.email <> OLD.email
THEN
SET NEW.valid_email = 0;
END IF ;
END;
;$
DELIMITER ;
| true |
f703bd50eaff91fc9c1631a6999bf724871a4bee | SQL | chege-maina/php-loans | /database/qubesco1_loans.sql | UTF-8 | 98,795 | 3.15625 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.9.5
-- https://www.phpmyadmin.net/
--
-- Host: localhost:3306
-- Generation Time: Apr 23, 2021 at 08:59 AM
-- Server version: 5.7.34
-- PHP Version: 7.3.26
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CH... | true |
3aafb50f0938d5d2536c1bb2ea586c408ec06e21 | SQL | mtanco/teradata-16.20-features-demo | /in_db_operators/2_nPath_examples.sql | UTF-8 | 2,327 | 3.78125 | 4 | [] | no_license | /* Michelle Tanco - 05/16/2018
* 2_nPath_examples.sql
*
* looking at some paths and patterns in the data
* */
--for each customer, get their full page path
select *
from nPath (
on retail_sessions
partition by customerid, sessionid
order by tstamp
using
mode(nonoverlapping)
pattern('EVRY*')
symbols(TR... | true |
9adecdabf6b5c7294baaea3fdab5b9449fddafb4 | SQL | microsoft/Nonprofit_Data_Warehouse_Quickstart | /NonprofitDataWarehouseQuickstart/Warehouse/Warehouse/Persisted/Tables/Persisted.Sanitation.sql | UTF-8 | 886 | 2.75 | 3 | [
"MIT"
] | permissive | -- Copyright (c) Microsoft Corporation.
-- Licensed under the MIT License.
CREATE TABLE [Persisted].[Sanitation]
(
[SanitationKey] INT NOT NULL,
[SanitationChangeHash] BINARY(32) NOT NULL,
[GhoCode] NVARCHAR(100) NULL,
[GhoDisplay] NVARCHAR(100) NULL,
[GhoUrl] NVARCHAR(100) NULL,
[PublishS... | true |
a3c91b29b284edc31e934482fa28e8af3b0c1847 | SQL | xuechengcheng1104/xuechengcheng1104.github.io | /trunk/script/07_MySQL.sql | UTF-8 | 4,678 | 2.59375 | 3 | [] | no_license | #-------------------------------------------------
# mysql 更新数据保护disable
#-------------------------------------------------
MySQL Workbench / Edit / Preference / SQL Queries / unselect "Safe Updates", Forbid ...
and reconnect
#-------------------------------------------------
# 删除字段
#---------------------... | true |
0e3f983d3ad5b2e38b1093fe4cb0fac65e3f1270 | SQL | ClasseANet/VBProject | /Projeto3R/Script/Consultas/SysConsulta-Campos Identity.sql | UTF-8 | 282 | 3.375 | 3 | [] | no_license | SELECT IDENT_SEED(TABLE_NAME) AS Seed,
IDENT_INCR(TABLE_NAME) AS Increment,
IDENT_CURRENT(TABLE_NAME) AS Current_Identity, TABLE_NAME
FROM INFORMATION_SCHEMA.TABLES
WHERE OBJECTPROPERTY(OBJECT_ID(TABLE_NAME), 'TableHasIdentity') = 1
AND TABLE_TYPE = 'BASE TABLE'
ORDER BY TABLE_NAME | true |
b7ef35ac7853e96a7884383c94c141a3e6cf09d4 | SQL | ignacio29/SARE | /backup/DBsare-ultimaversion.sql | UTF-8 | 4,441 | 3.375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.6.5.2
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Generation Time: Aug 31, 2017 at 04:51 p.m.
-- 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_S... | true |
e994b1fed7a2ec5ff19260b3f77e24bb8dc3e028 | SQL | mbabeysekera/Java-Tutorials-JDBC-and-DAO-Design-Pattern-Example-With-SQL | /sql_student.sql | UTF-8 | 1,872 | 3.765625 | 4 | [] | no_license | DROP DATABASE IF EXISTS sql_students;
CREATE DATABASE sql_students;
USE sql_students;
CREATE TABLE students (
indexNo INT NOT NULL AUTO_INCREMENT,
std_firstname VARCHAR(50) NOT NULL,
std_secondname VARCHAR(50) NOT NULL,
std_marks INT(5) NOT NULL,
PRIMARY KEY (indexNo)
);
INSERT INTO students VALUES (... | true |
308f77b769cea7af4053fd7cf8d558439a0652d1 | SQL | juggernaut0/auth | /dbmigrate/src/main/resources/db/migration/V1__init.sql | UTF-8 | 677 | 3.53125 | 4 | [] | no_license | CREATE TABLE auth_user (
id uuid UNIQUE PRIMARY KEY,
email text UNIQUE NOT NULL,
provider text
);
CREATE TABLE user_pass (
id uuid UNIQUE PRIMARY KEY,
auth_user_id uuid UNIQUE NOT NULL REFERENCES auth_user(id),
hashed_pass text NOT NULL
);
CREATE INDEX user_pass_auth_user_id_idx ON user_pass(au... | true |
4faa066b9e6bdd34d51585daa49d9718df8ca1f3 | SQL | Francisco-Escobedo/Database_Exercises | /where_exercises.sql | UTF-8 | 786 | 3.453125 | 3 | [] | no_license | USE employees;
SELECT emp_no, first_name, last_name, gender
FROM employees
WHERE first_name IN ('Irena', 'Vidya', 'Maya')
AND gender = 'M';
SELECT emp_no, first_name, last_name
FROM employees
WHERE last_name LIKE 'E%'
OR LIKE '%E';
SELECT emp_no, first_name, last_name
FROM employees
WHERE last_name LIKE 'E%'
AN... | true |
d6b32ec9a5a5e831a8202782a5ddd4ba1a980b5f | SQL | AbdulHK/FYPAPI | /Creates.sql | UTF-8 | 4,730 | 3.78125 | 4 | [] | no_license | drop trigger rate;
drop trigger mapping;
drop table Menu;
drop table Review;
drop table Users;
drop table Numbers;
drop table Hours;
drop table Restaurant;
CREATE TABLE Users
(
id int AUTO_INCREMENT PRIMARY KEY,
username varchar(32) unique,
password_hash varchar(512),
address varchar(128),
firstname varchar(32),
las... | true |
84a3215bb3b1a0bbe5ce25ed10aaf9a375d230e9 | SQL | elongton/hasura_vue_practice | /hasura/migrations/default/1632251964830_init/up.sql | UTF-8 | 679 | 3.609375 | 4 | [
"MIT"
] | permissive | SET check_function_bodies = false;
CREATE TABLE public.posts (
id integer NOT NULL,
user_id integer NOT NULL,
text text NOT NULL,
image_url text NOT NULL
);
CREATE SEQUENCE public.posts_id_seq
AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER SEQUENCE ... | true |
a6e5eb98c47a6dc0242186877c134fbe6cffe7f7 | SQL | guilherme-alves-silve/spaced-repetition-app-graphile | /migrations/sqls/20211115061207-create-table-person-account-up.sql | UTF-8 | 296 | 3.046875 | 3 | [] | no_license | CREATE TABLE learn_private.person_account (
person_id INTEGER PRIMARY KEY REFERENCES learn.person(id) ON DELETE CASCADE,
email TEXT NOT NULL UNIQUE CHECK (email ~* '^.+@.+\..+$'),
password_hash TEXT NOT NULL
);
CREATE INDEX person_account_email_idx ON learn_private.person_account(email);
| true |
d329756acbd66df3308591e52241cc0f4ecd3dbf | SQL | atifdelibasic/Baze_Podataka_II | /Baze Podataka II- Ispiti/19.09.2019/19.09.2019.sql | UTF-8 | 9,973 | 4 | 4 | [] | no_license | --1. Kreiranje baze i tabela
/*
a) Kreirati bazu pod vlastitim brojem indeksa.
*/
CREATE DATABASE [19_09_2019]
USE [19_09_2019]
--b) Kreiranje tabela.
/*
Prilikom kreiranja tabela voditi računa o međusobnom odnosu između tabela.
I. Kreirati tabelu kreditna sljedeće strukture:
- kreditnaID - cjelobrojna vrijednost,... | true |
a15b9a3c38681a891f5de5267c04bc584d030d99 | SQL | yang20210404/e-commerce | /init2.sql | UTF-8 | 12,898 | 3.59375 | 4 | [] | no_license | CREATE TABLE `cart_items` (
`id` int(11) NOT NULL,
`product_id` int(11) NOT NULL,
`quantity` int(2) NOT NULL,
`created_by` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- --------------... | true |
ecdf4107e6ba1038d167cbfae1abd5cfc08a4f2a | SQL | Fateasstring/EB-SQL | /SQLfiles/customer_login_log.sql | UTF-8 | 2,233 | 4.0625 | 4 | [] | no_license | -- CREATE table customer_login_log(
-- login_id int UNSIGNED not null AUTO_INCREMENT COMMENT '登录日志id',
-- customer_id int UNSIGNED NOT null COMMENT '登录用户id',
-- login_time timestamp not null COMMENT '用户登录时间',
-- login_ip int UNSIGNED not null COMMENT '登录ip',
-- login_type TINYINT not null COMMENT '登录类型:0.未成功,1.成功'... | true |
21a0806e4f5bfdab41f956e49912c1c609d4e89d | SQL | tscully49/Movie-Trends | /test.sql | UTF-8 | 3,474 | 4.5625 | 5 | [
"MIT"
] | permissive | DROP SCHEMA IF EXISTS test CASCADE;
CREATE SCHEMA test;
SET search_path = test;
CREATE TABLE movie(
id serial PRIMARY KEY,
title varchar(25),
genre varchar(15),
year integer,
rating integer
);
CREATE TABLE actor(
id serial PRIMARY KEY,
name varchar(30)
);
CREATE TABLE actor_in_movie(
actor_id integer REFER... | true |
11d6d6589a88de496c5e16db522ef4608ff4b5e7 | SQL | fffy2366/isolating-the-domain | /src/main/resources/schema.sql | UTF-8 | 594 | 3.453125 | 3 | [] | no_license | DROP SCHEMA IF EXISTS USERS;
CREATE SCHEMA USERS;
DROP TABLE IF EXISTS USERS.USERS;
CREATE TABLE USERS.USERS (
USER_ID VARCHAR(255) PRIMARY KEY,
NAME VARCHAR(40) NOT NULL,
PASSWORD CHAR(60) NOT NULL,
BIRTH_DATE DATE,
PHONE_NUMBER VARCHAR(13)
);
COMMENT ON TABLE USERS.USERS IS '利用者';
COMMENT ON COLUMN USERS... | true |
93f957d3f9636ad16b9fde783aff85305d1b37f0 | SQL | dandraden/Database-Scripts | /Oracle/sql/_tel2.SQL | UTF-8 | 667 | 3.265625 | 3 | [] | no_license | set verify off
ACCEPT NOME CHAR PROMPT 'ENTRE COM O NOME DA PESSOA: '
SELECT emp_numero_matricula,emp_uor_codigo_lotacao
, SUBSTR(EMP_QFU_FUNCAO,1,DECODE(INSTR(EMP_QFU_FUNCAO,' '),0,100
,INSTR(EMP_QFU_FUNCAO,' '))) AS EMP_QFU_FUNCAO
,EMP_NOME_ABREVIADO || decode('"' || EMP_NOME_GUERRA ||'"','""','',' - "' || EMP... | true |
ad799020d60386935484b41577f9e3dd88fa57e8 | SQL | Tsoy777/mysql_homework | /hw2.sql | WINDOWS-1251 | 1,030 | 3.328125 | 3 | [] | no_license | -- example, users,
-- , id name.
create database example;
use example;
create table users(
id serial primary key,
name varchar(255)
)
-- example ,
-- sample.
mysqldump example > "D:sample.sql"
--( )
-- mysqldump.
--help_keyword mysql. ,
-- 100 .
... | true |
815c7631ecfe3cd340ae5396fe09f0d1eb7e820b | SQL | slobodandeveloper/nesproject | /games.sql | UTF-8 | 6,994 | 3.125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.9.4
-- https://www.phpmyadmin.net/
--
-- Host: localhost:3306
-- Generation Time: Jan 20, 2021 at 02:18 PM
-- Server version: 10.2.36-MariaDB-log
-- PHP Version: 7.3.6
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101... | true |
f9daee63051f9c42101126b2cc90f95918156523 | SQL | dnagykrisztina/DBDevOps | /dbForge-MySQL/Scripts/Tables/Countries.sql | UTF-8 | 445 | 3.59375 | 4 | [] | no_license | CREATE TABLE Countries (
CountryID INT NOT NULL,
CountryName VARCHAR(20) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
Continent INT DEFAULT NULL,
PRIMARY KEY (CountryID)
)
ENGINE = INNODB,
AVG_ROW_LENGTH = 1092,
CHARACTER SET utf8mb4,
COLLATE utf8mb4_0900_ai_ci,
ROW_FORMAT = DYNAMIC;
A... | true |
83198edab02e4d38d21d9aea17cca46533c33156 | SQL | gridky/pyris | /pyris/api/queries/iris_logement_area.sql | UTF-8 | 477 | 3 | 3 | [
"BSD-3-Clause"
] | permissive | -- About housing data by area
SELECT
iris
,com AS citycode
,libcom as city
,libiris as label
,p13_rp_m30m2 as main_residence_30m2 -- less than 30m2
,p13_rp_3040m2 as main_residence_30_40m2
,p13_rp_4060m2 as main_residence_40_60m2
,p13_rp_6080m2 as main_residence_60_80m2
,p13_rp_80100m2 as main_reside... | true |
d6fbe0fc14320b7f9f518ba12f7aff0b4472f093 | SQL | PNNL-Comp-Mass-Spec/DBSchema_PgSQL_DMS | /dms/v_requested_run_fraction_entry.sql | UTF-8 | 1,705 | 3.4375 | 3 | [
"Apache-2.0"
] | permissive | --
-- Name: v_requested_run_fraction_entry; Type: VIEW; Schema: public; Owner: d3l243
--
CREATE VIEW public.v_requested_run_fraction_entry AS
SELECT rr.request_id AS source_request_id,
rr.request_name AS source_request_name,
e.experiment,
rr.instrument_group,
dtn.dataset_type AS run_type,
... | true |
e511a72d4ab6d5a3635610f77f3006768a13d043 | SQL | avalderramajaramillo/sgsst | /_Documentación/ScriptInicialDatos.sql | UTF-8 | 52,133 | 3.25 | 3 | [] | no_license | -- 18/01/2016
-- Carga Inicial de Tablas de BD
-- sg_sst
-- phpMyAdmin SQL Dump
-- version 4.0.10deb1
-- http://www.phpmyadmin.net
--
-- Servidor: 127.0.0.1
-- Tiempo de generación: 21-01-2016 a las 00:35:52
-- Versión del servidor: 5.5.46-0ubuntu0.14.04.2
-- Versión de PHP: 5.5.9-1ubuntu4.14
SET SQL_MODE = "NO_AUTO... | true |
f97cac4907ce6772bb04822f6934ef860936e7b8 | SQL | LameckVieira/2021-1S-2D | /Senai/sprint-1-bd/sala-invertida/manha/triggers/material_de_apoio/exemplo_ conceito/verificar_existencia_de_trigger.sql | ISO-8859-1 | 270 | 2.625 | 3 | [] | no_license | --VERIFICAR EXISTNCIA DE TRIGGERS
--NUMA TABELA ESPECFICA
EXEC sp_helptrigger @tabname = Produtos;
--NO BANCO DE DADOS TODO
USE Aula_Trigger
SELECT [name], is_disabled FROM sys.triggers
WHERE is_disabled = 1 or is_disabled = 0;
--0 = Habilitado
--1 = Desabilitado | true |
19db71ed454c305255b5724171175166083b98de | SQL | mahitha863/SQL_Projects | /MIind_Modelling/Create_Final.sql | UTF-8 | 8,478 | 3.71875 | 4 | [] | no_license | -- Script to create Database Brain
DROP DATABASE IF EXISTS Brain;
CREATE DATABASE Brain;
Use Brain;
-- Table for address of the user
CREATE TABLE `Address` (
AddressID int NOT NULL AUTO_INCREMENT,
address varchar(255) NOT NULL DEFAULT '',
address2 varchar(255),
city varchar(255),
state varchar(255),
zip int,
PRIMARY ... | true |
dc08521d62da984ca73cc9a1b8a1c97e07bd4252 | SQL | Zorgatone/memegen | /Sql716294_2.sql | UTF-8 | 3,162 | 3.8125 | 4 | [] | no_license | SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0;
SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0;
SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='TRADITIONAL,ALLOW_INVALID_DATES';
CREATE SCHEMA IF NOT EXISTS `Sql716294_2` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci ;
USE `Sql716294_2` ;
... | true |
0b22077348c34b6827fd2d193225a9142a4448f1 | SQL | alexaugusto23/Projeto-SQL---AC1-LMS | /AULA 27032020.sql | UTF-8 | 671 | 3.328125 | 3 | [] | no_license | CREATE TABLE TB_SUBCATEGORIA
(
ID_SUBCATEGORIA TINYINT PRIMARY KEY IDENTITY,
NM_SUBCATEGORIA VARCHAR(50) NOT NULL UNIQUE
);
CREATE TABLE TB_IDIOMA
(
ID_IDIOMA TINYINT PRIMARY KEY,
NM_IDIOMA VARCHAR(50) NOT NULL UNIQUE
);
CREATE TABLE TB_LIVRO
(
ISBN INT PRIMARY KEY,
NM_TITULO VARCHAR(100),
NM_AUTOR VARCHAR(100),
VL_L... | true |
7a39736aa3e60a8748b05ee647147a0951beff81 | SQL | capsocrates/hs-online-v2 | /hs_online_data.sql | UTF-8 | 7,401 | 3.0625 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.0.10.18
-- https://www.phpmyadmin.net
--
-- Host: localhost:3306
-- Generation Time: Jul 02, 2018 at 04:21 PM
-- Server version: 5.6.39-cll-lve
-- PHP Version: 5.6.30
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACT... | true |
d13977173e328ff23704a105aff142ac135ef504 | SQL | luisroel/soccersoft | /dbobjects/MySQL/Stats/spStats_Get_HomeLiveStanding.sql | UTF-8 | 2,120 | 4.125 | 4 | [] | no_license | --
-- Live Home Standing Clasification
--
DROP PROCEDURE IF EXISTS spStats_Get_HomeLiveStanding;
DELIMITER $$
CREATE PROCEDURE spStats_Get_HomeLiveStanding(
IN SeasonId_p BIGINT
, IN PhaseId_p BIGINT
, IN CutoffDate_p DATETIME
)
BEGIN
-- sp live standing
SET @row_number:=0;
SELECT
@row_number:=@r... | true |
7f01ca2e632bffe474c82445c634a2bba8b13188 | SQL | paradoxical-io/cassieq | /db/scripts/01_cassandra_queue.cql | UTF-8 | 1,227 | 3.21875 | 3 | [
"MIT"
] | permissive | CREATE TABLE queue (
account_name text,
queuename text,
queue_stats_id text,
bucket_size int,
max_delivery_count int,
status int,
repair_worker_poll_freq_seconds int,
repair_worker_tombstone_bucket_timeout_seconds int,
delete_buckets_after_finalization boolean,
dlq_queue_name text,
version int,
... | true |
d2dd40f8360936ef40a597b53311c53807dff153 | SQL | kimkunha/ORACLE | /PL1102/test_table2.sql | UHC | 1,663 | 3.640625 | 4 | [] | no_license | -- Record table
set serveroutput on
-- class4 л ȣ, ̸, Ŭ óϴ PL/SQL
declare
-- л record
type stu_record is record(num number, name varchar2(30),
oracle_score number(3));
-- л tabel
type stu_table is table of stu_record
index by binary_integer;
-- table л ó
... | true |
aa0b477bd36e167afdc787c46099f1b7c1d5cdf8 | SQL | capitallatera/Assignments | /SQL/SQLQuery7(Inventory).sql | UTF-8 | 1,238 | 3.265625 | 3 | [
"Apache-2.0"
] | permissive | CREATE DATABASE INVENTORY;
USE INVENTORY;
CREATE TABLE CUST
(CID CHAR(5) PRIMARY KEY,
CNAME VARCHAR(20) NOT NULL,
ADDRES VARCHAR(30) NOT NULL,
CITY VARCHAR(20) NOT NULL,
PHONE VARCHAR(10) NOT NULL,
EMAIL VARCHAR(30) NOT NULL,
DOB DATE CHECK (DOB<'01-JAN-1995')
);
CREATE TABLE PRODUCT
(PID CHAR(5) P... | true |
f3bea6c03ea3df2a91ccd59f746840ba86d9c5e3 | SQL | jgarzonext/plsql-testing | /script_plsql/bd_iaxis/script/disparadores/TRG_PER_LOPD_CESTADO.sql | UTF-8 | 706 | 2.953125 | 3 | [] | no_license | --------------------------------------------------------
-- DDL for Trigger TRG_PER_LOPD_CESTADO
--------------------------------------------------------
CREATE OR REPLACE EDITIONABLE TRIGGER "AXIS"."TRG_PER_LOPD_CESTADO"
BEFORE UPDATE OF cestado
ON per_lopd
FOR EACH ROW
DECLARE
vnorden hisper_l... | true |
f888e85582547e087c46dfa799503ffbfabb3f4c | SQL | franelcampico/AD | /NBA.sql | UTF-8 | 1,298,867 | 3.09375 | 3 | [
"CC0-1.0"
] | permissive | create database nba;
use nba;
CREATE TABLE equipos (
Nombre varchar(20) NOT NULL,
Ciudad varchar(20) DEFAULT NULL,
Conferencia varchar(4) DEFAULT NULL,
Division varchar(9) DEFAULT NULL,
PRIMARY KEY (Nombre)
)engine=innodb;
INSERT INTO equipos VALUES ('Celtics','Boston','East','Atlantic');
INSERT INTO equipos ... | true |
c05776b400acad4988a96706dbfec25e03b2c866 | SQL | Ivangv94/examen | /examenesWeb/DBScripts/Database2_191031_132435.sql | UTF-8 | 1,643 | 3.578125 | 4 | [] | no_license | -- examenes [ent6]
create table "EXPEDIENTE"."EXAMENES" (
"OID" number(10,0) not null,
"FECHACREACION" timestamp,
"NOMBRE" varchar2(255 char),
primary key ("OID")
);
-- aspirante [ent7]
create table "EXPEDIENTE"."ASPIRANTE" (
"USER_OID" number(19,0) not null,
"OID" number(10,0) not null,
"... | true |
828b1effb029b9a02216ca091f0918df31b6cb9f | SQL | lucas-pessoa/LabBD-2017 | /procedures.sql | UTF-8 | 16,354 | 3.46875 | 3 | [] | no_license | DELIMITER $$
CREATE PROCEDURE insere_cuidaCompleto (IN p_cpf CHAR(11),IN p_idCuidador INTEGER,IN p_periodicidade CHAR(20),
IN p_local_cuida CHAR(20),
IN p_inicio TIME, IN p_termino TIME,IN p_descricao CHAR(250))
BEGIN
INSERT INTO Cuida (cpf,idCuidador, periodicidade,local_cuida) VALUES (p_cpf, p_idCuidador, p_periodic... | true |
b63eb956e3a588d79b0f5df336605e1202529035 | SQL | johnjyin/One-C-Sharp-App-RockShop | /doc/ICAPRG504A Deploy application to production/rockshop database backup.sql | UTF-8 | 2,707 | 3.53125 | 4 | [] | no_license | /*
SQLyog Community v10.41
MySQL - 5.5.27 : Database - rockshop
*********************************************************************
*/
/*!40101 SET NAMES utf8 */;
/*!40101 SET SQL_MODE=''*/;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOR... | true |
4abfc093752e9f300eed3ccdf558441642baaf99 | SQL | radtek/abs3 | /sql/mmfo/bars/Table/err$_cc_refv.sql | UTF-8 | 1,859 | 2.921875 | 3 | [] | no_license |
PROMPT =====================================================================================
PROMPT *** Run *** ========== Scripts /Sql/BARS/Table/ERR$_CC_REFV.sql =========*** Run ***
PROMPT =====================================================================================
PROMPT *** ALTER_POLICY_INFO... | true |
fa109e19d8588a4b1b87ecf2621cdd2ceef8f6c4 | SQL | Vulnerator/Vulnerator | /Resources/DdlFiles/Tables/Create/ReportFindingTypeUserSettings.ddl | UTF-8 | 505 | 3.53125 | 4 | [
"CC-BY-SA-3.0",
"CC-BY-ND-3.0",
"LicenseRef-scancode-unknown-license-reference",
"LicenseRef-scancode-proprietary-license",
"MIT"
] | permissive | CREATE TABLE IF NOT EXISTS ReportFindingTypeUserSettings (
ReportFindingTypeUserSettings_ID INTEGER PRIMARY KEY ,
RequiredReport_ID INTEGER NOT NULL,
FindingType_ID INTEGER NOT NULL,
UserName NVARCHAR (50) NOT NULL,
IsSelected NVARCHAR (5) NOT NULL,
FOREIGN KEY (RequiredReport_ID) REFERENCES Req... | true |
806274c95737a4690065122a0a7d3b10f1091917 | SQL | msyahalfikri/UAS-PW-KOM-B | /login.sql | UTF-8 | 1,989 | 3.125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 5.0.3
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Jun 11, 2021 at 06:03 AM
-- Server version: 10.4.14-MariaDB
-- PHP Version: 7.2.34
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIE... | true |
92b7bdadd9eba1f0894b6bda96bbc113f05ecf8a | SQL | pasaribuivan/EPL | /kuskus-master/mysql/yzjvincb_kuskus.sql | UTF-8 | 13,194 | 3.328125 | 3 | [] | no_license | /*
SQLyog Community v12.4.1 (64 bit)
MySQL - 10.1.21-MariaDB : Database - yzjvincb_kuskus
*********************************************************************
*/
/*!40101 SET NAMES utf8 */;
/*!40101 SET SQL_MODE=''*/;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY... | true |
3496b993a0e42cb32cff78104c97671b7dd9136b | SQL | 3kybika/DB_Project | /db-project/src/main/resources/db/migration/V2__indexes.sql | UTF-8 | 1,390 | 4.03125 | 4 | [] | no_license | --users:
DROP INDEX IF EXISTS users_id_to_nickname_idx;
CREATE INDEX IF NOT EXISTS users_id_to_nickname_idx ON users (id, nickname DESC);
DROP INDEX IF EXISTS users_nickname;
CREATE INDEX users_nickname ON users(nickname, id);
DROP INDEX IF EXISTS users_cluster_idx ;
CREATE INDEX users_cluster_idx ON users (id, nic... | true |
42f0f50a7b318d648359b305f8782f26163f1340 | SQL | BondalaVamshi/SQLSamples | /Joins/SelfJoin.sql | UTF-8 | 244 | 3.03125 | 3 | [] | no_license | create table EmpY
(
EmpNo int PRimary key,
EName varchar(30) not null,
Mgr int
);
insert into EmpY values
(1,'a',NUll),
(2,'b',1),
(3,'c',1),
(4,'d',2),
(5,'e',3)
select X.EName ,Y.EName as mgr
from EmpY as x,EmpY as Y
where X.Mgr=Y.EmpNo | true |
47b65aeccbafe7c76e7cb61259268c700be6f8e9 | SQL | juanlvo/plsql-course | /S16L130.sql | UTF-8 | 859 | 3.015625 | 3 | [] | no_license | DROP TABLE t;
CREATE TABLE t (
test_value VARCHAR2(25));
CREATE OR REPLACE PROCEDURE child_block IS
BEGIN
INSERT INTO t(test_value) VALUES ('Child block insert');
COMMIT;
END child_block;
CREATE OR REPLACE PROCEDURE parent_block IS
BEGIN
INSERT INTO t(test_value) VALUES('Parent block insert');
child_block;
... | true |
37327e91accf1e5f5d191b2e0e4846e496397d4f | SQL | rajats/sql-mini-course | /moviequery.sql | UTF-8 | 3,748 | 4.8125 | 5 | [] | no_license | /*credits: stanford university*/
/* sql movie rating and query exercise
description:
You've started a new movie-rating website, and you've been collecting data on reviewers' ratings of various movies. There's not much data yet, but you can still try out some interesting queries. Here's the schema:
Movie ( mID, title,... | true |
c7ed790ee6d67a7cfd1026ab58e8bc1cad073957 | SQL | JumbaZz/web_lab2 | /disk.sql | UTF-8 | 3,328 | 3.796875 | 4 | [] | no_license |
/*==============================================================*/
/* Table: List_of_posts */
/*==============================================================*/
create table List_of_posts (
User_ID INT4 not null,
Post_ID INT4 ... | true |
8a4bae72bdfdd2446f8cff9ef52ade8333e26e96 | SQL | TheRightJoin/TPCupon2019 | /provMaxDesc.sql | UTF-8 | 506 | 3.40625 | 3 | [] | no_license | create function THE_RIGHT_JOIN.provMaxDesc(@semestre date)
returns table
as
return (select top 5 Provee_RS, Provee_Dom, Provee_Rubro,Provee_CUIT,sum(Oferta_Precio)*100/sum(Oferta_Precio_Ficticio) porcentaje
from THE_RIGHT_JOIN.Oferta join THE_RIGHT_JOIN.Proveedor on Oferta_CUIT = Proveedor.Provee_CUIT
where Oferta_Fech... | true |
426ba59159d1a64d044e76b02d944d5e953c4dac | SQL | gabmor38/BootcampX | /4_queries/Total_Student_Assistance_Requests.sql | UTF-8 | 200 | 3.609375 | 4 | [] | no_license | Select count(assistance_requests.teacher_id) as Total_assitances, students.name as name
FROM assistance_requests
JOIN students ON students.id = student_id
WHERE name = 'Elliot Dickinson'
GROUP BY students.name; | true |
9c4be5b6ea0156f983fd944141d7647cd064b24d | SQL | yuchun921/SQL50 | /25.sql | BIG5 | 255 | 4.09375 | 4 | [] | no_license | /* dߦU즨ZeTWO */
SELECT * FROM (
SELECT s.s_id, s.s_name, sc.c_id, sc.s_score, ROW_NUMBER() OVER(PARTITION BY sc.c_id ORDER BY sc.s_score DESC) AS [RANK]
FROM student s JOIN score sc ON s.s_id =sc.s_id ) AS SUB
WHERE [RANK] < 4 | true |
302363e9d26ab0e7d33f0ad00f106a83eb251ae4 | SQL | kenny181920/Ingenieria-Software | /Proyecto V1/university.sql | UTF-8 | 22,489 | 3.578125 | 4 | [] | no_license | -- MySQL dump 10.13 Distrib 5.7.30, for Linux (x86_64)
--
-- Host: localhost Database: university
-- ------------------------------------------------------
-- Server version 5.7.30-0ubuntu0.18.04.1
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER... | true |
1987293d0aaeaaf588fba2c9df5e8b05eca4da1c | SQL | fulkules/all-time-great | /db/profiles/get_profile.sql | UTF-8 | 233 | 3.25 | 3 | [] | no_license | -- select u.uid, u.username, u.avatar, sum(likes)
-- from Questions q
-- join Users u on u.uid = q.owner_id
-- where u.uid = $1
-- group by u.uid, u.username, u.avatar
SELECT uid, username, avatar, about
FROM users
WHERE uid = $1;
| true |
d8aed78865184df745ba8fbb585481f8a35e692b | SQL | alexbabkin/gb-databases | /bookshop/triggers.sql | UTF-8 | 619 | 3.546875 | 4 | [] | no_license | USE bookshop;
DROP TRIGGER IF EXISTS delete_old_promos;
DELIMITER //
CREATE TRIGGER delete_old_promos AFTER INSERT ON promos
FOR EACH ROW
BEGIN
DELETE FROM promos WHERE available_until < NOW();
END //
DROP TRIGGER IF EXISTS delete_book_from_marked_after_purchasing;
DELIMITER //
CREATE TRIGGER delete_book_from_marke... | true |
693b4c820202fbcdecab6927bf59f78cc41ec56d | SQL | Eloy23/Mis-Proyectos | /Uteach Web Page-Laravel/asesoria.sql | UTF-8 | 17,328 | 3.171875 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.9.0.1
-- https://www.phpmyadmin.net/
--
-- Servidor: 127.0.0.1
-- Tiempo de generación: 05-12-2019 a las 00:07:47
-- Versión del servidor: 10.3.15-MariaDB
-- Versión de PHP: 7.1.30
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00... | true |
6f1f123012d547480650bd721f873692f736cfa7 | SQL | maxvanny2010/job4j | /chapter_005/src/main/java/db/sql/products.sql | UTF-8 | 3,458 | 4.21875 | 4 | [
"Apache-2.0"
] | permissive | CREATE DATABASE product
ENCODING = 'UTF8'
;
create table type_product
(
id serial primary key,
name_type character varying(2000) NOT NULL
);
create table product
(
id_product serial primary key,
name_product character varying(2000) NOT NULL,
price integer ... | true |
05a2442d69a151184becb2294ab782b56c334865 | SQL | bitgittry/BaseCodeAnalysis | /trunk/dbv/stored_routines/StatisticsTopNWinningPlayers.sql | UTF-8 | 1,939 | 4.0625 | 4 | [] | no_license | DROP procedure IF EXISTS `StatisticsTopNWinningPlayers`;
DELIMITER $$
CREATE DEFINER=`bit8_admin`@`127.0.0.1` PROCEDURE `StatisticsTopNWinningPlayers`(minuteInterval INT, limitRows INT, currencyID BIGINT)
BEGIN
SET @dateFrom = SUBDATE(NOW(), INTERVAL minuteInterval MINUTE);
SET @dateTo = NOW();
SET @rowNum=0;... | true |
7b8cd5245e74c1316586fe449a3daff00be81403 | SQL | Xenozare/student-hub | /sistem_ruangan.sql | UTF-8 | 3,158 | 3.171875 | 3 | [
"MIT"
] | permissive | -- phpMyAdmin SQL Dump
-- version 4.7.9
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1:3306
-- Generation Time: Dec 27, 2018 at 03:32 AM
-- Server version: 5.7.21
-- PHP Version: 5.6.35
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CH... | true |
0fdcd8398f713656f2aa78c3dafa8c95b70adbf6 | SQL | StephenDever/Library-Management-System | /Question 1.sql | UTF-8 | 397 | 4.1875 | 4 | [] | no_license | /* How many copies of the book titled The Lost Tribe are owned by the library branch whose name
is"Sharpstown"? */
Select Library_Branch.BranchName, Book.Title, Book_Copies.No_Of_Copies
From Book_Copies
Join Book On (Book_Copies.BookID = Book.BookID)
Join Library_Branch on (Book_Copies.BranchID = Library_Branch.... | true |
5e2f1d76ecb95358b68cddb09666434a16aa076c | SQL | sonorisme/crypto | /bitcoin.sql | UTF-8 | 1,704 | 3.09375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.5.1
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: 2018-01-10 22:36:00
-- 服务器版本: 10.1.16-MariaDB
-- PHP Version: 7.0.9
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!401... | true |
7b638d1711b05affc78d4f8ef76d47a87412bc79 | SQL | Bravlin/Certificados | /cibercrimen.sql | UTF-8 | 2,754 | 2.84375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.6.6deb5
-- https://www.phpmyadmin.net/
--
-- Servidor: localhost:3306
-- Tiempo de generación: 09-11-2018 a las 17:30:14
-- Versión del servidor: 5.6.30-1-log
-- Versión de PHP: 7.2.9-1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_S... | true |
7dc561c4f06b1b5fb8d2f352ff8b432f2699ba6f | SQL | yuanjiaFang/Projet_LO07 | /projet_lo07.sql | UTF-8 | 9,477 | 3.046875 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.1.14
-- http://www.phpmyadmin.net
--
-- Client : 127.0.0.1
-- Généré le : Lun 26 Juin 2017 à 17:41
-- Version du serveur : 5.6.17
-- Version de PHP : 5.5.12
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET... | true |
8005844e2f064ffb9b19fb01674ce64f5d918bd5 | SQL | dlexPildas/reminder-me | /src/assets/database/dump.sql | UTF-8 | 264 | 2.5625 | 3 | [] | no_license |
CREATE TABLE IF NOT EXISTS reminderTable (
id INTEGER PRIMARY KEY AUTOINCREMENT,
reminderDate TEXT,
icon TEXT,
);
INSERT or IGNORE INTO reminderTable(id, reminderDate, [description], icon) VALUES (1, '029/08/2021 21:07', 'Inserir SQLite no app', 'happy');
| true |
12f5f1b588f611b2c0425a3770b746f26efd3ece | SQL | set-cra/hadpets | /serverForHadpets/hadpets.sql | UTF-8 | 415 | 2.9375 | 3 | [] | no_license | #编译脚本时的编码
SET NAMES UTF8;
DROP DATABASE hadpets;
#创建数据库
CREATE DATABASE hadpets CHARSET=UTF8;
#使用该数据库
use hadpets;
DROP TABLE IF EXISTS userlog ;
#创建用户账号密码编号表
CREATE TABLE userlog(
uid INT PRIMARY KEY AUTO_INCREMENT,#用户编号,自增
uname VARCHAR(12) NOT NULL,#用户账号,不为空
upwd VARCHAR(16) NOT NULL#用户密码,不为空
)
| true |
381866b05721069e2c09872909b145ac7c85b43a | SQL | CUBRID/cubrid-testcases | /sql/_01_object/_05_serial/_002_with_option/cases/1039.sql | UTF-8 | 272 | 2.765625 | 3 | [
"BSD-3-Clause"
] | permissive | -- [er]create serial using INCREMENT BY which value is 2 and MINVALUE which value is -999999999999999999999999999999999998
create serial ser1
INCREMENT BY 2
MINVALUE -999999999999999999999999999999999998;
select * from db_serial WHERE name='ser1';
drop serial ser1;
| true |
cf27f2009993cc4819352a6b846f5a18f631ccb5 | SQL | ArunKalahasti/CloudProcessing | /project/lib/database/create.sql | UTF-8 | 505 | 3.484375 | 3 | [
"MIT"
] | permissive | /*
CREATE DATABASE IF NOT EXISTS TOPAZ;
USE TOPAZ;
*/
DROP TABLE IF EXISTS IMAGE;
DROP TABLE IF EXISTS USER;
CREATE TABLE USER
(
usrname VARCHAR(50) NOT NULL,
passwrd VARCHAR(50) NOT NULL,
PRIMARY KEY (usrname)
);
CREATE TABLE IMAGE
(
fname VARCHAR(50) NOT NULL,
image BLOB NOT NULL,
edit CHAR DEFAULT 'N'... | true |
516e69d89a70ab7213e273c5518b8e61dc8a855a | SQL | Vitra-Veri-Bilimi-Bootcamp/Gozde_Gozutok | /patika/week1-sql/ödev7.sql | UTF-8 | 915 | 3.9375 | 4 | [] | no_license | --1-film tablosunda bulunan filmleri rating değerlerine göre gruplayınız.
SELECT rating FROM film
GROUP BY rating;
--2-film tablosunda bulunan filmleri replacement_cost sütununa göre grupladığımızda film sayısı 50 den fazla olan replacement_cost değerinive karşılık gelen film sayısını sıralayınız.
SELECT ... | true |
8dcc12b6c7e1c2faaadbfc1e98e8a5fa57594540 | SQL | MohamedMedina/SamDb | /com.idemia.sam.be.DB_Management/StoredProcedures/DeleteRequestSearch.Sql | UTF-8 | 176 | 2.640625 | 3 | [] | no_license |
CREATE PROCEDURE [Transactions].[DeleteRequestSearch]
(
@Id AS INT
)
AS
BEGIN
DELETE [Transactions].[RequestSearch]
WHERE (@Id IS NULL OR [RequestSearch].[Id] = @Id)
END
| true |
31e82af17040773dc38892ecf2107bc5853e3035 | SQL | heiweigou/IBL | /xampp/sstool.sql | UTF-8 | 5,172 | 3.03125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.8.0
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Jul 18, 2018 at 04:15 AM
-- Server version: 10.1.31-MariaDB
-- PHP Version: 7.2.4
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD... | true |
11255c7f061375f9b176c1950b0bf66340d9a110 | SQL | bloriot97/codebuff | /output/tsql_noisy/1.4.13/ex_GROUPBY.sql | UTF-8 | 1,242 | 3.625 | 4 | [
"BSD-2-Clause"
] | permissive |
INSERT INTO girl (name, hair, did_date) VALUES ('Azure', 'Brunette', 0) ;
INSERT INTO girl (name, hair, did_date) VALUES ('Sarah', 'Brunette', 1) ;
INSERT INTO girl (name, hair, did_date) VALUES ('Ashley', 'Brunette', 1) ;
INSERT INTO girl (name, hair, did_date) VALUES ('Heather', 'Blonde', ... | true |
6fad1413075dd8a60b7c4f6aa7fdd97375d063bd | SQL | ashwini075/DBT | /A10.sql | UTF-8 | 668 | 4.15625 | 4 | [] | no_license | #Assignment – 10
#Joining a Table to Itself.
#1) Write a query that produces all pairs of salespeople who are living in the same city. Exclude combinations of salespeople with themselves as well as duplicate rows with the order reversed.
select s1.sname,s2.sname,s1.city from salespeople s1,salespeople s2 where s1.cit... | true |
ea78eecf1b4f4611315baa696f625baf067c0501 | SQL | Kentucky94/minigram_with_frontend | /backend/src/main/resources/import.sql | UTF-8 | 5,182 | 3.796875 | 4 | [] | no_license | DROP TABLE IF EXISTS `subscriptions`;
DROP TABLE IF EXISTS `likes`;
DROP TABLE IF EXISTS `comments`;
DROP TABLE IF EXISTS `posts`;
DROP TABLE IF EXISTS `postImages`;
DROP TABLE IF EXISTS `users`;
-- CREATE TABLE `users` (
-- `id` varchar(45) NOT NULL UNIQUE,
-- `username` varchar(45) NOT NULL UNIQUE,
-- `passw... | true |
682c87a28240bf01f0fed1fd6534a6e182ea7a03 | SQL | dickanirwansyah/belajar-jpa-mapping | /spring-jpa-many-to-many/src/main/resources/migration/sql/skema.sql | UTF-8 | 673 | 4.1875 | 4 | [] | no_license | create table post(
id bigint(20) auto_increment,
content longtext not null,
description varchar(255) not null,
title varchar(255) not null unique,
posted_at datetime not null,
last_update_at datetime not null,
constraint pk_post_id primary key(id)
);
create table tag(
id bigint(20) aut... | true |
94a440b5206281e844c1e90b11bf13603316fc14 | SQL | mahmud83/Twitter_analysis | /SQL/Friendship_index_procedure.sql | UTF-8 | 2,200 | 4.4375 | 4 | [
"MIT"
] | permissive | CREATE DEFINER=`root`@`localhost` PROCEDURE `'__specify_db_name__'_friendship_index_calc`()
BEGIN
/**
This Stored Procedure will iterate as often as selected and create an index of importance for all users in the
database
The logic is that friendships will be collected for users based on three indicators:
1. Number ... | true |
c444ed5212715901f8f83ac5a7e18da29f624678 | SQL | silvianaho/Sem3 | /DENG/Topic D/createTablePrac1.sql | UTF-8 | 1,737 | 3.5625 | 4 | [] | no_license | --CREATE DATABASE BI_Prac_1_DW;
DROP TABLE IF EXISTS SalesFacts;
DROP TABLE IF EXISTS Customer;
DROP TABLE IF EXISTS Product;
DROP TABLE IF EXISTS Region;
DROP TABLE IF EXISTS Time;
DROP TABLE IF EXISTS Vendor;
CREATE TABLE Customer (
Customer_Key INT NOT NULL PRIMARY KEY,
Customer_Name NVARCHAR(255) NOT NULL,
Add... | true |
e5a31b2c7e60797255166230043b5f17b1b1f162 | SQL | sercanyuksel/ozulas-panel | /ozulas (1).sql | UTF-8 | 6,062 | 3.296875 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.6.5.2
-- https://www.phpmyadmin.net/
--
-- Anamakine: 127.0.0.1
-- Üretim Zamanı: 10 Eki 2017, 19:44:49
-- Sunucu sürümü: 10.1.21-MariaDB
-- PHP Sürümü: 7.1.1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_C... | true |
afaa94e007d1ba94e250dc12b3c55fc9b6a8b4d3 | SQL | Tareq-Nazari/storeBackend | /store2.sql | UTF-8 | 43,314 | 3.234375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.9.0.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Feb 16, 2021 at 03:59 PM
-- Server version: 10.4.6-MariaDB
-- PHP Version: 7.3.8
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OL... | true |
131ffac993b132816d7b4a88c2bb3a20344f9806 | SQL | aliciamaroulis/sql-scratch-capstone-turn-in | /WARBY PARKER - ALICIA MAROULIS/alicia_maroulis.code.sql | UTF-8 | 3,715 | 4.03125 | 4 | [] | no_license | SELECT *
FROM survey
LIMIT 10;
SELECT question, COUNT(user_id)
FROM survey
GROUP BY question;
SELECT *
FROM quiz
LIMIT 5;
SELECT *
FROM home_try_on
LIMIT 5;
SELECT *
FROM purchase
LIMIT 5;
SELECT *
FROM quiz
LEFT JOIN home_try_on
ON home_try_on.user_id = quiz.user_id
LEFT JOIN purchase... | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.