text stringlengths 1 1.05M |
|---|
SELECT ('{red, green, blue}'::text[])[1] as red ;
WITH arr AS (SELECT '[0:1]={1,2}'::INT[] as arr) SELECT arr, arr[0];
SELECT array['red','green','blue'] AS primary_colors;
SELECT
array_ndims(two_dim_array) AS "Number of dimensions",
array_dims(two_dim_array) AS "Dimensions index range",
array_length(two_dim_arra... |
CREATE OR REPLACE TRIGGER "TR_SPECIMEN_ANNOTATIONS_SQ" before insert ON specimen_annotations
for each row
begin
if :NEW.annotation_id is null then
select sq_annotation_id.nextval
into :new.annotation_id from dual;
end if;
if :NEW.annotate_date is null then
:NEW.annotate_date := s... |
ALTER TABLE systems_device ALTER COLUMN mac TYPE character varying;
ALTER TABLE systems_device ALTER COLUMN mac2 TYPE character varying;
ALTER TABLE systems_device_history ALTER COLUMN mac TYPE character varying;
ALTER TABLE systems_device_history ALTER COLUMN mac2 TYPE character varying;
|
select cast(ar1.stratum_1 as int64) as interval_index,
ar1.count_value as count_value,
round(1.0*ar1.count_value / denom.count_value,5) as percent_value
from @results_database_schema.achilles_analysis aa1
inner join @results_database_schema.achilles_results ar1 on aa1.analysis_id = ar1.analysis_id,
(
select count_v... |
CREATE TABLE xmltest (
id int,
data xml
);
INSERT INTO xmltest VALUES (1, '<value>one</value>');
INSERT INTO xmltest VALUES (2, '<value>two</value>');
INSERT INTO xmltest VALUES (3, '<wrong');
SELECT * FROM xmltest;
SELECT xmlcomment('test');
SELECT xmlcomment('-test');
SELECT xmlcomment('test-');
SELECT xm... |
CREATE TABLE "users" (
"id" VARCHAR NOT NULL UNIQUE PRIMARY KEY,
"username" VARCHAR NOT NULL UNIQUE,
"encrypted_password" VARCHAR NOT NULL
);
CREATE TABLE sessions (
"user_id" VARCHAR NOT NULL UNIQUE PRIMARY KEY,
"request_id" VARCHAR NOT NULL,
"token" VARCHAR NOT NULL,
CONSTRAINT "user_id" FOREIGN KEY ("u... |
/*
Vjezbe Predavanje 2, Zadatak 6
Prikazati broj proizvoda po kategoriji. Listu sortirati opadajucim redosljedom po
broju proizvoda. Prikazati samo 10 kategorija. Takodjer, provjeriti da li ima
kategorija koji imaju isti broj proizvoda kao ona na 10 mjestu.
(AdventureWorksLT)
*/
USE AdventureWorksLT2014
SELECT ... |
<?xml version="1.0" encoding="UTF-8"?>
<CustomTab xmlns="http://soap.sforce.com/2006/04/metadata">
<customObject>true</customObject>
<mobileReady>false</mobileReady>
<motif>Custom37: Bridge</motif>
</CustomTab>
|
/*show quantity order by category */
select c.nombre_categoria, count(*) cant_posts
from categories as c
inner join post as p on c.id = p.categoria_id
group by c.id
order by cant_posts desc
limit 6;
/*cantidad de post por usuarios*/
select u.nickname, count(*) cant_posts
from users as u
inner join post as p on u.id =... |
--
-- Copyright 2005-2015 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 requi... |
drop table if exists authassignment cascade;
drop table if exists authitemchild cascade;
drop table if exists authitem cascade;
create table authitem
(
name varchar(64) not null,
type integer not null,
description text,
bizrule text,
data ... |
/*
Navicat MySQL Data Transfer
Source Server : 127.0.0.1
Source Server Version : 50621
Source Host : localhost
Source Database : RUNOOB
Target Server Version : 50621
File Encoding : utf-8
Date: 05/18/2016 14:15:39 PM
*/
SET NAMES utf8;
SET FOREIGN_KEY_CHECKS = 0;
-- --------... |
/*
* Copyright 2021 The Bank of New York Mellon.
*
* 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... |
-- file:plpgsql.sql ln:1254 expect:true
insert into PSlot values ('PS.base.ta4', 'PF0_X', '', '')
|
-- Copyright [1999-2015] Wellcome Trust Sanger Institute and the EMBL-European Bioinformatics Institute
-- Copyright [2016-2021] 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... |
-- phpMyAdmin SQL Dump
-- version 4.8.3
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: May 23, 2019 at 07:08 PM
-- Server version: 10.1.35-MariaDB
-- PHP Version: 7.1.21
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OL... |
-- phpMyAdmin SQL Dump
-- version 4.5.4.1deb2ubuntu2.1
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Oct 30, 2018 at 11:26 AM
-- Server version: 5.7.23-0ubuntu0.16.04.1
-- PHP Version: 7.0.32-0ubuntu0.16.04.1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD... |
USE PeopleDB
-- Data from: https://www.mockaroo.com/
insert into People (Id, FirstName, LastName, Email, Avatar) values (1, 'Dorthea', 'Wallis', 'dwallis0@wiley.com', 'https://robohash.org/doloremquaeratsit.png?size=50x50&set=set1');
insert into People (Id, FirstName, LastName, Email, Avatar) values (2, 'Anneliese', ... |
-- MySQL dump 10.13 Distrib 5.5.31, for debian-linux-gnu (i686)
--
-- Host: sam.162.243.6.106.xip.io Database: sam
-- ------------------------------------------------------
-- Server version 5.5.31-0+wheezy1
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@... |
DROP TABLE IF EXISTS vetd.threads; |
CREATE TABLE searchengine (
id CHAVE NOT NULL,
server CHARACTER VARYING(64) NOT NULL,
getvar CHARACTER VARYING(16) NOT NULL,
CONSTRAINT pk_searchengine PRIMARY KEY (id)
); |
drop table if exists MB_CONTACT_LIST;
/*==============================================================*/
/* Table: MB_CONTACT_LIST */
/*==============================================================*/
create table MB_CONTACT_LIST
(
INTERNAL_KEY Decimal(15) not null comment ... |
/*
Navicat MySQL Data Transfer
Source Server : localhost
Source Server Version : 50560
Source Host : localhost:3306
Source Database : springdemo
Target Server Type : MYSQL
Target Server Version : 50560
File Encoding : 65001
Date: 2018-07-15 11:32:12
*/
-- Host: localhost Datab... |
/*
========================================================
CREACIÓN DE LA BASE DATOS DE TOMAS NOTICIAS
========================================================
*/
/*SE CREA LA BD.
Si es por CPANEL, simplemente se quita esta linea*/
/*CREATE DATABASE IF NOT EXISTS tomasnoticas;
USE tomasnoticas;
*/
/*FIN BD*... |
SELECT DISTINCT
sys.ResourceID,
sys.Name0 AS Name,
CASE WHEN (sys.Client0 = 1) THEN 'Yes' ELSE 'No' END AS Client,
sys.Client_Version0 AS ClientVersion,
sys.AD_Site_Name0 AS ADSiteName,
sys.Operating_System_Name_and0 AS OSName,
sys.Build01 AS OSBuild, ws.UserName,
ws.LastHardwareScan AS ... |
create DATABASE IF NOT EXISTS poster;
USE poster;
DROP TABLE IF EXISTS `likes`;
DROP TABLE IF EXISTS `comments`;
DROP TABLE IF EXISTS `post`;
DROP TABLE IF EXISTS `follow`;
DROP TABLE IF EXISTS `verification_code`;
DROP TABLE IF EXISTS `user_role`;
DROP TABLE IF EXISTS `user`;
DROP TABLE IF EXISTS `role`;
CREATE TABL... |
SELECT TOP (5) FirstName, LastName
FROM Employees
ORDER BY Salary DESC |
-- Deploy seattleflu/id3c-customizations:shipping/views to pg
-- requires: seattleflu/schema:shipping/schema
-- Hello! All shipping views are defined here. Rework this change with Sqitch
-- to change a view definition or add new views. This workflow helps keep
-- inter-view dependencies manageable.
-- Views are ve... |
-- @testpoint: opengauss关键字cycle(非保留),作为游标名,部分测试点合理报错
--前置条件
drop table if exists cycle_test cascade;
create table cycle_test(cid int,fid int);
--关键字不带引号-成功
start transaction;
cursor cycle for select * from cycle_test order by 1;
close cycle;
end;
--关键字带双引号-成功
start transaction;
cursor "cycle" for select * from cycl... |
CREATE TABLE LG_$FIRM$_CLCARD (
LOGICALREF NVARCHAR(40) NOT NULL COLLATE NOCASE,
CODE NVARCHAR(40) NULL COLLATE NOCASE DEFAULT '',
DEFINITION_ NVARCHAR(50) NULL COLLATE NOCASE DEFAULT '',
SPECODE NVARCHAR(40) NULL COLLATE NOCASE DEFAULT '',
CYPHCODE NVARCHAR(40) NULL COLLATE NOCASE DEFAULT '',
CLGRPCODE NVA... |
select count(*) from j1 where c_timestamp not in ( select c_timestamp from j5) ;
|
-- phpMyAdmin SQL Dump
-- version 5.0.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Waktu pembuatan: 20 Jun 2021 pada 07.33
-- Versi server: 10.4.17-MariaDB
-- Versi PHP: 7.4.15
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@C... |
INSERT INTO tasks (name, description, time_limit, memory) VALUES
('Simple Task 1', 'Given two numbers, find their sum', 1000, 1000),
('Simple Task 2', 'Given an array of integers, find the one that appears an odd number of times', 500, 2000),
('Simple Task 3', 'There is an array with some numbers. All numbers are equal... |
-- MySQL dump 10.13 Distrib 5.7.22, for Linux (x86_64)
--
-- Host: localhost Database: quora
-- ------------------------------------------------------
-- Server version 5.7.22-0ubuntu0.16.04.1
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_... |
INSERT INTO dirtelf.usuario (
username,
auth_key,
password,
password_reset_token,
email,
status,
created_at,
verification_token
)VALUES(
'admindti',
'xW2QgcQcZgc_sRWFU003p4rktPj1p8Hf',
'1nf0rm4t1c4.2020',
'igXnElKPs1lU4pp--NU728SuttD-cSP4_1603898103',
'admindti@tifm.... |
-- *********************************************************************
-- DDL for the Apicurio Studio Hub API - Database: MyMySQL 5+
-- Upgrades the DB schema from version 10 to version 11.
-- *********************************************************************
UPDATE apicurio SET prop_value = 11 WHERE prop_name = ... |
select p.pno, p.pname
from p
where p.pname like 'C%' |
DELETE FROM role_assignment_history;
DELETE FROM role_assignment_request;
DELETE FROM role_assignment;
DELETE FROM actor_cache_control;
INSERT INTO public.role_assignment_request
(id, correlation_id, client_id, authenticated_user_id, assigner_id, request_type, status, process, reference, replace_existing, log, role_a... |
{% macro get_order_columns() %}
{% set columns = [
{"name": "id", "datatype": dbt_utils.type_numeric(), "alias": "order_id"},
{"name": "processed_at", "datatype": dbt_utils.type_timestamp(), "alias": "processed_timestamp"},
{"name": "updated_at", "datatype": dbt_utils.type_timestamp(), "alias": "updated_ti... |
CREATE TABLE [dbo].[FavoriteType]
(
[Id] INT NOT NULL PRIMARY KEY IDENTITY,
[Name] NVARCHAR(MAX) NULL
)
|
-- phpMyAdmin SQL Dump
-- version 4.7.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8mb4 */;
--
-- Database: `seminar`
--
-- -----------------------------... |
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
/*!40000 ALTER TABLE `... |
DEV
===
insert into usuario (id_usuario, email, nombre, apellido, fecha_creacion, id_cargo, usuario_creacion,codigo_usuario_idp)
values
(1, 'cbazalar@csticorp.biz', 'Carlos','Bazalar', utctolocal(CURRENT_TIMESTAMP, 'UTC-5'), 1, 1, 'P000064');
insert into usuario (id_usuario, email, nombre, apellido, fecha_creacion, i... |
drop table if exists users cascade;
|
update regimen set map = 0 where map not in (select id from sync_regimen where Active = 1)// |
-- phpMyAdmin SQL Dump
-- version 4.5.2
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Apr 13, 2017 at 08:19 AM
-- Server version: 10.1.19-MariaDB
-- PHP Version: 5.5.38
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CL... |
DROP DATABASE IF EXISTS employee_tracker;
CREATE DATABASE employee_tracker;
USE employee_tracker;
CREATE TABLE department (
id INT UNSIGNED AUTO_INCREMENT PRIMARY KEY,
d_name VARCHAR(30)
);
CREATE TABLE role (
id INT UNSIGNED AUTO_INCREMENT PRIMARY KEY,
title VARCHAR(30) NOT NULL,
salary DECIMAL ... |
CREATE TABLE users (
user_id INT (5) NOT NULL PRIMARY KEY AUTO_INCREMENT,
email VARCHAR(50) NOT NULL,
password VARCHAR(20) NOT NULL,
f_name VARCHAR(100) NOT NULL,
l_name VARCHAR(100) NOT NULL,
position VARCHAR(50) NOT NULL,
phonenumber VARCHAR(10) NOT NULL,
userlevel VARCHAR(10) NOT NULL... |
-- CreateTable
CREATE TABLE `Movie` (
`id` INT NOT NULL AUTO_INCREMENT,
`wikiUrl` VARCHAR(191) NOT NULL,
`title` VARCHAR(191) NOT NULL,
`year` INTEGER NOT NULL,
`imdbUrl` VARCHAR(191),
UNIQUE INDEX `Movie.wikiUrl_unique`(`wikiUrl`),
PRIMARY KEY (`id`)
) DEFAULT CHARACTER SET utf8mb4 COLLATE... |
-- Verify assign_roles_at_enterprise
BEGIN;
SELECT has_function_privilege(
'assign_roles_at_enterprise(text, text, text[])',
'execute');
ROLLBACK;
|
-- phpMyAdmin SQL Dump
-- version 4.7.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Nov 03, 2019 at 06:58 PM
-- Server version: 10.1.28-MariaDB
-- PHP Version: 5.6.32
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OL... |
-- 2019-07-26_06-46-41 rmbt.sql
--
-- PostgreSQL database dump
--
-- Dumped from database version 10.9 (Debian 10.9-1.pgdg90+1)
-- Dumped by pg_dump version 10.9 (Debian 10.9-1.pgdg90+1)
SET statement_timeout = 0;
SET lock_timeout = 0;
SET idle_in_transaction_session_timeout = 0;
SET client_encoding = 'UTF8';
SET sta... |
SET NAMES UTF8;
DROP DATABASE IF EXISTS jd;
CREATE DATABASE jd CHARSET=UTF8;
USE jd;
/*创建一个部门信息表 dept(did,dname,loc-所在地)*/
CREATE TABLE dept(
did INT PRIMARY KEY AUTO_INCREMENT,
dname VARCHAR(32),
loc VARCHAR(32)
);
/*添加4条部门记录 */
INSERT INTO dept VALUES
(10, '市场部', '北京'),
(20, '研发部', '天津'),
(30, '运营部', '杭州'),
(4... |
-- Users schema
-- !Ups
CREATE TABLE public.User(
id SERIAL NOT NULL,
name TEXT NOT NULL,
PRIMARY KEY (id)
);
CREATE TABLE public.Memo(
id SERIAL NOT NULL,
content TEXT NOT NULL,
user_id INTEGER NOT NULL REFERENCES public.User(id),
PRIMARY KEY (id)
);
CREATE TABLE public.Label(
id SERIAL NOT NULL ,
... |
INSERT
t_user
values
(1, 'user1', now()),
(2, 'user2', now()),
(3, 'user3', now());
INSERT
t_order
values
(1, 1),
(2, 1),
(3, 2),
(4, 2),
(5, 2);
INSERT
t_commodity
values
(1, 'commodity1'),
(2, 'commodity2'),
(3, 'commodity3'),
... |
alter table `cluster` add column `transaction_enabled` int(4) NOT NULL DEFAULT '0' COMMENT '0:不支持事务,1:支持事务';
alter table `cluster` add column `trace_enabled` int(4) NOT NULL DEFAULT '0' COMMENT '0:不支持trace,1:支持trace';
alter table broker_traffic modify put_size bigint(20) NOT NULL DEFAULT '0' COMMENT '生产消息大小';
alte... |
INSERT ignore INTO CARGA (
RUT,
DV,
NOMBRE,
OPERACION,
CUOTA,
PRODUCTO,
VENCE,
MONTO,
TIPO_DEUDOR,
MARCA,
PAGADO
) SELECT distinct
deuda.RUT_TUTOR,
deuda.DIGITO_VERIFICADOR_TUTOR,
deuda.NOMBRE_TUTOR,
concat("00" , LEFT (
deuda.NUMERO_OPERACION, ( InStr( deuda.NUMERO_OPERACION, "-" ) ) - 1
)) AS Exp... |
INSERT INTO oauth_client_entity (id, client_id, application_name, client_secret, authorized_grant_types, authorities,
scope, web_server_redirect_uri, access_token_validity, refresh_token_validity, remarks)
VALUES (1, 'SampleClientId', 'SampleClientId 测试应用', '$2a$10$gcrWom7ubcRaVD1.6ZIrI... |
CREATE TABLE country (id VARCHAR(2) NOT NULL, name VARCHAR(64) NOT NULL, PRIMARY KEY("id"));
INSERT INTO "country" ("id", "name") VALUES ('AC', 'Acsencion island');
INSERT INTO "country" ("id", "name") VALUES ('AF', 'Afghanistan');
INSERT INTO "country" ("id", "name") VALUES ('AX', 'Aland Islands');
INSERT INTO "count... |
USE lab3;
CREATE TABLE users (
user VARCHAR(355) UNIQUE NOT NULL,
password VARCHAR(256) NOT NULL
);
INSERT INTO users (user, password) VALUES ('admin', 'admin'), ('homer', 'simpson');
|
--Drop ALL EXISTING TABLES
IF OBJECT_ID('dbo.Tijdlijn', 'U') IS NOT NULL
DROP TABLE dbo.Tijdlijn;
IF OBJECT_ID('dbo.Bericht', 'U') IS NOT NULL
DROP TABLE dbo.Bericht;
IF OBJECT_ID('dbo.ProductLeverancier', 'U') IS NOT NULL
DROP TABLE dbo.ProductLeverancier;
IF OBJECT_ID('dbo.Leverancier', 'U') IS NOT NULL
DROP... |
CREATE TABLE memos (
id integer,
content varchar(256)
);
INSERT INTO memos VALUES (1, 'PostgreSQL is a RDBMS.');
INSERT INTO memos VALUES (2, 'Groonga is fast full text search engine.');
INSERT INTO memos VALUES (3, 'PGroonga is a PostgreSQL extension that uses Groonga.');
CREATE INDEX grnindex ON memos
USING pg... |
DROP SCHEMA ${data_schema} CASCADE;
DROP SCHEMA ${project_schema} CASCADE;
DELETE FROM projects WHERE project_id = :project_id;
|
select
type || ' ' || name as resource,
case
when (arguments -> 'rule') is null then 'alarm'
when (arguments -> 'rule' -> 'lifecycle') is null then 'ok'
when (arguments -> 'rule' -> 'lifecycle' ->> 'delete_after')::int >=35 then 'ok'
else 'alarm'
end status,
name || case
when (arguments -> '... |
-- @testpoint: opengauss关键字Index非保留),作为索引名,部分测试点合理报错
--前置条件,创建一个表
drop table if exists explain_test;
create table explain_test(id int,name varchar(10));
--关键字不带引号-成功
drop index if exists Index;
create index Index on explain_test(id);
drop index Index;
--关键字带双引号-成功
drop index if exists "Index";
create index "Index" o... |
SELECT id, id_conductor as idConductor, id_cliente as idCliente, origen, destino, fecha_servicio as fechaServicio, valor, descripcion
FROM servicios; |
-- file:insert_conflict.sql ln:112 expect:true
insert into insertconflicttest values (4, 'Mango') on conflict (fruit, key) do update set fruit = excluded.fruit
|
INSERT INTO "ISL_I_GenerationAssets"
(region, dn, capex, instduration, maxlifetime, maxcap, rampspeed, runcostperunit, instdate, asset_name, epi, comtype, submodel, cap_ceiling, modelrun_id)
SELECT
region_val, dn_val, capex_val, instduration_val, maxlifetime_val, maxcap_val, rampspeed_val, runcostperunit_val,
inst... |
--Bat thong tin tra ve cua query
SET STATISTICS IO ON;
SET STATISTICS TIME ON;
USE AdventureWorks2017;
GO
select count(*) from dbo.bigProduct;
select count(*) from dbo.bigTransactionHistory;
--select co di kem cac ham tong hop COUNT/SUM/AVG
SELECT bp.Name AS ProductName,
COUNT(bth.ProductID),
SUM(bth.Quantity),
A... |
--
-- Copyright 2005-2019 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... |
-- input is table(test text, query text, run UInt32, version int, metrics Array(float))
select
arrayMap(x -> floor(x, 4), original_medians_array.medians_by_version[1] as l) l_rounded,
arrayMap(x -> floor(x, 4), original_medians_array.medians_by_version[2] as r) r_rounded,
arrayMap(x, y -> floor((y - x) / x, 3)... |
-- File generated by Mangos Online Translation Editor (MOTE) v2.10
SET NAMES 'utf8';
UPDATE `trans_words` SET `content_loc8`='Captain Sanders Chest' WHERE `word_id` = 114196; -- locales_gameobject - name : entry=38
UPDATE `trans_words` SET `content_loc8`='The Wine Cask' WHERE `word_id` = 114347; -- locales_gameobject -... |
select count(*) from `filter/pushdown/DRILL_6603_test_data` where str is null; |
-- 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... |
{% if scid and fnid %}
SELECT
pr.proname as name, '(' || COALESCE(pg_catalog
.pg_get_function_identity_arguments(pr.oid), '') || ')' as func_args,
nspname
FROM
pg_proc pr
JOIN
pg_type typ ON typ.oid=prorettype
JOIN
pg_namespace nsp ON nsp.oid=pr.pronamespace
WHERE
pr.prokind IN ('f', 'w')
... |
-- phpMyAdmin SQL Dump
-- version 4.6.6deb4
-- https://www.phpmyadmin.net/
--
-- Počítač: localhost:3306
-- Vytvořeno: Úte 03. dub 2018, 15:10
-- Verze serveru: 10.1.26-MariaDB-0+deb9u1
-- Verze PHP: 7.0.27-0+deb9u1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLI... |
-- phpMyAdmin SQL Dump
-- version 4.5.4.1deb2ubuntu1
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Jun 19, 2017 at 01:06 PM
-- Server version: 5.7.11-0ubuntu6
-- PHP Version: 7.0.4-7ubuntu2
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIE... |
--@Author: Darren Xie
--@Date 10/29/2017
/**@issue-fixed:
1. In the policy function, the return value of SYS_CONTEXT('USERENV', 'SESSION_USER') are all upper case, but (SYSTEM_USERNAME) will return different case value. So I changed it to this:
WHERE upper(SYSTEM_USERNAME) = upper(SYS_CONTEXT('USERENV', 'SESSION_USER')... |
-- --------------------------------------------------------
DROP TABLE IF EXISTS "#__secretary_accounting" CASCADE;
DROP TABLE IF EXISTS "#__secretary_accounts" CASCADE;
DROP TABLE IF EXISTS "#__secretary_accounts_system" CASCADE;
DROP TABLE IF EXISTS "#__secretary_activities" CASCADE;
DROP TABLE IF EXISTS "#__secret... |
--begin;
CREATE TABLE cms_user_id_table (
user_id serial NOT NULL PRIMARY KEY,
display_name text NOT NULL,
email text NOT NULL,
is_active boolean DEFAULT true NOT NULL,
date_created date DEFAULT CURRENT_TIMESTAMP NOT NULL
);
CREATE TABLE cms_status_table (
status_id serial NOT NULL PRIMARY KEY,
description te... |
-- //
--
-- Adiciona tipo_boletim em pmieducar.turma
-- @author Lucas D'Avila <lucasdavila@portabilis.com.br>
-- @license @@license@@
-- @version $Id$
ALTER TABLE pmieducar.turma ADD COLUMN tipo_boletim integer;
-- //@UNDO
ALTER TABLE pmieducar.turma DROP COLUMN tipo_boletim;
-- //
|
CREATE STREAM R(A int, B int)
FROM FILE 'examples/data/simple/r.dat' LINE DELIMITED
CSV ();
SELECT A+SUM(1) FROM R GROUP BY A,B
|
CREATE EXTENSION IF NOT EXISTS pgcrypto;
CREATE TABLE "public"."YouTubeUpload"("id" uuid NOT NULL DEFAULT gen_random_uuid(), "created_at" timestamptz NOT NULL DEFAULT now(), "updated_at" timestamptz NOT NULL DEFAULT now(), "videoId" text NOT NULL, "videoStatus" text NOT NULL, "videoTitle" text NOT NULL, "contentItemId"... |
alter table :GRAPHILE_WORKER_SCHEMA.jobs add column key text unique check(length(key) > 0);
alter table :GRAPHILE_WORKER_SCHEMA.jobs add locked_at timestamptz;
alter table :GRAPHILE_WORKER_SCHEMA.jobs add locked_by text;
-- update any in-flight jobs
update :GRAPHILE_WORKER_SCHEMA.jobs
set locked_at = q.locked_at, l... |
-- MySQL dump 10.13 Distrib 8.0.16, for macos10.14 (x86_64)
--
-- Host: localhost Database: local
-- ------------------------------------------------------
-- Server version 8.0.16
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
... |
set pagesize 120
set linesize 120
col name format a20
SELECT * FROM V$FLASH_RECOVERY_AREA_USAGE;
SELECT * FROM V$RECOVERY_FILE_DEST;
show parameter DB_RECOVERY_FILE_DEST ;
|
CREATE TEMPORARY TABLE `godbaccumtest` (
`id` INT UNSIGNED NOT NULL AUTO_INCREMENT,
`a` INT UNSIGNED NOT NULL,
`b` INT UNSIGNED NOT NULL,
PRIMARY KEY (`id`)
); |
CREATE OR REPLACE FUNCTION GetPhoneTypeId(text) RETURNS uuid LANGUAGE SQL AS $$ SELECT "Id" FROM "PhoneNumberType" WHERE "Code" = $1; $$;
CREATE OR REPLACE FUNCTION GetChargeTypeId(text) RETURNS uuid LANGUAGE SQL AS $$ SELECT "Id" FROM "ServiceChargeType" WHERE "Code" = $1; $$;
CREATE OR REPLACE FUNCTION GetChargeTy... |
use [master];
EXEC msdb.dbo.sp_delete_database_backuphistory @database_name = N'Test'
ALTER DATABASE [Test] SET SINGLE_USER WITH ROLLBACK IMMEDIATE;
DROP DATABASE [Test];
CREATE DATABASE [Test];
|
RENAME TABLE SYS_CFG TO SYS_CFG_PRE_V110 ;
CREATE TABLE SYS_CFG (CONFIG_DATA_ID BIGINT NOT NULL, CONFIG_DATA CLOB NOT NULL, CONFIG_COMMENTS VARCHAR(200) NOT NULL, SYS_CREATE_DT TIMESTAMP NOT NULL) ;
ALTER TABLE SYS_CFG ADD CONSTRAINT SYS_CFG_PK PRIMARY KEY(CONFIG_DATA_ID) ;
CREATE TABLE SYS_VARS (VAR_GROUP VARCHAR(25) ... |
-- MySQL dump 10.13 Distrib 5.7.12, for Linux (x86_64)
--
-- Host: localhost Database: sellutions_app
-- ------------------------------------------------------
-- Server version 5.7.12-0ubuntu1.1
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_S... |
/*
Uses:
How To Use:
Set the compression description @compressionDesc to the type of compression you would like to use.
Note - the script will change the compression type regardless of previous compression setting
How it Works
Builds up a table of all tables\index based o... |
CREATE PROCEDURE babel_701_sp (@a varbinary OUTPUT) AS
BEGIN
SET @a=0x121;
Select @a as a;
END;
GO
EXEC babel_701_sp 0x122
GO
DROP PROCEDURE babel_701_sp
GO
|
ALTER TABLE `products`
ADD FOREIGN KEY (`category_id`) REFERENCES `categories`(`id`); |
DROP TABLE IF EXISTS block_summary; |
ALTER TABLE views
ADD COLUMN revision integer NOT NULL DEFAULT 0; |
asodkoaksdok
asodkoaksdokasodo
oiajsdijaisjd
|
-- @testpoint: 当表参数为表oid时,表中任意一列有权限和没有权限时返回值校验
DROP USER IF EXISTS joe CASCADE;
CREATE USER joe PASSWORD 'Bigdata@123';
DROP table IF EXISTS table_test001;
create table table_test001(c int,d int);
GRANT select (c),update (d) ON table_test001 TO joe;
select has_any_column_privilege('joe', oid,'select') from PG_CLASS wh... |
CREATE OR REPLACE FUNCTION layer_contour(bbox geometry, zoom_level int)
RETURNS TABLE(geometry geometry, ele int) AS $$
SELECT geometry, ele
FROM osm_contour
WHERE geometry && bbox;
$$ LANGUAGE SQL IMMUTABLE;
|
/********************************************************************************
file-centric-snapshot-ch-de-translated-concepts.sql
Assertion:
Newly added active concept has one active preferred term in the Swiss German language refset.
***********************************************************************... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.