sql
stringlengths
6
1.05M
<filename>src/sql/22.sql ALTER TABLE `blockchains` ADD `seconds_per_block` INT NULL DEFAULT NULL AFTER `coin_name_plural`;
CREATE EXTENSION IF NOT EXISTS postgis; -- -- PostgreSQL database dump -- -- Dumped from database version 9.6.6 -- Dumped by pg_dump version 10.1 -- -- Name: tiger2012; Type: SCHEMA; Schema: -; Owner: census -- -- -- PostgreSQL database dump -- -- Dumped from database version 9.6.6 -- Dumped by pg_dump version 10....
<filename>mock.sql insert into listings (id, name, category, "pictureUrl", description, price, beds, guests, latitude, longitude, amenities, "userId") values ('ed110dda-0f42-4e20-b43e-8d7f5f869048', 'Buzzbean', 'condo', 'http://dummyimage.com/138x113.png/ff4444/ffffff', 'lacinia nisi venenatis tristique', 423, 3, 4, 24...
<reponame>Shuttl-Tech/antlr_psql<gh_stars>10-100 -- file:insert_conflict.sql ln:176 expect:true create unique index tricky_expr_comp_key_index on insertconflicttest(key, lower(fruit), upper(fruit))
-- phpMyAdmin SQL Dump -- version 4.7.9 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1:3306 -- Generation Time: Sep 13, 2018 at 09:20 AM -- Server version: 5.7.21 -- PHP Version: 5.6.35 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CH...
<gh_stars>1-10 -- MySQL dump 10.16 Distrib 10.1.6-MariaDB, for Win64 (AMD64) -- -- Host: localhost Database: auth -- ------------------------------------------------------ -- Server version 5.7.14-log /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARAC...
-- phpMyAdmin SQL Dump -- version 4.9.3 -- https://www.phpmyadmin.net/ -- -- Servidor: localhost:8889 -- Tiempo de generación: 19-10-2020 a las 06:02:48 -- Versión del servidor: 5.7.26 -- Versión de PHP: 7.4.2 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; -- -- Base de datos: `dbsistema` -- -- --...
/* Join data from the Order table and Customer to the OrderDetail table */ SELECT c.CompanyName AS Customer, c.Country AS Country, COUNT(DISTINCT od.OrderId) AS Orders, COUNT(od.Id) AS OrderLines FROM OrderDetail AS od LEFT JOIN [Order] AS o ON o.Id = o...
<gh_stars>1000+ -- 18.05.2016 17:16 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Process_Para SET SeqNo=40,Updated=TO_TIMESTAMP('2016-05-18 17:16:16','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Process_Para_ID=540735 ; -- 18.05.2016 17:16 -- I forgot to set the DICTIONARY_ID_COMMENTS...
SELECT cc.id, STRING_AGG(REGEXP_REPLACE(opp.objectproductionperson, '^.*\)''(.*)''$', '\1'), '␥') AS "objmaker_ss" FROM collectionobjects_common cc JOIN hierarchy hm ON (cc.id=hm.parentid AND hm.primarytype='objectProductionPersonGroup') JOIN objectproductionpersongroup opp ON (opp.id=hm.id) JOIN misc m ON (cc.id=m.id ...
CREATE TABLE `intercom` ( `id` int(11) NOT NULL AUTO_INCREMENT, `message` varchar(255) CHARACTER SET utf8 NOT NULL DEFAULT '', `type` varchar(7) NOT NULL DEFAULT 'info', `dt_start` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', `dt_end` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', `lang` char(2) NOT N...
<reponame>youaremine/ozzo-- # # Structure for table "eb_article" # CREATE TABLE `eb_article` ( `article_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '文章管理ID', `cid` int(11) unsigned DEFAULT '0' COMMENT '分类id', `title` varchar(64) NOT NULL COMMENT '文章标题', `author` varchar(32) DEFAULT NULL COMMENT '文章作者'...
SELECT RegionID, uniqExact(UserID) AS u1, uniqUpTo(10)(UserID) AS u2 FROM test.visits GROUP BY RegionID HAVING u1 <= 11 AND u1 != u2
------------------------------------------------------------------------------- -- -- PLEASE NOTE -- -- No warranty, no liability, no support. -- -- This script is 100% at your own risk to use. -- ------------------------------------------------------------------------------- set pages 0 set heading off col owner form...
DROP TABLE IF EXISTS agent; DROP TABLE IF EXISTS agent_configuration; DROP TABLE IF EXISTS agent_threaddump; create table agent ( id bigint not null PRIMARY KEY, name varchar(80) not null, original_name VARCHAR(80) null description varchar(200) null, type tinyint null comment '1 Java, 3 Browser, 4 PHP', ap...
create table if not exists blog_category ( id int auto_increment comment '主键', category_name varchar(50) null comment '分类名称', category_img_url varchar(300) null comment '图片url', priority tinyint default 0 null comment '优先级 越小越大', creator_id int ...
<filename>fixtures/doctests/comment/on_function/input.sql<gh_stars>0 COMMENT ON FUNCTION my_function (timestamp) IS 'Returns Roman Numeral';
<gh_stars>0 -- 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_E...
<filename>OAT-OPTATIVA-LEONARDO/cadastro/TrabalhoAlexandreOptativaLeonardo.sql<gh_stars>0 -- phpMyAdmin SQL Dump -- version 4.6.6deb5 -- https://www.phpmyadmin.net/ -- -- Host: localhost:3306 -- Generation Time: 13-Out-2019 às 12:18 -- Versão do servidor: 10.1.41-MariaDB-0ubuntu0.18.04.1 -- PHP Version: 7.0.33-0ubuntu0...
ALTER TABLE sirens RENAME COLUMN type_id TO siren_type_id;
<gh_stars>0 -- MySQL dump 10.13 Distrib 8.0.15, for Win64 (x86_64) -- -- Host: localhost Database: payment_system -- ------------------------------------------------------ -- Server version 8.0.15 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_...
-- examples on select use hron; -- select all select * from region; -- selecting a single column and a single row (if exists) select name from region where region_id = 1; -- select a single column, no row filtering select manager_id from employee; -- selecting only non-duplicated values select distinct manager_id f...
<gh_stars>1-10 conn system/root spool C:\bd2\ejecuta_borrar.sql set pagesize 0 set linesize 100 set feedback off set termout off set verify off select 'conn system/root' from dual; select 'spool C:\bd2\ejecuta_borrar.log' from dual; select 'DROP table &2'||'.'||table_name||';'||chr(10) from dba_tables where owne...
<reponame>CslaGenFork/CslaGenFork /****** Object: StoredProcedure [GetUserInactiveNVL] ******/ IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[GetUserInactiveNVL]') AND type in (N'P', N'PC')) DROP PROCEDURE [GetUserInactiveNVL] GO CREATE PROCEDURE [GetUserInactiveNVL] @IsActive bit ...
-- file:plpgsql.sql ln:3001 expect:false return query select x + 1, x * 10 from generate_series(0, 10) s (x)
-- file:txid.sql ln:76 expect:false SELECT txid_status(:rolledback) AS rolledback
CREATE TABLE `/*TABLE_PREFIX*/t_news` ( `pk_i_id` INT(10) NOT NULL AUTO_INCREMENT, `dt_date` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP(), `message` MEDIUMTEXT NULL DEFAULT NULL, `i_priority` INT(10) NULL DEFAULT NULL, PRIMARY KEY (`pk_i_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
<reponame>shin-kinoshita/dbflute-test-active-hangar -- #df:checkEnv(spolicy)# alter table PRODUCT add PRODUCT_ONSALES_FLG BIGINT not null after PRODUCT_STATUS_CODE; alter table PRODUCT add PRODUCT_ONSALES_FLAG integer not null after PRODUCT_STATUS_CODE; alter table PRODUCT add ONSALES_APPLICABLE_SERVICE_RANK char(3) af...
CREATE DATABASE IF NOT EXISTS devbook; USE devbook; DROP TABLE IF EXISTS usuarios; DROP TABLE IF EXISTS seguidores; CREATE TABLE IF NOT EXISTS usuarios ( id int AUTO_INCREMENT PRIMARY KEY, nome varchar(50) not null, nick varchar(50) not null unique, email varchar(50) not null unique, senha varcha...
## Create tables ################# CREATE TABLE `lab_web_entries` ( `id` bigint(20) NOT NULL AUTO_INCREMENT, `pageid` bigint(20) NOT NULL, `entryStartTime` bigint(20) DEFAULT NULL, `time` int(11) DEFAULT NULL, `serverIPAddress` char(20) COLLATE utf8_unicode_ci DEFAULT NULL, `connection` char(20) COLLATE utf...
{{ config( materialized='view' ) }} with order_items as ( select * from {{ref('stg_order_items_table')}} ), products as ( select * from {{ref('stg_products_table')}} ) select oi.order_id, p.product_id, p.name, p.price, p.quantity from order...
<reponame>kpgangat/quality-measure-and-cohort-service<filename>cohort-evaluator-spark/src/test/resources/column-filtering/query-union-alias/Parent-1.0.0.cql library Parent version '1.0.0' using "CohortTest" version '0.0.1' context A define EntryPoint: ( ("RetrieveB" b return b.integer) union ("RetrieveD"...
WHENEVER SQLERROR EXIT SQL.SQLCODE SET DEFINE ON ALTER SESSION SET CURRENT_SCHEMA=&_vUsername / SET DEFINE OFF CREATE OR REPLACE PACKAGE TWOFACTOR AS /************************************************************************ OraTOtP - Oracle Time-based One-time Password Copyright 2016 <NAME> <http://www.db...
<gh_stars>1-10 -- engagement_gplus_daily SELECT adoption.date AS date, adoption.num_30day_active_users AS num_30day_active_users, SUM(IF(engagement.num_shares>0,1,0)) AS num_share_users, SUM(IF(engagement.num_plusones>0,1,0)) AS num_plusone_users, SUM(IF(engagement.num_replies>0,1,0)) AS num_reply_users, S...
{{ config(enabled=var('github__using_repo_team', True)) }} select * from {{ var('repo_team') }}
SELECT DISTINCT toString(number) = toStringCutToZero(toString(number)) FROM (SELECT * FROM system.numbers LIMIT 1000); SELECT DISTINCT toString(number) = toStringCutToZero(toFixedString(toString(number), 10)) FROM (SELECT * FROM system.numbers LIMIT 1000);
CREATE TABLE questbooks ( id INTEGER PRIMARY KEY AUTOINCREMENT, uid TEXT NOT NULL, message TEXT NOT NULL );
<reponame>Lalit126/IT-HELP-DESK<gh_stars>0 DROP TABLE IF EXISTS HELPDESK_FOLLOWUP_STATUSES; CREATE TABLE HELPDESK_FOLLOWUP_STATUSES (STATUS_ID INTEGER PRIMARY KEY AUTOINCREMENT, STATUS VARCHAR(25) NOT NULL); INSERT INTO HELPDESK_FOLLOWUP_STATUSES (STATUS_ID, STATUS) VALUES ('1',...
ALTER TABLE "public"."EventPerson" ADD COLUMN "attendeeId" uuid; ALTER TABLE "public"."EventPerson" ALTER COLUMN "attendeeId" DROP NOT NULL; ALTER TABLE "public"."EventPerson" ADD CONSTRAINT EventPerson_attendeeId_fkey FOREIGN KEY (attendeeId) REFERENCES "public"."Attendee" (id) ON DELETE set null ON UPDATE cascade;
-- @testpoint:opengauss关键字preserve(非保留),作为外部数据源名 --关键字不带引号-成功 drop data source if exists preserve; create data source preserve; drop data source preserve; --关键字带双引号-成功 drop data source if exists "preserve"; create data source "preserve"; drop data source "preserve"; --关键字带单引号-合理报错 drop data source if exists 'preser...
<gh_stars>0 CREATE TABLE [dbo].[EnBassTunings] ( [Id] INT IDENTITY (1, 1) NOT NULL, [IdEnBassTypes] INT NULL, [Type] [sysname] NOT NULL, CONSTRAINT [PK__EnBassTunings] PRIMARY KEY CLUSTERED ([Id] ASC), CONSTRAINT [FK__EnBassTunings_EnBassTypes] FOREIGN KEY ([IdEnBass...
DROP TABLE IF EXISTS user; DROP TABLE IF EXISTS device; CREATE TABLE user ( id INTEGER PRIMARY KEY AUTOINCREMENT, username TEXT UNIQUE NOT NULL, password TEXT NOT NULL ); CREATE TABLE device ( id INTEGER PRIMARY KEY AUTOINCREMENT, author_id INTEGER NOT NULL, access_token TEXT NOT NULL UNIQUE, name TEXT ...
use aurora; create table users( username varchar(50) not null primary key, password varchar(500) not null, enabled boolean not null); create table authorities ( id int(11) not null primary key auto_increment, username varchar(50) not null, authority varchar(50) not null, constraint fk_authorities_users foreign key(use...
SET FOREIGN_KEY_CHECKS=0; DROP TABLE IF EXISTS `setting`; CREATE TABLE IF NOT EXISTS `setting` (`name` varchar(255) NOT NULL, `value` text ) ENGINE=InnoDB DEFAULT CHARSET=utf8; INSERT INTO `setting` (`name`, `value`) VALUES ('name_1', 'http://google.com'), ('name_2', '/path/to/some/directory'), ('name with spaces', 'de...
<gh_stars>0 -- phpMyAdmin SQL Dump -- version 4.6.5.2 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Sep 07, 2017 at 07:11 AM -- Server version: 10.1.21-MariaDB -- PHP Version: 5.6.30 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@...
<filename>benchmark/YaleLanguages/queries-vectorwise-disabled/15.sql<gh_stars>0 --SELECT "YaleLanguages_5"."Calculation_1730108092045176" AS "Calculation_1730108092045176", COUNT(DISTINCT "YaleLanguages_5"."Bib Id (copy)") AS "ctd:Bib Id (copy):ok" FROM "YaleLanguages_5" WHERE (("YaleLanguages_5"."BIB_SUPPRESS_IN_OPA...
<gh_stars>0 -- Print all Nodes pathes from Nodes label -- -- https://karwin.blogspot.fr/2010/03/rendering-labels-with-closure-tables.html -- ---------------------------------------------------------------------------- SELECT GROUP_CONCAT(n.label, '/') AS "path" FROM Nodes AS n JOIN Tree AS t ON t.pare...
<gh_stars>0 USE PythonDemo GO DECLARE @tmp TABLE (Antecedent varchar(100) ,Consecutive varchar(100) ,SupportAbs int ,Confidence decimal(5,3) ,SupportPCT decimal(5,3)) INSERT @tmp EXEC [dbo].[MineAssociationRules] SELECT TOP(10) * FROM @tmp
<reponame>laravelartisan/hrm<filename>public/uploads/1453290942pqqsvecommerce.sql -- phpMyAdmin SQL Dump -- version 4.1.6 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: Nov 09, 2015 at 06:32 AM -- Server version: 5.6.16 -- PHP Version: 5.5.9 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone...
-- phpMyAdmin SQL Dump -- version 4.7.7 -- https://www.phpmyadmin.net/ -- -- Host: localhost -- Generation Time: Jan 11, 2018 at 02:57 AM -- Server version: 10.1.30-MariaDB -- PHP Version: 7.2.1 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD...
<gh_stars>10-100 -- file:numeric_big.sql ln:347 expect:true INSERT INTO num_exp_div VALUES (7,7,'1.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...
BEGIN; CREATE TABLE Bank (ID INTEGER, Routing TEXT, Account TEXT,FOREIGN KEY(ID) References Accounts(ID) ); PRAGMA user_version = 7; COMMIT;
UPDATE Countries SET CountryName = 'Burma' WHERE CountryName = 'Myanmar' DECLARE @CODE1 char(2) = (SELECT CountryCode FROM Countries WHERE CountryName = 'Tanzania') INSERT INTO Monasteries VALUES('<NAME>', @CODE1) DECLARE @CODE2 char(2) = (SELECT CountryCode FROM Countries WHERE CountryName = 'Myanmar') INSERT INTO Mon...
<gh_stars>10-100 /*Table structure for table `employee_profile` */ CREATE TABLE IF NOT EXISTS `ci_sessions` ( `id` VARCHAR(40) NOT NULL, `ip_address` VARCHAR(45) NOT NULL, `timestamp` INT(10) UNSIGNED NOT NULL DEFAULT '0', `data` BLOB NOT NULL ) ENGINE=INNODB DEFAULT CHARSET=latin1; CREATE TABLE IF NOT EXISTS...
<reponame>johnthethird/postgres-all-the-things -- rambler up CREATE OR REPLACE FUNCTION app_user_id() RETURNS uuid LANGUAGE sql AS $$ SELECT current_setting('app.user_id', true)::uuid; $$; CREATE OR REPLACE FUNCTION app_tenant_id() RETURNS uuid LANGUAGE sql AS $$ SELECT current_setting('app.tenant_id', true)::uui...
-- Type: book_id_input -- DROP TYPE common.book_id_input; CREATE TYPE common.book_id_input AS ( book_id TEXT, book_instance_id TEXT ); ALTER TYPE common.book_id_input OWNER TO silpgadmin;
<filename>so-65386082/src/test/resources/test/CreateDB.sql<gh_stars>1-10 drop table tb_a if exists; create table tb_a ( id int, album_id int, videolibrary_id int ); insert into tb_a (id, album_id, videolibrary_id) values (1, 100, 1000), (2, 101, 1001);
INSERT INTO `guns`.`sys_menu` (`id`, `code`, `pcode`, `pcodes`, `name`, `icon`, `url`, `num`, `levels`, `ismenu`, `tips`, `status`, `isopen`) VALUES ('1088407898850713602', 'visitorLogs', 'message_list', '[0],[message],[message_list],', '浏览记录', '', '/visitorLogs', '99', '2', '1', NULL, '1', '0'); INSERT INTO `guns`.`sy...
<reponame>nicolaslattuada/Openfire TRUNCATE TABLE ofConversation; INSERT INTO ofConversation (conversationID, room, isExternal, startDate, lastActivity, messageCount) SELECT conversationID, room, isExternal, startDate, lastActivity, messageCount FROM entConversation; TRUNCATE TABLE ofConParticipant; INSERT INTO ofConP...
Create or replace FUNCTION __temp_insert_predefined_owner_roles() RETURNS VOID AS $procedure$ DECLARE v_TEMPLATE_OWNER_USER_ID UUID; BEGIN v_TEMPLATE_OWNER_USER_ID := 'DEF0000A-0000-0000-0000-DEF00000000F'; ----------------------------- -- TEMPALTE_OWNER_USER role ----------------------------- DELETE FROM ...
<filename>posda/posdatools/queries/sql/AllPrivateDispositions.sql -- Name: AllPrivateDispositions -- Schema: posda_phi_simple -- Columns: ['element_sig_pattern', 'tag_name', 'vr', 'element_seen_id', 'private_disposition'] -- Args: [] -- Tags: ['tag_usage', 'used_in_phi_maint', 'phi_maint'] -- Description: Private tags ...
#include("system.sql") #include("app.sql")
<reponame>M0WA/jobcenter CREATE TABLE jobcenter.call_stats ( name text NOT NULL PRIMARY KEY, calls bigint DEFAULT 0 NOT NULL ); ALTER TABLE jobcenter.call_stats OWNER TO $JCSYSTEM; CREATE TABLE jobcenter.call_stats_collected ( unique_id boolean NOT NULL PRIMARY KEY DEFAULT TRUE, last timestamp with time zone DE...
-- phpMyAdmin SQL Dump -- version 5.0.2 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Dec 07, 2020 at 02:00 PM -- Server version: 10.4.11-MariaDB -- PHP Version: 7.4.5 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIEN...
<reponame>NguyenPhuongNam99/Wed_ADVANCES -- phpMyAdmin SQL Dump -- version 5.0.3 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Dec 28, 2020 at 02:56 PM -- 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...
<reponame>Athanasius/eddn-listener<gh_stars>0 SELECT gatewaytimestamp,message->>'header' AS header,message->'message'->>'systemName' AS systemName ,message->'message'->>'stationName' AS stationName,message->>'message' AS message FROM messages WHERE gatewaytimestamp > timestamp '2017-08-15 01:45' AND gatewaytimestamp < ...
-- phpMyAdmin SQL Dump -- version 4.8.0 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: May 19, 2018 at 03:37 AM -- Server version: 10.1.31-MariaDB -- PHP Version: 7.2.4 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD...
DELIMITER ENDTRIGGER CREATE TRIGGER trig_after_insert_on_party AFTER INSERT ON party FOR EACH ROW BEGIN SELECT next_value INTO @var_next_id FROM seq_party_id ; IF NEW.id >= @var_next_id THEN UPDATE $DATABASE.seq_party_id SET next_value = NEW.id + 1 ; END IF ; UPDATE $...
SELECT * FROM customers WHERE FULL_TEXT_SEARCH(name, 'john') AND cid IN (1,2,3)
<gh_stars>0 DELIMITER // CREATE TRIGGER `TR_warehouses_AI` AFTER INSERT ON `warehouses` FOR EACH ROW BEGIN UPDATE `clients` SET warehouse_count = warehouse_count + 1 WHERE id = NEW.client_id; END;// DELIMITER // CREATE TRIGGER `TR_warehouses_AD` AFTER DELETE ON `warehouses` FOR EACH ROW BEGIN UPDATE `clients` SET ...
-- phpMyAdmin SQL Dump -- version 4.9.0.1 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Dec 20, 2019 at 03:11 AM -- Server version: 10.4.6-MariaDB -- PHP Version: 7.3.8 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OL...
<gh_stars>0 -- Multi-Table Query Practice -- Display the ProductName and CategoryName for all products in the database. -- Shows 77 records. select Category.CategoryName, Product.ProductName from [Product] join Category on [Product].CategoryId = Category.Id ; -- Display the order Id and shipper CompanyName for all or...
/* Navicat MySQL Data Transfer Source Server : localhost_3306 Source Server Version : 50553 Source Host : localhost:3306 Source Database : laravel Target Server Type : MYSQL Target Server Version : 50553 File Encoding : 65001 Date: 2017-05-26 17:03:15 */ SET FOREIGN_KEY_CHECKS=0; ...
-- phpMyAdmin SQL Dump -- version 4.8.4 -- https://www.phpmyadmin.net/ -- -- Host: localhost -- Generation Time: Jul 08, 2020 at 10:06 PM -- Server version: 10.1.37-MariaDB -- PHP Version: 7.3.0 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD...
<filename>uniphant--1.1.sql -- complain if script is sourced in psql, rather than via CREATE EXTENSION \echo Use "CREATE EXTENSION uniphant" to load this file. \quit CREATE SCHEMA IF NOT EXISTS AUTHORIZATION api; GRANT USAGE ON SCHEMA api TO web_anon; GRANT USAGE ON SCHEMA webauthn TO web_anon; GRANT web_anon TO postgr...
-- Code is reviewed and is in working condition -- Execute in master database -- Get utilization in last 6 hours for the toystore database Declare @StartTime DATETIME = DATEADD(HH,-3,GetUTCDate()), @EndTime DATETIME = GetUTCDate() SELECT database_name, start_time, end_time, avg_cpu_percent, avg_data_io_percen...
-- file:plpgsql.sql ln:4212 expect:false r.ar[2] := 'replace'
<filename>backend/de.metas.adempiere.adempiere/migration/src/main/sql/postgresql/system/10-de.metas.adempiere/5529130_sys_gh5439_Delete_Duplicate_element.sql -- 2019-08-21T11:46:28.206Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator DELETE FROM AD_UI_ElementField WHERE AD_UI_ElementField_ID=540157 ; ...
<gh_stars>0 CREATE OR REPLACE FUNCTION utils.get_first_blobcsid(title character varying) RETURNS character varying LANGUAGE plpgsql IMMUTABLE STRICT AS $function$ DECLARE blobcsid VARCHAR(50); BEGIN select mc.blobcsid into blobcsid from collectionobjects_common co JOIN hierarchy hrel on (co.id = hrel.id) ...
create user test identified by test default tablespace users quota 100m on users; grant connect, resource to test;
CREATE TABLE IF NOT EXISTS `ACTIVITY`( `ACTIVITY_ID` INT AUTO_INCREMENT PRIMARY KEY, `USER_NAME` VARCHAR(100) NOT NULL, `REPOSITORY_NAME` VARCHAR(100) NOT NULL, `ACTIVITY_USER_NAME` VARCHAR(100) NOT NULL, `ACTIVITY_TYPE` VARCHAR(100) NOT NULL, `MESSAGE` TEXT NOT NULL, `ADDITIONAL_INFO` TEXT, `ACTIVITY_DATE` ...
<filename>dbms/tests/queries/0_stateless/00446_drop_column.sql DROP TABLE IF EXISTS test.drop_column; CREATE TABLE test.drop_column (d Date, num Int64, str String) ENGINE = MergeTree(d, d, 8192); insert into test.drop_column values ('2016-12-12', 1, 'a'), ('2016-11-12', 2, 'b'); SELECT num, str FROM test.drop_column ...
/* Navicat MySQL Data Transfer Source Server : spring-boot-samples Source Server Version : 50554 Source Host : localhost:3306 Source Database : reserve Target Server Type : MYSQL Target Server Version : 50554 File Encoding : 65001 Date: 2019-11-07 03:18:25 */ SET FOREIGN_KEY_CHECK...
insert into `users` (`name`) values ('jean'), ('pierre'); insert into `sites` (`name`, `location`, `details`) values ('Fontainebleau', POINT(48.2435, 2.4209), 'Site de Fontainebleau'), ('El Cap', POINT(47.223804625757275, -1.6411705517186224), 'Salle d’escalade'); insert into `areas` (`name`, `site_id`) values ...
create table items ( id serial primary key, description varchar(200), created timestamp, done boolean );
CREATE TABLE IF NOT EXISTS `acars_live` ( `acars_live_id` int(11) NOT NULL AUTO_INCREMENT, `ident` varchar(10) NULL, `registration` varchar(10) NULL, `label` varchar(10) NULL, `block_id` int(11) NULL, `msg_no` varchar(10) NULL, `message` text NULL, `date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, ...
CREATE TABLE `car_imicms_wxuser` ( `id` int(11) NOT NULL AUTO_INCREMENT, `uid` int(11) NOT NULL, `wxname` varchar(60) NOT NULL COMMENT '公众号名称', `winxintype` smallint(2) NOT NULL DEFAULT '1', `appid` varchar(50) NOT NULL DEFAULT '', `appsecret` varchar(50) NOT NULL DEFAULT '', `wxid` varchar(20) NOT NULL C...
CREATE PROCEDURE SP278(OUT MYCOUNT INTEGER) SPECIFIC SP278_114256 LANGUAGE SQL NOT DETERMINISTIC READS SQL DATA NEW SAVEPOINT LEVEL BEGIN ATOMIC DECLARE MYVAR INT;SELECT COUNT(*)INTO MYCOUNT FROM TABLE425;SELECT COUNT(*)INTO MYCOUNT FROM TABLE184;SELECT COUNT(*)INTO MYCOUNT FROM TABLE136;SELECT COUNT(*)INTO MYCOUNT FRO...
<filename>migrations/sql/V2019.08.22.12.53__add_legacy_mms_status.sql ALTER TABLE IF EXISTS ETL_STATUS ADD COLUMN IF NOT EXISTS legacy_mms_mine_status character varying(50); ALTER TABLE IF EXISTS mine ADD COLUMN IF NOT EXISTS legacy_mms_mine_status character varying(50); COMMENT ON COLUMN mine.legacy_mms_mine_status I...
<filename>macros/secondary_calculations/secondary_calculation_rolling.sql {% macro default__secondary_calculation_rolling(metric_name, dimensions, calc_config) %} {% set calc_sql %} {{ adapter.dispatch('aggregate_primary_metric', 'metrics')(calc_config.aggregate, metric_name) }} over ( {...
<filename>migrations/4.sql CREATE TEMP TABLE "tag_backup"("id" INTEGER PRIMARY KEY,"name" VARCHAR NOT NULL,CONSTRAINT "unique_tag" UNIQUE ("name")); INSERT INTO "tag_backup"("id","name") SELECT "id","tag" FROM "tag"; DROP TABLE "tag"; CREATE TABLE "tag"("id" INTEGER PRIMARY KEY,"name" VARCHAR NOT NULL,CONSTRAINT "uniqu...
-- retrieves the list of AppTerms for a given MappingApplication, -- given an id from from one of the AppTerms. with -- get the app_id from the sibling AppTerm id w_app_id as ( select app_id from public.app_term as apt where apt.uuid = ${_uuid} ), ...
-- phpMyAdmin SQL Dump -- version 5.1.0 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Jul 23, 2021 at 01:47 PM -- Server version: 10.4.18-MariaDB -- PHP Version: 7.3.27 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIE...
select prd.barcode, prd.name, prd.brand_name, prd.price, prd.category as category_id, c.name as category_name from products as prd, product_category as c where prd.category = c.category_id and prd.barcode = ?;
select cid, name from customers UNION ALL select cid, cast (order_date as VARCHAR(32)) from orders
--FUNCION PARA MOSTRAR DE LA TABLA TODOS LOS REGISTROS ACTIVOS CREATE FUNCTION[fn_Profesores_SeleccionarTodos]() RETURNS TABLE AS RETURN SELECT * FROM Profesores A WHERE A.Activo = 1 GO
-- phpMyAdmin SQL Dump -- version 4.9.5 -- https://www.phpmyadmin.net/ -- -- Host: localhost:3306 -- Generation Time: Nov 09, 2020 at 07:25 AM -- Server version: 5.7.32 -- PHP Version: 7.3.6 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHA...
DROP TABLE IF EXISTS `armorsets`; CREATE TABLE `armorsets` ( `id` SMALLINT UNSIGNED NOT NULL auto_increment, `chest` SMALLINT UNSIGNED NOT NULL default 0, `legs` SMALLINT UNSIGNED NOT NULL default 0, `head` SMALLINT UNSIGNED NOT NULL default 0, `gloves` SMALLINT UNSIGNED NOT NULL default 0, `feet` SMALLINT UNSIGN...
-- phpMyAdmin SQL Dump -- version 4.8.5 -- https://www.phpmyadmin.net/ -- -- Host: 1172.16.17.32 -- Generation Time: Jun 26, 2019 at 12:43 PM -- Server version: 10.1.38-MariaDB -- PHP Version: 7.1.26 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET...
EXEC [EST].[Proc_yjbb_Ins] @Code = N'600260',@CutoffDate = N'2017-09-30',@EPS = N'0.77',@EPSDeduct = N'0',@Revenue = N'112.90亿',@RevenueYoy = N'104.44',@RevenueQoq = N'-10.52',@Profit = N'5.20亿',@ProfitYoy = N'360.35',@ProfiltQoq = N'-35.55',@NAVPerUnit = N'6.3263',@ROE = N'14.89',@CashPerUnit = N'-1.4192',@GrossProfit...