Cancelled

MySQL queries needed

I have five queries that I need help creating.? I have a database with multiple tables linked to a core table and have to select a subset of the main table but order it by a field in one of the linked tables.

## Deliverables

Let's assume I have a table called 'main' and a related table called 'notes'.? There is a field [url removed, login to view] that is linked to a field notes.id.? In 'main' 'id' is a unique value, but in 'notes' 'id' is not the index, but just a reference to the value in 'main'.? 'main' has a large number of fields in addition to 'id' that I need to be able to access from the query.? 'notes' has additional fields 'datetime', 'entered_by', 'entry1', 'entry2' and 'entry3'.? A given row of 'notes' will have values for 'id', 'datetime', 'entered_by' and one of the three entry fields, but never for more than one of the entry fields per row.

Query1:? I need to select rows from 'main' where [url removed, login to view] is not an empty field (i.e. is the one of the three entry fields with a value) and order the rows? by the most recent [url removed, login to view] value for each [url removed, login to view] .? The result of the query will be iteratively displayed ( but you won't be coding this, I already have.? I just need the Select statement? written).

There is a table 'users' that has the fields 'username' and? 'userclass'.

Query2: I need to run Query1, but where the username value in the notes.entered_by field has a userclass of "Admin".

In addition to the 'notes' table, I have a 'status' table that has the fields 'id', 'status', and datetime.

Query3: I need to select rows from 'main' where? the most recent 'status' associated with [url removed, login to view] has a [url removed, login to view] value of more than 5 days before now and sort the rows from 'main' from the oldest [url removed, login to view] to the most recent.

Query4: I need to have a true/false output for a search of a given [url removed, login to view] about whether the most recent [url removed, login to view] is over 5days old or not.

There is a fourth table 'questions' with the fields 'id', 'question', and 'answer'.?

Query5: I need to select all rows in? 'main' where there are 'questions' associated with [url removed, login to view] that have no 'answer'.

* * *This broadcast message was sent to all bidders on Saturday Mar 20, 2010 3:22:23 AM:

Thank you for your bids. I have selected the bidders I wish to work with at this time.

Skills: Engineering, MySQL, PHP, Software Architecture, Software Testing

See more: queries, mysql index, core value, mysql sort field, mysql select statement, mysql sort, mysql search table, queries database, order number mysql, php mysql query multiple, php search mysql row, table queries, mysql help table, mysql search database table, datetime, access linked table, mysql output table, php mysql multiple users, mysql tables rows, mysql empty database, table linked access, additional output fields, output tables php, access subset, access database order entry

About the Employer:
( 8 reviews )

Project ID: #3276653

17 freelancers are bidding on average $26 for this job

itIndia2

See private message.

$17 USD in 1 day
(117 Reviews)
6.9
NeoNoXtraOrdnry

See private message.

$29.75 USD in 1 day
(85 Reviews)
5.7
j2eesoafree

See private message.

$29.75 USD in 1 day
(31 Reviews)
5.6
morpheeen

See private message.

$55.25 USD in 1 day
(46 Reviews)
5.3
Robotapps

See private message.

$29.75 USD in 1 day
(92 Reviews)
5.4
baburam

See private message.

$34 USD in 1 day
(90 Reviews)
5.1
russel02cuet

See private message.

$19.55 USD in 1 day
(67 Reviews)
5.0
PACIFICALTD

See private message.

$5.1 USD in 1 day
(7 Reviews)
5.0
setiawanutama

See private message.

$17 USD in 1 day
(57 Reviews)
4.3
rajoo1

See private message.

$42.5 USD in 1 day
(15 Reviews)
4.2
octashotvw

See private message.

$42.5 USD in 1 day
(34 Reviews)
3.8
ghoof

See private message.

$25.5 USD in 1 day
(8 Reviews)
3.4
srsumon

See private message.

$21.25 USD in 1 day
(11 Reviews)
2.8
jack0stone

See private message.

$34 USD in 1 day
(9 Reviews)
2.6
dale4id

See private message.

$8.5 USD in 1 day
(11 Reviews)
2.2
smartcoder4all

See private message.

$10.2 USD in 1 day
(7 Reviews)
1.6
kumargupt117

See private message.

$21.25 USD in 1 day
(0 Reviews)
0.0