Reputation
Top tag
Next privilege 5,000 Rep.
Approve tag wiki edits
Badges
3 13 23
Newest
 Marshal
Impact
~183k people reached

1h
comment SQL query to group different data seperately in the same table
The only easy way to do this is to add a row_number() to the two resultsets and full outer join them on this row number column.
1h
comment Does psql print command results to standard error?
If there's no other way to get psql non-data output to stderr and thus to cron emails.
1h
comment Does psql print command results to standard error?
I suggest you take up this discussion with Bruce, who was asking for input.
1h
comment SQL query to group different data seperately in the same table
Your problems stem from trying to query this in one query when they should be two: they are functionally different queries. It's purely a presentation issue to get them displayed next to each other -- if that's what you want.
2h
comment Postgres - copy table INCLUDING CONSTRAINT doesn't include constraint
9.4 and devel still have the same wording. Will you submit a patch to the documentation? If not, I will do it.
3h
comment Previously running query taking very long execution time
This does not provide an answer to the question. To critique or request clarification from an author, leave a comment below their post - you can always comment on your own posts, and once you have sufficient reputation you will be able to comment on any post.
3h
comment Like with the results of a subquery (multiple values)
If you have a new question, please ask it by clicking the Ask Question button. Include a link to this question if it helps provide context.
15h
comment sending email using database mail
"many errors". Which errors did you get?
1d
comment Running Total: To store or compute
Still, an index on product_id, transaction_date and a query specifying product_id and a date range (or >= today) should give more than adequate performance.
1d
comment Running Total: To store or compute
With 10 transactions per product, it should be lightning fast to calculate this on the fly. Make sure you have an index on (or starting with) production_transaction.product_id so that you can quickly retrieve all transactions for a product.
1d
comment Running Total: To store or compute
It depends. How many transactions do you expect per product? Computing on the fly is fast with suitable indexes. I would build like this to start with, and only add storage of running totals if it proves too slow. Test this in your Test / Q&A environment!
1d
comment Running Total: To store or compute
MySQL. Not SQL Server.
1d
comment When doing an update on a set of records, how do i get previous updates to show on current row to update in UDF
Please show us your code -- ie the UDF.
Apr
16
comment AWA RDBMS dealing with large database
You expect us to help you without even posting any code?
Apr
16
comment Oracle Conditional sum
Hopefully Oracle one day supports the filter syntax: select count(*) filter (where x > 0) as positive, count(*) filter (where x < 0) as negative from t; This works in PostgreSQL 9.4+, if anyone is interested.
Apr
16
comment Unable to create read only user— postgresql 9.4
Did you commit;?
Apr
16
comment Inaccurate count when using multiple count functions in PostgreSQL
If you have PostgreSQL 9.4 (or higher), then you should look into the filter clause on your aggregate expressions.
Apr
16
comment PostgreSQL: raise error if planner needs to do an sequence scan
And don't forget that a sequential scan of the table can be faster than an index scan and associated table lookup. I'm missing the "why" aspect to your question.
Apr
16
comment merge multiple fields of csv file while running mysqlimport command
Running on a unix-like system? Why not use some commands like cut or awk first?
Apr
16
comment PostgreSQL: raise error if planner needs to do an sequence scan
In addition, you can't stop PostgreSQL from using sequential scans, see postgresql.org/docs/9.4/static/…