sql
stringlengths
6
1.05M
<reponame>Jinhua-Lee/spring-batch-demo drop table if exists person; -- 创建person表 create table person ( id bigserial primary key, first_name varchar not null, last_name varchar not null, unique (first_name, last_name) ); drop table if exists lower_case_person; -- 创建小写person表 create table lower...
<gh_stars>1-10 INSERT INTO public.user_users VALUES ('00bc2807-4d5b-4a27-a2b5-b7b1ba431cc4',false,'133143370961512','2021-06-29 21:51:45.424-04','2015-04-12 20:00:00-04','2019-06-19 20:00:00-04','503a81cd-6c26-400f-b620-14c08943697c','patron','2021-06-29 21:51:45.424-04','sallie','{ "id": "00bc2807-4d5b-4a27-a2b5-b...
# Person schema # ---!Ups CREATE TABLE person( id INT(20) UNSIGNED AUTO_INCREMENT PRIMARY KEY, name VARCHAR(25), lastName VARCHAR(25), phone1 VARCHAR(25), phone2 VARCHAR(25) );
//// CHANGE name=init CREATE TABLE COSProcStatus ( ProcName char(8) NOT NULL, RunDate datetime NOT NULL, RunLocation char(2) NOT NULL, StartTime datetime NULL, EndTime datetime NULL, Status char(1) NOT NULL, UpdateUserId varchar(10) NOT NULL, TimeUpdated datetim...
SET AUTOCOMMIT = ON; DROP TABLE IF EXISTS full_type_table; CREATE TABLE full_type_table( boolVal BOOLEAN, intVal INT, floatVal FLOAT, charVal CHAR, varCharVal VARCHAR(128), dateVal DATE, timestampVal TIMESTAMP, timestampTZVal TIMESTAMPTZ, intervalDayVal INTERVAL DAY, intervalVal INTERVAL DAY TO SECOND(4), intervalHou...
-- Step 1 - cleans object types. (this should be a temp step until tool is fixed) UPDATE dmareporting..reportdata SET ImpactedObjectType = 'Database Options' WHERE ImpactedObjectType = 'DatabaseOptions' -- Step 2 - Capture any missing rules INSERT INTO DMAWarehouse..dimRules (RuleID, Title, Impact, Recommenda...
<reponame>bryang-qti-qualcomm/DIRBS-Core<gh_stars>0 -- -- DIRBS SQL migration script (v79 -> v80) -- -- Copyright (c) 2018 Qualcomm Technologies, Inc. -- -- All rights reserved. -- -- -- -- Redistribution and use in source and binary forms, with or without modification, are permitted (subject to the -- limitations i...
<filename>Goal statement 3 by Yogesh Kumar.sql Use Startup_Funding_Analysis Go select * from [dbo].[startup_funding] Select Industry_Vertical, count(*) as Frequency from [dbo].[startup_funding] Group by Industry_Vertical order by Frequency DESC Go
SET IDENTITY_INSERT dbo.TrefBusinessLineType ON IF NOT EXISTS (SELECT 1 FROM TrefBusinessLineType WHERE Id = 1) BEGIN INSERT TrefBusinessLineType (Id,DisplayOrder,Description,Code,StartDate,EndDate,CreatedBy,ModifiedBy) VALUES (1,1,'A&T Retail Leasing - Investor','ATRLI',GETDATE(),NULL,'TrefBusinessLineType_tbl.sql',...
<reponame>krussan/protodb CREATE TABLE `BlobData` ( `ID` int(11) NOT NULL auto_increment, `data` blob, PRIMARY KEY (`ID`) )
<reponame>amazingdeveloper930/Language-Learning CREATE TABLE `group2students` ( `group2studentsID` INT(10) NOT NULL AUTO_INCREMENT, `groupID` INT(10) NOT NULL, `studentID` INT(11) NOT NULL, `active` INT(10) NOT NULL DEFAULT '1', `updateDate` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, ...
<reponame>its4land-new/publish-and-share<filename>db_setup/ddl/i4ldata.t_SpatialUnit.sql /* ---------------------------------------------------- */ /* Generated by Enterprise Architect Version 12.1 */ /* Created On : 17-Dec-2019 17:12:52 */ /* DBMS : PostgreSQL */ /* -------------------------------...
/* SQLyog Ultimate v12.4.3 (64 bit) MySQL - 5.7.19 ********************************************************************* */ /*!40101 SET NAMES utf8 */; create table `course_content` ( `id` int (5), `course_id` int (5), `name` varchar (144), `course_name` varchar (144), `course_period` varchar (96), `file_name` ...
<filename>Base de datos/cinesis.sql -- phpMyAdmin SQL Dump -- version 4.7.4 -- https://www.phpmyadmin.net/ -- -- Servidor: localhost -- Tiempo de generación: 29-04-2018 a las 12:06:58 -- Versión del servidor: 5.6.35 -- Versión de PHP: 7.1.6 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION;...
INSERT INTO `employees`(`id`, `first_name`, `last_name`) VALUES (1, 'Denis', 'Petrov'); INSERT INTO `employees`(`id`, `first_name`, `last_name`) VALUES (2, 'Plamen', 'Ivanov'); INSERT INTO `employees`(`id`, `first_name`, `last_name`) VALUES (3, 'Ivana', 'Todorova');
<reponame>sharpmental/epms<gh_stars>1-10 # ************************************************************ # Sequel Pro SQL dump # Version 4499 # # http://www.sequelpro.com/ # https://github.com/sequelpro/sequelpro # # Host: localhost (MySQL 5.5.33) # Database: epms # Generation Time: 2016-3-18 02:25:59 +0000 # **********...
<reponame>lgcarrier/AFW SET DEFINE OFF; ALTER TABLE AFW_12_SCENR_NOTFC_ACTIO ADD ( CONSTRAINT AFW_12_SCENR_NOTFC_ACTIO_FK4 FOREIGN KEY (REF_EVENM_NOTFB) REFERENCES AFW_01_EVENM_NOTFB (SEQNC) ON DELETE CASCADE ENABLE VALIDATE) /
<gh_stars>1-10 /* Navicat Premium Data Transfer Source Server : RooT Source Server Type : MySQL Source Server Version : 50553 Source Host : localhost:3306 Source Schema : twg Target Server Type : MySQL Target Server Version : 50553 File Encoding : 65001 Date: 23/12/2...
CREATE TABLE `firebase_token` ( `id` int(11) NOT NULL auto_increment, `customer_id` int(11), `token_id` text, `timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP, PRIMARY KEY (`id`) )
-- phpMyAdmin SQL Dump -- version 4.1.14 -- http://www.phpmyadmin.net -- -- Servidor: 127.0.0.1 -- Tiempo de generación: 19-05-2016 a las 22:29:20 -- Versión del servidor: 5.6.17 -- Versión de PHP: 5.5.12 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARA...
-------------------------------------------------------- -- DDL for Table MARRIAGE -------------------------------------------------------- CREATE TABLE "MARRIAGE" ( "HUSBAND" NUMBER, "WIFE" NUMBER, "PLACE_ID" NUMBER, "MONTH" NUMBER DEFAULT NULL, "DAY" NUMBER DEFAULT NULL, "YEAR" NUMBER DEFAULT NUL...
SELECT * FROM pg_catalog.pg_tablesTables
alter table netbox alter column orgid type varchar; alter table org alter column orgid type varchar; alter table org alter column parent type varchar; alter table vlan alter column orgid type varchar;
-- 2018-01-25T14:52:48.494 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Column SET EntityType='de.metas.inout',Updated=TO_TIMESTAMP('2018-01-25 14:52:48','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=550444 ; -- 2018-01-25T17:19:06.378 -- I forgot to set the DICTIONARY_ID_CO...
<reponame>sqitchers/sqitch-mysql-intro -- Revert delete_flip BEGIN; DROP FUNCTION delete_flip; COMMIT;
SELECT captureTime,pick, rating,absolutePath,pathFromRoot,lc_idx_filename FROM Adobe_images,AgLibraryFile,AgLibraryFolder,AgLibraryRootFolder where AgLibraryFile.id_local = Adobe_images.rootFile and AgLibraryFolder.id_local=AgLibraryFile.folder and AgLibraryRootFolder.id_local = AgLibraryFolder.rootFolder;
<gh_stars>0 select ps_availqty, ps_supplycost, ps_comment from `filter/pushdown/varchar_decimal/no_metadata_file/1.14.0/partsupp` where ps_supplycost > 999.9;
<filename>metrics/shared/new_contributors.sql create temp table prev as select distinct user_id from gha_pull_requests where created_at < '{{from}}' ; select 'new_contributors;All;contributors,prs' as name, round(count(distinct user_id) / {{n}}, 2) as contributors, round(count(distinct id) / {{n}}, 2) as prs...
CREATE TABLE [dbo].[TAttribute] ( --From MergedXSDs XSD --From 'genericRailML' Namespace [TAttributeId] BIGINT NOT NULL, [Name] NVARCHAR(MAX) NOT NULL, [Value] NVARCHAR(MAX) NOT NULL, CONSTRAINT [PK_TAttributeId] PRIMARY KEY CLUSTERED ([TAttributeId] ASC) );
DROP DATABASE IF EXISTS `META_TRADER`; CREATE SCHEMA `META_TRADER`; CREATE TABLE `META_TRADER`.`EQ_HS` ( `idKey` MEDIUMINT UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '', `SYMBOL` VARCHAR(20), `DATE_TIME` TIMESTAMP, `BID_P` BIGINT, `ASK_P` BIGINT, `OPEN_P` BIGINT, `CLOSE_P` BIGINT, `HIGH_P` BIGINT, `LOW_P` BIGIN...
-- POCOR-3080 -- db_patches INSERT INTO `db_patches` (issue, created) VALUES ('POCOR-3080', NOW()); -- assessment_items_grading_types DROP TABLE IF EXISTS `assessment_items_grading_types`; CREATE TABLE IF NOT EXISTS `assessment_items_grading_types` ( `id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL, `education_su...
<gh_stars>1-10 DROP TABLE IF EXISTS `weixin_bindings`; CREATE TABLE `weixin_bindings` ( `id` int(10) NOT NULL AUTO_INCREMENT, `user_id` int(10) NOT NULL, `open_type` ENUM('mp', 'weapp') DEFAULT NULL, `open_id` varchar(32) DEFAULT NULL, `union_id` varchar(32) DEFAULT NULL, `source_app` varchar(32) DEFAULT...
USE [bisolutions_vvcb] /*** --------------------------------------------------------------------------------- B_INCOMINGCOLLECTIONAMENDMENT_VAT_Report --------------------------------------------------------------------------------- ***/ IF EXISTS(SELECT * FROM sys.procedures WHERE NAME = 'B_INCOMINGCOLLECTIONA...
<filename>postgresql/tool/repmgr/00.错误记录.sql 1,在创建官方要求的用户时候, createuser -s repmgr 发现hold住,很久不返回,停掉进入数据库创建依然hold住,停掉删除表一样。查看内存发现大量进程互等 postgres 2241 2231 0 07:24 ? 00:00:00 postgres: postgres postgres [local] CREATE ROLE waiting for 1/D6000900 postgres 2246 2231 0 07:26 ? 00:00:00 postgres: postgre...
DROP TABLE IF EXISTS `featured_collections`; CREATE TABLE `featured_collections` ( `id` int(11) unsigned AUTO_INCREMENT NOT NULL PRIMARY KEY, `created` datetime NOT NULL, `modified` datetime NOT NULL, `application_id` int(11) unsigned NOT NULL, `collection_id` int(11) unsigned NOT NULL, `locale`...
<gh_stars>0 SELECT DISTINCT TOP 200 NormalizedName, NormalizedPublisher, NormalizedVersion, COUNT(DISTINCT ResourceID) AS QTY FROM dbo.v_GS_INSTALLED_SOFTWARE_CATEGORIZED GROUP BY NormalizedName, NormalizedPublisher, NormalizedVersion ORDER BY QTY DESC
<filename>prisma/migrations/20220306120056_add_blank_qty_to_orders/migration.sql /* Warnings: - You are about to drop the column `qty` on the `ProductInOrder` table. All the data in the column will be lost. - Added the required column `blankQty` to the `ProductInOrder` table without a default value. This is not ...
-- -- Table structure for table `articulos` -- DROP TABLE IF EXISTS `articulos`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `articulos` ( `ca_id` int(11) NOT NULL AUTO_INCREMENT, `ca_congreso_id` int(11) NOT NULL, `ca_titulo` varchar(4...
-- math expressions SELECT 42 + 43 AS "Y"; SELECT 42 + 43.1 AS "Z"; SELECT 42.3 AS "A"; SELECT 42.3 + 5 AS "B"; SELECT 42.3 * 5 AS "C"; SELECT 2 ^8 AS "D"; SELECT 2 ^16 AS "E"; SELECT 9%2 AS "F"; SELECT 999%50 AS "G"; SELECT 999/50 AS "H"; SELECT 999/50 AS "result", 999%50 AS "remainder"; -- round SELECT ROUND(42.3, 2)...
<reponame>thoemel/veloboerse -- Neue Tabelle fuer Boersen-Instanzen CREATE TABLE IF NOT EXISTS `boersen` ( `id` int(11) NOT NULL AUTO_INCREMENT, `datum` date NOT NULL, `status` enum('offen','geschlossen') COLLATE utf8_unicode_ci NOT NULL DEFAULT 'offen', PRIMARY KEY (`id`), KEY `datum` (`datum`) ) ENGINE=Inno...
<filename>web_japanese.sql<gh_stars>0 -- phpMyAdmin SQL Dump -- version 4.6.6deb5 -- https://www.phpmyadmin.net/ -- -- Host: localhost:3306 -- Generation Time: Jun 17, 2019 at 04:23 PM -- Server version: 5.7.26-0ubuntu0.18.04.1 -- PHP Version: 7.2.19-0ubuntu0.18.04.1 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zo...
DROP DATABASE IF EXISTS employees_db; CREATE DATABASE employees_db; USE employees_db; -- Department Table CREATE TABLE department ( id INT NOT NULL AUTO_INCREMENT, name VARCHAR(50) NOT NULL, PRIMARY KEY (id) ); -- Role Table CREATE TABLE role ( id INT NOT NULL AUTO_INCREMENT, title VARCHAR(50) NOT NULL, ...
-- rambler up -- -- This table defines the federal holidays, which are calculated according to an -- algorithm the way feasts are, but do not carry colors or services, just notes -- and sometimes special church open/close times. -- CREATE TABLE federal_holidays ( holiday_id serial, name text NOT NULL, co...
---VacancyRemissionFinalApproval workflow-- DELETE FROM eg_wf_matrix WHERE objecttype = 'VacancyRemissionApproval'; INSERT INTO eg_wf_matrix (id, department, objecttype, currentstate, currentstatus, pendingactions, currentdesignation, additionalrule, nextstate, nextaction,nextdesignation, nextstatus, validactions, fro...
GRANT USAGE ON *.* TO 'a1_online'@'localhost' IDENTIFIED BY PASSWORD <PASSWORD>'; GRANT SELECT, INSERT, UPDATE ON `a1`.`account` TO 'a1_online'@'localhost'; GRANT SELECT ON `a1`.`server` TO 'a1_online'@'localhost'; GRANT SELECT (id, x, name, account_id, y), INSERT (id, x, name, account_id, y) ON `a1`.`char` TO 'a1_o...
USE [CSTSDB] GO /****** Object: SqlProcedure [dbo].[InsertTopic] Script Date: 1/27/2022 4:56:28 PM ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[InsertTopic] @TopicName nvarchar(500) ,@VideoName nvarchar(500) ,@VideoURL nvarchar(500) AS BEGIN INSERT INTO Topics (Topic...
CREATE TABLE IF NOT EXISTS users ( id serial NOT NULL, username varchar(255) NOT NULL, password varchar(255) NOT NULL, name varchar(255) NOT NULL, PRIMARY KEY (id), UNIQUE(username) ); CREATE TABLE IF NOT EXISTS address ( id serial NOT NULL, first_name varchar(255), last_name varchar(255), ...
-- create a function that will update the "updated_at" timestamp when the row is changed -- credits to this --> https://x-team.com/blog/automatic-timestamps-with-postgresql/ CREATE OR REPLACE FUNCTION trigger_set_timestamp() RETURNS TRIGGER AS $$ BEGIN NEW.updated_at = NOW(); RETURN NEW; END; $$ LANGUAGE plpgsql;
-- file:insert_conflict.sql ln:56 expect:true drop index collation_index_key
ALTER TABLE upload_file ADD COLUMN tenant_id bigint NOT NULL DEFAULT 0 COMMENT '租户ID' AFTER uuid; CREATE INDEX idx_upload_file_tenant on upload_file(tenant_id);
USE [ApiDoc] GO SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[Leafes_GetById] @id int, @revision int = null AS BEGIN SET NOCOUNT ON; SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED; WITH allRevisions AS (SELECT *, row_number() OVER(ORDER BY fChangeDate ASC) AS fRe...
# --- Created by Ebean DDL # To stop Ebean DDL generation, remove this comment and start using Evolutions # --- !Ups create table COURSES ( course_id integer auto_increment not null, name varchar(255), description varchar(255), constraint pk_COURSES prim...
<filename>java-maven-example/spring-boot-uroborosql-example/src/main/resources/sql/update.sql UPDATE message SET message = /*message*/ WHERE id = /*id*/''
/****** Object: StoredProcedure [dbo].[UpdateMTSCachedDataStatus] ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE dbo.UpdateMTSCachedDataStatus /**************************************************** ** ** Desc: Updates the data in T_MTS_Cached_Data_Status using MTS ** ** Return val...
<filename>database/procds/spInsertModuleAssessment.sql -- ============================================= -- Create basic stored procedure template -- ============================================= -- Drop stored procedure if it already exists IF EXISTS ( SELECT * FROM INFORMATION_SCHEMA.ROUTINES WHERE SPECIFI...
-- Copyright 2018 <NAME>. All rights reserved. More info at http://tanelpoder.com -- Licensed under the Apache License, Version 2.0. See LICENSE.txt for terms & conditions. BREAK ON snap_begin SKIP 1 ON snap_end ON event_name COL event_name FOR A40 SELECT CAST(begin_interval_time AS DATE) snap_begin , TO_CHAR(...
<filename>paas/appmanager/APP-META-PRIVATE/db/80_add_deploy_config.up.sql<gh_stars>100-1000 CREATE TABLE IF NOT EXISTS `am_deploy_config` ( `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'ID', `gmt_create` datetime DEFAULT NULL COMMENT '创建时间', `gmt_modified` datetime DEFAULT N...
-- Based on https://www.2ndquadrant.com/en/blog/application-users-vs-row-level-security/ -- and https://github.com/2ndQuadrant/rls-examples/blob/master/signed-vault/signed_vault--1.0.sql INSERT INTO system_vault (partition, key_id, key) VALUES ('RLS', 'app.1', '1234'); -- Creates a signed token that gives the...
<filename>openGaussBase/testcase/SQL/INNERFUNC/RIGHT/Opengauss_Function_Innerfunc_Right_Case0005.sql -- @testpoint: right函数入参为特殊字符 SELECT right('@#$#@%#$%#$^$%^%$^^*&*(',1)AS RESULT;
CREATE TABLE "task" ( "id" INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, "task" TEXT NOT NULL, "date" DATETIME DEFAULT CURRENT_TIMESTAMP );
<reponame>captainabap/Einstieg-in-SQLScript -- Listing 2.38.sql -- Preisermittlung anhand der Preisklasse und dem Online-Flag CREATE FUNCTION udf_preis ( iv_preisklasse VARCHAR(3), iv_ist_online VARCHAR(1) ) RETURNS rv_preis DEC(17, 2) AS BEGIN SELECT CASE :iv_ist_online ...
<gh_stars>0 -------------------------------------------------------- -- DDL for Synonymn GPSPECIES_EDIT -------------------------------------------------------- CREATE OR REPLACE SYNONYM "GROUNDFISH"."GPSPECIES_EDIT" FOR "MFD_PORT_SAMPLES"."GPSPECIES_EDIT";
-- phpMyAdmin SQL Dump -- version 4.8.3 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Sep 17, 2019 at 05:35 PM -- Server version: 10.1.36-MariaDB -- PHP Version: 7.2.11 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OL...
/* https://leetcode.com/problems/bank-account-summary/ https://leetcode.com/submissions/detail/451515626/ Optum */ /* Write your MySQL query statement below */ SELECT u.user_id, u.user_name, u.credit + ISNULL(a.amount, 0) as credit, CASE WHEN u.credit + a.amount < 0 THEN 'Yes' ELSE 'No' END as cr...
CREATE DATABASE IF NOT EXISTS `univesity` /*!40100 DEFAULT CHARACTER SET utf8 */; USE `univesity`; -- MySQL dump 10.13 Distrib 5.6.24, for Win64 (x86_64) -- -- Host: localhost Database: univesity -- ------------------------------------------------------ -- Server version 5.6.27-log /*!40101 SET @OLD_CHARACTER_SET...
-- misc1.test -- -- execsql {SELECT count(*) FROM manycol} SELECT count(*) FROM manycol
CREATE TABLE channel_stats ( channel VARCHAR(30) NOT NULL, total_messages INT(11) DEFAULT '0' NOT NULL, name VARCHAR(20), web TINYINT(1) DEFAULT '0', server VARCHAR(30) DEFAULT '' NOT NULL, startdate INT(11), CONSTRAINT `PRIMARY` PRIMARY KEY (server, channel) ); CREATE UNIQUE INDEX idx_channel ON channel_...
CREATE TABLE [dbo].[CustomDataLog] ( [CustomDataLogId] UNIQUEIDENTIFIER NOT NULL, [SolutionId] UNIQUEIDENTIFIER NOT NULL, [CustomData] VARCHAR (MAX) NOT NULL, [CustomaDataSchema] VARCHAR (MAX) NULL, [Created] DATETIME NOT NULL, [Updated] DATETIM...
SELECT Name, Name FROM Production.Product JOIN Purchasing.ProductVendor ON ProductID = ProductID JOIN Purchasing.Vendor ON BusinessEntityID = BusinessEntityID WHERE ProductSubcategoryID = 15 ORDER BY Name;
<reponame>aliostad/deep-learning-lang-detection<gh_stars>10-100 use finance; drop view if exists p_commentcounts; drop view if exists p_comparison; drop view if exists p_endofmonthbalances; drop view if exists p_monthlytotals; drop view if exists p_potentialduplicates; drop view if exists p_transactions; drop view if...
START TRANSACTION; INSERT INTO `fields` VALUES (NULL, 'lblCalendar', 'backend', 'Label / Calendar', 'script', '2014-10-31 07:49:56'); SET @id := (SELECT LAST_INSERT_ID()); INSERT INTO `multi_lang` VALUES (NULL, @id, 'pjField', '::LOCALE::', 'title', 'Calendar', 'script'); INSERT INTO `fields` VALUES (NULL, 'infoRe...
/* Onix Config Manager - Copyright (c) 2018-2021 by www.gatblau.org 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 ...
<reponame>pdv-ru/ClickHouse -- Tags: no-fasttest SELECT h3GetBaseCell(612916788725809151);
<reponame>linkingtd/UniAuth -- ----------------------------------------------------- -- Table `user_pwd_log` -- ----------------------------------------------------- CREATE TABLE IF NOT EXISTS `user_pwd_log` ( `id` BIGINT(20) NOT NULL AUTO_INCREMENT comment '主键id', `user_id` BIGINT(20) NOT NULL comment '用户id', `p...
<filename>kata-files/lesson2/postgresql/expected/MYLARGESCHEMA/function/func364.sql<gh_stars>10-100 CREATE FUNCTION func364() RETURNS integer LANGUAGE plpgsql AS $$ DECLARE val INTEGER; BEGIN val:=(SELECT COUNT(*)INTO MYCOUNT FROM MYLARGESCHEMA.TABLE208);val:=(SELECT COUNT(*)INTO MYCOUNT FROM MYLARGESCHEMA.TABL...
<reponame>Aesthet/dbt-xdb {%- macro using(rel_1,rel_2,col) -%} {#/* SUPPORTS: - Postgres - Snowflake - BigQuery - Redshift */#} {%- if target.type in ('postgres','redshift','bigquery','snowflake',) -%} {{rel_1}} JOIN {{rel_2}} USING ({{col}}) --noqa:L...
-- -- DATE -- CREATE TABLE DATE_TBL (f1 date); INSERT INTO DATE_TBL VALUES ('1957-04-09'); INSERT INTO DATE_TBL VALUES ('1957-06-13'); INSERT INTO DATE_TBL VALUES ('1996-02-28'); INSERT INTO DATE_TBL VALUES ('1996-02-29'); INSERT INTO DATE_TBL VALUES ('1996-03-01'); INSERT INTO DATE_TBL VALUES ('1996-03-02'); INSERT ...
--+ holdcas on; set system parameters 'dont_reuse_heap_file=yes'; CREATE TABLE t (a int, b int, c int); CREATE INDEX idx_ab ON t(a, b); SELECT /*+ recompile */ a, b FROM t WHERE a = 0 ORDER BY a, b; SELECT /*+ recompile */ a, b FROM t WHERE a = 0 GROUP BY a, b; SELECT /*+ recompile */ a, b FROM t WHERE a = 0 ORDER...
-- Create a new SQL login user -- Replace login name 'miguel' and password with your choice of user name/password -- In version 8, the default authentification method is caching sha2 -- https://dev.mysql.com/doc/refman/8.0/en/caching-sha2-pluggable-authentication.html CREATE USER IF NOT EXISTS 'miguel'@'localhost' IDE...
BEGIN TRANSACTION; CREATE TABLE "Contact" ( id INTEGER NOT NULL, "FirstName" VARCHAR(255), "LastName" VARCHAR(255), "ReportsToId" VARCHAR(255), PRIMARY KEY (id) ); CREATE TABLE "Summit_Events_Appointment_Type__c" ( id INTEGER NOT NULL, "Appointment_Category__c" VARCHAR(255), "Appointment_Limits__c" VARCHAR(25...
-- @testpoint: 关键字year,用作表名创建普通表 drop table if exists year cascade; create table year(id int,name varchar(20)); create or replace procedure year_insert as begin for i in 1..20 loop insert into year values(i,'a'||i); end loop; end; / call year_insert(); select * from year; drop table if exists year cascade;...
<reponame>startupmdvrs/start -- phpMyAdmin SQL Dump -- version 4.8.0 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Jul 28, 2018 at 01:57 PM -- Server version: 10.1.31-MariaDB -- PHP Version: 7.1.16 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone =...
truncate "public"."juzgados" RESTART IDENTITY; insert into juzgados (idalcaldia,juzgado,direccion,turno,horario) values (1,'AOB01','Escuadrón 201 esq. Batallón de San Patricio s/n, Col. <NAME>','24x48','09:00009:00'); insert into juzgados (idalcaldia,juzgado,direccion,turno,horario) values (1,'AOB02','Camino Real de To...
<filename>PHP-Scripts/PHP-SQLITE/query.sql -- SQLite CREATE TABLE Persons (PersonID int,LastName varchar(255),FirstName varchar(255),Address varchar(255),City varchar(255));
/*Embarked units*/ UPDATE Eras SET EmbarkedUnitDefense=EmbarkedUnitDefense*2; /*Range units*/ UPDATE Units SET Cost=Cost-5, Combat=Combat-1 WHERE Class='UNITCLASS_ARCHER'; UPDATE Units SET Cost=Cost-11, Combat=Combat-1, RangedCombat=RangedCombat-1 WHERE Class='UNITCLASS_CHARIOT_ARCHER'; UPDATE Units SET Cost=Cost-10, ...
<reponame>joshforester/rdboard -- MySQL dump 10.11 -- -- Host: localhost Database: leaderboard -- ------------------------------------------------------ -- Server version 5.0.51a-24+lenny1 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESUL...
<gh_stars>0 -- 0. Update summary table Insert into summary_table(date, average_price, total_price) Select G.date as date, avg(G.sale_price) as average_price, sum(G.sale_price) as total_price from (SELECT sale_date, sale_price, "2020-03-01" as date FROM sale) as G where G.sale_date >= "2020-03-01" and G.sale_date < "2...
<gh_stars>0 /*------------------------------------------------------------------------------------------------*/ /* Author: <NAME> (AGE) /* Date: 2019-03-03 /* Description: Daten für das StyleGuide-Model /* ...
SELECT TOP(5) r.Id, r.Name, COUNT(c.Id) AS [Count] FROM Repositories AS r JOIN Commits c ON r.Id = c.RepositoryId JOIN RepositoriesContributors rc ON r.Id = rc.RepositoryId GROUP BY r.Id, r.Name ORDER BY [Count] DESC, r.Id, r.Name
USE [Users] GO IF OBJECT_ID('[dbo].[UserProject]', 'U') IS NULL BEGIN CREATE TABLE [dbo].[User] ( [Id] INT NOT NULL PRIMARY KEY ,[FirstName] NVARCHAR(50) NOT NULL ,[LastName] NVARCHAR(50) NOT NULL ) END GO
USE [VipunenTK] GO ALTER TABLE [dbo].[f_keskeyttaneet] DROP CONSTRAINT [FK_f_keskeyttaneet_ika5v] GO ALTER TABLE [dbo].[f_keskeyttaneet] DROP CONSTRAINT [FK_f_keskeyttaneet_ika1v] GO ALTER TABLE [dbo].[f_keskeyttaneet] DROP CONSTRAINT [FK_f_keskeyttaneet_d_valtio_eumaa] GO ALTER TABLE [dbo].[f_keskeyttaneet] DROP C...
<filename>5.2.3/Database/Packages/AFW_12_REQT_INTER_UTILS_PKG.pks SET DEFINE OFF; create or replace package afw_12_reqt_inter_utils_pkg is function obten_reqt_inter_utils (pnu_reqt_inter_utils in vd_i_afw_12_reqt_inter_utils.seqnc%type) return vd_i_afw_12_reqt_inter_utils%rowtype; function obten_reqt_inter_uti...
<filename>Portal/WebSystem/WCMS.Framework.SqlDabase/dbo/Tables/WebObjectType.sql CREATE TABLE [dbo].[WebObjectType] ( [ObjectTypeId] INT NOT NULL, [Name] NVARCHAR (250) NOT NULL, [SourceTypeId] INT NOT NULL, [SourceLocationId] INT NOT NULL, [IdFi...
<reponame>getwasim/egov-smartcity-suites-test<filename>egov/egov-wtms/src/main/resources/db/migration/main/V20151125162623__wcms_missing_actions_ConnectionReport.sql INSERT INTO eg_action(id, name, url, queryparams, parentmodule, ordernumber, displayname, enabled, contextroot, version, createdby, createddate, lastmod...
IF OBJECT_ID(N'__EFMigrationsHistory') IS NULL BEGIN CREATE TABLE [__EFMigrationsHistory] ( [MigrationId] nvarchar(150) NOT NULL, [ProductVersion] nvarchar(32) NOT NULL, CONSTRAINT [PK___EFMigrationsHistory] PRIMARY KEY ([MigrationId]) ); END; GO CREATE TABLE [dbo].[InsurancePlans]( ...
<filename>migrations/sqls/20200216173728-snap-program-up.sql<gh_stars>10-100 UPDATE programs SET programName = "Nutrition / CRYS", programDescription = "Nutrition / CRYS" WHERE programName = "Nutrition / CRYS / SNAP"; INSERT INTO programs (programName, programDescription) VALUES ("SNAP", "SNAP - food stamp registration...
-- this can't be an incremental model because of the day_range calculation WITH zuora_invoice_base AS ( SELECT * FROM {{ref('zuora_invoice')}} WHERE date_trunc(day, due_date)::DATE < CURRENT_DATE ), zuora_account AS ( SELECT * FROM {{ref('zuora_account')}} ), zuora_contact AS ( SELECT * FROM {{ref('zuora_c...
<reponame>jdkoren/sqlite-parser -- fts2q.test -- -- execsql { -- SELECT dump_doclist(t1, term, level, index) FROM t1 LIMIT 1; -- } SELECT dump_doclist(t1, term, level, index) FROM t1 LIMIT 1;
<gh_stars>1000+ -- 2021-06-10T14:50:53.290Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Column SET AD_Reference_ID=28, IsExcludeFromZoomTargets='N',Updated=TO_TIMESTAMP('2021-06-10 17:50:53','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=574240 ; -- 2021-06-10T14:51:03.746Z -...
-- old mappings to RxN* are not deprecated automatically insert into concept_relationship_stage select distinct null :: int4, null :: int4, c.concept_code, c2.concept_code, 'dm+d', c2.vocabulary_id, 'Maps to', r.valid_start_date, current_date - 1, 'D' from concept_relationship r join concept c on c.concept_...