sql stringlengths 6 1.05M |
|---|
<filename>moat369/sql/moat369_gc_map_chart.sql
-- add seq to one_spool_filename
DEF one_spool_filename = '&&spool_filename.'
@@&&fc_seq_output_file. one_spool_filename
@@&&fc_def_output_file. one_spool_fullpath_filename '&&one_spool_filename._map_chart.html'
@@moat369_0j_html_topic_intro.sql &&one_spool_filename._map_... |
<reponame>labdsf/amusewiki
-- Convert schema '/home/melmoth/amw/AmuseWikiFarm/dbicdh/_source/deploy/26/001-auto.yml' to '/home/melmoth/amw/AmuseWikiFarm/dbicdh/_source/deploy/27/001-auto.yml':;
;
BEGIN;
;
ALTER TABLE users ADD COLUMN edit_option_preview_box_height integer DEFAULT 500 NOT NULL;
;
ALTER TABLE users AD... |
--+ holdcas on;
create table t52(i1 integer, i2 integer, i3 integer);
create index t52_idx_one on t52(i1);
create index t52_idx_two on t52(i2);
create index t52_idx_one_two on t52(i1, i2);
create index t52_idx_two_three on t52(i2, i3);
create index t52_idx_one_three on t52(i1, i3);
create index t52_idx_all on t52(i1, ... |
<reponame>LasseWolter/clowdr
ALTER TABLE "chat"."Reaction" DROP COLUMN "remoteServiceId" CASCADE;
|
drop procedure if exists insert_4_tb1_column;
create or replace procedure insert_4_tb1_column() is
V_tinyint tinyint;
V_smallint smallint;
V_integer integer;
V_int int;
V_binary_integer binary_integer;
V_bigint bigint;
V_numeric numeric;
V_numeric1 numeric(38);
V_numeric2 numeric(38,7);
V_decimal decimal;
V_decimal1 de... |
<filename>ci_blog.sql
-- phpMyAdmin SQL Dump
-- version 4.7.0
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Jun 23, 2019 at 12:10 PM
-- Server version: 10.1.25-MariaDB
-- PHP Version: 7.1.7
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00... |
CREATE TABLE IF NOT EXISTS `user_skills` (
`id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT,
`user_id` int(10) UNSIGNED NOT NULL,
`skill_id` int(10) UNSIGNED NOT NULL,
`created_at` DATETIME NOT NULL,
`updated_at` DATETIME NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=Innodb DEFAULT CHARSET=utf8 AUTO_IN... |
<gh_stars>0
CREATE TABLE `articles` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`title` text,
`body` text,
`status` enum('active','inactive','suspended') NOT NULL DEFAULT 'active',
`created_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
`updated_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
`user_id` int(11) NO... |
CREATE TABLE IF NOT EXISTS `xlr_playermaps` (
`id` MEDIUMINT(8) UNSIGNED NOT NULL AUTO_INCREMENT,
`map_id` SMALLINT(5) UNSIGNED NOT NULL DEFAULT '0',
`player_id` SMALLINT(5) UNSIGNED NOT NULL DEFAULT '0',
`kills` MEDIUMINT(8) UNSIGNED NOT NULL DEFAULT '0',
`deaths` MEDIUMINT(8) UNSIGNED NOT NULL DEFAULT '0',
... |
<filename>spk_mvp_1.sql
/*
Navicat MySQL Data Transfer
Source Server : local
Source Server Version : 50505
Source Host : localhost:3306
Source Database : spk_mvp
Target Server Type : MYSQL
Target Server Version : 50505
File Encoding : 65001
Date: 2020-01-13 17:14:47
*/
SET FOREIGN... |
<reponame>kip-codes/sql-sandbox
INSERT INTO TSQL2012.Sales.Customers (companyname, contactname, contacttitle, address, city, region, postalcode, country, phone, fax) VALUES ('Customer NRZBB', '<NAME>', 'Sales Representative', 'Obere Str. 0123', 'Berlin', null, '10092', 'Germany', '030-3456789', '030-0123456');
INSERT I... |
CREATE TABLE [dbo].[Author]
(
[id] INT IDENTITY(1,1) NOT NULL,
[author_firstname] NVARCHAR(50) NOT NULL,
[author_middlename] NVARCHAR(50) NULL,
[author_lastname] NVARCHAR(50) NULL,
CONSTRAINT [PK_Author] PRIMARY KEY ([id])
)
|
/*
Navicat Premium Data Transfer
Source Server : gabut
Source Server Type : MySQL
Source Server Version : 100136
Source Host : localhost:3306
Source Schema : kereta_join
Target Server Type : MySQL
Target Server Version : 100136
File Encoding : 65001
Date: 15/04/2019 ... |
<reponame>kubakrzempek/dataclips<filename>test/dummy/app/dataclips/dummy.sql
SELECT * FROM dataclips_insights;
|
/* SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; */
/* SET AUTOCOMMIT = 0; */
/* START TRANSACTION; */
/* SET time_zone = "+00:00"; */
-- --------------------------------------------------------
--
-- Table structure for table `AllView` generated from model 'AllView'
--
CREATE TABLE IF NOT EXISTS `AllView` (
`_class` TE... |
<gh_stars>0
/* crear tabla con dni varvinary(256) porque el argoritmo es AES_256*/
/*create master key encryption by password ='<PASSWORD>';*/
/*create certificate MiPrimerCertificado with subject='DBAMemories Certificate',
EXPIRY_DATE='2017/01/01'*/
/*create symmetric key MiLlaveSimetrica
with
key_source='My... |
<reponame>UnderstandLwolvej/LessonSelectionSystem
-- 学院表
CREATE TABLE `department` (
`department_id` BIGINT NOT NULL AUTO_INCREMENT
COMMENT '学院id',
`department_name` VARCHAR(60) NOT NULL
COMMENT '学院名称',
PRIMARY KEY (`department_id`)
)
ENGINE = InnoDB
AUTO_INCREMENT = 1000
DEFAULT CHARSET = utf8
... |
-- H17E. TENURE BY AGE OF HOUSEHOLDER (NATIVE HAWAIIAN AND OTHER PACIFIC ISLANDER ALONE HOUSEHOLDER)
-- designed to work with the IRE Census bulk data exports
-- see http://census.ire.org/data/bulkdata.html
CREATE TABLE ire_h17e (
geoid VARCHAR(11) NOT NULL,
sumlev VARCHAR(3) NOT NULL,
state VARCHAR(2) NOT NULL,
... |
-- file:select_parallel.sql ln:192 expect:true
drop role if exists regress_parallel_worker
|
<reponame>overachiever-productions/s4
/*
NOTES:
- By setting message 1480 to use the WITH_LOG argument/option, we drastically simplify the detection of mirroring failover operations.
Because, now, the SQL Server Agent can detect (trap) and report on a Role Change occuring on both the Principal and Secondar... |
<reponame>twheel/elefant<filename>apps/user/conf/upgrade_1.1.3_sqlite.sql
begin transaction;
alter table `#prefix#user` rename to `tmp_user`;
create table #prefix#user (
id integer primary key,
email char(72) unique not null,
password char(128) not null,
session_id char(32) unique,
expires datetime not null,
name... |
<gh_stars>10-100
CREATE PROC DriveLetters_Get(@InstanceID INT)
AS
SELECT Name,Label
FROM Drives
WHERE InstanceID = @InstanceID
AND IsActive = 1; |
-- #1: Join employees with salaries
SELECT employees.emp_no,
employees.last_name,
employees.first_name,
employees.gender,
salaries.salary
into emp_salaries
FROM employees
INNER JOIN salaries ON
employees.emp_no = salaries.emp_no;
select * from emp_salaries
-- #2: Employees that were hired in 1986
SELECT first_n... |
select
id as customer_id,
first_name,
last_name
from `dbt-tutorial`.jaffle_shop.customers
|
<reponame>oscarCeiba/PrestamoComputos
select tipo_usuario from tb_usuario where cedula = :cedula |
<filename>Project/sqls/triggers/7 intervention.sql
-- Un manutentore non può fare altri interventi (indipendentemente dalla mansione) una volta che ha iniziato un determinato intervento
CREATE OR REPLACE FUNCTION maintainer_is_already_occupied_intervention()
RETURNS trigger AS $$
DECLARE
_intervents record... |
<reponame>ghxiao/clipper
DROP VIEW v_VisitingProfessor CASCADE;
CREATE OR REPLACE VIEW v_VisitingProfessor AS
SELECT innerRel.x1 AS att1
FROM (
SELECT ca_0.individual AS x1
FROM concept_assertion ca_0
WHERE ca_0.concept=103
) as innerRel
|
<gh_stars>1-10
--
-- And now rename the stable ids...
--
-- -- I really hope nobody actually cares about exon stable IDs...
-- DROP TABLE IF EXISTS temp_die;
-- CREATE TEMPORARY TABLE temp_die (
-- PRIMARY KEY (exon_id)
-- ) AS
-- #
-- SELECT
-- exon_id,
-- e.stable_id AS e_id,
-- t.stable_id AS t_id,
-- ra... |
<gh_stars>1-10
delimiter //
drop procedure if exists `bahmni_create_patient` //
create procedure bahmni_create_patient(_firstName varchar(50), _lastName varchar(50), inout _patientIdentifiers text, out _thisPatientIdentifier varchar(50))
begin
/* USAGE
set @_ids = "";
call bahmni_create_patient("Haksoa", "Han... |
<gh_stars>10-100
--DROP TABLE hol_schema_version;
--DROP SEQUENCE hol_holiday_seq;
--DROP TABLE hol_holiday;
--DROP TABLE hol_date;
--DROP TABLE exg_schema_version;
--DROP SEQUENCE exg_exchange_seq;
--DROP SEQUENCE exg_idkey_seq;
--DROP TABLE exg_exchange;
--DROP TABLE exg_idkey;
--DROP TABLE exg_exchange2idkey;
--
-... |
<filename>backend/migrations/20190903140728_create_table_category.sql
-- +goose Up
-- +goose StatementBegin
CREATE TABLE `blog_category` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`category_name` varchar(16) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8;
-- +goose St... |
--show tables
show tables;
--show tables using regex
show tables '.*s';
--CREATE A TABLE using fileds and type
CREATE TABLE tableName(foo INT, bar STRING);
--create table using LIKE
CREATE TABLE tableNameBak LIKE tableName;
--创建分区表,default stored TEXTFILE
--partitione are: dt and country
CREATE TABLE tableName(ts b... |
/* contrib/spi/moddatetime--unpackaged--1.0.sql */
ALTER EXTENSION moddatetime ADD function moddatetime();
|
<reponame>emrizaal/asipa<gh_stars>0
-- phpMyAdmin SQL Dump
-- version 3.4.5
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: May 23, 2016 at 12:56 PM
-- Server version: 5.5.16
-- PHP Version: 5.3.8
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_C... |
<gh_stars>0
-- phpMyAdmin SQL Dump
-- version 4.7.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Mar 15, 2018 at 08:34 AM
-- Server version: 10.1.29-MariaDB
-- PHP Version: 7.2.0
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40... |
\echo # Creating user table
create table "user"(
-- Columns
id bigserial primary key,
email email unique not null,
"password" varchar(72) not null,
has_verified_email boolean not null default false,
... |
<filename>bin/SQL/leetcode-cn-262.sql
select trips.request_at Day,
round((sum(case when trips.status != 'completed' then 1 else 0 end) /
(case when count(trips.id)>0 then count(trips.id) else 1 end) ),2) Cancellation_Rate
from trips
left join users aa on trips.Client_Id = aa.users_id
left join users bb on trips.D... |
<reponame>quarkmarino/mestizos<gh_stars>0
-- MySQL dump 10.13 Distrib 8.0.22, for Linux (x86_64)
--
-- Host: 172.24.0.4 Database: mestizos
-- ------------------------------------------------------
-- Server version 8.0.22
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER... |
--liquibase formatted sql
--changeset artemov_i:CORE-1267 dbms:postgresql runOnChange:true
INSERT INTO s_mt.t_provider (ck_id, cv_name, ck_user, ct_change)
VALUES('${provider}', 'Провайдер пользовательских настроек', '4fd05ca9-3a9e-4d66-82df-886dfa082113','2020-07-14 15:58:14.658')
on conflict (ck_id) do updat... |
CREATE TABLE [dbo].[Composer] (
[Id] INT IDENTITY (1, 1) NOT NULL,
[Composer] NVARCHAR (50) NOT NULL,
[Nationality] VARCHAR (50) NOT NULL,
CONSTRAINT [PK_Composer] PRIMARY KEY CLUSTERED ([Id] ASC)
);
|
<filename>C#Development/Database/DatabasesBasics/08.AdditionalExercises/08.AdditionalExercises/GeographyQuery.sql
-- 08. Peaks and Mountains
SELECT p.PeakName,
m.MountainRange AS Mountain,
p.Elevation
FROM Peaks AS p
JOIN Mountains AS m ON m.Id = p.MountainId
ORDER BY p.Elevation DESC,
... |
WITH source AS (
SELECT *
FROM {{ source('zuora', 'accounting_period') }}
), renamed AS (
SELECT
--Primary Keys
id::VARCHAR AS accounting_period_id,
--Info
enddate::TIMESTAMP_TZ AS end_date,
fiscalyear::NUMBER AS fiscal_year,... |
<reponame>ciocan/sicap.ai
-- CreateTable
CREATE TABLE `User` (
`id` VARCHAR(191) NOT NULL,
`hashId` VARCHAR(191) NOT NULL,
`createdAt` DATETIME(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3),
`updatedAt` DATETIME(3) NOT NULL,
UNIQUE INDEX `User_hashId_key`(`hashId`),
INDEX `User_hashId_idx`(`hashId`)... |
----------------------------------------------------------------
-- [images] Table
--
CREATE OR REPLACE FUNCTION InsertImage (
v_creation_date TIMESTAMP WITH TIME ZONE,
v_image_guid UUID,
v_it_guid UUID,
v_size BIGINT,
v_ParentId UUID,
v_imageStatus INT,
v_lastModified TIMESTAMP WITH TIME ... |
<reponame>y-sira/oltpbench<filename>src/com/oltpbenchmark/benchmarks/resourcestresser/ddls/resourcestresser-nuodb-ddl.sql
DROP TABLE IF EXISTS cputable CASCADE;
CREATE TABLE cputable (
empid int NOT NULL,
passwd String NOT NULL,
PRIMARY KEY (empid)
);
DROP TABLE IF EXISTS iotable CASCADE;
CREATE TABLE iotable (
... |
<filename>configs/addition_to_sys.sql
USE sys;
DELIMITER $$
CREATE FUNCTION IFZERO(a INT, b INT)
RETURNS INT
DETERMINISTIC
RETURN IF(a = 0, b, a)$$
CREATE FUNCTION LOCATE2(needle TEXT(10000), haystack TEXT(10000), offset INT)
RETURNS INT
DETERMINISTIC
RETURN IFZERO(LOCATE(needle, haystack, offset), LENGTH(haystack) ... |
<gh_stars>1-10
DROP TABLE IF EXISTS t_ephemeral_02205_1;
CREATE TABLE t_ephemeral_02205_1 (x UInt32 DEFAULT y, y UInt32 EPHEMERAL 17, z UInt32 DEFAULT 5) ENGINE = Memory;
DESCRIBE t_ephemeral_02205_1;
# Test INSERT without columns list - should participate only ordinary columns (x, z)
INSERT INTO t_ephemeral_02205_1... |
<reponame>SKalt/pg_sql_parser_tests<gh_stars>0
env PGOPTIONS="-c geqo=off -c statement_timeout=5min" psql
|
INSERT INTO "conference"."ConfigurationKey"("name", "description") VALUES (E'SUBMISSION_NOTIFICATION_ROLES', E'A list of strings indicating which program people roles receive notifications (e.g. subtitles) about submissions. Default: ["PRESENTER","AUTHOR"].');
|
CREATE TABLE `polls` (
`id` varchar(16) NOT NULL,
`conv_id` varchar(100) NOT NULL,
`msg_id` int(11) NOT NULL,
`result_msg_id` int(11) NOT NULL,
`choices` int(11) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE `votes` (
`id` varchar(16) NOT NULL,
`username` varchar(50)... |
<gh_stars>1-10
--SERVER
create class t(i int, set_col set(int));
insert into t values (1, {0, 1});
insert into t values (2, {0, 2});
delete t1 from t, table(set_col) as t1(a);
delete t from t, table(set_col) as t1(a);
select * from t order by 1;
drop class t; |
<gh_stars>100-1000
-- This file is automatically generated by LogicalPlanToSQLSuite.
select *
from src b
group by key, value
having not exists (select a.key
from src a
where b.value = a.value and a.key = b.key and a.value > 'val_12')
-----------------------------------------------... |
<filename>MVC_CRUD_DB/bin/Debug/MVC_CRUD_DB_2.publish.sql
/*
Deployment script for MVC_CRUD_DB
This code was generated by a tool.
Changes to this file may cause incorrect behavior and will be lost if
the code is regenerated.
*/
GO
SET ANSI_NULLS, ANSI_PADDING, ANSI_WARNINGS, ARITHABORT, CONCAT_NULL_YIELDS_NULL, QUOT... |
<reponame>Szymon-Budziak/Databases_exercises_solutions<gh_stars>0
-- 1. Ile lat przepracował w firmie każdy z pracowników?
SELECT EmployeeID, YEAR(GETDATE()) - YEAR(HireDate) AS 'Total work in years'
FROM Employees
-- 2. Policz sumę lat przepracowanych przez wszystkich pracowników i średni czas pracy w firmie
SEL... |
<gh_stars>0
-- The ORDER BY Clause --
USE sql_store;
-- > sort customers based on their first_name in descending order
SELECT * FROM customers ORDER BY first_name DESC;
-- > sort customers based on their state and within each state sort by first_name
SELECT * FROM customers ORDER BY state, first_name;
SELECT * FROM c... |
<filename>testcases/query5.sql
SELECT *
FROM CUSTOMER,CART,CARTDETAILS,BILL
WHERE CUSTOMER.cid=CART.cid,CART.cartid=CARTDETAILS.cartid,CARTDETAILS.iid=BILL.iid |
CREATE ROLE constellation WITH
LOGIN
NOSUPERUSER
NOCREATEDB
NOCREATEROLE
INHERIT
NOREPLICATION
CONNECTION LIMIT -1
PASSWORD '<PASSWORD>';
CREATE DATABASE constellation
WITH
OWNER = constellation
ENCODING = 'UTF8'
CONNECTION LIMIT = -1;
|
<reponame>UHCToken/uhx-api
ALTER TABLE care_relationships ADD COLUMN patient_email_shown boolean;
ALTER TABLE care_relationships ADD COLUMN patient_address_shown boolean; |
/* load projects */
insert into project (name, description, userId) values ('电动机单相全波整流能耗制动控制', '', 1);
insert into project (name, description, userId) values ('故障报警控制系统', '', 1);
insert into project (name, description, userId) values ('M7475型立轴圆台平面磨床控制', '', 1);
/* load requirements */
/* load requirements of 电动机单相全波... |
-- file:text.sql ln:30 expect:true
select 3 || 4.0
|
DECLARE @query_id int = 7205;
DECLARE @time int = -1
SELECT
*
FROM
(
SELECT
rs.first_execution_time,
rs.last_execution_time,
rs.plan_id,
sp.query_id,
rs.avg_duration,
rs.max_duration,
ws.wait_category_desc,
ws.execution_type_desc,
ws.total_query_wait_time_ms
... |
<reponame>dinophile/QLedger
CREATE INDEX timestamp_idx ON transactions USING brin ("timestamp"); |
DROP TABLE IF EXISTS raw_pricing_rds;
CREATE TABLE raw_pricing_rds
( sku VARCHAR( 18 )
, termcode VARCHAR( 12 )
, termtype VARCHAR( 8 )
, description VARCHAR( 40 )
, effectdate date
, unit VARCHAR( 8 )
, price FLOAT(8)
, purchase_option VARCHAR( 15 )
, region_name VARCHAR( 24 )
, instance_type VARCHAR( 15 )
, current... |
<gh_stars>0
select pg_size_pretty(pg_database_size(current_database())) |
/*
* Licensed to The Apereo Foundation under one or more contributor license
* agreements. See the NOTICE file distributed with this work for
* additional information regarding copyright ownership.
*
* The Apereo Foundation licenses this file to you under the Apache License,
* Version 2.0 (the "License"); you may... |
<filename>query/cloudfront/cloudfront_distribution_origin_access_identity_enabled.sql
with cloudfront_distribution as (
select
*
from
terraform_resource
where
type = 'aws_cloudfront_distribution'
), origins as (
select
count(*),
name
from
cloudfront_distribution,
jsonb_... |
<reponame>SKalt/pg_sql_parser_tests<gh_stars>0
EXEC SQL int i = 4;
|
-- @testpoint: union all/union的测试
select least('14541.2353212','5412121.23211454541','sdsdsdaffdfsfdfdff') from sys_dummy union all select least('14541.2353212','大幅度发多少','sdsdsdaffdfsfdfdff')from sys_dummy;
select case when 2>1 then least('14541.2353212','5412121.23211454541','sdsdsdaffdfsfdfdff') else '0' end from sys... |
create table migrations (filename text primary key, hash text);
|
-- Add host_user_id column and to meetings table
-- Add column and constraint
ALTER TABLE meetings ADD COLUMN host_user_id UUID REFERENCES users(id);
-- Set values
UPDATE meetings
SET host_user_id = id
FROM users
WHERE meetings.host_username = users.username;
|
<reponame>RichardTMiles/OnTheWallArts
-- MySQL dump 10.13 Distrib 5.7.14, for Linux (x86_64)
--
-- Host: localhost Database: RootPrerogative
-- ------------------------------------------------------
-- Server version 5.7.14-google-log
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @... |
<reponame>EasyLOB/EasyLOB-Chinook-1
USE Chinook;
-- CREATE INDEX
CREATE INDEX IX_Album_AlbumId ON Album(AlbumId);
CREATE INDEX IX_Album_Title ON Album(Title);
CREATE INDEX IX_Album_ArtistId ON Album(ArtistId);
CREATE INDEX IX_Artist_ArtistId ON Artist(ArtistId);
CREATE INDEX IX_Artist_Name ON Artist(Name);
CREATE I... |
UPDATE
planet_osm_polygon
SET mz_boundary_min_zoom = mz_calculate_min_zoom_boundaries(planet_osm_polygon.*)
WHERE
(barrier IN ('city_wall', 'retaining_wall', 'fence') OR
historic = 'citywalls' OR
man_made = 'snow_fence' OR
waterway = 'dam')
AND COALESCE(mz_boundary_min_zoom, 999) <> COALESC... |
create or replace procedure addPath(tp_start in VARCHAR, tp_end in VARCHAR, tp_kinetic in NUMBER, tp_wind_direc in NUMBER,
tp_wind_speed in NUMBER) is
begin
INSERT INTO travel_path(id_place_start, id_place_end, kinetic_coefficient, wind_direction, wind_speed)
VALUES(tp_start, tp_end, tp_kinetic, tp_wind_direc,... |
<filename>src/main/resources/db/migration/V20220322_89__HMAN-89-HearingResponse-AddColumn_LATranId.sql
ALTER TABLE public.hearing_response ADD list_assist_transaction_id varchar(40);
|
INSERT INTO crust (name, price) VALUES ('Small Thin', 8);
INSERT INTO crust (name, price) VALUES ('Small Deep Dish', 8);
INSERT INTO crust (name, price) VALUES ('Small Original', 8);
INSERT INTO crust (name, price) VALUES ('Medium Thin', 10);
INSERT INTO crust (name, price) VALUES ('Medium Deep Dish', 10);
INSERT INTO ... |
<gh_stars>0
-- phpMyAdmin SQL Dump
-- version 4.8.5
-- https://www.phpmyadmin.net/
--
-- Host: localhost:3306
-- Generation Time: Jan 31, 2020 at 06:21 PM
-- Server version: 5.7.24
-- PHP Version: 7.2.19
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101... |
<filename>sql/lbryexplorer.ddl.sql
--DROP DATABASE IF EXISTS lbry;
CREATE DATABASE lbry DEFAULT CHARSET=utf8mb4 COLLATE utf8mb4_unicode_ci;
USE lbry;
CREATE TABLE `Blocks`
(
`Id` SERIAL,
`Bits` VARCHAR(20) NOT NULL,
`Chainwork` VARCHAR(70) CHARACTER SET latin1 COLLATE latin1_general_ci NOT NULL,
`Conf... |
<filename>sales/models/staging/generated_report.sql
SELECT AVG("weekly_value_sum") as quarterly_avg_value_per_week,
AVG("weekly_rfps") as quarterly_avg_rfps_per_week,
AVG("weekly_contacted") as quarterly_avg_rfps_per_week,
quarter from (SELECT week,quarter, sum("Deal_Value") as weekly_value_sum, sum("rfp") as weekly_r... |
<reponame>Shuttl-Tech/antlr_psql
-- file:create_type.sql ln:93 expect:true
' LANGUAGE SQL
|
<gh_stars>100-1000
SELECT Foo FROM MyDatabase.MySchema.MyTable;
SELECT Foo FROM MySchema.MyTable;
SELECT Foo FROM MyTable; |
<reponame>gurgy11/SliceOfPy
CREATE TABLE IF NOT EXISTS incoming_orders (
id INT AUTO_INCREMENT,
order_id INT NOT NULL,
supplier_id INT NOT NULL,
product_id INT NOT NULL,
quantity INT NOT NULL,
cost_per_unit DOUBLE NOT NULL,
cost_shipping DOUBLE,
warehouse_destination_id INT NOT NULL,
du... |
<gh_stars>0
/*
Navicat Premium Data Transfer
Source Server : 腾讯云
Source Server Type : MySQL
Source Server Version : 50724
Source Host : 192.168.3.11:3306
Source Schema : snow
Target Server Type : MySQL
Target Server Version : 50724
File Encoding : 65001
Date: 20/01/2... |
-- MySQL dump 10.13 Distrib 8.0.28, for Win64 (x86_64)
--
-- Host: 127.0.0.1 Database: vendas
-- ------------------------------------------------------
-- Server version 5.6.26
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!4... |
drop table if exists lc_00906;
create table lc_00906 (b LowCardinality(String)) engine=MergeTree order by b;
insert into lc_00906 select '0123456789' from numbers(100000000);
select count(), b from lc_00906 group by b;
drop table if exists lc_00906;
|
<reponame>meowjesty/hello-actix<gh_stars>1-10
select * from User; |
CREATE TABLE `dvsas`.`tbl_itr_request` (
`id` INT NOT NULL AUTO_INCREMENT,
`pan_card_number` VARCHAR(45) NULL,
`itr_request_status` TINYINT(1) NULL DEFAULT 0 COMMENT '0 - new, 1 - inprogress, 2 = completed',
`assessment_years` TEXT NULL,
`created_at` DATETIME NULL DEFAULT CURRENT_TIMESTAMP,
`created_by` INT... |
DROP TABLE IF EXISTS MESSAGE, AGENT, REGISTERED_AT, NODE, SERVICE;
CREATE TABLE MESSAGE (
ID INT NOT NULL auto_increment,
EVENT VARCHAR(255) NOT NULL,
TIME_STAMP TIMESTAMP NOT NULL,
SOURCE_NODE VARCHAR(255),
SOURCE_AGENT CHAR(32),
DESTINATION_NODE VARCHAR(255),
DESTINATION_AGENT CHAR(32),
REMARKS json DEFAULT... |
-- @testpoint:使用关键字limit为列名的临时表创建视图
drop table if exists test_temporary_limit_007;
create temporary table test_temporary_limit_007("limit" int);
insert into test_temporary_limit_007 values(1);
create or replace view v_limit_002 as select "limit" from test_temporary_limit_007;
select "limit" from test_temporary_limit_0... |
CREATE FUNCTION public.set_current_timestamp_updated_at() RETURNS trigger
LANGUAGE plpgsql
AS $$
DECLARE
_new record;
BEGIN
_new := NEW;
_new."updated_at" = NOW();
RETURN _new;
END;
$$;
CREATE TABLE public.area (
id integer NOT NULL,
created_at timestamp with time zone DEFAULT now() NOT NULL,
... |
-- # ASSIGNMENT-8 # --
--USE EMPLOYEE;
CREATE FUNCTION CALCULATE (@X INT, @Y INT, @Z CHAR(1))
RETURNS INT
AS
BEGIN
DECLARE @O AS INT
IF @Z = '+'
SET @O = @X+@Y
ELSE IF @Z = '-'
SET @O = @X-@Y
ELSE IF @Z = '*'
SET @O = @X*@Y
ELSE IF @Z = '/'
SET @O = @X/@Y
ELSE IF @Z = '%'
SET... |
create or replace FUNCTION funcMakeRental(p_id_vehicle INTEGER, p_id_user INTEGER) RETURN INTEGER
IS
v_id_rental INTEGER;
v_id_park_picking INTEGER;
BEGIN
SELECT id_park INTO v_id_park_picking FROM vehicle WHERE id_vehicle = p_id_vehicle;
INSERT INTO rental VALUES(DEFAULT, v_id_park_pic... |
--=================================================================================================
-- Output basic information about the indexes as constraints.
--=================================================================================================
SELECT
SchemaName = s.name
,ObjectName = o.name
,Obje... |
<filename>schema.sql
CREATE TABLE sipmsons(
id SERIAL PRIMARY KEY,
quote VARCHAR(255) NOT NULL,
character VARCHAR(255) NOT NULL,
characterDirection VARCHAR(255) NOT NULL
); |
USE `es_extended`;
INSERT INTO `addon_account` (name, label, shared) VALUES
('society_lifeguard', 'Lifeguard', 1)
;
INSERT INTO `datastore` (name, label, shared) VALUES
('society_lifeguard', 'Lifeguard', 1)
;
INSERT INTO `addon_inventory` (name, label, shared) VALUES
('society_lifeguard', 'Lifeguard', 1)
;
INSER... |
-- 01. Employee address
SELECT TOP 5 EmployeeId, JobTitle, e.AddressID, a.AddressText
FROM Employees AS e
INNER JOIN Addresses AS a
ON e.AddressID = a.AddressId
ORDER BY a.AddressId
-- 02. Addresses with towns
SELECT TOP 50 e.FirstName, e.LastName, t.Name, a.AddressText
FROM Employees AS e
INNER JOIN Addresses AS a
O... |
-----------Update script to show approver designation in contractor bill screen---------------
update EG_WF_MATRIX set nextdesignation = 'Assistant engineer,Assistant executive engineer' where id = (select id from eg_wf_matrix where currentstate = 'Rejected' and objecttype='ContractorBillRegister');
update EG_WF_MATRI... |
WITH t1 AS
(SELECT i.inventory_id, f.title, DATE_PART('day', r.return_date - r.rental_date) AS days_returned_after_rental, f.rental_duration
FROM rental r
JOIN inventory i
USING(inventory_id)
JOIN film f
USING(film_id)
GROUP BY 2,1,3,4
ORDER BY 2),
t2 AS
(SELECT t1.tit... |
<gh_stars>100-1000
-- REPAIR TABLE with all optional syntax
MSCK REPAIR TABLE table_identifier ADD PARTITIONS;
MSCK REPAIR TABLE table_identifier DROP PARTITIONS;
MSCK REPAIR TABLE table_identifier SYNC PARTITIONS;
-- REPAIR TABLE with no optional syntax
MSCK REPAIR TABLE table_identifier;
-- run MSCK REPAIR TABLE to... |
<reponame>xxks-kkk/Code-for-blog
DROP TABLE IF EXISTS AssemblyInstance;
CREATE TABLE AssemblyInstance(
PART VARCHAR(10),
SUBPART VARCHAR(10),
NUMBER INT);
INSERT INTO AssemblyInstance(PART, SUBPART, NUMBER) VALUES
('trike', 'wheel' , 3),
('trike', 'frame', 1),
('frame', '... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.