Exercise 15 of 19
Co-occurring S protein changes
Fixed training server
In the sequences from Switzerland, investigate the co-occurrence patterns at S protein positions 69, 70 and 501. Return one row for each combination together with the count. Order the combinations by count descending so the most common S-position pattern appears first.
The output should have this shape:
S[69] | S[70] | S[501] | count
----- | ----- | ------ | -----
H | V | N | 1234
- | - | Y | 987Write a query and run it. The result is compared with the reference answer without considering row order.
Loading query editor…
Loading query editor…
Explanation
Reference answer
data
.filter(country = 'Switzerland')
.group(by := {S[69], S[70], S[501]}, aggs := {count := count()})
.order(by := {count.desc()})