 If $D_n=\{\frac{k}{2^n}\mid k\in \{0,…,2^n\}\}$ and $D=\bigcup_{n\in\mathbb N}D_n$, why $\overline{D}=[0,1[$ and not $[0,1]$.
 Is it possible to solve a system of equations for the phase of complex exponentials
 let $f,g:\mathbb{I} \to \mathbb{I} $ continuous functions
 Poisson process detected with prohability p
 Gradient Descent: Cost Function
 Are we allowed to simplify the goal constraints in goal programming?
 Suppose $f(x)=g(\frac{1}{x})$ for $x\gt{0}$, and let $L\in{\mathbb{R}}$. Prove that $\lim_{x\to \infty}f(x)=L$ iff $\lim_{x\to 0^+}g(x)=L$.
 Proving an increasing of a continuous function
 Primitive function
 Functionally separated sets and partition of unity
 Conley index as a subset of an isolated invariant set
 Proving Equivalence Relations, Constructing and Defining Operations on Equivalence Classes
 Exercise on Counting rules
 Tail bounds for partial coupon collector process
 Sum of a series in $\mathbb{Z}^d$
 The augmented ideal of a commutative group ring $R\left< \sigma \right>$ is generated by $\sigma1$.
 Distribution of the sum of conditional Bernoulli random variables
 Find Matrix T with respect to the basis beta
 Constructing a 2periodic extension of the absolute value function using floor and ceiling functions
 Dividing two generating functions and finding the resulting polynomial
Aggregate row sum two columns on table from same key
I have a table named inward_outward where I want to group by name and show total entries, total inward count and total outward count.
This is what I have so far
include('includes/dbcon.php');
$query=mysqli_query
($con," SELECT name from inward_outward,
( SELECT count(status) from inward_outward WHERE status ='inward' )As count_1,
( SELECT count(status) from inward_outward WHERE status ='out' )As count_2,
( SELECT count(status) from inward_outward WHERE 1 )As count_3
GROUP BY name")
or die(mysqli_error($con));
while ($row=mysqli_fetch_array($query)){
echo "";
echo "" . $row['inspector_name'] . "";
echo "" . $row['count_1'] . "";
echo "" . $row['count_2'] . "";
echo "" . $row['count_3'] . "";
echo "";
}
I want to take count from status column where status = 'inward' and status = 'out' then group by name
I'm unclear on what you want, but I think this will come closer:

I'm unclear on what you want, but I think this will come closer:
SELECT name,
SUM(status = 'inward') AS in_ct,
SUM(status = 'out') AS out_ct,
COUNT(*) AS both
FROM inward_outward
GROUP BY name;
Notes:
SUM(booleanexpr) counts the number of TRUEs
COUNT(*) counts rows; COUNT(x) counts the number of nonnull x
GROUP BY should list all the nonaggregates, and nothing else.
Subqueries are not needed in this case.
FROM must come after the items selected.
20181019 05:54:31