Questions tagged [max]
Maximum value. Largest, biggest, greatest.
9,017
questions
-2
votes
0
answers
30
views
Finding maximum/biggest float value in Golang [closed]
I have problem with my code, specifically with float64 values.
I calculate some weightings in my program, and need to find the highest value.
So i did for loop, count the value and compare it with the ...
0
votes
0
answers
8
views
How can i Filter and also get Max value for the list
I have a List of Entity and i have to filter based on UUID which is Optional if the UUID is not passed then i need to get the Max version from the List
CEntity cEntity = cEntity .stream() ...
0
votes
2
answers
55
views
How to join two tables where you only want the record with the max date from one side of the join? [duplicate]
I am trying to write a query to return currently unfilled training requirements.
The 4 main tables involved are:
TrainingRequirements table: Stores a CourseId and UserId. The user and course required ...
0
votes
1
answer
55
views
Find the maximum and minimum values in a column? The values are percentages
I need to script a function to pull the minimum and maximum values from one column. The values are percentages so I'm not sure if that will trip up the function since it's not an integer?
I tried
...
0
votes
1
answer
43
views
How can I create a T-SQL query that does a running total with a maximum?
We have an unusual sick time policy where we can't accrue more than 56 hours. I need to write a query to reflect that. This is what I have
SELECT
t.employeecode, t.LeaveAccrued, PPE, RecordDate,
...
-3
votes
0
answers
31
views
Trouble with Sorting Algorithm in Python [closed]
I'm currently working on a Python program that involves sorting a list of scores for a sports event. I've implemented a sorting algorithm, but I'm encountering unexpected behavior. The maximum score ...
1
vote
2
answers
41
views
to get n maximum numbers from python dataframe column
# to get 3 largest numbers from column duration with all duplicates
import pandas as pd
technologies = "A B C D E F G H I J".split()
duration = [88,70,50,87,77,88,77,88,1,87]
columns ...
0
votes
1
answer
54
views
max function with DataFrame
I'm using pandas 2.0.3 in spyder this is the code
import pandas as pd
import numpy as np
people_dict = {
"birthyear": [2001, 2002, 2000],
"children": [np.nan ,3 , 0],
"hobby&...
-3
votes
0
answers
42
views
Upper max and lower max of a pyspark dataframe [closed]
I have a pyspark dataframe
Id
Score
1
49999
1
49998
1
1
1
2
1
3
I want to get the upper max of score that is 49999 and lower max that is 3 as upper max and lower max column value for that ...
-1
votes
1
answer
49
views
have logical error, it proceed to addOrder even if it greater than max
my code has logical error i think, if I enter a number greater than max, the error void will show up, but the it still proceed on addOrder. I want to loop it if the user input is invalid it will ...
0
votes
2
answers
48
views
Reduce maximum value in multiple columns by one in pandas dataframe
Bit of a niche one here that I've not been able to find equivalent code for anywhere. I simply want to find the maximum value in some of the columns (not all of them) and reduce this maximum value by ...
1
vote
1
answer
50
views
Return a cells value depending on 2 other criteria
I am looking for the formula that will check that column A:A = "590", then return the sales number in column E:E that is in the same row as the highest test time which is in column K:K
I am ...
0
votes
2
answers
177
views
Get the count of most occurring element in a list at every iteration
I need to fetch the most occurring ID in a list at every iteration I process the list. Its a huge list that contains positive/negative IDs. If ID is positive, increase the count for that ID; if ...
-1
votes
0
answers
18
views
Find the minimum and maximum value and their position
USE [college]
GO
/****** Object: StoredProcedure [dbo].[Customer] Script Date: 11/16/2023 10:35:50 AM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
ALTER procedure [dbo].[Customer] @...
-1
votes
1
answer
45
views
Select Max Date based on another column
I have a dataset that has different submissionid's and submissiondatetimes associated with invoicenumbers. I am trying to select just the row(s) with the most recent submissiondatetime for each ...
3
votes
4
answers
134
views
Extract largest n values and their indices from a matrix
I have a matrix that is approximately 150'000 x 150'000 from which I need to extract the largest n values and their indices. n will also be large, somewhere between 10 million to 50 million.
I can't ...
0
votes
1
answer
55
views
Julia find the index of the maximum element in a list that satisfies another list condition
I want to find the index of the maximum element in a list that satisfy certain conditions.
I have two lists a = [13, 17, 11, 24, 30] and b = [10, 12, 13, 20, 28]. I want to find the index i of the ...
0
votes
2
answers
43
views
How to Highlight Second Highest Values in Google Sheets Using Conditional Formatting?
In Google Sheets, I would like to highlight the 2nd highest value in a column of a table.
I am making a table in Google Sheets and want to highlight all 2nd highest values using conditional formatting....
0
votes
3
answers
84
views
Filter database based on max and min that varies each year
I have a database that looks like this:
Year ID Date Occupy
2010 1 10 Yes
2010 2 11 No
2010 3 12 Yes
2010 4 9 No
2010 5 15 No
2011 7 7 Yes
2011 8 9 ...
0
votes
0
answers
62
views
Why Request timeout occurs when a request is attempted beyond the "Ktor HttpClient(CIO) maxConnectionsCount" or "maxConnectionsPerRoute" value
"KtorBase2.kt"
open class KtorBase2()
{
private val _httpClient: HttpClient
val httpClient get() = _httpClient
init {
_httpClient = createHttpClient()
}
private ...
0
votes
2
answers
47
views
How to restrict a formula from returning more than a maximum value
I’ve read all the hints but can’t find the solution. I thought I had it but the cell kept returning an error message.
I’m looking to restrict a formula from returning a result larger than 3
Current ...
4
votes
6
answers
516
views
Error when trying to find 2nd maximum value in a list
I am trying to write code for finding the second maximum value of a list.
I tried it like this:
arr = map(int, input().split())
lista = list(arr)
max_value = lista[0]
run = lista[0]
for i in lista:
...
0
votes
0
answers
9
views
Finding Max date from a row that has 28 date columns based on conditions
I have a situation in my code and the data looks like this
for each participant for that particular plan he belongs to we get only one single row.
in that row we have 28 date fields.
I am trying to ...
0
votes
0
answers
21
views
RangeError: Maximum call stack size exceeded - occurring every time I edit my code. React.js
This error pops up every time I edit something in my code. It disappears and my code works after I refresh the browser and then my edit is implemented and it works. But appears when I edit something ...
0
votes
2
answers
46
views
Conditional Formatting Largest Value Cell Across Columns // Count Cells by Color
I am looking to use conditional formatting to shade the largest value in each column across 6 different columns.
In the image, you'll see 7 different entries (Entry A-G) and 6 judges scoring each ...
0
votes
0
answers
24
views
Increase blob size over 64 kb in node.js formData
: )
I want to upload a local PDF file via an API. The problem I am stuck with is that files are uploaded with a maximum size of 64 kb. Anything above that throws an error. ArrayBuffer exceed.
I know ...
0
votes
1
answer
38
views
How to slice local minima and maxima in a list till last item, without using numpy
I want to search for local maxima and minima through a series of iterations until the list has only one element remaining. Then that last element is the 'winner'. The list contains pairs of player ...
0
votes
1
answer
26
views
MATLAB error - "Error using symengine Input arguments must be convertible to floating-point numbers"
Im writing a MATLAB code to animate a grashof four bar mechanism but my animation is running only till the 15th iteration and coming back with this error
**Error using symengine
Input arguments must ...
0
votes
2
answers
28
views
min and max values displayed are different from those actually stored in a terra raster
When and why do terra rasters sometimes display min and max values different from those actually stored in the raster?
# create a 10x10 binary raster with values 0 or 10:
r <- rast(nrows=10, ...
0
votes
0
answers
22
views
EML, CDS - Composition/Join: Get column B~2 of table B where max( column B~1) - Possible?
First of all, sorry, I have no code to present, and my cds-screenshots do really just compose a header table, an items table and a statustrace table.
Our freestyle UI5 application consumes a ...
0
votes
1
answer
52
views
SQL using Case When statement with MAX and Partition Over in Where Clause
I have this query using a case when expression inside a MAX() aggregate function to obtain the maximum value of the case when statement.
However I need to filter also off that maximum value in the ...
-1
votes
1
answer
28
views
MYSQL Select MAX Date in a 3 table join grouped by the ID in the 1st table
I have three tables, one called BookingDetails that stores the client info. 140,000 records
CustomerRef
Name
Expiry
1
John
2023-12-17
2
Sarah
2024-06-17
3
Fred
2024-09-10
4
Bill
2022-03-11
The ...
0
votes
1
answer
40
views
SQL MAX clause for calculation of days
I'm going to post some SQL rows:
AND (CDCLI NOT IN (SELECT CDCLI FROM ANCLI07L1)
OR CDCLI IN (SELECT CDCLI FROM ANCL07L1
WHERE Days(TIMESTAMP_FORMAT(CHAR($TODAY), 'YYYYMMDD'))
- Days(...
0
votes
0
answers
46
views
Identify peaks without a priori knowledge of curve shape?
I have a dataset with a profile that change over time. It seems to always be roughly Gaussian in shape, but the way the Gaussian "points" (whether the Gaussian rises then falls, or falls ...
0
votes
0
answers
19
views
Amcharts - Labelbullet is getting cutoff
> `<div id="chartdiv" style="width: 100%; height: 230px;"></div>
>
> am4core.useTheme(am4themes_animated);
>
> Create chart instance
> var chart = ...
1
vote
2
answers
70
views
VBA get max date from the format YYYY-DD-MM (like 2023-10-02)
In VBA I want to extract the max date (or max value) from a range, but I don't want to change the format of the range. Now it looks like below:
Date:
2023-10-02
2023-10-03
2023-10-04
2023-10-05
2023-...
0
votes
0
answers
15
views
MAX Values with possible Duplicate maximum values in same GROUP
I have received answers from an earlier question about getting a count of the number of distinct PRVs grouped according to AU, considering only those with MV>0 that I posted in here and it worked ...
0
votes
0
answers
28
views
How to solve my Dataframe and Writing to Excel File code?
For my studies project, I would like to create a data frame and Excel File from my arbitrage bot.
But I have issue inside the code but I don't understand why.
MAX_OUTCOMES = max([event.num_outcomes ...
1
vote
3
answers
75
views
How to find the indices of the maximum values of the fifth column?
I have array A as:
A = [[0.0, 1.0, 3.0, -1.0, -1008.0],
[0.0, 1.0, 3.0, -1.0, -1008.0],
[0.0, 1.0, 3.0, 1.0, -1328.0],
[0.0, 1.0, 3.0, 1.0, -1328.0],
[0.0, 1.0, 3.0, -1.0, -1328.0],
[0.0, 1.0, 3.0,...
0
votes
0
answers
36
views
rgee - calculate maximum composite of monthly NDVI
The problem is that when I calculate the maximum value, the resolution deprecate, while I need to maintain the original resolution (10 m).
Does anyone know how to calculate the pixel-wise max value ...
1
vote
2
answers
45
views
How to select a max value in a group in SQL
My goal is to only have 1 row per part number/color combo. I tried using the max function however it doesn't seem to be working right, it will still give me duplicate values:
Here is my current code:
...
0
votes
1
answer
25
views
get max of value - lead and keep corresponding rows that generated the max using dplyr
How would one keep the corresponding two rows (all columns preserved) that produced the max difference after grouping, arranging, and subtracting the 4th lead from the current value? I can currently ...
0
votes
2
answers
38
views
Select data based on priority using 2 tables in SQL Server
I'm a beginner in SQL. I need to select distinct data (Subject, UserNo) ordering by columns Subject, UserNo according to the priority conditions below.
Conditions:
Select (Subject, UserNo) that has ...
0
votes
0
answers
33
views
Calculate maximum value of a time based running total measure and filtering time table based on another table
Here is the situation (POWERBI):
I have 2 tables: one calendar table named "CALENDAR" and one fact table called "DELIBERE"
I have a time based running total measure called "...
1
vote
1
answer
53
views
How do I groupby multiple columns in a pandas dataframe?
I'm working board game data from BoardGameGeek, and I'd like to create a dataframe that groups board games by the minimum number of players AND by categories.
Here are the column names: ['name', '...
1
vote
2
answers
50
views
Query Statement: Using DISTINCT but also using MAX condition
I have a table in my db which is minimally represented below. Note that there are entries under PRV that are duplicates.
PRV
MV
AU
G-111
500
LR
G-112
400
LC
G-112
401
LA
G-200
650
LI
G-115
350
...
0
votes
1
answer
22
views
How to extract entire row of max and min using proc function in SAS?
I have to identify which sneaker (variable 1) is matched (same row) with the highest and lowest sales (variable 2) by using a SAS procedure function.
Current code:
PROC MEANS DATA = M4.sneaker min max;...
0
votes
1
answer
37
views
PowerBI - Calculate Max Date between set of Dates
I am trying to calculate the max date for a certain criteria between a set of dates. Please see the below data, and expected output below.
Data:
> Investment Date
+ AAPL 10/1/2020
+ ...
2
votes
0
answers
39
views
Identify in a series the column with the maximum value for each row of a dataframe [duplicate]
Suppose we have the following dataframe :
Source Dataframe
A B C
0 55 9 96
1 69 86 5
2 30 63 12
3 79 52 31
I would like to identify in a series the column with the maximum value ...
1
vote
1
answer
35
views
DAX_CALCULATE ()
This two Measures should give the same result but they don´t. Do you know why?
Total sales YTD Manual ID =
CALCULATE (
[Total Sales Value],
'Calendar'[CalendarYear] = MAX ( 'Calendar'[...