You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
select
id ||''as atom_title,
id ||''as atom_id,
id ||''as atom_content,
datetime(outageStartTime, "unixepoch") ||"Z"as atom_updated
from
outages
order by
id desclimit101
Consider this query:
https://pge-outages.simonwillison.net/pge-outages?sql=select%0D%0A++id+||+%27%27+as+atom_title%2C%0D%0A++id+||+%27%27+as+atom_id%2C%0D%0A++id+||+%27%27+as+atom_content%2C%0D%0A++datetime(outageStartTime%2C+%22unixepoch%22)+||+%22Z%22+as+atom_updated%0D%0Afrom%0D%0A++outages%0D%0Aorder+by%0D%0A++id+desc%0D%0Alimit%0D%0A++101
I had to use the
'' || id
pattern to avoid an error relating to strings v.s. integers: https://pge-outages.simonwillison.net/pge-outages.atom?sql=select%0D%0A++id+as+atom_title%2C%0D%0A++id+as+atom_id%2C%0D%0A++id+as+atom_content%2C%0D%0A++datetime%28outageStartTime%2C+%22unixepoch%22%29+%7C%7C+%22Z%22+as+atom_updated%0D%0Afrom%0D%0A++outages%0D%0Aorder+by%0D%0A++id+desc%0D%0Alimit%0D%0A++101The text was updated successfully, but these errors were encountered: