text
stringlengths
1
1.05M
-- phpMyAdmin SQL Dump -- version 5.1.1 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Mar 04, 2022 at 02:43 AM -- Server version: 10.4.20-MariaDB -- PHP Version: 7.4.22 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIE...
CREATE EXTENSION test_wal_pipeline; SELECT test_wal_pipeline();
SET NOCOUNT ON IF NOT EXISTS(SELECT * FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 'Documents' AND COLUMN_NAME = 'CategoryId') BEGIN PRINT 'Adding Documents.CategoryId' ALTER TABLE Documents ADD CategoryId BIGINT NULL END GO IF EXISTS(SELECT * FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 'Docume...
-- phpMyAdmin SQL Dump -- version 4.9.5 -- https://www.phpmyadmin.net/ -- -- Host: 192.168.0.110 -- Generation Time: Nov 30, 2021 at 02:02 PM -- Server version: 8.0.27-0ubuntu0.20.04.1 -- PHP Version: 7.4.25 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!4...
-- phpMyAdmin SQL Dump -- version 4.6.4 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: 2020-05-25 09:13:51 -- 服务器版本: 5.7.14 -- PHP Version: 7.0.10 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET...
CREATE DATABASE IF NOT EXISTS QUERY_SIMPLE_PARAMS_DB; USE QUERY_SIMPLE_PARAMS_DB; DROP TABLE IF EXISTS DataTable; CREATE TABLE IF NOT EXISTS DataTable( row_id INTEGER, int_type INTEGER, long_type BIGINT, float_type FLOAT, double_type DOUBLE, boolean_type BOOLEAN, string_type VARCHAR(50...
-- List the name of the head of modules with the list of his phone number. SELECT instructor.person_id, person.first_name || ' ' || person.last_name "Name", person.m_phone_no "Permanent Phone Number", address.phone_no "Temporary Phone Number" FROM instructor JOIN person ON (instructor.person_id = person....
--+ holdcas on; select json_set('"x"', '/0', '"a"'); select json_set('"x"', '$', '"a"'); select json_set('"x"', '$', 'a'); select json_keys('{"a": 1, "b": {"c": 30}}'); select json_type(json_keys('{"a": 1, "b": {"c": 30}}')); select json_keys('{"a": 1, "b": {"c": 30}}', '$.b.c'),json_keys('{"a": 1, "b": {"c": 30}}...
/* -- sys.fn_stmt_sql_handle_from_sql_stmt からの取得 EXEC Q2 SELECT * FROM sys.fn_stmt_sql_handle_from_sql_stmt('EXEC Q2', NULL); */ -- ハッシュからの取得 DECLARE @query_hash binary(8) = 0xB4A24E1213D92EE3 SELECT i.start_time, i.end_time, q.query_id , q.query_text_id, q.initial_compile_start_time, q.l...
select quote(binary_9) from nulls2 where rowid = 1 and binary_9 is not X'00'
-- Copyright 2004-2019 H2 Group. Multiple-Licensed under the MPL 2.0, -- and the EPL 1.0 (http://h2database.com/html/license.html). -- Initial Developer: H2 Group -- ---------------- --- ENUM support ---------------- --- ENUM basic operations create table card (rank int, suit enum('hearts', 'clubs', 'spades')); > ok...
CREATE DATABASE wisher; USE wisher; CREATE TABLE IF NOT EXISTS ci_sessions ( id VARCHAR(128) NOT NULL, ip_address VARCHAR(45) NOT NULL, timestamp INT UNSIGNED DEFAULT 0 NOT NULL, data BLOB NOT NULL, KEY ci_sessions_timestamp(timestamp) ); CREATE TABLE IF NOT EXISTS Users( UserId INT AUTO_INCREMEN...
INSERT INTO `country` VALUES ('40', '阿联酋', 'ae'); INSERT INTO `country` VALUES ('41', '南非', 'za'); INSERT INTO `country` VALUES ('42', '缅甸', 'mm'); INSERT INTO `country` VALUES ('43', '冰岛', 'is'); INSERT INTO `country` VALUES ('44', '芬兰', 'fi'); INSERT INTO `country` VALUES ('45', '卢森堡', 'lu'); INSERT INTO `country` VA...
-- MySQL dump 10.18 Distrib 10.3.27-MariaDB, for debian-linux-gnu (x86_64) -- -- Host: localhost Database: wikidbschema -- ------------------------------------------------------ -- Server version 10.3.27-MariaDB-0+deb10u1 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER...
DROP TABLE IF EXISTS users; CREATE TABLE users ( userId VARCHAR(64) PRIMARY KEY, email VARCHAR(64) NOT NULL, firstName VARCHAR(64) NOT NULL, lastName VARCHAR(64) NOT NULL, studentId INTEGER, isEmailVerified BOOL NOT NULL );
CREATE TABLE [Source].[ApplePodcastHistory] ( [Feed URL] VARCHAR(MAX) NULL, [Episode ID] VARCHAR(MAX) NULL, [Visible?] VARCHAR(25) NULL, [Marked as played on] VARCHAR(30) NULL, [Manually set] VARCHAR(8) NULL, [Is New?] VARCHAR(8) NULL, [Last played on] VARCHAR(30) NULL, [Playback position] VARCHAR(50) NULL, [...
--liquibase formatted sql --changeset artemov_i:MTGetLocalNameSpace dbms:postgresql runOnChange:true splitStatements:false stripComments:false INSERT INTO s_mt.t_query (ck_id, cc_query, ck_provider, ck_user, ct_change, cr_type, cr_access, cn_action, cv_description) VALUES ('MTGetLocalNameSpace', '--MTGetLocalNameSpace ...
DELETE FROM northwind.order_details;
CREATE OR REPLACE FUNCTION "PERMISOS".F_DEVOLVER_ESPECIF_PERMISO(IN P_ID_PERMISO INTEGER, OUT P_NOMBRE_COMPLETO TEXT, OUT P_TIPO_AUSENCIA CHARACTER VARYING(70), OUT P_FECHA_SOLICITUD TIMESTAMP WITHOUT TIME ZONE, OUT P_FECHA_INICIO TIMESTAMP WITHOUT TIME ZONE, OUT P_FECHA_FIN TIMESTAMP WITHOUT TIME ZONE, ...
select substr(col, 2, 3) from (select split(n_comment, ' ') [3] col from cp.`tpch/nation.parquet` where n_nationkey = -1 group by n_comment order by n_comment limit 5);
-- MySQL dump 10.13 Distrib 5.6.24, for Win64 (x86_64) -- -- Host: localhost Database: faithwraps -- ------------------------------------------------------ -- Server version 5.6.17 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; ...
-- phpMyAdmin SQL Dump -- version 5.0.4 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Mar 03, 2022 at 06:02 PM -- Server version: 10.4.17-MariaDB -- PHP Version: 8.0.0 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIEN...
CREATE TABLE e2e_users ( id UUID NOT NULL, created_at TIMESTAMP NOT NULL, updated_at TIMESTAMP NOT NULL, username VARCHAR(255) NULL, CONSTRAINT "primary" PRIMARY KEY (id ASC), FAMILY "primary" (id, created_at, updated_at, username) ); CREATE TABLE e2e_user_notes ( id UUID NOT NULL, user_id UUID NOT NULL, note...
with u_rnd as ( select cast(idx as bigint) userid, pu, bu, rand(31) as rnd from mf_model m where m.idx in (select userid from ratings_mf) ), i as ( select cast(idx as bigint) itemid, qi, bi from mf_model m where m.idx in (select itemid from ratings_mf) ), t1 as ( select each_top_k(${k}, u.userid, mf_p...
USE `pm`; DROP TABLE IF EXISTS `tasks`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `tasks` ( `id` INT(11) NOT NULL AUTO_INCREMENT, `name` VARCHAR(100) NOT NULL, `description` TEXT NOT NULL, `type` VARCHAR(10) NOT NULL, `closed` TINYINT ...
---- -- Copyright (c) 2012-2015 Apple Inc. All rights reserved. -- -- 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 a...
/* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. SPDX-License-Identifier: MIT-0 */ /* Find top 100 customers with the most number of orders */ {{ config(materialized='table') }} select c_custkey, c_nationkey, count(*) total_order from customer c left join orders o on c.c_custkey = o....
-- phpMyAdmin SQL Dump -- version 5.0.2 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Creato il: Set 27, 2020 alle 14:09 -- Versione del server: 10.4.14-MariaDB -- Versione PHP: 7.2.33 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIEN...
SELECT "broker_subaward"."unique_award_key" AS "prime_award_unique_key", "broker_subaward"."award_id" AS "prime_award_piid", "broker_subaward"."parent_award_id" AS "prime_award_parent_piid", "broker_subaward"."award_amount" AS "prime_award_amount", DEFC."disaster_emergency_funds" AS "prime_award_dis...
UPDATE oskari_maplayer SET minscale=-1, maxscale=-1 where internal = true and name in ('oskari:my_places', 'oskari:vuser_layer_data', 'oskari:analysis_data');
-- Deploy ggircs-portal:computed_columns/ciip_user_organisation_last_name to pg -- requires: tables/ciip_user_organisation begin; create or replace function ggircs_portal.ciip_user_organisation_last_name(cuo ggircs_portal.ciip_user_organisation) returns varchar as $$ select last_name from ggircs_portal.ciip_u...
create database test; use database test; create table T ( m_int int not null, m_long long, m_float float, m_double double, m_string string(5) not null ); insert into T values (1, 1, 1.0, 1.0, "1"); insert into T values (2, 2, 2.0, 2.0, "2"); insert into T values (3, 3, 3.0, 3.0, "3"); insert into T values (4, 4, 4.0, ...
/* Navicat MySQL Data Transfer Source Server : localhost Source Server Version : 50553 Source Host : localhost:3306 Source Database : mb Target Server Type : MYSQL Target Server Version : 50553 File Encoding : 65001 Date: 2018-01-12 15:35:16 */ SET FOREIGN_KEY_CHECKS=0; -- ------...
-- MySQL dump 10.14 Distrib 5.5.65-MariaDB, for Linux (x86_64) -- -- Host: localhost Database: corporate -- ------------------------------------------------------ -- Server version 5.7.31-log /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_R...
/* Navicat MySQL Data Transfer Source Server : localhost Source Server Version : 50527 Source Host : localhost:3306 Source Database : spcms Target Server Type : MYSQL Target Server Version : 50527 File Encoding : 65001 Date: 2014-05-21 22:27:26 */ SET FOREIGN_KEY_CHECKS=0; -- ---...
# # YCSB-WEB v1.0.0 # Copyright (c) 2021-present, leo_jie. CREATE database if NOT EXISTS `ycsb_web` default character set utf8mb4 collate utf8mb4_unicode_ci; use `ycsb_web`; SET NAMES utf8mb4; SET FOREIGN_KEY_CHECKS = 0; -- ---------------------------- -- Table structure for xxl_job_group -- ------------------------...
declare x number(32); y number(32); z number; begin x := to_number( extract(day from(systimestamp - to_timestamp('1970-01-01', 'YYYY-MM-DD'))) * 86400000 + to_number(to_char(sys_extract_utc(systimestamp), 'SSSSSFF3')) ); dbms_lock.sleep(1); y := to_number( extract(day from(systimestamp - to_timestamp('...
-- https://www.codewars.com/kata/594633020a561e329a0000a2 -- Given a demographics table you need to return a table that shows a count of each race represented, ordered by the count in descending order. SELECT race, COUNT(*) AS count FROM demographics GROUP BY race ORDER BY COUNT(*) DESC;
-- lists all shows, and all genres linked to that show SELECT tv_shows.title, tv_genres.name FROM tv_shows LEFT JOIN tv_show_genres ON tv_shows.id = tv_show_genres.show_id LEFT JOIN tv_genres ON tv_genres.id = tv_show_genres.genre_id ORDER BY tv_shows.title, tv_genres.name ASC;
SELECT * FROM `vlogs` WHERE Comment='Generated via Timestamp';
-- SETTINGS SET @iCategId = (SELECT `id` FROM `sys_options_categories` WHERE `name`='bx_posts' LIMIT 1); DELETE FROM `sys_options` WHERE `name` IN ('bx_posts_per_page_profile'); INSERT INTO `sys_options` (`name`, `value`, `category_id`, `caption`, `type`, `check`, `check_error`, `extra`, `order`) VALUES ('bx_posts_per...
//e1 -- Hapus data yang ber-id 7 di tabel student DELETE FROM students WHERE id=7; -- Jangan hapus kueri dibawah SELECT * FROM students;
INSERT INTO PUBLISHER (ID, NAME) VALUES (1001, 'APress'); INSERT INTO PUBLISHER (ID, NAME) VALUES (1002, 'Manning'); INSERT INTO PUBLISHER (ID, NAME) VALUES (1003, 'O Reilly'); INSERT INTO PUBLISHER (ID, NAME) VALUES (1004, 'Addison-Wesley'); INSERT INTO PUBLISHER (ID, NAME) VALUES (1005, 'John Wiley'); INSERT INTO PUB...
/****** Object: Table [T_EUS_Proposal_Users_State_Name] ******/ /****** RowCount: 5 ******/ /****** Columns: ID, Name ******/ INSERT INTO [T_EUS_Proposal_Users_State_Name] VALUES (1,'Associated with active proposal') INSERT INTO [T_EUS_Proposal_Users_State_Name] VALUES (2,'Associated with inactive proposal') INSE...
INSERT INTO Providence (ProvidenceName) SELECT 'Oregon' WHERE NOT EXISTS (SELECT ProvidenceName FROM Providence WHERE ProvidenceName='Oregon') INSERT INTO Providence (ProvidenceName) SELECT 'British Columbia' WHERE NOT EXISTS (SELECT ProvidenceName FROM Providence WHERE ProvidenceName='British Columbia') INSERT INTO ...
-- MySQL dump 10.13 Distrib 5.6.23, for Win32 (x86) -- -- Host: localhost Database: marks_attend -- ------------------------------------------------------ -- Server version 5.6.25-log /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS *...
## 3. Your First Query ## SELECT * FROM recent_grads; ## 4. Understanding Your First Query ## SELECT * FROM recent_grads; select * from recent_grads; ## 6. The LIMIT Clause ## SELECT * FROM recent_grads LIMIT 5; ## 7. Selecting Specific Columns ## SELECT Major, ShareWomen FROM recent_grads; ## 8. Fi...
INSERT INTO Terminal(Label) VALUES ('Terminal 1'); INSERT INTO Terminal(Label) VALUES ('Terminal 2'); INSERT INTO Terminal(Label) VALUES ('Terminal 3');
/* SQLyog Community v13.1.6 (64 bit) MySQL - 10.4.10-MariaDB ********************************************************************* */ /*!40101 SET NAMES utf8 */; create table `tbl_events` ( `fld_events_id` int (11), `fld_events_title` varchar (300), `fld_start_date` date , `fld_end_date` date , `fld_recurrence` ...
CREATE TEMPORARY TABLE dfs.tmp.temp_tbl10d PARTITION BY ( col_vrchr2 ) AS SELECT col_int, col_chr, col_vrchr1, col_vrchr2, col_dt, col_tim, col_tmstmp , col_flt, col_intrvl_yr, col_intrvl_day, col_bln FROM typeall_l; SELECT DISTINCT col_vrchr2, MIN(col_vrchr2) min_vrchr2, MAX(col_vrchr2) mx_vr...
/* Enter your query here. */ select w.id, p.age, w.coins_needed, w.power from wands as w join wands_property as p on w.code = p.code where p.is_evil != '1' and w.coins_needed = ( select min(coins_needed) from wands as w1 join ...
create index if not exists idx1 on table1(p.a, p.b, z_order_lat_lon(c.c1, c.c2), c.d, c.e) using left join
CREATE TABLE [dbo].[AlertConfiguration] ( [Id] INT NOT NULL PRIMARY KEY, [Key] VARCHAR(50) NOT NULL, [Value] VARCHAR(100) NULL, [MinValue] INT NULL, [MaxValue] INT NULL )
-- create-db.sql -- temperature drop table temperature_measurements; create table temperature_measurements (id int, date timestamp with time zone, device_id varchar(30), temperature_millic int); drop sequence temperature_measurements_seq; create sequence temperature_measurements_seq; alter table temperature_measu...
INSERT INTO Towns(Id,Name) VALUES (1,'Sofia'), (2, 'Plovdiv'), (3,'Varna') INSERT INTO Minions(Id,Name,Age,TownId) VALUES (1,'Kevin', 22, 1), (2, 'Bob', 15, 3), (3,'Steward', NULL, 2)
-- BCrypt -- admin -> $2a$10$DJr9REpKHS5SknDJxUwVPOXQ6SCI72qt5ki5vvYOa4ln3Hfrh67.u -- 1234 -> $2a$10$Ui91L7As0DQzgHiYwTsmv.BrnF9iBY2N3qPpbf/vR6cDAXUPAlqOK INSERT INTO USUARIO(nome, email, senha) VALUES('admin', 'admin', '$2a$10$DJr9REpKHS5SknDJxUwVPOXQ6SCI72qt5ki5vvYOa4ln3Hfrh67.u'); INSERT INTO USUARIO(nome,...
-- This file should undo anything in `up.sql` drop table employees_skills
-- phpMyAdmin SQL Dump -- version 4.7.4 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Czas generowania: 16 Sty 2018, 11:40 -- Wersja serwera: 10.1.28-MariaDB -- Wersja PHP: 7.1.11 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHAR...
/* This worksheet walks through the process of accessing the SafeGraph data hosted in the Snowflake Data Marketplace (https://www.snowflake.com/datasets/safegraph-foot-traffic-patterns-starbucks/) and joining it with some "internal" data using the Placekey External Function */ // setup // note: you may have to change...
/* Warnings: - You are about to drop the column `clientFamilyMemberId` on the `Visitation` table. All the data in the column will be lost. - You are about to drop the `ClientFamilyMember` table. If the table is not empty, all the data it contains will be lost. - Added the required column `dateTime` to the `Vis...
DROP TABLE IF EXISTS Channels;
CREATE TABLE [dbo].[Quote] ( [QuoteId] [int] NOT NULL IDENTITY(1, 1), [AuthorId] [int] NOT NULL, [QuoteText] [varchar] (1024) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL ) ON [PRIMARY] GO ALTER TABLE [dbo].[Quote] ADD CONSTRAINT [PK_Quote] PRIMARY KEY CLUSTERED ([QuoteId]) ON [PRIMARY] GO ALTER TABLE [dbo].[Quote] A...
-- Your SQL goes here CREATE TABLE birthdays ( id TEXT PRIMARY KEY NOT NULL, userid TEXT NOT NULL, channelid TEXT NOT NULL, guildid TEXT NOT NULL, date DATE NOT NULL, lastdate DATE NOT NULL, allexceptdate BOOLEAN NOT NULL, notifyrole TEXT );
-- phpMyAdmin SQL Dump -- version 4.7.0 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: 23 Mei 2021 pada 15.44 -- Versi Server: 10.1.25-MariaDB -- PHP Version: 5.6.31 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CH...
-- -- Table structure for table `package` -- CREATE TABLE IF NOT EXISTS `package` ( `id` bigint(10) NOT NULL AUTO_INCREMENT, `code` varchar(100) NOT NULL, `description` varchar(1000) NOT NULL, `title` varchar(100) NOT NULL, `status` tinyint(1) NOT NULL DEFAULT '1', `price` varchar(100) NOT NULL, `duratio...
CREATE TABLE admins ( id serial PRIMARY KEY, email varchar(255) NOT NULL UNIQUE );
create database if not exists carpark; use carpark; create table customer( id varchar(20)primary key, name varchar(100)not null, address varchar(100)not null, contact varchar(20)not null, nic varchar(20)not null, carNumber varchar(100)not null, carModel varchar(100)not null ); create table carCells( cellid varchar(1...
-- SPDX-License-Identifier: Apache-2.0 -- Licensed to the Ed-Fi Alliance under one or more agreements. -- The Ed-Fi Alliance licenses this file to you under the Apache License, Version 2.0. -- See the LICENSE and NOTICES files in the project root for more information. PRINT N'Creating primary key [Intervention_PK] on ...
REM REM Standard disclaimer - anything in here can be used at your own risk. REM REM It is very likely you'll need to edit the script for correct usernames/passwords etc. REM REM No warranty or liability etc etc etc. See the license file in the git repo root REM REM *** USE AT YOUR OWN RISK *** REM @clean set termou...
-- -- Copyright 2009-2021 the original author or authors. -- -- 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 -- -- Unles...
restore filelistonly from disk = 'c:\demos\sqlintersectionmarch2018\sql2017fastandfurious\demo1_sqlserverisfast\tpcc_workload.bak' go use master go drop database tpcc_workload go restore database tpcc_workload from disk = 'c:\demos\sqlintersectionmarch2018\sql2017fastandfurious\demo1_sqlserverisfast\tpcc_workload.bak' ...
INSERT INTO public."group" (id, name, title) VALUES (1, 'user', 'User'); INSERT INTO public."group" (id, name, title) VALUES (2, 'admin', 'Admin');
create table ACT_GE_PROPERTY ( NAME_ NVARCHAR2(64), VALUE_ NVARCHAR2(300), REV_ INTEGER, primary key (NAME_) ); insert into ACT_GE_PROPERTY values ('schema.version', '5.11-SNAPSHOT', 1); insert into ACT_GE_PROPERTY values ('schema.history', 'create(5.11-SNAPSHOT)', 1); insert into ACT_GE_PROPERTY val...
logparser.exe "SELECT TO_STRING(TO_TIMESTAMP(date,time),'yyyy-MM-dd hh') AS Hour, COUNT(*) FROM *.log WHERE sc-status=500 AND cs-uri-stem='/Start/default.aspx' AND date='2012-10-18' GROUP BY Hour ORDER BY Hour" -i:w3c Hour COUNT(ALL *) ------------- ------------ 2012-10-18 08 191 2012-10-18 09 163 2012-...
-- phpMyAdmin SQL Dump -- version 5.1.1 -- https://www.phpmyadmin.net/ -- -- Servidor: 127.0.0.1 -- Tiempo de generación: 26-02-2022 a las 00:29:24 -- Versión del servidor: 10.4.22-MariaDB -- Versión de PHP: 7.4.27 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD...
INSERT INTO eg_feature_action (ACTION, FEATURE) VALUES ((select id FROM eg_action WHERE name = 'AjaxFinMiscByService') ,(select id FROM eg_feature WHERE name = 'Create Challan')); INSERT INTO eg_feature_action (ACTION, FEATURE) VALUES ((select id FROM eg_action WHERE name = 'ServiceToBankMapping') ,(select id FROM e...
create or replace transient table "AIRBYTE_DATABASE".TEST_NORMALIZATION."EXCHANGE_RATE" as ( with __dbt__CTE__EXCHANGE_RATE_AB1 as ( -- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema select to_varchar(get_path(parse_jso...
CREATE TABLE city( id int NOT NULL PRIMARY KEY AUTO_INCREMENT COMMENT 'Primary Key', city_name VARCHAR(255) NOT NULL UNIQUE, CONSTRAINT name_gt_2_char CHECK (CHAR_LENGTH(city_name) > 2) ) DEFAULT CHARSET UTF8 COMMENT '';
ALTER TABLE `lh_abstract_survey` ADD `configuration` longtext NOT NULL, COMMENT='';
-- original: ctime.test -- credit: http://www.sqlite.org/src/tree?ci=trunk&name=test SELECT sqlite_compileoption_used('THREADSAFE=') ;SELECT sqlite_compileoption_used('SQLITE_OMIT_COMPILEOPTION_DIAGS') ;SELECT sqlite_compileoption_used('OMIT_COMPILEOPTION_DIAGS');
/* 查询所有学生除了选修1号课程外的学号和平均成绩,其结果按平均成绩的降序排列 */ select student.no, avg(sc.grade) from student, class, sc where class.no = sc.cno and class.no <> '1' and sc.grade >= 60 and student.no = sc.sno group by(student.no) order by avg(sc.grade) desc;
create materialized view current_state.issues as with issue_latest as ( select issues.id, issues.dup_repo_id as repo_id, issues.dup_repo_name as repo_name, issues.number, issues.is_pull_request, issues.milestone_id, milestones.miles...
--[er]test cast function by casting string data type to multiset of string data type create class func_03( varchartest varchar(20), sinttest smallint, inttest int, numerictest numeric(38,10), floattest float, realtest real, doublepretest double precision...
-- @author prabhd -- @created 2012-12-05 12:00:00 -- @modified 2012-12-05 12:00:00 -- @tags dml -- @db_name dmldb -- @description test14: Delete on table with composite distcol \echo --start_ignore set gp_enable_column_oriented_table=on; \echo --end_ignore SELECT COUNT(*) FROM dml_heap_p; DELETE FROM dml_heap_p USI...
USE TableRelations GO DROP TABLE Models GO DROP TABLE Manufacturers GO CREATE TABLE Manufacturers ( ManufacturerID INT IDENTITY, [Name] NVARCHAR(20) NOT NULL, EstablishedOn DATE NOT NULL, CONSTRAINT PK_Manufacturers PRIMARY KEY (ManufacturerID) ) GO CREATE TABLE Models ( ModelID INT IDENTITY(...
/* Query 10 entries from multiple columns of the Order table ordered by OrderDate descending */ SELECT Id, ShipName, OrderDate FROM [Order] ORDER BY OrderDate DESC LIMIT 0,10
CREATE DATABASE `greenspacedb` /*!40100 DEFAULT CHARACTER SET utf8 */; use greenspacedb; create table Admin ( userID int(8) not null auto_increment primary key, username nvarchar(30) not null, passwordHash nvarchar(50) not null, createdAt date not null, updatedAt date not null ); create table Users ( userID n...
DROP TABLE IF EXISTS `provinces`; CREATE TABLE `provinces` ( `id` int(11) NOT NULL auto_increment, `provinceid` varchar(20) NOT NULL, `province` varchar(50) NOT NULL, PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='省份信息表' AUTO_INCREMENT=35 ; insert into provinces(id,provinceid,province) valu...
ALTER TABLE [dbo].[EmailQueueXAttachments] ADD CONSTRAINT [FK_EmailQueueXAttachments_Attachments] FOREIGN KEY ([AttachmentId]) REFERENCES [dbo].[Attachments] ([Id]) ON DELETE NO ACTION ON UPDATE NO ACTION;
insert into load (time, note) values ('2016-11-02 04:00:00', 'more_skip'), ('2016-11-02 04:00:05.333000', 'more_skip'), ('2016-11-02 04:00:05.333003', 'more_skip'), ('2016-11-02 04:00:05.333004', 'more_load'), ('2016-11-02 04:00:06', 'more_load'), ('2016-11-02 04:00:06', 'more_load');
-- -------------------------------------------------------------------------------- -- CREATE ROUTINES -- -------------------------------------------------------------------------------- USE `sctau`; DELIMITER // DROP FUNCTION IF EXISTS get_FSN // CREATE FUNCTION get_FSN(candidate bigint(20)) RETURNS varchar...
CREATE PROCEDURE [dbo].[dnn_Messaging_GetNextMessageForDispatch] @SchedulerInstance uniqueidentifier AS Declare @target_messageID int SELECT @target_messageID = MessageID FROM dnn_Messaging_Messages WHERE EmailSent = 0 AND (EmailSchedulerInstance is NULL or EmailSchedulerInstance= '00000000-0000-0000-0000-0...
CREATE DATABASE ecointracker_db; GRANT ALL PRIVILEGES ON DATABASE ecointracker_db TO ecointracker; CREATE DATABASE ecointracker_test_db; GRANT ALL PRIVILEGES ON DATABASE ecointracker_test_db TO ecointracker;
CREATE TABLE `city` ( `id` bigint(20) NOT NULL AUTO_INCREMENT, `name` varchar(255) DEFAULT NULL, `updated` datetime(6) DEFAULT NULL, `country_fk` bigint(20) DEFAULT NULL, PRIMARY KEY (`id`), KEY `FK8mipuflnidcgu8cvvk595f9ot` (`country_fk`), CONSTRAINT `FK8mipuflnidcgu8cvvk595f9ot` FOREIGN KEY (`country_fk...
SET NAMES UTF8; DROP DATABASE IF EXISTS xfn; CREATE DATABASE xfn CHARSET=UTF8; USE xfn; -- 管理员信息表 CREATE TABLE xfn_admin( aid INT PRIMARY KEY AUTO_INCREMENT, aname VARCHAR(32) UNIQUE, apwd VARCHAR(64) ); -- 管理员 INSERT INTO xfn_admin VALUES (Null,'admin',PASSWORD(123456)), (Null,'boss',PASSWORD(9999)); -- ...
-- examples on insert -- the current table status select * from service; -- plain insert insert into service (service_id, name, location_id) values (20, 'Mirdor Shifty Solutions', 1100); -- multiline insert insert into service (service_id, name, location_id) values (21, 'Old Gondor Messingup', 1200), (22, 'Roh...
DELIMITER / INSERT INTO KRIM_ROLE_ID_BS_S VALUES(NULL) / -- iacuc protocol creator INSERT INTO KRIM_ROLE_T (ACTV_IND,DESC_TXT,KIM_TYP_ID,LAST_UPDT_DT,NMSPC_CD,OBJ_ID,ROLE_ID,ROLE_NM,VER_NBR) VALUES ('Y','IACUC Protocol Creator',(SELECT KIM_TYP_ID FROM KRIM_TYP_T WHERE NM = 'UnitHierarchy'),NOW(),'KC-IACUC',UUID(),(SELE...
/* Start with batting tables */ /* Query column that are not part of _additional_ table */ SELECT A.COLUMN_NAME FROM INFORMATION_SCHEMA.COLUMNS A WHERE A.TABLE_NAME = 'away_batting' AND A.COLUMN_NAME NOT IN (SELECT A.COLUMN_NAME FROM INFORMATION_SCHEMA.COLUMNS A WHERE A.TABLE_NAME = 'away_additional_batting'); /*...
--cases from dev SELECT QUARTER('2008-04-01 01:02:03 Asia/Seoul'); --SELECT QUARTER(current_time); -- test for valid date-time-tz format select quarter(datetimetz'2003-12-31 01:02:03.1234 Europe/Paris'), if (quarter(datetimetz'2003-12-31 01:02:03.1234 Europe/Paris') = 4, 'ok', 'nok'); select quarter(timestamptz'2003...
INSERT INTO `tb_empresa` (`cnpj`, `data_atualizacao`, `data_criacao`, `razao_social`) VALUES ('75798614000160', CURRENT_DATE(), CURRENT_DATE(), 'FeeDev IT'); INSERT INTO `tb_funcionario` (`cpf`, `data_atualizacao`, `data_criacao`, `email`, `nome`, `perfil`, `qtd_horas_almoco`, `qtd_horas_trabalho_dia`, `senha`, `val...