Solvedksql Support COUNT DISTINCT

Edited by @miguno on Nov 23, 2018:

From @apurvam at #506 (comment)

I take this feature to mean that we should implement the DISTINCT keyword such that the following query would count the number of distinct values for field in the window:

SELECT COUNT(DISTINCT field) FROM stream WINDOW TUMBLING (size 1 hour);

Original ticket was empty.

18 Answers

✔️Accepted Answer

I take this feature to mean that we should implement the DISTINCT keyword such that the following query would count the number of distinct values for field in the window:

SELECT COUNT(DISTINCT field) FROM stream window tumbling (size 3600 seconds);

Related Issues:

18
ksql Support COUNT DISTINCT
I take this feature to mean that we should implement the DISTINCT keyword such that the following qu...
55
apexcharts.js x-axis is displayed as local datetime instead of UTC
for incoming people facing this: as @drpuur showed in his codepen just add: this will fix it for bot...
28
apexcharts.js Make Chart Margins and Padding Optional/Adjustable
@benhaynes The way to remove all paddings/margins would be hide the y-axis by yaxis.show = false Rem...
22
plotly.py plotly.plotly import error message
@anki-code here is what worked for me: Downgraded from the latest plotly version pip install plotly=...
17
ipympl notebook backend not working in jupyterlab
In case others get here and are a little confused: At the beginning of your notebook run %matplotlib...
12
plotly.py MathJax not loaded in plotly offline
EDIT: Actually this might not be the right place for this since the original issue did not explicitl...
8
apexcharts.js Compilation error TS1122 in apexcharts.d.ts
@sugihartolim ApexCharts is also exported as commonjs in the dist directory Can you please try ...
8
apexcharts.js Series hide and show methods
Added new methods showSeries and hideSeries Also toggleSeries will return a boolean value whether th...
7
ink TypeError: Class constructor Component cannot be invoked without 'new'
if anyone stumbles upon this using the env preset like I was you can set a more specific target to p...
88
kafka python kafka.errors.NoBrokersAvailable exception when running producer example on Mac
Version 1.3.5 of this library (which is latest on pypy) only lists certain API versions 0.8.0 to 0.1...
27
node rdkafka node-rdkafka 2.3.0: librdkafka build fails on Mac OS
When re-installing openssl I get this notice: So if I do this our project can then install and compi...
24
node rdkafka Install fail during node-gyp rebuild
For everyone else having problems installing node-rdkafka@2.1.1 on macOS Sierra: Error: Fix: NOTE: I...
14
node rdkafka Mac build is broken
Thanks to #405 (comment) I solved this on my mac I set BUILD_LIBRDKAFKA to 0 to prevent node-gyp bui...
14
kafka python seek_to_beginning is difficult to use when using topic subscription
Agree it is a bit strange The API is modeled after the official java client which has the same issue...
12
kafka python Help: NoBrokersAvailable
In case someone faces the exact same issue as I did I believe my kafka config was the issue ...
12
strimzi kafka operator Helm chart v0.22.1 failed to upgrade Strimzi operator to support v1beta2 API
Thank you very much for your help @scholzj Confirmed the manual upgrade to 0.22.1 works ...
5
node rdkafka Error during compilation
Hi @Rick83600 have you got libsasl2-dev installed on your system ? Hello guys ...
5
confluent kafka dotnet System.DllNotFoundException: Failed to load the librdkafka native library
Hi guys System.DllNotFoundException: Failed to load the librdkafka native library An error occurred ...
3
thingsboard Interaction over Widgets
For anyone facing this issue I've found services are actually maintained across all widget contexts ...
577
graphql subscriptions Cannot find name 'AsyncIterator' error in Typescript compilation process.
Thanks!! By adding: to tsconfig.json file fixed the issue for good. I have found a difficulty compil...
133
firebase js sdk The behavior for Date objects stored in Firestore is going to change AND YOUR APP MAY BREAK
@software770 This is how you do it in an angularfire2 service: After this i got rid of the console e...
101
firebase js sdk Firestore import - Bundle size is huge
Okay here we go Huge heads up: The release I am about to talk about is VERY experimental We have not...
101
ws read ECONNRESET error on disconnect (ws 3.3.3)
Issue is caused by lack of error listener on the socket and can be fixed like so: This isn't documen...
86
ws How else can I set custom headers?
@streamnsight You want something like this? I know there were heavy discussions in #227 but it is no...
64
ws wss: Error during WebSocket handshake: Unexpected response code: 200
A fix for me was setting these response headers: Host Connection and Upgrade For nginx case (socket....
63
Rocket.Chat AppArmor errors after Snap Update
So I have a workaround for this: nano /var/lib/snapd/apparmor/profiles/snap.rocketchat-server.rocket...
59
firebase js sdk FR: Firestore Web SDK React-Native/Expo support for Android devices
I think i've found the cause of this bug The problem is not in Firestore library itself but in the u...
37
darkflow No module named cy_yolo_findboxes
Have you built the cython module with when I run demo shows this darkflow/net/yolo/test.py line 6 ...
36
firebase js sdk Setting a timer for a long period of time, i.e. multiple minutes
Yeah I'm using real-time database and when I added firebase to my project I got This Thank you @boje...
35
openpose How hard would it be to port to mobile? (iOS/Android)
I'm trying to convert the .caffemodel to CoreML to see if I can run it on iOS 11 I will report more ...
34
feathers Feathers Auk Release
Thanks for everyone's patience with this 90% of Auk is already complete but a lot of the confusion i...
34
ws How to set initially cookies to a websocket client
code example Looking at the doc we can read cookies from a server with upgradeReq ...
32
ws Constantly crashing when sending. Error not opened
The second parameter for the send method is an error handler Do something like this where you're sen...
24
openpose Python API error: Cannot import name pyopenpose
My environment - UBUNTU 18.04 CUDA 9.2 CUDNN 7.2.1 Openpose current version 1.4 (Jan 2019) I did the...
24
ws Backport Security Fix to 6.2.1
I've released ws@6.2.2 and updated the security advisory I've searched for any related issues and av...
23
openpose CMake Error at CMakeLists.txt:929 (add_subdirectory):
Temporary workaround Clone pybind11 separately into the folder The configure generate and build all ...
23
openpose macOS - protobuf compilation errors
@soulslicer installing Caffe separately and setting BUILD_CAFFE to false in the cmake config seems t...
23
firebase js sdk Firestore offline persistence not working on react native
😢 @samtstern react-native-firebase isn't for everyone when enabling persistence I get an error on r...
22
feathers How to fetch associations
Yes Have a look at the example how to fetch related items Basically So I have developed an app with ...
21
Rocket.Chat Can't access RocketChat after setting iframe URL to localhost
Hi a quick way to resolve getting back to the admin console via iframe : Go to iframe browser consol...
20
laravel echo server Android Client
Hi @dipit2007 I have a little advance on this using the library https://github.com/socketio/socket.i...
19
Rocket.Chat Franz - invalid URL since 0.52.0
So . there is an update workaround without the need of older server: Install Franz and quit it (ot j...
19
laravel echo server POST http://localhost/broadcasting/auth 404 (Not Found) error
Inside your config/app.php uncomment line with I am trying to make my app connecting to pusher on a ...
17
Rocket.Chat [BUG] Users can't send messages (>= 2.4.x)
Same issue here Worked around it by using the reset feature in /admin/Message Description: I updated...
17
zephyr WiFi support for ESP32
Update: Feature branch that has functional networking (WiFi) on ESP32 can be found here ...
16
goaccess Support structured log formats such as JSON
Native JSON support has been added Feel free to build from development to test this out It will be p...
15
Rocket.Chat Rocket.Chat stops working with 1000 active users
Thanks for all of your suggestions We could now prove that the UserPresenceMonitor was responsible f...
15
Rocket.Chat How can I move rocket chat to other server?
@karamata do a mongo export: tar it up copy it over to new host Your Rocket.Chat version: Rocket.Cha...
15
ws Compile with warnings
@syang webpack.config.js :: externals: [/node_modules/ 'bufferutil' 'utf-8-validate'] for example: ...