Hey there...
> SELECT customer_username, COUNT(customer_username) FROM customerdata GROUP BY
>customer_username;
>
The above query, in effect, does the same thing that:
SELECT DISTINCT(customer_username) from customerdata
does. In order to get the total number of distinct customer_username
Sorry,
I should have been more clear:
> One way to execute .sql scripts in your database is this:
>
> psql -e dbname < script.sql
That should be done from the command line.
> That is how we recreate our databases from a dump file.
>
> "psql -ef script.sql dbname" seems to have the same pro
Hey there,
One way to execute .sql scripts in your database is this:
psql -e dbname < script.sql
That is how we recreate our databases from a dump file.
"psql -ef script.sql dbname" seems to have the same problem
you were having with the \i command:
query buffer max length of 2 exceeded
Hey there,
I had some similar problems recently, try this
select someid, somemoneyfield * 2::float as product from table;
You cannot multiply money * money, apparently. But, money * float seems
to work fine. Same goes with division:
select someid, somemoneyfield / 2::float as quotient from t
Hey all,
I have been trying to figure out how to divide a data field of type
'money'. And, I've been unsuccesful. So, I have a couple of questions to
ask.
When I query my database, using 'select price from item_money;', postgres
returns just what I asked for
(the first seven rows