This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Decimal Binary | |
------- ------ | |
0 0000000000000000 | |
205 0000000011001101 Interleave the min(compressed_val) for each | |
205 0000000011001101 sort key column and we get the min(minvalue) | |
0 0000000000000000 from stv_blocklist | |
------------------------------------------------------------------------------- | |
1711302150 0000000000000000000000000000000001100110000000000110011000000110 | |
1023 0000001111111111 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
create table orders(id int) comment='This is table holds all customer orders!'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
create table orders ( | |
id int | |
) | |
go | |
declare @CurrentUser sysname | |
select @CurrentUser = user_name() | |
execute sp_addextendedproperty 'MS_Description', | |
'This table holds all customer orders!', | |
'user', @CurrentUser, 'table', 'orders' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
create table orders (id int); | |
comment on table orders is 'This table holds all customer orders!'; | |
select comments | |
from user_tab_comments | |
where table_name='orders'; | |
┌───────────────────────────────────────┐ | |
│ comments | | |
├───────────────────────────────────────┤ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
create table orders(id int) comment="This table holds all customer orders!"; | |
select table_comment | |
from information_schema.tables | |
where table_name='orders'; | |
┌───────────────────────────────────────┐ | |
│ table_comment │ | |
├───────────────────────────────────────┤ | |
│ This table holds all customer orders! │ | |
└───────────────────────────────────────┘ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
create table orders(id int); | |
comment on table orders is 'This table holds all customer orders!'; | |
select description from pg_description | |
join pg_class on pg_description.objoid = pg_class.oid | |
where relname = 'orders'; | |
┌───────────────────────────────────────┐ | |
│ description │ | |
├───────────────────────────────────────┤ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
create table orders(id int); | |
comment on table orders is 'This table holds all customer orders!'; | |
select description from pg_description | |
join pg_class on pg_description.objoid = pg_class.oid | |
where relname = 'orders'; | |
┌───────────────────────────────────────┐ | |
│ description │ | |
├───────────────────────────────────────┤ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
with | |
years(year_id, year) as ( | |
select i, 'Year ' || i | |
from generate_series(0, 3) i | |
), | |
regions(region_id, region) as ( | |
select i, 'Region ' || i | |
from generate_series(0, 3) i |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
explain | |
select | |
count(t1.user_id) as viewed_homepage, | |
count(distinct t2.user_id) as used_demo, | |
count(distinct t3.user_id) as entered_credit_card | |
from ( | |
select | |
user_id, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Path to your oh-my-zsh configuration. | |
ZSH=$HOME/.oh-my-zsh | |
# Set name of the theme to load. | |
# Look in ~/.oh-my-zsh/themes/ | |
# Optionally, if you set this to "random", it'll load a random theme each | |
# time that oh-my-zsh is loaded. | |
ZSH_THEME="robbyrussell" | |
# Example aliases |
NewerOlder