Skip to content

Instantly share code, notes, and snippets.

print(Kid.__mro__)
# (<class '__main__.Kid'>, <class '__main__.Dad'>, <class '__main__.Mum'>, <class 'object'>)
kid = Kid()
print(kid.eye_color)
# blue
print(kid.city)
# Amsterdam
kid.swim()
# I can swim
kid.dance()
@mike11339
mike11339 / HP-Vertica-Date-Time.sql
Created August 21, 2018 16:04 — forked from jackghm/HP-Vertica-Date-Time.sql
Working with HP-Vertica date and time
/*
#1 always write datetime values into the database as UTC!!!
-- Reread that last statement
Vertica will store all datetime values as UTC values
*/
-- I highly recommend storing an Integer column of the Day Date
select TO_CHAR(<% DATA_END_TIME %>::DATE - INTEGER '1', 'YYYYMMDD')::INTEGER AS date_id
SELECT CLOCK_TIMESTAMP() "Current Time"; -- return current time
SELECT NOW(); -- time since last session connection (or commit;) which may be an older time than now