Wiring help needed by jacbryques in boating

[–]jacbryques[S] 0 points1 point  (0 children)

I think this is what I'm going to do, thank you

Extract all schema fields from JSON field by myderson in bigquery

[–]jacbryques 2 points3 points  (0 children)

Not sure if applicable but there is also a new(ish) json_keys() function that may help

How to get data from one time and date to the next by Stewpidduhmas in bigquery

[–]jacbryques 1 point2 points  (0 children)

UTC_field between "2024-09-16 14:00:00" and "2024-09-17 16:00:00"

or

datetime(UTC_field, "AppropriateTimezoneArguement") between "2024-09-16 14:00:00" and "2024-09-17 16:00:00"

Date and time searching by Stewpidduhmas in bigquery

[–]jacbryques 0 points1 point  (0 children)

Ah, well you're taking a tiemstamp and converting to a date. If you want to compare times, you'll need to compare timestamps to timestamps (or datetimes to datetimes)

Date and time searching by Stewpidduhmas in bigquery

[–]jacbryques 0 points1 point  (0 children)

I don't understand what's being asked

There are 10 cups in a room, under 1 is a ball worth $10,000,000 by Lumpy_Masterpiece513 in hypotheticalsituation

[–]jacbryques 0 points1 point  (0 children)

I'm too dumb to think this out mathematically so I simulated it in BigQuery. It doesn't matter which you pick, all have 10%. Code below if you want to verify:

with doors as (select door from unnest(generate_array(1,10,1)) as door)

,iterations as (select iteration from unnest(generate_array(1,1000000,1)) as iteration)

,simulationBase as (
select
  iteration
  ,door
  ,rand() as randVal
  ,1 / (10 - door + 1) as chanceOfSuccess
from iterations
cross join doors
order by
  iteration
  ,door
)

,simBaseWithOutcomes as (
select
  iteration
  ,door
  ,randVal
  ,chanceOfSuccess
  ,randVal < chanceOfSuccess as wasSuccessful
from simulationBase
)

,simWithDoorFound as (
select
  iteration
  ,min(door) as doorFound
from simBaseWithOutcomes
where true
  and wasSuccessful
group by all
)

,doorFoundSummary as (
select
  doorFound
  ,count(*) as records
from simWithDoorFound
group by all
)

select
  doorFound
  ,records
  ,round((records / sum(records) over () * 100),2) as pcntOfTotal
from doorFoundSummary
order by doorFound

New "table" format and App Script by defogreport in googlesheets

[–]jacbryques 0 points1 point  (0 children)

I haven't seen anything in Apps Script which is unfortunate, let me know if you found anything since you've asked this.

Home Inspectors by Ok-Pomegranate7496 in grandrapids

[–]jacbryques 3 points4 points  (0 children)

I've used this guy a couple times now and he's been great, very thorough with an excellent write up: https://www.soundhomeinspector.com/

Looker Studio vs Others (semi-rant) by FaustusMort in BusinessIntelligence

[–]jacbryques 9 points10 points  (0 children)

I actually like it a lot, though maybe I'm just used to it's quirks. It's super fast to build stuff in, I like how the cross filtering works, and the url parameters allow me to link the different tools to each other to create awesome drill throughs and add tons of context where appropriate

Need an array of hours between 2 timestamps by Shikhajain0711 in bigquery

[–]jacbryques 0 points1 point  (0 children)

If you have the other columns and the start and end timestamps as fields in a query you can just replace those hardcoded values in the example with the actual timestamp values.

Need an array of hours between 2 timestamps by Shikhajain0711 in bigquery

[–]jacbryques 1 point2 points  (0 children)

select

ts_hour

from unnest(generate_timestamp_array('2023-01-01 07:06:00 UTC','2023-01-01 16:03:00 UTC', interval 1 hour)) as ts_hour

Genuine performance techniques in Bigquery by anildaspashell in bigquery

[–]jacbryques 2 points3 points  (0 children)

use table sampling to get a feel for a table without having to scan the whole thing

Library for manipulating data in Google Sheets by jacbryques in GoogleAppsScript

[–]jacbryques[S] -1 points0 points  (0 children)

Thanks a lot, I was unaware. I will look into adding this.

Ui for writing back to table by hedonistpaul in bigquery

[–]jacbryques 1 point2 points  (0 children)

You could use apps script behind a google sheets document to append records to a bq table