select * from crosstab(
'select extract(week from starts) as week,
extract(dow from starts) as dow,
count(*)
from events
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"inputs": "rooms", | |
"query": [ | |
{ | |
"map": { | |
"language": "javascript", | |
"source": " | |
function(v) { | |
key = v.key; | |
floor = key.substring(0, key.length - 2); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
## For 7 databases in 7 worlds | |
## | |
## Install: | |
## $ wget -O riakget.sh https://gist.github.com/nownabe/c870c1ca37501eecc9e5/raw/a74e7295ca1b501c288d633aea9c750df412b0fc/gistfile1.sh | |
## $ chmod +x riakget.sh | |
## Usage: | |
## $ ./riakget.sh animals polly |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
## For 7 databases in 7 worlds | |
## | |
## Install: | |
## $ wget -O riakput.sh https://gist.github.com/nownabe/60d9a6f4e6034c2e5eae/raw/406d2a7a08a5d1ce5afd993786c11293cf3e949a/gistfile1.sh | |
## $ chmod +x riakput.sh | |
## Usage: | |
## $ echo '{"nickname": "Sweet Polly Purebred", "breed": "Purebred"}' | ./riakput.sh animal polly application/json |
NewerOlder