Given a warehouse with a capacity of 500,000 square feet, Amazon wishes to optimize the number of items stocked, prioritizing prime items. The goal is to fill the warehouse with as many prime items as possible and then supplement the remaining space with non-prime items. However, there are new operational constraints: prime and non-prime items must be stocked in equal quantities, and there must always be non-prime items in stock. Assuming each item occupies the same amount of space, using the table playground.inventory, write a query to determine the maximum number of prime and non-prime items that can be accommodated in the warehouse. The output should list the item_type (prime_eligible or not_prime) followed by the maximum number of item_count that can be stocked, ensuring item counts are whole numbers and adhering to the given constraints and prime_eligible first.
Querying is only for logged in users!
No queries have been run yet.