Skip to main content
Question

Event based function

  • Apr 9, 2020 11:54 PM UTC
  • 2 replies
  • 11 views

davds
Forum|alt.badge.img+1
  • Participating Frequently

Here is example vertica site given, to create event id when stock big > $5 based on timestamp
SELECT stock, CONDITIONAL_CHANGE_EVENT(bid> 5)
OVER(ORDER BY ts) FROM Tickstore3;

My question is: this only work for one stock, if have more than one stock in the table, has any like: partition by or group by function to generate each stock event_id?

2 replies

davds
Forum|alt.badge.img+1
  • Author
  • Participating Frequently
  • Apr 9, 2020 11:56 PM UTC

davds
Forum|alt.badge.img+1
  • Author
  • Participating Frequently
  • Apr 9, 2020 11:59 PM UTC

CONDITIONAL_CHANGE_EVENT and CONDITIONAL_TRUE_EVENT do not support window framing.

Vertica DO NOT support this window function