Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1n3JvW-0005Df-0a for pgsql-general@arkaria.postgresql.org; Fri, 31 Dec 2021 15:34:42 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1n3JvU-0006V0-TM for pgsql-general@arkaria.postgresql.org; Fri, 31 Dec 2021 15:34:40 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1n3JvU-0006Ur-Hc for pgsql-general@lists.postgresql.org; Fri, 31 Dec 2021 15:34:40 +0000 Received: from mail-oi1-x22c.google.com ([2607:f8b0:4864:20::22c]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1n3JvS-00067y-7W for pgsql-general@lists.postgresql.org; Fri, 31 Dec 2021 15:34:39 +0000 Received: by mail-oi1-x22c.google.com with SMTP id i9so36660817oih.4 for ; Fri, 31 Dec 2021 07:34:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-language; bh=yzCqdMEZRZZ+0zi/wfd9Btm31Yr855vCQ5dO4ORKlIM=; b=PVhrxkcbB1v4XxzBWMTSl+51R8E1GPFStiFGtUJKQ1M/dKYPZ2LCU+YZMauyOWRNBP gIoLf7QeXMCGBXU/E07xGpAudYnKTboaCSS1VWaKUCLRfFC/7We6jQJbGk6EpBydLHQC ivPquCBxUKVeAW5yOfp9S7HKvqLdICywdE1uqfqOmamnREimdMc+qxKxHiiq5TT2oeWs qRqNKmCH/WHgZzC8E52Ri7olsz3i1mz8gzVRH9ZOjMtnsfgMGCb2B4CY1Py/Ybip7ARa Lh5nXf5lrWLHmUIE23fdsT6urRcRUh0ONd31Tp38+J7KXWWRsKTyX2KkjZbc39mvgOah vwdg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language; bh=yzCqdMEZRZZ+0zi/wfd9Btm31Yr855vCQ5dO4ORKlIM=; b=gMunBpYru2mtQYED9O6V+9b8Yg/Csg3k0T3IAaMCZiRBxWVMIMAGpAfVFRxs20/qcz ahZnIs3MraUXGebx8DHydTcBniGd8r387SihMI7XEJW71UpUZRHh/0oDj15UU+k+kUz8 +HT5aKABpQbfd88E+hxfj3UhyK7Dew5V1zy9zndy5k9bdiLNX5pg7OYmTwUbhKEGQa3X SiTnSgcgaKnHb66pPXhoHRlvV3dAk+T1cFnv+kyfFmTLkZBdPfw0hU5leQS6wwBW60OG p/8EYvNnAnYPXJGJzesCd8560Xuk7L5fYso4b7Om1NaGShrLqdkTOlC0+SmzREl9HsoC kW9w== X-Gm-Message-State: AOAM531U3Srs7J73wqy+8iqiBmCPQjTcSWV7sy6HcRnqOzMC5F32jakq gO6YqyWPFOB9188Rb7dYBgEgWFVkL7w= X-Google-Smtp-Source: ABdhPJxxoaH0sIwifc8Uu8UlxnUsJ14s/XLxx2o74HHeNeMrQ25M6z6ab2H2o85CyYoIZG6MTPhMog== X-Received: by 2002:aca:ad86:: with SMTP id w128mr27106736oie.93.1640964877295; Fri, 31 Dec 2021 07:34:37 -0800 (PST) Received: from [192.168.88.10] (ip68-11-68-85.no.no.cox.net. [68.11.68.85]) by smtp.googlemail.com with ESMTPSA id b26sm3505659oob.10.2021.12.31.07.34.36 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 31 Dec 2021 07:34:37 -0800 (PST) Subject: Re: create query with date values To: pgsql-general@lists.postgresql.org References: From: Ron Message-ID: Date: Fri, 31 Dec 2021 09:34:36 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.14.0 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/alternative; boundary="------------72BBF0506E059BB354983463" Content-Language: en-US List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk This is a multi-part message in MIME format. --------------72BBF0506E059BB354983463 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit On 12/31/21 7:12 AM, ourdiaspora wrote: > Recipients, > > How to create a query such that when a date value is entered, the date may be associated with the result of another query. > > The scenario is that a date value is entered (the plan is these dates should be a separate table), then a query result is joined with the date value. > > Please advise the correct terminology for appropriate review of the manual. Maybe I misunderstand you, but it sounds like you are referring to an /inner join/ (which is the standard way of joining): SELECT ..... FROM SEPARATE_TABLE    , MAIN_TABLE WHERE SEPARATE_TABLE.SOME_DATE = MAIN_TABLE.OTHER_DATE ; If this isn't what you mean, please clarify. -- Angular momentum makes the world go 'round. --------------72BBF0506E059BB354983463 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: 8bit On 12/31/21 7:12 AM, ourdiaspora wrote:
Recipients,

How to create a query such that when a date value is entered, the date may be associated with the result of another query.

The scenario is that a date value is entered (the plan is these dates should be a separate table), then a query result is joined with the date value.

Please advise the correct terminology for appropriate review of the manual.

Maybe I misunderstand you, but it sounds like you are referring to an inner join (which is the standard way of joining):

SELECT .....
FROM SEPARATE_TABLE
   , MAIN_TABLE
WHERE SEPARATE_TABLE.SOME_DATE = MAIN_TABLE.OTHER_DATE
;

If this isn't what you mean, please clarify.

--
Angular momentum makes the world go 'round.
--------------72BBF0506E059BB354983463--