## “Total” function for a Boolean expression

I have a very long vector of the form

{a1 a2 a3 a4 + b1 b2 b3 b4 + c1 c2 c3 c4 + d1 d2 d3 d4 + e1 e2 e3 e4,      a1 a2 a3 a4 + b1 b2 b3 b4 + c1 c2 c3 c4 + d1 d2 d3 d4 + e1 e2 e3 e4,      a1 a2 a3 a4 + b1 b2 b3 b4 + c1 c2 c3 c4 + d1 d2 d3 d4 + e1 e2 e3 e4, ...} 

(here I just repeated the elements for simplicity, but in general, each element is different). And I want to transform it into a Boolean expression where Plus->Or and Times->And.

What is the fastest way to do it? At the moment, I use Replace, but it’s really slow when the expression is bigger. Here the simpler example takes 0.000034 seconds:

RepeatedTiming[{a1 a2 a3 a4 + b1 b2 b3 b4 + c1 c2 c3 c4 + d1 d2 d3 d4 + e1 e2 e3 e4,             a1 a2 a3 a4 + b1 b2 b3 b4 + c1 c2 c3 c4 + d1 d2 d3 d4 + e1 e2 e3 e4,             a1 a2 a3 a4 + b1 b2 b3 b4 + c1 c2 c3 c4 + d1 d2 d3 d4 + e1 e2 e3 e4} /. {Times -> And} /. {Plus -> Or}] 

Also, is there an equivalent of the Total function for Boolean expressions?

## Retrieve total of products ordered for each customer from WooCommerce “wc_order_product_lookup” table

I want to retrieve the sum of all products ever ordered by customer using the "customer id".

And I want to display it in a table on a new wordpress page, kinda like this. Basically SELECT SUM(product_qty) FROM wc_order_product_lookup for each customer and show it in a table, like the one designed in paint. Thank you to anyone that will take the time to reply to this.

## Total convergence of a function series

Let us consider the following function series:

$$\sum_{n=1}^{\infty} \frac{1}{n^x + n^{-x}}.$$

It seems that there is total convergence in $$(- \infty, -1-\delta] \cup [1+ \delta, + \infty)$$ for $$\delta > 0$$. Thank-you in advance for any help!

## Do you gain XP based on your “level” or your XP total?

Let’s say a 3rd-level character with 5900 XP (100 away from reaching 4th level) clears two EL 5 encounters during an adventure. The PHB says on page 58 that XP is handed out at the end of each adventure, so this means they were in both of these encounters while they were 3rd level.

According to the table on page 38 of the DMG, a party of four 3rd-level characters gains 450 XP per character from an EL 5 encounter, whereas a party of four 4th-level characters gains 400 XP per character.

So, at the end of the above example, would the character have gained 900 XP (they were treated as a 3rd level character during the second encounter, because at the time of the encounter they had 3 HDs and the class features of a 3rd-level character, etc.) or 850 XP (they were treated as 4th level during the second encounter, because at the time of the encounter they had between 6000 and 9999 XP)?

## Elan Aegis total power points

An Elan gains:

Naturally Psionic: Elans gain the Wild Talent feat as a bonus feat at 1st level. If an elan takes levels in a psionic class, she instead gains the Psionic Talent feat.

Then she takes level in Aegis so Wild Talent became (or change with) Psionic Talent. (In this personal case the DM asked she to spend 1 feat to take Psionic Talent, not automatic.)

Then she would like to take the 1st-level power: Empty Mind and so she uses 1 feat to take Wild Talent feat (again) and 1 more feat to take Unlocked Talent feat (Prerequisite: Wild Talent).

Now she can choose one 1st-level power: Empty Mind

The question is: this is a correct path? And if is correct, how many power points she can add to the normal amount (Aegis level progression + Int modifier + psionic aptitude choice) coming from psionic features? Wild Talent: +2, Psionic Talent +2, Unlocked Talent +2 = 6 or 8 (Wild Talent 2 times)?

## Can multiple creatures completely block a ranged attack thus providing total cover?

I’m asking because while DMG p.251 states that 3 or 4 lines blocked by an obstacle gives 3/4 cover if the attack can still reach the target, it doesn’t state what happens if the attack can’t reach the target. I assume total cover but I might be wrong. And, as in the question, what if more than one creature each blocking 3 or 4 lines to a target. Would it create a 1/2 cover (as per Sage Advice Compendium), 3/4 cover, total cover or something else? also considering that only the best degree of cover is applied when more than one source of cover is there, if multiple creatures can ever create total cover.

I find all this to be confusing.

thanks for clarifying.

## Getting catagory title total number of questions and answers order by number of questions

I have three tables. Which is in at this fiddle, http://sqlfiddle.com/#!9/46dfd6

Which is like this?.

CREATE TABLE user_answers (   id int(250) NOT NULL,   question_id varchar(250) NOT NULL,   user_id int(250) NOT NULL,   answer text NOT NULL,   date date NOT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1;  CREATE TABLE user_questions (   id varchar(250) NOT NULL,   user_id int(250) NOT NULL,   note_id int(250) NOT NULL,   title text NOT NULL,   question text NOT NULL,   date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP ) ENGINE=MyISAM DEFAULT CHARSET=latin1;  CREATE TABLE material_univarcity_list (   id int(100) NOT NULL,   name varchar(50) NOT NULL,   about mediumtext NOT NULL,   date date NOT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1; 

I want to get a resultant table which has count – Name(Name is from material_univarcity_list) Total number of questions to that particular name. Here id of material_univarcity_list table is the note_id of user_questions and I want total number of answers to that particular catagory here question_id is the id of user_questions. How can I do this?

My expected result is like

no|catagory        |number_of_questions |number_of_answers  1|DBMS 5th sem ISE|            2       | 3 

How can i do this?