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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
b1385fda29e910eca8c68dd47aa00a5ffef94706 | SQL | xvshu/springboot-bootstrap | /doc/init.sql | UTF-8 | 415 | 2.796875 | 3 | [] | no_license | CREATE DATABASE xs_db_tem;
use xs_db_tem;
CREATE TABLE t_tem_user(
user_id INT NOT NULL PRIMARY KEY AUTO_INCREMENT,
user_name VARCHAR(100) NOT NULL ,
password VARCHAR(100) NOT NULL ,
phone VARCHAR(50) NOT NULL ,
tem VARCHAR(10) NOT NULL ,
create_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
update_time... | true |
de1a44e4236554351c22c8a5bbbb7e232b0c384e | SQL | andreipall/MySQL-Stored-Procedure-Programming | /Ch08/ex08-07.sql | UTF-8 | 1,019 | 3.25 | 3 | [] | no_license | create procedure tfer_funds2
(from_account int, to_account int,
tfer_amount numeric(10,2), OUT out_status INT,
OUT out_message VARCHAR(30))
BEGIN
DECLARE deadlock INT DEFAULT 0;
DECLARE attempts INT DEFAULT 0;
tfer_loop:WHILE (attempts<3) DO
BEGIN
DECLARE deadlock_detected CONDITION FOR... | true |
d8e9780558144ecf97dc3d86768fbf781525fc7e | SQL | Alejandro0120/clases | /BD/ModeloFisico.sql | UTF-8 | 1,339 | 3.3125 | 3 | [] | no_license | CREATE DATABASE mensajes CHARACTER SET utf8 COLLATE utf8_general_ci;
USE mensajes;
CREATE TABLE usuarios (
email VARCHAR(50) PRIMARY KEY,
nick VARCHAR(50),
nombre VARCHAR(50)
);
CREATE TABLE mensajes (
codigo VARCHAR(50),
titulo VARCHAR(50),
texto VARCHAR(50),
emisor VARCHAR(50),
envia V... | true |
d8cfad0ffbd69300b5f148283ae287f04258be08 | SQL | Sage-Bionetworks/audit | /sql/audit_counts.sql | UTF-8 | 16,502 | 3.953125 | 4 | [] | no_license | CREATE TABLE AUDIT_INPUT_DATA (
VAR_NAME VARCHAR(40),
DESCRIPTION VARCHAR(256),
AUDIT_2015_08 BIGINT,
AUDIT_2015_05 BIGINT,
AUDIT_2015_02 BIGINT,
AUDIT_2014_11 BIGINT
);
LOAD DATA LOCAL INFILE
'/Users/kimyentruong/Documents/Report/Audit/2015/08/Data/audit_input_data.csv'
INTO TABLE
AUD... | true |
0c77ed5f999cc9c1665dbf778a9c9d3a1285730f | SQL | ualmtorres/ualmtorres.github.io | /howtos/GEBD_BD/scripts/RRHH/GROUPBY_YEAR.sql | UTF-8 | 101 | 2.515625 | 3 | [
"MIT"
] | permissive | USE RRHH;
SELECT YEAR(fechaEntrada), COUNT(*) AS empleados
FROM Empleado
GROUP BY YEAR(fechaEntrada); | true |
34d3e9cdf58b7d2f56e8608a4617cc9a7fbd8251 | SQL | MohanishPingale/Phase2FlyAway | /Database/AirLineTicket.sql | UTF-8 | 6,434 | 3 | 3 | [] | no_license | CREATE DATABASE IF NOT EXISTS `airlineticket` /*!40100 DEFAULT CHARACTER SET utf8 */ /*!80016 DEFAULT ENCRYPTION='N' */;
USE `airlineticket`;
-- MySQL dump 10.13 Distrib 8.0.25, for Win64 (x86_64)
--
-- Host: localhost Database: airlineticket
-- ------------------------------------------------------
-- Serve... | true |
7959a2d402f85dbe29ec8aa66cae12487dd3b876 | SQL | clojurecraft/clj-cljs-starter | /src/app/server/sql/commands.sql | UTF-8 | 271 | 2.515625 | 3 | [] | no_license | -- :name insert-task! :!
INSERT INTO task ("id", "description", "done?")
VALUES (:task/id, :task/description, :task/done?);
-- :name update-task! :!
UPDATE task
SET
"id" = :task/id,
"description" = :task/description,
"done?" = :task/done?
WHERE
"id" = :task/id;
| true |
8226b67c16de742e08381e973ba4efdf86e496d6 | SQL | Gonomic/Genealogy-backend | /fGetParmNamesAndType.sql | UTF-8 | 1,225 | 3.046875 | 3 | [
"MIT"
] | permissive | CREATE DEFINER=`root`@`%` FUNCTION `fGetParmNamesAndTypes`(`SpecificNameIn` CHAR(60), `TransNoIn` INT) RETURNS text CHARSET utf8
DETERMINISTIC
SQL SECURITY INVOKER
COMMENT 'Function to return parameter names and type of a specific SPROC'
BEGIN
DECLARE done INT default FALSE;
DECLARE ReturnValue text;
... | true |
4ea6595b8cdf655fcaecd25b9a3831bdcfb73cb3 | SQL | ybg345/sql-hands-on | /SQL-Zoo/9_Self Join/07_Edinburgh Buses_Using a self join_1.sql | UTF-8 | 249 | 3.609375 | 4 | [] | no_license | /* Problem Statement:
Give a list of all the services which connect stops 115 and 137 ('Haymarket' and 'Leith').
*/
-- Solution:
SELECT DISTINCT a.company, b.num
FROM route a JOIN route b
ON (a.num = b.num)
WHERE a.stop = 115 AND b.stop = 137; | true |
6b2f83975cb2e53c487f8bdfb59f41231b87f699 | SQL | vinniciusJ/infox | /db/scripts/tbclientes.sql | UTF-8 | 421 | 2.8125 | 3 | [] | no_license | use dbinfox;
create table if not exists tbclientes(
idcliente int primary key auto_increment,
nomecliente varchar(50) not null,
enderecocliente varchar(60),
telefonecliente varchar(50) not null,
email varchar(50)
);
desc tbclientes;
insert into tbclientes(nomecliente, enderecocliente, telefoneclien... | true |
cc5958a0a0b639e68907874e19562615517c4e62 | SQL | ManonGomez/MGM | /mgm.sql | UTF-8 | 2,434 | 3.25 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.8.3
-- https://www.phpmyadmin.net/
--
-- Hôte : localhost:3306
-- Généré le : ven. 23 août 2019 à 17:08
-- Version du serveur : 5.7.23
-- Version de PHP : 7.2.10
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER... | true |
35756517b0b51a7b4c74c080ac053258622ab8f0 | SQL | Cho-D-YoungRae/univ-lecture | /DataBase-Lecture/데베 자료/source/5장/AveragePrice.sql | UTF-8 | 274 | 2.609375 | 3 | [] | no_license | delimiter //
CREATE PROCEDURE AveragePrice(
OUT AverageVal INTEGER)
BEGIN
SELECT AVG(price) INTO AverageVal
FROM Book WHERE price IS NOT NULL;
END;
//
delimiter ;
/* 프로시저 AveragePrice를 테스트하는 부분 */
CALL AveragePrice(@myValue);
SELECT @myValue; | true |
3005dcd39cede0b4a43ddf9c46c9dc82346a899e | SQL | gradygriffin0/database-exercises | /join_exercises.sql | UTF-8 | 5,160 | 4.21875 | 4 | [] | no_license | CREATE database if not exists join_test_db;
use join_test_db;
CREATE TABLE if not exists roles
(
id INT UNSIGNED NOT NULL AUTO_INCREMENT,
name VARCHAR(100) NOT NULL,
PRIMARY KEY (id)
);
# Create two tables one roles, and one referencing roles by implementing
# a foreign key
CREATE TABLE if not exists... | true |
387ff8bf3b41af19e06a48740253c2818467fd0b | SQL | project-koku/koku | /koku/masu/database/sql/openshift/remove_stale_enabled_tags.sql | UTF-8 | 420 | 3.328125 | 3 | [
"Apache-2.0"
] | permissive | -- Delete stale enabled keys
DELETE FROM {{schema | sqlsafe}}.reporting_enabledtagkeys AS etk
WHERE NOT EXISTS (
SELECT 1
FROM {{schema | sqlsafe}}.reporting_ocpusagepodlabel_summary AS pls
WHERE pls.key = etk.key
)
AND NOT EXISTS (
SELECT 1
FROM {{schema | sqlsafe}}.reporting_ocpstoragevolumelabel_... | true |
25f4a7b1d888e1a1abf1ab250f7d7c3705b33278 | SQL | Chafloks/sql-challenge | /8 queries.sql | UTF-8 | 1,377 | 3.9375 | 4 | [] | no_license | select * from employees;
select * from titles;
select * from departments;
select * from dept_manager;
select * from dept_emp;
select * from salaries;
--1
select e.emp_no, e.last_name, e.first_name, e.sex, s.salary from employees e
join salaries s on s.emp_no = e.emp_no;
--2
select e.first_name, e.last_name, e.hire_da... | true |
9d132222231db475785b4ce999aff224b1ebea22 | SQL | sooheib/EmergencyApp | /urgence.sql | UTF-8 | 8,455 | 2.609375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.2.10
-- http://www.phpmyadmin.net
--
-- Client : localhost:8889
-- Généré le : Dim 02 Août 2015 à 14:16
-- Version du serveur : 5.5.38
-- Version de PHP : 5.6.2
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
--
-- Base de données : `urgence2`
--
-- --------... | true |
2835f493a30316115292e7b24fdb5a64b9dfb50b | SQL | actualbudget/actual | /packages/loot-core/src/mocks/migrations/1508727787513_remove-is_income.sql | UTF-8 | 255 | 2.796875 | 3 | [
"MIT"
] | permissive | PRAGMA foreign_keys = OFF;
ALTER TABLE poop RENAME TO tmp_poop;
CREATE TABLE poop
(id INT PRIMARY KEY,
name TEXT,
is_expense INTEGER);
INSERT INTO poop
SELECT id, name, is_expense FROM tmp_poop;
DROP TABLE tmp_poop;
PRAGMA foreign_keys = ON;
| true |
b3eb66cf28bb94a257abde560044fc4429d1a964 | SQL | AAZANKO/ipclient | /aipclient_opday_analyticcode.sql | UTF-8 | 1,437 | 2.890625 | 3 | [] | no_license | create table if not exists opday.analyticcode
(
id bigserial,
analytic_type bigint,
analytic_code bigint,
name varchar(250),
short_name varchar(250),
comment varchar(250),
isopen integer,
version serial
);
INSERT INTO opday.analyticcode (analytic_type, analytic_code, short_name, name, comment, isopen) VALUES (... | true |
ff8e0f9f959f997d27c26fad51f7865d182ab29e | SQL | Bromptoneer/Code-2020 | /FCPT Data.sql | UTF-8 | 396 | 3.59375 | 4 | [] | no_license | SELECT
FCPT.YR_NUM_ACPE_01
,FCPT.PERD_NUM_ACPE_01
,FC.GL_CODE
,FC.GL_CD_CATGRY
,COALESCE(FCPT.DEBIT_TOT_AMT,0) DEBIT_TOT_AMT
,COALESCE(FCPT.CREDIT_TOT_AMT,0) CREDIT_TOT_AMT
FROM
VCRO_FC_PERIOD_TOT FCPT
INNER JOIN
VCRO_FIN_CODE FC
ON FCPT.DBID_FC_01 = FC.DBID
WHERE
FCPT.YR_NUM_ACPE_01 = '2020'... | true |
c77d18f51dfda881ddb19c361c553692e9240f5c | SQL | arms1997/BootcampX | /1_queries/1_students_single_cohort.sql | UTF-8 | 66 | 2.65625 | 3 | [] | no_license | SELECT id, name
FROM students
WHERE cohort_id = '7'
ORDER BY name; | true |
8801fa945243734737e296fb175fb0c15dedef27 | SQL | woodrow/sm-thesis | /figures/peer_counts.sql | UTF-8 | 117 | 2.671875 | 3 | [] | no_license | SELECT date, peer_id, sum(prefix_count)
FROM peer_table_summaries
GROUP BY peer_id, date
ORDER BY date, peer_id; | true |
35b1e280465da923d9cb01eafbead1002209fa79 | SQL | davidshue/vbc-cloud | /journal/config/cassandra.cql | UTF-8 | 483 | 3 | 3 | [] | no_license | CREATE KEYSPACE IF NOT EXISTS vbc
WITH REPLICATION = {'class' : 'SimpleStrategy', 'replication_factor' : 1 };
CREATE TABLE IF NOT EXISTS
vbc.user_event (
user_id text,
event_ts timeuuid,
type tinyint,
meta frozen<map<text, text>>,
content text,
PRIMARY KEY ((user_id), event_ts, type)
) WITH CLUSTERING ... | true |
052a75025835f9fc6572b6dd7cdd15342e06621e | SQL | cs411-firesearch/firesearch | /sql/Stock.sql | UTF-8 | 10,038 | 2.921875 | 3 | [] | no_license | /* CREATE TABLE */
CREATE TABLE Stock(
StockId INT NOT NULL AUTO_INCREMENT,
TransCode varchar(6) NOT NULL,
Volume INT,
Season1 FLOAT,
Season2 FLOAT,
Season3 FLOAT,
Season4 FLOAT,
DivYield FLOAT,
CompanyId INT NOT NULL,
Type INT,
PRIMARY KEY(StockId),
FOREIGN KEY (CompanyId) REFERENCES Company(CompanyId)
... | true |
3a284bd79c163aa7983de759de2d534aa82e2d3d | SQL | bpxiang/Note | /其他/English/短语.sql | UTF-8 | 9,236 | 3.125 | 3 | [] | no_license | use `english`;
DROP TABLE IF EXISTS `english`.`phrases`;
CREATE TABLE `english`.`phrases` (
`phrases` VARCHAR(1000) NOT NULL COMMENT '短语',
`paraphrase` VARCHAR(45) NULL COMMENT '释义',
PRIMARY KEY (`phrases`));
insert into `english`.`phrases` (`phrases`, `paraphrase`) values ('a bit (of)', '一点,一些');
insert into `... | true |
aa61a0da1e786a728eb75626c91dc4b2e6595376 | SQL | yagna-bork/Job-applications-screen-web-platform | /dbproject/backend/backend_api/database_app/schema.sql | UTF-8 | 2,956 | 3.46875 | 3 | [] | no_license | SET FOREIGN_KEY_CHECKS = 0;
drop table users cascade;
drop table jobs cascade;
drop table UserJobs cascade;
drop table questions cascade;
drop table tests cascade;
drop table testquestions cascade;
drop table feedback cascade;
drop table admin_users cascade;
drop table key_admin cascade;
drop table tokens cascade;
cre... | true |
80cdd5cefee05dea942c128ddcc4857a343f8bea | SQL | chenrongda/student_api | /student.sql | UTF-8 | 6,577 | 3.65625 | 4 | [] | no_license | /*
Navicat Premium Data Transfer
Source Server : localhost
Source Server Type : MySQL
Source Server Version : 50719
Source Host : localhost:3306
Source Schema : student
Target Server Type : MySQL
Target Server Version : 50719
File Encoding : 65001
Date: 12/02/2019 11... | true |
305a4ecfe2d6231a744dd2b1e82ad31395b4a421 | SQL | lutece-platform/lutece-cms-module-documenttocalendar | /src/sql/plugins/document/modules/calendar/plugin/create_db_documenttocalendar.sql | UTF-8 | 1,456 | 2.796875 | 3 | [] | no_license | DROP TABLE IF EXISTS documenttocalendar_mapping;
DROP TABLE IF EXISTS documenttocalendar_mapping_attr;
DROP TABLE IF EXISTS documenttocalendar_calendar_attr;
/*==============================================================*/
/* Table structure for table documenttocalendar_mapping */
/*=========================... | true |
f0ce3bf02a6d609f3e1ce211624cda91a8a13df3 | SQL | artizirk/AttendanceTracker | /api/old/setthings.sql | UTF-8 | 678 | 3.109375 | 3 | [
"MIT"
] | permissive | # The password has been hashed already, ask Silver for the pass.
SET PASSWORD FOR 'AttendanceTracker'@'localhost' = '';
# If need be, rename clumsy names using
RENAME USER 'AttendanceTracker'@'localhost' TO ar;
/*To rename a database under the root user you need to dump the contents of it somewhere and drop table,
I d... | true |
8cf1502b5cfa330170cd43f8cd991bbf6c2c48a6 | SQL | harvimt/Group9_CS300_Project | /sql/providers.sql | UTF-8 | 415 | 3.375 | 3 | [] | no_license | --
-- TABLE: providers
--
--
CREATE TABLE IF NOT EXISTS providers (
provider_id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
provider_name VARCHAR(32) NOT NULL ,
email VARCHAR(128) NOT NULL
CHECK (provider_id <= 999999999),
CHECK (length(provider_name) <= 32),
CHECK (length(email) <= 128),
CHECK (valid_email(em... | true |
5c0f762cc9263c72741a12e437062ca7f7b353e6 | SQL | RedCatKnight/HibernateGuideDemo | /test.sql | UTF-8 | 4,662 | 3.109375 | 3 | [] | no_license | create database if not exists test character set utf8;
use test;
create table person(
pid int primary key,
pname varchar(50) not null
)default charset=utf8;
create table card(
cid int primary key,
cname varchar(50) not null
)default charset=utf8;
create table CATERIES (
CATERY_ID int,
CATERY_NAME varchar(100) ... | true |
5535eea5db809911a27aedc527e58d2ba80f618e | SQL | funfunsin/SQL | /SQL Server 指令碼1/SQL Server 指令碼1/10select-9.sql | BIG5 | 1,548 | 3.703125 | 4 | [] | no_license | select Z.Ǹ,ǥ.mW,ǥ.ʧO,Z.б½s,
u.mW,б.t,б.¾,
Z.ҵ{s,ҵ{.W,ҵ{.Ǥ,Z.WҮɶ,Z.Ы
from ǥ inner join Z on ǥ.Ǹ=Z.Ǹ
inner join ҵ{ on ҵ{.ҵ{s=Z.ҵ{s
inner join б on б.б½s=Z.б½s
inner join u on u.Ҧr=б.Ҧr
order by Z.Ǹ
------inner joint@ؼgk įۦP-----------------------------------
select Z.Ǹ,ǥ.mW,ǥ.ʧO,Z.б½s,
u.mW,б.t,б.¾,
Z.ҵ{s,ҵ{.W,ҵ{.Ǥ,Z.WҮ... | true |
68d0e00249cbac5975ce435b6a1950adb29e2959 | SQL | Kelly4kc/NCAA-Sports-Database | /queries/uni_sports.sql | UTF-8 | 658 | 3.75 | 4 | [] | no_license | --
-- Lists all sports a university offers for the given year.
--
CREATE OR REPLACE FUNCTION public.uni_sports(
uni_name character varying,
year integer)
RETURNS TABLE(name character varying, sport character varying)
LANGUAGE 'sql'
COST 100
STABLE STRICT
ROWS 1000
AS $BODY$
SELECT
DIS... | true |
c5efde634fa5cb3fdcb50351aacfa9d0f2c4a670 | SQL | cro1100/sql-challenge | /EmployeeSQL/QuickDBD-SQL_hw.sql | UTF-8 | 4,220 | 4.125 | 4 | [] | no_license | -- Exported from QuickDBD: https://www.quickdatabasediagrams.com/
-- Link to schema: https://app.quickdatabasediagrams.com/#/d/u4oSIF
-- NOTE! If you have used non-SQL datatypes in your design, you will have to change these here.
-- create code for the ERD for SQL assignment
--the following code creates the tables a... | true |
fd16cb26ae92a5470e04b68b960485a0e131edff | SQL | jiunianliangkuai/mysql_test | /mysql/数据操作_正则表达式查询.sql | UTF-8 | 4,154 | 4.25 | 4 | [] | no_license | -- 创建字符数据
-- 外键是表中的特殊字段
-- 必须有主表才能给子表确定外键
-- 必须存储为 InnoDB 才能使用外键
-- 元素必须为相似数据类型
-- 外键类必须是索引,不指定的话会自动添加
-- 比如 省份是固定的 不管有没有人 都会存在,那么省份表就是主表
CREATE DATABASE IF NOT EXISTS `data_test`;
USE data_test;
DROP TABLE IF EXISTS `sub_table_test`;
DROP TABLE IF EXISTS `main_table_test`;
-- 主表
CREATE TABLE IF NOT EXISTS `main_tabl... | true |
853c712b50c60a5d1555d29af39a22e99e812bae | SQL | iwansafr/sipapat | /db/3.statistik_penduduk_utf8mb4.sql | UTF-8 | 3,819 | 2.765625 | 3 | [] | no_license | # ************************************************************
# Sequel Ace SQL dump
# Version 20035
#
# https://sequel-ace.com/
# https://github.com/Sequel-Ace/Sequel-Ace
#
# Host: localhost (MySQL 8.0.30)
# Database: sipapat
# Generation Time: 2022-10-17 13:47:08 +0000
# **********************************************... | true |
a537c9393494101d59edc01e605c63aae3c02473 | SQL | naufalfazanadi/rpl-mppl-data-gudang | /SKPL/Database/db_data_gudang.sql | UTF-8 | 26,129 | 3.296875 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.7.9
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Waktu pembuatan: 08 Bulan Mei 2018 pada 09.31
-- Versi server: 10.1.31-MariaDB
-- Versi PHP: 7.2.3
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD... | true |
31cc09677edf77baab2fba1e3630fc7c421df698 | SQL | yefc/CBOE | /subprojects/Classic/ChemACXOra/Oracle_Install_Scripts/sql/CSCartridge9Index.sql | UTF-8 | 889 | 3.609375 | 4 | [] | no_license | @@parameters.sql
@@prompts2.sql
prompt 'Creating chemical structure index ...'
Connect &&schemaName/&&schemaPass@&&serverName
DECLARE
PROCEDURE createCartridgeIndex(iName IN varchar2, tName IN varchar2, fName IN varchar2) IS
n NUMBER;
BEGIN
select count(*) into n from user_indexes where Upper(index_name) ... | true |
e5361b8ec037ae2b2acb4996cf67f4d07db149c0 | SQL | xutianzhong/view | /SQL/register_user.sql | UTF-8 | 2,607 | 2.8125 | 3 | [] | no_license | -- MySQL dump 10.13 Distrib 5.7.17, for Win64 (x86_64)
--
-- Host: 127.0.0.1 Database: register
-- ------------------------------------------------------
-- Server version 8.0.11
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS... | true |
3c4d1232039a68410a4b82356df1592c46ff7cc5 | SQL | jps531/hailstateunis | /data/mbktabledata_2021-07-24.sql | UTF-8 | 63,738 | 3.265625 | 3 | [] | no_license | # ************************************************************
# Sequel Ace SQL dump
# Version 3034
#
# https://sequel-ace.com/
# https://github.com/Sequel-Ace/Sequel-Ace
#
# Host: ls-ed52acd835d3b04e8df8a962fff8a5e1f827d6c5.camxrlw6o2ww.us-east-1.rds.amazonaws.com (MySQL 5.7.33-log)
# Database: mbktabledata
# Generati... | true |
0908b60b2d8899028cc986cb3a3f977da02d8674 | SQL | merrillpaul/boot-micro-auth2-ng2 | /application/global-data/src/database/scripts/incremental/01_v1.0/01_base/01_init_global_account_assessment.sql | UTF-8 | 22,462 | 3.90625 | 4 | [] | no_license | --
-- TABLE STRUCTURE FOR TABLE DOMAIN
--
CREATE TABLE DOMAIN (
ID CHAR(32) NOT NULL,
CREATED_BY VARCHAR(255) DEFAULT NULL,
DATE_DELETED DATETIME DEFAULT NULL,
DELETED BIT(1) DEFAULT '\0',
DELETED_BY VARCHAR(255) DEFAULT NULL,
LAST_CREATED DATETIME DEFAULT NULL,
LAST_UPDATED DATETIME DEFAULT NULL,
UPDAT... | true |
4a553246bb3c48326c466a570199e872a00ba889 | SQL | msalinasdiaz/sitio-arcapet-wp | /sql/wp_ms_snippets.sql | UTF-8 | 659 | 2.921875 | 3 | [] | no_license | /*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `wp_ms_snippets` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`name` tinytext NOT NULL DEFAULT '',
`description` text NOT NULL DEFAULT '',
`code` longtext NOT NULL DEFAULT '',
`tags` longtext... | true |
4435723ebc36f6f9bd8e40df82b1c34c1c6cb779 | SQL | DigitalerZwilling/DigitalerZwilling_Maven | /DB_Daten/db_procedure.sql | UTF-8 | 2,609 | 3.171875 | 3 | [] | no_license | DELIMITER //
CREATE PROCEDURE `UPDATE_ARTIKEL_WARENTRAEGER`(IN `id_warentraeger` BIGINT, IN `id_artikel_1` BIGINT, IN `id_artikel_2` BIGINT, IN `id_artikel_3` BIGINT)
MODIFIES SQL DATA
BEGIN
DELETE FROM Artikel_Warentraeger WHERE Artikel_Warentraeger.id_warentraeger = `id_warentraeger`;
IF `id_artikel_1` <> NUL... | true |
c8fe77f144ac1e64e2668c55498a5b5bbe0c3335 | SQL | degawron/nowabiblioteka | /mysql_schemas.sql | UTF-8 | 9,596 | 3.28125 | 3 | [] | no_license | CREATE DATABASE IF NOT EXISTS `library` /*!40100 DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci */;
USE `library`;
-- MySQL dump 10.13 Distrib 8.0.13, for Win64 (x86_64)
--
-- Host: localhost Database: library
-- ------------------------------------------------------
-- Server version 8.0.13
/*!... | true |
e26e9a36ecb51adcaafda03fe709bb76c4ccc15c | SQL | ThiagoOliveira001/smn-atividade-sql | /lael/Exercicio04-SELECT.sql | UTF-8 | 301 | 3.296875 | 3 | [] | no_license | --listar o nome do produto, marca, valor de venda, valor de compra e quantidade de todos os produtos
--SELECT * FROM Produto
--SELECT * FROM Marca
SELECT P.NomeProduto, m.NomeMarca, p.ValorVenda, p.ValorCompra, p.QuantidadeEstoque FROM Produto AS p
INNER JOIN Marca AS m
ON P.IdMarca = m.IdMarca | true |
c731fc47c79af0603230b527b4e6d006d744f90c | SQL | chris3004/ISI-BSI-19_I-2019 | /Tarea semana 10/StoreProcedures/BaseDatos/mylibrery.sql | UTF-8 | 3,413 | 3.546875 | 4 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.7.4
-- https://www.phpmyadmin.net/
--
-- Servidor: 127.0.0.1
-- Tiempo de generación: 18-03-2018 a las 00:37:28
-- Versión del servidor: 10.1.30-MariaDB
-- Versión de PHP: 7.2.1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
... | true |
eda5e105bb082fa74ce3000905be29d07b48f803 | SQL | nivead-transposit/ci-test | /java/server/mysql-codegen/src/main/resources/db/migration/V58__add_support_org.sql | UTF-8 | 146 | 2.5625 | 3 | [] | no_license | ALTER TABLE service
ADD COLUMN support_org VARCHAR(30) DEFAULT NULL;
AlTER TABLE service ADD FOREIGN KEY (support_org) REFERENCES entity(name); | true |
33a235aba74cca92d98423c59683152d6394f928 | SQL | chinatjnet/coffee-mvc | /file_client/db_create.sql | UTF-8 | 1,164 | 3.0625 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 3.3.9.2
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Feb 10, 2012 at 09:04 AM
-- Server version: 5.5.9
-- PHP Version: 5.3.6
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
--
-- Database: `mvc_example`
--
CREATE DATABASE `mvc_example` DEFAULT CHARACTER SET utf8 COLLA... | true |
6961df7a0ab9b945701ff7d470694398581c8742 | SQL | Grade0/LBD_TeamProject | /LBD_Constraints_and_DataEntry_v1.3/trigger v_2.2 .sql | UTF-8 | 7,810 | 3.671875 | 4 | [] | no_license | /**
*setta pronto=1 nel Ordininiclientilotti
*quando viene aggiornato lo stato del lotto in vendita
*/
CREATE OR REPLACE trigger updataLotto
after update on Lotti
for each row
begin
if :new.stato = 'vendita' and to_date(:new.FINE_PRODUZIONE, 'dd/mm/yyyy') < to_date(SYSDATE, 'dd/mm/yyyy') then
update Ord... | true |
0665c4dfe6a3c3a80b96d92170ba360f0b721db6 | SQL | iliaselbadaoui/AppendSkillsProject | /AS_DB.sql | UTF-8 | 10,636 | 3.390625 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.8.4
-- https://www.phpmyadmin.net/
--
-- Hôte : localhost
-- Généré le : mer. 17 avr. 2019 à 20:42
-- Version du serveur : 10.1.37-MariaDB
-- Version de PHP : 7.3.1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101... | true |
2224207601cff91e15991d0eb8f36dd28e8c828e | SQL | rahulsubagio/Dika-Arenda | /database/dika-arenda-finish.sql | UTF-8 | 12,892 | 3 | 3 | [
"LicenseRef-scancode-unknown-license-reference",
"MIT"
] | permissive | -- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Waktu pembuatan: 19 Jun 2021 pada 08.32
-- Versi server: 10.4.13-MariaDB
-- Versi PHP: 7.4.8
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CH... | true |
80b492f4660ad1865fad6f3c198a531b7fe100e8 | SQL | 0opslab/useful-scripts | /oralce/script_creation/monitoring_off.sql | UTF-8 | 809 | 3.125 | 3 | [] | no_license | -- -----------------------------------------------------------------------------------
-- File Name : http://www.oracle-base.com/dba/script_creation/monitoring_on.sql
-- Author : DR Timothy S Hall
-- Description : Sets monitoring off for the specified tables.
-- Call Syntax : @monitoring_on (schema) (tab... | true |
324e85a7726d5be4f728dab72a9770bc32d8c5f8 | SQL | liwen666/lw_code | /tempcode/src/main/java/commons/execscript/sql/bgt/common/common_62_.sql | GB18030 | 6,420 | 3.390625 | 3 | [] | no_license | DECLARE
V_RET VARCHAR2(4000);
BEGIN
FOR C_PAR IN (SELECT DISTRICTID,YEAR FROM PUB_T_PARTITION_DIVID WHERE YEAR <> '*') LOOP
SELECT GLOBAL_MULTYEAR_CZ.SECU_F_GLOBAL_SETPARM('',C_PAR.DISTRICTID,C_PAR.YEAR,'') INTO V_RET FROM DUAL;
delete from DICT_T_PUBLIC t where typeid = 'FORMULA_COMPUTE';
insert into DICT_T_P... | true |
69ebf0ec55b822184d9ed529831fab6bc3b435a9 | SQL | FeLowe/NW-Bootcamp-Project2_ETL | /ETL_WineClimate.sql | UTF-8 | 1,039 | 4.03125 | 4 | [] | no_license | create database wine_climate_db;
/*
if needed, code to drop database:
drop database wine_climate_db;
*/
use wine_climate_db;
SHOW VARIABLES LIKE 'character_set%';
create table wines (
id int primary key,
country varchar(50),
designation varchar(100),
score int,
price float,
variety varchar(50)
... | true |
8b49908125f70043f11aa0d912efc6b0c3eb7ecd | SQL | kerbault/Matcha_php | /private/config/matcha.sql | UTF-8 | 11,913 | 3.375 | 3 | [] | no_license | -- MySQL Script generated by MySQL Workbench
-- Tue Mar 26 16:02:17 2019
-- 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='TR... | true |
621316cd59a4b7d612ffffb0168beb2cdcd055d5 | SQL | vivaespana51/Courses-Schedule | /php/create_db.sql | UTF-8 | 5,770 | 3.21875 | 3 | [
"MIT"
] | permissive | -- MySQL dump 10.13 Distrib 5.7.15, for Win64 (x86_64)
--
-- Host: localhost Database: courseschedule
-- ------------------------------------------------------
-- Server version 5.7.15-log
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_S... | true |
8c6f3a29305fa1f0d7c75b939df503dcc70ded26 | SQL | eldydeines/sql-schemas-DDL | /outer_space.sql | UTF-8 | 583 | 3.3125 | 3 | [] | no_license | -- from the terminal run:
-- psql < outer_space.sql
DROP DATABASE IF EXISTS outer_space;
CREATE DATABASE outer_space;
\c outer_space;
CREATE TABLE stars
(
star_id SERIAL PRIMARY KEY,
star TEXT NOT NULL,
galaxy TEXT NOT NULL
);
CREATE TABLE moons
(
moon_id SERIAL PRIMARY KEY,
moon TEXT NOT NULL
);
CREATE... | true |
12e3aa8dc241d13fc1140e3bf4e84cf3762afd86 | SQL | NDCFL/book | /document/allsql.sql | UTF-8 | 3,280 | 3.90625 | 4 | [] | no_license | --用户表
create table t_user(
id BIGINT PRIMARY KEY auto_increment COMMENT '用户编号',
phone VARCHAR(11) COMMENT '用户联系方式',
password varchar(18) COMMENT '用户登录密码',
name varchar(20) COMMENT '用户昵称',
realname varchar(10) comment '用户真实姓名',
sex varchar(2) COMMENT '用户性别',
age int COMMENT '用户年龄',
qqopenid varchar(36) COMMENT '... | true |
b691649ba794c2d25fcac3cb8a84ecb69d10963e | SQL | brentgroves/bpgsql | /DW/Plex/DailyMetrics/Workcenter_Get.sql | UTF-8 | 5,516 | 3.6875 | 4 | [] | no_license | /*
* Do we have a workcenter record for all the workcenters in the dsr?
* Does each workcenter on the Daily Shift Report have its own director labor rate?
*/
create view Plex.workcenter_view
as
select
pcn,
Plexus_Customer_Code,
Workcenter_Key,
Workcenter_Code,
Name,
Workcenter_Type,
Material_Key,
Part_Key,
Part_... | true |
7688d0d988617f5ba4a200addd6028764eda862c | SQL | aaqibtariq/SQLZOO-Probelms | /Project 1/Select from world/file7.sql | UTF-8 | 561 | 3.21875 | 3 | [] | no_license | /* In this tutorial 2 you will use the SELECT command on the table world:*/
SELECT name, population, area FROM world WHERE area > 3000000 OR population > 250000000
/* This query will Show the countries that are big by area or big by population. Show name, population and area.
This display following:
Correct answ... | true |
697ff192ef284501ccbe904f29ce89080bc06ecf | SQL | FFerrazzaT/TrabalhoBancoDeDados | /script.sql | UTF-8 | 8,040 | 3.46875 | 3 | [
"MIT"
] | permissive | /*
Integrantes:
--Fernando Ferrazza Toniolo
--Otávio Costa de Oliveira
*/
DROP SCHEMA IF EXISTS projetodb;
CREATE SCHEMA projetodb;
USE projetodb;
--------------------------------------------------------------------------------------------------------------------------------------------------------------------
----... | true |
ad6760fa66f0b3e456cb3ddfeaefb6193d4d3f9c | SQL | SemyonSinchenko/OTUS_DE_Homeworks | /hw1/HW1Solution.sql | UTF-8 | 3,897 | 3.8125 | 4 | [] | no_license | /* 1. Разведочный анализ */
CREATE table sinchenko.kiva_loans_clean as
SELECT * FROM kiva_loans AS t WHERE t.dt LIKE "201%";
/* */
SELECT
count(*) as count,
max(dt) as max_date,
min(dt) as min_date,
max(loan_amount) as max_amount,
min(loan_amount) as min_amount
FROM kiva_loans_clean;
/* count max_date min_date ma... | true |
01b80ca6b0e6175fbac7d4d8e1fe6d6cc9d6a72c | SQL | rafaelcostaleite/lab-triathlon-dashboard | /sql/lab-triathlon-activities_total-create_table.sql | UTF-8 | 293 | 2.734375 | 3 | [] | no_license | CREATE TABLE `lab-triathlon`.`activities_total` (
`year` INT NOT NULL,
`month` INT NOT NULL,
`ownerId` INT NOT NULL,
`activities_total` INT NULL,
`hours_total` INT NULL,
`distance_total` INT NULL,
`ownerDisplayName` VARCHAR(100) NULL,
PRIMARY KEY (`year`, `month`, `ownerId`)); | true |
35a2426c2fec3e0b1ff5af81239cd1c0e22bf5e8 | SQL | brave2chen/mybatis-plus-demo | /src/main/resources/db/migration/V1.2020.03.25.01__DDL_CREATE_USER.sql | UTF-8 | 2,251 | 3.203125 | 3 | [] | no_license | -- ----------------------------
-- Table structure for user
-- ----------------------------
DROP TABLE IF EXISTS `user`;
CREATE TABLE `user`
(
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键',
`username` varchar(64) NOT NULL COMMENT '用户名',
`nickname` ... | true |
e21e1e8aee8204707f9cac523f6c13c3582b7e05 | SQL | codewithashees/crud-using-php-oop | /oop_crud.sql | UTF-8 | 2,449 | 3.203125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Sep 28, 2021 at 12:47 PM
-- Server version: 10.4.13-MariaDB
-- PHP Version: 7.4.7
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIEN... | true |
f498b0b273479c859732604022e47f94f4202076 | SQL | silence-do-good/stress-test-Postgres-and-MySQL | /dump/low/day09/select0257.sql | UTF-8 | 178 | 2.65625 | 3 | [] | no_license |
SELECT timeStamp, temperature FROM ThermometerOBSERVATION o
WHERE timestamp>'2017-11-08T02:57:00Z' AND timestamp<'2017-11-09T02:57:00Z' AND temperature>=40 AND temperature<=84
| true |
ed0d578f83d2830757eb12ab97ad7ba2b98ff5be | SQL | lorenzomalferrari/HolidayDiary | /dati/databaseSCHEMA.sql | UTF-8 | 2,282 | 3.34375 | 3 | [] | no_license | -- TABLE
CREATE TABLE Notes(
id integer PRIMARY KEY,
title text not null,
description text not null,
creation_data DATA,
id_user integer not null,
id_travel integer,
id_place integer,
id_picture integer,
foreign key (id_user) references User (id),
foreign key (id_travel) references Travel (id),
foreign k... | true |
c5fdef9ea44d7c78e145fc3f7997b87d3b88f83c | SQL | ResqueChick/DE-101-Module2- | /Superstore_sql_scpt.sql | UTF-8 | 1,916 | 4.34375 | 4 | [] | no_license | --Total sales
select
sum(sales)as total_sales
from orders o
--Total profit
select
sum (profit) as total_profit
from orders o
--Profit ratio
select
sum (profit)/sum(sales)*100
as total_profit
from orders o
--Profit per order
select
sum(profit)/count(distin... | true |
19a34493e5f9e78049f1545f5733b865540c1625 | SQL | jeandrei/www | /desenvolvimento/professores/bd/professores.sql | UTF-8 | 2,806 | 3.25 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Host: db
-- Tempo de geração: 26/02/2021 às 17:39
-- Versão do servidor: 5.7.31
-- Versão do PHP: 7.4.9
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
DROP DATABASE IF EXISTS professores;
CREATE DATABA... | true |
36acd08bd6e75cc8bb816f10c64b3168e135516a | SQL | LucasMatheus123654789/JogoPerguntasRespostas | /Docs/Jogo_Perguntas_e_Respostas.sql | ISO-8859-1 | 1,043 | 3.375 | 3 | [] | no_license | create database db_PerguntasERespostas
use db_PerguntasERespostas
create table tb_Jogador(
id int identity primary key,
nome varchar(100) not null
)
select * from tb_Jogador
insert into tb_Jogador(nome) values('Amanda')
insert into tb_Jogador(nome) values('Fernanda')
create table tb_Perguntas(
id int identi... | true |
9fb87fdcb615928aa0462c404381d103d6464410 | SQL | Whyuki/CDA_2005 | /FOAD_MERISE/tp_agence_voyages/02c_Select_requetes_de_test.sql | UTF-8 | 761 | 3.65625 | 4 | [
"Unlicense"
] | permissive | USE tp_agence_voyages;
SELECT * FROM clients;
SELECT * FROM sales;
SELECT client_lastname, client_firstname, com_name, clients.com_code FROM clients
JOIN sales ON clients.com_code = sales.com_code;
SELECT client_lastname, client_firstname, C1.com_code, S1.com_name, S2.com_name
FROM clients C1
INNER JOIN sales S... | true |
f85a1d02ce8a745f28c17640278f9e29627c021b | SQL | NachiMK/nodejs | /ods/postgres/ODSConfig/Scripts/Prototypes.sql | UTF-8 | 4,310 | 4.03125 | 4 | [
"MIT"
] | permissive | /*
SELECT udf_InitializeHistoryDownloadQueue();
-- Find all entries in Task that supports this type of Source - Target Mapping
-- OF All those Find list of Tasks that are currently running, ignore those
-- For rest of Tasks make an entry in TaskLog with correct Ranges
-- State STatus as Ready
SELECT udf_Initializ... | true |
82ec62a701683c632be3637a04bab09a5a4cd6b6 | SQL | AlexandrePineau/csi2532_playground | /Lab07/E1.sql | UTF-8 | 2,155 | 2.671875 | 3 | [] | no_license | INSERT INTO athletes
(athlete_id, email, full_name, birthday, is_male)
VALUES
--Men
(1, 'alexpineau@gmail.com', 'Alexandre Pineau', '2000-06-14', true),
(2, 'robnaim@hotmail.com', 'Robert Naim', '1998-05-13', true),
(3, 'poirrerof@outlook.com', 'Pierre Rofail', '1960-12-05', true),
(4, 'pcaps44@... | true |
274b400b49c9a693d51ca7aa94740866ad95cb90 | SQL | ginoChavez/regiplast-project | /src/main/resources/db/migration/V1_3__create_user.sql | UTF-8 | 592 | 3.65625 | 4 | [] | no_license | CREATE TABLE user (
id_user BIGINT UNSIGNED NOT NULL AUTO_INCREMENT,
id_person BIGINT UNSIGNED,
id_role BIGINT UNSIGNED NOT NULL,
user_name VARCHAR(100) NOT NULL,
password VARCHAR(255) NOT NULL,
PRIMARY KEY (id_user),
UNIQUE INDEX UQ_user_name (user_name),
INDEX IX_user_person_id (id_person),
INDEX IX... | true |
0b0550a72f29258a905b68991fc2d13508db10aa | SQL | jameskzhao/demo_minicasino | /application/database/demo.sql | UTF-8 | 5,923 | 2.5625 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.8.5
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Generation Time: Mar 08, 2021 at 04:14 AM
-- Server version: 5.7.27-log
-- PHP Version: 7.2.24
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHA... | true |
02fc5a0bbfa5df7c0f9126a19550ed2d9842dbc8 | SQL | ruoxue/springboot | /zwmall-api/target/classes/template/manage/goods/category.sql | UTF-8 | 521 | 4.0625 | 4 | [
"MulanPSL-2.0",
"LicenseRef-scancode-mulanpsl-2.0-en",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | ### 查询商品类别及下属商品数量
#sql("findCategories")
SELECT
id,
`name`,
parentId,
createTime,
(
SELECT
count(*)
FROM
goods
WHERE
#if(parentId == 0)
categoryId IN (
SELECT
id
FROM
goods_category
WHERE
parentId = t1.id
)
... | true |
ffba4ec2e9cdcf91dddd9265c98d460801113275 | SQL | DevRedOWL/HseDB | /JT$Emp.sql | UTF-8 | 2,041 | 2.984375 | 3 | [] | no_license | -- Пересоздаем таблицу
DROP TABLE JT$Emp;
CREATE TABLE JT$Emp(
Empno NUMBER NOT NULL PRIMARY KEY,
Ename VARCHAR2(80) NOT NULL,
Job VARCHAR2(30) NOT NULL,
Mgr NUMBER,
Hiredate DATE NOT NULL,
Sal NUMBER(10,2) NOT NULL,
Comm NUMBER(10,2),
Deptno NUMBER(2,0) NOT N... | true |
8c68dcf2879538929e2bdf0e7b7095c741ef22a6 | SQL | AkshayHande57/Twitter-Data-Analysis-WordCloud-in-R | /Sql Query/Netcore_Solution_DB/Eq_charges_validity.sql | UTF-8 | 1,346 | 3.140625 | 3 | [] | no_license | -- Detailed analysis of Eq_charges_validitiy
select top 1000 * from eq_charges_validity
-- Number of Records : 2837261
-- Number of Columns : 44
select Distinct(ecv_rental_bill_generated_YN),count(*)
from eq_charges_validity
group by ecv_rental_bill_generated_YN
/*
ecv_rental_bill_generated_YN (No column na... | true |
e706ecb13fbad46130dd267a1a3e7266b3770260 | SQL | isomericmagic/EpicorSQL | /newCustomersBarSouth.sql | UTF-8 | 890 | 3.734375 | 4 | [] | no_license | select
[Customer].[Name] as [Customer_Name],
sum([InvcHead].[InvoiceAmt]) as [Order_Sum]
from Erp.InvcHead as InvcHead
inner join Erp.InvcDtl as InvcDtl on
InvcHead.Company = InvcDtl.Company
And
InvcHead.InvoiceNum = InvcDtl.InvoiceNum
left outer join Erp.Part as Part on
InvcDtl.Company = Part.Company
And
Invc... | true |
62e739a6b3fbd929988ca66c1e79d925536b8b24 | SQL | yonofate/vaobong | /Core/Piranha/Data/Scripts/Updates/1.sql | UTF-8 | 490 | 2.828125 | 3 | [
"Apache-2.0",
"MIT"
] | permissive | -- Post
ALTER TABLE post ADD post_draft BIT NOT NULL default(1);
ALTER TABLE post ADD post_last_published DATETIME NULL;
ALTER TABLE post DROP CONSTRAINT pk_post_id;
ALTER TABLE post ADD CONSTRAINT pk_post_id PRIMARY KEY (post_id, post_draft);
-- Attachment
ALTER TABLE attachment ADD attachment_draft BIT NOT NULL def... | true |
f24cd1d33b9e44a6ce11eb654ae03532e22f8b2b | SQL | jabautista/GeniisysSCA | /src/main/resources/sql/procedures/copy_pol_wfireitm.prc | UTF-8 | 1,838 | 2.78125 | 3 | [] | no_license | CREATE OR REPLACE PROCEDURE CPI.copy_pol_wfireitm(
p_par_id IN GIPI_PARLIST.par_id%TYPE,
p_policy_id IN GIPI_POLBASIC.policy_id%TYPE
)
IS
/*Modified by Iris Bordey 10.30.2003
**See spec# UW-SPECS-GIPIS055-003-0026
**To populate risk_cd.
*/
/* Revised to have conformity with th... | true |
dd988faaf069742e9b124fc54e03bd4462c9826d | SQL | arditzeza/Restaurant-Script--PizzaInn_Project- | /database dump/pizza_inn.sql | UTF-8 | 8,900 | 3.09375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 3.5.1
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: May 07, 2013 at 03:10 PM
-- Server version: 5.5.24-log
-- PHP Version: 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 */;... | true |
73f85f99d142e7da6409f3175e2d8f17d966603e | SQL | alexisleonel1/TPE-TIO | /database/db_autos.sql | UTF-8 | 3,301 | 3.109375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.8.5
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: May 19, 2020 at 02:38 AM
-- Server version: 10.1.38-MariaDB
-- PHP Version: 7.3.2
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD... | true |
23f701c95a8c9e81dad11d439efdd1a091344243 | SQL | parkjye/acorn2020_jsp-JYE | /Web03_DB/WebContent/WEB-INF/table.sql | UTF-8 | 275 | 2.765625 | 3 | [] | no_license | --방명록 글을 저장할 테이블
CREATE TABLE board_guest(
num NUMBER PRIMARY KEY,
writer VARCHAR2(50) NOT NULL,
title VARCHAR2(50) NOT NULL,
content CLOB,
regdate DATE
);
--방명록 테이블에 글번호를 생성할 시퀀스
CREATE SEQUENCE board_guest_seq;
| true |
da242ce553ced8ebe8cc1e00d25b61a558dd8863 | SQL | lianqiaogroup/webhome | /database/20180724_fmp_ad.sql | UTF-8 | 1,142 | 3.46875 | 3 | [] | no_license | delete from fmp_ad where oa_uid=0;
ALTER TABLE `fmp_ad`
MODIFY COLUMN `oa_uid` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT 'OA用户ID' AFTER `id`,
ADD COLUMN `oa_dept_id` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT 'OA部门ID' AFTER `oa_uid`;
ALTER TABLE `fmp_ad`
ADD COLUMN `account_id` varchar(32) COLLATE utf8_bin DEFAU... | true |
589f05e04779be3b0bf9acd3eea86c040afd1282 | SQL | jhoaquinsito/vet | /backend/web/src/main/resources/database/changelog/changes/2015-12-13_1233.sql | UTF-8 | 462 | 2.78125 | 3 | [] | no_license | --liquibase formatted sql
--changeset ggorosito:legalPerson_client splitStatements:false
-- elimino la columna lastname de persona ya que es un atributo solo de persona física
ALTER TABLE person DROP COLUMN lastname;
-- agrego el atributo booleano client a legal_person para identificar si es cliente
-- el atributo ... | true |
20ed0e92be128a1d98551dd363e53c501fa51cb1 | SQL | JaloDeng/autopart01_erp | /更改仓位存储过程、记录表.sql | UTF-8 | 8,670 | 3.8125 | 4 | [] | no_license | SET FOREIGN_KEY_CHECKS =0;
-- -----------------------------------------------------------------------------------------------------
-- 更改仓位操作记录表
-- -----------------------------------------------------------------------------------------------------
DROP TABLE IF EXISTS `erp_goods_change_shelf`;
CREATE TABLE `erp_good... | true |
413f3f321275507cf4f5cc116f9be5095b0c86cc | SQL | sourceperl/pySupRST | /db/sup_rst-struct.sql | UTF-8 | 15,047 | 2.734375 | 3 | [
"MIT"
] | permissive | -- MySQL dump 10.13 Distrib 5.5.43, for debian-linux-gnu (x86_64)
--
-- Host: localhost Database: sup_rst
-- ------------------------------------------------------
-- Server version 5.5.43-0+deb7u1
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER... | true |
7acc444b02c9c2700a047bbdf643c5f0321a49ca | SQL | sidcarrollworks/holbertonschool-higher_level_programming | /0x0E-SQL_more_queries/16-shows_by_genre.sql | UTF-8 | 296 | 4.25 | 4 | [] | no_license | -- list all shows and all genres linked to show
SELECT tv_shows.title, COALESCE(tv_genres.name, NULL) AS name FROM tv_shows
LEFT JOIN tv_show_genres ON tv_show_genres.show_id = tv_shows.id
LEFT JOIN tv_genres ON tv_genres.id = tv_show_genres.genre_id
ORDER BY tv_shows.title, tv_genres.name ASC;
| true |
4dd8671d528f667b4ccc0f679a4e734d8855f120 | SQL | atnt0/ReferenceBook_TEST | /Desktop_ReferenceBook_Anri/sql/select_companies_full_info.sql | UTF-8 | 1,549 | 3.71875 | 4 | [] | no_license |
select com.CompanyId, com.CreatedOn, com.CompanyName, com.Director,
cts.CityName, zc.ZipCode, strs.StreetName, ad.House, ad.[Block], ad.Apartment, ad.Latitude, ad.Longitude,
com.DescriptionShort, com.DescriptionFull, com.WebSite, em.Email, ph.PhoneNumber, sn.SocialNetURL,
c.CategoryName, s.SubcategoryName --, *
--... | true |
0f6360b06a964bf8786f4c412a1a6c5b5192a0e8 | SQL | radtek/abs3 | /sql/mmfo/bars/Table/tmp_dynamic_layout.sql | WINDOWS-1251 | 3,986 | 3.0625 | 3 | [] | no_license |
PROMPT =====================================================================================
PROMPT *** Run *** ========== Scripts /Sql/BARS/Table/TMP_DYNAMIC_LAYOUT.sql =========*** Ru
PROMPT =====================================================================================
PROMPT *** ALTER_POLICY_INFO... | true |
b968646c355632309b22ae04806e7c47a0c5d96a | SQL | Davaabayar/FOS | /create.sql | UTF-8 | 4,964 | 3.625 | 4 | [] | no_license | -- MySQL Script generated by MySQL Workbench
-- Mon Nov 18 18:52:32 2019
-- 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 |
9a918daf8d09bbef7955936d5a5edc9b873aadf9 | SQL | ygae0118/PBO_ | /Rspnsi_PBO_035/Responsi_123190035/responsipbo.sql | UTF-8 | 1,985 | 2.921875 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 5.0.3
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Jun 21, 2021 at 06:58 PM
-- Server version: 10.4.14-MariaDB
-- PHP Version: 7.3.23
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIE... | true |
fed8379c853b7455f9a89d2051f50ff8d6a50a97 | SQL | clemencep/medical | /medical_db.sql | UTF-8 | 3,844 | 2.96875 | 3 | [
"Apache-2.0"
] | permissive | -- phpMyAdmin SQL Dump
-- version 4.0.4
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Dec 14, 2015 at 11:41 PM
-- Server version: 5.6.12-log
-- PHP Version: 5.4.16
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT ... | true |
f1f06fb86375a331c5397bbce5729b1b399a2ecd | SQL | DanielBankov/SoftUni | /C# DB Fundamentals/Databases Basics - MS SQL Server/Data Aggregation - Exercise/11. Average Interest.sql | UTF-8 | 251 | 2.859375 | 3 | [
"MIT"
] | permissive | SELECT DepositGroup, IsDepositExpired, FORMAT(AVG(DepositInterest), 'N2')
FROM WizzardDeposits
WHERE DepositStartDate > '01-01-1985'
GROUP BY DepositGroup, IsDepositExpired
ORDER BY DepositGroup DESC, IsDepositExpired
--SELECT * from WizzardDeposits
| true |
e861df9a777ae97144be7db96c3588b9c49b7c71 | SQL | Hitagi71/Projeto_Cursos | /analise.sql | UTF-8 | 1,988 | 4.0625 | 4 | [] | no_license | ------------------ Analise ----------------------
-- 1) faixa etária dos alunos cadastrados
-- 2) cursos mais vendidos em porcentagem
-- 3) vendas por autor
-- 4) Relação notas categorias
-- 1)
with idade as (
select
aln_pes_id,
trunc((months_between(sysdate, aln_dt_nasc))/12) as Idade_Aluno
f... | true |
4da61a0754f7f02805f106b9921e11756ffd9e18 | SQL | yadson18/SIGIG | /TABELAS.sql | UTF-8 | 812 | 3.53125 | 4 | [] | no_license | create table users(
id int primary key auto_increment not null,
name varchar(100) not null,
registration varchar(16) unique not null,
email varchar(60) not null,
username varchar(100) not null,
password varchar(255) not null,
role varchar(20) not null,
created datetime default null,
modified datetime default n... | true |
66683ef397852145718d7a02a2afffadd5393e43 | SQL | duncan-iaria/game-bro | /server/db/schema.sql | UTF-8 | 2,062 | 3.78125 | 4 | [] | no_license | CREATE DATABASE game_bro_db;
USE game_bro_db;
DROP TABLE IF EXISTS users;
CREATE TABLE users
(
id INTEGER( 11 ) AUTO_INCREMENT NOT NULL,
name VARCHAR( 30 ) NOT NULL,
imgUrl VARCHAR( 150 ),
PRIMARY KEY( id )
);
INSERT INTO users ( name, imgUrl )
VALUES
( "Duncan", "http://duncan.jpg" ),
( "Rhiannon", "... | true |
a937d3a26d8d54395ffa435d8379175c667d68f9 | SQL | solaresjuan98/politics-sql | /views/views.sql | UTF-8 | 3,606 | 4.34375 | 4 | [] | no_license | /*
-- View country_regions - DELETE
create view country_regions
as
select country_name, 'TOTAL', sum(total_raza) as total
from (
select distinct country_name, race_name, count(r.race_code), count(*) total_raza
from countries
join elections e on countries.country_code = e.country_co... | true |
99544e33d6b6751d01714029acb9f0c5b2f97c43 | SQL | ondratu/morias | /sql/sqlite/page_menu.sql | UTF-8 | 501 | 3.15625 | 3 | [] | no_license | create table page_menu (
item_id integer not null primary key autoincrement,
parent integer references page_menu (item_id),
next integer references page_menu (item_id),
ordering integer,
title text not null,
link text,
locale text,
state integer not null default 1 -- variable sta... | true |
52fe6e6f1f9210bb46c999f745a05b04d1546e5e | SQL | Alfa512/AirPro-Diagnostics | /AirPro.Database/Billing/Views/vwInvoiceBalances.sql | UTF-8 | 2,080 | 3.90625 | 4 | [] | no_license |
CREATE VIEW [Billing].[vwInvoiceBalances]
AS
WITH Invoices
AS
(
SELECT
i.InvoiceID
,o.ShopGuid
,s.Name [ShopName]
,o.ShopReferenceNumber
,o.VehicleVIN
,o.OrderId
,COUNT(rpt.ReportId) [InvoicedReportCount]
,o.CreatedDt [RepairCreatedDate]
,i.InvoicedDt [InvoicedDate]
,u.LastName + '... | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.