MySQL Query Help

I have a session ID compiled from the following:

Part 1: Julian date (example: 1-365)

Part 2: 4 digit year (example: 2018)

Part 3: Meridian (example: AM or PM)

Part 4 and 5: Other ID values not related to date

Full example: 3162018-AM-1-28

I have a view that aggregates several values from several tables and is built to show data for the current date only. One of the select values is this session_id mentioned above.

In the view, I only want to show records for the session_id associated with the current date. If I use MAX(session_id) in my query, I will get older session_id if they are the newest. If I don't aggregate this data, I get repeating records. Instead, there should be a single record for each person defined with a schedule record for the given day.

-- If Part 1 and Part 2 of the session_id is <> to the current Julian date + 4 digit year, it should return as NULL.

-- If Part 1 and Part 2 of the session_id = to the current Julian date + 4 digit year, it should return the full session_id from trip_history table.

I am attaching the the source tables ([login to view URL]) and the view definition ([login to view URL]) for import and examination.

Keep in mind that the view data is date/time sensitive. There are CASE statements in the view SQL that will only allow you to see records from trip_history that were created on the current date in the AM or PM (dependent on the system time).

Taidot: Tietokannan hallinto, Tietokantaohjelmointi, MySQL, SQL

Näytä lisää: select query in mysql with where clause, mysql limit syntax, mysql experts online, mysql select example, mysql select where, mysql help forum, mysql limit offset, mysql tutorial, getafreelancer message sql query help needed, help writing sql statements software, sql statements help, cpanel apache mysql hardening help, query check top sql statements oracle, mac mysql installation help, access odbc mysql sends sql statements, need help writing sql statements, mysql prosper help, php export mysql sql statements, sql query help, mysql script help

Tietoa työnantajasta:
( 77 arvostelua ) huntley, Canada

Projektin tunnus: #18145142

Myönnetty käyttäjälle:


Hello, I have over 7 years of experience in dealing with MySQL and other programming languages. I do need to clarify a few things so please send me a message so we can talk more. Thanks! Caleb

$15 USD 1 päivässä
(4 Arvostelua)

14 freelanceria on tarjonnut keskimäärin %project_bid_stats_avg_sub_26% %project_currencyDetails_sign_sub_27% tähän työhön


INTRODUCTION I can see you are interested in building complex MySQL Query. I have also studied your case studies you wrote in the project description. I can create your SQL procedures, rank, percentile aggregates t Lisää

$50 USD 3 päivässä
(21 arvostelua)

I am an experienced Web Developer and Web Designer, and have worked with wide variety of skills like PHP, MySQl, jQuery / Prototype, Javascript, HTML, CSS and more for many years. You can see part of my work in my Lisää

$20 USD 1 päivässä
(14 arvostelua)

Hi, there. I've much interested in your project and I've read and understood all of your requirements. I've experienced in Database Administration and Database Programming. I hope to work with you. Thanks.

$30 USD 1 päivässä
(4 arvostelua)

Hey i am professionally software engineer having +3 year experience in this field i read the descriptions and understand i have lot of expertise in Database development using MS Sql Server, MySql etc having experie Lisää

$20 USD 0 päivässä
(6 arvostelua)

Feel fee to contact me for MySQL Query [login to view URL] me message to discuss further more details .We provide the commments,images,videos,demos and live sessions in order to help the [login to view URL] payment only after the Lisää

$30 USD 1 päivässä
(6 arvostelua)
$30 USD 1 päivässä
(2 arvostelua)

Hello sir, I have 4+ years of experience . I got your points. I can work for you. So please share more details about your requirements. So please contact me. Tell me your quote what should you prefer.

$30 USD 1 päivässä
(2 arvostelua)

I'm really good at Mysql, I have 10 years of experience in mysql, java, android and other skills, I think I'm the person you need for your project, look at my portfolio

$25 USD 2 päivässä
(0 arvostelua)

How are you? Dear Sir! As a new freelancer,I am an expert on your proposed skills and have been in this program for over 8 years. I am database expert to handle mysql please contact me. Best regards!!

$25 USD 1 päivässä
(1 arvostelu)

I am having 5 years of experience as a SQL developer.

$30 USD 1 päivässä
(0 arvostelua)

I'm full stack developer, I have worked lots of calculation related app and web application like pos,Billing systems.

$20 USD 1 päivässä
(0 arvostelua)

Hi, I have a lot of experience in this field. Now i am currently working in TATA Consultancy Services (TCS) . Give me a chance I think i can Easily do it. Thank you .

$25 USD 2 päivässä
(0 arvostelua)

I'm an experienced freelancer database and report design, development and optimization with more than 9 years of experience . I have used Erwin tool for data modelling and i am well-versed with Normalization's for doin Lisää

$25 USD 1 päivässä
(0 arvostelua)