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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
3f9d5bd2f5dde162fa3710f6910aec869ca3f1e1 | SQL | lsflsf520/web-logo | /src/main/resources/weizhan.sql | UTF-8 | 6,135 | 3.65625 | 4 | [] | no_license | CREATE TABLE `wx_user` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键自增长',
`phone` varchar(200) NOT NULL COMMENT '手机号,RSA加密存储',
`open_id` varchar(64) NOT NULL COMMENT '第三方用户唯一标识',
`nick_name` varchar(32) NOT NULL COMMENT '用户昵称。',
`sex` enum('U','F','M') DEFAULT NULL COMMENT '性别:U=未知,M=男,F=女'... | true |
e27c51f45b7c04e4a840246b2c13a96be4f173b9 | SQL | paul-bren/Azure-SQL | /Analysing Azure SQL databases/1-RowCountAndSpaceUsedbyTables.sql | UTF-8 | 929 | 3.9375 | 4 | [] | no_license | --Q1
SELECT
getdate() as review_date,
db_name() as db,
SUM(CAST(FILEPROPERTY(name, 'SpaceUsed') AS int)/128.0)/1024.0 AS UsedSpace,
SUM(size/128.0 - CAST(FILEPROPERTY(name, 'SpaceUsed') AS int)/128.0)/1024.0 AS FreeSpace,
SUM(size/128.0)/1024.0 AS Allocated_DBSize_GB,
cast(DATABASEPROPERTYEX(db_name(), 'MaxSizeInBytes... | true |
bb919c1b5ecb6fe5031d824a42c802e0d5570305 | SQL | nate9/lampstand | /resources/ESV/ESV_Nahum_sql_script.sql | UTF-8 | 8,544 | 2.734375 | 3 | [] | no_license | BEGIN TRANSACTION;
INSERT INTO BIBLE VALUES
('ESV', 'Nahum', 1, 1, 'An oracle concerning Nineveh. The book of the vision of Nahum of Elkosh.');
INSERT INTO BIBLE VALUES
('ESV', 'Nahum', 1, 2, 'The LORD is a jealous and avenging God; the LORD is avenging and wrathful; the LORD takes vengeance on his adversaries and keep... | true |
d1b8da09bb2056e30429ecc5ad08345631c71487 | SQL | jgarzonext/packages | /paquete body/PAC_IAX_LISTADO.sql | ISO-8859-1 | 5,317 | 2.765625 | 3 | [] | no_license | --------------------------------------------------------
-- DDL for Package Body PAC_IAX_LISTADO
--------------------------------------------------------
CREATE OR REPLACE EDITIONABLE PACKAGE BODY "AXIS"."PAC_IAX_LISTADO" AS
/******************************************************************************
NOMBRE: ... | true |
5df6433413574c023ae0886816d14f1b04cb30d3 | SQL | adrianoluccas/case_bv | /dump.sql | UTF-8 | 3,719 | 3.359375 | 3 | [] | no_license | -- --------------------------------------------------------
-- Servidor: 127.0.0.1
-- Versão do servidor: 10.3.11-MariaDB - mariadb.org binary distribution
-- OS do Servidor: Win64
-- HeidiSQL Versão: 9.5.0.5196
-- ------------------------------------------------... | true |
598ebc64f74324afe9c4268556c4f73f00c7f2ae | SQL | handaeho/lab_oracle | /exam_감자.sql | UTF-8 | 2,866 | 4.65625 | 5 | [] | no_license | --21. 제품 카테고리별, 연도별로 구매횟수, 누적 구매횟수, 매출액(amount_sold), 누적 매출액을 구하는 SQL 문장을 작성하시오.
--22. 제품 카테고리 중에서 '하드웨어'를 25번 이상 구매하였거나, 총 $40,000 이상 구입했던 고객들의
-- 국가, 도시, Last name, Age, Income level, 구매횟수, 매출액(amount_sold) 등을 내림차순으로 구하는 SQL 문장을 작성하시오.
SELECT country_name as 국가, cu.cust_city as 도시, cu.cust_last_name as 성,
... | true |
643e5861fd048d1e330a5268d366db491c3df92e | SQL | mxriverlynn/ocarina | /specs/oracle_package/specPackage.sql | UTF-8 | 1,061 | 3.15625 | 3 | [
"MIT"
] | permissive | /* tables */
CREATE TABLE "XE"."Z$_NINJA_TEST_1"
( "CREATED" DATE DEFAULT sysdate
);
CREATE TABLE "XE"."Z$_NINJA_TEST_2"
( "CREATED" DATE DEFAULT sysdate
);
/* package definition */
create or replace Package Ninja_Test AS
Procedure Test_Win;
Procedure Test_Fail;
Procedure Insert_1;
Procedure... | true |
b3588eb12e7fe40c5ac31d5565feb4e860b6b78d | SQL | mrttlu/2021_kevad | /api/docs/scripts.sql | UTF-8 | 2,595 | 3.796875 | 4 | [] | no_license | CREATE TABLE IF NOT EXISTS `excuses`.`users` (
`id` INT NOT NULL AUTO_INCREMENT,
`firstName` VARCHAR(45) NOT NULL,
`lastName` VARCHAR(45) NOT NULL,
`email` VARCHAR(45) NOT NULL,
`role` VARCHAR(45) NOT NULL,
`password` VARCHAR(255) NOT NULL,
`dateCreated` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
`del... | true |
eae207a9c4b9e98a8a64423fc7493c96ba843e2c | SQL | CooperNiu/java_persistence_practice_parking_lot_comprehensive-2019-8-26-2-21-50-376 | /src/main/resources/schema.sql | UTF-8 | 320 | 2.546875 | 3 | [] | no_license | CREATE TABLE `parking_boy` (
`employee_id` int(10) NOT NULL,
`name` varchar(10) NULL,
PRIMARY KEY (`employee_id`)
);
CREATE TABLE `parking_lot` (
`parking_lot_id` int(10) NOT NULL,
`availablePositionCount` int(3) NULL,
`capatity` int(3) NULL,
`parking_boy_id` int(10) NULL,
PRIMARY KEY (`parking_lot_id`)
); | true |
31b3e070cdc0bb8ae77fdc0d119a76b0fe57f3db | SQL | italiangrid/storm | /etc/db/storm_mysql_tbl.sql | UTF-8 | 16,016 | 3.421875 | 3 | [] | no_license | --###################################################
--#
--# Copyright (c) 2008 on behalf of the INFN CNAF
--# The Italian National Institute for Nuclear Physics (INFN),
--# All rights reserved.
--#
--# create StoRM databases
--#
--# author: luca.magnoni@cnaf.infn.it
--# changelog: Add "ON DELETE CASCADE" for reques... | true |
5153091d59c317de2a069b158bd8fd21006c9a88 | SQL | gjasinski/CoordCMS | /conf/evolutions/default/1.sql | UTF-8 | 1,898 | 3.5625 | 4 | [] | no_license | # --- !Ups
CREATE TABLE "EVENT" (
"ID" BIGINT PRIMARY KEY AUTO_INCREMENT,
"NAME" VARCHAR(120) NOT NULL,
"DESCRIPTION" VARCHAR NOT NULL,
"EVENT_CATEGORY" VARCHAR(60) NOT NULL,
"START_DATE_TIME" BIGINT NOT NULL,
"END_DATE_TIME" BIGINT
);
-- insert into EVENT ("NAME... | true |
0135d3a1aeda3e6a61a4992eb27c1066a8dbf005 | SQL | SteelBIM/fxtcode | /FxtCenterService/onLine_20161031/FxtCenterService.DataAccess/SQL/AutoPrice/ProjectListSpecial.sql | UTF-8 | 3,682 | 3.625 | 4 | [] | no_license | select distinct a.*
from (
SELECT [ProjectId],[ProjectName] +'['+a.[AreaName]+']' ProjectName,a.areaid,p.[Address],p.x,p.y,isevalue,
[PinYin],[OtherName],[PinYinAll]
FROM @table_project p with(nolock),FxtDataCenter.dbo.SYS_Area a with(nolock)where p.[Valid]=1 and p.[CityId]=@cityid and p.[AreaID]=a.[AreaID]
and p.Pro... | true |
5a80276d16755e033081c306ca8a7a5b3411b026 | SQL | sabinio/SimpleDeploy | /Demo4 - Adding changes/changes/AddNewCustomerTable.idempotent.sql | UTF-8 | 228 | 2.90625 | 3 | [] | no_license | if not exists (select 1 from sys.tables where name = 'Customer')
begin
create table Customer
(
CustomerId int not null constraint PK_Customer Primary Key
, Name varchar(100)
, PhoneNumber varchar(100)
)
end | true |
a11402c241d1e8bfaaac2109d2a5a1c346c36852 | SQL | Lincoln-hub/CST256 | /dbmilestone.sql | UTF-8 | 5,589 | 3.375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.9.5
-- https://www.phpmyadmin.net/
--
-- Host: localhost:3306
-- Generation Time: Mar 04, 2021 at 05:08 AM
-- Server version: 5.7.24
-- PHP Version: 7.4.1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHA... | true |
06c6e4beeac8f32f777b955a9c15edc861dd312c | SQL | SolarArbiter/solarforecastarbiter-api | /datastore/migrations/0023_data_sharing.up.sql | UTF-8 | 18,308 | 4.03125 | 4 | [
"MIT"
] | permissive | /*
* add grant and revoke actions to permissions table
*/
ALTER TABLE arbiter_data.permissions CHANGE COLUMN action action ENUM('create', 'read', 'update', 'delete', 'read_values', 'write_values', 'delete_values', 'grant', 'revoke') NOT NULL;
/*
* RBAC helper functions to limit sharing of roles outside the organiz... | true |
9208fe1cc20dba0717d625b76ab44864257a3da4 | SQL | waelvilla/risks-submission-system | /crud.sql | UTF-8 | 3,304 | 3.234375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.8.3
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Nov 30, 2018 at 04:00 PM
-- Server version: 10.1.36-MariaDB
-- PHP Version: 7.2.11
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OL... | true |
d4c3deff8f42afdf1fe971a9b8b58946fa7b9cdd | SQL | apollo2099/AppServer | /Web/sql/ma_user.sql | UTF-8 | 605 | 2.765625 | 3 | [] | no_license | CREATE TABLE `ma_user` (
`user_id` int(11) NOT NULL COMMENT 'id',
`user_code` varchar(32) NOT NULL COMMENT '登录用户名',
`user_password` varchar(32) NOT NULL COMMENT '登录用户密码',
`user_name` varchar(32) NOT NULL COMMENT '真实名子',
`user_sex` char(2) NOT NULL COMMENT '性别',
`email` varchar(64) DEFAULT NULL COMMENT '邮件',... | true |
e291e3f8a23ea3892337fcebb6f2b54585d4817d | SQL | nekerobert/Cleveland-admin-update | /database/cleveland.sql | UTF-8 | 20,476 | 2.75 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.9.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Jan 10, 2021 at 03:37 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 |
23d36e1bbc67f8e79832f57f2d7c98cd688dbebb | SQL | lingyuanCN/IFB399 | /sql/database.sql | UTF-8 | 1,712 | 3.078125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.6.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Jul 31, 2017 at 02:32 AM
-- Server version: 5.7.14
-- PHP Version: 7.0.10
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */... | true |
9bd341deca62875162e8d69cc0230bfe1610abaa | SQL | dbbarkley/burger | /db/schema.sql | UTF-8 | 310 | 3.328125 | 3 | [] | no_license | ### Schema
-- Drops the todolist if it exists currently --
DROP DATABASE IF EXISTS burger_db;
-- Creates the "burger" database --
CREATE DATABASE burger_db;
USE burger_db;
CREATE TABLE burgers
(
id int NOT NULL AUTO_INCREMENT,
name varchar(255) NOT NULL,
eaten BOOLEAN DEFAULT false,
PRIMARY KEY (id)
); | true |
07999b3df3f20f789415227d65d7fdf345253fb9 | SQL | sqrn/apex-customer-tracker | /f103/application/deployment/install/upgrade_populate_eba_cust_acl_features.sql | UTF-8 | 1,214 | 2.828125 | 3 | [] | no_license | prompt --application/deployment/install/upgrade_populate_eba_cust_acl_features
begin
wwv_flow_api.create_install_script(
p_id=>wwv_flow_api.id(1384311716060711419)
,p_install_id=>wwv_flow_api.id(17817343456864234187)
,p_name=>'populate eba_cust_acl_features'
,p_sequence=>560
,p_script_type=>'UPGRADE'
,p_condition_type... | true |
1b4aab8e6320aa622d6ed34b85cf6d701a35a14a | SQL | andreamll/ursolao-node-api | /assets/Ursolao.sql | UTF-8 | 8,901 | 3.453125 | 3 | [] | no_license | /* SQL Manager for MySQL 5.7.2.52112 */
/* -------------------------------------------------------------- */
/* Host : localhost */
/* Port : 3306 */
/* Database : Ursolao ... | true |
e281aa17fc6670de2dcb9ac74b1012d634e9a24a | SQL | blackfoxgdl/pulzos | /diversas_tablas/servicios.sql | UTF-8 | 1,477 | 2.5625 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 3.3.7deb5build0.10.10.1
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Sep 02, 2011 at 07:00 PM
-- Server version: 5.1.49
-- PHP Version: 5.3.3-1ubuntu9.5
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
... | true |
f3f40c1e252ec32a2c6743d063a6be9e9d3af179 | SQL | gicadmin/allo | /PHENIX/Tables/USER_LOG_MODIFS.sql | UTF-8 | 1,451 | 3.484375 | 3 | [] | no_license | CREATE TABLE phenix.user_log_modifs (
ulm_id NUMBER(15) NOT NULL,
ulm_modif_use_code NUMBER(5) NOT NULL,
ulm_use_code NUMBER(5) NOT NULL,
ulm_name_field VARCHAR2(30 BYTE) NOT NULL,
ulm_before_modif VARCHAR2(100 BYTE),
ulm_after_modif VARCHAR2(100 BYTE),
ulm_modification_date DATE NOT NULL,
ulm_modificat... | true |
bc11074daf26100dcf1bd13fd10368b92670a9c7 | SQL | greenedy/Capstone-Smart-Incubator | /Database/SmartIncubatorDatabase.sql | UTF-8 | 4,043 | 3.46875 | 3 | [] | no_license | -- MySQL Workbench Forward Engineering
SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0;
SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0;
SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTI... | true |
e442b4fb13a857d6a2683d6501ab99eeda38bc9f | SQL | SergioEstebanPi/Mundocente | /Documentacion/SPRINT 3/base de datos/scripts/cc_funcionarios.sql | UTF-8 | 141 | 2.71875 | 3 | [] | no_license | ALTER TABLE FUNCIONARIOS ADD (
CONSTRAINT FUN_FK_IDES FOREIGN KEY (ID_ESTABLECIMIENTO) REFERENCES ESTABLECIMIENTOS (ID_ESTABLECIMIENTO)
); | true |
67bcaf8617f04dcfb339a2237965b80dc4089cf1 | SQL | LeoGalleguillos/Group | /sql/test/group_user/create.sql | UTF-8 | 320 | 2.9375 | 3 | [] | no_license | CREATE TABLE `group_user` (
`group_user_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`group_id` int(10) unsigned NOT NULL,
`user_id` int(10) unsigned NOT NULL,
PRIMARY KEY (`group_user_id`),
UNIQUE `group_id_user_id` (`group_id`, `user_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
| true |
d8214537821f06aac61e94c869f043da9331878f | SQL | kmrmohit/E-Mentoring-Portal | /schema.sql | UTF-8 | 776 | 3.640625 | 4 | [] | no_license | DROP TABLE IF EXISTS user;
DROP TABLE IF EXISTS post;
CREATE TABLE user (
id INTEGER PRIMARY KEY AUTOINCREMENT,
username TEXT UNIQUE NOT NULL,
emailid TEXT NOT NULL,
password TEXT NOT NULL
);
CREATE TABLE post (
id INTEGER PRIMARY KEY AUTOINCREMENT,
author_id INTEGER NOT NULL,
... | true |
a6b9bcb31b45d64821eff0de04109890c2742a53 | SQL | SzymonSebMalecki/CONSOLE-BASED-GYM-BOOKING-SYSTEM | /SQLDATABASE/SQLDATABASE.sql | UTF-8 | 1,971 | 3.796875 | 4 | [
"MIT"
] | permissive | CREATE DATABASE IF NOT EXISTS gymbookingsystem; /* If database not exists already create new one */
USE gymbookingsystem;
DROP TABLE IF EXISTS Clients, Trainers, Bookings; /* Delete Table if it already excists */
/* Create Table Clients */
CREATE TABLE Clients
(
CLIENT_ID INT AUTO_INCREMENT PRIMARY KEY, /* Primar... | true |
3bd7eaa1f8d23626690fec8ec8f9251daedd98f9 | SQL | motechs2016/jyx | /Public/backup/xdl_jyx20150731.sql | UTF-8 | 4,736 | 3.046875 | 3 | [] | no_license | /*
Navicat MySQL Data Transfer
Source Server : 本地数据库
Source Server Version : 50538
Source Host : 127.0.0.1:3306
Source Database : xdl_jyx
Target Server Type : MYSQL
Target Server Version : 50538
File Encoding : 65001
Date: 2015-07-31 14:00:58
*/
SET FOREIGN_KEY_CHECKS=0;
-- -----... | true |
e4e2bcc329c2063dd41a963d8d16f8113bd29abf | SQL | srilakshmivemulapalli/portal | /PortalWebApp/portal-web-app/src/main/resources/dbscripts/DDL/blogs-alter-scripts.sql | UTF-8 | 351 | 2.71875 | 3 | [] | no_license |
ALTER TABLE `portal`.`Blogs`
DROP FOREIGN KEY `fk_categoryid_blogs`;
ALTER TABLE `portal`.`Blogs`
DROP COLUMN `categoryId`,
DROP INDEX `fk_categoryid_blogs_idx` ;
ALTER TABLE `portal`.`Blogs`
ADD COLUMN `userMailId` VARCHAR(45) NOT NULL AFTER `createdDate`;
ALTER TABLE `portal`.`Blogs`
ADD COLUMN `title` VARCHA... | true |
409ba3269ebd75f2ae07ae3a92ba6cdb428b2ba2 | SQL | grouppenggajian/penggajian | /update_database/update_09012017.sql | UTF-8 | 4,999 | 3.28125 | 3 | [
"MIT"
] | permissive | create view v_periodegaji_aktif as
SELECT periode_gaji.id,
periode_gaji.tglawal,
periode_gaji.tglakhir,
periode_gaji.thbl,
periode_gaji.aktif
FROM periode_gaji periode_gaji
where periode_gaji.aktif is true;
CREATE TABLE `ref_hari` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`... | true |
76a3032779b610f0562c883eed886c31c4265fcc | SQL | wisanggenib/igo-minithesis | /lib/db_sunsunyefix-2.sql | UTF-8 | 5,119 | 3.15625 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Sep 16, 2020 at 08:27 PM
-- Server version: 10.4.13-MariaDB
-- PHP Version: 7.4.8
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIEN... | true |
4141217b90c92b59c6e53b5b1b43dab3d0752fad | SQL | juliopragana/apeboxe | /arquivos de apoio/test.sql | UTF-8 | 4,432 | 3.328125 | 3 | [] | no_license | -- MySQL Script generated by MySQL Workbench
-- Thu Apr 4 13:25:59 2019
-- Model: New Model Version: 1.0
-- MySQL Workbench Forward Engineering
----------------------------------------------------
-- Schema apeboxe2
-- -----------------------------------------------------
CREATE DATABASE IF NOT EXISTS `apeboxe2` /... | true |
956aed34ab5a2558f13d7010d7d292ba07b95d56 | SQL | j-sieben/UTL_TEXT | /UTL_TEXT/tools/check_client_user.sql | UTF-8 | 524 | 2.796875 | 3 | [
"MIT"
] | permissive |
@install_scripts/init_client.sql &1.
prompt &h2.Checking whether client user is not UTL_TEXT owner
set termout off
col utl_text_owner new_val UTL_TEXT_OWNER format a30
select max(user) UTL_TEXT_OWNER
from user_objects
where object_name = 'PIT_ADMIN'
and object_type = 'PACKAGE';
begin
if '&UTL_TEXT... | true |
28534f59f68e441f248f82c5e1b856e79020713a | SQL | Rydgel/Shorty | /conf/evolution/default/1.sql | UTF-8 | 265 | 2.65625 | 3 | [
"MIT"
] | permissive | # Urls schema
# --- !Ups
CREATE ALIAS UUID FOR
"org.h2.value.ValueUuid.getNewRandom";
CREATE TABLE urls (
id uuid NOT NULL,
code text NOT NULL,
long_url text NOT NULL,
hits integer NOT NULL,
PRIMARY KEY (id)
);
# --- !Downs
DROP TABLE urls; | true |
f76dd51b8d38c768cbe02d35ef7710c91bf08002 | SQL | Rookiezfy/scrapy_gtn | /scrapy_gtn/database/us_stock_list.sql | UTF-8 | 320 | 3 | 3 | [] | no_license | CREATE TABLE `us_stock_list` (
`symbol` varchar(100) DEFAULT NULL COMMENT '股票代码',
`market` varchar(50) DEFAULT NULL COMMENT '市场代码-us',
`stock_name` varchar(255) DEFAULT NULL COMMENT '股票名称',
UNIQUE KEY `symbol` (`symbol`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='美股股票列表';
| true |
92d568b507e6e61672134e88c76ff52f9e625438 | SQL | baubyte/aplicacionesWebTPFinal | /Recursos/dB/dB_aplicacionesWeb_TPFinal.sql | UTF-8 | 17,909 | 3.25 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Servidor: localhost:3306
-- Tiempo de generación: 24-11-2020 a las 18:28:52
-- Versión del servidor: 5.7.24
-- Versión de PHP: 7.2.19
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHA... | true |
90e89a0dc25cb03b3cc48aacb602712c24f7efc0 | SQL | JoelProjects/apps | /tzuchi-store/tzuchi-store.sql | UTF-8 | 2,140 | 4.28125 | 4 | [] | no_license |
create table invoice (
invoice_id integer not null auto_increment,
invoice_no varchar(20),
handled_by varchar(25),
purchased_by varchar(50),
invoice_date datetime,
total double precision,
primary key (invoice_id)
) ENGINE=InnoDB;
create table invoice... | true |
8cfbc76c62eff10754c6349ec1cca23a80b4fb53 | SQL | santypa/L4G_TRABAJO_FINAL | /includes/db.sql | UTF-8 | 1,540 | 2.828125 | 3 | [] | no_license | -- --------------------------------------------------------
-- Host: localhost
-- Versión del servidor: 5.7.24 - MySQL Community Server (GPL)
-- SO del servidor: Win64
-- HeidiSQL Versión: 10.2.0.5599
-- --------------------------------------------------------
/... | true |
ab1ba667d5c5c561efaafda2cb61ea6689d599ed | SQL | eisakeramati/Online_shop_DB | /tables/customer_phone.sql | UTF-8 | 1,621 | 3.125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.7.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Jan 18, 2019 at 11:37 PM
-- Server version: 10.1.26-MariaDB
-- PHP Version: 7.1.9
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD... | true |
715571775ffa0109b0b4e51aa36173fd2d3f5501 | SQL | AngelaKru/SQLServerAG | /7-ListAGDatabaseStatus.sql | UTF-8 | 746 | 3.578125 | 4 | [] | no_license | USE master
--List AG databases status
SELECT g.name AS ag_name, g.is_distributed, r.replica_server_name, DB_NAME(drs.database_id) AS [db_name], drs.is_local, drs.is_primary_replica,
drs.synchronization_state_desc, drs.synchronization_health_desc, drs.database_state_desc, drs.is_suspended, drs.suspend_reason_desc,... | true |
bc33972c6073c798918d54c2c7d9f9c6d9a0edb9 | SQL | 361382300/SQL-procedures | /ecp.sql | UTF-8 | 1,241 | 3.640625 | 4 | [] | no_license |
--select count(*),sum(fr.fare * r.sellingrate)
select d.documentnumber,C.Reasonsubcode,fl.originairport,fl.destinationAIRPORT,pr.agentid as priagentId ,pr.*
from emd_document d,emd_issuingagent i,emd_fare fr,emd_transaction tr,emd_passenger p,
emd_pricing pr ,emd_coupon c ,emd_fl... | true |
56accc73c35ea74dd604216187e849a2424fc241 | SQL | agepere/IISSI-Copy-Shop | /Base de datos/Pruebas Ventas.sql | UTF-8 | 1,400 | 3.109375 | 3 | [] | no_license | EXECUTE INSERTAR_CLIENTES ('32094173L','Angel','Perez',null,'Triana','638075958','Universitario');
EXECUTE INSERTAR_CLIENTES ('32094174L','Lucia','Perez','aperez.fr2@gmail.com','Triana',null,'NoUniversitario');
EXECUTE INSERTAR_EMPLEADOS ('32094179L','Sandra','Perez','La vid','sandra@gmail.com',1000,'10-11-2013','10-... | true |
a15bd03d14d1e2597bca5287539196063feb20ed | SQL | sherzodv/detekto | /detektobot-core/src/main/resources/detektobot/migration/steps/20200820B.sql | UTF-8 | 319 | 2.78125 | 3 | [] | no_license | create table pack (
code varchar primary key,
received_at timestamp without time zone default (now() at time zone 'utc')
);
create table block (
code varchar primary key,
pack_code varchar not null,
received_at timestamp without time zone default (now() at time zone 'utc')
);
| true |
431f4adb1bc814e4541442f72bbe88f5e421a406 | SQL | sarieren/purchasing-groups---WEB | /db/create_db.sql | UTF-8 | 1,491 | 3.28125 | 3 | [] | no_license | -- CREATE database group_buy;
USE group_buy;
-- drop table purchaser;
-- drop table groups;
-- drop table purchaser;
-- drop table `groups`;
-- CREATE database group_buy;
-- CREATE TABLE user(
-- user_name varchar(50) NOT NULL PRIMARY KEY,
-- user_mail varchar(50),
-- user_password varchar(50)
-- ... | true |
83bb8b8a4a68adba93ba7807fe0d537f40c180c9 | SQL | serjio104/lessonSQL | /2.sql | UTF-8 | 1,580 | 3.875 | 4 | [] | no_license | /*
Таблица users была неудачно спроектирована. Записи created_at и updated_at были заданы типом VARCHAR
и в них долгое время помещались значения в формате 20.10.2017 8:10.
Необходимо преобразовать поля к типу DATETIME, сохранив введённые ранее значения.
*/
DROP DATABASE IF EXISTS my;
create database my;
use my;
DR... | true |
de0e237cb7f71f9ecc0a86d9fd42454de468619b | SQL | pedroisb/CTD_Ano01_Bimestre01 | /Banco_de_dados/QueriesIII/aula10_exSinc.sql | UTF-8 | 691 | 4.15625 | 4 | [] | no_license | -- Exercícios Síncronos
-- 1)
SELECT generos.nome, COUNT(cancoes.id)
FROM generos
INNER JOIN cancoes
ON generos.id = cancoes.id_genero
GROUP BY generos.nome
ORDER BY COUNT(cancoes.id) DESC;
-- 2)
SELECT generos.nome, COUNT(cancoes.id)
FROM generos
INNER JOIN cancoes
ON generos.id = cancoes.id_genero
GROUP BY generos.n... | true |
b24ad840bccdb4b3cfde076046f1def6960966c8 | SQL | C-Nikita/SQL-Oracle | /CyrilleTrenary_4_5.sql | UTF-8 | 544 | 2.875 | 3 | [] | no_license | --======================================================
--Cyrille Trenary
--CIS338: SQL / Oracle
--UNIT 4, CHAPTER 4-5 Assignment
--======================================================
--Handling Predefined Exceptions
DECLARE
rec_shopper bb_shopper%ROWTYPE;
lv_shopper_num numeric;
BEGIN
... | true |
cdbc4d5987f18964976c1fa674e363d5b70c5c86 | SQL | thebravoman/elsys-db-practices | /exam_2014/after_exam_homeworks/Denis_Nikolov_a_10/11/export2.sql | WINDOWS-1251 | 4,175 | 2.90625 | 3 | [] | no_license | --------------------------------------------------------
-- File created - --14-2014
--------------------------------------------------------
--------------------------------------------------------
-- DDL for Table ARTICLE
--------------------------------------------------------
CREATE TABLE "ELSYS"."ARTICL... | true |
fdc22b74b921e9c67353bc03f945c5d1e2fcaaa1 | SQL | Ro9ueAdmin/basted | /INSTALL.MYSQL | UTF-8 | 5,456 | 3.046875 | 3 | [] | no_license | INTALLATION OF BASTED WITH MYSQL ALIAS FOR POSTFIX
-----------------------------------------------------
FIRST read the README FILE.
Well although the actual BASTED installation consists of 2 simple steps,
we will try to include here some sample configurations and guidlines
that will help you prepare your system for a... | true |
2c4d10c2795282e0aaf13d5a7fe73224bc3d39de | SQL | jsbhb/servercenter | /3rdcenter/doc/pv-uv.sql | UTF-8 | 1,044 | 3.15625 | 3 | [] | no_license | drop table if exists `zm_thirdplugin`.`page_view`;
CREATE TABLE `zm_thirdplugin`.`page_view` (
`id` INT UNSIGNED NOT NULL AUTO_INCREMENT,
`page_name` varchar(100) NULL COMMENT '页面名称',
`type` TINYINT UNSIGNED NOT NULL COMMENT '0:访问页面;1:进入',
`num` INT UNSIGNED NULL default 0 COMMENT '访问数量',
`create_time`... | true |
baa787df0ef2fc379eff38231e44203e07fd7d4b | SQL | lynnbigdata/FastCampus-SSAC | /MYSQL/Quiz day1-1.sql | UTF-8 | 2,824 | 4.53125 | 5 | [] | no_license | ### Quiz Day1
## World Database
# QUIZ 1. 한국(국가코드:KOR) 도시 중 인구가 100만이 넘는 도시를 조회하여 인구 수 순으로 내림차순으로 출력하세요.
# 출력 컬럼: 도시이름(name), 도시 인구 수(population)
select name, population
from city
where countrycode="KOR" and population >= 1000000
order by population desc;
# QUIZ 2. 도시 인구가 800만~1000만 사이인 도시의 데이터를 국가코드 순으로 오름차... | true |
f1e7414c30c64fec592c82f451058625d4ead72f | SQL | josephchendrawi/XOX.CRM | /sql/XOX_T_BILL_PAYMENT.sql | UTF-8 | 738 | 3.203125 | 3 | [] | no_license | --DROP TABLE XOX_T_BILL_PAYMENT
CREATE TABLE XOX_T_BILL_PAYMENT
(
ROW_ID BIGINT IDENTITY(1,1) NOT NULL
,CREATED_BY BIGINT
,CREATED DATETIME
,LAST_UPD_BY BIGINT
,LAST_UPD DATETIME
,ACCNT_ID BIGINT
,BILL_CYCLE VARCHAR(10)
,SUBMISSION_DATE VARCHAR(10)
,MSISDN VARCHAR(20)
,POSTPAID_PLAN VARCHAR(50)
,AMOUNT_DUE DECIMAL(18... | true |
d107826e8ac42fc58f2d8929dc2720584ee16f9a | SQL | ferdinandjason/clash-of-code | /framework/database/type_rating.sql | UTF-8 | 1,302 | 2.796875 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.6.5.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: May 27, 2018 at 10:01 AM
-- Server version: 10.1.21-MariaDB
-- PHP Version: 7.1.14
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SE... | true |
ff4fd9f72d8b08b4a066f3af312c2faf2b4319ea | SQL | IsuruMaduranga/SupplyChainManagementSystem-Semester4 | /db/SCMSDB.sql | UTF-8 | 1,585 | 4 | 4 | [] | no_license |
CREATE TABLE IF NOT EXISTS users(
user_id char(12),
email varchar(255) UNIQUE,
_type enum('customer', 'admin' ,'employee') NOT NULL,
_password varchar(255) NOT NULL,
PRIMARY KEY (user_id)
);
CREATE TABLE IF NOT EXISTS customers (
customer_id char(12),
cus_type enum('wholesaler', 'retailer' , 'endcustom... | true |
de495a979d41980500d3853a0aff5229b7353417 | SQL | thatpatchguy/Bootcamp | /SQL/queries.sql | UTF-8 | 2,364 | 4.375 | 4 | [] | no_license | --List the following details of each employee: employee number, last name, first name, sex, and salary.
SELECT employees.emp_no, employees.first_name, employees.last_name, employees.sex, salaries.salary
FROM employees
JOIN salaries ON employees.emp_no = salaries.emp_no;
--List first name, last name, and hire date for ... | true |
252a15763577b555f5b8105a9fa1c21ab60c8330 | SQL | KrymskyiMaksym/advertising | /advertising.sql | UTF-8 | 5,574 | 3.4375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.7.7
-- https://www.phpmyadmin.net/
--
-- Хост: 127.0.0.1:3306
-- Время создания: Сен 29 2018 г., 01:48
-- Версия сервера: 5.6.38
-- Версия PHP: 7.1.12
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACT... | true |
233025275bb1a034391956c80f82b07d6cad5847 | SQL | YoanMoskov/SoftUni-Software-Engineering | /C#-DB/Exams - MS SQL/Databases MSSQL Server Exam - 13 February 2021/01.DDL.sql | UTF-8 | 1,183 | 3.609375 | 4 | [] | no_license | CREATE TABLE Users
(
Id INT PRIMARY KEY IDENTITY ,
Username VARCHAR(30) NOT NULL ,
Password VARCHAR(30) NOT NULL ,
Email VARCHAR(50) NOT NULL
)
CREATE TABLE Repositories
(
Id INT PRIMARY KEY IDENTITY ,
Name VARCHAR(50) NOT NULL
)
CREATE TABLE RepositoriesContributors
(
RepositoryId INT NOT N... | true |
8062699092dc66f790d63ce7c2d93baafd221761 | SQL | mgbardakov/job4j_dreamjob | /db/schema.sql | UTF-8 | 746 | 3.21875 | 3 | [] | no_license | DROP TABLE IF EXISTS post;
DROP TABLE IF EXISTS candidate;
DROP TABLE IF EXISTS photo;
DROP TABLE IF EXISTS users;
DROP TABLE IF EXISTS cities;
CREATE TABLE photo (
id SERIAL PRIMARY KEY
);
CREATE TABLE cities (
id SERIAL PRIMARY KEY,
name TEXT
);
INSERT INTO cities (name)
VALUES ('London');
INSERT INTO cit... | true |
ca1e1429ea166350382ef453df979f7a54e659d8 | SQL | didirs/ERNIE | /CT/De-Duplication.sql | UTF-8 | 258 | 2.953125 | 3 | [] | no_license | -- region ct_arm_groups
ALTER TABLE ct_arm_groups
ALTER COLUMN arm_group_label SET NOT NULL;
--
CREATE UNIQUE INDEX ct_arm_groups_uk
ON ct_arm_groups (nct_id, arm_group_label, arm_group_type, description)
TABLESPACE ernie_index_tbs;
-- 6.8s
-- endregion | true |
2ecdac777d98cbbaf8abfcceb4a4134883e273bf | SQL | Mostafasaead/CarDriverModule | /src/main/resources/data.sql | UTF-8 | 3,827 | 3.15625 | 3 | [] | no_license | /**
* CREATE Script for init of DB
*/
-- Create 3 OFFLINE drivers
insert into driver (driver_id, date_created, deleted, online_status, password, username) values (1, now(), false, 'OFFLINE',
'driver01pw', 'driver01');
insert into driver (driver_id, date_created, deleted, online_status, password, username) values (2... | true |
682f07c37dcc60b3b3d984d91a4034af7d2911fb | SQL | DurexRescue/Retail_system | /code/服务器端代码/014-put_in.sql | UTF-8 | 531 | 3.765625 | 4 | [] | no_license | create table put_in
(
Order_NUM varchar(50) not null,
SKU varchar(10) not null,
cost int null,
Payment_Date date null,
Delivery_Date date null,
Arrival_Date date null,
Supplier_Name varchar(50) null,
primary key (Order_NUM, SKU),
constraint put_in_ibfk_3
foreign key (SKU) references product (SKU)
on delet... | true |
a972e0e6da98e56cf651159e0ef74c5e59d67943 | SQL | bagaskaratpw/kantinonline | /account.sql | UTF-8 | 1,724 | 3.078125 | 3 | [
"LicenseRef-scancode-unknown-license-reference",
"MIT"
] | permissive | -- phpMyAdmin SQL Dump
-- version 4.8.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Apr 04, 2019 at 09:05 AM
-- Server version: 10.1.37-MariaDB
-- PHP Version: 7.2.14
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OL... | true |
47e3821399e47bac848dbc36faf8ca48c9d17497 | SQL | JiatianWang/B2B-event-ticketing-platform-Design-in-SQL | /Insert Values.sql | UTF-8 | 2,815 | 3.03125 | 3 | [] | no_license | USE TICKET_1;
-- payment_method
INSERT INTO `payment method` VALUES (1,'Credit Card');
INSERT INTO `payment method` VALUES (2,'Cash');
INSERT INTO `payment method` VALUES (3,'Debit');
INSERT INTO `payment method` VALUES (4,'EMT');
-- sales channel
INSERT INTO `sales channel` VALUES (1,'on site');
INSERT INTO `sales c... | true |
7a1b1819f39df29fc69a197e79e8fb2c474bb4ba | SQL | MarkusSzokoll/FSWD60-CodeReview11-Markus_Szokoll | /cr11_markus-szokoll_travelmatic.sql | UTF-8 | 7,397 | 2.890625 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.8.5
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Apr 10, 2019 at 06:08 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 |
376ff4adcef6d657fac5735837af0d3ad6571e4b | SQL | NikkoES/admin-i-love-campus | /db_ilovekampus.sql | UTF-8 | 5,142 | 2.96875 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.8.0
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Generation Time: Jun 15, 2018 at 06:00 PM
-- Server version: 10.1.31-MariaDB
-- PHP Version: 5.6.35
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OL... | true |
215267d9a4b35358d15df7707891367603176d22 | SQL | x-cpu/SQL | /PMC_Turboscan.sql | UTF-8 | 1,946 | 3.109375 | 3 | [] | no_license | use turboscanng1 select distinct T.BatchName, p.RMN, T.TurboscanBatchLocation, T.BatchStatus, T.TotalImages, T.TurboscanImportDateTime, p.RecvDate FaxReceivedDate, p.CRCDestination, T.BatchDesc
FROM
(select distinct batchname, Batchdesc,
case
... | true |
cc5726b218caa572796624c62a3f17ebcc3f8dbb | SQL | go2suresh1979/MyRepo | /Personal/Solaris/main/datawarehouse/sql/nemc/indexes/deprecated/cr_day_agg_nein_idx.sql | UTF-8 | 1,168 | 3 | 3 | [] | no_license | /*
**---------------------------------------------------------------------------#
**
** Component: $Id: //ovo8/main/datawarehouse/sql/nemc/indexes/deprecated/cr_day_agg_nein_idx.sql#1 $
** Author: Tze Ken Soh
** Copyright: Verizon Business, 2006. All Rights Reserved.
** Description: This script creates indexe... | true |
159bb2555c434dfdf7bbf90686ecc6582291a482 | SQL | rachylquan/create-cause-back | /migrations/001.do.create_cc_users.sql | UTF-8 | 279 | 2.671875 | 3 | [] | no_license | CREATE TYPE user_type AS ENUM (
'charity',
'creative'
);
CREATE TABLE cc_users (
id INTEGER PRIMARY KEY GENERATED BY DEFAULT AS IDENTITY,
name TEXT NOT NULL,
email TEXT NOT NULL UNIQUE,
user_type user_type,
password TEXT NOT NULL,
about TEXT,
website TEXT
);
| true |
4ccd2fa510a253a85a7ccabcaa8d199916047c0e | SQL | Avetris/TFG | /bd/Local/trigger.sql | UTF-8 | 7,078 | 3.90625 | 4 | [] | no_license | DELIMITER $$
----------------------------------------------CONTENIDO_IDIOMAS-------------
CREATE TRIGGER T_CONTENIDO_B
BEFORE DELETE ON CONTENIDO
FOR EACH ROW
BEGIN
DELETE FROM CONTENIDO_TEXTO
WHERE ID_TEXTO = OLD.ID_TEXTO;
DELETE FROM CONTENIDO_MINIJUEGOS
WHERE ID_CONTENIDO = OLD.ID_CONTENIDO;
END $$
CREATE TRIG... | true |
f9eddcf492264c12fa7d63e32d722cb775f358ab | SQL | vitshevl/dbUnit | /dbunit/src/main/resources/db/scripts/sql/1.sql | UTF-8 | 352 | 2.671875 | 3 | [] | no_license | create sequence if not exists employee_id_seq
increment 1
start 1;
create table if not exists employee
(
id bigint PRIMARY key default nextval('employee_id_seq'),
employee_first_name varchar(100) not null,
employee_middle_name varchar(100),
employee_last_name varchar(100) not null,
employee_... | true |
62c768bee8a74070892a14ba4100725825e26bf1 | SQL | yrhai/web-app | /mysqlData/city/zg_city.sql | UTF-8 | 33,920 | 3 | 3 | [] | no_license | /*
Navicat MySQL Data Transfer
Source Server : localhost_3306
Source Server Version : 50520
Source Host : localhost:3306
Source Database : webapp
Target Server Type : MYSQL
Target Server Version : 50520
File Encoding : 65001
Date: 2017-04-01 17:49:18
*/
SET FOREIGN_KEY_CHECKS=0;
... | true |
610921e6d38f709b30b1e97fc1afeb777f5efd5d | SQL | CynepKogep/SummaryTaskBelozerov | /database/create_st4db.sql | UTF-8 | 5,105 | 3.953125 | 4 | [] | no_license | CREATE TABLE roles(
-- id has the INTEGER type (other name is INT), it is the primary key
id INTEGER NOT NULL PRIMARY KEY,
-- name has the VARCHAR type - a string with a variable length
-- names values should not be repeated (UNIQUE)
name VARCHAR(10) NOT NULL UNIQUE
);
-- this two commands insert data into roles... | true |
4f3bb64c40bf05a55eef0f13f32017e937ea3dd8 | SQL | ElasticBox/auto-demo | /schema/Ebx.sql | UTF-8 | 6,395 | 2.890625 | 3 | [] | no_license | CREATE DATABASE IF NOT EXISTS `Ebx` /*!40100 DEFAULT CHARACTER SET utf8 */;
USE `Ebx`;
-- MySQL dump 10.13 Distrib 5.6.17, for osx10.6 (i386)
--
-- Host: 10.0.52.174 Database: Ebx
-- ------------------------------------------------------
-- Server version 5.5.38-0ubuntu0.12.04.1
/*!40101 SET @OLD_CHARACTER_SET_CL... | true |
e2fc0a863136094e277f1f814813b95668b6d634 | SQL | goodsoul1914/DBA | /Scripts/Algemeen/IO/Pending IO Requests.sql | UTF-8 | 575 | 3.96875 | 4 | [] | no_license | SELECT COUNT (*) AS "PendingIOs",
DB_NAME (vfs.database_id) AS "DBName",
mf.name AS "FileName",
mf.type_desc AS "FileType",
SUM (pior.io_pending_ms_ticks) AS "TotalStall"
FROM sys.dm_io_pending_io_requests AS pior
JOIN sys.dm_io_virtual_file_stats (NULL, NULL) AS vfs
ON vfs.file_handle =... | true |
7ac85e3acd38577392f75b9c8936ceda8cba868d | SQL | d-georgiev-91/TelerikAcademy | /Databases/Data-Modeling-and-ER-Diagrams/UniversityDB-MYSQL.sql | UTF-8 | 10,180 | 3.359375 | 3 | [
"MIT"
] | permissive | CREATE DATABASE IF NOT EXISTS `UniversityDB` /*!40100 DEFAULT CHARACTER SET utf8 */;
USE `UniversityDB`;
-- MySQL dump 10.13 Distrib 5.5.32, for Linux (x86_64)
--
-- Host: localhost Database: UniversityDB
-- ------------------------------------------------------
-- Server version 5.5.32
/*!40101 SET @OLD_CHARACTE... | true |
074dd800bd95f8610011e924368a4e81b9f87e28 | SQL | hqottsz/MXI | /assetmanagement-data-loader/src/main/resources/FaultValidation.sql | UTF-8 | 1,153 | 3.5 | 4 | [] | no_license | SELECT
'AL_PROC_OPEN_DEFERRED_FAULT' AS "TABLE",
al_proc_open_deferred_fault.assmbl_cd,
al_proc_open_deferred_fault.part_no_oem,
al_proc_open_deferred_fault.ata_sys_cd,
dl_ref_message.result_cd,
dl_ref_message.user_desc
FROM
AL_PROC_OPEN_DEFERRED_FAULT
INNER JOIN al_proc_result ON
... | true |
c990617be1091382e7b079b8cc51c0478991344f | SQL | btoacompany/liftoff-tools | /db/db_create_product_shops_tbl.sql | UTF-8 | 486 | 2.78125 | 3 | [] | no_license | CREATE TABLE product_shops (
id int AUTO_INCREMENT NOT NULL,
product_id INT NOT NULL,
shop_id INT NOT NULL,
shop_name VARCHAR(255) NOT NULL,
product_url VARCHAR(255),
img_src VARCHAR(255),
price INT NOT NULL,
price_sale INT DEFAULT 0,
price_before_sale INT DEFAULT 0,
min_purchase INT DEFAULT 1,
st... | true |
79726b3ca1542051f571038560ddb1f6858a07ea | SQL | ibnyadam/openaccounts | /src/main/database/dump.sql | UTF-8 | 2,182 | 3.34375 | 3 | [] | no_license | /*
SQLyog Ultimate v10.00 Beta1
MySQL - 5.5.25 : Database - accounts
*********************************************************************
*/
/*!40101 SET NAMES utf8 */;
/*!40101 SET SQL_MODE=''*/;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KE... | true |
9820a844cb45cf58e775ebb76eebca78bfb2e0df | SQL | zuihoudiandian/JavaDemo | /community.sql | UTF-8 | 10,314 | 3.3125 | 3 | [] | no_license | /*
Navicat Premium Data Transfer
Source Server : localhost_3306
Source Server Type : MySQL
Source Server Version : 50515
Source Host : localhost:3306
Source Schema : community
Target Server Type : MySQL
Target Server Version : 50515
File Encoding : 65001
Date: 24/02/... | true |
352f67bdbe3b891bc7bd8ffda9a99529f8ea70f9 | SQL | lgcarrier/AFW | /5.2.3/Database/Constraints/AFW_12_ATRIB_STRUC_APLIC_FK3.sql | UTF-8 | 228 | 2.6875 | 3 | [
"MIT"
] | permissive | SET DEFINE OFF;
ALTER TABLE AFW_12_ATRIB_STRUC_APLIC ADD (
CONSTRAINT AFW_12_ATRIB_STRUC_APLIC_FK3
FOREIGN KEY (REF_ATRIB_STRUC_APLIC)
REFERENCES AFW_12_ATRIB_STRUC_APLIC (SEQNC)
ON DELETE CASCADE
ENABLE VALIDATE)
/
| true |
8a4af7cc6b6aac180967d6501977686d1ea6b5a4 | SQL | luc98/TPBaseDeDatos | /SQLFile/Consultas.sql | UTF-8 | 1,735 | 3.96875 | 4 | [] | no_license | use supermercados;
/*
2. Redacte una consulta que seleccione las sucursales de un barrio determinado. (X)
3. Redacte una consulta que seleccione todas las ventas del mes de octubre (X)
4. Redacte una consulta que seleccione todas las ventas que sean mayores a la venta promedio, ordenadas de forma descendente. (X)
5. Re... | true |
845807a09f86a1fdd6c3a1287f67c880ecdc5199 | SQL | atenaiis/SQLZOO | /SQL_ZoO_nobel.sql | UTF-8 | 1,285 | 3.875 | 4 | [] | no_license | 1- SELECT yr, subject, winner
FROM nobel
WHERE yr = 1950
2- SELECT winner
FROM nobel
WHERE yr = 1962
AND subject = 'Literature'
3- SELECT yr, subject
FROM nobel
WHERE winner = 'Albert Einstein'
4- SELECT winner winner_peace
FROM nobel
WHERE subject = 'Peace'
AND yr >= 2000
5- SELECT yr, subject,... | true |
685b9669d3a4b8de3bba3fb7b23cd50c3bfb77bc | SQL | ZHangSaxion/project_software_group_4 | /DB_SQL/trigger_light.sql | UTF-8 | 559 | 3.71875 | 4 | [] | no_license | -- Trigger that updates the light average --
-- change temporary the default delimiter in order to execute all the statements in the trigger --
DELIMITER $$
create trigger update_light after insert on sensor_to_readings for each row begin
update sensor
set a_ambient_light= (SELECT AVG(readings.ambient_light)
FROM s... | true |
5c616538f49219854fa5ac520f4a30447101e418 | SQL | zptime/interact | /transform/transform_test.sql | UTF-8 | 13,348 | 2.671875 | 3 | [] | no_license | -- ----------------------------
-- 修改安卓和ios配置表的表名
-- ----------------------------
ALTER TABLE common_mobile_history RENAME TO mobile_history;
ALTER TABLE common_mobile_version RENAME TO mobile_version;
ALTER TABLE common_mobile_service RENAME TO mobile_service;
ALTER TABLE common_smscode RENAME TO mobile_smscode;... | true |
d79b7bedffa00bdd56e6c843800c0aad464fe256 | SQL | Kushal44/SQL | /StackOverflowServerTuning/MasteringServerTuningNotes-THREADPOOL.sql | UTF-8 | 1,690 | 3.6875 | 4 | [] | no_license | /*
THREADPOOL - This is a poision wait, which can kill the SQL server.
This happens when SQL runs out of worker threads to assign to a query.
Scenario: Let's say we have lots of queries running in parallel for
select count(*) from dbo.users.
Meanwhile another query runs to update one dbo.users with BEGIN TRAN
it never... | true |
aa73315cd1829674d061c172619fb9fdac38fae9 | SQL | Ayushsusheel/HIVE_FRAMEWORK | /command_1/creating_table.sql | UTF-8 | 1,801 | 3.625 | 4 | [] | no_license | as there are two types of table
1- INTERNAL TABLE
2-EXTERNAL TABLE
--->INTERNAL TABLE:
--It is the default table in Hive.
--When the user creates a table in Hive without specifying it as external, then by default, an internal table gets created in a specific location in HDFS.
--By default, an internal table wil... | true |
40624d820b22912fd3b9d3476f1f3d800b274df4 | SQL | lean-delivery/atg-module-datacut | /templates/drop_user.sql | UTF-8 | 154 | 2.6875 | 3 | [
"Apache-2.0"
] | permissive | BEGIN
EXECUTE IMMEDIATE 'DROP USER @DB_USER@ CASCADE';
EXCEPTION
WHEN OTHERS THEN
IF SQLCODE != -1918 THEN
RAISE;
END IF;
END;
| true |
f533c4f439f0376612b6a7c7bb6c2e9c0cf855d7 | SQL | denis-kol4ev/OraDBA | /Scripts/Oracle/mem.sql | UTF-8 | 3,746 | 3.34375 | 3 | [] | no_license | set serveroutput on;
whenever sqlerror exit;
set verify off
set term off
column c new_value vMemTotal
select to_char(&1) c from dual;
column c new_value vMemLock
select to_char(floor(&vMemTotal * 0.9)) c from dual;
set term on
PROMPT
PROMPT SGA percent to PGA ratios:
PROMPT 1 = 50 / 50
PROMPT 2 = 60 / 40
PROMPT 3 =... | true |
f8a85b5f15664ad77c8dab43fa32f2b0a01c9e70 | SQL | javasalondev/learning-cloudalibaba | /seata/seata-storage-service/DBScript/repo.sql | UTF-8 | 525 | 3.03125 | 3 | [] | no_license | CREATE TABLE repo
(
id INT AUTO_INCREMENT COMMENT '商品ID'
PRIMARY KEY,
name VARCHAR(100) NOT NULL COMMENT '商品名称',
amount INT NOT NULL COMMENT '库存量',
price DECIMAL(10, 2) NOT NULL COMMENT '价格'
);
INSERT INTO storage.repo (id, name, amount, price) VALUES (1, 'product-1', 998, 1... | true |
0abe4f933a4efd28416ab9ac0c956e1d236a4757 | SQL | indahpuspitaa17/generasi-gigih | /sql/sql_study_2/page8/exercise2.sql | UTF-8 | 195 | 2.734375 | 3 | [] | no_license | /*
dapatkan total berapa kali purchases terjadi berdasarkan
purchased_at and character_name
*/
SELECT COUNT(*),purchased_at,character_name
FROM purchases
GROUP BY purchased_at, character_name
;
| true |
811e4eaa0b01f139058c34609db3ce008528bd77 | SQL | Djsiclait/Netflics | /Database Structure/Roles/Procedures Roles.sql | UTF-8 | 1,378 | 3.421875 | 3 | [] | no_license | Create Proc USP_INS_ROL
@fld_cod_rol varchar(1), -- codigo del rol usuario
@fld_desc_rol varchar(30), -- descripcion del rol de usuario
@message varchar(200) output
as
Begin
if exists(select 1 from Tbl_Roles where fld_cod_rol = @fld_cod_rol)
Begin
set @message = 'Codigo Invalido'
End
else if exists(... | true |
c4ec2c29b24ac2f6ac5b4da56e49705fb2c21110 | SQL | NicolasConstant/phpBB-Read-Forever | /sql/database.sql | UTF-8 | 435 | 3.078125 | 3 | [] | no_license | DROP TABLE IF EXISTS `RF_ReadForeverUser`;
CREATE TABLE RF_ReadForeverUser (
id INT(11) UNSIGNED AUTO_INCREMENT PRIMARY KEY,
username VARCHAR(60) NOT NULL,
apikey VARCHAR(60) NOT NULL
);
DROP TABLE IF EXISTS `RF_ReadForeverListData`;
CREATE TABLE RF_ReadForeverListData (
id INT(11) UNSIGNED AUTO_INCREMENT PRIMARY ... | true |
cfac1a7ec2760bc92e82b3ae2641368669519ccc | SQL | siglo-webmaster/sheweb | /dump/dump_9_ene_5pm/sheweb2013_pedidosproveedores.sql | UTF-8 | 4,822 | 2.984375 | 3 | [] | no_license | CREATE DATABASE IF NOT EXISTS `sheweb2013` /*!40100 DEFAULT CHARACTER SET utf8 */;
USE `sheweb2013`;
-- MySQL dump 10.13 Distrib 5.5.28, for debian-linux-gnu (i686)
--
-- Host: localhost Database: sheweb2013
-- ------------------------------------------------------
-- Server version 5.5.28-0ubuntu0.12.04.3-log
/*... | true |
9682c274ff463d23f53ec499b21dfaa6dc667987 | SQL | AndreySeledkov/WalletHubTest | /src/main/resources/script/create_structure.sql | UTF-8 | 439 | 2.90625 | 3 | [] | no_license | --------------------------------------------------------
-- DDL for Table COMMODITY
--------------------------------------------------------
CREATE SCHEMA test
create table test.audit_log
(
ID_AUDIT_LOG int auto_increment
primary key,
IP varchar(200) null,
REQUEST varchar(200) null,
STATUS varchar(200) null,
U... | true |
cc428c7b917c83bb91fe39af4d8d027899818ce9 | SQL | mejiaej/mines | /api/src/main/resources/flyway/migrations/V0001__create_tables.sql | UTF-8 | 351 | 2.953125 | 3 | [] | no_license | CREATE TABLE IF NOT EXISTS mines.user (
id SERIAL PRIMARY KEY,
user_name VARCHAR(150) NOT NULL
);
CREATE TABLE IF NOT EXISTS mines.game(
id SERIAL PRIMARY KEY,
user_id INTEGER NOT NULL REFERENCES mines.user(id),
remaining_time INTEGER NOT NULL,
board JSONB NOT NULL,
... | true |
95975ed7253ad2b0b8e5e259dd6dc8398c5ac027 | SQL | subtl3ty7/HorseRaceSimulation | /src/main/resources/sql/createSchema.sql | UTF-8 | 1,061 | 3.4375 | 3 | [] | no_license | -- create table horse if not exists
DROP TABLE IF EXISTS horse;
DROP TABLE IF EXISTS jockey;
CREATE TABLE IF NOT EXISTS horse(
-- use auto incrementing IDs as primary key
id BIGINT AUTO_INCREMENT PRIMARY KEY,
name VARCHAR(255) NOT NULL,
breed TEXT,
min_speed DOUBLE NOT NULL,
max_speed ... | true |
6b9d28e6bdd2cdef9daf9348f7bcbbd1dc628a90 | SQL | Aldarion96/Engeto_SQL_projekt | /Engeto_SQL_finalni_projekt4_4.sql | UTF-8 | 2,601 | 3.703125 | 4 | [] | no_license | # Vytvoreni vysledne tabulky
CREATE VIEW IF NOT EXISTS v_engeto_projekt_weather AS
WITH base AS (
SELECT
*
FROM v_engeto_projekt_weather1_3
),
a AS (
SELECT
*
FROM v_engeto_projekt_weather2_3 epw
),
b AS (
SELECT
*
FROM v_engeto_projekt_weather3_3 epw
),
c AS (
SELECT
country,
... | true |
1ba2f2707a986297e35bcb2d9bcaa87c07dde1f3 | SQL | mikestevenson86/SQL-Repository | /Mike S Queries/Archives/00 Archive 2014/05 May/Reconciliation Process.sql | UTF-8 | 1,768 | 3.640625 | 4 | [] | no_license | ------------------------------------
--Stage 1
------------------------------------
select
sfdc_id
into ##tmpListids
from noblecustomtables.dbo.cust_citation c
where
c.listid in ('11009','11010','11011','11012','11013','11014','11015','11016','11017','11018','11019','11020','11021','11022','11023','11024','11025','11... | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.