Skip to content

Instantly share code, notes, and snippets.

@twaddlac
Created August 16, 2018 15:06
Show Gist options
  • Save twaddlac/ee42e967f3a70dda68ea9cda9dc23bfe to your computer and use it in GitHub Desktop.
Save twaddlac/ee42e967f3a70dda68ea9cda9dc23bfe to your computer and use it in GitHub Desktop.
Query used to denromalize the secondary screens of eegi ny db
select
experiment.well,
experiment.worm_strain_id,
experimentplate.temperature,
experimentplate.date,
experiment.library_stock_id,
wormstrain.*,
librarystock.*,
experiment.*,
experimentplate.*,
clone.*,
-- clonetarget.*
devstarscore.*,
manualscore.*,
manualscorecode.*
-- gene.*
from
experiment
join experimentplate on experimentplate.id = experiment.plate_id
join wormstrain on wormstrain.id = experiment.`worm_strain_id`
join librarystock on librarystock.`id` = experiment.`library_stock_id`
join clone on clone.`id` = librarystock.`intended_clone_id`
-- join clonetarget on clonetarget.`clone_id` = clone.id
join manualscore on manualscore.id = experiment.id
join manualscorecode on manualscorecode.`id` = manualscore.`score_code_id`
join devstarscore on devstarscore.`experiment_id` = experiment.id
-- join gene on gene.`id` = clonetarget.`gene_id`
where experimentplate.screen_stage = 2
-- and librarystock.intended_clone_id = "L4440"
order by
experiment.well,
experiment.worm_strain_id,
experimentplate.temperature,
experimentplate.date,
experiment.library_stock_id
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment