Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  • Users: C_C_K
  • Order by date
  1. C_C_K

    combining queries/subqueries

    I have two queries I'd like to combine - and the json is kicking my butt. The json extract below pulls a sku out of a lookup table along with the quantity ordered {"9999":2} It works fine. If I add the 3 commented out portions, I get no results. SELECT `p`.`id`, `p`.`sku`...
  2. C_C_K

    return groupod by dates from subquery

    The second table, base_order_shipments shows ALL shipments for each day, not just those that were received and Fully shipped on that same given day. For example, if an order was received outside of the range, and was unable to be shipped because the merch was out of stock... it could be...
  3. C_C_K

    return groupod by dates from subquery

    I had such high hopes, but I'm still missing *something* If I remove the comment indicator before the "and" in the JOIN I still get the same results. It seems I have to keep the date in the join or I lose days, and the figures are not right. If I count(base_order_id) it's not available as a...
  4. C_C_K

    return groupod by dates from subquery

    Yes, there absolutely is... and it is the base_order_id. I was thinking I'd run into trouble because if there is no shipment there's no base_order_id entry in the table, but that is essentially the same problem I caused for myself using the date! Thank you again. I didn't put this in the...
  5. C_C_K

    return groupod by dates from subquery

    I also tried to put a condition on that count tried 0 and null, but still no chg FROM (SELECT DATE(completed) AS compdate, IF(COUNT(id) IS NULL,0,count(id)) AS 'totalshipped' FROM base_order_shipments WHERE DATE(completed) BETWEEN '2018-12-01' AND...
  6. C_C_K

    return groupod by dates from subquery

    I found an example online that I was able to understand and convert, and I just have one issue I cannot seem to overcome now.... there were two days where no shipments were made at all, 12-2 and 12-9, how can i get the orders received on those two days to appear, even though there were 0...
  7. C_C_K

    return groupod by dates from subquery

    Here's the logic I am atempting to apply Have a base_orders table. It contains order_date and completed (shipped) The first part is I needed to know the number of orders that were received and shipped out on the same day, for a range of days (a week for example) Someone was nice enough to...
  8. C_C_K

    subqueries with multiple date results

    I just knew I was making it harder than it had to be. I had to tweak that a tiny bit for mysql, but that's definitely got it. THANK YOU! Now I'm off to add a "shipments" table to get the grand total of shipments for each day, regardless of the order date, which I know is going to be a...
  9. C_C_K

    subqueries with multiple date results

    oh I was trying to simplify the table name... base orders IS orders in this case - i just missed it
  10. C_C_K

    subqueries with multiple date results

    subqueries with multiple date results I am building a query that shows the number of orders received, on each date within a range of dates Wanted: a 2nd column of orders that were shipped in full on the same day they were received. this is what I have so far, and the results of orders in...

Part and Inventory Search

Back
Top