17 lines
264 B
Markdown
17 lines
264 B
Markdown
# sql
|
|
|
|
Who has the most follows?
|
|
|
|
```sql
|
|
SELECT subscriber_pubkey, COUNT(foaf_pubkey) AS foaf_count
|
|
FROM foaf
|
|
GROUP BY subscriber_pubkey
|
|
ORDER BY foaf_count DESC
|
|
LIMIT 10;
|
|
```
|
|
|
|
Count of all foafs
|
|
|
|
```sql
|
|
SELECT COUNT(*) as foaf_count FROM foaf;
|
|
``` |