Skip to content

How does one extract data so it emulates a typical Nutrition Label?  #6

@yosun

Description

@yosun

Playing around with some queries, but not versed enough in Nutrition to figure out how to structure it so it looks like a typical nutrition table (seems that ignoring certain nutrients in the listing is a step - lots of things labeled as 4:0). Maybe you can help?

SELECT nutrient.name, nutrition.amount FROM nutrition INNER JOIN food ON nutrition.food_id=food.id INNER JOIN nutrient ON nutrition.nutrient_id=nutrient.id WHERE food.id = ( SELECT food.id FROM food WHERE food.short_desc LIKE '%banana%' LIMIT 1 ) AND nutrition.amount>0 AND nutrient.id<607

https://www.fda.gov/food/guidanceregulation/guidancedocumentsregulatoryinformation/labelingnutrition/ucm063113.htm

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions