<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Andrei Navumau</title>
    <description>The latest articles on DEV Community by Andrei Navumau (@tyzia).</description>
    <link>https://dev.to/tyzia</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F34094%2F88c0d901-6eb2-4a72-9e65-7f834ea6a5d0.jpg</url>
      <title>DEV Community: Andrei Navumau</title>
      <link>https://dev.to/tyzia</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/tyzia"/>
    <language>en</language>
    <item>
      <title>ELI5: how to contribute to a project?</title>
      <dc:creator>Andrei Navumau</dc:creator>
      <pubDate>Tue, 12 Dec 2017 05:32:30 +0000</pubDate>
      <link>https://dev.to/tyzia/eli5-how-to-contribute-to-a-project-8b</link>
      <guid>https://dev.to/tyzia/eli5-how-to-contribute-to-a-project-8b</guid>
      <description>&lt;p&gt;Hi there,&lt;/p&gt;

&lt;p&gt;I'm thinking about contributing into an open project. I'm trying to get an idea, how to work in a team, even remotely, from home. To learn from more experienced peers, how they organize their code, how they add comments, what approaches do they use in problem solving, what are best practices and algorithms.&lt;/p&gt;

&lt;p&gt;I know basics of git, but I haven't contributed to any project yet. My languages are pretty basic: PHP, C#, ASP, SQL, JavaScript, though I believe, I can solve more complicated tasks. All at a beginner or intermediate level. To tell the truth, it is hard for me to measure my level, because I spent many years of learning how to code. It was my hobby or a "side-effect" of my job responsibilities, where I had to research how to fix some features at my websites. My primary occupation was always events management.&lt;/p&gt;

&lt;p&gt;And yes, I myself despise this way of thinking - "I wish I could..." or "Tell me how to do this..." I always do my best to find solution myself. I'm a stop-dreaming-start-doing guy. So, yes, I did some research/googled "how to participate in a project". But every time I end up with looking at a list of files in a github folder confused with where and how to start, who to contact, are they accepting contributors, you know )))&lt;/p&gt;

&lt;p&gt;I'll really appreciate any guidance from you. Explain, please, like I'm 5.  &lt;/p&gt;

</description>
      <category>explainlikeimfive</category>
      <category>discuss</category>
      <category>help</category>
    </item>
    <item>
      <title>Example of complex SQL query to get as much data as possible from Database.</title>
      <dc:creator>Andrei Navumau</dc:creator>
      <pubDate>Thu, 07 Dec 2017 04:42:26 +0000</pubDate>
      <link>https://dev.to/tyzia/example-of-complex-sql-query-to-get-as-much-data-as-possible-from-database-9he</link>
      <guid>https://dev.to/tyzia/example-of-complex-sql-query-to-get-as-much-data-as-possible-from-database-9he</guid>
      <description>&lt;p&gt;I'd like to share an example of a complex SQL query, which will return all possible data from Database.&lt;/p&gt;

&lt;p&gt;DB Schema looks like this:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Ftnt5zexcct26gj7nfqlm.JPG" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Ftnt5zexcct26gj7nfqlm.JPG" alt="DB Schema" width="593" height="859"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The task was "to displays all employees and their related info even if some info is missing. Get as much information as you can about the employees".&lt;/p&gt;

&lt;p&gt;My final SQL query was like this:&lt;/p&gt;

&lt;pre&gt;SELECT
  e.employee_id AS "Employee #"
  , e.first_name || ' ' || e.last_name AS "Name"
  , e.email AS "Email"
  , e.phone_number AS "Phone"
  , TO_CHAR(e.hire_date, 'MM/DD/YYYY') AS "Hire Date"
  , TO_CHAR(e.salary, 'L99G999D99', 'NLS_NUMERIC_CHARACTERS = ''.,'' NLS_CURRENCY = ''$''') AS "Salary"
  , e.commission_pct AS "Comission %"
  , 'works as ' || j.job_title || ' in ' || d.department_name || ' department (manager: '
    || dm.first_name || ' ' || dm.last_name || ') and immediate supervisor: ' || m.first_name || ' ' || m.last_name AS "Current Job"
  , TO_CHAR(j.min_salary, 'L99G999D99', 'NLS_NUMERIC_CHARACTERS = ''.,'' NLS_CURRENCY = ''$''') || ' - ' ||
      TO_CHAR(j.max_salary, 'L99G999D99', 'NLS_NUMERIC_CHARACTERS = ''.,'' NLS_CURRENCY = ''$''') AS "Current Salary"
  , l.street_address || ', ' || l.postal_code || ', ' || l.city || ', ' || l.state_province || ', '
    || c.country_name || ' (' || r.region_name || ')' AS "Location"
  , jh.job_id AS "History Job ID"
  , 'worked from ' || TO_CHAR(jh.start_date, 'MM/DD/YYYY') || ' to ' || TO_CHAR(jh.end_date, 'MM/DD/YYYY') ||
    ' as ' || jj.job_title || ' in ' || dd.department_name || ' department' AS "History Job Title"
  
FROM employees e
-- to get title of current job_id
  JOIN jobs j 
    ON e.job_id = j.job_id
-- to get name of current manager_id
  LEFT JOIN employees m 
    ON e.manager_id = m.employee_id
-- to get name of current department_id
  LEFT JOIN departments d 
    ON d.department_id = e.department_id
-- to get name of manager of current department
-- (not equal to current manager and can be equal to the employee itself)
  LEFT JOIN employees dm 
    ON d.manager_id = dm.employee_id
-- to get name of location
  LEFT JOIN locations l
    ON d.location_id = l.location_id
  LEFT JOIN countries c
    ON l.country_id = c.country_id
  LEFT JOIN regions r
    ON c.region_id = r.region_id
-- to get job history of employee
  LEFT JOIN job_history jh
    ON e.employee_id = jh.employee_id
-- to get title of job history job_id
  LEFT JOIN jobs jj
    ON jj.job_id = jh.job_id
-- to get namee of department from job history
  LEFT JOIN departments dd
    ON dd.department_id = jh.department_id

ORDER BY e.employee_id;&lt;/pre&gt;

&lt;p&gt;Let's go through it step by step:&lt;/p&gt;

&lt;p&gt;Before creating our final Select statement, let's see which tables require LEFT joins and which do not. We need this check because LEFT JOINS are slower than INNER JOINS, so for efficiency we will be using (INNER) JOINS were possible.&lt;/p&gt;

&lt;p&gt;To check that every employee has a job_id. If there are results (id's of employees), so we need LEFT JOIN, because there are employees who do not have (IS NULL == true) job_id. Otherwise (IS NULL == false) we use only JOIN:&lt;/p&gt;

&lt;pre&gt;SELECT employee_id FROM employees WHERE job_id IS NULL;&lt;/pre&gt;

&lt;p&gt;Result: empty. Conclusion: we use JOIN for 'jobs' table.&lt;/p&gt;

&lt;p&gt;The same check as above, this time checking department_id:&lt;/p&gt;

&lt;pre&gt;SELECT employee_id FROM employees WHERE department_id IS NULL;&lt;/pre&gt;

&lt;p&gt;Result: 178. Conclusion: we use LEFT JOIN for 'departments' table.&lt;/p&gt;

&lt;p&gt;Because there is one employee without department_id, the whole chain of future joins (departments-loations-countries-regions) should be also LEFT Joined, despite the fact that these tables can be INNER joined between each other in a separate query.&lt;/p&gt;

&lt;p&gt;The same check as above, this time checking manager_id:&lt;/p&gt;

&lt;pre&gt;SELECT employee_id FROM employees WHERE manager_id IS NULL;&lt;/pre&gt;

&lt;p&gt;Result: 100. Conclusion: we use LEFT JOIN (self join) for 'employees' table. It means, that one employee doesn't have a manager.&lt;/p&gt;

&lt;p&gt;And some general comments on this final query:&lt;/p&gt;

&lt;pre&gt;AS&lt;/pre&gt;

&lt;ul&gt;
&lt;li&gt;we use it to define alias, column names in the result table look more human-readable.
&lt;pre&gt;||&lt;/pre&gt;
&lt;/li&gt;
&lt;li&gt;we use this to concatenate strings
&lt;pre&gt;'text'&lt;/pre&gt;
&lt;/li&gt;
&lt;li&gt;we enclose any text into single quotes
&lt;pre&gt;TO_CHAR(e.hire_date, 'MM/DD/YYYY')&lt;/pre&gt;
&lt;/li&gt;
&lt;li&gt;in this way we can set format of the date
&lt;pre&gt;TO_CHAR(e.salary, 'L99G999D99', 'NLS_NUMERIC_CHARACTERS = ''.,'' NLS_CURRENCY = ''$''')&lt;/pre&gt;
&lt;/li&gt;
&lt;li&gt;in this way we can output currency with separators. &lt;a href="http://2x2.ur3.ca/?p=1372" rel="noopener noreferrer"&gt;My detailed post about it can be found here.&lt;/a&gt;
&lt;pre&gt;JOIN jobs j ...&lt;/pre&gt;
&lt;/li&gt;
&lt;li&gt;this 'j' means alias to a table name. The same table can be joined to itself (self join) and for this reason this table alias for the same table can and should be different.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The query returned 110 results, though there are only 107 employees. Because out of 107 employees, 3 have two job history entries. The first couple of rows of the result look like this:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Ff1lay63nivyypg2z57uc.JPG" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Ff1lay63nivyypg2z57uc.JPG" alt="Complex query result" width="800" height="379"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2F0x71vsd1k5xo91jj77ys.JPG" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2F0x71vsd1k5xo91jj77ys.JPG" alt="Complex query result continue" width="800" height="360"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;We could definitely go further and get all information about departments, where according to job history entries a couple of employees were working, but I decided that it would be too much.&lt;/p&gt;

&lt;p&gt;Originally posted &lt;a href="http://2x2.ur3.ca/?p=1406" rel="noopener noreferrer"&gt;on my website.&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I hope this example will be useful for newbies. And to those of you, who are experienced, I'd like to address some questions:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Is it really important which JOIN to apply: LEFT or INNER? I mean is there any real gain in productivity?&lt;/li&gt;
&lt;li&gt;Is it a good practice to pack all possible information into one query? Or to split it into small queries is a better approach?&lt;/li&gt;
&lt;li&gt;What mistakes were made in this query, if any?&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Take care!&lt;/p&gt;

</description>
      <category>sql</category>
      <category>join</category>
    </item>
    <item>
      <title>Using calc() in CSS responsive design</title>
      <dc:creator>Andrei Navumau</dc:creator>
      <pubDate>Sun, 26 Nov 2017 00:52:22 +0000</pubDate>
      <link>https://dev.to/tyzia/using-calc-in-css-responsive-design-5l1</link>
      <guid>https://dev.to/tyzia/using-calc-in-css-responsive-design-5l1</guid>
      <description>

&lt;h1&gt;How to use calc() in css styling&lt;/h1&gt;

&lt;p&gt;Last time I made a post about my struggle with responsive design and adding multiple breakpoints and doing a lot of math in excel. &lt;a href="https://dev.to/tyzia/css-and-media-queries-59g" alt="Post about struggle with css calculations"&gt;The post can be found here.&lt;/a&gt; Thanks to &lt;a href="https://dev.to/arccosine"&gt;ArcCosine's&lt;/a&gt; comment, I learned about calc() function in CSS. I applied it in my css file and it worked like a charm!&lt;/p&gt;

&lt;p&gt;Here is the html code:&lt;/p&gt;

&lt;pre&gt;

div id=A

    div id=B
        img
        img
        img
        img
        img
    /div

/div
&lt;/pre&gt;

&lt;p&gt;In browser this looks like this:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--GmDxYSf0--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/px7l76r0ae23noat0oj9.JPG" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--GmDxYSf0--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/px7l76r0ae23noat0oj9.JPG" alt="div in browser"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;To keep it short: I have 5 images of social icons, 51px fixed width each. The width of their container (div id=B) is 480px. I would like to calculate margin between icons responsive to screen size. So my css calculation is like this:&lt;/p&gt;

&lt;pre&gt;

#B img {
    margin-right: calc((100% - 255px) / 4);
}

#B img:last-child {
    margin-right:0
}

&lt;/pre&gt;

&lt;p&gt;Just a tiny explanation:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;We take 100% of the width of the icon's container. It's 480px.&lt;/li&gt;
&lt;li&gt;Then we deduct the width of all icons, which is 5*51px = 255px.&lt;/li&gt;
&lt;li&gt;This gives us the remaining spacing in the container. We need to divide it by 4. Because we have 4 gaps between 5 images.&lt;/li&gt;
&lt;li&gt;So we have the length of our margin-right. Last icon's margin we set to zero.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Now, if we resize the screen, container's width will be, for instance, 460px and margin-right will be recalculated based on the new container's width.&lt;/p&gt;

&lt;p&gt;That short, that simple. Thank you ArcCosine, once again.&lt;/p&gt;


</description>
      <category>css</category>
      <category>calc</category>
      <category>responsivedesign</category>
    </item>
    <item>
      <title>CSS and media queries</title>
      <dc:creator>Andrei Navumau</dc:creator>
      <pubDate>Fri, 24 Nov 2017 05:51:09 +0000</pubDate>
      <link>https://dev.to/tyzia/css-and-media-queries-59g</link>
      <guid>https://dev.to/tyzia/css-and-media-queries-59g</guid>
      <description>

&lt;h1&gt;Strategy to add additional breakpoints to responsive CSS&lt;/h1&gt;

&lt;p&gt;I'm studying CSS, so I'm sure that those who are experienced front-end developers will smile on this post. So will I in a couple of years from now. Nevertheless, I'll try to write down what I found, just to remember it better.&lt;/p&gt;

&lt;p&gt;I have this chunk of code:&lt;/p&gt;

&lt;pre&gt;

div id=A

    div id=B
        img
        img
        img
        img
        img
    /div

/div
&lt;/pre&gt;

&lt;p&gt;In browser this looks like this:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--GmDxYSf0--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/px7l76r0ae23noat0oj9.JPG" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--GmDxYSf0--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/px7l76r0ae23noat0oj9.JPG" alt="div in browser"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I'm trying to keep these icons centered on the page with fixed paddings to the left and to the right. And equal space between icons.&lt;/p&gt;

&lt;p&gt;In my CSS I have like this:&lt;/p&gt;

&lt;pre&gt;

#A {
    width: 56%;
    margin: 0 auto;
}
&lt;/pre&gt;

&lt;p&gt;Icons are of the same width 51px. To make them look nicely placed, I put padding-right for images and padding-right:0 for the last image. The task was to make this page responsive starting with the screen width of 768px.&lt;/p&gt;

&lt;p&gt;I ended up with a table of calculations, like this:&lt;/p&gt;

&lt;pre&gt;

A = current width of screen/container, div id=A
B = div wrapper for icons = 0.56*A, div id=B
I = icon image width = 51
P = padding-right = (B-5*I)/4
% = (P/B)*100 rounded down
rounded means that if I had 3.99%, it would be rounded down to 3.

&lt;/pre&gt;

&lt;p&gt;The next step was to see, at what breakpoint do I need to change padding percentage. Because if I set 'padding-right:10%' for example, it worked only for width screen between 768px and 758px.&lt;/p&gt;

&lt;p&gt;Actually, this can be checked mathematically:&lt;/p&gt;

&lt;p&gt;Let's say we have width of our screen 768px. In this case we have:&lt;/p&gt;

&lt;p&gt;A = 768&lt;br&gt;
B = 0.56*768 = 430.08&lt;br&gt;
I = 51&lt;br&gt;
P = (430.08 - 5*51)/4 = 43.77&lt;br&gt;
% = (43.77/430.08)/100 = 10.1771&lt;br&gt;
rounddown(10.1771) = 10&lt;/p&gt;

&lt;p&gt;So we have proved, that with screen width of 768px, padding should be 10%.&lt;/p&gt;

&lt;p&gt;Now, let's assume that we set padding to be 10% (of container width) and resized our screen to 757px. The last icon image will jump to the next line like this:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--HLT2SKC6--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/jy44yfmval6jg4rd1rc7.JPG" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--HLT2SKC6--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/jy44yfmval6jg4rd1rc7.JPG" alt="icons jumped to next line"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Why it happened? It seems that everything was correct, we are using percentage and it should never come out of the limits of container, images should not jump below. The practice showed, that this assumption was wrong.&lt;/p&gt;

&lt;p&gt;So I decided to add breakpoints with @media query into my CSS. My calculations of the possible breakpoints were:&lt;/p&gt;

&lt;p&gt;I created excel document, inserted my formulas of calculations (see above) and applied this formulas to every possible value of screen sizes, i.e for 768px, 767px, 766px ... 475px.&lt;/p&gt;

&lt;p&gt;And I noticed, that from 768px to 759px value of padding between images was 10% of the container (div id=B, see above). But with the screen size of 758px, the padding turned to be 9%. And it was so until screen size was 712px. At screen size 711px the padding was 8% and so on. So with this imperical values I found all the segments:&lt;/p&gt;

&lt;p&gt;width between 758px and 768px, padding 10%&lt;br&gt;
width between 711px and 758px, padding 9%&lt;br&gt;
width between 669px and 711px, padding 8%&lt;br&gt;
width between 632px and 669px, padding 7%&lt;br&gt;
width between 599px and 632px, padding 6%&lt;br&gt;
width between 569px and 599px, padding 5%&lt;br&gt;
width between 542px and 569px, padding 4%&lt;br&gt;
width between 517px and 542px, padding 3%&lt;br&gt;
width between 494px and 517px, padding 2%&lt;br&gt;
width between 475px and 494px, padding 1%&lt;/p&gt;

&lt;p&gt;If width was below 475px, padding was 0%. That indicates, that I shall narrow left and right paddings of parent container, because 5 icons were not able to fit inside their div id=B when screen was less than 475px.&lt;/p&gt;

&lt;p&gt;Based on this I added media queries to my CSS as follows:&lt;/p&gt;

&lt;pre&gt;

@media all and (min-width:758px) and (max-width:768px) {
    #social img {
        padding-right: 10%;
    }
}

@media all and (min-width:711px) and (max-width:758px) {
    #social img {
        padding-right: 9%;
    }
}

...

@media all and (min-width:475px) and (max-width:494px) {
    #social img {
        padding-right: 1%;
    }
}

&lt;/pre&gt;

&lt;p&gt;My only concern was: what will happen, if screen size was exactly at the breakpoint edge - i.e. 758px?&lt;/p&gt;

&lt;p&gt;Will the padding be 10% (because min-width == 758px and is TRUE) or it will be, as necessary, 9% (because max-width == 758px and is TRUE)?&lt;/p&gt;

&lt;p&gt;In this case the cascading rule of css - that the instruction, which is later in css file will override the same instruction above it - answered my question. Because the instruction 'max-width:758px' is after the instruction 'min-width:758px', padding will be 9%.&lt;/p&gt;

&lt;p&gt;Thank you for reading this boring post. I guess, there are more elegant ways to make your page responsive, instead of creating 10 media queries and spending all the evening calculating the segments ))) Take care!&lt;/p&gt;


</description>
      <category>css</category>
      <category>media</category>
      <category>responsivedesign</category>
    </item>
    <item>
      <title>How to style footer semantically correct?</title>
      <dc:creator>Andrei Navumau</dc:creator>
      <pubDate>Fri, 17 Nov 2017 07:40:18 +0000</pubDate>
      <link>https://dev.to/tyzia/how-to-style-footer-semantically-correct-7kh</link>
      <guid>https://dev.to/tyzia/how-to-style-footer-semantically-correct-7kh</guid>
      <description>&lt;p&gt;I'm concerned how should I style my footer so that it is included into semantic outline of my page.&lt;/p&gt;

&lt;p&gt;Let's assume, that my page is like this (don't know how to post html tags, that's why removed '&amp;lt;' &amp;amp; '&amp;gt;'):&lt;/p&gt;

&lt;pre&gt;
body

    header.../header
    main.../main

    footer
        h2 Main footer of the page /h2
        section
          h3 About this site /h3
        /section
        section
          h3 Contact form /h3
        /section
        nav
          h3 Footer navigation /h3
        /nav
    /footer

/body
&lt;/pre&gt;

&lt;p&gt;If I outline this code (&lt;a href="https://gsnedders.html5.org/outliner/"&gt;here&lt;/a&gt;), I see:&lt;/p&gt;

&lt;pre&gt;

1. Header
2. Main content of the page
2.1. Main footer of the page
2.2. About this site
2.3. Contact form
2.4. Footer navigation

&lt;/pre&gt;

&lt;p&gt;This is not what I intended to have. In the above outline, 'footer' is a subsection of 'main' section and footer's subsections are also just subsections of the 'main' section on the same level with 'footer'.&lt;/p&gt;

&lt;p&gt;I would like have 'footer' on the same level as 'main' section and footer's subsections as its subsections. To see in the outline something like this:&lt;/p&gt;

&lt;pre&gt;

1. Header
2. Main content of the page
3. Main footer of the page
3.1. About this site
3.2. Contact form
3.3. Footer navigation

&lt;/pre&gt;

&lt;p&gt;Then I read, that " 'header' and 'footer' are not sectioning content like 'section', rather, they exist to semantically mark up parts of a section.". That gave me a hint, that everything inside of my 'footer' tag is not considered a separate section in terms of outlining. So, I wrapped my 'footer' into 'section', which did the trick and my outline improved:&lt;/p&gt;

&lt;pre&gt;
body

    header.../header
    main.../main
    
    section
        footer
            h2 Main footer of the page /h2
            section
              h3 About this site /h3
            /section
            section
              h3 Contact form /h3
            /section
            nav
              h3 Footer navigation /h3
            /nav
          /footer
    /section

/body
&lt;/pre&gt;

&lt;p&gt;Which led to this outline:&lt;/p&gt;

&lt;pre&gt;

1. Header
2. Main content of the page
3. Main footer of the page
3.1. About this site
3.2. Contact form
3.3. Footer navigation

&lt;/pre&gt;

&lt;p&gt;My question is still the same: is this approach correct - to wrap 'footer' into meaningless 'section'? Please share your opinions or experience.&lt;/p&gt;

</description>
      <category>semantics</category>
      <category>footer</category>
      <category>discuss</category>
    </item>
    <item>
      <title>3 years of experience for entry-level Web Dev positions in Toronto.</title>
      <dc:creator>Andrei Navumau</dc:creator>
      <pubDate>Thu, 16 Nov 2017 05:45:20 +0000</pubDate>
      <link>https://dev.to/tyzia/3-years-of-experience-for-entry-level-web-dev-positions-in-toronto-aap</link>
      <guid>https://dev.to/tyzia/3-years-of-experience-for-entry-level-web-dev-positions-in-toronto-aap</guid>
      <description>&lt;p&gt;I was intrigued by an article by Eric Westcott in LinkedIn (&lt;a href="https://www.linkedin.com/pulse/problem-internships-eric-westcott/?trackingId=9zk5mnmT70PM56yYKiv4qg%3D%3D"&gt;Source&lt;/a&gt;) and would like you to share your opinion on this issue.&lt;/p&gt;

&lt;p&gt;To keep it short: Companies advertise entry-level positions in web development, but still require 3 years of experience. What is the option for recent college graduates in this case?&lt;/p&gt;

&lt;p&gt;The author is concerned that if you are applying to an entry-level position, you are not supposed to have any experience. On the other hand, if you have 3 years under your belt, you would not apply to an entry-level, but to a junior position. So, there seems to be an endless loop for those, who just graduated from, say, a college and are looking for an entry-level job (obviously, they can't secure a 3-years experience requirement). I'm concerned, because in a close future, I'll be facing this problem in the 'real world'.&lt;/p&gt;

&lt;p&gt;My first reaction and reply to this article was like this:&lt;/p&gt;

&lt;p&gt;When I see such a requirement (3 years of experience), I tend to think that employer is focusing not on coding experience itself, but in any relevant experience (communication, meeting deadlines, handling emails, working under pressure or being able to be part of a team). I mean, by this 3-years experience, company is trying to convey, that they do not hire a recent graduate, but they need a person with a working conditions experience.&lt;/p&gt;

&lt;p&gt;Am I wrong? What do you think?&lt;/p&gt;

</description>
      <category>positions</category>
      <category>experience</category>
      <category>discuss</category>
    </item>
    <item>
      <title>Section or article to use in HTML semantics markup?</title>
      <dc:creator>Andrei Navumau</dc:creator>
      <pubDate>Thu, 16 Nov 2017 05:16:27 +0000</pubDate>
      <link>https://dev.to/tyzia/section-or-article-to-use-in-html-semantics-markup-30d</link>
      <guid>https://dev.to/tyzia/section-or-article-to-use-in-html-semantics-markup-30d</guid>
      <description>&lt;p&gt;If you are wondering, which section element - SECTION or ARTICLE - to use while creating your html markup, just keep in mind this useful and concise definition of both of them and in what way they are different.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Section&lt;/em&gt; is to be used, when we talk about something, which is &lt;strong&gt;a part of&lt;/strong&gt; something else. For instance, a chapter in the book. Because, the chapter is part of the book along with other chapters.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Article&lt;/em&gt; should be used, when we mean something, which exists &lt;strong&gt;on its own&lt;/strong&gt;. For instance, a tweet, comment, blog post, newspaper ad. Because, comment is not part of the article, which it refers to, the comment lives by itself.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.w3.org/TR/html5/sections.html#outline"&gt;Source.&lt;/a&gt;&lt;/p&gt;

</description>
      <category>article</category>
      <category>section</category>
      <category>semantics</category>
      <category>html</category>
    </item>
    <item>
      <title>Default 4px spacing between inline elements</title>
      <dc:creator>Andrei Navumau</dc:creator>
      <pubDate>Sat, 21 Oct 2017 22:38:53 +0000</pubDate>
      <link>https://dev.to/tyzia/default-4px-spacing-between-inline-elements-dom</link>
      <guid>https://dev.to/tyzia/default-4px-spacing-between-inline-elements-dom</guid>
      <description>&lt;h2&gt;Problem stating&lt;/h2&gt;

&lt;p&gt;If you try to create a navigation element ('nav') with menu created via not ordered list items, you will find yourself facing a problem of approximately 4px spacing between 'li' elements.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--ubVDO8yp--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://thepracticaldev.s3.amazonaws.com/i/bs6pl6f502nsdna4nls3.JPG" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--ubVDO8yp--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://thepracticaldev.s3.amazonaws.com/i/bs6pl6f502nsdna4nls3.JPG" alt="screen of default 4px spacing between inline elements" width="610" height="191"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;It's not a margin. HTML code looks like this:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--7iZXhIgR--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://thepracticaldev.s3.amazonaws.com/i/m52phv8ecxncx5ns2xg2.JPG" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--7iZXhIgR--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://thepracticaldev.s3.amazonaws.com/i/m52phv8ecxncx5ns2xg2.JPG" alt="screen of html code snippet with 'ul' and 'li' items" width="502" height="284"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;Cause&lt;/h2&gt;

&lt;p&gt;Let me start by saying that the cause of this issue lies in html markup. Every time when we insert new 'li' element on a separate line in code editor, we are inserting a line break at the end of previous 'li' element. This line break is interpreted as a white-space by our agent (browser). The default behavior of the browser to render a white-space - is to generate space of 4px. Actually, it's not 4px exactly. It depends on font-family (serif, sans-serif), font-size and scale.
 But these are minor issues and could be omitted. We'll assume, that this spacing is always 4px. Which is true in most cases.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--oVOxOy4W--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://thepracticaldev.s3.amazonaws.com/i/anm5dpyo71r6b1oo5gqv.JPG" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--oVOxOy4W--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://thepracticaldev.s3.amazonaws.com/i/anm5dpyo71r6b1oo5gqv.JPG" alt="screen of html code showing li elements" width="374" height="72"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;Solutions&lt;/h2&gt;

&lt;p&gt;There are several ways to avoid annoying 4px spacing. Each one has its cons and pros. It's up to you to decide, which one to use. They can be grouped by 'HTML' and 'CSS' methods.&lt;/p&gt;

&lt;p&gt;All the below will produce the same result like:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--s4AKoAdC--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://thepracticaldev.s3.amazonaws.com/i/qrzg3ne4zu3nt7kaosee.JPG" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--s4AKoAdC--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://thepracticaldev.s3.amazonaws.com/i/qrzg3ne4zu3nt7kaosee.JPG" alt="webpage without spacing between li elements." width="575" height="195"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;All the below will have basically the same pro/con:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Pro&lt;/strong&gt;: No hassle with css.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Con&lt;/strong&gt;: Not regular html markup, which is usually hard to read.&lt;/p&gt;

&lt;h3&gt;1) [HTML method] Write all li elements in one line without line breaks&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--5pK_XnrQ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://thepracticaldev.s3.amazonaws.com/i/ldfbl7c8ww4vk9rql6fg.JPG" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--5pK_XnrQ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://thepracticaldev.s3.amazonaws.com/i/ldfbl7c8ww4vk9rql6fg.JPG" alt="html code with li elements on one line" width="795" height="208"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;2) [HTML method] No line breaks between closing and opening 'li' tags. The rest of code can sit on separate lines.&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--0NpydQmq--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://thepracticaldev.s3.amazonaws.com/i/p29il21itg1e1m0wt0tl.JPG" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--0NpydQmq--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://thepracticaldev.s3.amazonaws.com/i/p29il21itg1e1m0wt0tl.JPG" alt="html code with open and close li tags on one line" width="423" height="247"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;3) [HTML method] Insert html comment instead of line breaks.&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--XEUKZ9_4--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://thepracticaldev.s3.amazonaws.com/i/g1uun9rvklns4huybi2p.JPG" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--XEUKZ9_4--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://thepracticaldev.s3.amazonaws.com/i/g1uun9rvklns4huybi2p.JPG" alt="html code with comments" width="628" height="203"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;4) [HTML method] Break closing 'li' tag btween lines.&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Yl0H2okp--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://thepracticaldev.s3.amazonaws.com/i/f63gzd5sfbvh1t088qni.JPG" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Yl0H2okp--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://thepracticaldev.s3.amazonaws.com/i/f63gzd5sfbvh1t088qni.JPG" alt="html code with split tag" width="407" height="198"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;5) [HTML method] Skip closing 'li' tag, its HTML5 valid.&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--3asnKAEG--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://thepracticaldev.s3.amazonaws.com/i/ddmm6y8pf20v2wqvkp30.JPG" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--3asnKAEG--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://thepracticaldev.s3.amazonaws.com/i/ddmm6y8pf20v2wqvkp30.JPG" alt="html code with split tag" width="359" height="202"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;6) [CSS method] Assign negative margin for contents of 'li' elements.&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--UMYXJSyH--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://thepracticaldev.s3.amazonaws.com/i/vicl3n6pkeuf84bjtp7k.JPG" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--UMYXJSyH--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://thepracticaldev.s3.amazonaws.com/i/vicl3n6pkeuf84bjtp7k.JPG" alt="css code with margin -4px" width="222" height="76"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Though, in my case, 4px were not enough to kill the spacing. See a screen:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--w2SJA7X6--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://thepracticaldev.s3.amazonaws.com/i/mkmzod3nntum30lkngo8.JPG" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--w2SJA7X6--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://thepracticaldev.s3.amazonaws.com/i/mkmzod3nntum30lkngo8.JPG" alt="spacing between inline elements still exist" width="800" height="264"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;So I should set margin-right for -5px.&lt;/p&gt;

&lt;h3&gt;7) [CSS method] Set font-size to zero for parent element and set correct font-size for 'li' elements.&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--m0EGY-24--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://thepracticaldev.s3.amazonaws.com/i/srqidgl7qnqjfc968lb1.JPG" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--m0EGY-24--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://thepracticaldev.s3.amazonaws.com/i/srqidgl7qnqjfc968lb1.JPG" alt="css code with font-szie prperty" width="237" height="162"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Though, in this case, you can't use 'em' or '%' font-size for child elements.
 All children of this parent will have font-size zero, so only 'rem' or 'px' font-sizes can be used.&lt;/p&gt;

&lt;h3&gt;8) [CSS method] Set float 'left' for 'li' elements.&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--PO4FkkSo--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://thepracticaldev.s3.amazonaws.com/i/spy2upr8d1f1vf2o7rqu.JPG" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--PO4FkkSo--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://thepracticaldev.s3.amazonaws.com/i/spy2upr8d1f1vf2o7rqu.JPG" alt="css code with float prperty" width="170" height="77"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;But in this case, extra positioning is needed.&lt;/p&gt;

&lt;h3&gt;9) [CSS method] Set letter-spacing to '-1em' for parent and to 'normal' for 'li' elements.&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--owO8TSX4--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://thepracticaldev.s3.amazonaws.com/i/c7z9jcriwnkq4axz8ljp.JPG" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--owO8TSX4--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://thepracticaldev.s3.amazonaws.com/i/c7z9jcriwnkq4axz8ljp.JPG" alt="css code with letter-spacing prperty" width="265" height="162"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;10) [CSS method] Display as 'table' for parent and as 'table-cell' for 'li' elements.&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--PLYYlsok--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://thepracticaldev.s3.amazonaws.com/i/zwpg0uu6jdqezav9v0s5.JPG" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--PLYYlsok--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://thepracticaldev.s3.amazonaws.com/i/zwpg0uu6jdqezav9v0s5.JPG" alt="css code with display table prperty" width="237" height="166"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;11) [CSS method] Display as 'flex' for parent.&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--gCwyZMt9--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://thepracticaldev.s3.amazonaws.com/i/w348chz9soni3wk0fzsz.JPG" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--gCwyZMt9--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://thepracticaldev.s3.amazonaws.com/i/w348chz9soni3wk0fzsz.JPG" alt="css code with display flex" width="197" height="94"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Thank you, &lt;a href="https://css-tricks.com/fighting-the-space-between-inline-block-elements/" rel="noopener noreferrer"&gt;Cris Coyier post&lt;/a&gt; and &lt;a href="https://stackoverflow.com/questions/5256533/a-space-between-inline-block-list-items" rel="noopener noreferrer"&gt;Kyle stackoverflow answer&lt;/a&gt;, I got my inspiration from your knowledge.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Conditional SQL JOIN</title>
      <dc:creator>Andrei Navumau</dc:creator>
      <pubDate>Mon, 25 Sep 2017 03:34:05 +0000</pubDate>
      <link>https://dev.to/tyzia/conditional-sql-join</link>
      <guid>https://dev.to/tyzia/conditional-sql-join</guid>
      <description>&lt;p&gt;I would like to share my experience in SQL joins.&lt;/p&gt;

&lt;p&gt;The problem: I have 3 tables: 'vendors', 'invoices', 'terms'. I outer joined 'vendors' and 'invoices', now I'd like to join 'terms' table, but ON clause is conditional. If invoices.term_id is not null, than I join 'terms' table based on invoices.term_id, else I join 'terms' table based on vendors.default_terms_id. How can I use if in ON clause?&lt;/p&gt;

&lt;p&gt;Solution:&lt;br&gt;
I found it at &lt;a href="http://weblogs.sqlteam.com/jeffs/archive/2007/04/03/Conditional-Joins.aspx"&gt;Jef's SQL Server Blog&lt;/a&gt;, thanks him a lot.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Do not use conditions in ON clause.&lt;/li&gt;
&lt;li&gt;Create two LEFT OUTER JOINs, based on each condition, i.e.
&lt;pre&gt;LEFT OUTER JOIN terms t ON invoices.term_id = t.term_id
LEFT OUTER JOIN terms t ON vendors.default_term_id = t.term_id&lt;/pre&gt;
&lt;/li&gt;
&lt;li&gt;In SELECT statement with the help of COALESCE() function choose only that field, which is not null:
&lt;pre&gt;SELECT COALESCE(invoices.term_id, vendors.default_term_id)&lt;/pre&gt;
&lt;/li&gt;
&lt;li&gt;Into COALESCE() we put first that field, which is likely to be not null. But if it is null, than we use a default value, which is always not null.&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Full query looks like this (there are additional constraints, but you'll get an idea):&lt;/p&gt;

&lt;pre&gt;SELECT v.vendor_id AS "Vendor #",
    vendor_name AS "Vendor Name",
    vendor_contact_first_name AS "Contact First Name",
    vendor_contact_last_name AS "Contact Last Name",
    invoice_id AS "Invoice #",
    invoice_date AS "Invoice Date",
    COALESCE(t.terms_description, t_default.terms_description) AS "Description of Terms"
FROM vendors v
    LEFT JOIN invoices i
        ON v.vendor_id = i.vendor_id
    LEFT JOIN terms t
        ON t.terms_id = i.terms_id 
    LEFT JOIN terms t_default
        ON t_default.terms_id = v.default_terms_id
WHERE v.vendor_contact_last_name LIKE 'Z%'
  OR (v.vendor_contact_last_name &amp;gt; 'V' AND v.vendor_contact_last_name &amp;lt; 'Y')
ORDER BY vendor_contact_last_name DESC;&lt;/pre&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Cheers!&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

</description>
      <category>sql</category>
      <category>join</category>
      <category>condition</category>
    </item>
  </channel>
</rss>
