sql
stringlengths
6
1.05M
# Consecutive Numbers SELECT DISTINCT a.Nums as ConsecutiveNums from Logs a, logs b, logs c WHERE a.Id = b.Id-1 AND b.Id=c.Id-1 And a.Num = b.Num And b.Num = c.Num
<reponame>LittleHappyTree/vastex -- phpMyAdmin SQL Dump -- version 4.8.1 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Nov 20, 2019 at 10:07 AM -- Server version: 10.1.33-MariaDB -- PHP Version: 7.1.18 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zo...
<reponame>im-your-sathish/laravel<filename>crudlara.sql -- phpMyAdmin SQL Dump -- version 5.0.4 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Sep 22, 2021 at 06:44 AM -- Server version: 10.4.17-MariaDB -- PHP Version: 8.0.0 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_...
BEGIN; CREATE TABLE [products] ( [id] varchar(255) NOT NULL, [name] varchar(50) NOT NULL, [created_at] varchar(50) NOT NULL, [updated_at] varchar(50) NOT NULL, PRIMARY KEY ([id]) ); CREATE UNIQUE INDEX [UK_products_name] ON [products]([name]); END;
{### SQL to delete tablespace object ###} DROP TABLESPACE {{ conn|qtIdent(tsname) }};
<reponame>jiveabillion/GraphQL.EntityFrameworkCore.DynamicLinq IF OBJECT_ID('Orders') IS NOT NULL DROP TABLE Orders; GO IF OBJECT_ID('Customers') IS NOT NULL DROP TABLE Customers; GO CREATE TABLE Customers ( CustomerID int NOT NULL IDENTITY (1, 1) PRIMARY KEY, CustomerName nvarchar(200) ) GO CREATE TABLE Orde...
ALTER TABLE pexcard_action MODIFY COLUMN action ENUM( 'shift-started','shift-finished','order-accepted','order-cancelled','arbritary','remove-funds','order-rejected', 'zero' );
<gh_stars>1-10 /* Formatted on 12-19-2018 12:45:28 PM (QP5 v5.126.903.23003) */ CREATE OR REPLACE FUNCTION SEC.GETDB_DATE_TIME RETURN VARCHAR2 AS L_RESULT VARCHAR2 (200 BYTE); BEGIN SELECT TO_CHAR (SYSDATE, 'RRRR-MM-DD HH24:MI:SS') INTO L_RESULT FROM DUAL; RETURN L_RESULT; EXCEPTION WHEN OTHERS T...
-- For PC local to PI <NAME> half bmp -- The average of the ping current values, this will be the second value displayed SELECT avg(wattage) FROM PowerMeasurement WHERE strftime('%H %M %S %f', date) BETWEEN strftime('%H %M %S %f', '2022-03-15 18:06:33.700457') AND strftime('%H %M %S %f', '2022-03-15 18:06:47.642154'...
<reponame>Shuttl-Tech/antlr_psql -- file:plpgsql.sql ln:1211 expect:true insert into WSlot values ('WS.106.3b', '106', '', '')
CREATE TABLE `inbox` ( `msgid` blob, `toaddress` text, `fromaddress` text, `subject` text, `received` text, `message` text, `folder` text, `encodingtype` int, `read` bool, `sighash` blob, UNIQUE(msgid) ON CONFLICT REPLACE ) ; CREATE TABLE `sent` ( `msgid` blob, `toaddress` text, ...
<reponame>bekuno/oc-server3 SET NAMES 'utf8'; DROP TABLE IF EXISTS `log_types`; CREATE TABLE `log_types` ( `id` tinyint(3) unsigned NOT NULL AUTO_INCREMENT, `name` varchar(80) NOT NULL, `trans_id` int(10) unsigned NOT NULL, `permission` char(1) NOT NULL COMMENT 'obsolete', `cache_status` tinyint(1) NOT NULL D...
<reponame>dram/metasfresh<gh_stars>1000+ -- 2017-06-20T17:53:46.183 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Ref_List SET ValueName='VirtualPI',Updated=TO_TIMESTAMP('2017-06-20 17:53:46','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Ref_List_ID=540817 ; -- 2017-06-20T17:53:54.948 -...
ALTER TABLE db_version CHANGE COLUMN required_8607_02_mangos_command required_8608_01_mangos_mangos_string bit; DELETE FROM mangos_string WHERE entry>756 and entry<791; DELETE FROM mangos_string WHERE entry=752 or entry=753; INSERT INTO mangos_string VALUES (752,'Only the Alliance can use that portal',NULL,NULL,NULL,N...
CREATE DATABASE mrt; USE mrt; CREATE TABLE `estoque` ( `id_estoque` int(11) NOT NULL AUTO_INCREMENT, `valor_Custo` float DEFAULT NULL, `valor_Venda` float DEFAULT NULL, `nome_Produto` varchar(50) DEFAULT NULL, `desc_Produto` varchar(100) DEFAULT NULL, `qtd_Produto` int(11) DEFAULT NULL, `fl_ativo` int...
-- -- this test shows the current supported comparison operators -- -- first, do comparisons on the int type -- create a table with couple of int columns create table inttab (c1 int, c2 int); -- insert some values insert into inttab values (0, 0); insert into inttab values (null, 5); insert into inttab v...
DROP KEYSPACE IF EXISTS gate;
--- As of 03/27/2014 insert into application.instance_types (INSTANCE_TYPE,NUM_BITS,NUM_CORES,MEMORY_MB) values ('t2.micro',64,1,1024); insert into application.instance_types (INSTANCE_TYPE,NUM_BITS,NUM_CORES,MEMORY_MB) values ('t2.small',64,1,2048); insert into application.instance_types (INSTANCE_TYPE,NUM_BITS,NUM_...
REM sample script to reset dba_directories to new locations create or replace directory DATA_PUMP_DIR as '/home/delphix/datapump';
INSERT INTO rebels VALUES(1, '<NAME>'); INSERT INTO rebels VALUES(2, '<NAME>'); -- now evil empire sends all of them to slavery --- BEGIN; ALTER TABLE rebels ENABLE REPLICATION; ALTER TABLE rebels ENABLE REPLICATION ON SLAVE 0; COMMIT;
/* contrib/unaccent/unaccent--1.0.sql */ CREATE FUNCTION unaccent(regdictionary, text) RETURNS text AS 'MODULE_PATHNAME', 'unaccent_dict' LANGUAGE C STABLE STRICT; CREATE FUNCTION unaccent(text) RETURNS text AS 'MODULE_PATHNAME', 'unaccent_dict' LANGUAGE C STABLE STRICT; CREATE FUNCTION unaccent_init(internal)...
-- [er] create class using Constraints null, Unique and SHARED create table t1 ( c1 int null SHARED 9 Unique ); drop t1;
<filename>openGaussBase/testcase/KEYWORDS/on/Opengauss_Function_Keyword_On_Case0029.sql<gh_stars>0 -- @testpoint:openGauss保留关键字on作为作为表空间名, --不带引号,合理报错 drop tablespace if exists on; CREATE TABLESPACE on RELATIVE LOCATION 'hdfs_tablespace/hdfs_tablespace_1'; --加双引号,创建成功 drop tablespace if exists "on"; CREATE TABLESPACE...
drop table if exists booking; drop table if exists desk_user; create table desk_user (id SERIAL PRIMARY KEY, username VARCHAR(200) not null); create table booking ( id SERIAL PRIMARY KEY, desk_user_id INT REFERENCES desk_user(id), booking_date DATE ); INSERT INTO desk_user (username) VALUES ('Maha'); INSER...
INSERT INTO department (dep_name) VALUES ('Tech Support'), ('Software Intern'), ('Software Engineer'), ('Management'), ('Zar'); INSERT INTO postion (title,department_id) VALUES ('Tech Support',1), ('Software Intern',2), ('Software Engineer',3), ('Management',4), ('Zar',5); INSERT INTO employee (first_name,last_name,...
CREATE TABLE IF NOT EXISTS `regencies` ( `id` bigint(64) unsigned NOT NULL, `province_id` bigint(64) unsigned NOT NULL, `name` varchar(255) NULL, `alt_name` varchar(255) NULL, `latitude` float(8) NULL, `longitude` float(8) NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; INSER...
<gh_stars>0 -- org_person_student_retention with year_id and year_name added CREATE OR REPLACE ALGORITHM = MERGE DEFINER = `synapsemaster`@`%` SQL SECURITY INVOKER VIEW `org_person_student_retention_view` AS SELECT opsr.organization_id, opsr.person_id, oay.year_id AS year_id, oay.name AS y...
<filename>variants/demo/queries/select-bad-multi-results.sql -- Returns multiple rows SELECT 1 FROM DUAL UNION SELECT 2 FROM DUAL
DROP DATABASE IF EXISTS `ajax-chat`; CREATE DATABASE `ajax-chat` CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; GRANT ALL PRIVILEGES ON `ajax-chat`.* TO 'ajax-chat-user'@'localhost' IDENTIFIED BY 'We Love SQL API!'; USE `ajax-chat`; CREATE TABLE `message` ( `id` INT AUTO_INCREMENT PRIMARY KEY, `text` TEXT...
<reponame>AdrianSilvadoNascimento/Javaee -- MySQL dump 10.13 Distrib 8.0.21, for Win64 (x86_64) -- -- Host: 127.0.0.1 Database: dbagenda -- ------------------------------------------------------ -- Server version 8.0.21 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHAR...
-- phpMyAdmin SQL Dump -- version 4.8.2 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Oct 17, 2018 at 12:47 AM -- Server version: 10.1.34-MariaDB -- PHP Version: 7.2.7 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD...
<gh_stars>0 -- phpMyAdmin SQL Dump -- version 5.0.4 -- https://www.phpmyadmin.net/ -- -- Хост: 127.0.0.1:3306 -- Время создания: Ноя 16 2021 г., 13:36 -- Версия сервера: 8.0.19 -- Версия PHP: 7.4.14 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_C...
<gh_stars>0 -- -------------------------------------------------------- -- Host: localhost -- Versión del servidor: 8.0.14 - MySQL Community Server - GPL -- SO del servidor: Win64 -- HeidiSQL Versión: 9.5.0.5332 -- ------------------------------------------------...
CREATE SCHEMA IF NOT EXISTS demo;
DROP DATABASE IF EXISTS iptables_rules_db; CREATE DATABASE iptables_rules_db; USE iptables_rules_db; DROP TABLE IF EXISTS `rules`; CREATE TABLE `rules` ( `id` int NOT NULL AUTO_INCREMENT, `action` varchar(20) NOT NULL, `chain` varchar(20) NOT NULL, `protocol` varchar(20) NOT NULL, `ip_src` varchar(...
ALTER TABLE `pexcard_action` CHANGE `action` `action` enum('shift-started','shift-finished','order-accepted','order-cancelled','arbritary','remove-funds') DEFAULT NULL;
-- file:create_view.sql ln:92 expect:true CREATE SCHEMA test_schema CREATE TEMP VIEW testview AS SELECT 1
<reponame>Shuttl-Tech/antlr_psql<gh_stars>10-100 -- file:groupingsets.sql ln:29 expect:false 1 1 1 1 2 2 2 2 \. alter table gstest3 add primary key (a)
USE [perpetuumsa] GO --------------------------------------------------------- -- Add table to configure rifts and level per zone -- -- Date: 2020/08/03 --------------------------------------------------------- DROP TABLE IF EXISTS dbo.zoneriftsconfig; CREATE TABLE dbo.zoneriftsconfig ( id INT NOT NULL IDENTITY ...
IF EXISTS (select * from dbo.sysobjects where id = object_id(N'uspGetASApplicationVariableByName1') and OBJECTPROPERTY(id, N'IsProcedure') = 1) DROP PROCEDURE uspGetASApplicationVariableByName1 Go /* uspGetASApplicationVariableByName1 * * Returns value of app variable by name of variable * */ CREATE PROCEDURE usp...
-- Retrieve by name and frequency and ordered by increasing name -- those unique Badges that have been awarded at least five times, -- but never before 2014 and never after 2019 -- 1.1 marks: <6 operators -- 1.0 marks: <8 operators -- 0.8 marks: correct answer -- Replace this comment line with the actual query
INSERT IGNORE INTO formation_types (id, title, slug) VALUES (1, 'Certificats et diplômes', 'certificats-et-diplomes'); INSERT IGNORE INTO formation_types (id, title, slug) VALUES (2, 'Digital', 'digital'); INSERT IGNORE INTO formation_types (id, title, slug) VALUES (3, 'Formations catalogue', 'formations-catalogue'); I...
-- SQL -- 2. Show address information for each person. It's not important which address it is right now. select people.name, address.address from people inner join address on people.id= address.id; -- results: -- A address-1-2 -- A address-1-1 -- B address-2-1 -- C address-3-3 -- C address-3-2 -- C address-3-1 -- D ...
<reponame>prady00/Laravel-Swagger-REST -- phpMyAdmin SQL Dump -- version 4.1.12 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: May 14, 2015 at 07:39 PM -- Server version: 5.6.16 -- PHP Version: 5.5.11 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; -- -- Database...
-- Creates a Table. -- Drop the table if it exists; DROP TABLE IF EXISTS usertable; -- Create the user table with 5 fields. CREATE TABLE usertable(YCSB_KEY VARCHAR PRIMARY KEY, FIELD1 VARCHAR, FIELD2 VARCHAR, FIELD3 VARCHAR, FIELD4 VARCHAR, FIELD5 VARCHAR, FIELD6 VARCHAR, FIELD7 VARCHAR, FIELD8 VARCHAR, FIE...
<filename>SEQUENCE/TRANS_AGENT_ROLE_RESTRICTIONS.sql CREATE SEQUENCE "TRANS_AGENT_ROLE_RESTRICTIONS" MINVALUE 1 MAXVALUE 9999999999999999999999999999 INCREMENT BY 1 START WITH 41 CACHE 20 NOORDER NOCYCLE
<reponame>SocialGouv/emjpm ALTER TABLE "public"."services" DROP COLUMN "last_update";
<gh_stars>10-100 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 ...
<filename>queries/chapter5/part9.sql -- 商品別に、2007年6月から8月までのそれぞれの月の販売額の推移を出しなさい。 -- なお、7月と8月は前月に対して、増加・変化なし・減少のそれぞれについて、↑・→・↓でそれぞれ表現しなさい。 -- (出力項目:ProductID、ProductName、6月販売金額、7月販売金額、対6月増減、8月販売金額、対7月増減;出力順: -- ❶クロス集計を使います -- ❷グループ化を使います -- ❸外部結合を使います -- ❹副問い合わせを使います -- ❺並び替えを使います -- productid | 年月 | productid | pro...
-- @testpoint:关键字limit作为临时表的列名在insert语句的使用 drop table if exists test_temporary_limit_002; create temporary table test_temporary_limit_002("limit" int); insert into test_temporary_limit_002 values (1); commit; select "limit" from test_temporary_limit_002 order by "limit";
<gh_stars>0 -- @testpoint: opengauss关键字when(保留),作为同义词对象名,部分测试点合理报错 --前置条件 drop table if exists when_test; create table when_test(id int,name varchar(10)); --关键字不带引号-失败 drop synonym if exists when; create synonym when for when_test; --关键字带双引号-成功 drop synonym if exists "when"; create synonym "when" for when_test; in...
CREATE FOREIGN TABLE products (id SERIAL, price float); INSERT INTO products (price) VALUES (3.141); INSERT INTO products (price) VALUES (2.718); INSERT INTO products (price) VALUES (2.236); INSERT INTO products (price) VALUES (2.828); CREATE VIEW products_above_average_price AS SELECT id, price FROM products WHERE p...
<gh_stars>0 -- phpMyAdmin SQL Dump -- version 4.8.3 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Jul 17, 2019 at 11:18 AM -- Server version: 10.1.35-MariaDB -- PHP Version: 7.2.9 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40...
<reponame>sandeepDevJs/mycard -- phpMyAdmin SQL Dump -- version 5.0.2 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Sep 17, 2020 at 07:56 AM -- Server version: 10.4.14-MariaDB -- PHP Version: 7.2.33 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!401...
INSERT INTO Division(name) VALUES('Platinum'); INSERT INTO Division(name) VALUES('Gold'); INSERT INTO Division(name) VALUES('Silver'); INSERT INTO Division(name) VALUES('Steel'); INSERT INTO Division(name) VALUES('Iron'); INSERT INTO Division(name) VALUES('Invite'); INSERT INTO Division(name) VALUES('Intermediate'); IN...
-- MySQL dump 10.13 Distrib 5.7.17, for Win64 (x86_64) -- -- Host: 127.0.0.1 Database: scheduler -- ------------------------------------------------------ -- Server version 8.0.11 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /...
<gh_stars>1-10 CREATE TABLE IF NOT EXISTS iotdevice.iotdevice01 ( `cpu_temp` Float64, `cpu_freq` Float64, `mem_usage` Float64, `swap_usage` Float64, `disk_usage` Float64, `measured_date` DateTime('UTC') ) ENGINE = MergeTree() PARTITION BY toYYYYMM(measured_date) ORDER BY (measured_date)
-- schema for postgrest database used for limits create table sites ( id bigserial primary key, public_key varchar(30) not null unique, auth_key varchar(72) not null, created timestamptz not null default current_timestamp, site_size int not null default 0, user_agent varchar(200), ip_address varchar(50) ...
-- These temporary tables need to be created when creating the database connection. -- What needs to be billed. This can be used for any resources, past or future, so can be used by the billing calculator. CREATE TEMPORARY TABLE IF NOT EXISTS billable_resources ( valid_from TIMESTAMP NOT NULL, valid_to TIMESTA...
-- view.test -- -- execsql { -- CREATE TABLE t1(x,a,b,c); -- INSERT INTO t1 VALUES(1,2,3,4); -- INSERT INTO t1 VALUES(4,5,6,7); -- INSERT INTO t1 VALUES(7,8,9,10); -- SELECT * FROM v1 ORDER BY a; -- } CREATE TABLE t1(x,a,b,c); INSERT INTO t1 VALUES(1,2,3,4); INSERT INTO t1 VALUES(4,5,6,7); INSERT I...
-- 1. Elimine la tabla "luz", si existe: DROP TABLE IF EXISTS luz; -- 2. Cree la tabla: CREATE TABLE luz( documento CHAR(8) NOT NULL, domicilio VARCHAR(30), monto DECIMAL(5,2) UNSIGNED, vencimiento DATE ); -- 3. Ingrese algunos registros con fechas de vencimiento anterior a la fecha actual (vencidas) y -- po...
-- Run with a superuser -- > sudo su postgres -- > psql < setup.sql DO $do$ BEGIN IF NOT EXISTS (SELECT FROM pg_catalog.pg_roles WHERE rolname = 'riverdb_test') THEN CREATE ROLE riverdb_test LOGIN PASSWORD '<PASSWORD>'; CREATE DATABASE riverdb_test; GRANT ALL PRIVILEGES...
-- 2018-05-30T11:57:15.945 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Table SET AD_Window_ID=540441,Updated=TO_TIMESTAMP('2018-05-30 11:57:15','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Table_ID=339 ; -- 2018-05-30T12:05:53.697 -- I forgot to set the DICTIONARY_ID_COMMENTS System ...
/* Menu =============================================================================*/ /*Categorias*/ INSERT IGNORE INTO accelog_categorias (idcategoria, nombre, icono, orden) VALUES (1051, 'Servicios', 0, 1), (1052, 'Reservaciones', 0, 2), (1053, 'Recetas', 0, 3); /*Aumenta el orden de las demas categorias para ...
create or replace PACKAGE TM_DATA_ACT_LOAD_PKG AS /* Create By - <NAME> Created - May 2020 Prerequisites - Standard i2b2 schema, TM_CZ user(where this package will be compiled) having DML permissions on i2b2 tables. - Procedure PRC_CRT_TABLES_ACT_HPDS_LOAD has to be run to create objects ne...
create table if not exists app_table_list ( id serial primary key, tableList_id bigint references tableList (id), app_id bigint references apps (id) );
ALTER TABLE redrain.as_shop ADD business_district_id INT(11) DEFAULT 0 NULL; CREATE TABLE as_consultation_banner ( consultation_banner_id INT(11) PRIMARY KEY NOT NULL AUTO_INCREMENT, type_id INT(11) NOT NULL COMMENT '咨询类型id', consultation_id INT(11) NOT NULL COMMENT '咨询id', bannner_img VARCHAR(255) NOT...
select int64_4 from nulls where int64_4 <= -45000000000 -45000000000 -47000000000
CREATE OR REPLACE FUNCTION add_vm_device_03_01_0200() RETURNS void AS $function$ BEGIN IF NOT EXISTS (SELECT * FROM information_schema.tables WHERE table_name ILIKE 'vm_device') THEN -- Add the vm_device table. CREATE TABLE vm_device ( device_id UUID NOT NULL, vm_id UUID NOT ...
SELECT cast('20岁以下' as char) as name, COUNT(DATE_FORMAT(NOW(),'%Y') - DATE_FORMAT(birthday,'%Y')) as value FROM hm_applicant WHERE (DATE_FORMAT(NOW(),'%Y') - DATE_FORMAT(birthday,'%Y')) <= 20 UNION SELECT cast('20 - 40岁' as char) as name, COUNT(DATE_FORMAT(NOW(),'%Y') - DATE_FORMAT(birthday,'%Y')) as value FR...
BEGIN; ALTER TABLE default_repos ADD PRIMARY KEY(repo_id); COMMIT;
CREATE DATABASE DB2 GO CREATE TABLE tblDemo ( Id int primary key, Name char(20) ) GO DROP DATABASE DB2 COMMMIT
<filename>sql/_02_user_authorization/_02_authorization/_001_grant/cases/1050.sql --+ holdcas on; --grant a common user privilege on system tables call login('dba') on class db_user; call add_user('user1') on class db_user; grant select on db_class to user1; call login('user1') on class db_user; select * from db_clas...
-- @testpoint: last_day函数参数为表的date类型的列 drop table if exists last_day_t001; create table last_day_t001( COL_49 date ); truncate table last_day_t001; begin for i in 1..100 loop insert into last_day_t001 values( date'2020-06-17 10:00:00' ); end loop; end; / select distinct last_day(COL_49) fro...
-- phpMyAdmin SQL Dump -- version 5.0.1 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Apr 18, 2020 at 04:50 PM -- Server version: 10.4.11-MariaDB -- PHP Version: 7.4.2 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD...
<gh_stars>0  CREATE TABLE [dbo].[JobEmailTemplate]( [Id] INT NOT NULL IDENTITY, [TemplateOpenPeriod] VARCHAR(500) NOT NULL, [TemplateClosePeriod] VARCHAR(500) NULL , [JobStatus] SMALLINT NOT NULL, [Active] BIT NOT NULL DEFAULT 1, [JobType] SMALLINT NOT NULL DEFAULT 1 --[CreatedOn] ...
<gh_stars>0 CREATE TABLE AuthTypeMethod ( AuthTypeMethodID int(11) PRIMARY KEY NOT NULL AUTO_INCREMENT, AuthTypeID int(11) NOT NULL, MethodID int(11) NOT NULL ); CREATE UNIQUE INDEX AuthTypeMethod_AuthTypeID_MethodID_uindex ON AuthTypeMethod (AuthTypeID, MethodID);
<filename>sql/yjbb/603906.sql EXEC [EST].[Proc_yjbb_Ins] @Code = N'603906',@CutoffDate = N'2017-09-30',@EPS = N'0.37',@EPSDeduct = N'0',@Revenue = N'9.20亿',@RevenueYoy = N'29.36',@RevenueQoq = N'1.65',@Profit = N'7115.65万',@ProfitYoy = N'11.13',@ProfiltQoq = N'16.74',@NAVPerUnit = N'5.6025',@ROE = N'6.92',@CashPerUnit ...
<reponame>web3go-xyz/ethereum-etl-pg -- Table: public.blocks -- DROP TABLE IF EXISTS public.blocks; CREATE TABLE IF NOT EXISTS public.blocks ( "timestamp" timestamp without time zone, "number" bigint, hash character varying(66) COLLATE pg_catalog."default" NOT NULL, parent_hash character varying(66) C...
-- -------------------------------------------------------- -- Hôte : localhost -- Version du serveur: 5.7.24 - MySQL Community Server (GPL) -- SE du serveur: Win32 -- HeidiSQL Version: 9.5.0.5337 -- -------------------------------------------------------...
<gh_stars>1-10 ALTER TABLE egpt_mv_propertyinfo RENAME aggregate_current_demand TO AGGREGATE_CURRENT_FIRSTHALF_DEMAND; ALTER TABLE egpt_mv_propertyinfo RENAME current_collection TO CURRENT_FIRSTHALF_COLLECTION; ALTER TABLE egpt_mv_propertyinfo RENAME pen_aggr_current_demand TO pen_aggr_current_firsthalf_demand; ALTER T...
<gh_stars>10-100 UPDATE Chats SET StartDate = SentOn FROM Messages JOIN Chats ON Messages.ChatId = Chats.Id WHERE StartDate > SentOn
<reponame>ChristianWulf/grammars-v4 call dbms_scheduler.auto_purge ( )
<reponame>sonnt85/onlymail<gh_stars>0 -- Bypass greylisting for big ISPs. -- To contribute, please -- 1) Create a new topic in our online support forum: http://www.iredmail.org/forum/ -- 2) Or, open an issue in https://bitbucket.org/zhb/iredmail/issues INSERT INTO greylisting_whitelist (Source,Comment,Disabled) VALUES...
<filename>workshop-exercises/Workshop/07_Table_Metadata/.information_schema.sql /* ******************************************************************************************************* Copyright (C) 2019-Present Pivotal Software, Inc. All rights reserved. This program and the accompanying materials are made available...
CREATE TABLE "FIXMAMMPARTS" ( "COLLECTION_OBJECT_ID" NUMBER )
<reponame>sozuer53/BBC<filename>query.sql /****** Script for SelectTopNRows command from SSMS ******/ /*Slider dogrulama Querysi*/ SELECT TOP (1000) Count(*),Sum([Puan]) ,[TarifAndReceteId] FROM [BBCDb.Dev].[dbo].[Popularities] group by TarifAndReceteId /*Update Table*/ UPDATE Contents SET ...
insert into JPQL_CUSTOMER(CUSTOMER_ID, NAME) values(null, 'John'); insert into JPQL_CUSTOMER(CUSTOMER_ID, NAME) values(null, 'Carl'); insert into JPQL_CUSTOMER(CUSTOMER_ID, NAME) values(null, 'Paul'); insert into JPQL_PRODUCT(PRODUCT_ID, NAME, PRICE) values(null, 'Halloween scary latte', 4.55); insert into JPQL_PRODUC...
DROP INDEX blockchainevents_listener_id; ALTER TABLE blockchainevents RENAME COLUMN listener_id TO subscription_id; CREATE INDEX blockchainevents_subscription_id ON blockchainevents(subscription_id);
<gh_stars>1000+ alter table ACT_RU_EXECUTION add REFERENCE_ID_ NVARCHAR2(255); alter table ACT_RU_EXECUTION add REFERENCE_TYPE_ NVARCHAR2(255); update ACT_GE_PROPERTY set VALUE_ = '6.5.0.4' where NAME_ = 'schema.version';
<reponame>zikfrid/lvivbud.dev # Dummy file so that Joomla! can record the schema version in its database
/*L Copyright SAIC Distributed under the OSI-approved BSD 3-Clause License. See http://ncip.github.com/cabio/LICENSE.txt for details. L*/ ALTER TABLE ZSTG_OLD_PROTOCOLS DROP PRIMARY KEY CASCADE / DROP TABLE ZSTG_OLD_PROTOCOLS CASCADE CONSTRAINTS PURGE / -- -- ZSTG_OLD_PROTOCOLS (Table) -- CREATE TABLE ZS...
-- @testpoint:opengauss关键字K(非保留),作为外部数据源名 --关键字不带引号-成功 drop data source if exists K; create data source K; drop data source K; --关键字带双引号-成功 drop data source if exists "K"; create data source "K"; drop data source "K"; --关键字带单引号-合理报错 drop data source if exists 'K'; create data source 'K'; --关键字带反引号-合理报错 drop data s...
<filename>vehicules.sql -- phpMyAdmin SQL Dump -- version 4.8.3 -- https://www.phpmyadmin.net/ -- -- Hôte : 127.0.0.1:3306 -- Généré le : mar. 08 jan. 2019 à 20:36 -- Version du serveur : 5.7.23 -- Version de PHP : 7.2.10 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone =...
SELECT * FROM Reservations;
-- Your SQL goes here ALTER TABLE tournaments ADD COLUMN start_date DATE NOT NULL DEFAULT CURRENT_DATE; ALTER TABLE tournaments ADD COLUMN end_date DATE NOT NULL DEFAULT CURRENT_DATE;
<gh_stars>0 SELECT distinct(nf.agn_in_codigo) FROM MGVEN.VEN_NOTAFISCAL NF, mgglo.glo_agentes agn, mgglo.glo_agentes_id id WHERE nf.agn_in_codigo = agn.agn_in_codigo and agn.agn_in_codigo = id.agn_in_codigo and nf.not_dt_emissao in (select max(p.not_dt_emissao) from mgven.ven_notafiscal p where p.agn_in_codigo = nf....
<reponame>sbenten/osm_routing_import<gh_stars>0 CREATE FUNCTION setpublictransportlinks(level integer) RETURNS void LANGUAGE plpgsql AS $$ /* Add POSSIBLE connections between public transport vehicles. This only checks that the same public transport stop is used by different service. It DOES NOT check the timin...
-- -- Table structure for table roles -- CREATE TABLE IF NOT EXISTS roles ( id int(11) NOT NULL AUTO_INCREMENT, name varchar(255) NOT NULL, created_at datetime NOT NULL, modified_at datetime NOT NULL, PRIMARY KEY (id) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; -- -------------------------------...
<reponame>ffis/compass<filename>install/tables/motivoalta.sql CREATE TABLE [dbo].[motivoalta]( [id] [int] NOT NULL, [cod_hl7] [varchar](50) NOT NULL, [descripcion] [varchar](50) NOT NULL, [tipo] [varchar](50) NOT NULL, [tipo_acto] [varchar](50) NOT NULL, CONSTRAINT [PK_motivoalta] PRIMARY KEY CLUSTERED ( [id] A...