Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Maximum Qty
Message
From
24/01/2019 02:25:49
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows 10
Network:
Windows Server 2008 R2
Database:
MS SQL Server
Application:
Desktop
Miscellaneous
Thread ID:
01665698
Message ID:
01665701
Views:
60
Unfortunately since there is no concrete logic on selection, there is no solution to it. What is the logic behind selecting 15, 1300? 1300 is not the maximum value, nor 1300 is not the maximum occurring value, so why do you choose that one?
700 occurs most and 1400 is the maximum, so what makes 15, 1300 chosen?



>Sir, this is my first post in levelextreme
>
>I have this data
>
>
>
>CREATE CURSOR junk(id n(3),qty n(5))
>
>INSERT INTO junk values(1,500)
>INSERT INTO junk values(2,600)
>INSERT INTO junk values(3,700)
>INSERT INTO junk values(4,700)
>INSERT INTO junk values(5,700)
>INSERT INTO junk values(6,700)
>INSERT INTO junk values(7,700)
>INSERT INTO junk values(8,700)
>INSERT INTO junk values(9,700)
>INSERT INTO junk values(10,800)
>INSERT INTO junk values(11,900)
>INSERT INTO junk values(12,1000)
>INSERT INTO junk values(13,1100)
>INSERT INTO junk values(14,1200)
>INSERT INTO junk values(15,1300)
>INSERT INTO junk values(16,1300)
>INSERT INTO junk values(17,1300)
>INSERT INTO junk values(18,1400)
>INSERT INTO junk values(19,1300)
>INSERT INTO junk values(20,1300)
>INSERT INTO junk values(21,1400)
>BROWSE
>
>
>
>I want to get data showing with arrow.
>
>
>
>
>Formula:
>
>What maximum qty is being used as maximum time?
>
>qty 1400 is maximum qty but is being used only 2 times
>qty 1300 is not maximum but it is being used 5 times.
>qty 700 is being used 7 times but it is not maximum.
>
>So I need a maximum qty with maximum times with its respective id like
>
>15, 1300
>Both conditions : maximum qty + maximum number of occurrence
>
>Here is occurrence count
>
>
>
>
>Please help me
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Reply
Map
View

Click here to load this message in the networking platform