text
stringlengths
1
1.05M
ALTER TABLE "as".as_languages RENAME TO as_locale_languages; ALTER TABLE "as"."as_locale_languages" DROP CONSTRAINT "as_languages_pkey" CASCADE; --$ scan_tables locale t --$ scan_tables lang t --$ scan_tables user t --$ scan_tables template t INSERT INTO as_locale_domains_list (locale_domain_id, loc...
CREATE TABLE `elemento` ( `id` bigint(20) NOT NULL AUTO_INCREMENT, `artefatofk` varchar(255) DEFAULT NULL, `decimais` bigint(20) DEFAULT NULL, `dica` varchar(255) DEFAULT NULL, `inicial` varchar(255) DEFAULT NULL, `label_prop` varchar(255) DEFAULT NULL, `mascara` varchar(255) DEFAULT NULL, `nome` varcha...
DROP TABLE IF EXISTS fareDayEnd; CREATE TABLE fareDayEnd( `id` int(11) NOT NULL AUTO_INCREMENT, `nocCode` varchar(255) NOT NULL, `time` char(4) NOT NULL, INDEX idx_nocCode (nocCode), PRIMARY KEY (`id`) ) ENGINE = InnoDB CHARACTER SET = utf8;
2 16 0 0 0 0 13 8 0 0 0 0 14 8 0 0 0 13 13 13 0 0 0 13 14 13 0 0 0 8 13 13 0 0 0 8 14 13 0 0 0 9 0 9 0 0 1 0 0 8 0 0 10 2 1 1 0 0 13 1 1 1 0 0 13 1 8 1 0 0 13 10 1 1 0 0 14 1 0 8 0 0 8 0 1 10 0 0 8 3 0 9 0 0 9 14 0 14 0 0 9 9 0 14 0 1 0 0 0 1 0 13 10 2 1 1 0 13 10 2 8 1 0 2 0 0 2 2 0 2 0 0 3 2 0 3 1 0 0 3 0 3 3 0 0 0 0...
-- Dropping already existing Materialized View 2/3 DROP MATERIALIZED VIEW IF EXISTS time_view
-- Requête pour importer le CBN dans le PDC select mrw.workcenter_id as workcenter_id, pt.is_mold_id as mold_id, pt.is_couleur as matiere, sum(mp.quantity) as quantite, sum(mp.quantity*mrw.is_nb_secondes...
insert into author (age, name, genre, best_selling, id) values (23, "Mark Janel", "Anthology", "No", 1); insert into author (age, name, genre, best_selling, id) values (43, "Olivia Goy", "Horror", "No", 2); insert into author (age, name, genre, best_selling, id) values (51, "Quartis Young", "Anthology", "Yes", 3); inse...
-- -------------------------------------------------------- -- Servidor: 127.0.0.1 -- Versão do servidor: 10.4.11-MariaDB - mariadb.org binary distribution -- OS do Servidor: Win64 -- HeidiSQL Versão: 10.2.0.5599 -- -----------------------------------------------...
-- OFFENDER_EXCLUDE_ACTS_SCHDS (record of offenders being excluded from scheduled activities) INSERT INTO OFFENDER_EXCLUDE_ACTS_SCHDS (OFFENDER_EXCLUDE_ACT_SCHD_ID, OFFENDER_BOOK_ID, OFF_PRGREF_ID, CRS_ACTY_ID, EXCLUDE_DAY, SLOT_CATEGORY_CODE) VALUES (-1, -4, -7, -4, 'FRI', null); INSERT INTO OFFENDER_EXCLUDE_ACTS_SCHD...
USE empDB1; INSERT INTO department (name) VALUES ('Sales'), ('Legal'), ('Engineering'); INSERT INTO roles (title, salary, department_id) VALUES ('Sales Lead', '100000.00', 1), ('Salesperson', '32000.00', 1), ('Legal Team Lead', '120000.00', 2), ('Lawyer', '100000.00', 2), ('Senior Engineer', '110000...
-- package specification create or replace package content_type AUTHID CURRENT_USER as --/** This package is used to manipulate content types and attributes -- --*/ procedure create_type ( --/** Create a new content type. Automatically create the attribute table -- for the type if the table does not alread...
insert into user(id, user_name, real_name, phone, age) values (1, 'feng', 'feng', '123', 11); INSERT INTO `area`(id, pid, short_name, name, merger_name, level, pin_yin, code, zip_code, first, lng, lat) values ('1', '0', '北京', '北京', '中国,北京', '1', 'beijing', '', '', 'B', '116.405285', '39.904989'), ('2', '1', '北京...
CREATE TABLE accounts ( id serial NOT NULL, created_at timestamp without time zone DEFAULT now() NOT NULL, updated_at timestamp without time zone DEFAULT now() NOT NULL, username character varying(254) NOT NULL, password character (60) NOT NULL, email character varying(254) NOT NULL, activat...
-- phpMyAdmin SQL Dump -- version 5.0.1 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Nov 27, 2021 at 12:46 PM -- Server version: 10.4.11-MariaDB -- PHP Version: 7.4.3 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD...
SELECT fn_db_delete_config_value_all_versions('OvsSupported');
SELECT *, ( SELECT array_agg(project_id) FROM ds_jobs.job_projects WHERE db_id = jobs.db_id ) AS projects FROM ds_jobs.jobs LEFT JOIN ds_jobs.job_messages USING (db_id) LEFT JOIN ds_jobs.job_irods_id USING (db_id) WHERE job_id = ? ;
-- randexpr1.test -- -- db eval {SELECT -~a+d-case d when -(select max(d)*~min(coalesce((select max(t1.e) from t1 where (exists(select 1 from t1 where 17<>13))),t1.a)-f-a+t1.f) | case (cast(avg(t1.c) AS integer)) when cast(avg(t1.a) AS integer)-(count(*))+max(19) then - -max(19) else cast(avg(e) AS integer) end fro...
declare l_dgrm_content clob; begin l_dgrm_content := apex_string.join_clob( apex_t_varchar2( q'[<?xml version='1.0' encoding='UTF-8'?>]' ,q'[<bpmn:definitions xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xmlns:bpmn='http://www.omg.org/spec/BPMN/20100524/MODEL' xmlns:bpmndi='http://www...
-- phpMyAdmin SQL Dump -- version 4.9.5deb2 -- https://www.phpmyadmin.net/ -- -- Host: localhost -- Generation Time: Mar 16, 2021 at 07:53 PM -- Server version: 10.5.9-MariaDB-1:10.5.9+maria~focal -- PHP Version: 7.4.3 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:...
/* 三角数の数列は自然数の和で表わされ, 7番目の三角数は 1 + 2 + 3 + 4 + 5 + 6 + 7 = 28 である. 三角数の最初の10項は: 1, 3, 6, 10, 15, 21, 28, 36, 45, 55, ... となる. 最初の7項について, その約数を列挙すると, 以下のとおり. 1: 1 3: 1,3 6: 1,2,3,6 10: 1,2,5,10 15: 1,3,5,15 21: 1,3,7,21 28: 1,2,4,7,14,28 これから, 7番目の三角数である28は, 6個以上の約数をもつ最初の三角数であることが分かる. では, 500個以上の約数をもつ最初の三角数はいくつか. htt...
ALTER TABLE DOKUMENT ADD COLUMN BLOB TEXT; ALTER TABLE DOKUMENT DROP COLUMN TEXT; COMMENT ON COLUMN DOKUMENT.BLOB IS 'Innkommende dokument blob';
-- phpMyAdmin SQL Dump -- version 5.0.3 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: May 08, 2021 at 09:25 AM -- Server version: 10.4.14-MariaDB -- PHP Version: 7.4.11 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIE...
# --- Created by Ebean DDL # To stop Ebean DDL generation, remove this comment and start using Evolutions # --- !Ups create table assignments ( id bigint not null, name varchar(255), language_name varchar(255), description varchar(255)...
#standardSQL CREATE TEMPORARY FUNCTION getCalcConstants(css STRING) RETURNS ARRAY<STRING> LANGUAGE js OPTIONS (library = "gs://httparchive/lib/css-utils.js") AS ''' try { function compute(ast) { let ret = { total: 0, properties: {}, units: {}, number_of_different_units: {}, operators...
select p.project_id, round(avg(e.experience_years),2) as average_years from Project p left join Employee e using(employee_id) group by p.project_id;
-- Deploy insert_flip -- requires: flips -- requires: appschema -- requires: users BEGIN; CREATE OR REPLACE FUNCTION flipr.insert_flip( nickname TEXT, body TEXT ) RETURNS BIGINT LANGUAGE sql SECURITY DEFINER AS $$ INSERT INTO flipr.flips (nickname, body) VALUES ($1, $2) RETURNING id; $$; COMMIT...
-- insert into @resultSchema.score_log_cdm select c1.check_id ,s1.tb_id ,c1.stratum1 ,c1.stratum2 ,c1.stratum3 ,c1.stratum4 ,c1.stratum5 ,c1.err_no from (select 'C87' as check_id ,'condition_era' as stratum1 ,'condition_era_start_date' as stratum2 ,'condition_era_start_date > condition_era_end_date' as stratum3 ,null...
PROC $sc_$cpu_hs_eventmon ;******************************************************************************* ; Test Name: hs_eventmon ; Test Level: Build Verification ; Test Type: Functional ; ; Test Description ; This test verifies that the CFS Health and Safety (HS) Event Monitoring ; commands function p...
create table ACT_GE_PROPERTY ( NAME_ nvarchar(64), VALUE_ nvarchar(300), REV_ int, primary key (NAME_) ); create table ACT_GE_BYTEARRAY ( ID_ nvarchar(64), REV_ int, NAME_ nvarchar(255), DEPLOYMENT_ID_ nvarchar(64), BYTES_ varbinary(max), GENERATED_ tinyint, primary key (ID...
# Address schema # # --- !Ups CREATE TABLE "public"."address" ( "id" serial8 NOT NULL, "customer_id" int8 NOT NULL, "street" varchar(50) NOT NULL, "neighborhood" varchar(30) NOT NULL, "city" varchar(15) NOT NULL, "state" varchar(2) NOT NULL, "cep" varchar(8) NOT NULL, PRIMARY KEY ("id"), CONSTRAINT "customer_fk" FOR...
\set ECHO all /* Register alerts */ SELECT dbms_alert.register('a1'); SELECT dbms_alert.register('a2'); SELECT dbms_alert.register('tds'); /* Test: multisession waitone */ SELECT dbms_alert.waitone('a1',20); /* Test: multisession waitany */ SELECT dbms_alert.waitany(10); /* Test defered_signal */ /* This indicated ...
INSERT INTO `banco` (`id_banco`, `cod_banco`, `nombre_banco`) VALUES (NULL, '12', 'asdasd');
-- Migrationscripts for ebean unittest -- apply changes create table migtest_e_ref ( id integer generated by default as identity (start with 1) not null, name varchar(127) not null, constraint uq_migtest_e_ref_name unique (name), constraint pk_migtest_e_ref p...
create table transactions ( hash varchar(66), nonce bigint, transaction_index bigint, from_address varchar(42), to_address varchar(42), value numeric(38), gas bigint, gas_price bigint, input text, receipt_cumulative_gas_used bigint, receipt_gas_used bigint, receipt_contra...
DROP TABLE IF EXISTS `ci_sessions`; CREATE TABLE `ci_sessions` ( `id` varchar(128) NOT NULL, `ip_address` varchar(45) NOT NULL, `timestamp` int(10) UNSIGNED DEFAULT 0 NOT NULL, `data` blob NOT NULL, PRIMARY KEY (`id`), KEY `ci_sessions_timestamp` (`timestamp`) ); DROP TABLE IF EXISTS `users`; C...
-- Create an application, given user details arg_displayname and arg_email -- A user will be created first if he doesn't already exist -- An applicant will be created first if he doesn't already exist -- This function is idempotent, making it safe to repeatedly call it on the same user DROP FUNCTION IF EXISTS app.idemp...
DROP TABLE IF EXISTS city_table; CREATE TABLE city_table( id SERIAL PRIMARY KEY, city_name VARCHAR(255) );
USE [FriendlyFisherman] GO ALTER TABLE [dbo].[AspNetUsers] ADD FirstName nvarchar(256) NULL; GO ALTER TABLE [dbo].[AspNetUsers] ADD LastName nvarchar(256) NULL; GO
CREATE PROCEDURE sprockit_PrepareNewBatch.[test WHEN run THEN _internal_ManageLogs called once] AS -- ARRANGE DECLARE @processGroup INT = 1 EXEC tSQLt.SpyProcedure 'sprockit._internal_ManageLogs' DECLARE @expectedCalls INT = 1; DECLARE @actualCalls INT = 0; -- ACT EXEC sprockit.PrepareNewBatch @processGroup = @...
SET @iFirstColumn = (SELECT COUNT(*) FROM `sys_page_compose` WHERE `Page` = 'bx_avatar_main' AND `Column` = 1); UPDATE `sys_page_compose` SET `Column` = `Column` - 1 WHERE `Page` = 'bx_avatar_main' AND `Column` != 0 AND @iFirstColumn = 0;
DROP VIEW IF EXISTS vetd.top_products_by_group;
CREATE TABLE IF NOT EXISTS "__EFMigrationsHistory" ( "MigrationId" character varying(150) NOT NULL, "ProductVersion" character varying(32) NOT NULL, CONSTRAINT "PK___EFMigrationsHistory" PRIMARY KEY ("MigrationId") ); START TRANSACTION; DO $EF$ BEGIN IF NOT EXISTS(SELECT 1 FROM "__EFMigratio...
SELECT *, (CASE when pre_coll_inherits is NULL then ARRAY[]::varchar[] else pre_coll_inherits END) as coll_inherits FROM ( SELECT rel.oid, rel.relname AS name, rel.reltablespace AS spcoid,rel.relacl AS relacl_str, (CASE WHEN length(spc.spcname::text) > 0 THEN spc.spcname ELSE (SELECT sp.spcname FROM pg_database ...
2 14 0 0 0 0 12 4 0 0 0 0 13 4 0 0 0 0 5 4 0 0 0 12 0 6 0 0 0 13 1 1 0 0 0 4 1 1 0 0 0 4 13 13 0 0 0 4 6 13 0 0 0 5 13 13 0 0 0 5 6 13 0 0 0 6 0 1 0 0 1 0 0 12 0 0 1 4 5 5 0 0 1 8 12 5 0 0 12 0 0 8 0 0 13 1 6 8 0 0 13 1 8 6 0 0 13 4 0 8 0 0 13 4 8 6 0 0 2 0 0 12 0 0 5 2 1 1 0 0 6 1 0 8 0 0 6 8 0 0 0 1 4 2 1 2 0 11 0 0 ...
CREATE EXTENSION IF NOT EXISTS "uuid-ossp"; CREATE TABLE IF NOT EXISTS "application" ( "id" uuid PRIMARY KEY DEFAULT (uuid_generate_v4()), "body" varchar, "created_at" timestamp DEFAULT (now()), "updated_at" timestamp DEFAULT (now()) );
/* Navicat MySQL Data Transfer Source Server : 10.69.58.195 Source Server Type : MySQL Source Server Version : 50718 Source Host : 10.69.58.195 Source Database : doraemon_nirvana Target Server Type : MySQL Target Server Version : 50718 File Encoding : utf-8 Date: 02/27...
-- MySQL dump 10.13 Distrib 5.7.12, for osx10.9 (x86_64) -- -- Host: localhost Database: MeetHubDatabase -- ------------------------------------------------------ -- Server version 5.7.15 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESUL...
/* utPLSQL - Version 3 Copyright 2016 - 2021 utPLSQL Project 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 applica...
/* Find all wineries which produce wines by possessing aromas of plum, cherry, rose, or hazelnut https://platform.stratascratch.com/coding/10026-find-all-wineries-which-produce-wines-by-possessing-aromas-of-plum-cherry-rose-or-hazelnut?python= Difficulty: Easy Find all wineries which produce wines by possessing arom...
---------------------------- -- Copyright (C) 2021 CARTO ---------------------------- CREATE OR REPLACE FUNCTION `@@BQ_PREFIX@@carto.__DESTINATION` (geojsonStart STRING, distance FLOAT64, bearing FLOAT64, units STRING) RETURNS STRING DETERMINISTIC LANGUAGE js OPTIONS (library=["@@BQ_LIBRARY_BUCKET@@"]) AS """ if (...
CREATE TABLE list (id VARCHAR(2) NOT NULL, value VARCHAR(64) NOT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDB; INSERT INTO `list` (`id`, `value`) VALUES ('am', 'ಅಂಹರಿಕ್'); INSERT INTO `list` (`id`, `value`) VALUES ('am_ET', 'ಅಂಹರಿಕ್ (ಇಥಿಯೋಪಿಯಾ)'); INSERT INTO `list` (`id`, ...
ALTER TABLE "public"."addresses" DROP COLUMN "unconfidential";
INSERT INTO tasks (id, from_platform, task_type, name, description, external_url, config) VALUES -- TASKS -- NUMBERS GAME (digit span) ( NULL, "PSHARPLAB", "NAB", "Numbers Game", "The participant reads a sequence of numbers and enters them in the same or reverse order", "", '{ "conf...
-- -- Test access privileges -- -- Clean up in case a prior regression run failed -- Suppress NOTICE messages when users/groups don't exist SET client_min_messages TO 'warning'; DROP ROLE IF EXISTS regress_priv_group1; DROP ROLE IF EXISTS regress_priv_group2; DROP ROLE IF EXISTS regress_priv_user1; DROP ROLE IF EXI...
USE Minions ALTER TABLE Users DROP CONSTRAINT PK_Users ALTER TABLE Users ADD CONSTRAINT PK_Users PRIMARY KEY(Id, UserName)
ALTER TABLE `#__finder_links` MODIFY `description` text;
alter table media add (created_date timestamp); alter table media add (last_modified_date timestamp); update media set created_date = CURRENT_TIMESTAMP(), last_modified_date = CURRENT_TIMESTAMP(); alter table media alter column created_date set not null; alter table media alter column last_m...
DROP TABLE IF EXISTS nation; DROP TABLE IF EXISTS region; DROP TABLE IF EXISTS part; DROP TABLE IF EXISTS supplier; DROP TABLE IF EXISTS partsupp; DROP TABLE IF EXISTS orders; DROP TABLE IF EXISTS customer; DROP TABLE IF EXISTS lineitem; /* schema provided by robbie from MemSQL */ CREATE TABLE `customer` ( `c_custk...
create table persons(reg_id integer, member person_type) CREATE TABLE [dbo].[users]( [Name] [varchar](50) NULL, [UserName] [varchar](50) NULL, [UserId] [int] IDENTITY(1,1) NOT NULL) create table persons(reg_id integer, member person_type) INSERT INTO PROCEDURETEST VALUES ('||test1||','''||test2||''') create table users...
DROP DATABASE IF EXISTS rusch; CREATE DATABASE rusch; USE rusch; CREATE TABLE articles ( id INT NOT NULL AUTO_INCREMENT, section varchar(64), title varchar(128), date varchar(64), client varchar(128), place varchar(128), type varchar(256), headerImage varchar(256), shortDescription varchar(1024), ...
alter table ACT_RE_PROCDEF add column ENGINE_VERSION_ varchar(255); update ACT_RE_PROCDEF set ENGINE_VERSION_ = 'activiti-5'; alter table ACT_RE_DEPLOYMENT add column ENGINE_VERSION_ varchar(255); update ACT_RE_DEPLOYMENT set ENGINE_VERSION_ = 'activiti-5'; alter table ACT_RU_EXECUTION add column ROOT_PROC_INST_ID_ v...
SELECT DISTINCT city FROM station WHERE city REGEXP '^[^aeiou].*[^aeiou]$';
Solution to [Print Prime Numbers](https://www.hackerrank.com/challenges/print-prime-numbers/problem)
CREATE TABLE example();
-- phpMyAdmin SQL Dump -- version 5.1.1 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Feb 11, 2022 at 09:39 PM -- Server version: 10.4.22-MariaDB -- PHP Version: 8.1.2 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIEN...
CREATE SCHEMA [BUILTIN\Administrators] AUTHORIZATION [BUILTIN\Administrators];
DROP DATABASE IF EXISTS sharing_db; CREATE DATABASE sharing_db;
ALTER TABLE invitation ADD COLUMN token CHAR (36);
/* ******************************************************************************************************* Copyright (C) 2019-Present Pivotal Software, Inc. All rights reserved. This program and the accompanying materials are made available under the terms of the under the Apache License, Version 2.0 (the "License"); y...
-- MySQL dump 10.13 Distrib 8.0.22, for Linux (x86_64) -- -- Host: localhost Database: sara -- ------------------------------------------------------ -- Server version 8.0.22-0ubuntu0.20.10.2 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_R...
-- MariaDB dump 10.19 Distrib 10.5.9-MariaDB, for Linux (x86_64) -- -- Host: localhost Database: melon -- ------------------------------------------------------ -- Server version 10.5.9-MariaDB /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET...
-- ST_SnapToGrid SELECT 'T1.1', ST_AsEWKT(ST_SnapToGrid('POINT EMPTY', 1)); SELECT 'T1.2', ST_AsEWKT(ST_SnapToGrid('LINESTRING EMPTY', 1)); SELECT 'T1.3', ST_AsEWKT(ST_SnapToGrid('SRID=4326;POLYGON EMPTY', 1)); -- ST_Buffer SELECT 'T2.1', ST_AsEWKT(ST_Buffer('SRID=4326;POINT EMPTY', 0)); SELECT 'T2.2', ST_AsEWKT(ST_Bu...
-- @testpoint:openGauss关键字variable(非保留),同时作为表名和列名带引号,并进行dml操作,variable列的值最终显示为1000 drop table if exists "variable"; create table "variable"( c_id int, c_int int, c_integer integer, c_bool int, c_boolean int, c_bigint integer, c_real real, c_double real, c_decimal decimal(38), c_number number(38), c_numeric numeric...
CREATE TABLE IF NOT EXISTS PLANE_TYPE ( id INTEGER PRIMARY KEY, iata_code TEXT, type TEXT );
IF OBJECT_ID('tempdb..#Private_GetAssemblyKeyBytes') IS NOT NULL DROP PROCEDURE #Private_GetAssemblyKeyBytes; GO CREATE PROCEDURE #Private_GetAssemblyKeyBytes @AssemblyKeyBytes VARBINARY(MAX) = NULL OUTPUT, @AssemblyKeyThumbPrint VARBINARY(MAX) = NULL OUTPUT AS SELECT @AssemblyKeyBytes = 0x4D5A90000300000004000...
/* URI 2620 - Pedidos no Primeiro Semestre https://www.urionlinejudge.com.br/judge/pt/problems/view/2620 */ SELECT cst.name, ord.id FROM customers cst INNER JOIN orders ord ON ord.id_customers = cst.id WHERE ord.orders_date BETWEEN '2016-01-01' AND '2016-06-30';
-- boundary1.test -- -- db eval { -- SELECT a FROM t1 WHERE rowid < 9223372036854775807 ORDER BY x -- } SELECT a FROM t1 WHERE rowid < 9223372036854775807 ORDER BY x
-- #10 Instruction SELECT using Search Case -- Sorting tickets by fare SELECT TicketId, Class, Fare, CASE WHEN Fare < 10 THEN 'Inexpensive' WHEN Fare < 50 THEN 'Fair' WHEN Fare < 100 THEN 'Expensive' ELSE 'Very Expensive' END AS Price FROM T ORDER BY Class
-- -- insert with DEFAULT in the target_list -- CREATE TABLE inserttest ( col1 int4, col2 int4 NOT NULL, col3 text DEFAULT 'testing' ); INSERT INTO inserttest (col1, col2, col3) VALUES (DEFAULT, DEFAULT, DEFAULT); INSERT INTO inserttest (col2, col3) VALUES (3, DEFAULT); INSERT INTO inserttest (c...
-- USE test; INSERT INTO city (name, state, country) VALUES ('San Francisco', 'CA', 'US');
SELECT dt, dt2, row_number() over(partition by round(dt),dt2 order by ceil(dt) asc nulls last ROWS BETWEEN 1 PRECEDING AND CURRENT ROW) FROM sum_example;
CREATE TABLE users ( id INTEGER PRIMARY KEY, eid TEXT UNIQUE, cryptedPassword TEXT, salt TEXT, firstName TEXT, lastName TEXT, lastName TEXT, email TEXT );
DROP DATABASE IF EXISTS employees_DB; CREATE DATABASE employees_DB; USE employees_DB; CREATE TABLE department ( id INT AUTO_INCREMENT PRIMARY KEY, name VARCHAR (30) UNIQUE NOT NULL, ); CREATE TABLE role ( id INT UNSIGNED AUTO_INCREMENT NOT NULL PRIMARY KEY, title VARCHAR ...
-- 更新模块数据库版本 update ${_prefix}sys_module set current_version = '4.0.xx' where module_code = 'core'; commit;
CREATE TABLESPACE sedcprod OWNER postgres LOCATION '/var/lib/pgsql/9.6/data/pg_tblspc/SedcProdTablespace'; CREATE TABLESPACE sedcuat OWNER postgres LOCATION '/var/lib/pgsql/9.6/data/pg_tblspc/SedcUatTablespace'; CREATE DATABASE "sedcp1" WITH OWNER = postgres ENCODING = 'UTF8' TEMPLATE = 'template0' TABLESPACE = sedcpr...
alter table "public"."demux_state" alter column "block_number" drop not null; alter table "public"."demux_state" add column "block_number" varchar;
-- @testpoint: 建表后,使用alter增加联合唯一约束 -- @modify at: 2020-11-23 --建表 drop table if exists test_unique_constraint015; create table test_unique_constraint015 (id_p int not null, lastname varchar(255) not null, firstname varchar(255), address varchar(255), city varchar(255)); --增加单列约束 alter table test_unique_constraint015 ad...
/*This module reads in the ip base table, determines which users have changed IPs significantly over a certain time period and returns a table with risk scores. The final risk score is represented by the percentile to which claimant belongs in terms of a score that weights (1) The number of unique 24-bit ips a claima...
INSERT INTO maps SELECT id, internalMapName, mapName, MinLvl, MaxLvl, MaxPlayers FROM dbc.dbc0_map;
/* Navicat Premium Data Transfer Source Server : localpg Source Server Type : PostgreSQL Source Server Version : 140002 Source Host : localhost:5432 Source Catalog : my_blog_db Source Schema : public Target Server Type : PostgreSQL Target Server Version : 140002 File E...
DROP TABLE IF EXISTS pet_hobby;
INSERT INTO vets (ID, FIRST_NAME, LAST_NAME) VALUES (1, 'James', 'Carter'); INSERT INTO vets (ID, FIRST_NAME, LAST_NAME) VALUES (2, 'Helen', 'Leary'); INSERT INTO vets (ID, FIRST_NAME, LAST_NAME) VALUES (3, 'Linda', 'Douglas'); INSERT INTO vets (ID, FIRST_NAME, LAST_NAME) VALUES (4, 'Rafael', 'Ortega'); INSERT INTO vet...
-- Copyright 2018 Tanel Poder. All rights reserved. More info at http://tanelpoder.com -- Licensed under the Apache License, Version 2.0. See LICENSE.txt for terms & conditions. SET LINESIZE 999 PAGESIZE 5000 TRIMOUT ON TRIMSPOOL ON COL accessed_table HEAD Accessed_Table FOR a40 COL aindex_operation HEAD Plan_O...
SELECT * FROM `bigquery-public-data.covid19_nyt.mask_use_by_county` ORDER BY county_fips_code --- Queried from this public Google BigQuery Dataset published by New York Times --- https://github.com/nytimes/covid-19-data --- Link to Google BigQuery market listing: --- https://console.cloud.google.com/marketplace/produc...
CREATE DATABASE IF NOT EXISTS `mysql` /*!40100 DEFAULT CHARACTER SET utf8 */; USE `mysql`; -- MySQL dump 10.13 Distrib 5.5.16, for Win32 (x86) -- -- Host: localhost Database: mysql -- ------------------------------------------------------ -- Server version 5.5.27 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER...
-- // CB-3003 S3Guard DynamoDB table cleanup -- Migration SQL that makes the change goes here. ALTER TABLE environment_parameters ADD COLUMN IF NOT EXISTS s3guard_dynamo_table_creation varchar(20); UPDATE environment_parameters SET s3guard_dynamo_table_creation = 'USE_EXISTING'; -- //@UNDO -- SQL to undo the...
{{ config( materialized= var("snowplow__incremental_materialization", 'snowplow_incremental'), upsert_date_key='start_tstamp', unique_key = 'play_id', sort = 'start_tstamp', dist = 'play_id', tags=["derived"] ) }} select * from {{ ref('snowplow_media_player_base_this_run') }} where {{ sno...
-- file:numeric_big.sql ln:54 expect:true INSERT INTO num_exp_mul VALUES (0,4,'0')
ALTER TABLE payment.customer DROP CONSTRAINT IF EXISTS "customer_old_id_key";
-- phpMyAdmin SQL Dump -- version 5.1.0 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Jun 08, 2021 at 04:40 PM -- Server version: 10.4.18-MariaDB -- PHP Version: 7.4.16 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIE...