Skip to content

Instantly share code, notes, and snippets.

@anna-geller
Created July 28, 2023 08:14
Show Gist options
  • Save anna-geller/ebd41a04a0013021914f36c51aeda950 to your computer and use it in GitHub Desktop.
Save anna-geller/ebd41a04a0013021914f36c51aeda950 to your computer and use it in GitHub Desktop.
D SELECT order_id,
> hash(customer_name) as customer_name_hash,
> md5(customer_email) as customer_email_hash,
> product_id,
> price,
> quantity,
> total
> FROM orders;
┌──────────┬──────────────────────┬──────────────────────────────────┬────────────┬────────┬──────────┬─────────┐
│ order_id │ customer_name_hash │ customer_email_hash │ product_id │ price │ quantity │ total │
│ int64 │ uint64 │ varchar │ int64 │ double │ int64 │ double │
├──────────┼──────────────────────┼──────────────────────────────────┼────────────┼────────┼──────────┼─────────┤
11041924825444260848 │ 35ea8023672b6fb484472b1e9d3ad960 │ 20166.891166.89
28213643278991755884 │ aa1635559b3d2db97f6a380ec66c1670 │ 14171.6381373.04
34089321759044200510 │ 0de4580c193c285105f9973c6cc3bf47 │ 1250.6210506.2
...
999698856877475329963 │ af36ef2431d18343237ca7a2c9300f59 │ 272.339650.97
1003447036789500425868 │ d067c882b817af0a7621ca009961f015 │ 2058.154232.6
├──────────┴──────────────────────┴──────────────────────────────────┴────────────┴────────┴──────────┴─────────┤
100 rows (40 shown) 7 columns │
└───────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment