sql
stringlengths
6
1.05M
SELECT c.Name AS [CategoryName], count(r.Id) AS [ReportsNumber] FROM Categories AS c JOIN Reports r ON c.Id = r.CategoryId GROUP BY c.Name ORDER BY count(r.Id) DESC, c.Name ASC
-- -------------------------------------------------------- -- Host: 127.0.0.1 -- Server version: 10.4.11-MariaDB - mariadb.org binary distribution -- Server OS: Win64 -- HeidiSQL Version: 10.3.0.5771 -- -----------------------------------------------...
<reponame>pauldavidg/EcomApp -- phpMyAdmin SQL Dump -- version 5.1.0 -- https://www.phpmyadmin.net/ -- -- Host: localhost -- Generation Time: May 25, 2021 at 06:58 PM -- Server version: 10.4.18-MariaDB -- PHP Version: 7.4.16 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!4010...
{{ config( materialized = 'incremental', unique_key = "CONCAT_WS('-', block_id, tx_id, index)", incremental_strategy = 'delete+insert', cluster_by = ['ingested_at::DATE'], ) }} WITH base_transfers AS ( SELECT e.block_id, e.block_timestamp, e.tx_id, e.index, ...
<gh_stars>0 -- phpMyAdmin SQL Dump -- version 4.8.3 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Dec 12, 2019 at 12:56 PM -- Server version: 10.1.36-MariaDB -- PHP Version: 7.2.10 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!4...
<reponame>lfraile/orleans DROP TABLE [dbo].[OrleansMembershipTable] DROP TABLE [dbo].[OrleansMembershipVersionTable] DROP TABLE [dbo].[OrleansRemindersTable] DROP TABLE [dbo].[OrleansSiloMetricsTable] DROP TABLE [dbo].[OrleansClientMetricsTable] DROP TABLE [dbo].[OrleansStatisticsTable] CREATE TABLE [dbo].[OrleansMem...
<filename>db/seeds.sql USE employee_db INSERT INTO department (department_name) VALUES ("production/department1"), ("service/department2"), ("marketing/department3"), ("sales/department4"), ("department5"); INSERT INTO roles( title, salary) VALUES ( "manager", 100.00), ( "emp...
<reponame>siegfried/beholder<filename>migrations/2021-12-16-210741_create_views/up.sql BEGIN; CREATE VIEW binance_klines_view AS SELECT symbol, source, TO_TIMESTAMP(open_time / 1000) AS open_time, TO_TIMESTAMP((close_time + 1) / 1000) - TO_TIMESTAMP(open_time / 1000) AS interval, ...
-- -- <NAME>. -- Prepared SQL queries for 'FavoriteImpl' definition. -- -- -- SELECT template for table `FavoriteImpl` -- SELECT `_class`, `_links`, `item` FROM `FavoriteImpl` WHERE 1; -- -- INSERT template for table `FavoriteImpl` -- INSERT INTO `FavoriteImpl`(`_class`, `_links`, `item`) VALUES (?, ?, ?); -- -- UP...
SET statement_timeout = 0; SET lock_timeout = 0; SET idle_in_transaction_session_timeout = 0; SET client_encoding = 'UTF8'; SET standard_conforming_strings = on; SET check_function_bodies = false; SET client_min_messages = warning; SET row_security = off; CREATE EXTENSION IF NOT EXISTS plpgsql WITH SCHEMA pg_catalog; ...
-- phpMyAdmin SQL Dump -- version 5.0.4 -- https://www.phpmyadmin.net/ -- -- 主机: 127.0.0.1 -- 生成日期: 2021-03-20 16:39:03 -- 服务器版本: 10.4.17-MariaDB -- PHP 版本: 8.0.1 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!...
<filename>src/test/resources/sql/alter_rule/caca3fb4.sql -- file:rules.sql ln:1037 expect:true ALTER RULE InsertRule ON rule_v1 RENAME TO NewInsertRule
-- phpMyAdmin SQL Dump -- version 4.9.5 -- https://www.phpmyadmin.net/ -- -- Host: localhost:3306 -- Generation Time: Jan 22, 2021 at 01:24 AM -- Server version: 5.6.50 -- PHP Version: 7.3.6 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; -- -- Database: `phpbu...
SET DEFINE OFF; -- Begin an anonymous PL/SQL script that -- drops all tables in the EX schema and -- suppresses the error messages that are displayed if the tables don't exist BEGIN EXECUTE IMMEDIATE 'DROP TABLE active_invoices'; EXECUTE IMMEDIATE 'DROP TABLE color_sample'; EXECUTE IMMEDIATE 'DROP TABLE custome...
<gh_stars>0 drop table if exists smfund_daily; create table smfund_daily ENGINE = MyISAM as select *, (select count(*) from wind_trade_date as td where sm.trade_date<td.trade_date and td.trade_date<=sm.next_pcvdate) as ndays_to_pcvdate FROM wind_smfund_daily as sm where next_pcvdate is not null and close_a...
ALTER TABLE site_config ADD COLUMN email text; ALTER TABLE site_config ADD COLUMN updated_at timestamp with time zone;
<reponame>md4e/medic-ethiopia -- phpMyAdmin SQL Dump -- version 4.8.4 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1:3306 -- Generation Time: Oct 10, 2020 at 02:10 PM -- Server version: 5.7.24 -- PHP Version: 7.2.14 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+...
<gh_stars>0 -- -- CREATE_FUNCTION_2 -- CREATE FUNCTION hobbies(person) RETURNS setof hobbies_r AS 'select * from hobbies_r where person = $1.name' LANGUAGE SQL; CREATE FUNCTION hobby_construct(text, text) RETURNS hobbies_r AS 'select $1 as name, $2 as hobby' LANGUAGE SQL; CREATE FUNCTION hobbies_...
BEGIN; create schema scoreboard; create function scoreboard.__process_register(varchar, integer, varchar) returns void as 'pg_scoreboard.so', 'process_register' language C immutable; create function scoreboard.process_register(varchar) returns integer as $$ select scoreboard.__process_register(inet_client_addr() ::...
<reponame>Djotchuang/new-roots -- phpMyAdmin SQL Dump -- version 4.8.3 -- https://www.phpmyadmin.net/ -- -- Host: localhost -- Generation Time: Jun 22, 2020 at 06:04 PM -- Server version: 10.1.37-MariaDB -- PHP Version: 7.2.12 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone...
<reponame>Nathansykes/DronfieldClubApp -- MySQL dump 10.13 Distrib 8.0.22, for Win64 (x86_64) -- -- Host: localhost Database: dronfield -- ------------------------------------------------------ -- Server version 8.0.22 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARA...
Begin transaction BEGIN TRY DECLARE @AllRolesRoleId uniqueidentifier SET @AllRolesRoleId = (Select Top 1 RoleId From aspnet_Roles where LoweredRoleName = 'all users') Delete From SnDiscussionBoardInRole where RoleId = @AllRolesRoleId COMMIT TRANSACTION END TRY BEGIN CATCH ...
<reponame>Brunty/kahlan-sqlite PRAGMA foreign_keys=OFF; BEGIN TRANSACTION; DROP TABLE IF EXISTS Tests; CREATE TABLE "Tests" ( "id" INTEGER PRIMARY KEY ASC NOT NULL UNIQUE, "name" TEXT ); PRAGMA writable_schema=OFF; COMMIT;
<reponame>EL-BID/nexso CREATE FULLTEXT CATALOG [SolutionCatalog] WITH ACCENT_SENSITIVITY = OFF AUTHORIZATION [mif_nexso];
<reponame>darrellweaverjr/Ticketbat -- SELECT * FROM ticketba_lvtn.purchases where id IN (708,830,1171,1636,1711,1731,1756,1757,1758,1762,2134,2567,2647,2648,2758,2980,3851,13520,13546,14104,16044,16046 ,16059,16619,17203,17427,17437,17706,17710,17720,17772,17773,17787,17788,18071,18095,18666,18696,19025,19038,19069,19...
-- -------------------------------------------------------- -- Host: 127.0.0.1 -- Server version: 5.1.63-community - MySQL Community Server (GPL) -- Server OS: Win64 -- HeidiSQL version: 7.0.0.4053 -- Date/time: 2012-10-14 17:59:19 ...
/* * This pulls a list of repositories, when they were last updated, who owns * them, and the disk space associated with each. */ SELECT r.name as repo_name, r.updated_at, r.disk_usage, u.login FROM github_enterprise.repositories r JOIN github_enterprise.users u ON r.owner_id = u.id ORDER BY updated_at DESC...
#------------------------------------------------------------------------------ # Les questions qui sont déjà traitées par le système #------------------------------------------------------------------------------ ALTER TABLE game_politic_question ADD `turnout` double NULL, ADD `answer` double NULL ;
# Time: O(n) # Space: O(n) SELECT stock_name, Sum(CASE WHEN operation = 'Buy' THEN -price ELSE price END) AS capital_gain_loss FROM stocks GROUP BY stock_name ORDER BY NULL;
<filename>UsersTrackingDB/Alter.sql USE userstracking; ALTER TABLE ActiveGridInteractions ADD email VARCHAR(100) after timestamp_endjob; ALTER TABLE ActiveGridInteractions ADD e_token_server VARCHAR(100) after email;
alter table WORKSHOP_CLIENT add constraint FK_WORKSHOP_CLIENT_ORDER foreign key (ORDER_ID) references WORKSHOP_ORDER(ID); create index IDX_WORKSHOP_CLIENT_ORDER on WORKSHOP_CLIENT (ORDER_ID);
<gh_stars>0 version https://git-lfs.github.com/spec/v1 oid sha256:944094d6d6eec2f7201a57edfc4cceff7b152adb2694fcdfe98536bd39a7fe34 size 54
<reponame>lwsh1995/spring-framework-5.2.5<gh_stars>1-10 DROP TABLE infoBean IF EXISTS;
<reponame>MLacra/mapping_generation_experiments -- Final SQL mapping: SELECT attribute_1256,attribute_1257,attribute_1258,attribute_1259 FROM (((((((((SELECT attribute_1256,attribute_1257,attribute_1258,attribute_1259 FROM public.relation_975)UNION (SELECT attribute_1960,attribute_1961,attribute_1962,attribute_1963 FR...
<filename>sql_2017/sql1_persediaan/daftar_pengeluaran_barang_sql/daftar_pengeluaran_setwan.sql<gh_stars>1-10 DROP VIEW IF EXISTS view_daftar_pengeluaran_setwan; CREATE VIEW view_daftar_pengeluaran_setwan AS SELECT * FROM view_daftar_pengeluaran_kabupaten WHERE 1 = 1 AND id_skpd = 1; GRANT ALL PRIVILEGES ON view_d...
<reponame>GiorgioCaculli/B3_Application_Entreprise_Multi-Tiers_et_Veille_Technologique<gh_stars>0 -- Copyright 2004-2019 H2 Group. Multiple-Licensed under the MPL 2.0, -- and the EPL 1.0 (https://h2database.com/html/license.html). -- Initial Developer: H2 Group -- CREATE MEMORY TABLE TEST(D1 REAL, D2 FLOAT4, D3 FLOAT(...
<filename>apps/finact/master/projecttask/projecttask.sql CREATE TABLE `mst_projecttask` ( `projecttask_id` varchar(14) NOT NULL , `projecttask_name` varchar(90) NOT NULL , `projecttask_descr` varchar(255) , `projecttask_dtstart` date NOT NULL , `projecttask_dtend` date NOT NULL , `project_id` varchar(30) NO...
<gh_stars>1-10 /*L Copyright SAIC Distributed under the OSI-approved BSD 3-Clause License. See http://ncip.github.com/cabio/LICENSE.txt for details. L*/ drop index PID_ENTAME_BIG_ID_LWR; drop index PID_ENTAME_BIG_ID; drop index SYS_C0021150_IDX; drop index PID_ENTINAME_NAME_LWR; drop index PID_ENT...
<filename>day_8.sql -- Part 1 with base_data as ( select rownum line_number, column_value line from table( aoc_file_loader.file_as_stringlist( aoc_file_loader.local_url('day_8_input.txt') ) ) ), command_value as ( select line_number, substr(line, 1, 3) c...
<gh_stars>0 -- Your SQL goes here ALTER TABLE trailers DROP COLUMN org; ALTER TABLE users DROP COLUMN org; ALTER TABLE users ADD trailer INTEGER NOT NULL REFERENCES trailers(trailer_id) ON DELETE CASCADE DEFAULT 1; DROP TABLE orgs;
SELECT count(id) FROM stops; SELECT id FROM stops WHERE name = 'Craiglockhart'; SELECT id, name FROM stops JOIN route ON id = stop WHERE num = '4' AND company = 'LRT'; SELECT company, num, COUNT(*) as stops FROM route WHERE stop=149 OR stop=53 GROUP BY company, num HAVING stops > 1 SELECT a.company, a.num, a.stop,...
<filename>seeds.sql<gh_stars>0 CREATE DATABASE ShoeCompany; CREATE TABLE Customers( UserID INT PRIMARY KEY IDENTITY, Firstn VARCHAR(50) NOT NULL, Lastn VARCHAR(50) NOT NULL, ); CREATE TABLE Items( ItemID INT PRIMARY KEY IDENTITY, Sandals VARCHAR(50) NOT NULL, TennisShoes VARCHAR(50) NOT NULL, DanceShoes VARCHAR (5...
<gh_stars>1-10 -- ? : application name SELECT * FROM bug WHERE name = ?;
<reponame>mhoffrog/onedev-commons<filename>commons-jsyntax/src/test/java/io/onedev/commons/jsyntax/sql/test2.sql<gh_stars>1-10 /* C demo code */ #include <zmq.h> #include <pthread.h> #include <semaphore.h> #include <time.h> #include <stdio.h> #include <fcntl.h> #include <malloc.h> typedef struct { void* arg_socket;...
<reponame>benhauman/storelake<filename>src/StoreLake.Test/SQL/Procedures/hlsyssec_load_agentallglobalpermissions.sql -- @Name LoadAgentAllGlobalPermissions -- @Return ClrTypes:Security.AgentGlobalPermission CREATE PROCEDURE [dbo].[hlsyssec_load_agentallglobalpermissions] -- used by 'IRuntimeConfiguration.LoadSecuritie...
<reponame>aliostad/deep-learning-lang-detection<filename>data/train/sql/938a6be1761dc2f57658b3b90a79d0f6c99e2dd4dotazy.sql --1.Vypise vsechny ridice, kteri najezdili vice jak 35000km SET AUTOTRACE ON; select * from ridici where ridic_id in ( select ridic_id from vypujceni group b...
<filename>src/test/resources/fkey2.test_55.sql -- fkey2.test -- -- execsql { -- CREATE TABLE t1(a PRIMARY KEY); -- CREATE TABLE t2(a, b); -- } CREATE TABLE t1(a PRIMARY KEY); CREATE TABLE t2(a, b);
<filename>sql/2057.sql /* Weight For First Shipment https://platform.stratascratch.com/coding/2057-weight-for-first-shipment?python= Difficulty: Easy Write a query to find the weight for each shipment's earliest shipment date. Output the shipment id along with the weight. Tables: <amazon_shipment> shipment_id ...
<filename>backend/de.metas.handlingunits.base/src/main/sql/postgresql/system/5611090_sys_M_Picking_Job_Step_order_fields.sql -- 2021-10-29T05:54:12.809Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,...
-- 2019-07-18T13:28:47.312Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Process (AccessLevel,AD_Client_ID,AD_Org_ID,AD_Process_ID,AllowProcessReRun,CopyFromProcess,Created,CreatedBy,EntityType,IsActive,IsApplySecuritySettings,IsBetaFunctionality,IsDirectPrint,IsOneInstanceOnly,IsRep...
<reponame>rhicksiii91/bcda-app -- Update updated_at column for acos BEGIN; ALTER TABLE public.acos ALTER COLUMN updated_at SET DEFAULT now(); COMMIT; -- Update updated_at column for cclf_beneficiaries BEGIN; ALTER TABLE public.cclf_beneficiaries ALTER COLUMN updated_at SET DEFAULT now(); COMMIT; -- Update updated_at ...
create table quests ( Id int auto_increment primary key, NameId int unsigned not null, StepIdsCSV mediumtext not null, CategoryId int not null, IsPartyQuest tinyint not null, RepeatType int not null, RepeatLimit int ...
DROP TABLE IF EXISTS items; DROP SEQUENCE IF EXISTS seq; CREATE SEQUENCE seq START WITH 100000; CREATE TABLE items ( id INTEGER PRIMARY KEY DEFAULT nextval('seq'), name VARCHAR NOT NULL, description VARCHAR NOT NULL, created TIMES...
<reponame>ViiSE/LightSearch-Server<filename>src/main/resources/schema.sql DROP TABLE IF EXISTS LS_REQUEST; DROP TABLE IF EXISTS LS_RESPONSE; CREATE TABLE IF NOT EXISTS LS_REQUEST ( KOD INT AUTO_INCREMENT PRIMARY KEY, LSCODE INT NOT NULL, DDOC TIMESTAMP NOT NULL, CMDIN VARCHAR, /* MUST BE BLOB! */ S...
<filename>test/sql/size_utils.sql \ir include/insert_two_partitions.sql SELECT * FROM hypertable_relation_size('"public"."two_Partitions"'); SELECT * FROM hypertable_relation_size_pretty('"public"."two_Partitions"'); SELECT * FROM chunk_relation_size('"public"."two_Partitions"'); SELECT * FROM chunk_relation_size_pret...
CREATE ROLE myuniversity_mymodule PASSWORD '<PASSWORD>' NOSUPERUSER NOCREATEDB INHERIT LOGIN; GRANT myuniversity_mymodule TO CURRENT_USER; CREATE SCHEMA myuniversity_mymodule AUTHORIZATION myuniversity_mymodule; CREATE EXTENSION IF NOT EXISTS "pgcrypto"; CREATE TABLE IF NOT EXISTS myuniversity_mymodule.owners (id U...
<reponame>Rob--W/phabricator ALTER TABLE {$NAMESPACE}_auth.auth_challenge ADD responseDigest VARCHAR(255) COLLATE {$COLLATE_TEXT};
DROP TABLE CHECKPOINTDATA; DROP TABLE STEPSTATUS; DROP TABLE JOBSTATUS; DROP TABLE STEPEXECUTIONINSTANCEDATA; DROP TABLE EXECUTIONINSTANCEDATA; DROP TABLE JOBINSTANCEDATA;
autocommit off; set names utf8 collate utf8_ja_exp; select INDEX_PREFIX('sysぁゝ','sysぁ','A'); select INDEX_PREFIX('sysぁ','sysぁゝ','D'); select INDEX_PREFIX('sysぁゝa','sysぁa','A'); select INDEX_PREFIX('sysぁa','sysぁゝa','D'); select INDEX_PREFIX('sysぁゝa','sysぁb','A'); select INDEX_PREFIX('sysぁb','sysぁゝa','D'); select IN...
<filename>openGaussBase/testcase/KEYWORDS/Collation_Name/Opengauss_Function_Keyword_Collation_Name_Case0029.sql -- @testpoint:opengauss关键字collation_name(非保留),作为表空间名 --关键字不带引号,创建成功 drop tablespace if exists collation_name; CREATE TABLESPACE collation_name RELATIVE LOCATION 'hdfs_tablespace/hdfs_tablespace_1'; --关键字...
CREATE TABLE submit ( id integer PRIMARY KEY, sha256 text NOT NULL, description text );
<filename>exercises/chapter_3/exercise_1.sql<gh_stars>0 -- -- Learning SQL -- Exercise 3-1 -- SELECT actor_id, first_name, last_name FROM actor ORDER BY last_name, first_name;
<filename>schema/nex2-annotation-triggers.sql -- Generated by Ora2Pg, the Oracle database Schema converter, version 17.4 -- Copyright 2000-2016 <NAME>. All rights reserved. -- DATASOURCE: dbi:Oracle:host=sgd-nex2-db.stanford.edu;sid=SGD SET client_encoding TO 'UTF8'; \set ON_ERROR_STOP ON DROP TRIGGER IF EXISTS bin...
DELETE FROM ApplicationRole; delete from sqlite_sequence where name='ApplicationRole'; INSERT INTO ApplicationRole ( DELETED, LASTMODIFIED, NAME, NORMALIZEDNAME, IMAGEURI, CONCURRENCYSTAMP) VALUES( false, date('now'), "Super Admin", "Super Admin", "roles\Super_Administrator_500px.png", "0x0000AAA0008E37A0"); INSERT...
<filename>assets.sql/kilkeekrafts.sql CREATE DATABASE IF NOT EXISTS `kilkeekrafts` /*!40100 DEFAULT CHARACTER SET latin1 */ /*!80016 DEFAULT ENCRYPTION='N' */; USE `kilkeekrafts`; -- MySQL dump 10.13 Distrib 8.0.21, for Win64 (x86_64) -- -- Host: localhost Database: kilkeekrafts -- --------------------------------...
select * from funcionaries where salario > 2000; select * from funcionaries where salario < 2000;
<reponame>SergeantAvocado/Delivery-Reports-DB-<filename>Database/Db_Inserts/Andrea_Inserts.sql --ESTADOS INSERT INTO estado(codigo_estado,nombre) VALUES (1,'Amazonas'); INSERT INTO estado(codigo_estado,nombre) VALUES (2,'Anzoategui'); INSERT INTO estado(codigo_estado,nombre) VALUES (3,'Apure'); INSERT INTO estado(codi...
<gh_stars>1-10  CREATE VIEW [internal].[current_user_readable_operations] AS SELECT [object_id] AS [ID] FROM [catalog].[effective_object_permissions] WHERE [object_type] = 4 AND [permission_type] = 1
-- phpMyAdmin SQL Dump -- version 4.8.5 -- https://www.phpmyadmin.net/ -- -- Host: localhost -- Generation Time: Dec 18, 2019 at 10:35 AM -- 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 @OL...
INSERT INTO PrecinctNeighbors (`precinctID, neighborID`) VALUES ('05001000003', '05001000002'); INSERT INTO PrecinctNeighbors (`precinctID, neighborID`) VALUES ('05001000002', '05001000001'); INSERT INTO PrecinctNeighbors (`precinctID, neighborID`) VALUES ('05001000007', '05001000003'); INSERT INTO PrecinctNeighbors (`...
DROP FUNCTION IF EXISTS fetchq.metric_snap(CHARACTER VARYING, CHARACTER VARYING); CREATE OR REPLACE FUNCTION fetchq.metric_snap( PAR_queue VARCHAR, PAR_metric VARCHAR, OUT success BOOLEAN, OUT inserts INTEGER ) AS $$ DECLARE VAR_r RECORD; VAR_q VARCHAR; BEGIN success = true; SELECT * INTO VAR_r FRO...
create table views.census_municipios as select m.cve_geoid, m.cve_ent, m.cve_mun, m.nom_mun, m.nom_ent, ano, sum(pob) from processed.base_municipios_datos d join views.municipales m on LPAD(d.clave::varchar(5), 5, '0') = m.cve_geoid group by m.cve_geoid, ano ; alter table v...
CREATE VIEW `user_stats` AS SELECT u.id AS user_id, (SELECT count(*) FROM relationship r WHERE r.followed_id = u.id) AS follower_cnt, (SELECT count(*) FROM relationship r WHERE r.follower_id = u.id) AS following_cnt, (SELECT count(*) FROM micropost m ...
-- MySQL dump 10.13 Distrib 5.7.20, for Linux (x86_64) -- -- Host: 127.0.0.1 Database: halite2 -- ------------------------------------------------------ -- Server version 5.7.14-google-log /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESU...
<gh_stars>1-10 /* * $Id: nestingschema.sql 437 2008-11-14 04:17:35Z unsaved $ * * Tests a schema creation statement that nests some objects. */ /** * Besides testing nesting of commands without ; delimiters, this also * regression tests that the CREATE SCHEMA... command itself does not require * the closing ; t...
-- file:union.sql ln:143 expect:true explain (costs off) select unique1 from tenk1 except select unique2 from tenk1 where unique2 != 10
ALTER TABLE accounts ADD COLUMN last_ip VARCHAR;
INSERT INTO IACUC_PROTOCOL_STATUS ( PROTOCOL_STATUS_CODE, DESCRIPTION, UPDATE_TIMESTAMP, UPDATE_USER, OBJ_ID ) VALUES ( '400', 'Amendment Incorporated into Protocol', sysdate, 'admin', SYS_GUID() ) / INSERT INTO IACUC_PROTOCOL_STATUS ( PROTOCOL_STATUS_CODE, DESCRIPTION, UPDATE_TIMESTAMP, UPDATE_USER, OBJ_ID ) VALUE...
alter table node_record_table add score_percent numeric(6,2), add discord_id varchar , add application_status boolean default false, add block_producer_email varchar; alter table point_record_table add file_timestamps timestamp;
# --- Created by Ebean DDL # To stop Ebean DDL generation, remove this comment and start using Evolutions # --- !Ups create table address ( id bigint not null, address_details varchar(255), person_id varchar(255), constraint pk_address primary key (id)) ; crea...
<filename>src/api/v1/actions/update_exchange_rate.sql -- latest currency -- update exchange rate UPDATE ticker SET data = $<data>, updated_at = $<updated_at> WHERE currency = $<currency>;
CREATE TABLE subscription ( subscription_id serial PRIMARY KEY, user_name character varying(60) NOT NULL, mine_guid uuid NOT NULL, FOREIGN KEY (mine_guid) REFERENCES mine(mine_guid), CONSTRAINT unq_user_name_mine_guid UNIQUE(user_name,mine_guid) ); ALTER TABLE subscription OWNER TO mds; COMMENT ON ...
<gh_stars>1000+ INSERT INTO sessions (id, nid, issued_at, expires_at, authenticated_at,created_at,updated_at, token, identity_id, active, logout_token) VALUES ('dcde5aaa-f789-4d3d-ae1f-76da8d57e67c','884f556e-eb3a-4b9f-bee3-11345642c6c0','2013-10-07 08:23:19','2013-10-07 08:23:19','2013-10-07 08:23:19','2013-10-07 08:2...
-- @testpoint: range_range二级分区表:同义词/主键外键/pg_constraint,部分测试点合理报错 --step1: 创建表空间; expect:成功 drop table if exists t_subpartition_0297; drop tablespace if exists ts_subpartition_0297; create tablespace ts_subpartition_0297 relative location 'subpartition_tablespace/subpartition_tablespace_0297'; --test1: 同义词 --step2: 创建二...
<gh_stars>0 -- @testpoint: 关键字unlisten,用作表名创建普通表 drop table if exists unlisten cascade; create table if not exists unlisten(id int,name varchar(20)); create or replace procedure unlisten_insert as begin for i in 1..10 loop insert into unlisten values(i,'unlis+'||i); end loop; end; / call unlisten_insert();...
-- @testpoint: pg_stat_get_wlm_session_info(int flag),获取当前内存中记录的TopSQL查询语句级别相关统计信息,入参为有效值时 ----step1:开启资源管理功能; expect:成功 alter system set use_workload_manager to on; ----step2:参数生效略有延迟,等待始参数生效; expect:成功 select pg_sleep(3); ----step3:入参为有效值时; expect:成功 select pg_stat_get_wlm_session_info(0); select pg_stat_get_wlm_s...
<filename>FunctionsAndStoredProcedures/DiabloDBProblems.sql USE Diablo GO CREATE FUNCTION ufn_CashInUsersGames (@GameName NVARCHAR(50)) RETURNS TABLE AS RETURN SELECT SUM(Cash) AS SumCash FROM( SELECT g.[Name], ug.Cash, ROW_NUMBER() OVER (PARTITION BY g.Name ORDER BY ug.Cash DESC ) AS [Row] ...
<filename>repos/migrations/11_future_rights.sql --Future baking rights CREATE OR REPLACE FUNCTION tezos.cycle_by_level(bigint) RETURNS INTEGER AS $cycle_by_level$ BEGIN if $1 <= 1589248 THEN RETURN DIV($1 - 1, 4096); END IF; RETURN 388 + DIV($1 - 1589248 - 1, 8192); END; $c...
<filename>LoadDynamicExcel.sql USE [MyDatabase] GO SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO --==================================================================================================== -- Author: <NAME> -- Creation Date : 18-04-2021 -- Description : pr_DynamicExcel -- -- =======================...
-- phpMyAdmin SQL Dump -- version 5.0.1 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Oct 01, 2021 at 07:36 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...
<gh_stars>0 /* Creamos algunos usuarios con sus roles */ INSERT INTO users (id, username, password, email, fecha_registro, provincia, telefono, role) VALUES (1, 'admin', '$2a$10$c<PASSWORD>uAo.9B6.0fi8RrXV.i0C7NoYIv5PyjD4kHIEmyDZhy<PASSWORD>', '<EMAIL>', NOW(), 'Madrid', '637637637', 1); INSERT INTO users (id, username...
<gh_stars>1-10 CREATE SCHEMA IF NOT EXISTS sub; DROP TABLE IF EXISTS movies; CREATE TABLE sub.movies ( movie_id VARCHAR(64) PRIMARY KEY NOT NULL, data JSONB NOT NULL ); CREATE UNIQUE INDEX movies_movie_id_uindex ON sub.movies(movie_id);
<gh_stars>10-100 -- file:privileges.sql ln:1192 expect:true LOCK TABLE lock_table IN ACCESS SHARE MODE
-- file:opr_sanity.sql ln:138 expect:true SELECT p1.oid, p1.proname, p2.oid, p2.proname FROM pg_proc AS p1, pg_proc AS p2 WHERE p1.oid < p2.oid AND p1.prosrc = p2.prosrc AND p1.prolang = 12 AND p2.prolang = 12 AND (p1.proisagg = false OR p2.proisagg = false) AND (p1.prolang != p2.prolang OR p1.proi...
-- file:numeric_big.sql ln:326 expect:true INSERT INTO num_exp_mul VALUES (7,2,'814739569184924399102711674444306584731316176345067.39834031417849342571224916231092924046722938910652929295271097903377854123984307101079073134405782275535446337229706620713104545454319555885847481531722101704765783025789147453570970090')
CREATE PROCEDURE [dbo].[SetOrganizationAdmins] @OrganizationId BIGINT, @AdminIds ItemListTableType READONLY AS BEGIN -- SET NOCOUNT ON added to prevent extra result sets from -- interfering with SELECT statements. SET NOCOUNT ON -- When one or more organization members have valid tokens, -- this is the ...
<reponame>rangerlabs/OrleansStarterKit CREATE TABLE [dbo].[Channels] ( [Id] UNIQUEIDENTIFIER NOT NULL, [Handle] NVARCHAR(100) NOT NULL, [Description] NVARCHAR(1000) NOT NULL ) GO CREATE UNIQUE NONCLUSTERED INDEX [UK_Channels_Id] ON [dbo].[Channels] ( [Id] ) GO CREATE UNIQUE NONCLUSTERED INDEX [UK_Channels_Handle...
-- Code is reviewed and is in working condition -- Get the target data into temporary table SELECT se.name AS [XEventSession], ev.event_name, ac.action_name, st.target_name, se.session_source, st.target_data, CAST(st.target_data AS XML) AS [target_data_XML] into #XEventData F...
<reponame>ReubenUnruh/PowerJiraSqlRefresh CREATE ROLE [JiraRefreshRole] AUTHORIZATION [dbo] GO
<reponame>pradeepkumarcm-egov/DIGIT-Dev insert into egf_instrumenttypeproperty (id,transactionType,reconciledOncreate,statusOnCreateId,statusOnUpdateId,statusOnReconcileId,instrumentTypeId,createdby,createddate,lastmodifiedby,lastmodifieddate,tenantid) values('1','Credit',true,'created','updated','reconciled','1',1,now...