Skip to content

Commit

Permalink
Update Notes.md
Browse files Browse the repository at this point in the history
  • Loading branch information
wisdompeak authored Jan 18, 2023
1 parent 72a5847 commit 9e4360c
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions SQL/Notes.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,19 @@ left(trans_date, 7) as month
join UnitsSold on Prices.product_id = UnitsSold.product_id
and UnitsSold.purchase_date between Prices.start_date and Prices.end_date
```

#### 临时表
```sql
with Temp1 as
(
select winner_id
from Winners
), Temp2 as
(
select player_id
from Players
)

select
Round((select count(*) from Winner) / (select count(*) from Players), 2) AS fraction
```

0 comments on commit 9e4360c

Please sign in to comment.