Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[docs][core] update quick starts with new dataset #11653

Merged
merged 15 commits into from
Mar 29, 2022
Prev Previous commit
Next Next commit
review comments
  • Loading branch information
ddhodge committed Mar 18, 2022
commit 0df1bec4bb4ac4f16034a6da984c7651cf976ee3
2 changes: 1 addition & 1 deletion docs/content/latest/quick-start/install/macos.md
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ sudo ifconfig lo0 alias 127.0.0.6
sudo ifconfig lo0 alias 127.0.0.7
```

The loopback addresses do not persist after rebooting your Mac.
The loopback addresses _do not_ persist after rebooting your Mac.

To verify that the extra loopback addresses exist, run the following command.

Expand Down
43 changes: 0 additions & 43 deletions docs/content/latest/sample-data/retail-analytics.md
Original file line number Diff line number Diff line change
Expand Up @@ -460,46 +460,3 @@ min | max | avg
15.6919436739704 | 98.8193368436819 | 55.7463996679207
(1 row)
```

### What percentage of the total sales is from the Facebook channel?

You can do this as shown below.

```sql
yb_demo=# CREATE VIEW channel AS
(SELECT source, ROUND(SUM(orders.total)) AS total_sales
FROM users, orders
WHERE users.id=orders.user_id
GROUP BY source
ORDER BY total_sales DESC);
```

Now that the view is created, you can see it in our list of relations.

```sql
yb_demo=# \d
```

```output
List of relations
Schema | Name | Type | Owner
--------+----------+-------+----------
public | channel | view | postgres
public | orders | table | postgres
public | products | table | postgres
public | reviews | table | postgres
public | users | table | postgres
(5 rows)
```

```sql
yb_demo=# SELECT source, total_sales * 100.0 / (SELECT SUM(total_sales) FROM channel) AS percent_sales
FROM channel WHERE source='Facebook';
```

```output
source | percent_sales
----------+------------------
Facebook | 20.9018954710909
(1 row)
```