text
stringlengths
1
1.05M
// @author Chandan Mishra (primary author!) // @author Richard Bruskiewich (minor modifications) // This Cypher Query Language (CQL) Script is for // loading the production Knowledge.Bio database // from pipe delimited text file data dumps from // the MySQL version of SemMedDB and UMLS datasets. // // The script use...
UPDATE ACT_HI_COMMENT SET USER_ID_ = `pseudonym` WHERE USER_ID_ = `username`
BEGIN; ALTER TABLE users DROP COLUMN password_reset_token; ALTER TABLE users DROP COLUMN password_reset_token_expired_at; COMMIT;
{Source_to_Standard} SELECT distinct SOURCE_CODE, TARGET_CONCEPT_ID, TARGET_DOMAIN_ID FROM CTE_VOCAB_MAP WHERE lower(SOURCE_VOCABULARY_ID) IN ('snomed') AND (TARGET_STANDARD_CONCEPT IS NOT NULL or TARGET_STANDARD_CONCEPT != '') AND (TARGET_INVALID_REASON IS NULL or TARGET_INVALID_REASON = '')
/* SQLyog Community v12.2.1 (64 bit) MySQL - 5.6.17 : Database - descargas ********************************************************************* */ /*!40101 SET NAMES utf8 */; /*!40101 SET SQL_MODE=''*/; /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; /*!40014 SET @OLD_FOREIGN_KEY_CH...
-- ================================================ -- Procedure to deal with users trying to -- recover their forgot passwords -- ================================================ USE [#INVEST] SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [ForgotMyPassword] @login varchar(30), @lastname varch...
CREATE TABLE accounts ( address TEXT NOT NULL, denom TEXT NOT NULL, balance INTEGER NOT NULL DEFAULT 0, created_at DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP, updated_at DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY (address, denom) );
INSERT batchItems(ID,Titel,Categorie,Postcode,Locatie,Land,Verkoper,Prijs,Valuta,Conditie,Thumbnail,Beschrijving) VALUES (111515365633,'one penny 1916 goudblad d 999',46004,'9737HK','Nederland','NL','eetse','8.0','EUR','','img111515365633.jpg','&nbsp;one penny 1916 goudblad&nbsp; b999<br>') INSERT batchIllustraties (It...
-- phpMyAdmin SQL Dump -- version 4.1.12 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: 2015-08-30 03:45:41 -- 服务器版本: 5.6.16 -- PHP Version: 5.5.11 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET ...
-- Timestamp: 2011-09-22 15:32:02.024 -- Source database is: /home/carl/Work/repos/hive1/metastore/scripts/upgrade/derby/mdb -- Connection URL is: jdbc:derby:/home/carl/Work/repos/hive1/metastore/scripts/upgrade/derby/mdb -- Specified schema is: APP -- appendLogs: false -- ---------------------------------------------...
SELECT t1.name, count(*) FROM site as s, so_user as u1, question as q1, answer as a1, tag as t1, tag_question as tq1 WHERE q1.owner_user_id = u1.id AND a1.question_id = q1.id AND a1.owner_user_id = u1.id AND s.site_id = q1.site_id AND s.site_id = a1.site_id AND s.site_id = u1.site_id AND s.site_id = tq1.site_id AND s.s...
CREATE TABLE `accountidentity` ( `id_account_identity` int(11) NOT NULL auto_increment, `plat_user_name` varbinary(64) NOT NULL default '' COMMENT '平台名', `name` varbinary(20) NOT NULL default '' COMMENT '姓名', `identity_num` varchar(20) NOT NULL default '' COMMENT '身份证号', `phone_num` bigint(20) unsigned D...
-- phpMyAdmin SQL Dump -- version 5.0.2 -- https://www.phpmyadmin.net/ -- -- Хост: 127.0.0.1:3306 -- Время создания: Окт 20 2020 г., 18:26 -- Версия сервера: 10.3.22-MariaDB -- Версия PHP: 7.4.5 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIEN...
-- DROP TABLE IF EXISTS arch."TaskQueueAttributeLogArchive"; -- DROP TABLE IF EXISTS arch."DataPipeLineTaskQueueArchive";
with merged_prs as ( select pr.id id, lower(pr.dup_user_login) author_login, r.repo_group repo_group, case when aa.company_name = 'PingCAP' then 'is-top-contributing-company' else 'not-top-contributing-company' end company_category from gha_pull_reque...
-- table: user -- select non deleted users SELECT * FROM user WHERE deleted_at IS NULL;
SELECT * From dbo.PaperInfoTable papers, dbo.PaymentCarTable car WHERE papers.VIN = car.VIN AND papers.Date = car.BoughtDate
#------------------------------------------------------------ # Insertion table sport #------------------------------------------------------------ INSERT INTO `Sport` (`id_sport`, `Libelle_sport`, `Image_sport`, `Description_sport`) VALUES (NULL,'Judo','Judo.png','Le judo a été créé en tant que pédagogie phys...
 CREATE PROCEDURE [dbo].[uspGetManagerEmployees] @BusinessEntityID [int] AS BEGIN SET NOCOUNT ON; -- Use recursive query to list out all Employees required for a particular Manager WITH [EMP_cte]([BusinessEntityID], [OrganizationNode], [FirstName], [LastName], [RecursionLevel]) -- CTE name and columns...
# WordPress MySQL database migration # # Generated: Friday 29. January 2021 13:00 UTC # Hostname: localhost:3308 # Database: `aos` # URL: //localhost:81/AOS # Path: C:\\MAMP\\htdocs\\AOS # Tables: wp_commentmeta, wp_comments, wp_links, wp_options, wp_postmeta, wp_posts, wp_term_relationships, wp_term_taxonomy, wp_termm...
-- -------------------------------------------------------- -- Host: localhost -- Server version: 5.7.24 - MySQL Community Server (GPL) -- Server OS: Win64 -- HeidiSQL Version: 10.2.0.5599 -- -------------------------------------------------------- /...
{% macro grant(role) %} {% set sql %} GRANT USAGE ON SCHEMA {{ schema }} TO {{ role }}; GRANT SELECT ON ALL tables in SCHEMA {{ schema }} TO {{ role }}; {% endset %} {% set table = run_query(sql) %} {% endmacro %}
select count(*) as failures, count(*) != 0 as should_warn, count(*) != 0 as should_error from ( with all_values as ( select as value_field, count(*) as n_records from "dev"."stripe"."paymentmethod" group by ) select * from all_values where value_...
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; CREATE DATABASE IF NOT EXISTS `www`; use `www`; CREATE TABLE `electives` ( `id` int(11) NOT NULL, `title` varchar(128) DEFAULT NULL, `description` varchar(1024) DEFAULT NULL, `lecturer` varchar(128) DEF...
CREATE TABLE intervention_data( id INT AUTO_INCREMENT PRIMARY KEY, region_id VARCHAR(32) NOT NULL, subregion_id VARCHAR(32), policy VARCHAR(255) NOT NULL, notes TEXT, source TEXT, issue_date DATE, start_date DATE NOT NULL, ease_date DATE, expiration_date DATE, end_date DATE, created_at DATETIME ...
-- phpMyAdmin SQL Dump -- version 5.1.1 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Waktu pembuatan: 27 Feb 2022 pada 08.24 -- Versi server: 10.4.22-MariaDB -- Versi PHP: 7.4.27 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@C...
-- -- PostgreSQL database dump -- -- Dumped from database version 11.4 -- Dumped by pg_dump version 11.4 SET statement_timeout = 0; SET lock_timeout = 0; SET idle_in_transaction_session_timeout = 0; SET client_encoding = 'UTF8'; SET standard_conforming_strings = on; SELECT pg_catalog.set_config('search_path', '', fal...
create sequence seq_test_lv;
def Node P = Choose1 { cons = { head = P; tail = Node P }; nil = {} } def Main = Node (Match1 'a')
/* * Copyright (c) 2016 LabKey Corporation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or...
-- phpMyAdmin SQL Dump -- version 4.9.5 -- https://www.phpmyadmin.net/ -- -- Host: localhost:3306 -- Generation Time: Jun 11, 2021 at 01:01 AM -- Server version: 10.3.28-MariaDB-log-cll-lve -- PHP Version: 7.3.27 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; ...
CREATE TABLE ingredient_category ( id integer DEFAULT nextval('ingredient_category_id_seq'::regclass) PRIMARY KEY NOT NULL, name varchar(255) NOT NULL, description varchar(2048), image_link varchar(512), is_alcoholic boolean NOT NULL ); CREATE UNIQUE INDEX ingredient_category_id_uindex ON ingredient...
# # TABLE STRUCTURE FOR: access # CREATE TABLE `access` ( `id` int(11) NOT NULL AUTO_INCREMENT, `user_id` int(11) NOT NULL, `access` text CHARACTER SET utf8, PRIMARY KEY (`id`) ) ENGINE=MyISAM AUTO_INCREMENT=8 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; INSERT INTO `access` (`id`, `user_id`, `access`) VALUE...
CREATE OR REPLACE FUNCTION devv5.py_unescape ( txt_string text ) RETURNS text AS $body$ from xml.sax.saxutils import unescape return unescape (txt_string) $body$ LANGUAGE 'plpythonu' IMMUTABLE RETURNS NULL ON NULL INPUT SECURITY DEFINER PARALLEL SAFE COST 10;
drop schema ims; CREATE SCHEMA IF NOT EXISTS `ims`; USE `ims` ; CREATE TABLE IF NOT EXISTS `ims`.`customers` ( `id` INT(11) NOT NULL AUTO_INCREMENT, `first_name` VARCHAR(40) DEFAULT NULL, `surname` VARCHAR(40) DEFAULT NULL, PRIMARY KEY (`id`) ); select * from customers;
SELECT `hold_type_of_fall` FROM `climbs` GROUP BY `hold_type_of_fall` ORDER BY COUNT(*) DESC
/* Navicat MySQL Data Transfer Source Server : MySQL 5.7 Source Server Version : 50712 Source Host : localhost:3306 Source Database : edi-db Target Server Type : MYSQL Target Server Version : 50712 File Encoding : 65001 Date: 2021-03-01 01:41:38 */ SET FOREIGN_KEY_CHECKS=0; -- --...
/* SQLyog Ultimate v12.09 (32 bit) MySQL - 5.6.27-log : Database - pacmandata ********************************************************************* */ /*!40101 SET NAMES utf8 */; /*!40101 SET SQL_MODE=''*/; /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; /*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@...
SELECT * FROM (SELECT old_hash_value, CASE SUM(executions) WHEN 0 THEN 0 ELSE SUM(${columnToSum})/SUM(executions) END AS "${sumColumnName}/Execution" FROM ( SELECT old_hash_value, -${columnToSum} AS ${columnToSum}, -executions AS executions FROM stats$sql_summary s WHERE snap_id = ${beginSnap} AND s.module = '${m...
create table BOARD ( back_end_list_no NUMBER(38) not null primary key, back_end_list_img VARCHAR2(4000) not null, back_end_list_title VARCHAR2(400) not null, back_end_list_cont VARCHAR2(4000) not null, back_end_list_id VARCHAR2(100) not null constraint MV_ID_B ...
-- Copyright 2021, Google, Inc. -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- http://www.apache.org/licenses/LICENSE-2.0 -- Unless required by applicable law or agreed to in writi...
CREATE PROCEDURE [bll].[LineDefinitions_Validate__Save] @Entities [dbo].[LineDefinitionList] READONLY, @LineDefinitionEntries [dbo].[LineDefinitionEntryList] READONLY, @LineDefinitionEntryAgentDefinitions [dbo].[LineDefinitionEntryAgentDefinitionList] READONLY, @LineDefinitionEntryResourceDefinitions [dbo].[LineDe...
insert into transport_public_combination (fromStopId, fromCoordinate, toStopId, toCoordinate, fromTravelInfoId, toTravelInfoId, distance) select candidateCombination.stop_id_from, candidateCombination.stop_coordinate_from, candidateCombination.stop_id_to, candidateCombination.stop_coordinate_to, candidateCo...
-- ============================================= -- Basic Drop Queue Template -- ============================================= DROP QUEUE <queue-name, sysname, test_queue>
// # Introduction // This CDS logic is based on the USPSTF guideline: Statin Use for the Primary Prevention of Cardiovascular Disease in // Adults: Preventive Medication. This CDS only implements the core inclusion and exclusion logic associated with this // guideline. In the process of authoring the logic, certain ass...
--01-------------------------------------------------------------------- --prepare table , index drop table if exists partition_reindex_table3; create table partition_reindex_table3 ( c1 int, c2 int, C3 date not null ) partition by range (C3) INTERVAL ('1 month') ( PARTITION partition_reindex_table3_p0 VALUES LES...
USE accounts; CREATE TABLE `transactions` ( `id` INT NOT NULL AUTO_INCREMENT, `account_id` INT NOT NULL, `description` VARCHAR(100) NOT NULL, `amount` DECIMAL(13, 4) NOT NULL, `date_created` DATETIME NOT NULL, `date_modified` DATETIME NOT NULL, PRIMARY KEY (id), INDEX `idx_account_id` (`ac...
-- ============================================================================================================= -- Author: Permitin Y.A. (ypermitin@yandex.ru) -- Create date: 2018-10-15 -- Description: Обработчик правил сжатия объектов баз данных при возникновении события создания таблицы -- =========================...
DROP DATABASE IF EXISTS artjacent_db; CREATE DATABASE artjacent_db;
-- -- patch-categorylinks-better-collation2.sql -- -- Bugs T2164, T3211, T25682. This patch exists for trunk users who already -- applied the first patch in its original version. The first patch was -- updated to incorporate the changes as well, so as not to do two alters on a -- large table unnecessarily for people ...
CREATE PROCEDURE [dbo].[DataSets_GetList] @userId int NULL = NULL, @all bit = 0, @search nvarchar(MAX) AS DECLARE @isadmin bit = 0 IF @userId IS NOT NULL BEGIN --check if user is admin SET @isadmin = CASE WHEN EXISTS(SELECT * FROM Users WHERE userId=@userId AND isadmin=1) THEN 1 ELSE 0 END END SELECT * FROM...
-- -- 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 ...
/* Navicat MySQL Data Transfer Source Server : local-Mysql Source Server Version : 80013 Source Host : localhost:3306 Source Database : ssm-crud Target Server Type : MYSQL Target Server Version : 80013 File Encoding : 65001 Date: 2019-02-15 17:52:43 */ SET FOREIGN_KEY_CHECKS=0; -...
--change datestyle to Postgres SET Datestyle = 'Postgres,DMY'; --change datestyle to ISO mode which is default output style of GaussDB set datestyle = iso,ymd; create schema hw_datatype_2; set search_path = hw_datatype_2; --TEST FOR A NEW TYPE TINYINT --TEST FOR INT1SEND IN INT2 DROP TABLE IF EXISTS TEST_TINYINT; CREAT...
/* Navicat Premium Data Transfer Source Server : localhost Source Server Type : MySQL Source Server Version : 50727 Source Host : localhost:3306 Source Schema : seckill Target Server Type : MySQL Target Server Version : 50727 File Encoding : 65001 Date: 06/08/2020 09...
SELECT DISTINCT City FROM STATION WHERE Lower(substr(city, -1)) in ('a','e','i','o','u') and lower(substr(city, 1,1)) in ('a','e','i','o','u') ORDER BY city ASC;
/* Navicat MySQL Data Transfer Source Server : localhost_3306 Source Server Version : 50549 Source Host : localhost:3306 Source Database : hrdb Target Server Type : MYSQL Target Server Version : 50549 File Encoding : 65001 Date: 2019-07-09 19:23:52 */ SET FOREIGN_KEY_CHECKS=0; --...
-- phpMyAdmin SQL Dump -- version 4.5.1 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: May 12, 2016 at 02:50 PM -- Server version: 10.1.10-MariaDB -- PHP Version: 7.0.4 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLI...
-- -- Regression Tests for Custom Plan APIs -- -- construction of test data CREATE TABLE t1 ( a int, b double precision ); INSERT INTO t1 SELECT generate_series(1,3), 2.3; INSERT INTO t1 SELECT generate_series(1,3), 3.3; INSERT INTO t1 SELECT generate_series(1,3), 4.3; VACUUM ANALYZE t1; create extension vect...
-- ---------------------------- -- Table structure for admin -- ---------------------------- DROP TABLE IF EXISTS `xwx_admin`; CREATE TABLE `xwx_admin` ( `id` int(11) NOT NULL AUTO_INCREMENT, `username` char(32) NOT NULL, `password` char(32) NOT NULL, `create_time` int(11) DEFAULT '0', `update_time` int(11) D...
DELIMITER ;; DROP TABLE IF EXISTS `user`; CREATE TABLE IF NOT EXISTS `user` ( `user_id` SERIAL PRIMARY KEY, `login` VARCHAR(64) NOT NULL UNIQUE , `password` VARCHAR(64) NOT NULL, `password_hash` VARCHAR(512) NOT NULL DEFAULT '', `moderator` BOOLEAN NOT NULL DEFAULT FALSE, `status` INTEGER NOT...
select count(distinct q1.id) from site, post_link pl, question q1, question q2, comment c1, comment c2, tag, tag_question tq1, tag_question tq2 where site.site_name = 'german' and pl.site_id = site.site_id and pl.site_id = q1.site_id and pl.post_id_from = q1.id and pl.site_id = q2.site_id and pl.post_id_to = q2.id an...
-- +goose Up -- SQL in this section is executed when the migration is applied. /*promo_type*/ CREATE TYPE promo_type AS ENUM ('small','big'); /*image_type*/ CREATE TYPE image_type AS ENUM ('png','jpg','jpeg'); /* admin promo table */ CREATE TABLE admin_promo ( id SERIAL PRIMARY KEY NOT NULL, name char...
CREATE TABLE [dbo].[dnn_EasyDNNfields] ( [CustomFieldID] INT IDENTITY (1, 1) NOT NULL, [ControlTypeID] INT NOT NULL, [CFParentID] INT NULL, [IsParent] BIT NOT NULL, [Name] NVARCHAR (300) NOT NU...
DELETE FROM DOCUMENT_ENTITY WHERE 1 = 1;
select products.name, providers.name, categories.name from (products inner join providers on products.id_providers = providers.id) inner join categories on products.id_categories = categories.id where providers.name = 'Sansul SA' and categories.name = 'Imported';
SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0; SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0; SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='TRADITIONAL,ALLOW_INVALID_DATES'; USE <%= database %>; <% for (var i in tables) { var table = tables[i]; %> LOCK TABLES `<%= table.name %>` WRIT...
-- randexpr1.test -- -- db eval {SELECT coalesce((select max(13) from t1 where f= -case when exists(select 1 from t1 where not t1.b>=e and b in (select b from t1 union select (+(t1.f-d)) from t1) or 19 in (select min(e) from t1 union select -~+++ -abs(min(17*t1.d)) from t1) or not t1.a>a) then 13 else t1.c end+a | ~1...
---------------------------- -- Copyright (C) 2022 CARTO ---------------------------- CREATE OR REPLACE FUNCTION @@RS_PREFIX@@carto.__QUADBIN_FROMQUADINT (quadint BIGINT) RETURNS BIGINT STABLE AS $$ from @@RS_PREFIX@@quadbinLib import quadbin_from_zxy z = quadint & 31 x = (quadint >> 5) & ((1 << z) -...
-- MySQL dump 10.13 Distrib 5.7.12, for osx10.9 (x86_64) -- -- Host: localhost Database: sys -- ------------------------------------------------------ -- Server version 5.7.16 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!40...
ALTER TABLE db_version CHANGE COLUMN required_12458_01_mangos_dbscripts_on_creature_death required_c12466_01_mangos_spell_script_target bit; ALTER TABLE spell_script_target ADD COLUMN `inverseEffectMask` mediumint(8) unsigned NOT NULL DEFAULT '0' AFTER `targetEntry`;
SELECT `productos_x_pedido`.`producto`, `productos`.`nombre`, SUM(`productos_x_pedido`.`cantidad`), SUM(`productos_x_pedido`.`subtotal`) FROM `productos_x_pedido` LEFT JOIN `productos` ON `productos_x_pedido`.`producto` = `productos`.`id` LEFT JOIN `pedidos` ON `productos_x_pedido`.`pedido` = `pedidos`.`i...
SELECT status FROM feed WHERE submitter_id = $1 AND id = $2 AND (status = 'online' or status = 'offline');
/* mapping web users to database roles for login! Password will be same as user's password 1. Db-roles table in auth 2. Function to create role for user - make sure that role name isn't already taken 3. Function to get user_id from current_user and then get project_ids similar to current...
CREATE TABLE locations ( id INT NOT NULL AUTO_INCREMENT, lat FLOAT NOT NULL, lon FLOAT NOT NULL, title VARCHAR(64), added TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, user_id INT NOT NULL, origin VARCHAR(255) NOT NULL DEFAULT '', ranking INT DEFAULT 0, PRIMARY KEY (id) ); CREATE TA...
drop table if exists sys_user; create table sys_user ( id bigint auto_increment COMMENT '编号', organization_id bigint COMMENT '组织机构编号', username varchar(100) COMMENT '用户名', password varchar(100) COMMENT '密码', salt varchar(100) COMMENT '盐值', role_ids varchar(100) COMMENT '角色列表', group_ids varchar(100) COMM...
#standardSQL # 08_27: Groupings of "referrer-policy" parsed values buckets SELECT _TABLE_SUFFIX AS client, policy, COUNT(0) as freq, SUM(COUNT(0)) OVER (PARTITION BY _TABLE_SUFFIX) AS total, ROUND(COUNT(0) * 100 / SUM(COUNT(0)) OVER (PARTITION BY _TABLE_SUFFIX), 2) as pct FROM `httparchive.summary_requests....
-- SETTINGS SET @iTypeId = (SELECT `ID` FROM `sys_options_types` WHERE `name` = 'bx_glossary' LIMIT 1); SET @iCategId = (SELECT `ID` FROM `sys_options_categories` WHERE `type_id` = @iTypeId LIMIT 1); DELETE FROM `sys_options` WHERE `category_id` = @iCategId; DELETE FROM `sys_options_categories` WHERE `type_id` = ...
-- upgrade to 1.3.8 -- remove all Stored Procedures /****** Object: StoredProcedure [dbo].[AddDeliveryRegister] ******/ IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[AddDeliveryRegister]') AND type = N'P') DROP PROCEDURE [dbo].[AddDeliveryRegister] /****** Object: StoredProcedure [d...
-- -- PostgreSQL database dump -- SET client_encoding = 'UTF8'; SET standard_conforming_strings = off; SET check_function_bodies = false; SET client_min_messages = warning; SET escape_string_warning = off; -- -- Name: SCHEMA public; Type: COMMENT; Schema: -; Owner: postgres -- COMMENT ON SCHEMA public IS 'Standard p...
/* -- Query: select * from survey_page where survey_id>45 LIMIT 0, 1000 -- Date: 2015-04-16 16:32 */ INSERT INTO `survey_page` (`survey_page_id`,`survey_id`,`title`,`description`,`page_number`,`date_created`) VALUES (88,47,'Demographics and Social Information','Relationship Functioning page',1,'2015-03-07 20:25:...
------------------------------------------------------------------------------ -- FILE: new_bbg_rv_1.sql -- AUTHOR: iElden, D. / Jack The Narrator -- PURPOSE: Database modifications by new BBG ------------------------------------------------------------------------------ --============================================...
CREATE TABLE cognipro.alarm_state_timesum_shift ( shiftname varchar NOT NULL, machine_id varchar NOT NULL, starttime timestamptz NULL, endtime timestamptz NULL, update_date timestamptz NULL, date_string varchar NOT NULL, property_name varchar NOT NULL, property_sum float4 NULL, CONSTRAINT alarm_state_timesum_s...
-- -- Copyright (c) 2020 Alexander (Oleksandr) Sinitsyn -- CREATE OR ALTER FUNCTION sspm.GetTablesByPS (@PSName sysname) RETURNS table AS RETURN ( SELECT i.object_id, table_name = sch.name + '.' + o.name FROM sys.partition_schemes ps with(nolock) join sys.indexes i with(nolock) on i.data_space_id ...
-- phpMyAdmin SQL Dump -- version 4.2.7.1 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: Oct 05, 2015 at 11:28 PM -- Server version: 5.6.20 -- PHP Version: 5.5.15 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */...
CREATE TABLE departments( dept_no VARCHAR(255) NOT NULL, dept_name VARCHAR(255) NOT NULL, PRIMARY KEY(dept_no), UNIQUE (dept_name) ); SELECT * FROM departments; CREATE TABLE employees( emp_no INT NOT NULL, birth_date DATE NOT NULL, first_name VARCHAR(255) NOT NULL, last_name VARCHAR(255) NOT NULL, gender VAR...
ALTER TABLE QUESTION_EXPLANATION DROP CONSTRAINT FK_QUESTION_EXPLANATION; ALTER TABLE QUESTIONNAIRE_ANSWER DROP CONSTRAINT FK_QUESTIONNAIRE_ANS_QID; ALTER TABLE QUESTIONNAIRE_QUESTIONS DROP CONSTRAINT FK_QUESTIONNAIRE_QUESTIONS; DROP TABLE QUESTION; -- Table Script CREATE TABLE QUESTION ( QUESTION_REF_ID NUMBE...
{% macro get_column_values(table, column, order_by='count(*) desc', max_records=none, default=none) -%} {{ return(adapter.dispatch('get_column_values', 'dbt_utils')(table, column, order_by, max_records, default)) }} {% endmacro %} {% macro default__get_column_values(table, column, order_by='count(*) desc', max_rec...
-- phpMyAdmin SQL Dump -- version 5.0.1 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: May 16, 2022 at 02:34 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...
-- For AssistanceType of 02, 03, 04, or 05 whose ActionDate is after October 1, 2010 and ActionType = A, -- AwardeeOrRecipientUniqueIdentifier must be active as of the ActionDate, unless the record is an aggregate -- or PII-redacted non-aggregate record (RecordType=1 or 3) awarded to an or individual recipient (Busines...
-- MySQL Workbench Forward Engineering SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0; SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0; SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTI...
-- +migrate Up CREATE TABLE users( id INTEGER PRIMARY KEY AUTOINCREMENT , name VARCHAR(255) UNIQUE NOT NULL, email VARCHAR(255) UNIQUE NOT NULL, created TIMESTAMP DEFAULT( DATETIME('now') ), updated TIMESTAMP DEFAULT( DATETIME('now') ), userinfo_id INTEGER ); -- +migrate Down DROP TABLE users;...
-- 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. /************************************************...
-- phpMyAdmin SQL Dump -- version 4.5.1 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: Jan 27, 2017 at 02:41 AM -- Server version: 10.1.13-MariaDB -- PHP Version: 5.6.21 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CL...
-- phpMyAdmin SQL Dump -- version 4.5.1 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: Jul 17, 2018 at 05:01 PM -- Server version: 10.1.9-MariaDB -- PHP Version: 5.6.15 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLI...
-- MySQL dump 10.13 Distrib 8.0.21, for macos10.15 (x86_64) -- -- Host: localhost Database: amcm_db -- ------------------------------------------------------ -- Server version 8.0.23 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */...
/* SQLyog Enterprise - MySQL GUI v8.1 MySQL - 5.5.5-10.3.13-MariaDB : Database - komplit ********************************************************************* */ /*!40101 SET NAMES utf8 */; /*!40101 SET SQL_MODE=''*/; /*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; /*...
# https://leetcode.com/problems/shortest-distance-in-a-line/ SELECT min(abs(p1.x - p2.x)) as shortest FROM point p1 join point p2 ON p1.x != p2.x; #Another solution SELECT MIN(ABS(p1.x-p2.x)) as shortest FROM point p1, point p2 WHERE p1.x <> p2.x
-- CreateTable CREATE TABLE `Post` ( `id` INTEGER NOT NULL AUTO_INCREMENT, `title` VARCHAR(255) NOT NULL, `content` VARCHAR(191), `userId` INTEGER NOT NULL, `createdAt` DATETIME(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3), `updatedAt` DATETIME(3) NOT NULL, PRIMARY KEY (`id`) ) DEFAULT CHARACTE...
/* ?????????????????????????????????????????????????????????????????????? ?| ?| Procedure Name: ag_test_plan_ins ?| ?| Description: Inserts new rows into the table test_plan ?| ?| @Author: Auto Generated ?| @Createdate: 2/13/2018 ?| ?| @Input Param: @application_id int = ApplicationId ?| @name varchar(50) = Na...