Question

Hi 

 

I have the below data

 

Order--Code--Fulfilled

AAA--123--Yes

BBB--123--Yes

BBB--456--No

CCC--456--Yes

CCC--123--Yes

 

From the above data how can I just get the orders that have been fully fulfilled (BBB has not been fulfilled so should be filtered out)?

 

thanks!

Link to comment
https://www.neowin.net/forum/topic/1332970-sql-query-help/
Share on other sites

8 answers to this question

Recommended Posts

  • 0
  On 08/06/2017 at 15:40, Slugsie said:

SELECT * FROM <tablename> WHERE Order NOT IN (SELECT Order FROM <tablename> WHERE Fulfilled = 'No')

 

Something along those lines should work.

Expand  

That will give the same result...

  • 0
  On 08/06/2017 at 15:47, Slugsie said:

No it won't. Inner query finds all Orders that aren't fulfilled (which will include BBB), then outer query returns any orders that aren't on that list, so BBB will be excluded.

Expand  

You're right it works!

 

Thanks,

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Posts

    • However, you would have to invoke it with the Windows key + G; in other words, it's useless. It is Microsoft's logic of placing things, and that is a company who have no idea how to design anything.
    • Samsung 2TB 9100 PRO, 990 PRO NVMe SSDs have never been cheaper by Sayan Sen It looks like the NVMe SSD market is once again coming to life if you are out there hunting for deals. Samsung, for example, is offering its 9100 PRO and 990 PRO drives at great prices that you should absolutely look at if you want to save some major bucks. The discounts apply on 2TB models (purchase links down below). First up, we have the 9100 PRO. It is based on PCIe Gen5 and thus promises double the speed of the 990 PRO. Samsung claims to deliver sequential read and write speeds of up to 14,700 MB/s and 13,400 MB/s, respectively, on the 2TB model. In terms of random throughput, the claimed numbers for the 2TB SKU is 1850K IOPS for the reads and 2600K IOPS for writes. The on-board DRAM cache helps in this regard with 2GB of LPDDR4X on the 2TB. The SSD is built on Samsung's in-house 8th Gen TLC V-NAND flash memory and has endurance ratings of 1200 TBW (terabytes written). Gen5 SSDs are known to run quite hot and thus the included SSDs are a must. You may even upgrade to something even better if you are having trouble managing the heat. Speaking of heat, Samsung says that the drives have an operating temperature of 0 to 70 Celsius, and upon exceeding this temperature, the drive's controller will begin throttling quite heavily. Get it at the link below: SAMSUNG SSD 9100 PRO without Heatsink 2TB, PCIe 5.0x4 M.2 2280 (MZ-VAP2T0CW): $239.99 (Amazon US) || $239.99 (Shipped and Sold by Newegg US) 990 PRO is, on the other hand, the fastest Gen4 drive from Samsung. There are some obvious differences like lower speeds on this compared to the 9100 PRO. Sequential reads and writes are rated at 7450 MB/s and 6900 MB/s respectively. The random throughputs for reads and writes are 1400K IOPS and 1550K IOPS respectively. The 990 PRO is based on Samsung's 7th Gen V-NAND flash and it too is TLC. The endurance rating for this is the same as that of the 9100 PRO. Get it at the link below: Samsung 990 PRO SSD NVMe M.2 PCIe Gen4, M.2 2280, MZ-V9P2T0B/AM: $149.99 (Shipped and Sold Amazon US) || $149.99 (Shipped and Sold by Newegg US) This Amazon deal is US-specific and not available in other regions unless specified. If you don't like it or want to look at more options, check out the Amazon US deals page here. Get Prime (SNAP), Prime Video, Audible Plus or Kindle / Music Unlimited. Free for 30 days. As an Amazon Associate, we earn from qualifying purchases.
    • Excuses. How much profit did they make last quarter?
    • yay i did it i'm so happy thank you all for your help your good guys on here thank you again .big thanks too patrickft456 and +InsaneNutter.
    • Sales don’t mean anything at all??? How many copies of FH5 did Microsoft sell on pS5? The number PS5’s impact those sales. What cheating is there on PS? A small amount of users spending money on KVM setups? PC gaming cheating is 1000x worse than any console gaming cheats. Joe user can easily buy full on cheats for PC games with full on easy to use gui’s for the cheats. Those websites brag about how many days they have not been caught. There is nothing like that for console gaming. Apparently you know nothing about nothing.
  • Recent Achievements

    • First Post
      Thornskade earned a badge
      First Post
    • Week One Done
      Higante88 earned a badge
      Week One Done
    • Conversation Starter
      CarloDuplessis earned a badge
      Conversation Starter
    • First Post
      hhgygy earned a badge
      First Post
    • Collaborator
      WiltshireHam went up a rank
      Collaborator
  • Popular Contributors

    1. 1
      +primortal
      719
    2. 2
      ATLien_0
      278
    3. 3
      Michael Scrip
      204
    4. 4
      +FloatingFatMan
      190
    5. 5
      Steven P.
      129
  • Tell a friend

    Love Neowin? Tell a friend!