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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
d905505e273c9c70b4ec58359d1bfd5ba281da72 | SQL | shumynvolodymyr/MySQL | /MySQL_lection_1.sql | UTF-8 | 1,638 | 3.828125 | 4 | [] | no_license | select * from students;
select name, age from students;
select * from students where age = 15;
select * from students where name = 'roman';
select * from students where name like '%a';
select * from students where name like 'a%';
select * from students where name like '%a%';
select * from students where name li... | true |
4e9fbb9e35a3f78e2ceb788b586fbeb74a24c1bd | SQL | sprokushev/Delphi | /MASTER/_DATABASE/Views/V_UNP_GRAFIK_PLAN_PAY.sql | WINDOWS-1251 | 5,795 | 3.59375 | 4 | [] | no_license | --
-- V_UNP_GRAFIK_PLAN_PAY (View)
--
CREATE OR REPLACE FORCE VIEW MASTER.V_UNP_GRAFIK_PLAN_PAY
(DOG_ID, DATE_PLAT, SUMMA_PLAT)
AS
SELECT /*+ ORDERED */
aa.dog_id, aa.date_plat, SUM (aa.summa_plat) AS summa_plat
FROM (SELECT /*+ ORDERED INDEX (bp BILL_POS_NOM_DOK_2_I) USE_HASH (kls_prod)*/
... | true |
95d6673c083ac42ac4f6d66cd08b364c8da12d89 | SQL | linxiumeng/zhonghong | /blade-service/blade-infomation/src/test/resources/sql/tb_fuser.sql | UTF-8 | 1,751 | 2.8125 | 3 | [] | no_license | CREATE TABLE `tb_fuser` (
`user_id` bigint(20) NOT NULL AUTO_INCREMENT,
`mobile` varchar(32) DEFAULT NULL COMMENT '账号',
`password` varchar(64) DEFAULT NULL COMMENT '密码',
`unified_social_code` varchar(32) DEFAULT NULL COMMENT '统一社会编码',
`legal_person` varchar(32) DEFAULT NULL COMMENT '法人',
`card1` varchar(256... | true |
ff6e863602ce35f3dfeb5003d3e2078afa4e86f5 | SQL | jotso/easy-pick-api | /database_structure.sql | UTF-8 | 1,947 | 2.9375 | 3 | [] | no_license |
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!4010... | true |
dfab775146e4cff396c350ca0c440e937d35be25 | SQL | ElOmai/Tarea-SQL-Server | /Tarea-SQL-Server/SQL/71-Autocombinación.sql | UTF-8 | 1,149 | 3.546875 | 4 | [] | no_license | if object_id('comidas') is not null
drop table comidas;
create table comidas(
codigo int identity,
nombre varchar(30),
precio decimal(4,2),
rubro char(6),-- 'plato'=plato principal', 'postre'=postre
primary key(codigo)
);
insert into comidas values('ravioles',5,'plato');
insert into comid... | true |
492bfbdb653588d578685856225f2f20e1e4999a | SQL | lakemp2345/sql-challenge | /Queries.sql | UTF-8 | 2,401 | 4.625 | 5 | [] | no_license | CREATE TABLE departments (
dept_no VARCHAR NOT NULL,
dept_name VARCHAR NOT NULL
);
CREATE TABLE dept_emp (
emp_no INTEGER NOT NULL,
dept_no VARCHAR NOT NULL
);
CREATE TABLE dept_manager (
dept_no VARCHAR NOT NULL,
emp_no INTEGER NOT NULL
);
DROP TABLE employees;
CREATE TABLE empl... | true |
498e3ae81564ca77ecdd029387e5d48006fae8da | SQL | MattRoger/arrowverse-character-guide | /seeds/blacklight.sql | UTF-8 | 4,757 | 2.78125 | 3 | [] | no_license | -- black lightening
INSERT INTO Characters (
main_id, first_name, last_name, main_alias, _show, alignment,species,
img, bg_color)
VALUES (501,"Jefferson", "Pierce", "Black Lightning", "blacklight", "good", "meta-human",
'blacklight/blacklight.jpg',
"#104580");
INSERT INTO hero_skills(hero_id,skill_id)
VALUES(501, 1... | true |
bfb1c7d98ab069c0a33ea24ad30f3b2f799b42a2 | SQL | wgy1149470382/wgy_1708 | /t_present.sql | UTF-8 | 3,521 | 3.125 | 3 | [
"MIT"
] | permissive | /*
Navicat MySQL Data Transfer
Source Server : 天天果园
Source Server Version : 50714
Source Host : localhost:3306
Source Database : mysql
Target Server Type : MYSQL
Target Server Version : 50714
File Encoding : 65001
Date: 2018-02-09 17:46:15
*/
SET FOREIGN_KEY_CHECKS=0;
-- --------... | true |
e55602bebc02fd184ec66f32686c311e60d5f261 | SQL | herbid/latihan_pertemuan_10_jwd_DTS | /jwd_dts_9.sql | UTF-8 | 1,772 | 3.03125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.7.7
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Waktu pembuatan: 17 Agu 2021 pada 15.43
-- Versi server: 10.1.30-MariaDB
-- Versi PHP: 7.2.2
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARA... | true |
8e00ee76dfb1ba9ce9e5acd53fb6af33c94bf895 | SQL | ndlongit/longnd-projects | /attendance/src/main/sql/update.sql | UTF-8 | 4,444 | 3.96875 | 4 | [] | no_license | -- Department - Begin
select departmentCode, min(departmentId), count(departmentId) from department
group by departmentCode
order by departmentCode;
update useraccount set department_Id = 3 where department_Id in (select departmentId from department where upper(departmentCode) like 'ABC');
update useraccount se... | true |
a0eb2d349d643818fdce2d84584f5b3d14b33f4a | SQL | gmaheshraju/Odata-Service-Creation | /emplist-web/build/classes/dbscript/script.sql | UTF-8 | 1,344 | 3.421875 | 3 | [] | no_license | CREATE DATABASE IF NOT EXISTS `odatadb` /*!40100 DEFAULT CHARACTER SET utf8 */;
USE `odatadb`;
/* dbscript file for simple Odata Demo Application */
DROP TABLE IF EXISTS `currency`;
CREATE TABLE `currency` (
`idCurrency` varchar(25) NOT NULL,
`name` varchar(45) DEFAULT NULL,
PRIMARY KEY (`idCurrency`)
) ENGINE=I... | true |
57355324922cd5088d19eff539f57c9657491c17 | SQL | fandashtic/arc_chennai | /Sivabalan-SQL/SQL_STORED_PROCEDURE/sp_SaveDshandle.sql | UTF-8 | 423 | 3.109375 | 3 | [] | no_license | CREATE Procedure sp_SaveDshandle(@SalesmanId Integer, @DstypeId Integer)
As
Begin
Delete from Dshandle where SalesmanId = @SalesmanId
Insert Into Dshandle
Select Distinct @SalesmanId, DsCgm.GroupId, 1 from tbl_mERP_DSTypeCGMapping DsCgm
Join ProductCategoryGroupabstract pcga on DsCgm.GroupId = pc... | true |
4166df3fe2b7cb445c17fc10f994260abd1ad20d | SQL | NC-Coyote/Portfolio | /Mock Database/tableContents_showData.sql | UTF-8 | 838 | 3.109375 | 3 | [] | no_license | -- Project Option: University Database
-- Purpose: Table Contents - show the contents of all tables
-- Author: Nathan Cottrell, SID: 006765987
-- set formatting options
SET LINESIZE 132
SET PAGESIZE 60
-- save queries to an output file
SPOOL tableContents_showContents.txt
-- all Staff table data
SELECT *
FROM NCOT.... | true |
42269e8822f56e9215e4f095224759abba3553a3 | SQL | farukoguz/SoftwareTestandQualityProject | /db_script/uygar.sql | UTF-8 | 14,103 | 3.296875 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.8.5
-- https://www.phpmyadmin.net/
--
-- Anamakine: 127.0.0.1
-- Üretim Zamanı: 06 May 2019, 10:44:55
-- Sunucu sürümü: 10.1.38-MariaDB
-- PHP Sürümü: 7.3.4
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_C... | true |
0abf7ae6b4f237ed5e122c9dd6225f1c734ae1a4 | SQL | 341116/JongerenKansrijker | /Statements.sql | UTF-8 | 1,034 | 3.265625 | 3 | [] | no_license | create database Jongerenkansrijker;
USE Jongerenkansrijker;
create table activiteit(
activiteitcode INT NOT NULL AUTO_INCREMENT,
activiteit VARCHAR(255) NOT NULL,
primary key(activiteitcode)
);
create table instituut(
instituutcode INT NOT NULL AUTO_INCREMENT,
instituut VARCHAR(255) NOT NULL... | true |
d7f2550f3152a736185667e40bca98332ff25757 | SQL | UAMS-DBMI/PosdaTools | /posda/posdatools/queries/sql/FilePathByFileId.sql | UTF-8 | 391 | 2.765625 | 3 | [
"Apache-2.0"
] | permissive | -- Name: FilePathByFileId
-- Schema: posda_files
-- Columns: ['path']
-- Args: ['file_id']
-- Tags: ['SeriesSendEvent', 'by_series', 'find_files', 'for_send', 'for_comparing_dups', 'used_in_file_import_into_posda', 'reimport_queries']
-- Description: Get file path from id
select
root_path || '/' || rel_path as path
... | true |
e0c910f220ad0a9143233091165ea6aff7e50e33 | SQL | AimeeTan/ZPSGateway | /Zebra.DB.ZPS.Gateway/svc/Functions/Account_VaultBalance.sql | UTF-8 | 510 | 3.109375 | 3 | [] | no_license | -- Smile
CREATE FUNCTION [svc].[Account$VaultBalance]()
RETURNS TABLE
WITH SCHEMABINDING, ENCRYPTION
AS RETURN
(
select ID=PartyID, TenantAlias=a.Alias, VaultBal, InvoicedAmt, UninvoicedAmt, CurrencyID, VaultType, CurBal, CreditLimit
, BizUnitID=ISNULL(BizUnitID, 0), BizUnit=ISNULL(p.Alias, N''), BillingCycle
from... | true |
47eb186dc71be73ccd07c04037b91a00af342831 | SQL | jjpedraza/eam | /bd/LadaConsulta.sql | UTF-8 | 260 | 3.28125 | 3 | [] | no_license | SELECT DISTINCT
SUBSTRING(celular, 1, 3 ) as Lada
,
(SELECT GROUP_CONCAT(clave) FROM ladas WHERE clave like CONCAT('%',Lada,'%')) as Lugar,
(select count(*) from celulares where celular like CONCAT('',Lada,'%')) as n
FROM
celulares
order by n desc | true |
7d913c6a236825863db140df81816eea0309440d | SQL | Tolotsoa06/anjarmi | /anjarmi.sql | UTF-8 | 14,803 | 3.078125 | 3 | [
"MIT"
] | permissive | -- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Hôte : localhost
-- Généré le : lun. 15 fév. 2021 à 14:31
-- Version du serveur : 10.4.11-MariaDB
-- Version de PHP : 7.4.5
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SE... | true |
c0a1744783d0b8ffb2c29ce00372d59de02f3087 | SQL | handrix/gptc-sync | /config/sql.sql | UTF-8 | 1,209 | 2.90625 | 3 | [] | no_license | CREATE TABLE `gptc_block` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`miner` varchar(100) DEFAULT '',
`hash` varchar(100) DEFAULT '',
`number` varchar(100) DEFAULT '',
`difficulty` varchar(100) DEFAULT '',
`extra_data` varchar(100) DEFAULT '',
`gas_limit` varchar(100) DEFAULT '',
`gas_used` varcha... | true |
20f9589a7c6f5125196c0f71a0d0c3225d4def4e | SQL | bigertg/hello-world | /springcloudalibaba/seata/alibaba-order-seata/src/main/resources/sql/schema.sql | UTF-8 | 1,380 | 3.34375 | 3 | [] | no_license | /*
Navicat Premium Data Transfer
Source Server : mysql5.5
Source Server Type : MySQL
Source Server Version : 50554
Source Host : localhost:3306
Source Schema : seata_order
Target Server Type : MySQL
Target Server Version : 50554
File Encoding : 65001
Date: 18/06/2021... | true |
8779af25615c1cbbd86369a94e4042d3d1a576cc | SQL | SkyFire/SkyFireDB | /archived_updates/world/11_06_08__08_world_sai.sql | UTF-8 | 43,119 | 2.640625 | 3 | [] | no_license |
/* Raid Normal-Heroic for 10 & 25 people */
/* Trash Mobs */
-- Azureborne Destroyer
SET @ENTRY := 47087;
UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY;
DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=@ENTRY;
INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,... | true |
43a365e68baadb7697883f753fb867578f50c487 | SQL | Lili-Lepage/OculusGeek | /Documentation/dump/Dump_oculus_2015-05-10.sql | UTF-8 | 8,060 | 3.3125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.1.14
-- http://www.phpmyadmin.net
--
-- Client : 127.0.0.1
-- Généré le : Dim 10 Mai 2015 à 19:13
-- Version du serveur : 5.6.17
-- Version de PHP : 5.5.12
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_... | true |
ec32f220668332b4dbfeda2273abcb1bb9656fcd | SQL | mtejas88/esh | /Projects_SotS_2017/service_providers/benchmark_pricing_list/benchmark_pricing_list.sql | UTF-8 | 1,107 | 3.859375 | 4 | [] | no_license | /*
Author: Jamie Barnes
Date: 8/22/2017
Purpose: List of the primary service providers on districts that would be meeting the 100 kbps/student goal
if they received the bandwidth they are paying for based off of pricing benchmarks.
*/
select service_provider_assignment,
count(esh_id) as districts,
sum(num_students) a... | true |
7810609ade7e5b4d580d190c12751ed1aa438175 | SQL | eurospent/eurospent | /1_scraping/romania/3_query.sql | UTF-8 | 45,098 | 3.515625 | 4 | [
"MIT"
] | permissive | INSERT INTO public."ro_final" (
transaction_id,
project_name,
beneficiary_name,
total_amount,
eu_cofinancing_amount,
amount,
amount_kind,
beneficiary_id,
fund_acronym,
funding_period,
project_state,
project_region,
project_county,
project_nuts3,
project_city,
project_lau2,
country,
c... | true |
f8157bad05b4a5e559bd8b3aa30d3fb0cdb84271 | SQL | Urbancova/FSWD80-CodeReview11-LuciaUrbancova | /PHP-Blog2/codereview11_urbancova_travelmatic.sql | UTF-8 | 8,858 | 3.21875 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.9.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Nov 27, 2019 at 05:50 PM
-- Server version: 10.4.8-MariaDB
-- PHP Version: 7.3.11
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD... | true |
99b837a04830e2ad35e71101949770cc79115409 | SQL | daniel-browning/database-exercises | /albums_migration.sql | UTF-8 | 287 | 2.6875 | 3 | [] | no_license | USE codeup_test_db;
CREATE TABLE albums (
id INT UNSIGNED NOT NULL AUTO_INCREMENT,
artist VARCHAR(50) DEFAULT 'NONE',
record_name VARCHAR(100) NOT NULL,
release_date INT(4) NOT NULL,
sales FLOAT(6) NOT NULL,
genre VARCHAR(50) NOT NULL,
PRIMARY KEY (id)
);
| true |
61103c398e735038d07078ba287b880974062a0e | SQL | medy13/dbshell | /normal_shell/RCP_WORKFLOW.sql | UTF-8 | 803 | 2.671875 | 3 | [] | no_license | \echo ------------------RCP_WORKFLOW----------------
select now();
\timing
insert into RCP_WORKFLOW_GPTMP (CMD_TYPE,LEVYNO, TRANSFER_NUM, PROCESS_STATUS, PROCESS_DATE) select CMD_TYPE,LEVYNO, TRANSFER_NUM, PROCESS_STATUS, PROCESS_DATE from RCP_WORKFLOW_INC_EXT;
delete from RCP_WORKFLOW using RCP_WORKFLOW_GPTMP where R... | true |
0cba6babfac794eab7071163452fa99793b8053b | SQL | talfstad/rs-app | /STORED_PROCEDURES.sql | UTF-8 | 10,303 | 3.796875 | 4 | [] | no_license | DELIMITER //
CREATE PROCEDURE insert_domain
(IN in_url VARCHAR(1000),
IN in_user VARCHAR(100),
IN in_date DATETIME,
IN in_base_url VARCHAR(200))
BEGIN
IF (in_url != '' AND in_url IS NOT NULL) THEN
IF EXISTS (SELECT * FROM all_domains WHERE (url = in_url AND user = in_user)) THEN
UPDATE al... | true |
ecce7ee85b583ad30c0c6f001905047e3601cda9 | SQL | svarssel/projeto_loginunico | /projeto_loginunico.sql | UTF-8 | 373 | 2.53125 | 3 | [] | no_license | DROP TABLE IF EXISTS `usuarios`;
CREATE TABLE `usuarios` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`email` varchar(100) DEFAULT NULL,
`senha` varchar(32) DEFAULT NULL,
`ip` varchar(20) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
INSERT INTO `usuarios` (`id`, `email`, `senh... | true |
09e05aa399de2ada85571fe7de5db7f81fbb983c | SQL | Bahouddin/new-file | /sql/22_create_tables.sql | UTF-8 | 2,051 | 3.515625 | 4 | [] | no_license | USE `ads`;
CREATE TABLE `user` (
`id` INTEGER NOT NULL AUTO_INCREMENT,
`login` VARCHAR(200) NOT NULL UNIQUE,
`password` VARCHAR(200) NOT NULL,
/*
* 0 - ADMIN
* 1 - CUSTOMER
*/
`role` TINYINT NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=INNODB DEFAULT CHARACTER SET utf8;
CREATE TABLE `user_info` (
`id` INTEGE... | true |
aa9ae19cc59b7f89ad8b02ff5b7243c523fad93a | SQL | aiemelyanov/RedGate | /TEST3/APEX_030200/Tables/WWV_FLOW_ALTERNATE_CONFIG.sql | UTF-8 | 450 | 3.0625 | 3 | [] | no_license | CREATE TABLE apex_030200.wwv_flow_alternate_config (
"ID" NUMBER NOT NULL,
security_group_id NUMBER NOT NULL,
flow_id NUMBER,
"NAME" VARCHAR2(255 BYTE) NOT NULL,
last_updated_by VARCHAR2(255 BYTE),
last_updated_on DATE,
config_comments VARCHAR2(4000 BYTE),
CONSTRAINT wwv_flow_alt_cong_pk PRIMARY... | true |
33dc0de6ea276fd1a239e634da1134ea43d15bf6 | SQL | stel1575/javaTest | /LoginProject/member.sql | UTF-8 | 572 | 2.890625 | 3 | [] | no_license | CREATE TABLE users(
id VARCHAR2(12) PRIMARY KEY,
passwd VARCHAR2(12),
addr VARCHAR2(50),
age NUMBER,
email VARCHAR2(30),
gender CHAR(1),
name VARCHAR2(12),
nation VARCHAR2(16)
);
INSERT INTO users VALUES('java','java','서울시',40,'aaa@aaa.com','M','오정원','대... | true |
978a7d1c0f1b6ffcd0051fe7635382f644765f25 | SQL | travisVela/database-exercises | /albums_migration.sql | UTF-8 | 269 | 3.078125 | 3 | [] | no_license | USE codeup_test_db;
DROP TABLE IF EXISTS albums;
CREATE TABLE albums(
id INT UNSIGNED NOT NULL AUTO_INCREMENT,
artist VARCHAR(50) NOT NULL,
name VARCHAR(50) NOT NULL,
release_date INT,
sales DECIMAL(9, 5),
genre VARCHAR(50),
PRIMARY KEY (id),
UNIQUE (name, artist)
); | true |
bdcb4ac547473ba40d5f7fd95ac101167beadc37 | SQL | cvmichaus/vacacionesV2 | /urbanis6__vacaciones.sql | UTF-8 | 10,532 | 2.8125 | 3 | [
"MIT"
] | permissive | -- phpMyAdmin SQL Dump
-- version 4.8.0.1
-- https://www.phpmyadmin.net/
--
-- Servidor: 127.0.0.1
-- Tiempo de generación: 16-01-2020 a las 07:31:08
-- Versión del servidor: 10.1.32-MariaDB
-- Versión de PHP: 5.6.36
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00... | true |
1cd872dfeb9f837801f0dfe05fe59f8d083a78fe | SQL | yeralcoqueco/PruebaUSCO | /parqueaderoSQL.sql | UTF-8 | 4,286 | 3.21875 | 3 | [] | no_license | -- MySQL dump 10.13 Distrib 8.0.15, for Win64 (x86_64)
--
-- Host: localhost Database: parqueaderobd
-- ------------------------------------------------------
-- Server version 8.0.15
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RE... | true |
f0b97c1280f4815af562fd2f69ec25ff3474471c | SQL | TasinIshmam/bookflix-backend | /app/prisma/migrations/20210626124834_add_user_author_interaction_model/migration.sql | UTF-8 | 508 | 3.28125 | 3 | [] | no_license | -- CreateTable
CREATE TABLE "UserAuthorInteraction" (
"id" SERIAL NOT NULL,
"userId" INTEGER NOT NULL,
"authorId" INTEGER NOT NULL,
"isFavorite" BOOLEAN NOT NULL DEFAULT false,
PRIMARY KEY ("id")
);
-- AddForeignKey
ALTER TABLE "UserAuthorInteraction" ADD FOREIGN KEY ("userId") REFERENCES "User"("... | true |
4ddebca088e63c0bc0b8375df1016cc95cbe3179 | SQL | ElderBass/Hamburgler | /db/burgers.sql | UTF-8 | 282 | 2.734375 | 3 | [] | no_license | --Pretty straightforward database of burgers--
CREATE DATABASE IF NOT EXISTS burgers_db;
USE burgers_db;
DROP TABLE IF EXISTS burgers;
CREATE TABLE burgers (
id INTEGER(10) AUTO_INCREMENT PRIMARY KEY,
burger_name VARCHAR(35) not null,
devoured BOOLEAN default 0
);
| true |
a0af4ad5463c08000d623559a88b371b2e86e963 | SQL | ralsololi/pm_mimiciii_diabetes | /male_procedure.sql | UTF-8 | 768 | 3.59375 | 4 | [] | no_license | CREATE TABLE diabetes.male_procedures AS
(SELECT
subject_id,
hadm_id,
activity,
charttime
FROM
diabetes.admission_diabetes,
mimiciii.patients
WHERE
admission_diabetes.subject_id = patients.subject_id AND
patients.gender = 'm'
UNION ALL
SELECT
subject_id,
hadm_id,
... | true |
34266f5e47b3a117c6e4584b26efafd23f217b3a | SQL | dyancl1024/CodeGenerator | /temp/tempfolder/RH/Training/Modify/MngMenuModify.sql | UTF-8 | 645 | 2.75 | 3 | [] | no_license | /*
RH_MngMenu - 修改信息脚本
*/
DROP PROCEDURE IF EXISTS sp_SJ_RH_MngMenu_Modify;
CREATE PROCEDURE sp_SJ_RH_MngMenu_Modify
(
IN i_ID int,
IN i_MenuName nvarchar(50),
IN i_MenuUrl nvarchar(200),
IN i_MenuCode varchar(50),
IN i_MenuLevel int,
IN i_MenuSort int,
IN i_Status int,
IN i_ParentID int,
... | true |
01eae32f74ae2d1c47a07f2e13911cc38121dcf2 | SQL | andreihaivas6/University | /DBMS Practice/lab1-ex-lab.sql | UTF-8 | 4,351 | 3.546875 | 4 | [] | no_license | accept i_nume_curs char prompt 'Introdu numele cursului: '
set serveroutput on;
DECLARE
v_nume_curs cursuri.titlu_curs%type;
v_nota_maxima note.valoare%type;
v_numar_studenti number(6);
v_nume_student studenti.nume%type;
v_prenume_student ... | true |
0582547d20faca3eef2dc74fc5599c6fe5ddb8c0 | SQL | 1newstar/oracle-study | /scripts/dev/plsql/func_proc/function.sql | UTF-8 | 2,093 | 4.0625 | 4 | [] | no_license | /*
函数和过程都是子程序;
优点:1.模块化 2.可重用性 3.可维护性 4.安全性
函数是可以返回值的命名的 PL/SQL 子程序。
创建函数的语法:
CREATE [OR REPLACE] FUNCTION
<function name> [(param1,param2)]
RETURN <datatype> IS|AS
[local declarations]
BEGIN
Executable Statements;
RETURN result;
EXCEPTION
Exception handlers;
END;
*/
create or replace function fun_hello
ret... | true |
9ecdfff03dd5f3e8d1013141488adb59fbe8f423 | SQL | rheslar15/development | /LiRoInspect.iOS/Utility/Database/LiRoDBQuery.sql | UTF-8 | 97,422 | 2.875 | 3 | [] | no_license | BEGIN TRANSACTION;
CREATE TABLE "options" (
`OptionsId` int NOT NULL,
`OptionsDesc` varchar(255) NOT NULL,
`priority` int,
PRIMARY KEY(OptionsId)
);
INSERT INTO `options` VALUES (1,'General',NULL);
INSERT INTO `options` VALUES (2,'Grading',NULL);
INSERT INTO `options` VALUES (3,'Backfill',NULL);
INSERT INTO `option... | true |
b157e4befaf69b2b7235f30959d7b3bad4945761 | SQL | anushalenkapothula/MiniProject | /delete.sql | UTF-8 | 1,502 | 3.46875 | 3 | [] | no_license | DECLARE
user_name varchar2(100):='&admin_name';
passwd varchar2(100):='&admin_password';
acc_num number:=&account_number_to_be_deleted;
name varchar2(100);
balance number;
PROCEDURE updation(acc_num number)
IS
CURSOR cur IS
SELECT user_name,balance FROM USER_DETAILS WHERE account_number = acc_num;
... | true |
6dc780aff250d5db7cf02db1c6edb4f7445a6ef4 | SQL | maulidul/dispendu | /assets/backup/dev_kios27_ci.sql | UTF-8 | 2,974 | 3.328125 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | -- phpMyAdmin SQL Dump
-- version 4.3.11
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Aug 03, 2015 at 12:18 PM
-- Server version: 5.6.24
-- PHP Version: 5.6.8
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
... | true |
d1064e347656aed11b04bfebccff0be92f81b42c | SQL | Love4684/Machine-Learning | /DBMS/SQL-exercise/SQL_exercise_10/10_build_schema.sql | UTF-8 | 1,021 | 3.484375 | 3 | [
"CC-BY-SA-4.0",
"CC-BY-SA-3.0",
"MIT"
] | permissive | -- Used SQLite3 for this example
-- table PEOPLE: containing unique ID and corresponding names.
CREATE TABLE PEOPLE (id INTEGER, name CHAR);
INSERT INTO PEOPLE VALUES(1, "A");
INSERT INTO PEOPLE VALUES(2, "B");
INSERT INTO PEOPLE VALUES(3, "C");
INSERT INTO PEOPLE VALUES(4, "D");
-- ADDRESS: containing the history o... | true |
d4900b9297683f18f6165c2611b2e4a9fd1ea12c | SQL | Atlassian1989/Atlassian-SQL-Queries | /ProjectCategory.sql.sql | UTF-8 | 332 | 3.265625 | 3 | [
"Apache-2.0"
] | permissive | Project - project-Category
SELECT pc.cname AS PROJECT_CATEGORY,p.pname AS PROJECT_NAME,p.LEAD AS PROJECT_LEAD from project p
join nodeassociation n ON n.SOURCE_NODE_ID= p.ID
join projectcategory pc ON pc.ID = n.SINK_NODE_ID
where n.SINK_NODE_ENTITY = 'ProjectCategory'
ORDER BY pc.cname ASC;
... | true |
eb1fe317eb558571f67b88ae0180dd4a686cf25c | SQL | vlbash/diklz | /submodule/core.data/Core.Data.Mis/Dto/pgsql/BaseAppointmentListDto.sql | UTF-8 | 1,185 | 3.875 | 4 | [] | no_license | select
a.id,
a.caption,
a.start_date,
a.end_date,
a.patient_card_id,
coalesce(d.organization_id, uuid_in('00000000-0000-0000-0000-000000000000')) as organization_id,
coalesce(pc.reg_number || ' (' || p.last_name || ' ' || p.name || ' ' || p.middle_name || ')', '') as patient_card_caption,
coalesce(person.l... | true |
f2f8f36c90b7b6d4fa1ec0fce01472eae1c7c0a1 | SQL | go2suresh1979/MyRepo | /Personal/Solaris/main/datawarehouse/sql/cr_chk_dup_node_trigger.sql | UTF-8 | 2,453 | 4.03125 | 4 | [] | no_license | /*
**---------------------------------------------------------------------------#
**
** Component: $Id:
** Author: Tze Ken Soh
** Copyright: Totality Corporation, 2005. All Rights Reserved.
** Description: This script creates triggers to check for existing
** node
**
**--------------------------... | true |
45c290a0ff26fec53aadb2292b2df513ebafbb8c | SQL | BradleyHersey/bamazon | /schema.sql | UTF-8 | 1,877 | 3.359375 | 3 | [] | no_license | CREATE DATABASE bamazon_db;
USE bamazon_db;
CREATE TABLE products
(
item_id INTEGER (10)
AUTO_INCREMENT NOT NULL,
product_name VARCHAR
(250) NOT NULL,
department_name VARCHAR
(250),
price DECIMAL
(10,2) NOT NULL,
stock_quantity INTEGER
(10) NOT NULL,
product_sales DECIMAL
... | true |
58c7e7f91b1610ade8ad0b5628562eb25265b337 | SQL | MakarovAlexey/projects-managment | /src/db-schema.sql | UTF-8 | 1,449 | 3.09375 | 3 | [] | no_license | CREATE TABLE projects (
id,
name text,
master_branch
)
CREATE TABLE task_groups (
id,
name text,
manager
)
CREATE TABLE root_task_groups (
id,
project_id
)
CREATE TABLE common_task_groups (
id
)
CREATE TABLE branches (
project_id,
id,
initial_commit_id,
)
-- изменеия... | true |
94d154f6f9e264c8e9d870afa00bee86f7f6263a | SQL | ErinHales/ozzy | /db/posts/get_all_posts.sql | UTF-8 | 195 | 3.15625 | 3 | [] | no_license | SELECT Posts.id, Posts.date, Posts.post, Posts.status, Posts.image, Posts.link, Users.first_name, Users.last_name, Users.picture FROM Posts
JOIN Users ON Users.id = Posts.userid
ORDER BY id DESC; | true |
34fb4149975850f5eaf927b6270c3252d88c59da | SQL | twsyedbilal/demo | /SM/src/main/resources/db/migration/V20200220034255__alter_table_add_colum_class_master.sql | UTF-8 | 1,889 | 3.5 | 4 | [] | no_license | DROP PROCEDURE IF EXISTS add_column_in_class;
DELIMITER $$
CREATE PROCEDURE add_column_in_class()
BEGIN
IF NOT EXISTS (SELECT * FROM information_schema.COLUMNS WHERE TABLE_SCHEMA=database() AND TABLE_NAME='sm_class_master' and COLUMN_NAME='class_capacity') THEN
alter table sm_class_master ADD class_capacity va... | true |
8f006f091a0222898e4e7ef8baf0e8b135314aff | SQL | exastro-suite/it-automation | /ky_sql_seeds/TABLE_CONFIG/ita_model-m.sql | UTF-8 | 67,942 | 2.796875 | 3 | [
"Apache-2.0",
"LGPL-3.0-only",
"MIT"
] | permissive | -- *****************************************************************************
-- *** ***** CreateParameterMenu Tables ***
-- *****************************************************************************
-- -------------------------
-- パラメータシート作成情報
-- -------------------------
CRE... | true |
f0768427ca701a90c31c76e4ed8dd13f021a8220 | SQL | kronos777/podskasky_for_me | /learn/sql/exampls.sql | WINDOWS-1251 | 3,966 | 4.0625 | 4 | [] | no_license | SELECT *
FROM (
SELECT title AS name, author_id AS commission
FROM news
)X
WHERE commission <80
SELECT concat( title, ' WORKS AS A ', text ) AS msg
FROM news
LIMIT 0 , 50
/*
*/
select title, author_id,
case when author_id <= 76 then 'UNDERPAID'
when author_id >= 80 then 'OVERPAID'
... | true |
578b5e7835df3b3c1b2969f45e0657a9eb5731dd | SQL | pengfeigao/app-version-manager | /src/main/resources/app_version.sql | UTF-8 | 15,049 | 3.53125 | 4 | [] | no_license | /*
Navicat Premium Data Transfer
Source Server : localhost
Source Server Type : MySQL
Source Server Version : 50724
Source Host : localhost:3306
Source Schema : app_version
Target Server Type : MySQL
Target Server Version : 50724
File Encoding : 65001
Date: 05/03/201... | true |
f95e44c8384ddc16bc70517f84ee522976d01797 | SQL | imrbpro/SmartGuideApplication | /SGA/SGAdb/dbo/Stored Procedures/SpGetShopByBrand.sql | UTF-8 | 134 | 2.8125 | 3 | [] | no_license | CREATE PROCEDURE SpGetShopByBrand
@brand nvarchar(50)
AS
BEGIN
SELECT * FROM
shop WHERE shop_name = @brand
FOR JSON PATH
END
| true |
99e22f5fb7c93193bcda4410f4e5f137ecde6b11 | SQL | HataFred/regression_project_ironhack | /regression sql - Frederic Hatanian.sql | UTF-8 | 4,373 | 4.28125 | 4 | [] | no_license | # question 5
ALTER TABLE housing.regression_data_clean
DROP column date;
select * from regression_data_clean
limit 10;
# question 6
select count(id) from regression_data_clean;
# question 7
#bedrooms
select distinct(bedrooms), count(id)
from regression_data_clean
group by bedrooms
order by bedrooms;
# it seems we h... | true |
0d7093a37eef3606d1e2f1c30fc9f023344a0a09 | SQL | RuanAlves/Implantacao | /Scripts/CRIAR_EMPRESACOMPLEMENTOS.sql | ISO-8859-1 | 303 | 2.5625 | 3 | [] | no_license | /**
* @author Ruan Alves
* Funo: Inserindo Empresa Complementos para Empresa que no possuem essa tabela
*/
INSERT INTO EMPRESA_COMPLEMENTOS (CODEMPRESA, MARGMINIMAPRECIFICACAO, TIPOFRETEPADRAO)
(SELECT CODIGO, 0, 'CIF' FROM EMPRESA WHERE CODIGO NOT IN (SELECT CODEMPRESA FROM EMPRESA_COMPLEMENTOS)) | true |
6d4bf5aed628f310eef572be5c010861d5afd535 | SQL | naresh-nandu/NanduGST | /WePGSTDB/dbo/Stored Procedures/usp_Retrieve_GSTR1EXPA_EXT.sql | UTF-8 | 1,056 | 3.328125 | 3 | [] | no_license |
/*
(c) Copyright 2017 WEP Solutions Pvt. Ltd..
All rights reserved
Description : Procedure to Retrieve the GSTR1 EXPA Records from the corresponding external tables
Written by : Sheshadri.mk@wepdigital.com
Date Who Decription
03/3/2018 Seshadri Initial Version
*/
/* Sample Procedure Call
exec usp_Retr... | true |
e5b61fc35ea3893142837c36c7005281907a30c6 | SQL | Javidan1997/SQL-Querries | /sd/millikart_tranzaction_date.sql | UTF-8 | 1,267 | 3.765625 | 4 | [] | no_license | with account_balance as (SELECT gt_tx.source_amount,
gt_tx_def.received_amount
,gt_tx.id,em_coin.serial,(ha.performedat),gt_tx_def.status,gt_tx_def.external_status,CAST(gt_tx.payer_data::json->(1)->(-2)->(1)->'value' as text) as nm
FROM public.gate_tx_purchase_via_gate via_gate
left join gate_tx gt_tx on... | true |
50f799ba47b0732361c079a3be03e84f583650f5 | SQL | meppps/sql-challenge | /EmployeeSQL/queries.sql | UTF-8 | 1,790 | 4.40625 | 4 | [] | no_license | -- QUERIES
--1 List the following details of each employee: employee number, last name, first name, gender, and salary.
SELECT e.emp_no,
e.last_name,
e.first_name,
e.gender,
s.salary
FROM employees e
JOIN salaries s
ON e.emp_no = s.emp_no;
-- 2. List employees hired in 1986
SELECT emp_no,first_name,last_name,... | true |
aa951a1fa36845fcc75a5bf342b78568a4a05c20 | SQL | jigardalwadi/pal-tracker | /database/tracker/migrations/V1__initial_schema.sql | UTF-8 | 193 | 2.71875 | 3 | [] | no_license | CREATE TABLE time_entries (
id INT NOT NULL AUTO_INCREMENT,
project_id INT,
user_id INT,
date DATE,
hours INT,
PRIMARY KEY (id)
)
ENGINE = innodb
DEFAULT CHARSET = utf8; | true |
7885b46ad5f2a6e9f95ec2add9083ed0e12b05cd | SQL | QuentinDiaferia/annuaireCodeIgniter | /database.sql | UTF-8 | 2,464 | 3.5625 | 4 | [
"MIT"
] | permissive | CREATE TABLE functions (
id int(11) NOT NULL AUTO_INCREMENT,
name varchar(255) NOT NULL,
active boolean NOT NULL,
PRIMARY KEY (id)
);
CREATE TABLE users (
id int(11) NOT NULL AUTO_INCREMENT,
active boolean NOT NULL,
title char(3) NOT NULL,
password varcha... | true |
90e6dbca167765f56ff8fdc99ebb3ba62b06816c | SQL | alximik05/DBChallenge | /src/main/resources/h2init.sql | UTF-8 | 403 | 3.203125 | 3 | [] | no_license | -- DROP TABLE "USER";
-- DROP TABLE ROOM;
-- DELETE FROM "USER";
-- DELETE FROM ROOM;
CREATE SCHEMA IF NOT EXISTS DBTEST;
CREATE TABLE IF NOT EXISTS ROOM (
id IDENTITY PRIMARY KEY,
room_name VARCHAR(255)
);
CREATE TABLE IF NOT EXISTS "USER" (
id IDENTITY PRIMARY KEY,
name VARCHAR(255),
room_... | true |
96c0814618982487195814b395dbbe0f444bca68 | SQL | acabrera100/Web_Final_Practical | /web_final_earworm_report/backend/db/seed.sql | UTF-8 | 5,152 | 2.8125 | 3 | [] | no_license | DROP DATABASE IF EXISTS musicstoragedatabase;
CREATE DATABASE musicstoragedatabase;
\c musicstoragedatabase;
CREATE TABLE users(
id SERIAL PRIMARY KEY,
username VARCHAR UNIQUE
);
CREATE TABLE genres(
id SERIAL PRIMARY KEY,
genre_name VARCHAR UNIQUE
);
CREATE TABLE songs(
id SERIAL PRIMARY KEY,
title VARCHAR NOT NUL... | true |
1c3ff604a2c016460ce1be8f9fc2a6efefae5bd1 | SQL | MigDinny/LibreAtlas | /db.sql | UTF-8 | 2,265 | 3.171875 | 3 | [
"Apache-2.0"
] | permissive | -- phpMyAdmin SQL Dump
-- version 4.6.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: 06-Nov-2018 às 20:29
-- Versão do servidor: 5.7.14
-- PHP Version: 7.2.11
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */... | true |
97add08a1e60d4601801cf964128a2d0075cd59c | SQL | jobserrr/dtbj_site | /sql/post.sql | UTF-8 | 1,802 | 2.84375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Jun 24, 2021 at 11:19 AM
-- Server version: 10.4.14-MariaDB
-- PHP Version: 7.4.9
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIEN... | true |
63c7272e2c8768055a08d59e685bceb0502733c5 | SQL | cirocsb10/sispen_war | /WEB-INF/classes/br/com/integrator/modules/miscs/seeds/scripts/tbl_academic_formations.sql | UTF-8 | 4,253 | 2.671875 | 3 | [] | no_license | /*
-- Query: SELECT * FROM dtb_sispen_dev.tbl_academic_formations
LIMIT 0, 1000
-- Date: 2012-06-03 11:56
*/
INSERT INTO tbl_academic_formations (id_academic_formation,name) VALUES (100,'ENSINO FUNDAMENTAL COMPLETO');
INSERT INTO tbl_academic_formations (id_academic_formation,name) VALUES (101,'ENSINO FUNDAMENT... | true |
5c407e79820a11525ba05bbb334a05cb5c1e0b84 | SQL | CUBRID/cubrid-testcases | /sql/_13_issues/_10_1h/cases/CUBRIDSUS-3299.sql | UTF-8 | 4,942 | 3.21875 | 3 | [
"BSD-3-Clause"
] | permissive | set system parameters 'create_table_reuseoid=no';
create or replace view vx (a) as select 'aaa' from db_root;
select if(attr_name = 'a', 'OK', 'NOK') from db_attribute where class_name='vx';
select if(data_type = 'STRING', 'OK', 'NOK') from db_attribute where class_name='vx';
select if(prec = 3, 'OK', 'NOK') from db_at... | true |
e2634fc945a8b924023238d96008533f6103ed15 | SQL | logonmy/daimigo | /backup/20130110052929.sql | UTF-8 | 9,062 | 3.203125 | 3 | [] | no_license | DROP TABLE IF EXISTS acl;
CREATE TABLE `acl` (
`aclid` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(200) COLLATE utf8_unicode_ci NOT NULL,
`controller` varchar(50) COLLATE utf8_unicode_ci NOT NULL,
`action` varchar(50) COLLATE utf8_unicode_ci NOT NULL,
`acl_name` varchar(50) COLLATE utf8_unicode_ci NOT NUL... | true |
28b7e5369b8f9f2dc4c245fe7a70678250be76fe | SQL | amitYanovich/amit.yanovich | /amit_yanovich.sql | UTF-8 | 591 | 2.65625 | 3 | [] | no_license | -- MySQL dump 10.13 Distrib 8.0.20, for macos10.15 (x86_64)
--
-- Host: localhost Database: amit_yanovich
-- ------------------------------------------------------
-- Server version 8.0.20
use `amit_yanovich`;
-- Table structure for table `users`
--
;
CREATE TABLE `users` (
`id` int(100) NOT NULL AUTO_INCREMENT,... | true |
d57aa4babb1daa4dfbddf2e149530ba1f78550c5 | SQL | EMazarakis/PL-SQL-for-TOAD | /SUM_AVG_MIN_MAX_COUNT.sql | UTF-8 | 637 | 3.40625 | 3 | [] | no_license | --- Return the sum for all the records of the field column1
SELECT SUM(column1) AS "Sum of all column1's records" FROM table_name;
--- Return the average value for all the records of the field column1
SELECT AVG(column1) AS "Average of all column1's records" FROM table_name;
--- Return the minimum value of the field ... | true |
fa5b49920ab30cce9a223e9b6a04d47a6eabd1fc | SQL | dabarc/DabarcStrategyNewDesignMabe | /DabarcStrategyNewDesign/dabarc/Stored Procedures/sp_REC_getStructForBDC.sql | UTF-8 | 2,303 | 3.390625 | 3 | [] | no_license | CREATE PROCEDURE [dabarc].[sp_REC_getStructForBDC]
@script_id INT
AS
BEGIN
SET NOCOUNT ON;
----------------------------------------------------------------------------------------------------------------
-- Creamos la tabla de retorno
---------------------------------------------------------------------------------... | true |
912ab8e7eb4e12fdb59fc3b21e240c925e0127ba | SQL | bang-tokyo/bang-server | /db/structure.sql | UTF-8 | 12,268 | 2.953125 | 3 | [] | no_license | -- MySQL dump 10.13 Distrib 5.6.19, for debian-linux-gnu (x86_64)
--
-- Host: localhost Database: bang_development
-- ------------------------------------------------------
-- Server version 5.6.19-0ubuntu0.14.04.1
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RE... | true |
359440192da3b68a9f0917fe83abc626f99a08f5 | SQL | SylviaNatomy/WishWall | /wish.sql | UTF-8 | 1,129 | 3 | 3 | [] | no_license | /*
Navicat MySQL Data Transfer
Source Server : localhost_mysql
Source Server Version : 50714
Source Host : localhost:3306
Source Database : wish
Target Server Type : MYSQL
Target Server Version : 50714
File Encoding : 65001
Date: 2017-08-05 10:04:45
*/
SET FOREIGN_KEY_CHECKS=0;
-... | true |
be430b4ac1ec72dbd654e4d990e20538acb44f84 | SQL | ou5y/SpringCloud | /ssstcjava/dbscript/create.sql | UTF-8 | 2,003 | 3.5 | 4 | [] | no_license | --收款凭证表
CREATE TABLE `ssstc_agency`.`make_collections_identify` (
`id` BIGINT NOT NULL,
`seller_id` BIGINT NULL COMMENT '商家id',
`oder_id` BIGINT NULL COMMENT '订单id',
`certificate` VARCHAR(45) NULL COMMENT '凭证(图片)',
`create_time` DATETIME NULL,
`liushuihao` VARCHAR(45) NULL COMMENT '流水号',
PRIMARY KEY (`id`... | true |
5ca2955a3a7bdf82e6c48d4a4ae11878149e9d8d | SQL | AlexandraFil/Geekbrains_2.0 | /db_mysql/project/7_window_view.sql | UTF-8 | 1,411 | 4 | 4 | [] | no_license | -- Оконные функции
-- Оценка средней стоимости работ по каждому типу объекта ремонта
SELECT DISTINCT object_types.name,
AVG(payments.total) OVER w AS average,
MIN(payments.total) OVER w AS min,
MAX(payments.total) OVER w AS max,
SUM(payments.total) OVER w AS total_by_type,
SUM(payments.to... | true |
9eb6aaeceb74ba3677b364de8f9cfcd2a5e87559 | SQL | evxzibit/docnow | /modules/DB/mysql-3.0.1b2-upgrade.sql | UTF-8 | 28,949 | 3.375 | 3 | [] | no_license | # ---------------------------------------
# Post 3.0.1b2
# ---------------------------------------
CREATE INDEX ClicksSrc_URL ON Clicks (Src_URL);
DELETE FROM Temp_Mails;
DELETE FROM Temp_Texts;
ALTER TABLE Temp_Mails ADD Recipient_STRING varchar(255) DEFAULT '' NOT NULL;
ALTER TABLE Temp_Mails ADD Process_ID ... | true |
5cb862b1d736f746074ec78b3cc27160d96caa7d | SQL | Finsh/db | /6. DO/temp_do.sql | UTF-8 | 31,840 | 3.65625 | 4 | [] | no_license | SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0;
SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0;
SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='TRADITIONAL,ALLOW_INVALID_DATES';
CREATE SCHEMA IF NOT EXISTS `DO` DEFAULT CHARACTER SET utf8 ;
USE `DO` ;
-- ---------------------------------------... | true |
86d3ac31b24eb294a09b1bb6043a686d335b04f9 | SQL | hintonandrew510/product-license | /webproductlicense/ProductLicense/src/java/derby.sql | UTF-8 | 746 | 2.828125 | 3 | [] | no_license | /*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
/**
* Author: andrewhinton
* Created: Jun 30, 2018
*/
CREATE TABLE contact
(
contact_id INTEGER NOT NULL GENERATED ALWAYS AS IDE... | true |
e3de6cde07b221ba614ac88c600a7bad25728fb8 | SQL | ZVlad1980/validator_test | /sql.sql | UTF-8 | 614 | 3.578125 | 4 | [] | no_license | column author format a30
select a.id_xref, substr(a.author, 1, 30) author, a.end_date from authors a
;
merge into authors aa
using (
select rownum rn, a.id_xref, pr.out_of_print_date end_date
from authors a,
product_xref pr
where a.id_xref = pr.id_xref
and a.end_date... | true |
7f74219fbad288b0d800fc898657294a8938bcaa | SQL | 754189127/study-web | /src/main/resources/db-study.sql | UTF-8 | 2,725 | 3.4375 | 3 | [] | no_license | /*
SQLyog Ultimate v11.24 (32 bit)
MySQL - 5.5.57 : Database - db_study
*********************************************************************
*/
/*!40101 SET NAMES utf8 */;
/*!40101 SET SQL_MODE=''*/;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECK... | true |
06432b321866b8e5213a52c597b4ee1ca02b16d7 | SQL | lizc126/CZ4031 | /project2_cz4031/queries/query_4/query_4b.sql | UTF-8 | 376 | 3.0625 | 3 | [] | no_license | \t
\a
explain (analyze, costs, verbose, buffers, format json) select customer_a.custkey, customer_a.name, nation.name
from (select name, custkey, nationkey from customer where customer.custkey <= 750) as customer_a, nation
where customer_a.nationkey = nation.nationkey and nation.nationkey >= 10
order by customer... | true |
5868f568ce8b6e9f58c9cdc0475ed6858c6dfba7 | SQL | AugustDuelund/Week-47 | /week47exercises.sql | UTF-8 | 1,790 | 3.828125 | 4 | [] | no_license | USE sakila;
#Task 1
SELECT * FROM actor;
SELECT * FROM actor WHERE last_name = "CAGE";
SELECT * FROM actor WHERE first_name <> "ZERO" AND first_name <> "NICK";
SELECT * FROM actor WHERE first_name IN ("NICK", "JOHNNY","JAMES","MORGAN","WHOOPI");
SELECT * FROM actor WHERE actor_id BETWEEN 50 AND 150;
SELECT * FROM acto... | true |
7039d7210cd757f8d9faf1ecf9ac3f8309cd0c86 | SQL | TsvetanBoychev/PL-SQL | /IF ELSE THEN.sql | KOI8-R | 2,648 | 3.515625 | 4 | [] | no_license | DECLARE
a number(2) := 10;
BEGIN
a:= 10;
-- check the boolean condition using if statement
IF( a < 20 ) THEN
-- if condition is true then print the following
dbms_output.put_line('a is less than 20 ' );
END IF;
dbms_output.put_line('value of a is : ' || a);
END;
... | true |
7ca6284e51301f0c9f048b5d61fb94b43b6ba376 | SQL | amrita027/AppPress | /AppPressThinkSysHR/App_Data/DBBackup/apppressdb_mygeorgetownmd.sql | UTF-8 | 4,197 | 2.734375 | 3 | [] | no_license | CREATE DATABASE IF NOT EXISTS `apppressdb` /*!40100 DEFAULT CHARACTER SET latin1 */;
USE `apppressdb`;
-- MySQL dump 10.13 Distrib 5.6.13, for Win32 (x86)
--
-- Host: localhost Database: apppressdb
-- ------------------------------------------------------
-- Server version 5.5.16
/*!40101 SET @OLD_CHARACTER_SET_C... | true |
af27e43f232be0267e46c21e4b3a3e94e23bb2d6 | SQL | vaglarov/Databases-Basics---MS-SQL-Server | /Test 012019/03. Built-in-functions/Exercise/Problem10.sql | UTF-8 | 213 | 3.65625 | 4 | [] | no_license | --Problem 10
SELECT
EmployeeID
,FirstName
,LastName
,Salary
,DENSE_RANK() over (partition by Salary ORDER BY EmployeeID) AS [RANK]
FROM Employees
WHERE Salary BETWEEN '10000' AND '50000'
ORDER BY Salary DESC | true |
83257885f3e7b011c57c86aaaa19b0a59a3ee7e5 | SQL | monalihirapara/weatherforecast | /DB/db.sql | UTF-8 | 5,512 | 3.09375 | 3 | [] | no_license | -- --------------------------------------------------------
-- Host: 127.0.0.1
-- Server version: 5.7.29-0ubuntu0.18.04.1 - (Ubuntu)
-- Server OS: Linux
-- HeidiSQL Version: 11.0.0.5919
-- --------------------------------------------------------
/*!4... | true |
73e7a12edce1e6e655da1a9792f1879999cf9752 | SQL | alianheart/sahayogi_citizen_merger_scripts | /sahayogi_citizen_merger_scripts/query/CASA/CASA-query/LAST_TRANS_DATE.sql | UTF-8 | 310 | 3.046875 | 3 | [] | no_license | ------ONE TIME RUN---------Last Transaction Date---------------------------
IF OBJECT_ID('FINMIG.dbo.LAST_TRANS_DATE', 'U') IS NOT NULL
DROP TABLE FINMIG.dbo.LAST_TRANS_DATE;
SELECT * INTO FINMIG.dbo.LAST_TRANS_DATE FROM(
select MAX(TranDate) AS LastTranDate,MainCode from TransDetail group by MainCode)X | true |
8d5b23738a956e38c32a7a0cc7db074bec28fabb | SQL | magda16/plan_emprendedor | /base de datos/plan_emprendedores_db.sql | UTF-8 | 22,282 | 2.859375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.7.9
-- https://www.phpmyadmin.net/
--
-- Servidor: 127.0.0.1:3306
-- Tiempo de generación: 24-11-2019 a las 22:12:17
-- Versión del servidor: 5.7.21
-- Versión de PHP: 5.6.35
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/... | true |
b7837ff7c166a51cfba7680041d60713aaecfdbd | SQL | DBerchelmann/database-exercises | /select_exercises.sql | UTF-8 | 1,434 | 4.375 | 4 | [
"MIT"
] | permissive | #Create a new file called select_exercises.sql. Do your work for this exercise in that file.
#Use the albums_db database.
show databases;
use albums_db;
SELECT database();
#Explore the structure of the albums table.
show tables;
describe albums;
# The name of all albums by Pink Floyd
select name AS 'Albums by Pi... | true |
6fffe231992f6af519b7699b37c187795daf97f7 | SQL | Tuyibra/Millionposes_Project_Prototype | /database/mposes/mposes.sql | UTF-8 | 7,111 | 2.953125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 5.1.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Aug 05, 2021 at 07:36 AM
-- Server version: 10.4.20-MariaDB
-- PHP Version: 8.0.8
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIEN... | true |
3472d98bfe4d3f5603172e9a3f405e0be465d349 | SQL | caovithanhtuan/Railway20 | /SQL/Assignment2/Testing_System_Assignment_2(BT2).sql | UTF-8 | 2,411 | 3.953125 | 4 | [] | no_license | DROP DATABASE IF EXISTS TestingSytem_Assignment;
CREATE DATABASE TestingSytem_Assignment;
USE TestingSystem_Assignment;
CREATE TABLE Deparment(
DeparmentID TINYINT UNSIGNED PRIMARY KEY,
DeparmentName ENUM ('sale','maketing') CHECK(LENGTH(Deparment)>=8)
);
CREATE TABLE Position1(
PositionID TINYINT UNSIGNED PR... | true |
e31b937a2dfdbe35b011e9e99aef21d6c71a6eb3 | SQL | franco948/Paradigmas | /TP4/promocion.sql | UTF-8 | 575 | 2.59375 | 3 | [] | no_license | CREATE TABLE Promocion (
pro_nombre varchar(30) PRIMARY KEY NOT NULL,
pro_plato varchar(30) NOT NULL,
pro_bebida varchar(30) NOT NULL,
pro_precio float NOT NULL,
FOREIGN KEY (pro_plato) REFERENCES Plato(pla_nombre),
FOREIGN KEY (pro_bebida) REFERENCES Bebida(beb_nombre),
);
INSERT INTO Promocion... | true |
83e483bc00938d4c41fc466983aff51e0b82b1b7 | SQL | Gabriela-Ruiz-Blake/bamazon | /schema.sql | UTF-8 | 955 | 3.203125 | 3 | [] | no_license | DROP DATABASE IF EXISTS bamazon;
CREATE DATABASE bamazon;
USE bamazon;
CREATE TABLE products(
item_id INT AUTO_INCREMENT NOT NULL,
product_name VARCHAR(45) NOT NULL,
department_name VARCHAR(45) NOT NULL,
price DECIMAL(10,2) NOT NULL,
stock_quantity INT(10) NOT NULL,
primary key(item_id)
);
INSERT INTO pr... | true |
7e96d6cc47e6e61b2a8f70429593baba9db7cb87 | SQL | CPI-BI/bi-repo | /BI_SCRIPTS/Materialized Views/BI_COLLECTION_TAX_FACT_MV_TMP .sql | UTF-8 | 4,065 | 3.375 | 3 | [] | no_license | CREATE MATERIALIZED VIEW BIADMIN.BI_COLLECTION_TAX_FACT_MV_TMP
TABLESPACE USERS
PCTUSED 0
PCTFREE 10
INITRANS 2
MAXTRANS 255
STORAGE (
INITIAL 64K
MINEXTENTS 1
MAXEXTENTS UNLIMITED
PCTINCREASE 0
BUFFER_POOL DEFAULT
... | true |
74c0dcf1a34165989b17ac16c191b0bd8aaaed52 | SQL | murari-goswami/bi | /ETL/DataVirtuality/views/raw/raw.stylist.sql | UTF-8 | 1,343 | 3.453125 | 3 | [] | no_license | -- Name: raw.stylist
-- Created: 2015-04-24 18:18:07
-- Updated: 2015-07-23 09:53:19
CREATE VIEW raw.stylist
AS
SELECT
p.id as stylist_id,
sfu.sf_user_id as salesforce_customer_id,
CASE
WHEN SUBSTRING(sfu.user_role, 0, CASE WHEN LOCATE(' ', sfu.user_role) > 0 THEN LOCATE(' ', sfu.user_role)-1 ELSE LENGTH(sfu.use... | true |
91fa70381152246bc815be815c50711ab99142c9 | SQL | mohfajar17/POMS | /db_gantara.sql | UTF-8 | 16,551 | 2.84375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.7.7
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Generation Time: Apr 20, 2018 at 03:06 PM
-- Server version: 10.1.31-MariaDB
-- PHP Version: 7.0.26
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OL... | true |
67f3419d2a55a759895b4908a700203ec2033009 | SQL | FelipeBrizola/ACME | /scripts/acme_dumpTF.sql | UTF-8 | 233,508 | 3.125 | 3 | [] | no_license | --
-- PostgreSQL database dump
--
-- Dumped from database version 9.5.3
-- Dumped by pg_dump version 9.5.3
SET statement_timeout = 0;
SET lock_timeout = 0;
SET client_encoding = 'UTF8';
SET standard_conforming_strings = on;
SET check_function_bodies = false;
SET client_min_messages = warning;
SET row_security = off;
... | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.