1

I want to count the average number of ingredients in each drug produced by a specific manufacturer in each year.

The results I want should be like this:

year | drug_names | avg_number_of_ingredients

2018 | drugA,drugB | 21

Can someone please help.

What I have done so far? I have tried different queries here : https://open.fda.gov/apis/drug/label/example-api-queries/ but unfortunately, the maximum I can do is count some field following some conditions like the query below:

https://api.fda.gov/drug/label.json?search=effective_time:[20110601+TO+20121231]&count=openfda.brand_name.exact&limit=1

What I want is to group manufacturers and count their drugs per year.

Thanks.

1
  • @JanDoggen I have updated the question.
    – Obiii
    May 18, 2019 at 13:40

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.