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 1nykfY-0003ox-I9 for pgsql-sql@arkaria.postgresql.org; Wed, 08 Jun 2022 01:39:36 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1nykfW-0000PH-4l for pgsql-sql@arkaria.postgresql.org; Wed, 08 Jun 2022 01:39:34 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nykfV-0000P7-QM for pgsql-sql@lists.postgresql.org; Wed, 08 Jun 2022 01:39:33 +0000 Received: from mail-wm1-x32c.google.com ([2a00:1450:4864:20::32c]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1nykfT-0008Uw-Mx for pgsql-sql@lists.postgresql.org; Wed, 08 Jun 2022 01:39:33 +0000 Received: by mail-wm1-x32c.google.com with SMTP id l126-20020a1c2584000000b0039c1a10507fso4510908wml.1 for ; Tue, 07 Jun 2022 18:39:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:reply-to:from:date:message-id:subject:to; bh=TB7vvOvM8+IDQZdqA2lJ8693lmDS/SfniHE/YOQkWVY=; b=IE1E7i5UMiE+i2Go3nOmnJYHc0nLy/8bpR6NkKbp+84nymUukav+uD4hiJvieLKHsB kjLJOFhh+wxHpKjK+6E4fe8dRpt9u/ZdKqRPbrmoczkHERTsrJ5CrFa5UuvvPWPcgpKF qle3agnOB+hXcOb7jF21mtXsiYUSPokZe4meN5PASVL1DZeBMNFhTokz7ZBEt24wQyVC 5/EtECr9ZMiyP9NsxRvhu+vI4YhdXH0Mgq/fazChyqT9f5Glhk+HzvB4E/4Z7eHgxSf/ vMQED/SSa46NIrN68LEM6/hMBZUnbAvJB+SNezWEjSLqRgLsdAWuEjbzzxG+nHa2/tGi s2lg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:reply-to:from:date:message-id :subject:to; bh=TB7vvOvM8+IDQZdqA2lJ8693lmDS/SfniHE/YOQkWVY=; b=DOP1Q9UIKiiSXbIyjT+zib9mzqWsFw99ori9iorDnn7HrjcBavCL8oIPgQdfUkv9d5 eMyim//8yAJiR+bCbfo0DvrSUMWNCMUJxru0JsPHKLPicSMyRTgymmGPNILDaFq3CMt5 R41ZTUhiBEMai021dHWCYsoN5yBNTjGcVKM0ZvglxtRdixRBkYCzigmZla8ugR10z2I5 rhsPdj3Rs0KFvwwzvKq/qK/HzkMvGt5Dgxqozu2xyvXNx66TsgRe7PyEwsrq7T0UaFMO JvA6GyyZBpKvbNLAgOPsFcWJKtWIuAWaRziEQTnq99PuJXIoxE4+ZtWhzZ8ARDyN7Cas W3SA== X-Gm-Message-State: AOAM531I0TgVo30Gsud7gsl2sRp5j0aibjw+gMpvcNnjMw25nRDCXKSO dvbwQZZtqhqL/04wt2gUxs17O47cDSBHuSQjeSQvElN7 X-Google-Smtp-Source: ABdhPJy/lzuKJFQdgPxPegpNMd0chmvZlxbmb55Fq+aLlFSXO7H3353nhGkg8TNuCz79zynOcToEsS4m/dwvc2w07N8= X-Received: by 2002:a05:600c:22d9:b0:39c:4b1b:5f99 with SMTP id 25-20020a05600c22d900b0039c4b1b5f99mr17302836wmg.151.1654652369597; Tue, 07 Jun 2022 18:39:29 -0700 (PDT) MIME-Version: 1.0 Reply-To: stercor@gmail.com From: "Theodore M Rolle, Jr." Date: Tue, 7 Jun 2022 21:39:09 -0400 Message-ID: Subject: Electricity bill To: pgsql-sql Content-Type: multipart/alternative; boundary="000000000000b7787005e0e5c6bd" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --000000000000b7787005e0e5c6bd Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable I'm putting in YYYY-MM-DD dates of electricity bills and would like to not have starting and ending dates in the same row. Only ending date. Will someone show me the SQL to compute the months=E2=80=99 usage? This req= uires retrieving two rows to compute the number of days... --000000000000b7787005e0e5c6bd Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
I'm putting in YYYY-MM-DD dates of electricity bills = and would like to not have starting and ending dates in the same row. Only = ending date.
Will someone show me the SQL to compute the m= onths=E2=80=99 usage? This requires retrieving two rows to compute the numb= er of days...
--000000000000b7787005e0e5c6bd--