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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
4061f05d0b70ed0daf69739dd4f38ddfffec67fe | SQL | radtek/abs3 | /sql/mmfo/bars/View/V_TELLER_BOSS_LIST.sql | UTF-8 | 1,603 | 3.203125 | 3 | [] | no_license |
PROMPT =====================================================================================
PROMPT *** Run *** ========== Scripts /Sql/BARS/view/v_teller_boss_list.sql =========*** Run
PROMPT =====================================================================================
CREATE OR REPLACE FORCE VI... | true |
3cae64e11430c85d4f8baf65274cecffe673ec3b | SQL | lazarogarcia/usuario | /Base de Datos Php-Mysql/php_login_database.sql | UTF-8 | 2,256 | 2.984375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Servidor: localhost:3307
-- Tiempo de generación: 03-05-2020 a las 22:00:22
-- Versión del servidor: 10.4.11-MariaDB
-- Versión de PHP: 7.2.29
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET... | true |
8b9c1bd52883602e2c9ff921a8c2faa8cb3b817c | SQL | faker-hong/testOne | /数据库SQL/SQL_demo练习/R6.sql | UTF-8 | 2,316 | 4.21875 | 4 | [] | no_license | 需求:列出2019-1-1到2019-12-31期间成功或失败的持续时段
failed(fail_date)
succeeded(success_date)
1.分开处理之后union ALL后根据end_date排序
失败时段:
SELECT
IF(DATE_SUB(fail_Date,INTERVAL 1 DAY)=@date, @rank:=@rank, @rank:=@rank+1) group_date,
@date:=fail_date fail_date
FROM
failed,
(SELECT @rank:=0, @date:='') rank
WHERE
fail_date BETWEEN '201... | true |
5522002bcfce33dd720178124a3ffaf13b1b6600 | SQL | ngstudant3/summerUniversity2015 | /src/test/resources/import.sql | UTF-8 | 7,924 | 3 | 3 | [] | no_license | -- IssueDate
insert into IssueDate(id, day, month, year) values(1, 2, 2, 1983);
insert into IssueDate(id, day, month, year) values(2, 27, 1, -983);
insert into IssueDate(id, year) values(3, -1500);
insert into IssueDate(id, day, month, year) values(4, 31, 3, 1923);
insert into IssueDate(id, day, month, year) values(5,... | true |
09e602e5004f816caae09620e95e0f2677e0a0b8 | SQL | TKM-MCA-2020-DBMS-LAB/20MCA233-SAKTHI-PRIYA-M-DBMS-LAB | /CollegeDatabase.sql | UTF-8 | 4,377 | 4.0625 | 4 | [] | no_license | create database College;
use college;
#(i) Create the tables:
#Student (sid, sname, sex, dob,dno) Department (dno, dname)
#Faculty (F_id, fname, designation, salary,dno) Course (cid, cname, credits,dno)
#Register (sid,cid,sem ) Teaching (f_id,cid,sem) Hostel(hid,hname,seats,)
#(ii) Include the necessary constraints NO... | true |
42b007c530d1aa68047261d2370d90e1cc61f45c | SQL | InnovellaInc/clients.lsg | /sql/errFailedMode.sql | UTF-8 | 1,505 | 3.515625 | 4 | [] | no_license | DROP PROCEDURE IF EXISTS `errFailedMode`
;
DELIMITER //
CREATE PROCEDURE errFailedMode
(
Proc_nm VARCHAR(64)
, Mode_cd VARCHAR(48)
, Action_nm VARCHAR(64)
, Table_nm VARCHAR(64)
)
BEGIN
/*
** Name: errFailedMode
** Type: Special Procedure
** Purpose: To raise an error and print message based on arguments
** pas... | true |
14f9ea1ced9fb000c9aa5db386d83ccfc258551f | SQL | Oddy-Nuff-Da-Snow-Leopard/Oracle-PL-SQL | /Scripts/L13.sql | WINDOWS-1251 | 5,568 | 4.25 | 4 | [] | no_license | --Task01
DROP PROCEDURE SHOW_TEACHERS_WORKING_AT_PULPIT;
CREATE OR REPLACE PROCEDURE SHOW_TEACHERS_WORKING_AT_PULPIT(P IN PULPIT.PULPIT%TYPE) IS
CURSOR TEACHER_CURSOR IS
SELECT TEACHER_NAME, PULPIT FROM TEACHER;
TEACHER_NAME TEACHER.TEACHER_NAME%TYPE;
TEACHER_PULPIT PULPIT.PULPIT%TYPE;
BEGIN
DBMS_OU... | true |
9a6e9b737acebe8871f7790ed84ce9b6a3412294 | SQL | MaksimDenisov/DiveSQL | /DB/6.6.4/solution.sql | UTF-8 | 1,328 | 3.859375 | 4 | [] | no_license | with diffTable AS (SELECT company,
week,
share_price,
stockquotes.share_price - LAG(share_price) OVER (PARTITION BY company ORDER BY week) AS diff
FROM stockquotes),
avgTable AS (SELECT company,
... | true |
800d1d20dda635010ccc93b709f2520fbab5b707 | SQL | smgk-seven/cloud20202 | /cloud-provider-payment8001/payment.sql | UTF-8 | 698 | 2.515625 | 3 | [] | no_license | /*
Navicat MySQL Data Transfer
Source Server : local_db
Source Server Version : 50711
Source Host : localhost:3306
Source Database : cloud2020
Target Server Type : MYSQL
Target Server Version : 50711
File Encoding : 65001
Date: 2020-03-09 20:43:34
*/
SET FOREIGN_KEY_CHECKS=0;
-- ... | true |
7f2f004f5305dba014aab1696e12c163b97f7f0f | SQL | salohins/nec | /DB3.sql | UTF-8 | 4,313 | 2.8125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.6.6deb5
-- https://www.phpmyadmin.net/
--
-- Host: localhost:3306
-- Generation Time: May 25, 2020 at 11:32 AM
-- Server version: 5.7.30-0ubuntu0.18.04.1
-- PHP Version: 7.2.24-0ubuntu0.18.04.4
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHA... | true |
f217ad8055614e6d340923a54eea15249185a955 | SQL | chelunike/Clase2111DAWM | /BD/Examenes/Examen2/Castilla Castillo, Antonio - Examen.txt.sql | UTF-8 | 1,872 | 3.546875 | 4 | [
"MIT"
] | permissive | 1c
create database BDA1Amigos
use BDA1Amigos
1d
create table amigo(
nombre varchar (30) primary key,
nacimiento date,
altura decimal (6,3)
)
1e
insert into amigo values ('Juan','16/7/1980',1.70)
insert into amigo values ('Ana','31/3/1990',1.65)
insert into amigo values ('Pedro','2/12/1985',1.85)
insert into amigo val... | true |
a6d114d07c399596b3edf7b43028a87cdb21c6f0 | SQL | xuan113/SQL | /SQL_query/days_with_visit.sql | UTF-8 | 886 | 4.03125 | 4 | [] | no_license | -- # days with visits
USE alexl;
DROP TABLE IF EXISTS alexl.days_with_visits_6741;
CREATE TABLE IF NOT EXISTS alexl.days_with_visits_6741 AS
SELECT
a.test_id,
a.test_name,
a.test_cell_nbr,
a.test_cell_name,
a.allocation_nbr as filter_allocation_nbr,
a.allocation_type as filter_allocation_type,
SUM(v.days... | true |
7da3b3ff3312fe57af5e8b22c7b68265e4e6befa | SQL | MaxWong03/BootcampX | /4_queries/cohort_average_assistance_duration.sql | UTF-8 | 296 | 4.0625 | 4 | [] | no_license | SELECT AVG(duration) AS average_total_duration FROM (SELECT cohorts.name, SUM(completed_at - started_at) AS duration FROM cohorts
INNER JOIN students ON cohorts.id = students.cohort_id
INNER JOIN assistance_requests as req ON req.student_id = students.id
GROUP BY cohorts.name) AS total_duration; | true |
9eb124d249e598b394531c49751ba8e100dfbeba | SQL | KarmaScripter/BudgetExecution | /Data/Database/Access/DataModels/UPDATE/UpdateSiteActivityEndDates.sql | UTF-8 | 307 | 2.671875 | 3 | [
"MIT"
] | permissive | INSERT INTO PayPeriods
SELECT DISTINCT RIGHT(PayrollActivity.PayPeriod, 2) AS Period, PayrollActivity.PayPeriod AS PayPeriod, PayrollActivity.StartDate AS StartDate, PayrollActivity.EndDate AS EndDate
FROM PayrollActivity
WHERE NOT IsNull(PayrollActivity.PayPeriod)
ORDER BY ExternalPayrollHours.PayPeriod;
| true |
d8fb182551a7388b42364508effd2fb28e2d0a93 | SQL | amateurdesperadoProfessional/sqlReceipts | /sqldata/receipt29.sql | UTF-8 | 510 | 2.671875 | 3 | [] | no_license | create table check_29 (
id int not null auto_increment,
productName varchar(255),
productPrice float,
primary key(id)
);
insert into check_29 (productName, productPrice) values
('chicken breast', 219.05),
('eggs', 34.99),
('porridge', 39.9),
('pie', 19.16),
('air freshener', 65.94),
('window cleaner', 115.... | true |
ade82b7e5658593a5bd04aaa039609758d5d2a63 | SQL | daniel2483/SQLPractice | /queries/Checking_Febrero_Semana_7_Tabla_Temp_RS.sql | UTF-8 | 208 | 2.609375 | 3 | [] | no_license | SELECT * FROM movistar_gua.Temp_preventivos_revenue_share where weekofyear(fecha)=7;
SELECT count(idTemp_preventivos_revenue_share) FROM movistar_gua.Temp_preventivos_revenue_share
where weekofyear(fecha)=7; | true |
b397a197b7b31e3b274abdc06154213f5ec09ce5 | SQL | tainenko/Leetcode2019 | /leetcode/editor/en/[1364]Number of Trusted Contacts of a Customer.sql | UTF-8 | 4,899 | 4 | 4 | [] | no_license | #Table: Customers
#
#
#+---------------+---------+
#| Column Name | Type |
#+---------------+---------+
#| customer_id | int |
#| customer_name | varchar |
#| email | varchar |
#+---------------+---------+
#customer_id is the primary key for this table.
#Each row of this table contains the name and... | true |
7fa18c362136c4432ade7ceef0afdfc18baea1ab | SQL | cckmit/xinfu | /ccms/WebContent/WEB-INF/action/project/fitness/customer/inleft/excel/query-base.sql | UTF-8 | 5,223 | 3.78125 | 4 | [] | no_license | (select
inleft.cardcode,
(select cabinettempcode from cc_cabinettemp where tuid::varchar = inleft.cabinettempcode and org_id = ${def:org}) as cabinettempcode,
cust.name,
cust.code as bianhao,
staff.name AS vc_inusername,
ct.name as vc_type,
inleft.intime,
inleft.lefttime,
inleft.code as leftc... | true |
801f1de897ce4a85401b1f54ce8dae452e618e14 | SQL | torrison/inside | /inside_dump.sql | UTF-8 | 31,813 | 3.078125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 3.2.3
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Apr 06, 2014 at 10:35 PM
-- Server version: 5.5.23
-- PHP Version: 5.3.13
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
--
-- Database: `dev`
--
-- --------------------------------------------------------
--
-- Ta... | true |
81b50cc00185a0623e1b7f35b796a8b16afc44f0 | SQL | yuriybon/userservice | /src/main/resources/schema-oracle.sql | UTF-8 | 1,459 | 3.546875 | 4 | [] | no_license | --drop table test;
-- create table test(id bigint auto_increment, name varchar(255));
-- insert into test(name) values('hello');
-- insert into test(name) values('world');
-- select * from test;
-- @Column(name = "USER_ID")
-- @GeneratedValue(strategy= GenerationType.AUTO)
-- private Long userId;
--
-- ... | true |
f75f3b761dc2d24dd784ec85936ef1f9cb7a3e1c | SQL | Denton-L/sqltify | /scripts/top_20_artists_by_count.sql | UTF-8 | 263 | 3.75 | 4 | [] | no_license | SELECT
artist.name, COUNT(*), COUNT(*) * 100.0 / (SELECT COUNT(*) FROM track) AS percentage
FROM
artistry
INNER JOIN track ON artistry.track_id = track.id
INNER JOIN artist ON artistry.artist_id = artist.id
GROUP BY artist.id
ORDER BY COUNT(*) DESC
LIMIT 20;
| true |
bf9d8db8ab9c8579469d6ef134dfa2adaba548d7 | SQL | 54kennywang/Mybnb | /mydb.sql | UTF-8 | 11,283 | 2.859375 | 3 | [] | no_license | -- MySQL dump 10.13 Distrib 8.0.16, for Win64 (x86_64)
--
-- Host: 127.0.0.1 Database: mydb
-- ------------------------------------------------------
-- Server version 5.7.26-0ubuntu0.18.04.1
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTE... | true |
57506ac5e97333fc30e4b01531425db3124e62b7 | SQL | osherz/DataBases.Market | /backend/querys/big_seniority.sql | UTF-8 | 104 | 2.6875 | 3 | [] | no_license | SELECT ID, salary, SENIORITY
FROM employees
where SENIORITY = (select max(SENIORITY)
from employees) | true |
4c53ca605c25781b0b2969282ffe1f4f3acdd9a9 | SQL | jnpefo/trybe-exercises | /Desenvolvimento Back-end/bloco_20/20_3/Bonus.sql | UTF-8 | 1,573 | 4.3125 | 4 | [] | no_license | -- Escreva uma query para exibir todas as informações de todos os cientistas
-- que possuam a letra e em seu nome.
SELECT * FROM Scientists.Scientists
WHERE name LIKE '%E%';
-- Escreva uma query para exibir o nome de todos os projetos cujo o código inicie com
-- a letra A . Ordene o resultado em ordem alfabétic... | true |
da14c7c7e7badd144cf0a877f2c276cc2368eb82 | SQL | Piscess/xk_graduation | /db/db.sql | UTF-8 | 795 | 2.640625 | 3 | [] | no_license | SET NAMES UTF8;
DROP DATABASE IF EXISTS xk_education;
CREATE DATABASE xk_education CHARSET UTF8;
USE xk_education;
#用户表 用户名 密码 姓名 权限 学号 年级 系别 班级
CREATE TABLE e_user (
uid INT PRIMARY KEY AUTO_INCREMENT,
uname VARCHAR(32) NOT NULL DEFAULT '',
upwd VARCHAR(32) NOT NULL DEFAULT '',
username VARCHAR(32) NOT N... | true |
314c475ebaa44ab4e056434958cc0d4b4d11c8e9 | SQL | misterbarbas/work_space_fitit | /chat.sql | UTF-8 | 815 | 3.328125 | 3 | [
"LicenseRef-scancode-unknown-license-reference",
"MIT"
] | permissive | --
-- Estructura de la tabla `webchat_lines`
--
CREATE TABLE `webchat_lines` (
`id` int(10) unsigned NOT NULL auto_increment,
`author` varchar(16) NOT NULL,
`gravatar` varchar(32) NOT NULL,
`text` varchar(255) NOT NULL,
`ts` timestamp NOT NULL default CURRENT_TIMESTAMP,
PRIMARY KEY (`id`),
KEY `ts` (`ts... | true |
d46db2cd98c97fd901074106c00e37fb70669096 | SQL | dm1905once/cap2_examine_client | /db_dump.sql | UTF-8 | 6,705 | 3.125 | 3 | [] | no_license | --
-- PostgreSQL database dump
--
-- Dumped from database version 12.1
-- Dumped by pg_dump version 12.1
SET statement_timeout = 0;
SET lock_timeout = 0;
SET idle_in_transaction_session_timeout = 0;
SET client_encoding = 'UTF8';
SET standard_conforming_strings = on;
SELECT pg_catalog.set_config('search_path', '', fal... | true |
69c493b28dae5754120969aacba4b88a4492e3ce | SQL | chinmoym2004/openblog | /openblog.sql | UTF-8 | 4,847 | 3.0625 | 3 | [
"MIT"
] | permissive | -- phpMyAdmin SQL Dump
-- version 4.0.4.1
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Jan 05, 2014 at 10:50 AM
-- Server version: 5.5.32
-- PHP Version: 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 */... | true |
6376cb5b613c5c5104a77133c5d2f202a3767729 | SQL | AndreyArguedas/Bases-de-Datos-2 | /SEMANA II/ClaseIII/script.sql | UTF-8 | 1,667 | 3.796875 | 4 | [] | no_license | -- start 2018-07-30-permisos8pm.sql
host cls
PROMPT Nos conectamos como system
conn system/root
PROMPT Dropeamos el usuario conta
drop user conta cascade;
drop user juan cascade;
PROMPT Dropeamos el rol R_CREA_TABLA
drop role R_CREA_TABLA;
drop role R_CONSULTA;
PROMPT Creamos el usuario CONTA (Sistema de Contabilida... | true |
3d0c9a54984a043257502e7419a2ce14e9cbc754 | SQL | soon14/3ucsERP | /xbs/install/orderNoYearMon.sql | UTF-8 | 7,014 | 3.25 | 3 | [
"Apache-2.0"
] | permissive | DELIMITER $$
USE `xbs`$$
DROP FUNCTION IF EXISTS `generate_orderNo`$$
CREATE DEFINER=`i3u`@`localhost` FUNCTION `generate_orderNo`(orderNamePre VARCHAR(5), num INT,maxNo INT,orderTbl VARCHAR(20),orderNo VARCHAR(20)) RETURNS VARCHAR(50) CHARSET utf8
BEGIN
DECLARE currentDate VARCHAR (15) ;
DECLARE oldOrde... | true |
a0498e5678f6a5bd322206216f78cd27062ede20 | SQL | jedistev/mysql-query | /Group by Transcation fee.sql | UTF-8 | 404 | 3.109375 | 3 | [] | no_license | SELECT settlement_id,
settlement_start_date,
settlement_end_date,
total_amount,
SUM(IF(transaction_type = 'order',amount,0)) AS 'Order',
SUM(IF(transaction_type = 'refund',amount,0)) AS 'Refund',
SUM(IF(transaction_type = 'ServiceFee',amount,0)) AS 'Servicefee',
SUM(IF(transaction_type = 'Serv... | true |
a54370d4435771211dabbc020a1d1f8361114509 | SQL | soft1302/ssm-project | /src/config/sysuser.sql | UTF-8 | 675 | 2.53125 | 3 | [] | no_license | /*
Navicat MySQL Data Transfer
Source Server : stu
Source Server Version : 50540
Source Host : 127.0.0.1:3306
Source Database : ssmtest
Target Server Type : MYSQL
Target Server Version : 50540
File Encoding : 65001
Date: 2016-12-06 22:33:59
*/
SET FOREIGN_KEY_CHECKS... | true |
bf8d9749cb44a4cb03708544d55a314fc694b87d | SQL | j7ng/CLFY_SA | /SA/Tables/X_BOGO_ACTION_TYPE.sql | UTF-8 | 253 | 2.625 | 3 | [] | no_license | CREATE TABLE sa.x_bogo_action_type (
action_type VARCHAR2(240 BYTE) NOT NULL
);
COMMENT ON TABLE sa.x_bogo_action_type IS 'TF BOGO valid action type per brand';
COMMENT ON COLUMN sa.x_bogo_action_type.action_type IS 'BOGO application action type'; | true |
793541742a7f58e164968aa0f212c5e47703a57f | SQL | vapawar/ora | /demoz/42_cursor.sql | UTF-8 | 257 | 2.890625 | 3 | [] | no_license | DECLARE
total_rows NUMBER(2);
BEGIN
UPDATE customers SET salary = salary + 500;
IF sql%notfound THEN
dbms_output.put_line('No data found....');
elsif sql%found THEN
dbms_output.put_line(total_rows ||' customers are selected');
END IF;
END; | true |
994dae5e92834cf42e9277a3784501fbfac685f8 | SQL | s-osa/postgres-playground | /range/sql/04b_create_reservations_table.sql | UTF-8 | 296 | 3.265625 | 3 | [
"MIT"
] | permissive | create table reservations
(
room_id bigint,
during int8range,
exclude using gist (room_id with =, during with &&)
);
create index reservations_room_id_during_idx on reservations using gist (room_id, during);
create index reservations_during_idx on reservations using gist (during);
| true |
e886d8c088766aa11506487b00da123299086cf8 | SQL | batego/Soporte_Fintra | /Corregir_saldos_decimal.sql | UTF-8 | 605 | 2.8125 | 3 | [] | no_license | select * from con.factura --where nit = '1042353049'
--update con.factura set valor_abono = 46040.4 ,valor_saldo = 0.00, valor_abonome = 46040.4, valor_saldome= 0.00
where valor_saldo < 1 and valor_saldo > 0
--valor_factura != valor_abono and valor_abono != 0.00 and negasoc != ''
select valor_factura, valor_saldo ... | true |
7fad85bb96973a88098f0b02b36622e111e1b733 | SQL | AnselmoBorges/mapacovid19 | /scripts/estrutura_postgres.sql | UTF-8 | 1,271 | 3.875 | 4 | [] | no_license | -- Criando o schema:
create schema covid;
-- Criando a tabela Municipios:
CREATE TABLE covid.municipios
(
codigo_ibge text,
nome text,
latitude text,
longitude text,
capital text,
codigo_uf text
)
TABLESPACE pg_default;
ALTER TABLE covid.municipios
OWNER to postgres;
-- Criando a tabela ... | true |
10586dc78805124b2dc541310529a8b8f0eb046b | SQL | lenapy/SQL_learning | /queries.sql | UTF-8 | 5,457 | 4.28125 | 4 | [] | no_license | SELECT name, surname, birthday
FROM customer
WHERE regular_customer = 1
AND EXTRACT(month FROM now()) = EXTRACT(month FROM birthday);
SELECT id, name, date_ending
FROM promotion
WHERE date_ending = 'today'::date + interval '7 day';
SELECT provider.name
FROM provider
WHERE provider.id NOT IN (SELECT provider.id... | true |
af4e24f50e0b6e2aa71473578f403988e785f1bc | SQL | daqasimi18/Data-Science | /Database Systems Projects/8-2-3.sql | UTF-8 | 703 | 3.4375 | 3 | [] | no_license | /* A */
/* No it not. Because the view is made of two different relations. */
/* B */
CREATE TRIGGER NewPCInsert
INSTEAD OF INSERT ON NewPC
REFERENCING NEW ROW AS NewRow
FOR EACH ROW
(INSERT INTO Product VALUES(NewRow.maker, NewRow.model, 'pc'))
(INSERT INTO PC VALUES(NewRow.model, NewRow.speed, NewRow.ram, NewRow.hd,... | true |
61e972d2770b9e6a53dc2ceaf902723e1065a619 | SQL | noah-green/shopkeeper | /sql/schema.sql | UTF-8 | 156 | 2.578125 | 3 | [] | no_license | CREATE TABLE guilds(
guild BIGINT NOT NULL,
sheet_id VARCHAR(80) NOT NULL,
created TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY(guild)
);
| true |
a4bb4a535b2a5aa59f251e5888221a5e86e76852 | SQL | huangshiqiang/com.gcxcx | /code/cn.elwy.eplus/cn.elwy.eplus.core/src/main/resources/database/cn.elwy.core.sql | UTF-8 | 31,605 | 3.4375 | 3 | [
"Apache-2.0"
] | permissive | /*
-- --------------------------------------------------------
-- 作者:黄仕强
-- 系统版本:version 2.0
-- 创建日期:2018-02-19 20:30:00
-- 版权所有:2027-02-19 All Right Reserved IN www.elwy.cn
-- 文件描述:创建数据库表、视图以及初始化系统数据
-- 表名命名规则:
-- 1.前两个字母表示应用名称,用于区分不同的系统
-- 2.第三个字母到"_"前的字符表示对象类型,可以取值:
-- F方法、I索引、P分区表、S序列、T表、V视图、PR存储过程、TR触发... | true |
0923ac8822035b3d49f88e3bf24b6cc567f965a6 | SQL | smart-window/stripe-store | /database/scripts.sql | UTF-8 | 589 | 3.03125 | 3 | [
"MIT"
] | permissive | -- ecommerce.users definition
CREATE TABLE `carts` (
`id` int NOT NULL AUTO_INCREMENT,
`user_id` varchar(200) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
CREATE TABLE `cart_items` (
`id` int NOT NULL AUTO_INCREMENT,
`cart_id` varchar(200) NOT NULL,
`pr... | true |
a5241247d753de3b607ef6b4e708be7b606ab3a0 | SQL | DiKarpB/otus-java-2020-09 | /hw09-orm/src/main/resources/db/migration/V1__initial_schema.sql | UTF-8 | 329 | 2.890625 | 3 | [] | no_license | create table client
(
id bigserial not null primary key,
name varchar(50),
age integer
);
create sequence account_no_seq
start with 10000;
create table account
(
no varchar(7) not null primary key default nextval('account_no_seq')::text,
type varchar(20),
rest double pre... | true |
8faa00e62c1d05fee87426a2c4db044e80faa44a | SQL | stonezhu870/quick.framework | /mysql/yudb.sql | UTF-8 | 6,147 | 3.046875 | 3 | [] | no_license | /*
Navicat MariaDB Data Transfer
Source Server : mariadb
Source Server Version : 100207
Source Host : localhost:3306
Source Database : yudb
Target Server Type : MariaDB
Target Server Version : 100207
File Encoding : 65001
Date: 2017-08-28 17:30:00
*/
SET FOREIGN_KEY_CHECKS=0;
-- ... | true |
aa09ffad9acf060b76dd45232bea9fa0b5d7f44f | SQL | jabautista/GeniisysSCA | /src/main/resources/sql/procedures/post_frm_commit_gipis017b.prc | UTF-8 | 2,592 | 2.78125 | 3 | [] | no_license | DROP PROCEDURE CPI.POST_FRM_COMMIT_GIPIS017B;
CREATE OR REPLACE PROCEDURE CPI.post_frm_commit_gipis017b (
p_par_id gipi_parlist.par_id%TYPE,
p_bond_tsi_amt IN gipi_winvoice.bond_tsi_amt%TYPE,
p_prem_amt IN gipi_winvoice.prem_amt%TYPE,
p_bond_rate IN gipi_winv... | true |
9c851a6977833bc5a5227c85cb7d535e65d8307d | SQL | liyan234/aboutDataStructure | /AMusicPlayer/src/db.sql | UTF-8 | 1,111 | 3.234375 | 3 | [] | no_license | drop database if exists musicserver;
create database if not exists musicserver;
use musicserver;
drop table if exists music;
create table music (
id int primary key auto_increment,
title varchar(50) not null,
singer varchar(50) not null,
time varchar(13) not null,
url varchar(100) not null,
us... | true |
2705829afdf0c3d54ac1407dba075c22dfce784e | SQL | JorgePablol/hackerrank_mysql | /weather_observation_station_18.sql | UTF-8 | 319 | 3.5625 | 4 | [] | no_license | /*
WEATHER OBSERVATION STATION 18
Query the Manhattan Distance between points P1 and P2 and round it to a scale of 4 decimal places.
LINK = https://www.hackerrank.com/challenges/weather-observation-station-18/problem
*/
SELECT ROUND( MAX(LAT_N)-MIN(LAT_N),4) + ROUND( MAX(LONG_W)-MIN(LONG_W),4) FROM STATION;
| true |
396e93968ed5795c15ec2a758262de56fbba392d | SQL | WindsorSolutions/opennode2-java | /node-plugin/node-plugin-icisnpdes/src/main/assembly/outer/ddl/ICS_5.8_ORA/views/ICIS_5.8-ORA-Change Detection Views.sql | UTF-8 | 140,170 | 3.546875 | 4 | [] | no_license | /*
Copyright (c) 2012, The Environmental Council of the States (ECOS)
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
* Redistributions of source code must retain the above copyright
notice, this ... | true |
0ff1afa36cae461e765cabd5bcf4be670f19ce66 | SQL | riddhikshrestha/flask-app | /contact_book.sql | UTF-8 | 1,576 | 2.984375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Jun 15, 2020 at 08:20 PM
-- Server version: 10.4.11-MariaDB
-- PHP Version: 7.2.31
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIE... | true |
a46cbf02b1034a0e093b0253dbd9486cf270d523 | SQL | omegazip/dba_scripts | /common/sql/rac_instances.sql | UTF-8 | 3,016 | 3.546875 | 4 | [] | no_license | -- +----------------------------------------------------------------------------+
-- | Jeffrey M. Hunter |
-- | jhunter@idevelopment.info |
-- | www.idevelopment.info ... | true |
1004b0dff31e330fb1b12114da6ada16e852a6b1 | SQL | dante-signal31/cifra-rust | /migrations/2020-03-01-012827_words/up.sql | UTF-8 | 278 | 3.3125 | 3 | [
"BSD-3-Clause"
] | permissive | -- Your SQL goes here
CREATE TABLE words(
id INTEGER NOT NULL PRIMARY KEY,
word TEXT NOT NULL,
word_pattern TEXT NOT NULL,
language_id INTEGER NOT NULL,
FOREIGN KEY (language_id) REFERENCES languages(id)
on delete cascade
on update cascade
); | true |
2ee3f958c482617b4af9ca6d16dc6a593f900a78 | SQL | rozdol/bi-src | /config/setup.sql | UTF-8 | 3,937 | 3.484375 | 3 | [] | no_license | ------Project's queries------
CREATE TABLE rates(
id serial NOT NULL,
date date,
currency integer DEFAULT 0,
rate double precision DEFAULT 0,
CONSTRAINT rates_pkey PRIMARY KEY (id)
)WITH OIDS;
CREATE TABLE rates_local(
id serial NOT NULL,
date date,
curr_id integer,
rate double precision DEFAULT 0,
... | true |
08706359170c270db603032cba873c68d92fa1c4 | SQL | NoraCarey/Leetcode-SQL | /SQL/1635. Hopper Company Queries I/mysql_recursive_cte.sql | UTF-8 | 1,149 | 4.1875 | 4 | [] | no_license |
WITH recursive cte1 AS (SELECT 1 AS month
UNION ALL
SELECT month + 1 AS month
FROM cte1
WHERE month < 12),
cte2 AS (SELECT CASE
WHEN YEAR(join_dat... | true |
69d1f44ba7efa0fedf7cef2284dfe4a1ae682528 | SQL | salihonder0/Sikayet_Sistemi | /sikayet.sql | UTF-8 | 3,247 | 3.484375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 5.1.0
-- https://www.phpmyadmin.net/
--
-- Anamakine: 127.0.0.1
-- Üretim Zamanı: 26 Tem 2021, 22:45:53
-- Sunucu sürümü: 10.4.18-MariaDB
-- PHP Sürümü: 8.0.5
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=... | true |
7196aa4513d50dfce6b844cdda92cfd9765fcd85 | SQL | diguage/donkey | /src/test/resources/sql/customer_init.sql | UTF-8 | 688 | 3.046875 | 3 | [
"Apache-2.0"
] | permissive | # DROP DATABASE IF EXISTS dmvc_test;
#
# CREATE DATABASE dmvc_test
# DEFAULT CHARACTER SET utf8
# DEFAULT COLLATE utf8_general_ci;
DROP TABLE IF EXISTS customer;
CREATE TABLE customer(id INT(11) PRIMARY KEY NOT NULL AUTO_INCREMENT,name VARCHAR(255) NOT NULL,contact VARCHAR(255) NOT NULL... | true |
a4f5d13341fedce1ded659d2e53996c6c22b52ce | SQL | methgus12/sql | /10.insert.sql | UTF-8 | 3,653 | 4.03125 | 4 | [] | no_license | --insert문
--테이블구조 확인
desc departments;
--1nd
insert into departments (department_id , department_name, manager_id, location_id) values (290, '개발자',200, 1700 );
insert into departments (department_id ,department_name, location_id) values (300, '디자이너' , 1700);
insert into departments (department_id ,department_name, ... | true |
b482e79609b09245f66c3df211f09d209b54bcd1 | SQL | manasi24-git/Library-Management-system | /library_queries.sql | UTF-8 | 1,784 | 3.234375 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | -- phpMyAdmin SQL Dump
-- version 5.0.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Feb 26, 2020 at 06:06 AM
-- Server version: 10.4.11-MariaDB
-- PHP Version: 7.4.1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD... | true |
3deb3b5cf0a440699cb600ad5418348592daa86b | SQL | Casxt/WeiboLite | /database/InitDatabase/CreateWeibo.sql | UTF-8 | 895 | 3.546875 | 4 | [] | no_license | CREATE TYPE forward_type_enum as ENUM('Weibo','Comment','NoForward');
CREATE TABLE weibo (
id BIGSERIAL PRIMARY KEY,
user_id INT8 NOT NULL,
content VARCHAR ( 512 ) NOT NULL,
/*最多9张图片,记录格式 {imghash1,imghash2,...,imghashN}*/
--images CHAR(64)[] DEFAULT '{}' NOT NULL CHECK (array_length(images, 1) <= 9),
forward_... | true |
20709030c0b958922afa9bc977d8af53e028a1f2 | SQL | VanKhaos/PHP_2021 | /Project_Projektverwaltung/Projektverwaltung.sql | UTF-8 | 2,579 | 3.609375 | 4 | [] | no_license | create database Projektverwaltung;
use Projektverwaltung;
--------------------------------------------------------------------------------------------------MITARBEITER
drop table if exists Mitarbeiter;
create table Mitarbeiter
(PersNr integer primary key auto_increment,
Nachname varchar (50),
Vorname varchar... | true |
82d3a39c2b0224ba828b84903416a78ca837adff | SQL | matisenharper/summer-conferencing | /db/build/build_room.sql | UTF-8 | 435 | 3.09375 | 3 | [] | no_license | use mharper5;
SET FOREIGN_KEY_CHECKS=0;
select "Starting drop tables";
drop table cosc4157_room;
select "completed drops";
/* */
create table cosc4157_room
(room_id smallint unsigned not null auto_increment,
residence_hall_id smallint not null,
room_number varchar(4) not null,
room_type varchar(20),
room_st... | true |
31794f08cae3fcd4ab490eca34c16158ab69bc97 | SQL | qq57694878/study | /daily/database/oracle/exception.sql | UTF-8 | 43,121 | 3.703125 | 4 | [] | no_license | CREATE OR REPLACE TRIGGER city_insert
AFTER INSERT OR DELETE OR UPDATE ON CITY
FOR EACH ROW
DECLARE
MYEXCEPTION EXCEPTION;
PRAGMA EXCEPTION_INIT(MYEXCEPTION,-20001);
V_SQL VARCHAR2(4000):='';
BEGIN
CASE WHEN INSERTING THEN
V_SQL:=:NEW.ID||'--'||:NEW.NAME;
INSERT INTO SQL_LOG(ID,SQL_LOG,CD... | true |
1a1632b9da0ea0c5f81031895faa673942b15903 | SQL | AkberAlwani/DBAScripts | /Duplicate_Reqline.sql | UTF-8 | 763 | 3.46875 | 3 | [] | no_license | SELECT ROW_NUMBER() OVER (Partition By idfRQHeaderKey ORDER BY idfRQDetailKey) AS NewLine, idfLine,idfRQHeaderKey,*
FROM RQDetail
update RQDetail set idfLine=1 where idfLine=2
UPDATE RQDetail set idfLine=NewLine
from (SELECT ROW_NUMBER() OVER (Partition By idfRQHeaderKey ORDER BY idfRQDetailKey) AS NewLine, idfRQDet... | true |
15f3372ba3f9b47a5ebde4119c9911df5ca320cf | SQL | liuouya/osIROSE-new | /Database/osirose.sql | UTF-8 | 8,074 | 3 | 3 | [
"Apache-2.0"
] | permissive | -- MySQL dump 10.13 Distrib 5.7.9, for Win64 (x86_64)
--
-- Host: localhost Database: osirose
-- ------------------------------------------------------
-- Server version 5.7.9-log
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/... | true |
bd90f6b63e95020709b5066055a71f4bc29f0131 | SQL | contrasam/dwell-shop | /src/migrations/20150321013902_create_images_table.sql | UTF-8 | 217 | 2.6875 | 3 | [] | no_license | DROP TABLE IF EXISTS `dwell_shop`.`images` ;
CREATE TABLE IF NOT EXISTS `dwell_shop`.`images` (
`id` INT NOT NULL,
`code` VARCHAR(100) NULL,
`caption` VARCHAR(200) NULL,
PRIMARY KEY (`id`))
ENGINE = InnoDB; | true |
3c9d5308e0a8b2c8e54badeffac97688dfd2851b | SQL | VictorOdhiambo/KilimoHighSchool | /Database/kilimo.sql | UTF-8 | 1,997 | 3.1875 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Jul 23, 2021 at 09:45 AM
-- Server version: 10.4.11-MariaDB
-- PHP Version: 7.4.6
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIEN... | true |
a7fd4f1e92d877fba7b66b30e4f82ee5c604dd5b | SQL | CUTR-at-USF/retro-gtfs | /debug/route-quality-measures.sql | UTF-8 | 2,114 | 4.4375 | 4 | [] | no_license | /*
This script measures the quality of trip matches. It uses psql
variables and should be run with psql on a PostgreSQL 9.5+ database.
You'll need to provide a table name prefix or otherwise change the
table names to distinguish among agencies within a database.
*/
-- set your table names here
\set prefix ... | true |
55964872e1e6a1144ac53f7bc2b79ff4be6aac2f | SQL | rajeshghourvani/assessor | /assessorportal/AMPSQL/AMP/Packages/BPEL_TAM_MGMT.sql | UTF-8 | 1,249 | 2.671875 | 3 | [] | no_license | --------------------------------------------------------
-- File created - Wednesday-July-13-2016
--------------------------------------------------------
--------------------------------------------------------
-- DDL for Package BPEL_TAM_MGMT
--------------------------------------------------------
CREATE OR RE... | true |
cd8b86bb44c80326d5509f8361647858d272ab45 | SQL | CrystallizedSnowflakes/MySQL-SoftUni | /07_User-defined_FUNCTIONS_PROCEDURES_TRANSACTIONS_TRIGGERS/Lab/04-Triggered-CREATE_TRIGGER-AFTER_DELETE-OLD.sql | UTF-8 | 1,139 | 4.65625 | 5 | [] | no_license | -- TRIGGERS
-- Create a table deleted_employees(employee_id PK, first_name,last_name,middle_name,job_title,deparment_id,salary)
-- that will hold information about fired(deleted) employees from the employees table.
-- Add a trigger to employees table that inserts the corresponding information in deleted_employees.
... | true |
910179dcb5e6f74d34966449130286220783e04c | SQL | with-sahan/jentest | /database/CreateDatabase/Tables/psm_election.sql | UTF-8 | 2,289 | 3.203125 | 3 | [] | no_license | -- MySQL dump 10.13 Distrib 5.6.24, for Win64 (x86_64)
--
-- Host: 127.0.0.1 Database: psm
-- ------------------------------------------------------
-- Server version 5.5.47
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!4010... | true |
c530acc94a6873ed20adb6011f595d565811a07e | SQL | sheldonchaves/meu-controle-financeiro | /Money/Money-ejb/src/java/xml/bd_money.sql | UTF-8 | 6,273 | 3.578125 | 4 | [] | no_license | DROP TABLE IF EXISTS `guilherm_money`.`money_usuario`;
CREATE TABLE `guilherm_money`.`money_usuario` (
`id` bigint(20) NOT NULL auto_increment,
`ds_email` varchar(100) NOT NULL,
`ds_first_name` varchar(30) NOT NULL,
`ds_last_name` varchar(30) NOT NULL,
`ds_login` varchar(10) NOT NULL,
`ds_password` ... | true |
e1d3b36d0f4f38c61b7d955608c28b20c2d5c5d5 | SQL | Misbac/WAD-MISBACHUL-1202183345 | /MODUL4 MISBACHUL/wad_modul4.sql | UTF-8 | 2,313 | 3.0625 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 5.0.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Waktu pembuatan: 22 Nov 2020 pada 02.08
-- Versi server: 10.4.11-MariaDB
-- Versi PHP: 7.4.2
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARA... | true |
78fd4e4da293f49fd369922037b57fc6e4f032a6 | SQL | adhimos/oscommercial | /db_script.sql | UTF-8 | 3,166 | 3.3125 | 3 | [] | no_license | USE oscommerce;
CREATE TABLE IF NOT EXISTS `wa_sessions` (
`session_id` bigint(20) NOT NULL AUTO_INCREMENT,
`session_key` varchar(255) DEFAULT NULL,
`customer_id` int(11) DEFAULT NULL,
`session_starttime` datetime NOT NULL,
`session_year` int(4) NOT NULL,
`session_month` int(2) NOT NULL,
`session_month_s... | true |
94a752794c8015c7eafa2c8a5a075ed3cbcecd55 | SQL | e29ckg/courts | /mySql/court_scan.sql | UTF-8 | 24,225 | 3.125 | 3 | [
"BSD-3-Clause"
] | permissive | -- phpMyAdmin SQL Dump
-- version 4.2.2
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Dec 17, 2016 at 03:16 PM
-- Server version: 5.1.45-community
-- PHP Version: 5.4.40
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_C... | true |
05559a4a1c53a9f75194f4dd35b0e5001d8dec14 | SQL | Firooz-Bright/sql-crowdfunding-lab-onl01-seng-pt-012220 | /lib/create.sql | UTF-8 | 318 | 2.65625 | 3 | [
"LicenseRef-scancode-unknown-license-reference",
"LicenseRef-scancode-public-domain"
] | permissive | CREATE TABLE users (id INTEGER PRIMARY KEY,name TEXT, age INTEGER );
CREATE TABLE projects(id INTEGER PRIMARY KEY,title TEXT, category TEXT, funding_goal INTEGER, start_date TEXT, end_date TEXT);
CREATE TABLE pledges( id INTEGER PRIMARY KEY, amount INTEGER, user_id INTEGER, project_id INTEGER);
| true |
4efef1c41cedd7836661311d7825b7243588d028 | SQL | Barni-pal/WF-Barnabas-Doebroessy-CodeReview05 | /cr09_barnabas_doebroessy_carrental_queries.sql | UTF-8 | 360 | 3.265625 | 3 | [] | no_license | -- SELECT p.payment_id, c.name, invoice_id, payment_form
-- FROM payments p
-- JOIN payment_methods pm
-- ON p.payment_method_id = pm.payment_id
-- JOIN clients c
-- ON c.client_id = p.client_id
SELECT rent_id, c.name, r.location_end, l.station_name
FROM rent r
JOIN location l
ON l.station_id = r.location_end
JOIN... | true |
b8f28c998931fef7a5f5961aad5ea1cd8ce93a45 | SQL | VickyZauner/lab-mysql | /your-code/create.sql | UTF-8 | 724 | 3.0625 | 3 | [] | no_license | USE lab_mysql;
CREATE TABLE Cars
(ID INT auto_increment, Vehicle_ID VARCHAR(30), Manufacturer VARCHAR(30), Model VARCHAR(30), Year YEAR, Color VARCHAR(10), Primary key (ID));
CREATE TABLE Customers
(ID INT auto_increment, Customer_ID VARCHAR(30), Name VARCHAR(30), Phone VARCHAR(30), Email VARCHAR(30), Address VARCHAR... | true |
b87ac01c34ad7eb913e6c2e28cf4c7764f7a767a | SQL | RosenBobchev/CSharp-DB-Fundamentals | /Database Basic/Exam Preparation/Databases MSSQL Server Exam - 22 October 2017/Databases MSSQL Server Exam - 22 October 2017/11. Emergency Patrol .sql | UTF-8 | 344 | 3.71875 | 4 | [
"MIT"
] | permissive | SELECT r.OpenDate, r.DESCRIPTION, u.Email AS [Reporter Email]
FROM Reports AS r
JOIN Users AS u
ON u.Id = r.UserId
JOIN Categories AS c
ON c.Id = r.CategoryId
WHERE r.CloseDate IS NULL AND LEN(r.DESCRIPTION) > 20
AND r.DESCRIPTION LIKE '%str%'
AND c.DepartmentId IN(1, 4, 5)
ORDER BY r... | true |
9811a394730f64f20d828f8e0589ace9fa7ab75e | SQL | RSAsir/GBD | /BASES DE DATOS YA HECHAS/emp2-dep2/tablas SQL/EMP2.SQL | ISO-8859-10 | 1,328 | 2.8125 | 3 | [] | no_license | DROP TABLE EMP2;
CREATE TABLE EMP2 (
EMP_NO int NOT NULL,
APELLIDO VARCHAR(15),
OFICIO VARCHAR(10),
DIR int,
FECHA_ALT smalldatetime,
SALARIO money,
COMISION money,
DEPT_NO int);
INSERT INTO EMP2
VALUES(7369,'SANCHEZ','EMPLEADO',7902,'17-DIC-1980',625,NULL,20);
INSERT INTO EMP2
VALUES(7499,'ARROYO','VENDEDOR',7698,'20-... | true |
8e3974c89bf3a97393a735c172591b1947183de2 | SQL | brunosusak/RNWA-TIM21 | /sql/clinic.sql | UTF-8 | 21,320 | 3.1875 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 5.1.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Sep 26, 2021 at 07:17 PM
-- Server version: 10.4.21-MariaDB
-- PHP Version: 7.3.30
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIE... | true |
1094ce219478da7e041897505dcd8953c3b1073a | SQL | seungwonburm/sisbroker_config | /query.sql | UTF-8 | 1,580 | 3.140625 | 3 | [] | no_license | CREATE TABLE client(
id INT NOT NULL AUTO_INCREMENT,
email VARCHAR(45) NOT NULL ,
institution VARCHAR(45) NOT NULL,
department VARCHAR(45) NOT NULL,
position VARCHAR(45) NOT NULL,
client_key VARCHAR(100) NOT NULL,
password VARCHAR(100) NOT NULL,
name VARCHAR(45) NOT NULL,
CONSTRAINT ... | true |
65408cf70879b58ffefb816874dc4e8adafe6136 | SQL | solidfusioncorp/gerenciador_arquivos | /gerenciador_08-09-2018.sql | UTF-8 | 1,964 | 3.265625 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 3.5.1
-- http://www.phpmyadmin.net
--
-- Servidor: localhost
-- Tempo de Geração:
-- Versão do Servidor: 5.5.24-log
-- Versão do PHP: 5.4.3
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET... | true |
b060819f11e0f4a1d16eb3df841d99843f4943ce | SQL | theos123456/natalie | /database/house.sql | UTF-8 | 3,721 | 3.1875 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 2.11.0
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Oct 13, 2019 at 05:47 PM
-- Server version: 5.0.45
-- PHP Version: 5.2.4
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
--
-- Database: `house`
--
-- --------------------------------------------------------
--
-- ... | true |
6fe6c7dce1b68ae69024547cd0196085d87eecfd | SQL | Ruzhelovich-Vladimir/B2B | /trigers.sql | UTF-8 | 1,059 | 3.390625 | 3 | [] | no_license | /*
Сдалел простые тригеры заполнения полей дата и время создания и обновления.
К сожалению не смог разобраться как сделать тригер, который бы запрещал удалять записи, но помечал записи на удаление в отдельном поле,
не сообщая об ошибке, просто помечая или разотмечая запись на удаление.
Т.е. если она помечены на удал... | true |
9e55bb63d7d25661f7b8652fd1ea09835db41389 | SQL | brijesh-spring/hostelwebapp-thymeleaf | /create-database.sql | UTF-8 | 6,830 | 3.078125 | 3 | [] | no_license | CREATE TABLE `address` (
`id` bigint(20) NOT NULL,
`address_line1` varchar(255) DEFAULT NULL,
`address_line2` varchar(255) DEFAULT NULL,
`city` varchar(255) DEFAULT NULL,
`county` varchar(255) DEFAULT NULL,
`house_no` varchar(255) DEFAULT NULL,
`landmark` varchar(255) DEFAULT NULL,
`plot_no` varchar(255... | true |
f6eee648f408074bc30dcbaee75b6d12d79086a9 | SQL | jzamora5/holbertonschool-web_back_end | /0x0C-MySQL_Advanced/0-uniq_users.sql | UTF-8 | 200 | 2.71875 | 3 | [] | no_license | -- 0. We are all unique!
-- creates a table users
CREATE TABLE IF NOT EXISTS users (
id INT AUTO_INCREMENT,
email VARCHAR(255) NOT NULL UNIQUE,
name VARCHAR(255),
PRIMARY KEY (id)
);
| true |
06fc914f7df01001b796ab277a711973f1934326 | SQL | pjuliano/glowing-waffle | /Work In Progress/Customer Reports/Down or Lost Product Families Union.sql | UTF-8 | 5,450 | 3.359375 | 3 | [] | no_license | Create Or Replace View KD_Down_Or_Lost_PF_Union As
SELECT
'' as Status,
SD.Customer_No,
SD.Part_Product_Family,
SUM(Case When SD.InvoiceDate >= Trunc(Sysdate)-90 Then SD.AllAmounts Else 0 End) As Rolling_90D,
SUM(Case When SD.InvoiceDate Between Add_Months(Trunc(Sysdate)-90,-12) And Add_Months(Trunc... | true |
4b954b4c2fdc37113feafcb64d0ddffba7450d23 | SQL | locurasystems/unic | /schema/unic.sql | UTF-8 | 8,633 | 3.171875 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.1.4
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Jan 15, 2014 at 11:52 AM
-- Server version: 5.6.15
-- PHP Version: 5.4.17
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
... | true |
efd3de7e728d51d6bfd7bbea875c39f71a91736f | SQL | SvetlanaGolub/Data_science_2020 | /Сatch_The_Russian Spies/create_views.sql | UTF-8 | 17,683 | 3.65625 | 4 | [] | no_license | 1. pax_info - все пассажиры
CREATE MATERIALIZED VIEW public.pax_info
TABLESPACE pg_default
AS
WITH paxes AS (
SELECT DISTINCT aggregator_users.last_name,
aggregator_users.first_name,
NULL::text AS second_name,
NULL::text AS document,
NULL::date AS birth_date
... | true |
6d8fe39a555959293491fc6383e34a82d4c5b0a9 | SQL | endeavourhealth-discovery/InformationModel | /database/37b.mapping-LNWH-Symphony.sql | UTF-8 | 17,115 | 3.328125 | 3 | [
"Apache-2.0"
] | permissive | -- ****************************************************
-- ** REQUIRES
-- ** - FHIR/Language
-- ** - NHSDD/Religion
-- ** - NHSDD/Speciality
-- ** - NHSDD/Inpatient
-- ** - NHSDD/Ethnicity
-- ****************************************************
-- Ensure core code scheme exists
INSERT IGNORE INTO concept (do... | true |
106890d4fdac6951ea56ca1ab94a27a27019454e | SQL | MrMM1989/MMParcs | /database-scripts/table-user/create-view-readuserrole.sql | UTF-8 | 404 | 2.984375 | 3 | [] | no_license | USE MMParcs;
-- -----------------------------------------------------
-- Create View vwReadUserRole
-- -----------------------------------------------------
DROP VIEW IF EXISTS vwReadUserRole;
CREATE VIEW vwReadUserRole AS
SELECT u.Id, u.FirstName, u.LastName, u.Email, u.DateRegistration, u.DateLastLogin, u.IsBanned, u... | true |
9576ae01a4f49c2d0a31372cd5ff5ad8608f05c6 | SQL | AngelBryan98/SQL | /05-agrupamiento/agrupamiento.sql | UTF-8 | 511 | 3.59375 | 4 | [] | no_license | /* Count */
SELECT rental_duration, COUNT(film_id) AS "Total" FROM film WHERE rental_duration = 7;
/* Group */
SELECT rental_duration, COUNT(film_id) AS "Total" FROM film GROUP BY rental_duration;
/* Group ordenado por TOTAL de mayor a menor*/
SELECT rental_duration, COUNT(film_id) AS "Total" FROM film GROUP BY rent... | true |
3d0d43e321e4b352c9283f9185a0db3f569ca648 | SQL | mebelousov/antlr_psql | /src/test/resources/sql/select/094652be.sql | UTF-8 | 190 | 2.8125 | 3 | [
"MIT"
] | permissive | -- file:oidjoins.sql ln:392 expect:true
SELECT ctid, prolang
FROM pg_catalog.pg_proc fk
WHERE prolang != 0 AND
NOT EXISTS(SELECT 1 FROM pg_catalog.pg_language pk WHERE pk.oid = fk.prolang)
| true |
58b49ff16c4649d8395c49b11ed2815ece8981a4 | SQL | Nathan-Zenga/Electronics_Store_6418018 | /E-Store_SQL.sql | UTF-8 | 3,469 | 3.484375 | 3 | [] | no_license | /**
* Author: Nathan
* Created: 27-Mar-2019
*/
-- jdbc:derby://localhost:1527/electronic_store_DB [nat on NAT]
-- database: electronic_store_DB
-- username: nat
-- password: nat
CREATE TABLE PRODUCTS (
ID DECIMAL(20) NOT NULL,
PRODUCT_NAME VARCHAR(100) NOT NULL,
PRODUCT_PRICE DECIMAL(5, 2... | true |
14b486b77825b377ded1d43a307bde64c191b8d5 | SQL | PanruifengWawa/adv | /db.sql | UTF-8 | 3,130 | 3.6875 | 4 | [] | no_license | create database adv;
use adv;
drop table if exists terminal;
create table terminal(
mac varchar(128) primary key,
name varchar(512)
)ENGINE=InnoDB DEFAULT CHARSET=utf8;
drop table if exists project;
create table project(
id serial primary key,
name varchar(256) not null
)ENGINE=InnoDB DEFAULT CHARSET=utf8;
drop tab... | true |
2642d396ece33f763d6733cd28031b6819b0b1cd | SQL | sergionet17/codigoJava | /Movilidad/trunk/src/deploy/liquibase/migrations/baseline/tables/salida.sql | UTF-8 | 855 | 3.375 | 3 | [] | no_license | --liquibase formatted sql
--changeset converter:baseline dbms:mysql
CREATE TABLE `salida` (
`id` binary(255) NOT NULL,
`fecha_salida` datetime DEFAULT NULL,
`inmovilizacion_id` binary(255) DEFAULT NULL,
`subsanacion_id` binary(255) DEFAULT NULL,
`tipo_salida_id` int(11) DEFAULT NULL,
PRIMARY KEY (`id`),
... | true |
68c6cc336766c1f6e7cd12e8972c9008b4afbd00 | SQL | jcr240/ranger-emr-cli-installer | /sql/init-ranger-db.sql | UTF-8 | 479 | 2.890625 | 3 | [] | no_license | # When ranger scripts init database, it will check db connection and ranger db via assigned
# ranger db user and password, so create ranger db and db user is required! otherwise install
# will fail.
DROP DATABASE IF EXISTS ranger;
CREATE DATABASE IF NOT EXISTS ranger;
DROP USER IF EXISTS 'ranger'@'%';
CREATE USER IF ... | true |
4c21a8de682ba0c82c30d9c21ea2f424163c6156 | SQL | BhanuBhavanaHM/Railway_Ticket_Reservation_System | /railres.sql | UTF-8 | 7,131 | 2.953125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.8.3
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Dec 31, 2020 at 07:19 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 |
f34f6943e36e74ed807e64fcbdf8363e1af5c1ae | SQL | dandreiolteanu/FacultyCourses | /Database/Lab2/FoodsterLab2Query.sql | UTF-8 | 4,072 | 4.8125 | 5 | [] | no_license | /*
-This Query returns the "Top User" and the rest of the users and their total payings between 2 timeStamps.
-A User is a "Top User" if the sum of the total payings between those 2 timeStamps is the highest, so the "Top User"
will be the first one.
-I think that a company can reward the "Top User" at the end of a ... | true |
4db8c6390e09218a7b18c8e19a30edbc73bd90bd | SQL | unmtransinfo/cerner-tools | /sql/patientfacts/hf_pfacts_expired.sql | UTF-8 | 422 | 3.65625 | 4 | [] | no_license | -- Patient facts, expired
-- As in hf_utils.java
SELECT DISTINCT
ddd.dischg_disp_id,
ddd.dischg_disp_code,
ddd.dischg_disp_code_desc,
fe.encounter_id,
fe.patient_id,
fe.patient_type_id,
fe.age_in_years,
fe.hospital_id,
fe.discharged_dt_tm AS "date"
FROM
hf_d_dischg_disp ddd
JOIN
hf_f_encounter fe ON fe.disch... | true |
ac416362cbb72278874ff052e56aa938651ce986 | SQL | askor2005/blagosfera | /Blagosfera/data-jpa/src/main/resources/mybatis_migrations/oldscripts/2015/10/20151030115753_create_kuch_members_settings.sql | UTF-8 | 4,260 | 2.921875 | 3 | [] | no_license | -- // create_kuch_members_settings
-- Migration SQL that makes the change goes here.
-- Настройки участников КУч ПО
insert into system_settings(id, key, val, description)
select nextval('seq_system_settings'), 'KuchSharerCommunityMemberSettings',
'{
// Настройки для шаблона заявления пайщика о вступлении в КУч ПО
en... | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.