text stringlengths 1 1.05M |
|---|
-- update module version
UPDATE `sys_modules` SET `version` = '1.3.5' WHERE `uri` = 'desktop' AND `version` = '1.3.4';
|
CREATE OR REPLACE PROCEDURE "COLLAPSE_ORN_LOCALITIES" as
cursor c1 is select min(l.locality_id) locality_id, l.geog_auth_rec_id, l.SPEC_LOCALITY, round(ll.dec_lat,1) dec_lat, round(ll.dec_long,1) dec_long, l.MINIMUM_ELEVATION, l.MAXIMUM_ELEVATION, l.ORIG_ELEV_UNITS, l.LOCALITY_REMARKS, ll.VERIFICATIONSTATUS, l.SO... |
-- 用户信息表
drop table if exists users;
CREATE TABLE `users` (
`id` int(11) NOT NULL AUTO_INCREMENT, -- id
`username` varchar(255) DEFAULT NULL, -- 用户名
`password` varchar(255) DEFAULT NULL, -- 密码
`email` varchar(255) DEFAULT NULL, -- 邮箱
`created_at` datetime DEFAULT now(), -- 创建时间
`last... |
alter table UTILITYLIBRARY_BOOK add column PLACE_PUBLICATION varchar(255) ;
|
/*
code of this procedure is managed in the dhw repository. Do not modify manually.
Use [uspgenerator].[GeneratorUsp], [uspgenerator].[GeneratorUspParameter], [uspgenerator].[GeneratorUspStep], [uspgenerator].[GeneratorUsp_SqlUsp]
*/
CREATE PROCEDURE [repo].[usp_PERSIST_RepoObject_external_tgt]
----keep the code bet... |
USE [tempdb];
SET NOCOUNT ON;
SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
DECLARE @SQLCmd nvarchar(max);
SET @SQLCmd = '
IF OBJECT_ID(''dbo.[MissingIndexStats]'') IS NOT NULL
BEGIN
DROP TABLE [dbo].[MissingIndexStats];
END';
EXEC sp_executesql @SQLCmd;
-- create temporary storage
CREATE TABLE... |
-- ================================================================================
-- Copyright (c) 2019-2020 AT&T Intellectual Property. All rights reserved.
-- Copyright (c) 2021 Nokia Intellectual Property. All rights reserved.
-- ================================================================================
-- L... |
CREATE SCHEMA IF NOT EXISTS PRODUCT_ENTITY_GROUP;
CREATE TABLE PRODUCT_ENTITY_GROUP.PRODUCT_RELATED_PRODUCT (
ID VARCHAR(36) UNIQUE NOT NULL,
NAME VARCHAR(500) NOT NULL,
IS_DEFAULT_OPTION BOOLEAN NOT NULL,
FROM_DATE DATE NOT NULL,
TO_DATE DATE,
PRIMARY KEY (ID)
);
CREATE TABLE PRODUCT_ENTITY_GROUP.PRODUCT... |
-- Trigger to update modify time for below tables
CREATE OR REPLACE FUNCTION trigger_modify_time()
RETURNS TRIGGER AS $$
BEGIN
NEW.modify_time = NOW();
RETURN NEW;
END;
$$ LANGUAGE plpgsql;
-- Including a template_type to support multiple templating algorithms
-- Modify time is used to store with the templ... |
IF EXISTS ( SELECT 1 FROM dbo.SysObjects WHERE id=OBJECT_ID('dbo.EmailAddress_Confirm') AND OBJECTPROPERTY(id,'IsProcedure')=1)
BEGIN
DROP PROCEDURE dbo.EmailAddress_Confirm
END
GO
CREATE PROCEDURE dbo.EmailAddress_Confirm
@EmailAddress NVARCHAR(255),
@ConfirmGuid UNIQUEIDENTIFIER,
@IsConfirmed BIT OUTPUT
AS
B... |
-- -------------------------------------------------------
-- PROGETTO qBreak (Social Network), BASI DI DATI
-- --------------------------------------
-- Anno 2017-2018
-- Università degli studi di Padova
-- Laurea in Informatica
-- --------------------------------------
-- Enrico Buratto
-- Mariano Scia... |
-- Create Users database
CREATE DATABASE IF NOT EXISTS Users;
USE Users;
CREATE TABLE Credentials(
ID int(9) NOT NULL auto_increment,
UserName VARCHAR(40) NOT NULL,
Password VARCHAR(100) NOT NULL,
PRIMARY KEY (ID)
);
|
SELECT CASE WHEN InstanceID IS NULL THEN 'Total' ELSE InstanceID END InstanceID,
SUM(OldStatus4) AS OldStatus4
, SUM(Status0) AS Status0
, SUM(Status1) AS St... |
/*
* Calculates the percent of points a student has earned
* each day and counts the number of days based on the bins
* of percentages. A pivot is performed for display purposes
* so bins are now columns/fields instead of row data.
*/
WITH cte AS (
SELECT Site, StudentID, ServiceCode,
CASE
WHEN ProgramD... |
-- phpMyAdmin SQL Dump
-- version 4.9.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Feb 18, 2020 at 09:59 PM
-- Server version: 10.4.11-MariaDB
-- PHP Version: 7.2.26
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OL... |
-- Copyright [1999-2015] Wellcome Trust Sanger Institute and the EMBL-European Bioinformatics Institute
-- Copyright [2016-2018] EMBL-European Bioinformatics Institute
--
-- Licensed under the Apache License, Version 2.0 (the "License");
-- you may not use this file except in compliance with the License.
-- You may ob... |
--new relationships for HemOnc
DO $_$
BEGIN
PERFORM vocabulary_pack.AddNewRelationship(
pRelationship_name =>'Has biosimilar',
pRelationship_id =>'Has biosimilar',
pIs_hierarchical =>0,
pDefines_ancestry =>0,
pReverse_relationship_id =>'Biosimilar of',
pRelationship_name_rev =>'Biosimilar of',
pIs_hier... |
ALTER TABLE ONLY public.bruno ALTER COLUMN field1 SET (n_distinct=10, n_distinct_inherited=10);
|
-- Local test migration.
-- This will be run on development environments. It should mirror what you
-- intend to apply on production, but do not include any sensitive data.
-- * Leaving empty- new users not needed on development *
|
--SELECT
--'BEGIN TRY
-- DROP EXTERNAL TABLE [' + S.Name + '].[' + T.Name + ']
--END TRY
--BEGIN CATCH
-- PRINT ''No Need''
--END CATCH'
--FROM
-- sys.tables AS T
--INNER JOIN sys.schemas AS S ON S.schema_id = T.schema_id
--WHERE S.Name = 'ext'
|
--- description: Get popularity data for RUM target attribute values, filtered by checkpoint
--- Authorization: none
--- Access-Control-Allow-Origin: *
--- limit: 30
--- interval: 30
--- offset: 0
--- url:
--- checkpoint: -
--- source: -
--- separator: ;
--- extract: -
WITH
current_data AS (
SELECT
TIMESTAM... |
update ACT_GE_PROPERTY set VALUE_ = '6.5.1.4' where NAME_ = 'eventsubscription.schema.version';
|
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!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 N... |
SELECT TOP 5 EmployeeID, FirstName, Salary, d.Name AS [DepartmentName]
FROM Employees AS [e]
INNER JOIN Departments AS [d]
ON e.DepartmentID = d.DepartmentID
WHERE e.Salary > 15000
ORDER BY d.DepartmentID |
-- boundary1.test
--
-- db eval {
-- SELECT a FROM t1 WHERE rowid <= -129 ORDER BY rowid DESC
-- }
SELECT a FROM t1 WHERE rowid <= -129 ORDER BY rowid DESC |
DROP VIEW IF EXISTS activity_leaderboards;
CREATE VIEW activity_leaderboards AS SELECT
COUNT(*) AS count, player_id_owner, player_id, player.name AS player_name
FROM log
INNER JOIN player ON player.id = log.player_id
WHERE log.accepted IS NOT NULL
GROUP BY player_id, player_id_owner
ORDER BY count DESC; |
CREATE DATABASE HOSPITAL;
CREATE TABLE MEDICO(
IDMEDICO INT PRIMARY KEY AUTO_INCREMENT,
NOME VARCHAR(30) NOT NULL,
EMAIL VARCHAR(50)
);
CREATE TABLE PACIENTE(
IDPACIENTE INT PRIMARY KEY AUTO_INCREMENT,
NOME VARCHAR(30) NOT NULL,
CPF VARCHAR(15) NOT NULL,
EMAIL VARCHAR(30),
SEXO ENUM ('M', 'F') NOT NULL
);
C... |
USE [UserDB] /*Change your database name if you want*/
GO
/****** Object: Table [dbo].[MsgTable] Script Date: 25-Jan-17 1:24:18 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[MsgTable](
[Id] [int] IDENTITY(1,1) NOT NULL,
[ChatMsg] [nvarchar](max) NOT NULL,
[MsgSender] [nvarchar]... |
CREATE TABLE IF NOT EXISTS `posts` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`title` varchar(100) NOT NULL,
`text` text NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8;
REPLACE INTO `posts` (`id`, `title`, `text`) VALUES
(1, 'Blog #1', 'Welcome to my first blog post'),
(2, 'B... |
/*
* The MIT License
*
* Copyright 2018 Piotr Wróblewski.
*
*/
/**
* @author Piotr Wróblewski <poczta@wroblewskipiotr.pl>
* Created: 2018-03-13
*/
SET NAMES 'utf8';
SET CHARACTER SET 'UTF8';
/**
-------------------------- USERS --------------------------
*/
CREATE TABLE IF NOT EXISTS `users` (
`id` INT... |
SELECT
a
{# My Comment #}
, b
{% for i in [1, 2, 3] %}
, c_{{i}} + 42 AS the_meaning_of_li{{ 'f' * i }}
{% endfor %}
, boo
{% for i in [1, 2, 3] %}
, d_{{i}}
{% endfor %}
FROM my_table
|
--
-- Table structure for table `ddd`
--
DROP TABLE IF EXISTS `ddd`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `ddd` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`ddd` varchar(2) NOT NULL COMMENT 'Número do DDD',
`cidade` varchar(100) N... |
-- MySQL dump 10.15 Distrib 10.0.35-MariaDB, for Linux (x86_64)
--
-- Host: localhost Database: hgmd_snp
-- ------------------------------------------------------
-- Server version 10.0.35-MariaDB
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_... |
[sql]
select
100.00 * sum(case
when p_type like 'PROMO%'
then l_extendedprice * (1 - l_discount)
else 0
end) / sum(l_extendedprice * (1 - l_discount)) as promo_revenue
from
lineitem,
part
where
... |
-- boundary1.test
--
-- db eval {
-- SELECT a FROM t1 WHERE rowid < -36028797018963968 ORDER BY rowid DESC
-- }
SELECT a FROM t1 WHERE rowid < -36028797018963968 ORDER BY rowid DESC |
DROP TABLE vet_specialties IF EXISTS;
DROP TABLE vets IF EXISTS;
DROP TABLE specialties IF EXISTS;
DROP TABLE visits IF EXISTS;
DROP TABLE pets IF EXISTS;
DROP TABLE types IF EXISTS;
DROP TABLE owners IF EXISTS;
CREATE TABLE vets (
id INTEGER IDENTITY PRIMARY KEY,
first_name VARCHAR(30),
las... |
CREATE PROCEDURE [workers].[DumpDataAndWait68]
(
@SecondWait TINYINT = 0
)
AS
BEGIN
SET NOCOUNT ON;
DECLARE @Delay VARCHAR(8)
SELECT
@Delay = '00:00:0' + LEFT(ABS(CAST(CAST(NEWID() AS VARBINARY(192)) AS INT)),1)
INSERT INTO [dbo].[DataDump]
(
[SomeValue]
)
SELECT TOP 1
[stopword]
FROM
sys.... |
-- Dispatcher scheduled process entry
DELETE from fledge.scheduled_processes WHERE name = 'dispatcher_c';
-- Delete dispatcher log and log codes
DELETE from fledge.log WHERE code = 'DSPST';
DELETE from fledge.log_codes WHERE code = 'DSPST';
DELETE from fledge.log WHERE code = 'DSPSD';
DELETE from fledge.log_codes WHER... |
-- @description function_in_from_subqry_withfunc2_96.sql
-- @db_name functionproperty
-- @author tungs1
-- @modified 2013-04-03 12:00:00
-- @created 2013-04-03 12:00:00
-- @tags functionProperties
SELECT * FROM foo, (SELECT * FROM func1_read_int_sql_vol(func2_read_int_vol(5))) r order by 1,2,3;
|
/* create views */
--1. Top A-Star Passenger- This view returns the First Name, Last Name and Date of membership enrollment of those passengers who have travelled more than 60 times in the past year.
-- table 1: TICKET sold last year
/*
CREATE TABLE T1 AS(
SELECT TICKET_ID
FROM TICKET, TIME_TABLE
W... |
/*==============================================================*/
/* DBMS name: MySQL 5.0 */
/* Created on: 30/09/2021 16:08:51 */
/*==============================================================*/
/*================================================... |
SELECT name_student,
name_subject,
date_attempt,
round((SUM(is_correct) / 3) * 100 , 2) Результат
FROM subject JOIN attempt using(subject_id)
JOIN student ON attempt.student_id = student.student_id
JOIN testing ON attempt.attempt_id = testing.attempt_i... |
create table country
(
id identity not null primary key,
name varchar not null
);
create table film
(
id identity not null primary key,
country_id bigint not null,
title varchar ... |
SELECT MIN(mi_idx.info) AS rating, MIN(t.title) AS western_dark_production
FROM info_type AS it1, info_type AS it2, keyword AS k, kind_type AS kt, movie_info AS mi, movie_info_idx AS mi_idx, movie_keyword AS mk, title AS t
WHERE it1.info = 'countries' AND it2.info = 'rating' AND k.keyword in ('murder', 'murder-in-... |
CREATE DATABASE "TradeUnionCommitteeEmployeesAuditCore"
WITH OWNER = postgres
ENCODING = 'UTF8'
TABLESPACE = pg_default
LC_COLLATE = 'English_United States.1252'
LC_CTYPE = 'English_United States.1252'
CONNECTION LIMIT = -1; |
-- phpMyAdmin SQL Dump
-- version 4.9.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Waktu pembuatan: 17 Sep 2021 pada 06.36
-- Versi server: 10.4.11-MariaDB
-- Versi PHP: 7.4.1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARA... |
CREATE OR REPLACE VIEW vw_psa_uat_csa_vs_bpu_dbg AS
WITH
-- 04-Mar-2021,R.Donakonda: created UAT test dbg view for BPU table
psl as
(
SELECT /*+ materialize*/ psuid
FROM vw_psa_plan_sponsor_list
),
new_data AS
(
SELECT --+ materialize
psl.psuid,
bpu.bpu_skey,
bpu.control_cd,
... |
--
-- Copyright 2004-2014 The Kuali Foundation
--
-- Licensed under the Educational Community License, Version 2.0 (the "License");
-- you may not use this file except in compliance with the License.
-- You may obtain a copy of the License at
--
-- http://www.opensource.org/licenses/ecl2.php
--
-- Unless required by ap... |
DROP TABLE IF EXISTS BgpDetailInfo;
DROP TABLE IF EXISTS BreakoutIfInfo;
DROP TABLE IF EXISTS DummyVlanIfInfo;
DROP TABLE IF EXISTS MultiHomingInfo;
DROP TABLE IF EXISTS ClusterLinkIfInfo;
DROP TABLE IF EXISTS InnerLinkIfInfo;
DROP TABLE IF EXISTS L3VpnLeafBgpBasicInfo;
DROP TABLE IF EXISTS ACLDetailInfo;
DROP TABLE IF... |
ALTER TABLE task DROP CONSTRAINT task_payload_key;
ALTER TABLE task ADD COLUMN payload_hash TEXT NOT NULL DEFAULT '';
UPDATE task SET payload_hash = md5(payload);
ALTER TABLE task ADD CONSTRAINT payload_hash_key UNIQUE (payload_hash); |
CREATE TABLE sample_table (
st_id BIGSERIAL PRIMARY KEY,
st_res_locked_volume int,
st_selectors VARCHAR(127)[],
st_some_forecast_point float,
st_date date,
st_number int,
st_countries VARCHAR(127)[],
st_thrs VARCHAR(127)[],
ft_id int,
st_pro_two int,
st_some_point float,
... |
/*
* Tencent is pleased to support the open source community by making BK-BASE 蓝鲸基础平台 available.
*
* Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
*
* BK-BASE 蓝鲸基础平台 is licensed under the MIT License.
*
* License for BK-BASE 蓝鲸基础平台:
* ----------------------------------------------... |
SET SERVEROUTPUT ON
SET FEEDBACK OFF
SET LINESIZE 240
SET AUTOCOMMIT OFF
whenever oserror exit failure;
whenever sqlerror exit SQL.SQLCODE;
@@&1
|
SELECT *
FROM (
SELECT Product.maker, COUNT(Product.model) as models_count
FROM Product
WHERE Product.model = 'PC'
GROUP BY Product.maker
) as maker_countpc
WHERE maker_countpc.models_count >=3
; |
CREATE TABLE HR.Division
(
DivisionKey INT NOT NULL IDENTITY(1000, 1)
CONSTRAINT PK_Division PRIMARY KEY,
DivisionName NVARCHAR(30) NOT NULL
CONSTRAINT UX_Division_DivisionName
UNIQUE
);
|
CREATE TABLE pagamento(
id INT NOT NULL PRIMARY KEY AUTO_INCREMENT,
forma_pagamento VARCHAR(100) NOT NULL,
valor DECIMAL(10,2) NOT NULL,
moeda VARCHAR(3) NOT NULL,
descricao VARCHAR(100) NOT NULL,
status VARCHAR(20) NOT NULL,
data DATE
);
|
-- (application) template table
CREATE TYPE public.template_status AS ENUM (
'DRAFT',
'AVAILABLE',
'DISABLED'
);
CREATE TABLE public.template (
id serial PRIMARY KEY,
name varchar,
name_plural varchar,
code varchar NOT NULL,
is_linear boolean DEFAULT TRUE,
start_message jsonb,
s... |
-- Progettazione Web
DROP DATABASE if exists ohmulator;
CREATE DATABASE ohmulator;
USE ohmulator;
-- MySQL dump 10.13 Distrib 5.6.20, for Win32 (x86)
--
-- Host: localhost Database: ohmulator
-- ------------------------------------------------------
-- Server version 5.6.20
/*!40101 SET @OLD_CHARACTER_SET_CLIE... |
-- AlterTable
ALTER TABLE "Post" ALTER COLUMN "c" SET DEFAULT CURRENT_TIMESTAMP;
|
SET SCHEMA 'data';
create function get_all_products()
returns TABLE (product_id UUID, product_name VARCHAR(100), product_description TEXT, product_sizes size[], product_price float8)
language plpgsql
as
$$
declare
begin
RETURN QUERY
SELECT * from data.products;
end;
$$; |
-- phpMyAdmin SQL Dump
-- version 5.0.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Waktu pembuatan: 09 Apr 2020 pada 06.07
-- Versi server: 10.4.11-MariaDB
-- Versi PHP: 7.4.2
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARA... |
ALTER TABLE users
ADD COLUMN confirmation_token VARCHAR(36) UNIQUE;
ALTER TABLE users
ADD COLUMN enabled BOOLEAN;
|
set termout off
create or replace package tst_doc_reporter_timing as
--%suite
--%test
procedure test1;
--%test
procedure test2;
end;
/
create or replace package body tst_doc_reporter_timing as
procedure test1 is begin ut.expect(1).to_equal(1); end;
procedure test2 is begin ut.expect(1).to_equal(2); e... |
BEGIN;
CREATE TABLE read_queue_groups (
group_id SERIAL NOT NULL,
group_name TEXT NOT NULL UNIQUE,
PRIMARY KEY (group_id),
UNIQUE (group_name)
);
CREATE TABLE read_queue (
item_id SERIAL NOT NULL,
group_id INTEGER NOT NULL,
alert_ids INTEGER[] NOT NULL,
PRIMARY KEY (item_id),
FOREIGN KEY(group_i... |
insert into products(category_id, name, url, image, price, in_stock)
SELECT
(array[11,12,22,27,28,29,30,31,32])[floor(random() * 9 + 1)] as category_id,
(array['potato', 'orange', 'onion', 'carrot', 'lemon', 'banana', 'apple', 'chanterelles'])[floor(random() * 8 + 1)] as name,
md5(random()::text) as url,
(array['potato... |
CREATE TABLE `employees` (
`id` int not null AUTO_INCREMENT,
`firstName` varchar(25) not null,
`lastName` varchar(25) not null,
`email` varchar(30) not null,
`phone` varchar(15),
`gender` char(1),
`country` varchar(25) not null,
`city` varchar(25) not null,
`position` varchar(20) not... |
SELECT e.FirstName, e.LastName, d.Name
FROM Employees e
CROSS JOIN Departments d
|
use ayehaadb;
INSERT INTO `role` (`Id`, `Name`, `Description`) VALUES ('1', 'Administrator', 'Administrator Role.'); |
/*
Navicat MySQL Data Transfer
Target Server Type : MYSQL
Target Server Version : 50639
File Encoding : 65001
Date: 2019-04-12 11:01:01
*/
SET FOREIGN_KEY_CHECKS=0;
-- ----------------------------
-- Table structure for tbl_ont_oep8
-- ----------------------------
DROP TABLE IF EXISTS `tbl_oep8`;
CREAT... |
select count(o.*), s.from_column as best, c.concept_id as con, c.vocabulary_id as vocab, c.concept_code as term, substring(c.concept_name, 1, 25)
from study_to_ohdsi_mapping s, observation o, concept c
where o.observation_concept_id = c.concept_id
and s.vocabulary_name = c.vocabulary_id
and s.vocabulary_term_id = ... |
/* Práctica 1 - Bases de Datos UBU
* Alumnos:
* - Rodrigo Díaz García
*/
DROP TABLE IF EXISTS practica1, practica1usuarios;
/* La siguiente tabla sólo es usada para comprobar referencias */
CREATE TABLE practica1usuarios ( -- tabla de referencia
usuario VARCHAR(16) PRIMARY KEY
--...
);
INSERT INTO practica1usua... |
# Table definitions for button-related tables
CREATE TABLE buttonset (
id SMALLINT UNSIGNED PRIMARY KEY,
# 'Chicagoland Games Enclave' has 27 characters
name VARCHAR(40) NOT NULL,
# We may as well sort sets without a sort order to the end
sort_order INT NOT NULL DEFAULT 999999
);
... |
CREATE TABLE m_ego_gift
(pri_key int PRIMARY KEY NOT NULL,
name_en text,
name_ja text,
remarks text,
equip_part integer,
name_key text,
abnoma_url text) |
/*
** Copyright (c) 2009, by the California Institute of Technology.
** ALL RIGHTS RESERVED. U.S. Government sponsorship acknowledged.
**
** $Id: inv_granule_overdue.sql 2597 2009-02-10 06:38:36Z shardman $
*/
/*
** This script returns each dataset where granules have not been
** received within the policy's specifie... |
-- This file and its contents are licensed under the Apache License 2.0.
-- Please see the included NOTICE for copyright information and
-- LICENSE-APACHE for a copy of the license.
-- This file contains utilities for time conversion.
CREATE OR REPLACE FUNCTION _timescaledb_internal.to_unix_microseconds(ts TIMESTAMPTZ... |
-- phpMyAdmin SQL Dump
-- version 4.1.4
-- http://www.phpmyadmin.net
--
-- Client : 127.0.0.1
-- Généré le : Jeu 26 Novembre 2015 à 09:51
-- Version du serveur : 5.6.15-log
-- Version de PHP : 5.5.8
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACT... |
WITH barriers_to_remove AS
(SELECT array_agg(barrier_id) as removals
FROM {barrier_schema}.{barrier_table}
WHERE upstream_observation_ids IS NOT NULL)
UPDATE {stream_schema}.{stream_table} s
SET {target_column} = ({source_column} - r.removals)
FROM barriers_to_remove r
WHERE s.{source_column} IS NOT NULL
AND s.watersh... |
WITH data AS (
SELECT array_agg(x) x FROM generate_series(1,100) x
WHERE x % 5 != 0 AND x % 7 != 0
)
SELECT round(unnest(CDB_HeadsTailsBins(x, 7)),2) FROM data |
delete dbo.Attribute
go
insert into dbo.Attribute (Attribute) VALUES
('Image')
|
# --- !Ups
alter table "order" add column "processed" BOOLEAN;
update "order" set "processed" = TRUE;
alter table "order" alter column "processed" SET NOT NULL;
# --- !Downs
alter table "order" drop column "processed";
|
#standardSQL
# Cumulative V8 main thread time
CREATE TEMPORARY FUNCTION totalMainThreadTime(payload STRING) RETURNS FLOAT64 LANGUAGE js AS '''
try {
var $ = JSON.parse(payload);
return Object.values($._v8Stats.main_thread).reduce((sum, i) => sum + i, 0);
} catch (e) {
return null;
}
''';
SELECT
percentile,
c... |
DROP TABLE IF EXISTS admin_settings;
DROP TABLE IF EXISTS alarm;
DROP TABLE IF EXISTS asset;
DROP TABLE IF EXISTS audit_log;
DROP TABLE IF EXISTS attribute_kv;
DROP TABLE IF EXISTS component_descriptor;
DROP TABLE IF EXISTS customer;
DROP TABLE IF EXISTS device;
DROP TABLE IF EXISTS device_credentials;
DROP TABLE IF EX... |
CREATE OR REPLACE TRIGGER "CF_TEMP_PARTS_KEY"
before insert ON cf_temp_parts
for each row
begin
if :NEW.key is null then
select somerandomsequence.nextval into :new.key from dual;
end if;
end;
ALTER TRIGGER "CF_TEMP_PARTS_KEY" ENABLE |
-- --------------------------------------------------------
-- 主机: 127.0.0.1
-- 服务器版本: 5.5.53 - MySQL Community Server (GPL)
-- 服务器操作系统: Win32
-- HeidiSQL 版本: 9.4.0.5125
-- --------------------------------------------------------
/*... |
-- phpMyAdmin SQL Dump
-- version 4.7.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Jun 04, 2018 at 06:33 AM
-- Server version: 10.1.28-MariaDB
-- PHP Version: 7.1.11
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OL... |
# $Id: upgrade2.my.sql 798 2008-04-13 19:59:24Z jberanek $
# Add an extra column to the mrbs_repeat table for rep_type 6
ALTER TABLE mrbs_repeat
ADD COLUMN rep_num_weeks smallint NULL;
|
create or replace type demo_department as object(
dept_name varchar2(30)
)
/
create or replace type demo_department_new as object(
dept_name varchar2(30)
)
/
create or replace type demo_departments as table of demo_department
/
create or replace package demo_equal_matcher as
-- %suite
-- %displayname(Equal ... |
CREATE FUNCTION [Events].[GetEventName]
(
@name NVARCHAR(256)
,@qualified BIT = 0
)
RETURNS NVARCHAR(256)
AS
BEGIN
SET @name = SUBSTRING( @name, 0, CHARINDEX( ',', @name ) );
IF ( COALESCE( @qualified, 0 ) = 0 )
BEGIN
SELECT TOP(1)
@name = value
FROM
( SELECT
ROW_NUMBER() OVER( ORDER BY ( SELECT 1... |
-- Copyright 1999 Kevin Closson
-- Licensed under the Apache License, Version 2.0 (the "License");
-- you may not use this file except in compliance with the License.
-- You may obtain a copy of the License at
-- http://www.apache.org/licenses/LICENSE-2.0
-- Unless required by applicable law or agreed to in writi... |
-- Project
INSERT INTO project (id, slug, name, image) VALUES
('a012e753-9eff-426d-b0ee-090b430d1980', 'buffalo-district-streamgages',
'Buffalo District Streamgages', 'buffalo-district-streamgages.jpg');
--#################################################
--DELETE existing data (mostly for dev, test, prod)
--... |
Plugin
{
string %Path{"ezEnginePluginAssets"}
bool %LoadCopy{false}
string %DependencyOf{"EditorPluginAssets"}
}
Plugin
{
string %Path{"ezEnginePluginKraut"}
bool %LoadCopy{false}
string %DependencyOf{"EditorPluginKraut"}
}
Plugin
{
string %Path{"ezEnginePluginParticle"}
bool %LoadCopy{false}
string %Dependenc... |
INSERT INTO pos_itemtemp VALUES("IATT190003324","193056","191002","192010","17000","1","17000","0","17000","1","1","1","IAT2010191003","NHO2018000007","PAID","","193056"),
("IATT190003324","193055","191002","192010","17000","1","17000","0","17000","1","1","1","IAT2010191003","NHO2018000007","PAID","","193055"),
("IATT1... |
-- database: presto; groups: tpch, big_query; tables: customer,orders,lineitem
SELECT
c_name,
c_custkey,
o_orderkey,
o_orderdate,
o_totalprice,
sum(l_quantity)
FROM
customer,
orders,
lineitem
WHERE
o_orderkey IN (
SELECT l_orderkey
FROM
lineitem
GROUP BY
l_o... |
(lp1
(lp2
a(lp3
a(lp4
a(lp5
a(lp6
a(lp7
a(lp8
a(lp9
a(lp10
a(lp11
a(lp12
a(lp13
a(lp14
a(lp15
a(lp16
a(lp17
a(lp18
a(lp19
a(lp20
a(lp21
a(lp22
a(lp23
a(lp24
a(lp25
a(lp26
a(lp27
a(lp28
a(lp29
a(lp30
a(lp31
a(lp32
a(lp33
a(lp34
a(lp35
a(lp36
a(lp37
a(lp38
a(lp39
a(lp40
a(lp41
a(lp42
a(lp43
a(lp44
a(lp45
a(lp46
a(lp47
a(... |
create sequence hibernate_sequence start with 1 increment by 1;
create table group_team
(
group_id bigint not null,
creation_date timestamp not null,
name varchar(255) not null,
owner_id bigint not null,
primary key (group_id)
);
create table task
(
task_id ... |
-- data for the vacation request repository test.
INSERT INTO employee (id, version, email, firstName, lastName, title, hourlyCostRate, salary, federalState, joinDate, vacationEntitlement, deleted)
VALUES (0, 0, 'employee@techdev.de', 'John', 'Johnson', 'Software Engineer', 80, 10000, 'BERLIN', '2014-02-01', 30, fals... |
ALTER TABLE exploration_surface_drilling ADD COLUMN IF NOT EXISTS drill_program varchar;
ALTER TABLE now_submissions.application ADD COLUMN IF NOT EXISTS expsurfacedrillprogam varchar;
ALTER TABLE now_submissions.application ADD COLUMN IF NOT EXISTS describeexplosivetosite varchar;
ALTER TABLE blasting_operation ADD ... |
-- Table: a20_accounting
-- DROP TABLE a20_accounting;
CREATE TABLE a20_accounting
(
accounting_id serial NOT NULL,
organization_idref integer NOT NULL DEFAULT 0,
"name" character varying(64) NOT NULL DEFAULT 'new task'::character varying,
description character varying(256) NOT NULL DEFAULT 'new task'::charac... |
-- phpMyAdmin SQL Dump
-- version 4.0.10deb1
-- http://www.phpmyadmin.net
--
-- Хост: localhost
-- Время создания: Мар 06 2017 г., 07:39
-- Версия сервера: 5.6.33-0ubuntu0.14.04.1
-- Версия PHP: 5.6.14-1+deb.sury.org~trusty+1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACT... |
begin;
drop table if exists wr.men_results;
create table wr.men_results (
game_id integer,
year integer,
game_date date,
country text,
team_name text,
team_id integer,
team_country text,
opponent_name text,
opponent_id integer,
opponent_country ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.