i created a module by using custom portlet definition.
Before creating data source from workbench i runned portlet's sql query on database. There were 83 results on db, but when i use this query in a portlet definition as a datasource; portlet's result and db result don't match. Portlet's result is 38, db result is 83 rows.
How may this happen, may i define column types wrong?
1. my first guess is that the mapping is wrong in the portlet definition (maybe it is pointing to a different data source). To check this, go to edit portlet definition and check the data source name.
2. you can alter the SQL query in the datasource (to write FROOOOOM instead of FROM) to force PPM to show you the exact query that PPM is running - you can run this in your SQL query tool to compare the results.
Some more comments on your SQL:
1. It is a really bad idea to hard code IDs for your entities. If you do this in a DEV environment and then migrate to another environment, there is a fairly good chance that your query will not run properly, since the entities might not have the same ID in both environments. I would strongly suggest to always use entities names and/or references (where applicable).
2. It is a really bad idea (sorry :) ) to post screenshots with live data and real persons - this is a conflict with any Non-Disclosure agreement you might have as an employee or contractor.
--remember to kudos people who helped solve your problem