---
title: "Discussion on \"Count Distinct within Intervals in Order — From SQL to SPL #38\" | Hashnode"
description: "Discussion on \"Count Distinct within Intervals in Order — From SQL to SPL #38\". Problem Description & Analysis:\nThe Teradata database table has three fields: date, account, and the name of the product purchased by the account.\n\nTask: Now we need to calculate how many types of products each account has purchased before each day, ..."
url: "https://hashnode.com/posts/count-distinct-within-intervals-in-order-from-sql-to-spl-38/684a4cb054c34c9c921e5b86"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Count Distinct within Intervals in Order — From SQL to SPL #38](https://esproc-desktop.hashnode.dev/count-distinct-within-intervals-in-order-from-sql-to-spl-38?utm_source=hashnode&utm_medium=feed)

Problem Description & Analysis: The Teradata database table has three fields: date, account, and the name of the product purchased by the account. Task: Now we need to calculate how many types of products each account has purchased before each day, ...

Jun 12, 2025 · 2 min read · esproc-desktop.hashnode.dev  
Read the article

-   [#sql](https://hashnode.com/tag/sql)
-   [#sql-server](https://hashnode.com/tag/sql-server)
-   [#sqltutorial](https://hashnode.com/tag/sqltutorial)
-   [#databases](https://hashnode.com/tag/databases)
-   [#data-structures](https://hashnode.com/tag/data-structures)
-   [#data-engineering](https://hashnode.com/tag/data-engineering)
-   [#data-analysis](https://hashnode.com/tag/data-analysis)
-   [#data-analytics](https://hashnode.com/tag/data-analytics)
-   [#esproc-spl](https://hashnode.com/tag/esproc-spl)
-   [#programming-blogs](https://hashnode.com/tag/programming-blogs)
-   [#programming-tips](https://hashnode.com/tag/programming-tips)
-   [#productivity](https://hashnode.com/tag/productivity)

## Written by

[esProc](https://hashnode.com/@esProcDesktop)

@esProcDesktop

  
[View profile](https://hashnode.com/@esProcDesktop)

esProc SPL is a JVM-based programming language designed for structured data computation, serving as both a data analysis tool and an embedded computing engine. FREE download👉🏻: https://www.esproc.com/download-esproc

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
