• Bluntly, but we 00 thing you have done is right proper>> I have got following data in my table <<

    if you are doing the wrong thing badly.

    Where is the DDL for this mess? Why are you mixing data and metadata in the same table? Why do not you know the correct ISO 8601 date format? Why do not you know there is no such thing as a "type_id"?

    These are not tricky, complicated RDBMS things. This is foundations and basics! Just look at what a piece of crap your "attribute_value" is! In total violation of first normal form. Sometimes it is an assignment statement, sometimes it is a date (in improper format). Not only are you doing the wrong thing, what you are doing it badly.

    I always love it when someone says things like "type_id"; it makes me feel like my 30+ years with RDBMS were wasted. An attribute can be a "<something in particular>_type" or a"<something in particular>_id", but never this weird hybrid. "_type" and "_id" are called attribute properties in data modeling. They have to be attached to an attribute (column name).

    >> The challenge here is that some machines can return 10-15 individual certificates so I would like to have these shown as individual rows for each certificate. <<

    Are the certificates actually individual things? Apparently not in your model! What you tried to post is DDL does not include a key (what is the definition of a table? Remember that from your first day of RDBMS class?) I am identifier cannot be an integer, by definition; you do not do any math on it. I have already told you why type ID is absurd. Your use of VARCHAR(max), without any constraints is going to simply fill this non-schema with garbage.

    Please check my credentials. I am telling you that everything you are doing is dangerously wrong. You should not be programming in SQL yet. 85 – 95% of the work is done in the DDL. Once a valid schema is set up the queries practically write themselves. Please start over and do it right.

    Books in Celko Series for Morgan-Kaufmann Publishing
    Analytics and OLAP in SQL
    Data and Databases: Concepts in Practice
    Data, Measurements and Standards in SQL
    SQL for Smarties
    SQL Programming Style
    SQL Puzzles and Answers
    Thinking in Sets
    Trees and Hierarchies in SQL