text stringlengths 1 1.05M |
|---|
-- Danske
INSERT INTO config_table(config_name, config_value, aspsp_id) VALUES ('ENDPOINT_OAUTH2', 'https://sandbox-obp-api.danskebank.com/sandbox-open-banking/private/oauth2/token', 'danske');
INSERT INTO config_table(config_name, config_value, aspsp_id) VALUES ('ENDPOINT_DOMESTIC_CONSENT', 'https://sandbox-obp-api.da... |
DROP TABLE POSSIBLE_ANSWER; |
ALTER TYPE building_type ADD VALUE 'present_a';
ALTER TYPE building_type ADD VALUE 'present_b';
ALTER TYPE task_type ADD VALUE 'collect_reward';
-- If you must use another version of pg than paddlers main, then it might not be possible to run above code in a transaction.
-- This is an example for the be a workaround t... |
/*
Navicat MySQL Data Transfer
Source Server : 10.36.33.60
Source Server Version : 50725
Source Host : localhost:3306
Source Database : kongx_for_java
Target Server Type : MYSQL
Target Server Version : 50725
File Encoding : 65001
Date: 2020-10-12 12:00:11
*/
SET FOREIGN_KEY_CHECKS... |
CREATE TABLE IF NOT EXISTS cargo (
id BIGSERIAL NOT NULL PRIMARY KEY,
cid text NOT NULL UNIQUE,
account text NOT NULL,
timestamp INTEGER NOT NULL DEFAULT EXTRACT(EPOCH FROM NOW()),
mkarr text[] NOT NULL,
mkroot text NOT NULL DEFAULT '0',
blockn... |
Modification de données
On va utiliser la commande UPDATE pour modifier des données déjà enregistrée.
UPDATE nom_table
SET col1 = val1 [, col2 = val2, ...]
[WHERE ...];
Attention à bien préciser la clause WHERE qui permet de localiser la ligne dans laquelle vous voulez modifier une valeur. Sans elle, toutes les lignes... |
--
-- PostgreSQL database cluster dump
--
SET default_transaction_read_only = off;
SET client_encoding = 'UTF8';
SET standard_conforming_strings = on;
--
-- Drop databases
--
DROP DATABASE gerpro_dev;
--
-- Drop roles
--
DROP ROLE postgres;
--
-- Roles
--
CREATE ROLE postgres;
... |
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].Contacts(
[Id] [int] NOT NULL,
[Name] [nvarchar](255)
CONSTRAINT [PK_Contacts] PRIMARY KEY CLUSTERED
(
[Id] ASC
) WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
)... |
-- phpMyAdmin SQL Dump
-- version 5.1.0
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Generation Time: Jun 02, 2021 at 07:22 PM
-- Server version: 10.4.18-MariaDB
-- PHP Version: 7.4.18
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIE... |
select t1."user_id", t1."auth_token", t2."username"
from "t_auth_token" as t1 join "t_user" as t2 on t1."user_id" = t2."id"
order by 3, 1, 2;
|
-- start_ignore
SET gp_create_table_random_default_distribution=off;
-- end_ignore
alter table pg2_co_table_for_alter_a0 set tablespace pg2_co_ts2_a0;
|
--
-- Star Schema Design
--
CREATE DATABASE dwm_exp2_star;
CREATE TABLE `sales` (
time_id INT,
item_id INT,
location_id INT,
branch_id INT,
sale_id INT PRIMARY KEY AUTO_INCREMENT,
total_items_sold INT,
total_sale_amt INT,
total_discount INT,
CONSTRAINT FK_SalesTime FO... |
--needs column/column filter, left join
-- CREATE VIEW replying_comments_for_count AS \
-- '"SELECT read_ribbons.user_id, read_ribbons.story_id, comments.id \
-- FROM read_ribbons \
-- JOIN stories ON (read_ribbons.story_id = stories.id) \
-- JOIN comments ON (read_ribbons.story_id = comments.story_id) \
-- LEFT J... |
INSERT INTO met_column VALUES('1','关于我们','about','','0','0','1','0','0','0','1','','','','','1','0','1','','2','0','','','0','cn','','0','0');
INSERT INTO met_column VALUES('2','新闻资讯','news','','0','0','2','1','0','0','1','','','','','0','','1','','0','0','','','1','cn','','0','0');
INSERT INTO met_column VALUES('3','产... |
DROP TABLE phone_calls
|
CREATE DATABASE numismatics;
CREATE TABLE table1 (att_double DOUBLE PRIMARY KEY); |
Replace into template_master (template_id, template_name, template, updated_by, created_by, updated_date, template_type_id) VALUES
('02fb1cb5-138c-11eb-9b1e-f48e38ab9348', 'jws-welcome', '<div>
<h1>Welcome to <@resourceBundleWithDefault "projectName" "JQuiver"/></h1>
<#if loggedInUser == true >
Welcome ${userN... |
DROP DATABASE IF EXISTS hr_db;
CREATE DATABASE hr_db;
USE hr_db;
CREATE TABLE departments(
id INT AUTO_INCREMENT PRIMARY KEY,
name VARCHAR(30) NOT NULL UNIQUE
);
CREATE TABLE jobroles(
id INT AUTO_INCREMENT PRIMARY KEY,
title VARCHAR(30),
salary DECIMAL(10,2),
department_id INT,
FOREIGN KE... |
DELETE FROM {{schema | sqlsafe}}.reporting_gcp_compute_summary_by_project_p
WHERE usage_start >= {{start_date}}::date
AND usage_start <= {{end_date}}::date
AND source_uuid = {{source_uuid}}
AND invoice_month = {{invoice_month}}
;
INSERT INTO {{schema | sqlsafe}}.reporting_gcp_compute_summary_by_project_p (... |
version https://git-lfs.github.com/spec/v1
oid sha256:06405bf930b71ea60ddd74d6f00be9f7c05c12dd98218e5ae431565ae29cbb6e
size 2199
|
# Host: localhost (Version 5.5.5-10.1.38-MariaDB)
# Date: 2019-05-06 21:00:38
# Generator: MySQL-Front 6.1 (Build 1.26)
#
# Structure for table "ap_absensi"
#
DROP TABLE IF EXISTS `ap_absensi`;
CREATE TABLE `ap_absensi` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`agenda_id` int(11) DEFAULT NULL,
`code` varchar... |
-- TO CREATE/POPULATE DATABASE, GO TO ROOT PROJECT FOLDER
-- dropdb ling; createdb ling; psql ling -af create.sql
-- psql ling -af load.sql
CREATE TABLE Authors
(name VARCHAR(256) NOT NULL,
-- birthdate INTEGER CHECK(birthdate < date_part('year', current_date)),
PRIMARY KEY(name));
CREATE TABLE Books
(uid INTEGER N... |
SELECT password,mail,user_id FROM public."User" WHERE user_id=/* user.getUserId() */'U1'; |
-- original: corrupt8.test
-- credit: http://www.sqlite.org/src/tree?ci=trunk&name=test
PRAGMA auto_vacuum=1;
PRAGMA page_size=1024;
CREATE TABLE t1(x);
INSERT INTO t1(x) VALUES(1);
INSERT INTO t1(x) VALUES(2);
INSERT INTO t1(x) SELECT x+2 FROM t1;
INSERT INTO t1(x) SELECT x+4 FROM t1;
IN... |
-- file:tstypes.sql ln:104 expect:true
SELECT 'supeznova supernova'::tsvector @@ 'super'::tsquery AS "false"
|
-- 菜单SQL
INSERT INTO `sys_menu` (`parent_id`, `name`, `url`, `perms`, `type`, `icon`, `order_num`)
VALUES ('1', 'spu信息介绍', 'product/spuinfodesc', NULL, '1', 'config', '6');
-- 按钮父菜单ID
set @parentId = @@identity;
-- 菜单对应按钮SQL
INSERT INTO `sys_menu` (`parent_id`, `name`, `url`, `perms`, `type`, `icon`, `order_num`)... |
USE osmt_db;
SET NAMES utf8mb3;
SET character_set_client = utf8mb3;
-- Stored procedure for CREATE INDEX IF NOT EXIST
DELIMITER $$
DROP PROCEDURE IF EXISTS `osmt_db`.`createIndexIfNotExist` $$
CREATE PROCEDURE `osmt_db`.`createIndexIfNotExist` (tableName VARCHAR(128), in indexName VARCHAR(128), in indexColumns VARCHA... |
insert into positions(person, organization, title, start_date, start_date_precision, end_date, end_date_precision, urls, notes, employment_type, cause_area) values
('Michelle Graham', 'Wild Animal Initiative', 'Researcher', '2019-03-01', 'month', '2019-07-01', 'month', 'https://web.archive.org/web/20190428232757i... |
-- distribution linkrot binned by year without shakemap
with m as (
select response_id, round((online->>'status')::text::int, -2) as status_code
from metadata_completeness,
json_array_elements(distributions->'online') online
), a as (
select extract(year from metadata_age) as the_year,
count... |
SELECT x FROM (SELECT arrayJoin(['Hello', 'Goodbye']) AS x, [1, 2, 3] AS arr) ARRAY JOIN arr
|
begin;
select plan(3);
\i tests/test_support/base-docs-setup.sql
select load_single_document(
(select id from public_api.document_type where name = 'legislation.gov.uk'),
'/demo_data/revisions/618_v2.xml'
);
select set_eq($$
select revision_number,latest from public_api.document where pk = '/uksi/2002/... |
-- salesdb
/* QUESTION 1
Perform an anti-join that returns the SalesIDs of customers with no middle name
*/
/* QUESTION 2
Perform an anti-join of your choosing on any other dataset.
Describe what the result of the query represents (in plain English).
*/
/* QUESTION 3
Return the Employee First name and last name, a... |
BEGIN;
-- Application: authority
-- Model: Permission
ALTER TABLE "authority_permission"
ADD "date_requested" timestamp with time zone;
ALTER TABLE "authority_permission"
ADD "approved" boolean;
ALTER TABLE "authority_permission"
ADD "date_approved" timestamp with time zone;
UPDATE "authority_permission"
SET "appro... |
-- This file contains SQL statements that will be executed before the build script.
|
-- phpMyAdmin SQL Dump
-- version 5.0.3
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Jan 29, 2021 at 03:09 PM
-- Server version: 10.4.14-MariaDB
-- PHP Version: 7.2.34
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIE... |
create table ACT_HI_PROCINST (
ID_ varchar(64) not null,
PROC_INST_ID_ varchar(64) not null,
BUSINESS_KEY_ varchar(255),
PROC_DEF_ID_ varchar(64) not null,
START_TIME_ timestamp not null,
END_TIME_ timestamp,
DURATION_ bigint,
START_USER_ID_ varchar(255),
START_ACT_ID_ varchar(255),
... |
-- 建立索引成本
COST OF INDEXES
- 增加数据库的大小(它需要和表一起保存)
- 每次增删改数据时,MySQL会自动更新索引,会影响当前操作的效率
-- 我们只需要给特别重要的查询添加索引(数据量大,但频繁检索)
-- 不要在设计表的时候就创建好索引,不要以表来创建索引、要以查询内容来创建
-- 在内部:索引通常是以二叉树的方式保存的
-- 创建索引
#检索时对比了多大的数据量
EXPLAIN SELECT customer_id FROM customers WHERE state='US';
CREATE INDEX idx_state ON customers(state);
EXPLAIN S... |
--
-- Licensed to the Apache Software Foundation (ASF) under one
-- or more contributor license agreements. See the NOTICE file
-- distributed with this work for additional information
-- regarding copyright ownership. The ASF licenses this file
-- to you under the Apache License, Version 2.0 (the
-- "License"); you ma... |
# --- !Ups
ALTER TABLE attendance_week add constraint u_attendance_week unique(person_id, monday);
ALTER TABLE attendance_day add constraint u_attendance_day unique(person_id, day);
# --- !Downs
alter table attendance_week drop constraint u_attendance_week;
alter table attendance_day drop constraint u_attendance_day... |
--
-- CLUSTER
--
CREATE TABLE clstr_tst_s (rf_a SERIAL PRIMARY KEY,
b INT) DISTRIBUTED BY (rf_a);
CREATE TABLE clstr_tst (a SERIAL PRIMARY KEY,
b INT,
c TEXT,
d TEXT,
CONSTRAINT clstr_tst_con FOREIGN KEY (b) REFERENCES clstr_tst_s)
DISTRIBUTED BY (a);
CREATE INDEX clstr_tst_b ON clstr_tst (b);
CREATE INDEX cl... |
create table usuarios (
id serial not null,
nombre varchar(100) not null,
correo varchar(100) not null,
primary key (id)
);
create table reservas (
id serial not null,
codigo varchar(15) not null,
pelicula varchar(100) not null,
fecha_creacion date not null,
hora_creacion time not null,
fecha_reserva date no... |
-- Begin the transaction
BEGIN;
CREATE OR REPLACE FUNCTION normalize_raw_visit() RETURNS TRIGGER AS
$normalize_raw_visit$
DECLARE
upserted_protocol_ids INT[];
upserted_peer_id INT;
upserted_session_id INT;
new_multi_addresses_ids INT[];
upserted_multi_ad... |
-- file:create_table_like.sql ln:26 expect:true
/* Single entry with value 'text' */
ALTER TABLE inhx add constraint foo CHECK (xx = 'text')
|
UPDATE complex_field
SET field_type_id = (SELECT id FROM field_type WHERE reference = 'Date' AND version = 1 AND jurisdiction_id IS NULL)
WHERE complex_field_type_id = (SELECT id FROM field_type WHERE reference = 'SearchParty' AND version = 1 AND jurisdiction_id IS NULL)
AND reference = 'DateOfBirth'
|
--TEST: No error returns when setting an invalid default value to a timestamp column using 'ALTER COLUMN ... SET DEFAULT' statement
create table t_numeric (s short, i integer, b bigint, n numeric, f float, d double, m monetary);
create table t_datetime (d date, t time, ts timestamp, dt datetime);
create table t_bits (... |
DROP TABLE IF EXISTS characters;
CREATE TABLE characters(
id SERIAL PRIMARY KEY,
image TEXT,
name VARCHAR(255),
patronus VARCHAR(255),
alive VARCHAR(255)
) |
-- CreateTable
CREATE TABLE `MmOverseerEpochStates` (
`height` VARCHAR(255) NOT NULL,
`deposit_rate` VARCHAR(255) NOT NULL,
`prev_aterra_supply` VARCHAR(255) NOT NULL,
`prev_exchange_rate` VARCHAR(255) NOT NULL,
`prev_interest_buffer` VARCHAR(255) NOT NULL,
`last_executed_height` BIGINT UNSIGNED... |
-- phpMyAdmin SQL Dump
-- version 4.9.0.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Waktu pembuatan: 14 Nov 2020 pada 03.54
-- Versi server: 10.3.16-MariaDB
-- Versi PHP: 7.3.7
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHA... |
SELECT "Provider_8"."nppes_provider_street1" AS "nppes_provider_street1" FROM "Provider_8" WHERE (("Provider_8"."nppes_provider_city" = 'GREENVILLE') AND ("Provider_8"."nppes_provider_state" = 'RI') AND ("Provider_8"."provider_type" = 'Internal Medicine')) GROUP BY 1;
|
prompt --application/shared_components/user_interface/templates/page/wizard_modal_dialog
begin
-- Manifest
-- TEMPLATE: WIZARD_MODAL_DIALOG
-- Manifest End
wwv_flow_api.component_begin (
p_version_yyyy_mm_dd=>'2020.03.31'
,p_release=>'20.1.0.00.13'
,p_default_workspace_id=>2400405578329584
,p_default_applicati... |
--- ultimos censos por pais
create view view_poblacion as
select p.nombre, u.ultimo_censo, c.poblacion as poblacion_censo, p.poblacion_estimada from
(select p.idpais, max(c.anio) as ultimo_censo from censos as c
inner join paises as p
on c.idpais = p.idpais
group by p.idpais) as u
inner join paises as p
on p.idpais = ... |
-- file:groupingsets.sql ln:123 expect:true
select t1.a, t2.b, sum(t1.v), count(*) from gstest_empty t1, gstest_empty t2
group by grouping sets ((t1.a,t2.b),())
|
-- @testpoint:openGauss保留关键字natural同时作为表名和列名带引号,并进行dml操作,natural列的值最终显示为1000
drop table if exists "natural";
create table "natural"(
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(38),
c_... |
-- MariaDB dump 10.19 Distrib 10.5.10-MariaDB, for debian-linux-gnu (x86_64)
--
-- Host: localhost Database: publishing_engine_prod
-- ------------------------------------------------------
-- Server version 10.5.10-MariaDB-1:10.5.10+maria~focal
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!... |
drop package spreadeasy_test_util ;
drop table SPREADEASY_TEST_RESULTS purge;
|
-- MySQL dump 10.13 Distrib 5.5.25, for osx10.6 (i386)
--
-- Host: localhost Database: db_bbv
-- ------------------------------------------------------
-- Server version 5.5.25
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!4... |
-- view.test
--
-- execsql {
-- SELECT mx+10, pqr FROM v6, v8 WHERE xyz>2;
-- }
SELECT mx+10, pqr FROM v6, v8 WHERE xyz>2; |
DROP USER IF EXISTS 'api-local'@'localhost';
CREATE USER IF NOT EXISTS 'api-local'@'localhost';
/* Voor alle tabellen handmatig de minimale requirements geven */
GRANT SELECT ON wideworldimporters.colors TO 'api-local'@'localhost';
GRANT SELECT ON wideworldimporters.stockgroups TO 'api-local'@'localhost';
GRANT... |
//! Test aliases with doc comments.
/// A 8-bit long unit of information.
Byte = U8;
|
-- --------------------------------------------------------
-- Хост: 127.0.0.1
-- Версия сервера: 10.2.11-MariaDB - mariadb.org binary distribution
-- Операционная система: Win64
-- HeidiSQL Версия: 9.5.0.5196
-- ------------------------------------------------... |
-- Revert morzod:user from mysql
BEGIN;
revoke select, insert, update, delete on table user from 'morzod'@'localhost';
drop table user;
COMMIT;
|
/* Copied from ado-mysql.sql*/
/* File generated automatically by dynamo */
/* Entity types */
CREATE TABLE entity_type (
/* the entity type identifier */
`id` INTEGER AUTO_INCREMENT,
/* the entity type name (table name) */
`name` VARCHAR(127) UNIQUE NOT NULL,
PRIMARY KEY (`id`)
);
/* Sequence generator */
C... |
--$Id: geocode_address.sql 12912 2014-08-23 05:22:13Z robe $
--DROP FUNCTION IF EXISTS geocode_address(norm_addy, integer , geometry);
CREATE OR REPLACE FUNCTION geocode_address(IN parsed norm_addy, max_results integer DEFAULT 10, restrict_geom geometry DEFAULT NULL, OUT addy norm_addy, OUT geomout geometry, OUT rating... |
INSERT INTO encounter_type (name, description, creator, date_created, uuid) VALUES ('ADMISSION', 'ADMISSION encounter', 1, curdate(), uuid()); |
create database test;
use database test;
create table T1 (
id long not null,
i1 int,
f1 float,
d1 double,
s1 string(100) not null,
primary key(id)
);
create table T2 (
id long,
i2 int,
f2 float,
d2 double,
s2 string(50) not null,
primary key (id)
);
create table T3 (
id long,
i3 int,
f3 float,
d3 double,
s3 string(5... |
{%- materialization view, default -%}
{%- set identifier = model['alias'] -%}
{%- set tmp_identifier = identifier + '__dbt_tmp' -%}
{%- set backup_identifier = identifier + '__dbt_backup' -%}
{%- set non_destructive_mode = (flags.NON_DESTRUCTIVE == True) -%}
{%- set existing_relations = adapter.list_relatio... |
-- start_ignore
create schema sql_partition_401_450;
set search_path to sql_partition_401_450;
-- end_ignore
-- @author prabhd
-- @created 2014-04-01 12:00:00
-- @modified 2012-04-01 12:00:00
-- @tags dml MPP-21090 ORCA
-- @optimizer_mode on
-- @description Tests for MPP-21090
\echo --start_ignore
\echo --end_ignor... |
CREATE TABLE IF NOT EXISTS `xzqb_user_twitter` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`site_id` int(11) NOT NULL,
`reg_time` int(11) NOT NULL DEFAULT '0',
`mod_time` int(11) NOT NULL DEFAULT '0',
`reg_user` int(11) NOT NULL DEFAULT '0',
`mod_user` int(11) NOT NULL DEFAULT '0',
`user_id` int(11) NOT NUL... |
DROP TABLE m_user;
DROP SEQUENCE IF EXISTS m_user_seq;
DROP INDEX IF EXISTS m_user_deleted_at;
|
INSERT INTO `categories` (`categories_id`, `categories_image`, `categories_icon`, `parent_id`, `sort_order`, `date_added`, `last_modified`, `categories_slug`, `categories_status`, `created_at`, `updated_at`) VALUES ('-1', '120', '120', '0', NULL, NULL, NULL, 'uncategorized', '1', NULL, NULL);
INSERT INTO `categories_de... |
CREATE OR REPLACE FUNCTION prj.CzyKierunekNaWydziale(nazwa_kierunku VARCHAR(64), id_w INTEGER)
RETURNS BOOLEAN AS
$$
BEGIN
RETURN (SELECT EXISTS
(SELECT *
FROM prj.wydzial_kierunek
JOIN prj.kierunek KI USING (id_kierunek)
WHERE nazwa_kierunku = ki.nazwa
AND id_w = id_wydzial));
END
$$
LANGUAGE 'plpgsql';
C... |
-- We need an existing table in the database to test the creation of the
-- Flyway history table with the correct baseline version set.
CREATE TABLE IF NOT EXISTS fake_existing_tbl; |
-- file:create_index.sql ln:314 expect:true
SELECT * FROM point_tbl WHERE f1 IS NULL
|
-- @testpoint:openGauss关键字Including(非保留),作为列名带双引号,Including大小写混合,建表成功
drop table if exists Explain_test;
create table Explain_test(
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(38),
c_... |
CREATE DATABASE photos;
BEGIN;
CREATE USER photo WITH
LOGIN
SUPERUSER
INHERIT
NOCREATEDB
CREATEROLE
NOREPLICATION
PASSWORD 'password';
ALTER ROLE photo SET client_encoding TO 'utf8';
ALTER ROLE photo SET default_transaction_isolation TO 'read committed';
ALTER ROLE photo SET timezone TO 'UTC';
GRANT A... |
-- ***************************************************************************
-- File: 2_50.sql
--
-- Developed By TUSC
--
-- Disclaimer: Neither Osborne/McGraw-Hill, TUSC, nor the author warrant
-- that this source code is error-free. If any errors are
-- found in this source code, please repo... |
INSERT INTO ProjectLearner (employeeId, projectId, isInvitation, isAccepted) VALUES
(1001 , 10001 ,'true' ,'false') ,
(1002 , 10002 ,'false' ,'false') ,
(1003 , 10003 ,'true' ,'false') ,
(1004 , 10004 ,'false' ,'false') ,
(1005 , 10005 ,'true' ,'false') ,
(1006 , 10006 ,'false' ,'true') ,
(1007 , 10007 ,'true' ,'false'... |
-- PAGES
UPDATE `sys_objects_page` SET `layout_id`='12' WHERE `object`='bx_videos_view_entry' AND `layout_id`='10';
UPDATE `sys_pages_blocks` SET `cell_id`='2', `active`='0' WHERE `object`='bx_videos_view_entry' AND `title`='_bx_videos_page_block_title_entry_video' AND `cell_id`='1';
UPDATE `sys_pages_blocks` SET `cel... |
SET @sName = 'bx_lucid';
-- SETTINGS
SET @iSystemCategoryId = (SELECT `id` FROM `sys_options_categories` WHERE `name`='system' LIMIT 1);
SET @iSystemCategoryOrder = (SELECT IFNULL(MAX(`order`), 0) FROM `sys_options` WHERE `category_id`=@iSystemCategoryId LIMIT 1);
INSERT INTO `sys_options`(`category_id`, `name`, `cap... |
SET ANSI_NULLS ON;
SET ANSI_PADDING ON;
SET ANSI_WARNINGS ON;
SET ANSI_NULL_DFLT_ON ON;
SET CONCAT_NULL_YIELDS_NULL ON;
SET QUOTED_IDENTIFIER ON;
go
-- =============================================
-- Pre Setup - Remove table from previous installation
-- ================... |
select 1 as id, current_date as updated_at
union all
select 2 as id, current_date as updated_at
union all
select 3 as id, current_date as updated_at
union all
select 4 as id, current_date as updated_at
|
/*
This software has been released under the MIT license:
Copyright (c) 2009 Jonas Krogsboell
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limita... |
INSERT INTO atcoder(name, start_time, end_time, range)
VALUES
('AtCoder Beginner Contest 999', '2021-12-30 21:00:00 +09', '2021-12-30 22:40:00 +09', ' ~ 1999'),
('AtCoder Regular Contest 999', '2021-12-31 21:00:00 +09', '2022-1-1 0:0:0 +09', ' - ');
|
CREATE TABLE users (
email VARCHAR(100) NOT NULL PRIMARY KEY,
hash VARCHAR(122) NOT NULL, --argon hash
created_at TIMESTAMP NOT NULL
); |
{{ config( materialized='incremental', unique_key='model_execution_id' ) }}
with models as (
select *
from {{ ref('dim_dbt__models') }}
),
model_executions as (
select *
from {{ ref('int_dbt__model_executions') }}
),
run_results as (
select *
from {{ ref('fct_dbt__run_results') }}
),
m... |
create table appointment(
id uuid not null,
appointment_time timestamp with time zone not null,
duration_in_minutes int not null,
created_at timestamp with time zone not null,
created_by_id text not null,
attended attended,
additional_attendance_information text,
attendance_submitted_at... |
CREATE TABLE pessoas (id INTEGER, nome VARCHAR(50) ); |
ALTER TABLE `hubrsskeys`
MODIFY `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
MODIFY `addon_id` int(10) unsigned DEFAULT NULL,
MODIFY `created` date NOT NULL,
DROP FOREIGN KEY `hubrsskeys_ibfk_1`, /* (`user_id`) REFERENCES `users` (`id`),*/
DROP FOREIGN KEY `hubrsskeys_ibfk_2`, /* (`addon_id`) RE... |
CREATE TABLE IF NOT EXISTS `user` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`device_id` varchar(64) NOT NULL,
`android_id` varchar(20) DEFAULT NULL,
`cellphone` char(11) DEFAULT NULL,
`nickname` varchar(32) NOT NULL,
`gender` char(1) NOT NULL,
`avatar_url` varchar(255) DEFAULT NULL,
`score` int(11) DEF... |
select (select distinct Salary from employee order by salary desc limit 1 offset 1) as SecondHighestSalary; |
SELECT e.id,
e.name AS employeeName,
e.title AS title
FROM hr.employeesWithMissing AS e
WHERE e.title = 'Dev Mgr'
|
-- CreateTable
CREATE TABLE `Answer` (
`id` INTEGER NOT NULL AUTO_INCREMENT,
`question_id` INTEGER NOT NULL,
`option_id` INTEGER NOT NULL,
UNIQUE INDEX `Answer_question_id_key`(`question_id`),
UNIQUE INDEX `Answer_option_id_key`(`option_id`),
PRIMARY KEY (`id`)
) DEFAULT CHARACTER SET utf8mb4 C... |
-- MySQL dump 10.11
--
-- Host: localhost Database: wackopicko
-- ------------------------------------------------------
-- Server version 5.0.67-0ubuntu6
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION... |
SELECT * FROM prop_addr_hist_stg where PROP_ADDR_ID = 3438
order by EVENT_DATE desc;
SELECT * FROM mls_prop_fact where PROP_ADDR_ID = 1062;
select * from prop_addr_fact where PROP_ADDR_ID = 1062;
select PROP_ADDR_ID, EVENT_DATE, MAX(PRICE) / MIN(PRICE) ratio
FROM prop_addr_hist_stg
group by PROP_ADDR_ID, EVENT_DATE
... |
DELETE FROM areatrigger_scripts WHERE entry=4591;
INSERT INTO areatrigger_scripts VALUES (4591,'at_coilfang_waterfall');
|
CREATE TABLE IF NOT EXISTS `ww_categories` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`title` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`ordering` int(11) NOT NULL,
`params` text COLLATE utf8_unicode_ci NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=3 ;... |
CREATE TABLE [dbo].[NX 6-1-11 1] (
[TitleCode] VARCHAR (50) NULL,
[Title Name] VARCHAR (50) NULL,
[EffectiveDate] VARCHAR (50) NULL,
[NumSalarySteps] VARCHAR (50) NULL,
[BargainingCode] VARCHAR (50) NULL,
[Step] VARCHAR (50) NULL,
[Annual] VARCHAR (50) NULL,
... |
DROP DATABASE IF EXISTS mtg;
CREATE DATABASE mtg;
\c mtg;
DROP TABLE IF EXISTS users CASCADE;
CREATE TABLE users(
user_id SERIAL,
username TEXT NOT NULL,
password TEXT NOT NULL,
PRIMARY KEY(user_id)
);
INSERT INTO users (user_id,username,password) VALUES (2,'dan','$2b$12$36EKImw626h4xG/DHEU4QeTk... |
-- 1. Read the notes about this table.
-- Observe the result of running this SQL command to show the
-- name, continent and population of all countries.
SELECT name, continent, population FROM world;
-- 2. How to use WHERE to filter records.
-- Show the name for the countries that have a population of
-- at least 20... |
-- 创建数据表
CREATE TABLE IF NOT EXISTS "T_status" (
"userId" text NOT NULL,
"statusId" integer NOT NULL,
"status" text,
"createTime" TEXT DEFAULT (datetime('now', 'localtime')),
PRIMARY KEY("userId","statusId")
);
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.