Results for sum

December 2nd, 2023

Returning an unnamed sum type

I am trying to create a local sum type inside of a function and then return said sum type without it being declared in main. Is this possible? I don't...

December 2nd, 2023

Get the Total value of sum of 2 columns in db laravel

I have joined 2 databases, what i want is to get the total value/sum of these 2 multiplied column: Example on the database: Price Quantity 100 ...

November 30th, 2023

Sum values in one dataframe based on values of column in another dataframe

I have two dataframes that look like the following library(dplyr) State = c('AK','AL','AR','AZ') Perc = c(0.0023, 0.0034, 0.0043, 0.065) df1 .frame(...

November 30th, 2023

How to create a new column takes the value from the sum of another column each row?

Like taking the value from the first row 60, then add it to the new value from the next row and so on, like the example of the below table. field ...

November 28th, 2023

C++ sum two std::array of non-default-constructible types

If I want to write a function summing two std::array, I would do something like: templateclass T, std::size_t N> auto sum(const std::arrayT, N>& a, co...

November 27th, 2023

How to select Order with highest sum of line items price

I have two tables in mysql : Orders (id, orderName) Order_item (id, partname, price, order_id) Order_id in order item is foreign key to Order table. H...

November 27th, 2023

How to sum the Distance column in df1 based on the date_time rows from dataframe df using pandas

I have two Data Frames df and df1, based on the date range from df i want to sum the Distance column in df1 from io import StringIO data = """IGN,Ex...

November 27th, 2023

Get sum of unique customer ids each month, then group by month and age

From the below table I need to get the sum of unique customer coverage by month and age band: cust_id cmpgn_mth age_band coverage 1 202309 18-...

November 25th, 2023

Sum weights belonging to (date)range types and their intersections

I'm creating a hotel booking tool for our desk/reception using PostgreSQL 16. To answer booking requests, I need both the total price and the associa...

November 25th, 2023

Sum the weights/values belonging to the intervals - (date)range types and their intersections

I'm creating a hotel booking tool for our desk/reception using PostgreSQL 16. To answer booking requests, I need both the total price and the associa...

November 25th, 2023

Skip First Colum When Adding New Row For Showing Sum of Grouped by DataFrame

I am trying to add a row to the bottom of a grouped by data frame in Pandas, using following code import pandas as pd import matplotlib.pyplot as plt ...

November 24th, 2023

Sum() up CASE values from joined tables in PostgreSQL

I'm creating a hotel booking tool for our desk/reception. My current SELECT doesn't compute the "final" sum()/CASE, meaning that as long as there are ...

November 23rd, 2023

SQL query to sum values based on conditions and give flags on the resultant sum

I need help getting a desired result returned. example Table1. IDNUMBER Amount V11652 1500 V11652 3000 V11652 4500 V11652 6000 V11643 ...

November 23rd, 2023

Python's built in sum function taking forever to compute sums of very large range of values in a list

This works well and returns 249999500000: sum([x for x in range(1_000_000) if x%2==0]) This is slower but still returns 24999995000000: sum([x for x i...

November 21st, 2023

Paginated Report sum expressions based on condition

Hi Guys i have this expressions where i sum sales based on multiple conditions =iif(Fields!ContName.Value="Africa") and iif(Fields!Country.Value="...

December 2nd, 2023

Calculate the sum of each possible continuous combination of a integer

Let's say I have a number for example 12345. I want to calculate the sum each of all possible combinations for this number without changing the order ...

November 20th, 2023

Oracle 11g - Counting sum of amount after converting

There are tables transactions and currencyRate: fiddle I am displaying transactions of client (sender_name) with total amount sent money more than (am...

November 19th, 2023

Finding the longest streak of numbers, sum the values of that group and create an new dataframe

This is an extension to this post. My dataframe is: import pandas as pd df = pd.DataFrame( { 'a': [ 'a', 'a', 'a', 'a', 'a', ...

November 18th, 2023

all possible distinct non decreasing sequences(combinations) of numbers to reach the given sum with quick performance

I need to count all possible combinations of numbers to reach the given sum. They should be non decreasing(every next number should be greater or equa...

November 18th, 2023

Convert a list with a sum of 1 and keep the relations between the values

Assume there is a list[int] like this: [0, 2, 3, 3, 0, 9] I want to convert it to list[float] with a sum of 1 and keep the relations between the value...

November 17th, 2023

Pandas - compute the sum of numerical characters of every string in a dataframe

I have a dataframe with a column "dname". It contains many rows of 2LD domain names. i.e. 123ask example92 what3ver ... I want to find the number of d...

November 15th, 2023

How do I make a new query result from existing data using JOINS and SUM()?

Using SQL Server Management Studio v19.1. I need help. I have worked hours to try various joins and aggregations to get the result, but I cannot get i...

November 16th, 2023

Excel: How to Sum/Aggregate results of "Filter" Function

I have a table. When I am using formula: =FILTER(A1:C7,B1:B7="red",) what I am getting is: What I would like to get however is: Any ideas how to do...

November 15th, 2023

Excel SUM parts of a string

in Excel I have a few cells containing numbers sperated bij a dash, like: I use a formula like =TRIM(TEKSTBEFORE(G30:G40;"/";1)) ...

November 15th, 2023

order queryset by total sum of prices in drf

I use OrderingFilter, i have pizza model connect to pizzaprice model by many to many field, when i ordering by desc or asc i get not the result expect...

- 25881
How do I undo the most recent local commits in Git?

- 11618
How can I remove a specific item from an array in JavaScript?

- 20343
How do I delete a Git branch locally and remotely?

- 7387
How can I find all files containing a specific text (string) on Linux?

- 7330
How to find all files containing specific text (string) on Linux?

- 7611
How do I revert a Git repository to a previous commit?

- 2671
How do I create an HTML button that acts like a link?

- 8481
How do I check out a remote Git branch?