Skip to content

Instantly share code, notes, and snippets.

@anna-geller
Created July 28, 2023 08:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • 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 │
├──────────┼──────────────────────┼──────────────────────────────────┼────────────┼────────┼──────────┼─────────┤
│ 1 │ 1041924825444260848 │ 35ea8023672b6fb484472b1e9d3ad960 │ 20 │ 166.89 │ 1 │ 166.89 │
│ 2 │ 8213643278991755884 │ aa1635559b3d2db97f6a380ec66c1670 │ 14 │ 171.63 │ 8 │ 1373.04 │
│ 3 │ 4089321759044200510 │ 0de4580c193c285105f9973c6cc3bf47 │ 12 │ 50.62 │ 10 │ 506.2 │
...
│ 99 │ 9698856877475329963 │ af36ef2431d18343237ca7a2c9300f59 │ 2 │ 72.33 │ 9 │ 650.97 │
│ 100 │ 3447036789500425868 │ d067c882b817af0a7621ca009961f015 │ 20 │ 58.15 │ 4 │ 232.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