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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
cfdc1727a36fce7820dda32f31350d78561f5500 | SQL | linamandresy/parabole-madagascar-antsirabe | /data/schema.sql | UTF-8 | 3,066 | 3.578125 | 4 | [] | no_license | create table user(
userid integer primary key,
f_name text not null,
l_name text,
IDCard text not null,
phone text not null,
login text not null,
password text not null,
admin integer not null default 0 check(
admin = 0
or admin = 1
),
exported integer not null default 0 check(
exported = 0
or exporte... | true |
8c908e9f43f565ac89eb3f70257cb08fb8832041 | SQL | Marcos2k/TP-Inmobiliaria | /inmobiliaria.sql | UTF-8 | 4,304 | 3.109375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 3.3.9
-- http://www.phpmyadmin.net
--
-- Servidor: localhost
-- Tiempo de generación: 05-06-2012 a las 02:02:48
-- Versión del servidor: 5.5.8
-- Versión de PHP: 5.3.5
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SE... | true |
f549cc7556ab8ab952a87bdf41f91f2b9bbb81af | SQL | beyondlov1/JavaAttentions | /Demos/multiDataSourceDemos/multi-datasource-demos/src/main/resources/db/init.sql | UTF-8 | 567 | 2.640625 | 3 | [] | no_license | create database db_1;
use db_1;
create table user (
id char(32) primary key ,
username varchar(300),
password varchar(300)
);
insert into user (id, username, password)
values (replace(uuid(),'-',''),'username','password');
insert into user (id, username, password)
values (replace(uuid(),'-',''),'usern... | true |
7532189bc58443813cbcdb4518c98e9c9281e9b8 | SQL | MariaCelinaJ/LBD | /estrutura.sql | UTF-8 | 33,699 | 3.4375 | 3 | [] | no_license |
CREATE SCHEMA imobiliaria;
SET search_path TO 'imobiliaria';
DROP TABLE IF EXISTS foto;
CREATE TABLE foto (
id SERIAL PRIMARY KEY NOT NULL ,
foto1 VARCHAR(250) DEFAULT NULL,
foto2 VARCHAR(250) DEFAULT NULL,
foto3 VARCHAR(250) DEFAULT NULL,
UNIQUE(id)
);
INSERT INTO foto(id, foto1, foto2, foto3) VALUE... | true |
fdebbd19448d875a26ed55981b3f2bad18cb1abc | SQL | CableX88/Projects | /MYSQL/BRAINBUSTER 4.sql | UTF-8 | 213 | 3.484375 | 3 | [] | no_license | #BRAINBUSTER 4
SELECT
i.store_id as "Store ID", sum(p.amount) as Revenue
FROM
inventory i, payment p, rental r
WHERE
p.rental_id = r.rental_id
AND r.inventory_id = i.inventory_id
GROUP BY
1
ORDER BY
2 desc
; | true |
4e256c1d72709303a3e481fd02f438613a0334ba | SQL | magic8baller/trellone | /server/bin/sql/card.sql | UTF-8 | 224 | 2.8125 | 3 | [] | no_license | CREATE TABLE card(
id SERIAL PRIMARY KEY,
title VARCHAR(64),
order INTEGER,
list_id INTEGER REFERENCES list(id),
created_at TIMESTAMP WITHOUT TIME ZONE,
updated_at TIMESTAMP WITHOUT TIME ZONE
); | true |
e5ac8dafc77504fbf9be626163cfe54fd1fe982e | SQL | obeleh/pgqueries | /perf/database_sizes.sql | UTF-8 | 492 | 3.84375 | 4 | [] | no_license | SELECT
d.datname AS Name,
pg_catalog.pg_get_userbyid(d.datdba) AS Owner,
CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')
THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))
ELSE 'No Access'
END AS SIZE
FROM
pg_catalog.pg_database d
ORDER BY
CA... | true |
358122fac65f8801854be5109dac88529c5b2006 | SQL | Uncontainer/proto | /pulsarang/pulsarang-infra-admin/doc/schema_common.sql | UTF-8 | 4,258 | 2.953125 | 3 | [] | no_license | CREATE DATABASE me2config CHARACTER SET 'UTF8';
INSERT INTO db VALUES('%', 'me2config', 'me2dev', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y');
flush privileges;
--------------------------------------------------------------------
------------------------------- Admin ----------... | true |
c4dd47c358c9670400fddce1225dfbb56fd2fedf | SQL | moreaucle/projetbibli | /nouvellebase.sql | UTF-8 | 6,575 | 3.515625 | 4 | [] | no_license | -- MySQL Script generated by MySQL Workbench
-- lun. 16 avril 2018 10:38:15 CEST
-- Model: New Model Version: 1.0
-- MySQL Workbench Forward Engineering
SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0;
SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0;
SET @OLD_SQL_MODE=@@SQL_MODE, SQL_... | true |
a0ee347e261bb59e81a5ab40e4e6b9dfb15512f2 | SQL | kalintsenkov/SoftUni-Software-Engineering | /CSharp-DB/Databases-Basics/Homeworks/07FunctionsAndProcedures/08DeleteEmployeesAndDepartments.sql | UTF-8 | 706 | 3.5 | 4 | [
"MIT"
] | permissive | CREATE PROC usp_DeleteEmployeesFromDepartment (@departmentId INT)
AS
BEGIN
DELETE FROM EmployeesProjects
WHERE EmployeeID IN (
SELECT EmployeeID
FROM Employees
WHERE DepartmentID = @departmentId
)
UPDATE Employees
SET ManagerID = NULL
WHERE ManagerID IN (
SELECT EmployeeID
FROM Employees
... | true |
0983f970e719911c0693ddaf4fdedd4c4efe2098 | SQL | studentsVSU21/Agrin | /src/main/resources/db/migration/V1.4__add_table_region.sql | UTF-8 | 283 | 3.34375 | 3 | [] | no_license | create table region (
id BIGSERIAL NOT NULL,
name_region VARCHAR(255) NOT NULL,
constraint region_pk primary key (id)
);
alter table app_order add column region_id BIGINT;
alter table app_order add constraint region_id_fk foreign key (region_id) references region(id);
| true |
91df78d6c6afe73f8570d2c5353cf46a890aa510 | SQL | cloud4yourdata/CommunityEvents | /2018-2021/FPCloud/Samples/TimeTravel.sql | UTF-8 | 838 | 3.296875 | 3 | [] | no_license | --time traveling
USE CITIBIKE;
USE WAREHOUSE LABSMALL;
USE ROLE SYSADMIN;
--TIME TRAVELING
SELECT * FROM TRIPS LIMIT 100
UPDATE TRIPS SET START_STATION_NAME='EMPTY';
SELECT DISTINCT START_STATION_NAME FROM TRIPS
--UPDATE QUERY
SELECT * FROM TABLE (information_schema.query_history())
WHERE QUERY_TEXT LIKE 'UPDATE%E... | true |
dd16aee2ce3b6860cbde35845e1218fe30a71c61 | SQL | diogomazzoni/kanban | /solo/server/tmp/database-backups/db-backup-solo-20170516-022632.sql | UTF-8 | 16,090 | 3.3125 | 3 | [] | no_license | CREATE DATABASE IF NOT EXISTS solo;
USE solo;
DROP TABLE IF EXISTS activity;
CREATE TABLE `activity` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`project_id` int(11) NOT NULL,
`client_id` int(11) NOT NULL,
`object_type` varchar(20) NOT NULL,
`object_id` int(11) NOT NULL,
`user_id` int(11) NOT NULL,
`action... | true |
b251d4eeb89c13b2520bc7c2473107358c0737a8 | SQL | Bargamut/jaroflame | /www/database.sql | UTF-8 | 10,612 | 3.234375 | 3 | [] | no_license | -- --------------------------------------------------------
-- Хост: 127.0.0.1
-- Версия сервера: 5.5.37-log - MySQL Community Server (GPL)
-- ОС Сервера: Win32
-- HeidiSQL Версия: 8.3.0.4694
-- --------------------------------------------------------... | true |
dc171377d9840ee6fee3d2a1fec98322dfc5b495 | SQL | thangduong3010/PL-SQL | /opp6code/ch04_if02.sql | UTF-8 | 974 | 3.328125 | 3 | [] | no_license | /* This is an IF-THEN-ELSIF demonstration similar to that in
ch04_if01.sql, but this time we use < and > rather than BETWEEN
in order to eliminate any overlap between conditions. */
DECLARE
salary NUMBER := 20000;
employee_id NUMBER := 36325;
PROCEDURE give_bonus (emp_id IN NUMBER, bonus_amt IN NUMBER) IS
... | true |
640fad584491263f592819b5f894facd9168ea23 | SQL | bigtheo/school-cash-procedure-stockes | /Views/v_frais_mensuel.sql | UTF-8 | 277 | 3.203125 | 3 | [] | no_license | CREATE ALGORITHM=UNDEFINED DEFINER=CURRENT_USER
SQL SECURITY DEFINER VIEW `v_classe_frais_mensuel`
AS select `f`.`id` AS `id`,`c`.`nom` AS `nom`,`f`.`designation` AS `designation`,
`f`.`Montant` AS `montant` from frais_mensuel AS f
INNER JOIN classe as c On f.classe_id=c.id; | true |
056f9ae5edee4ee45f293e6700516f81cb93402b | SQL | Joshua-Ramos/groupProject | /SQL/populate.sql | UTF-8 | 3,616 | 3.015625 | 3 | [] | no_license | INSERT INTO User(First_Name, Last_Name, Username, Password, Email, Photo_Location)
VALUES("Amogh", "Jahagirdar", "AmoghUsername", "BcryptedAmoghPassword", "Amogh.Jahagirdar@Colorado.edu", "HashedAmoghPhotoLocationAWS");
INSERT INTO User(First_Name, Last_Name, Username, Password, Email, Photo_Location)
... | true |
8b9598636921338bde1849796dd5f948bb600aa6 | SQL | IlanaL1/Forefront-Forecasting | /create_tables.sql | UTF-8 | 7,052 | 3.5 | 4 | [] | no_license |
DROP TABLE "model";
CREATE COLUMN TABLE "model"(
DATE_ID DATE,
TOTAL DOUBLE
/*NUM_DAYS INTEGER,*/
/*START_YEAR DOUBLE*/
);
-- Create output table for actual values
DROP TABLE "actuals";
CREATE COLUMN TABLE "actuals" LIKE "model" WITH NO DATA;
-- Create output table for fitted model values
DROP TABLE "forecastFitted... | true |
7c1d4e137ce8c59389002761ee37c6f6511de219 | SQL | frmauro/ScriptsOracle | /aula30.sql | UTF-8 | 2,326 | 3.703125 | 4 | [] | no_license | SELECT * FROM tcontrato;
CREATE TABLE tcidade (
cod_cidade INTEGER NOT NULL,
nome VARCHAR2(40),
CONSTRAINT pk_cidade PRIMARY KEY(cod_cidade)
);
CREATE TABLE tbairro (
cod_cidade INTEGER NOT NULL,
cod_bairro INTEGER NOT NULL,
nome VARCHAR2(40),
CONSTRAINT pk_bairro PRIMARY KEY(cod_cidade,... | true |
2699304b58594550f5fe4b57d4917d921d47a33a | SQL | alsankhya/PraktikumWebB | /FP/db_perpus.sql | UTF-8 | 4,467 | 3.046875 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.9.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: May 30, 2020 at 04:00 PM
-- Server version: 10.4.8-MariaDB
-- PHP Version: 7.3.10
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD... | true |
043f57d4edfdad6c5c833c5af59a2facb7292cb0 | SQL | pucinsk/scripts | /create_tables.sql | UTF-8 | 482 | 2.84375 | 3 | [] | no_license | CREATE TABLE defects(
id NUMBER(5) NOT NULL,
name VARCHAR2(50) NOT NULL,
description VARCHAR2(254) NOT NULL,
CONSTRAINT pk_defects PRIMARY KEY(id));
CREATE TABLE defect_types(
id NUMBER(5) NOT NULL,
name VARCHAR2(50) NOT NULL,
description VARCHAR2(254) NOT NULL,
CONSTRAINT pk_defect_types PRIMARY KEY(id));
CREATE... | true |
58422513d6b9ac5bc0117b10606768d5aefc23fd | SQL | rjxky/negozio-dischi-project | /utenti.sql | UTF-8 | 1,519 | 2.921875 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Creato il: Giu 03, 2020 alle 19:36
-- Versione del server: 10.4.11-MariaDB
-- Versione PHP: 7.2.31
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIEN... | true |
c06728e5325e3707937e8e09baf7b1c1c5c80316 | SQL | alextarakanov/goip | /distrib/sql/asterisk.sql | UTF-8 | 4,097 | 2.703125 | 3 | [] | no_license | -- MySQL dump 10.13 Distrib 5.1.73, for unknown-linux-gnu (x86_64)
--
-- Host: localhost Database: asterisk
-- ------------------------------------------------------
-- Server version 5.1.73
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RE... | true |
c0e2098c6870c000feef9d77849d7592e00fcf47 | SQL | alexander-tolub/Phonebook | /src/main/resources/db/sql/create-db.sql | UTF-8 | 923 | 3.734375 | 4 | [] | no_license | CREATE TABLE PhoneNumber (
PhoneId INTEGER IDENTITY PRIMARY KEY,
PhoneType VARCHAR(30) NOT NULL,
PhoneNumber VARCHAR(30) NOT NULL,
Comment VARCHAR(30) NOT NULL
) ;
CREATE TABLE Customer (
CustomerId INTEGER IDENTITY PRIMARY KEY,
PhoneId INTEGER NOT NULL,
FirstName VARCHAR(30) NOT NULL,
LastName VARCHAR... | true |
b45758e82e249439ba2224e3bb8b9c828dfeaadc | SQL | jfifer/dataguy | /StoredProcedures/getOverallCustomerExtensionCounts.sql | UTF-8 | 3,323 | 3.3125 | 3 | [] | no_license | CREATE DEFINER=`root`@`localhost` PROCEDURE `getOverallCustomerExtensionCounts`(in_customerId INT, in_year INT)
BEGIN
DECLARE v_stdPrev,
v_std,
v_cloudPrev,
v_cloud,
v_sipPrev,
v_sip INT;
SELECT COUNT(e.extensionId)
INTO v_stdPrev
FROM extension e
LEFT JOIN branch b ON ... | true |
0e4993e377f565e4b73640d5552015e0b0ac89f7 | SQL | lwandoM/ProjKree | /Internal_Model_code.sql | UTF-8 | 5,574 | 3.546875 | 4 | [] | no_license | -- MySQL Workbench Forward Engineering
SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0;
SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0;
SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTI... | true |
c968d38d81b5eb9970a33a21f9705e3b47816b3c | SQL | Tsgzj/CS5200 | /database/ecom_schema.sql | UTF-8 | 10,423 | 3.375 | 3 | [] | no_license | -- MySQL dump 10.13 Distrib 5.5.46, for debian-linux-gnu (x86_64)
--
-- Host: localhost Database: ecom
-- ------------------------------------------------------
-- Server version 5.5.46-0ubuntu0.14.04.2
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHAR... | true |
6ad4e3778f37f04957536e3042f71af36770870f | SQL | blackhat97/Restapi | /db_scheme/main.sql | UTF-8 | 6,879 | 3.640625 | 4 | [] | no_license | -- MySQL dump 10.13 Distrib 5.7.28, for Linux (x86_64)
--
-- Host: localhost Database: main
-- ------------------------------------------------------
-- Server version 5.7.28
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!401... | true |
7c787dbbf27e2f2ca2889c9066e350e926dabb72 | SQL | the-karanshah/Database-Systems | /hw1/q3a.sql | UTF-8 | 489 | 3.59375 | 4 | [] | no_license | select year(transaction_date) ||
case
when (cast (month(transaction_date) as int) < 10)
then '0' || cast(month(transaction_date) as int)
else cast (month(transaction_date) as char(2))
end as yeardate,
decimal(sum(dosage_unit),31,2) as monthly_counts,
decimal(avg(sum(dosage_unit))
over (order by year(transaction_dat... | true |
e5475f2c17c2ad7e9da1daeb46236bc393239b35 | SQL | Mokumoku-Rin/RinRinRun | /db/migration/11-create_workout_histories.sql | UTF-8 | 510 | 2.640625 | 3 | [
"Apache-2.0"
] | permissive | CREATE TABLE IF NOT EXISTS `mokumoku`.`workout_histories` (
`id` INT unsigned NOT NULL AUTO_INCREMENT,
`user_id` VARCHAR(64) NOT NULL,
`course_id` INT unsigned NOT NULL,
`total_time` INT unsigned NOT NULL,
`total_distance` INT unsigned NOT NULL,
`time_list` TEXT NOT NULL,
`geo_linestring` GEOMETRY NOT NUL... | true |
63411c4318de71c8e70facfce05eb283be106f8a | SQL | zhangriqi/Hosipital-Mangement-System | /Server/HMS_DATABASE_db.sql | UTF-8 | 3,367 | 3.03125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.8.3
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Generation Time: Dec 17, 2018 at 04:00 AM
-- Server version: 10.1.37-MariaDB
-- PHP Version: 7.2.12
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OL... | true |
e6b57cb4eb80a764bdf7a0fa0c0c8e3ed902658c | SQL | HussainMurtaza53/Flask_Work | /Flask_App4/studio.sql | UTF-8 | 1,862 | 3.140625 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.8.5
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: May 01, 2019 at 08:26 PM
-- Server version: 10.1.38-MariaDB
-- PHP Version: 7.1.27
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OL... | true |
36422604f13b5c31672b0c57d471692eb24dd578 | SQL | DamianMrowinski/mortgage-form | /sql-scripts/initial-data-users.sql | UTF-8 | 1,035 | 3.578125 | 4 | [] | no_license | DROP DATABASE IF EXISTS `spring_security_demo_bcrypt`;
CREATE DATABASE IF NOT EXISTS `spring_security_demo_bcrypt`;
USE `spring_security_demo_bcrypt`;
DROP TABLE IF EXISTS `users`;
CREATE TABLE `users`
(
`username` varchar(30) NOT NULL,
`password` char(70) NOT NULL,
`enabled` tinyint(1) NOT NULL,
... | true |
f4bf4659d0613e41eb959ac4fea0b2951a7f4b03 | SQL | andreichayeuski/MTPinInternet_LAB | /Lab8/src/SQLQuery.sql | UTF-8 | 1,080 | 3.53125 | 4 | [] | no_license | create database [Space]
use [Space]
drop table Satellite
create table Planet
(
ID int identity not null,
Name nvarchar(30) not null,
Radius float not null check (Radius>0),
Temperature float not null check (Temperature>0),
IsLife nvarchar(2) not null check(IsLife = 'Y' or IsLife = 'N'),
IsAtmosphere nva... | true |
64183035093561b0b4e45d34a905185d312139bb | SQL | BUCTdarkness/JiyiShen-s-Coding | /LeetCode/leetcode.sql | UTF-8 | 755 | 3.96875 | 4 | [] | no_license |
--Rank Scores
select Score,Rank from (
select Score,@curRank := @curRank+if(@preScore = Score,0,1) as Rank,@preScore := Score
from Scores s,(select @curRank := 0) r,(select @preScore := NULL) p
order by Score desc
) t;
--Consecutive Numbers
select distinct Num from (
select Num,count(Rank) as Cnt from
(
sele... | true |
cebdb193cf33bf79d1071ba47fd7812a577cc3be | SQL | Good725/ideabubble-lamp | /plugins/courses/model/model-20200706183000.sql | UTF-8 | 1,070 | 2.953125 | 3 | [] | no_license | /*
ts:2020-07-06 18:30:00
*/
-- Add learning and booking modes to the schedules table, which are linked to lookups
ALTER TABLE `plugin_courses_schedules`
ADD COLUMN `learning_mode_id` INT(11) NULL AFTER `study_mode_id`,
ADD COLUMN `delivery_mode_id` INT(11) NULL AFTER `learning_mode_id`;
INSERT INTO `engine_lookup_f... | true |
9648e92517ae43835b62f079419c2132eeb8187b | SQL | bricker3k/sql-challenge | /queries_sql_challenge.sql | UTF-8 | 2,285 | 4.65625 | 5 | [] | no_license | --List the following details of each employee: employee number, last name, first name, gender, and salary.
Select
E.emp_no,
E.last_name,
E.first_name,
E.gender,
S.salary
From "Employees" as E
JOIN "Salaries" as S
ON E.emp_no = S.emp_no;
--List employees who were hired in 1986.
Select *
From "Employees"
where hire... | true |
f0d96f36e2fc37776769d5a453daaf310f45d369 | SQL | JupiterDai/MyBlog | /DB/USER_INFO.sql | UTF-8 | 473 | 2.6875 | 3 | [] | no_license | CREATE TABLE `USER_INFO` (
`ID` bigint NOT NULL AUTO_INCREMENT,
`PASSWORD` varchar(256) COLLATE utf8mb4_0900_as_cs NOT NULL,
`USERNAME` varchar(100) COLLATE utf8mb4_0900_as_cs NOT NULL,
`CREATE_AT` datetime NOT NULL,
`CREATE_BY` varchar(100) COLLATE utf8mb4_0900_as_cs NOT NULL,
`UPDATE_AT` datetime NOT NULL... | true |
b8aeeef82b3da8552937792e45ef4f87af1498d5 | SQL | dvien/jeebiz-admin | /jeebiz-admin-extras/jeebiz-admin-extras-authz-rbac0/src/main/resources/db/migration/rbac0/mysql/V1_0_2__权限管理-数据初始化.sql | UTF-8 | 1,289 | 2.765625 | 3 | [
"Apache-2.0"
] | permissive |
DELETE FROM SYS_AUTHZ_ROLE_LIST;
INSERT INTO SYS_AUTHZ_ROLE_LIST ( R_ID, R_KEY, R_NAME, R_TYPE, R_INTRO, R_STATUS)
VALUES ( '1', 'admin', '超级管理员', '1', '系统初始化的最高权限用户', '1' );
INSERT INTO SYS_AUTHZ_ROLE_LIST ( R_ID, R_KEY, R_NAME, R_TYPE, R_INTRO, R_STATUS)
VALUES ( '2', 'mgr', '普通管理员', '1', '普通功能管理员', '1' );
INS... | true |
d1629703128b8697d0d6e54e47b9f6e1af5856fd | SQL | skater-git/sprint2 | /20210115dump.sql | UTF-8 | 2,825 | 3.09375 | 3 | [] | no_license | CREATE DATABASE IF NOT EXISTS `projectsdb` /*!40100 DEFAULT CHARACTER SET latin1 */;
USE `projectsdb`;
-- MySQL dump 10.13 Distrib 8.0.22, for Linux (x86_64)
--
-- Host: localhost Database: projectsdb
-- ------------------------------------------------------
-- Server version 5.6.37
/*!40101 SET @OLD_CHARACTER_SE... | true |
adfe8c1a348a99f91aa874f21dcefa0709c3cc39 | SQL | brewbean/graphql | /migrations/1616699088089_set_fk_public_bean_review_barista_id/up.sql | UTF-8 | 281 | 2.890625 | 3 | [] | no_license | alter table "public"."bean_review" drop constraint "bean_reviews_barista_id_fkey",
add constraint "bean_review_barista_id_fkey"
foreign key ("barista_id")
references "public"."barista"
("id") on update cascade on delete cascade;
| true |
a19eaf780653427a39756fcc4901f4d3aac216f6 | SQL | ujikit/Kerja-Praktik-Titipan | /Andre_Perpustakaan/perpus.sql | UTF-8 | 14,480 | 2.96875 | 3 | [] | no_license | -- MySQL dump 10.16 Distrib 10.1.32-MariaDB, for Linux (x86_64)
--
-- Host: localhost Database: perpus
-- ------------------------------------------------------
-- Server version 10.1.32-MariaDB
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SE... | true |
b5f64199c97eb98b1286b0883b3b41ed02d84f6d | SQL | rgsgonc/algamoney | /src/main/resources/db/migration/V01__criar_e_registrar_categorias.sql | UTF-8 | 287 | 2.515625 | 3 | [] | no_license | CREATE TABLE categoria(
codigo BIGINT(20) PRIMARY KEY AUTO_INCREMENT,
nome VARCHAR(50) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
INSERT INTO categoria (nome) VALUES ('Gasolina');
INSERT INTO categoria (nome) VALUES ('Faculdade');
INSERT INTO categoria (nome) VALUES ('Moradia');
| true |
91a762f7e07c4e6bb0dab284a399da3c7932346a | SQL | gabrielelizio/uploads | /banco-atual/systemsauer(02-04-2018).sql | UTF-8 | 10,457 | 3.03125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.2.7.1
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: 02-Abr-2018 às 19:07
-- Versão do servidor: 5.6.20-log
-- PHP Version: 5.4.31
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
CREATE Database IF NOT EXISTS `systemsauer`;
/*!40101 SET... | true |
0f6f62e3694f246fbf48553044d1cabe850f5d4f | SQL | apache/druid | /sql/src/test/resources/drill/window/queries/negative/q14.sql | UTF-8 | 155 | 2.578125 | 3 | [
"EPL-1.0",
"Classpath-exception-2.0",
"ISC",
"GPL-2.0-only",
"BSD-3-Clause",
"Apache-2.0",
"LicenseRef-scancode-public-domain",
"LicenseRef-scancode-generic-cla",
"0BSD",
"LicenseRef-scancode-sun-no-high-risk-activities",
"LicenseRef-scancode-free-unknown",
"JSON",
"LicenseRef-scancode-unico... | permissive | -- DRILL-3359
select sum(salary) over(partition by position_id order by salary rows between unbounded preceding and current row) from cp.`employee.json`;
| true |
7a165c93a9812d57b60fde95ef36906772dca665 | SQL | SaraPro52/LppConsola | /Sara_Windows/DATA/Antiguo/07_RegistrarFuncionario_09_Maria.sql | UTF-8 | 3,443 | 3.890625 | 4 | [] | no_license | USE SARA005;
DROP PROCEDURE IF EXISTS RegistrarFuncionario;
DELIMITER ;;
CREATE PROCEDURE RegistrarFuncionario(IN ArrayReg VARCHAR(800))
BEGIN
CALL EXECUTE_ARRAY(
ArrayReg,
"~",
"CASE @i
WHEN 0 THEN SET @Id_Rol = @valor;
WHEN 1 THEN SET @Id_Tipo_Documento = @valor;
WHEN 2 THEN SET @Num_Doc... | true |
2b4dbcc3f1fd3010c253c408b46e50b55bca28c6 | SQL | ursjoss/scipamato | /core/core-persistence-jooq/src/main/resources/db/migration/V170919170100__schema_user.sql | UTF-8 | 1,086 | 3.578125 | 4 | [
"BSD-3-Clause",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | /*
* Creates the user 'scipamato' and grants it the relevant privileges
* while revoking public privileges from PUBLIC.
*/
DO
$body$
BEGIN
IF NOT EXISTS (
SELECT 1
FROM pg_catalog.pg_user
WHERE usename = 'scipamato') THEN
CREATE USER scipamato WITH PASSWORD 'scipamato';
END IF;
END... | true |
4ddebe0c2e6014c16e8a85edccd028a8dae781c2 | SQL | paul-corrigan/utahsms | /queries/projects/reviews.sql | UTF-8 | 177 | 2.921875 | 3 | [] | no_license | SELECT users.full_name AS name,
comment,
added_on
FROM burn_project_reviews
JOIN users
ON users.user_id=burn_project_reviews.added_by
WHERE burn_project_id= ? | true |
97b8f0dcab90e1f292340bd6e6362d895b517f5a | SQL | fkarg/uni-stuff | /semester_three/dbis/blatt-06/create-country.sql | UTF-8 | 33,699 | 3 | 3 | [] | no_license | CREATE TABLE Country (
Name VARCHAR2(40)
CONSTRAINT Country_Name_NotNull NOT NULL
CONSTRAINT Country_Name_Unique UNIQUE,
Code CHAR(2)
CONSTRAINT Country_Key PRIMARY KEY,
Capital VARCHAR2(40),
Province VARCHAR2(40),
Population NUMBER
CONSTRAINT Country_Population_Check... | true |
bd6aadefebad9d6184d91f9ef3024d83a5b4562d | SQL | devlegacy/db-demo | /postgresql/1552138685-create-permission-roles-table.sql | UTF-8 | 617 | 3.828125 | 4 | [] | no_license | CREATE TABLE permission_role(
id SERIAL,
permission_id INT NOT NULL,
role_id INT NOT NULL,
CONSTRAINT pk_permission_role_id PRIMARY KEY (id),
CONSTRAINT uq_permission_role_permission_id_role_id UNIQUE(permission_id, role_id),
CONSTRAINT fk_permission_role_permission_id FOREIGN KEY (permission_id)
REFER... | true |
5d2ba82504ecee1613d7bbed3cfd24812b80096e | SQL | HaPhan8X/Test1 | /sql/madtv.sql | UTF-8 | 40,332 | 3.71875 | 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';
CREATE SCHEMA IF NOT EXISTS `madtv` DEFAULT CHARACTER SET latin1 ;
USE `madtv`;
-- ----------------------------------------------------... | true |
8141cca4a1d7c4cf08c7976685caf489b871d67f | SQL | anbucipl0521/mis | /mis.sql | UTF-8 | 61,666 | 2.75 | 3 | [
"MIT"
] | permissive | -- phpMyAdmin SQL Dump
-- version 5.1.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Sep 18, 2021 at 08:32 AM
-- Server version: 10.4.20-MariaDB
-- PHP Version: 8.0.9
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIEN... | true |
438390dca7c162ba62510ba075076a02bc06dc1c | SQL | dongbe/ProjetIBD | /sql/relations.sql | UTF-8 | 1,909 | 3.546875 | 4 | [
"Apache-2.0"
] | permissive | drop table LesTickets ;
drop table LesDossiers;
drop table LesRepresentations ;
drop table LesSpectacles ;
drop table LesPlaces ;
drop table LesZones ;
drop table LesCategories ;
create table LesCategories (nomC varchar2(20), prix number (8,2),
constraint cat_c1 primary key (nomC),
constraint cat_... | true |
fa611a57e9f6e65553f8c0976bcfc61a7a949c25 | SQL | pranaypokala/SQL-5X-Project | /project-name/models/example/PERCENTAGE_OF_CASES_RECORDED_DAILYBASES.sql | UTF-8 | 220 | 2.640625 | 3 | [] | no_license |
{{ config(materialized="table") }}
select NEW_Cases/Total_Cases*100 as percentage_of_cases,date from "FIVETRAN_INTERVIEW_DB"."GOOGLE_SHEETS"."COVID_19_INDONESIA_POKALA_PRANAYKUMAR"
where NEW_Cases>=0 and Total_Cases>=0 | true |
f07cd9f6a12d017cc056e6beaffdbbd5f5c357ca | SQL | Junghyo/oracle | /sql/a14_constraintExp2_0324.sql | UHC | 9,499 | 4.4375 | 4 | [] | no_license | /*
NOT NULL
ش ÷ Ͱ ݵ Է Ǿ óǰԲ .
*/
-- notnull_ex ̺ . (empno,ename,job) not null
create table notnull_ex(
empno number not null, -- not null (Ͱ ݵ Էµǰ)
ename varchar2(20) not null,
job varchar2(20)
);
-- null_ex ̺ . (empno,ename)
create table null_ex(
empno number,
ename varchar2(20),
job varchar... | true |
9724fe52248b3c8a8b2637d809aa0bb922a57439 | SQL | maweiyi/spear | /doc/spear.sql | UTF-8 | 4,467 | 3.40625 | 3 | [] | no_license | /*
Navicat Premium Data Transfer
Source Server : root
Source Server Type : MySQL
Source Server Version : 50621
Source Host : localhost
Source Database : spear
Target Server Type : MySQL
Target Server Version : 50621
File Encoding : utf-8
Date: 10/07/2017 22:17:28 PM
*/... | true |
63b4c768895d9fd5c57291fefde787180a03314b | SQL | mcgidev/mPortal | /Portal/WebSystem/WCMS.Framework.SqlDabase/dbo/Stored Procedures/WebGlobalPolicy_Set.sql | UTF-8 | 533 | 3.015625 | 3 | [
"MIT"
] | permissive | CREATE PROCEDURE dbo.WebGlobalPolicy_Set
(
@GlobalPolicyId int =-1,
@Name nvarchar(250)
)
AS
SET NOCOUNT ON
IF(@GlobalPolicyId > 0)
BEGIN
-- UPDATE
UPDATE WebGlobalPolicy
SET Name = @Name
WHERE
(GlobalPolicyId = @GlobalPolicyId)
END
ELSE
BEGIN
-- INSERT
EXEC @Glo... | true |
a2eb4e4889db7d19a917657958dc9990a11fb096 | SQL | pi-module/guide | /sql/mysql.sql | UTF-8 | 10,470 | 3.03125 | 3 | [] | no_license | CREATE TABLE `{item}` (
`id` int(10) unsigned NOT NULL auto_increment,
`title` varchar(255) NOT NULL,
`type` varchar(255) NOT NULL,
`slug` varchar(255) NOT NULL,
`category` varchar(255) NOT NULL,
`summary` text,
`description` text,
`seo_title` varchar(255) NOT NULL,
`seo_keywords` va... | true |
45c5c7112836fec5fddb44a0b6a76dbc25a441b2 | SQL | bellmit/origin | /family_order/sql/TF_A_PAYRELATION/SEL_BY_ACCT_FSZQ.sql | UTF-8 | 568 | 2.84375 | 3 | [] | no_license | SELECT partition_id,to_char(user_id) user_id,to_char(acct_id) acct_id,payitem_code,acct_priority,user_priority,bind_type,start_cycle_id,end_cycle_id,default_tag,act_tag,limit_type,to_char(limit) limit,complement_tag,update_staff_id,update_depart_id,to_char(update_time,'yyyy-mm-dd hh24:mi:ss') update_time
FROM tf_a_p... | true |
bf8376af1a4d733648d486acd080f4e85416de50 | SQL | Opetushallitus/valinta-tulos-service | /valinta-tulos-valintarekisteri-db/src/main/resources/db/migration-vts/V101__newest_vastaanotto_events_with_better_henkiloviitteet_column_order.sql | UTF-8 | 1,146 | 3.21875 | 3 | [] | no_license | create or replace view newest_vastaanotto_events as
select *
from (
select
vastaanotot.henkilo as henkilo,
haku_oid,
hakukohde,
action,
ilmoittaja,
timestamp,
selite,
kk_tutkintoon_johtava,
koul... | true |
041b6a785f7f104ec030ee1f82a7f47f46610a8d | SQL | Coding-Squad/CoOpApplication | /app/src/main/res/raw/coop_database.sql | UTF-8 | 3,845 | 3.390625 | 3 | [] | no_license | CREATE schema co_op;
CREATE TABLE users (
userId LONG PRIMARY KEY NOT NULL DEFAULT "0",
password VARCHAR(32),
email VARCHAR(32),
acountStatus BOOLEAN DEFAULT TRUE,
secretQuestion VARCHAR(60),
userRole INTEGER DEFAULT "1"
);
// >> UserInformation.Columns.USER_ROLE_ID, 1
// >> UserInformation.Colu... | true |
1d0497af7a27d05a49c160b5de02bbef101aaa1f | SQL | dmtd78/hanfu | /forum/src/mybbs.sql | UTF-8 | 2,370 | 3 | 3 | [] | no_license | /*
Navicat MySQL Data Transfer
Source Server : localhost_3306
Source Server Version : 50716
Source Host : localhost:3306
Source Database : mybbs
Target Server Type : MYSQL
Target Server Version : 50716
File Encoding : 65001
Date: 2017-03-15 14:14:05
*/
SET FOREIGN_KEY_CHECKS=0;
-... | true |
60dd08635c48311c80e44195a91c810f4be4561a | SQL | androidget/web_order | /sql/project.sql | UTF-8 | 1,084 | 3.171875 | 3 | [] | no_license | create database `orderdata`;
use `orderdata`;
create table `users`(
`account` varchar(12) not null primary key comment '帐号 ,表示手机号,必须独一无二',
`username` varchar(32) not null comment '用户昵称',
`password` varchar(18) not null comment '用户密码',
`status` int not null default 0 comment '0表示没有审核通过,其他表示通过',
`picture` ... | true |
675773aa03685931b485e21ca69211500c10699d | SQL | UnknownDevBY/SpringReactSocialNetwork | /back/src/main/resources/db/migration/V5__Create_communities.sql | UTF-8 | 672 | 3.9375 | 4 | [] | no_license | create table community(
id serial primary key,
description varchar(127),
title varchar(63) not null,
admin_id int,
foreign key (admin_id) references users(id)
);
create table community_subscribers(
id serial primary key,
user_id int,
community_id int,
foreign key (user_id) references users(id),
for... | true |
125836c4b85c2e991bcd1bba0401bba31aa51985 | SQL | tomhnzhou/CS143 | /Proj1B/queries.sql | UTF-8 | 1,321 | 4.5625 | 5 | [] | no_license | -- 1)
-- names of all the actors in the movie 'Die Another Day'
select concat_ws(' ', a.first, a.last) as Names
from Actor a, MovieActor ma, Movie m
where a.id = ma.aid and
m.id = ma.mid and
m.title = 'Die Another Day';
-- 2)
-- count of all the actors who acted in multiple movies
select count(*) as NumActors
from ... | true |
1eb019be7c36158237988a300a2fc3ed6ea99e7c | SQL | Ksmatle8/JPACRUDProject | /DB/toolboxdb.sql | UTF-8 | 2,442 | 3.40625 | 3 | [] | no_license | -- MySQL Workbench Forward Engineering
SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0;
SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0;
SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTI... | true |
6c22a6977d88edff6fbb1b35ad9fbe686576b2b5 | SQL | mharoot/DockerizedElegantMVC | /services/customer/mysql/customers.sql | UTF-8 | 10,359 | 2.734375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.7.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Mar 03, 2018 at 09:17 PM
-- Server version: 10.1.26-MariaDB
-- PHP Version: 7.1.9
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD... | true |
41b72244f2599e041e6dbddf92a6bb914851d012 | SQL | teamcrackens/ProyectosVarios | /Proyecto VueNetcore/SistemaWebApi/trigger detalle venta.sql | UTF-8 | 187 | 2.921875 | 3 | [] | no_license | CREATE TRIGGER ActualizarStock_Venta
ON detalle_venta
FOR INSERT
AS
UPDATE a SET a.stock=a.stock - d.cantidad
FROM articulo a INNER JOIN
INSERTED d ON a.idarticulo =d.idarticulo | true |
3a04ac3883716b44a13ce41ca4e70801558e13c3 | SQL | pablo/rshk_http | /rshk_http.sql | UTF-8 | 3,561 | 2.640625 | 3 | [] | no_license | create type TStringArray as table of varchar2(32767);
/
create or replace package RSHK_HTTP is
-- Author : RSHK
-- Created : 02/11/2010 9:30:10 AM
-- Purpose : Funciones de red para llamados REST
MY_USER_AGENT constant varchar2(32) := 'RshkPLSQL_HTTP_CLI/6.7';
-- Public function and procedure declaratio... | true |
0cc5da626b8a17ada07c964089dbb05b4d19137b | SQL | Jerinji2016/hostel-attendance-system | /db/mbc.sql | UTF-8 | 20,817 | 3.5 | 4 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.8.3
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Generation Time: Nov 13, 2019 at 10:55 AM
-- Server version: 10.1.36-MariaDB
-- PHP Version: 5.6.38
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OL... | true |
cfd895db5732e52fdf3339bd95dada4e73380b88 | SQL | deliaqpereira/queixinhasnanet | /SQL/datastore_pq.sql | UTF-8 | 2,987 | 3.125 | 3 | [] | no_license | DROP TABLE IF EXISTS dbUsers;
CREATE TABLE dbUsers(
usr VARCHAR(60) PRIMARY KEY,
passw VARCHAR(20),
nick VARCHAR(20),
isAdmin INTEGER
);
INSERT INTO dbUsers VALUES ('31399@alunos.isel.ipl.pt','123456','deliaqpereira',1);
INSERT INTO dbUsers VALUES ('deliaqpereira@gmail.com','foo1234','delia',0);
INSERT INTO dbUser... | true |
745d5ae698bab7b73d1b9b9b40f7818dc8cb1f3c | SQL | jgcalle/que-comprar-hoy | /conf/evolutions/default/1.sql | UTF-8 | 1,913 | 3.53125 | 4 | [
"MIT"
] | permissive | # --- Created by Ebean DDL
# To stop Ebean DDL generation, remove this comment and start using Evolutions
# --- !Ups
create table articulo (
id bigint not null,
name varchar(255),
amount integer,
my_list_id bigint,
constraint pk_a... | true |
e0ebcdf9b874105c2f78d38947ac891a7bbe5777 | SQL | jesuscarmona12/GeoExamen | /Base de datos/examengeo.sql | UTF-8 | 2,474 | 3.234375 | 3 | [
"MIT"
] | permissive | -- phpMyAdmin SQL Dump
-- version 4.8.5
-- https://www.phpmyadmin.net/
--
-- Servidor: 127.0.0.1
-- Tiempo de generación: 30-04-2019 a las 02:28:14
-- Versión del servidor: 10.1.38-MariaDB
-- Versión de PHP: 7.3.4
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
... | true |
39ff525e0251981f31782cce8e16ea2eaae283cd | SQL | ritu100/Pathology-Lab-Software | /LabSoft/db/labsoft_structure_only.sql | UTF-8 | 49,343 | 2.90625 | 3 | [] | no_license | CREATE DATABASE IF NOT EXISTS `labsoft` /*!40100 DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci */;
USE `labsoft`;
-- MySQL dump 10.13 Distrib 8.0.12, for Win64 (x86_64)
--
-- Host: 127.0.0.1 Database: labsoft
-- ------------------------------------------------------
-- Server version 8.0.12
/*!40101 SE... | true |
d2208de5d84e0ea3fdfbb9b185dbd96c430cdd17 | SQL | zubaer007/Hospital-Management-System-JAVA | /Hospital-Management-System-Java-main/hospital.sql | UTF-8 | 6,439 | 3.09375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.9.0.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Aug 21, 2019 at 09:41 AM
-- Server version: 10.3.16-MariaDB
-- PHP Version: 7.3.7
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @O... | true |
c87a8874c95002c0be2a2859495d4191c360b2ff | SQL | camilaquiros/tablas_patitas | /subcategories.sql | UTF-8 | 2,003 | 2.890625 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.8.5
-- https://www.phpmyadmin.net/
--
-- Servidor: 127.0.0.1
-- Tiempo de generación: 27-08-2019 a las 17:41:31
-- Versión del servidor: 10.1.39-MariaDB
-- 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 |
2fc59766ec69a562e33bddcca389344cd477ae37 | SQL | parthjd/BootcampX | /3_queries_group_by/5_average_assignment_completion_time.sql | UTF-8 | 290 | 4.0625 | 4 | [] | no_license | select students.name as student, AVG(assignment_submissions.duration) as average_assignment_duration
FROM assignment_submissions
JOIN students on students.id = student_id
group by students.name, students.end_date
HAVING students.end_date is NULL
ORDER by average_assignment_duration DESC; | true |
6b95357bb0e430af55c94c3742e7c12dee171db9 | SQL | Char-CN/big-client | /src/test/java/org/blazer/bigclient/sql/test.sql | UTF-8 | 43,451 | 3.9375 | 4 | [] | no_license | SELECT a.*,b.*,c.actual_name
FROM
(SELECT a.user_id,a.version_no,a.advisor_id FROM cl_formal_user_version a
JOIN (SELECT user_id,max(version_no) AS max_version_no FROM cl_formal_user_version GROUP BY user_id) b
ON a.user_id = b.user_id
AND a.version_no = b.max_version_no) a
LEFT OUTER JOIN cl_for... | true |
70bfae3051998521b9bc93f5ec53d5690296a7b4 | SQL | lookaust/javamail | /javamail.sql | UTF-8 | 847 | 2.6875 | 3 | [] | no_license | /*
Navicat MySQL Data Transfer
Source Server : localhost_3306
Source Server Version : 50131
Source Host : localhost:3306
Source Database : javamail
Target Server Type : MYSQL
Target Server Version : 50131
File Encoding : 65001
Date: 2017-07-05 23:23:14
*/
SET FOREIGN_KEY_CHECKS=0;... | true |
275356874dd5bf44ba112b01300f1f6caf2f92e9 | SQL | stanislaviv/Databases-Basics---MS-SQL-Server---2017 | /5_Data_Aggregation/5_DataAggr/Exercise/5.DepositsSum.sql | UTF-8 | 103 | 2.953125 | 3 | [
"MIT"
] | permissive | SELECT DepositGroup, ROUND(SUM(DepositAmount),2) AS TotalSum
FROM WizzardDeposits
GROUP BY DepositGroup | true |
5460615ef2f7389a0066a2b32b8a58e6a120c380 | SQL | renaudfournet/checkpoint4_back | /prisma/migrations/20210203150323_first_migration/migration.sql | UTF-8 | 480 | 3.109375 | 3 | [] | no_license | /*
Warnings:
- The migration will add a unique constraint covering the columns `[photo]` on the table `albums`. If there are existing duplicate values, the migration will fail.
- Added the required column `photo` to the `albums` table without a default value. This is not possible if the table is not empty.
*/
-... | true |
a2815cb0a3f4e77932777f24b926d4ead51889ea | SQL | The-Ark-Informatics/ark | /ark-database/db-scripts/patch/20110322/mysql/20110609_study_schemaPatch.sql | UTF-8 | 1,185 | 3.53125 | 4 | [] | no_license | USE study;
/* Update table definition */
ALTER TABLE `study`.`person` DROP FOREIGN KEY `fk_person_gender_type` , DROP FOREIGN KEY `fk_person_vital_status` ;
ALTER TABLE `study`.`person` CHANGE COLUMN `GENDER_TYPE_ID` `GENDER_TYPE_ID` INT(11) NOT NULL DEFAULT '0',
CHANGE COLUMN `VITAL_STATUS_ID` `VITAL_STATUS_ID` ... | true |
0244ba4f954cb3e33cdfdd4ba1a083ceda9d985d | SQL | AlexanderOnbysh/edu | /bachelor/OLAP/tasks/taks1/crebas.sql | UTF-8 | 3,589 | 3.203125 | 3 | [] | no_license | /*==============================================================*/
/* Database name: SALE */
/* DBMS name: ORACLE Version 10gR2 */
/* Created on: 13.02.2014 19:12:34 */
/*==================================================... | true |
3d0246025381df30294ffbb976b3bfeea5be2087 | SQL | FASTTRACKSE/FFSE1704_LP3 | /Assignments/VyNg/bàitapmySQL/nhanvien.sql | UTF-8 | 1,709 | 2.890625 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.7.4
-- https://www.phpmyadmin.net/
--
-- Máy chủ: 127.0.0.1
-- Thời gian đã tạo: Th3 26, 2018 lúc 11:09 AM
-- Phiên bản máy phục vụ: 10.1.26-MariaDB
-- Phiên bản PHP: 7.1.9
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!... | true |
a50a987f9860d6e264868f02e381bcdbbb2c8975 | SQL | balticit/eventcatalog | /backup/views.sql | UTF-8 | 16,200 | 3.84375 | 4 | [] | no_license | CREATE VIEW `vw__public_doc` AS
select
`pd`.`tbl_obj_id` AS `tbl_obj_id`,
`pd`.`title` AS `title`,
`p2t`.`parent_id` AS `dir_id`
from
(`tbl__public_doc` `pd` join `tbl__public2topic` `p2t` on((`pd`.`tbl_obj_id` = `p2t`.`child_id`)));
CREATE VIEW `vw__personal_types_parent` AS
select... | true |
662e1f2cac6309c57f3d65835874dd3af0098acf | SQL | tatacsd/MicrosoftSQLServer | /count.sql | UTF-8 | 270 | 3.125 | 3 | [] | no_license | -- COUNT all columns or a specif column
-- count all
SELECT COUNT (*)
FROM person.Person;
-- A -> 19972
-- how many title?
SELECT COUNT (title)
FROM person.Person;
-- A -> 1009
-- what about different title?
SELECT COUNT (DISTINCT title)
FROM person.Person;
-- A -> 6 | true |
63ee4d34f90f4490bbb0a8d7c2522b6d3360723a | SQL | ieneka/modelatge-BBDD | /Exercici Final.sql | UTF-8 | 4,849 | 3.21875 | 3 | [] | no_license | -- MySQL Script generated by MySQL Workbench
-- Thu Feb 13 12:24:05 2020
-- Model: New Model Version: 1.0
-- MySQL Workbench Forward Engineering
SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0;
SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0;
SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='ON... | true |
8cf78738e79332b70c654eca3dc0206c57dc4c73 | SQL | ShahakBH/jazzino-master | /bi/bi-reporting/src/main/resources/deltas/127.sql | UTF-8 | 353 | 2.890625 | 3 | [] | no_license | CREATE TABLE GIFTS_SENT(
gift_id BIGINT NOT NULL DISTKEY,
sender_id DECIMAL(16,2) NOT NULL,
receiver_id DECIMAL(16,2) NOT NULL,
expiry_ts timestamp,
sent_ts timestamp SORTKEY,
PRIMARY KEY (gift_id));
GRANT SELECT ON GIFTS_SENT TO GROUP READ_ONLY;
GRANT ALL ON GIFTS_SENT TO GROUP READ_WRITE;
GRANT ALL ON GI... | true |
48fab59b2bc4e3a7eb5b861846d7d4c580775b8d | SQL | paarthivnaik/EMSDB | /Jan/12/SalaryPaid_Table.sql | UTF-8 | 377 | 2.75 | 3 | [] | no_license | create table SalaryPaid(
SalaryPaidID bigint primary Key not null identity(1,1),
EmployeeID bigint foreign key references Employees(EmployeeID),
PaidMonth datetime not null,
Salary money not null,
Incentives money null,
Bonous money null,
Status bit default(1) not null,
CreatedBy bigint not null,
CreatedOn datetime not... | true |
9bfec8df55cae4bbd4f0f8b726c59232b5846a7f | SQL | UzeeDevelopers/AccountBooks | /util/gl_ledger.sql | UTF-8 | 1,663 | 3.046875 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.0.4.1
-- http://www.phpmyadmin.net
--
-- ホスト: 127.0.0.1
-- 生成日時: 2013 年 11 月 10 日 13:00
-- サーバのバージョン: 5.5.32
-- PHP のバージョン: 5.4.19
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_... | true |
93ac078654b3105173ba01841577bf4b83ac39e9 | SQL | Wawhub/Hubert_DC | /ZS_M3_PRACA_DOMOWA.sql | UTF-8 | 754 | 3.71875 | 4 | [] | no_license |
CREATE SCHEMA training;
ALTER SCHEMA training RENAME TO training_zs;
CREATE TABLE training_zs.products (
id integer,
production_qty NUMERIC(10,2),
product_name varchar(100),
product_code varchar(10),
description text,
manufacturing_date date
);
ALTER TABLE training_zs.products ADD PRIMARY KEY (id);
DROP TABLE ... | true |
2d60b04d151eb7e5291bcd4e830b6d29be9722e4 | SQL | 191118javaExt/project-0-GattieTime | /SQL Scrips/Script-1.sql | UTF-8 | 1,746 | 3.84375 | 4 | [] | no_license | CREATE TABLE employee (
id SERIAL PRIMARY KEY,
first_name VARCHAR (50) NOT NULL,
last_name VARCHAR (50) NOT NULL,
login VARCHAR (50) NOT NULL UNIQUE,
password INTEGER NOT NULL,
approved BOOLEAN
);
CREATE TABLE administrator (
id SERIAL PRIMARY KEY,
first_name VARCHAR (50) NOT NULL,
last_name VARCHAR (50... | true |
b831a85b696cebdcf2f9e11f272e25e99e08c4c6 | SQL | alaminrony/Laravel-AJAX-CRUD-Operation | /ajax-crud.sql | UTF-8 | 8,513 | 2.671875 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.8.3
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Jun 29, 2019 at 10:05 PM
-- Server version: 10.1.37-MariaDB
-- PHP Version: 7.2.12
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OL... | true |
a400887f76a3986f0e825c4f610494be867ff6c3 | SQL | chhitij-rally/fpc-api | /conf/evolutions/default/1.sql | UTF-8 | 2,109 | 3.296875 | 3 | [
"CC0-1.0"
] | permissive | # --- !Ups
create table "users" (
"id" bigint generated by default as identity(start with 1) not null primary key,
"first_name" varchar not null,
"last_name" varchar not null,
"email" varchar not null,
"password" varchar not null,
"api_key" varchar not null,
"roles" varchar not null,
"designation" varc... | true |
6890937fa47df974e1caf9f36c2b2777ff3486e5 | SQL | alldatacenter/alldata | /olap/doris/regression-test/suites/tpch_sf100_unique_p2/ddl/lineitem_sequence.sql | UTF-8 | 884 | 2.734375 | 3 | [
"OpenSSL",
"Apache-2.0",
"BSD-3-Clause",
"LicenseRef-scancode-facebook-patent-rights-2",
"PSF-2.0",
"dtoa",
"MIT",
"GPL-2.0-only",
"LicenseRef-scancode-public-domain"
] | permissive | CREATE TABLE IF NOT EXISTS lineitem (
l_shipdate DATE NOT NULL,
l_orderkey bigint NOT NULL,
l_linenumber int not null,
l_partkey int NOT NULL,
l_suppkey int not null,
l_quantity decimal(15, 2) NOT NULL,
l_extendedprice decimal(15, 2) NOT NULL,
l_discount decimal(15,... | true |
da00f08e09020af80d81249e4e332965c5ef6f7e | SQL | ravinder79/database-exercises | /3.7_group_by_exercises.sql | UTF-8 | 1,482 | 4.03125 | 4 | [] | no_license |
SELECT
DISTINCT title
FROM titles;
SELECT last_name
from employees
where last_name LIKE 'E%E'
GROUP BY last_name;
SELECT last_name, first_name
from employees
where last_name LIKE 'E%E'
GROUP BY last_name, first_name;
/*Find the unique last names with a 'q' but not 'qu'*/
SELECT last_name
FROM employees
where las... | true |
57cbe7e41f4d35744480313bda40d7c3aff4c219 | SQL | GotEmma/task2 | /shouldfail/test10.sql | UTF-8 | 1,180 | 3.5 | 4 | [] | no_license | -- test insert hotel
INSERT INTO Countries VALUES ('Sweden');
INSERT INTO Areas VALUES ('Sweden','Gothenburg',491630);
INSERT INTO Areas VALUES ('Sweden','Stockholm',1100000);
INSERT INTO Cities VALUES ('Sweden','Gothenburg',0);
INSERT INTO Cities VALUES ('Sweden', 'Stockholm', 0);
INSERT INTO Persons VALUES ('Swede... | true |
dd6e6aba9a27b45ad911801499b98590fe5eab7b | SQL | jnirty/try-it-out | /com.tryitout.sql/src/main/resources/queries.sql | UTF-8 | 4,051 | 4.34375 | 4 | [] | no_license | -- INNER JOIN - get all people that have company and car
select p.name, p.surname, c.plate_no
from person p
inner join car c
on c.fk_person_id = p.pk_person_id;
SELECT
c.color,
c.plate_no,
p.name,
p.surname,
comp.name AS company
FROM car c INNER JOIN person p
ON c.fk_person_id = p.pk_person_id
INNER JOIN compa... | true |
1c6005fa1a23c00a562dfc9b55a73644df2c6ffb | SQL | nadiahasan/Fall2017 | /database/inventoryV4.sql | UTF-8 | 12,028 | 3.734375 | 4 | [] | no_license | DROP DATABASE IF EXISTS INVENTORY;
CREATE DATABASE IF NOT EXISTS INVENTORY;
USE INVENTORY;
CREATE TABLE IF NOT EXISTS ADDRESS(
ADDRESS_ID INT(10) AUTO_INCREMENT NOT NULL PRIMARY KEY ,
ADDRESS_LINE1 VARCHAR(100) NOT NULL,
ADDRESS_LINE2 VARCHAR(100) ,
COUNTY VARCHAR(50),
CITY VARCHAR(50) NOT NULL ,
STATE ... | true |
a33706f24ac5a1a8166d49fd1919a6f651b32f6c | SQL | anubhav1006/VIT-Bulletin | /post.sql | UTF-8 | 1,574 | 3.09375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.6.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: May 03, 2017 at 09:14 PM
-- Server version: 5.7.14
-- PHP Version: 5.6.25
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */... | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.